оптимизация передачи данных block light
This commit is contained in:
@@ -23,9 +23,17 @@ public class BlockLocation implements Cloneable {
|
||||
|
||||
public BlockLocation toGlobal(ChunkSection chunkSection) {
|
||||
return new BlockLocation(
|
||||
(chunkSection.getX() << 8) + x,
|
||||
(chunkSection.getY() << 8) + y,
|
||||
(chunkSection.getZ() << 8) + z
|
||||
(chunkSection.getX() << 4) + x,
|
||||
(chunkSection.getY() << 4) + y,
|
||||
(chunkSection.getZ() << 4) + z
|
||||
);
|
||||
}
|
||||
|
||||
public BlockLocation toLocal() {
|
||||
return new BlockLocation(
|
||||
x - (x >> 4 << 4),
|
||||
y - (y >> 4 << 4),
|
||||
z - (z >> 4 << 4)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user