mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-03 23:17:48 +01:00
small optimization with chunk serialization
This commit is contained in:
parent
58fa4cff1e
commit
89d419c949
@ -12,7 +12,6 @@ import net.minestom.server.instance.block.UpdateConsumer;
|
||||
import net.minestom.server.network.packet.server.play.ChunkDataPacket;
|
||||
import net.minestom.server.utils.MathUtils;
|
||||
import net.minestom.server.utils.binary.BinaryWriter;
|
||||
import net.minestom.server.utils.chunk.ChunkUtils;
|
||||
import net.minestom.server.world.biomes.Biome;
|
||||
|
||||
import java.util.concurrent.CopyOnWriteArraySet;
|
||||
@ -176,7 +175,7 @@ public class DynamicChunk extends Chunk {
|
||||
continue;
|
||||
|
||||
// Chunk coordinates
|
||||
binaryWriter.writeShort((short) ChunkUtils.getBlockIndex(x, y, z));
|
||||
binaryWriter.writeShort((short) index);
|
||||
|
||||
// Block ids
|
||||
binaryWriter.writeShort(blockStateId);
|
||||
|
Loading…
Reference in New Issue
Block a user