From 1c9229a2fc8ba7d43fe9a6630dd71fb6dee27c71 Mon Sep 17 00:00:00 2001 From: Mats Date: Wed, 13 Apr 2016 13:25:41 +0200 Subject: [PATCH] Don't unload the chunks twice (#350) --- .../protocols/protocol1_9to1_8/types/ChunkType.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/types/ChunkType.java b/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/types/ChunkType.java index 230ad6f8d..fdba18e23 100644 --- a/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/types/ChunkType.java +++ b/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/types/ChunkType.java @@ -128,15 +128,11 @@ public class ChunkType extends PartialType { @Override public void write(ByteBuf output, ClientChunks param, Chunk chunk) throws Exception { - if (chunk.isUnloadPacket()) { - output.clear(); - Type.VAR_INT.write(output, 0x1D); // Unload packet ID - } + if (chunk.isUnloadPacket()) return; // Write primary info output.writeInt(chunk.getX()); output.writeInt(chunk.getZ()); - if (chunk.isUnloadPacket()) return; output.writeByte(chunk.isGroundUp() ? 0x01 : 0x00); Type.VAR_INT.write(output, chunk.getPrimaryBitmask());