From 6fe3c15f7d95f1d856132cb72c37f7e28f51290b Mon Sep 17 00:00:00 2001 From: Myles Date: Fri, 4 Mar 2016 21:16:12 +0000 Subject: [PATCH] Remove 1.9 chunk unloading, should fix #38 --- .../transformers/OutgoingTransformer.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/us/myles/ViaVersion/transformers/OutgoingTransformer.java b/src/main/java/us/myles/ViaVersion/transformers/OutgoingTransformer.java index 46fcf0556..a42cb865d 100644 --- a/src/main/java/us/myles/ViaVersion/transformers/OutgoingTransformer.java +++ b/src/main/java/us/myles/ViaVersion/transformers/OutgoingTransformer.java @@ -103,7 +103,7 @@ public class OutgoingTransformer { byte[] b = new byte[input.readableBytes()]; input.readBytes(b); // patch books - if(name.equals("MC|BOpen")){ + if (name.equals("MC|BOpen")) { PacketUtil.writeVarInt(0, output); } output.writeBytes(b); @@ -558,18 +558,18 @@ public class OutgoingTransformer { output.writeBoolean(groundUp); int bitMask = input.readUnsignedShort(); - - if (bitMask == 0 && groundUp) { - output.clear(); - PacketUtil.writeVarInt(PacketType.PLAY_UNLOAD_CHUNK.getNewPacketID(), output); - output.writeInt(chunkX); - output.writeInt(chunkZ); - return; - } int size = PacketUtil.readVarInt(input); - byte[] data = new byte[size]; input.readBytes(data); +// if (bitMask == 0 && groundUp) { +// // if 256 +// output.clear(); +// PacketUtil.writeVarInt(PacketType.PLAY_UNLOAD_CHUNK.getNewPacketID(), output); +// output.writeInt(chunkX); +// output.writeInt(chunkZ); +// System.out.println("Sending unload chunk " + chunkX + " " + chunkZ + " - " + size + " bulk: " + bulk); +// return; +// } boolean sk = false; if (info.getLastPacket().getClass().getName().endsWith("PacketPlayOutMapChunkBulk")) { try {