diff --git a/src/main/java/net/minecraft/server/Packet51MapChunk.java b/src/main/java/net/minecraft/server/Packet51MapChunk.java index 80b13e9b8b..0533048e09 100644 --- a/src/main/java/net/minecraft/server/Packet51MapChunk.java +++ b/src/main/java/net/minecraft/server/Packet51MapChunk.java @@ -176,6 +176,16 @@ public class Packet51MapChunk extends Packet { } } + // CraftBukkit start - Hackiest hack to have ever hacked. + // First of all, check to see if we flagged it to send, and all data is "0" + // This means that it's an "EmptyChunk," HOWEVER... It's not a physical EmptyChunk on the server, there is simply no data present + if (flag && i == 0xffff && j == 0 && chunkmap.b == 0 && chunkmap.c == 0) { + chunkmap.b = 1; + j = 10240; + java.util.Arrays.fill(abyte, 0, j, (byte) 0); + } + // CraftBukkit end + if (flag) { byte[] abyte2 = chunk.m(); @@ -183,14 +193,6 @@ public class Packet51MapChunk extends Packet { j += abyte2.length; } - // CraftBukkit start - Hackiest hack to have ever hacked. - // First of all, check to see if we flagged it to send, and all data is "0" - // This means that it's an "EmptyChunk," HOWEVER... It's not a physical EmptyChunk on the server, there is simply no data present - if (flag && i == 0xffff && k == 0 && chunkmap.b == 0 && chunkmap.c == 0) { - chunkmap.b = 1; - } - // CraftBukkit end - chunkmap.a = new byte[j]; System.arraycopy(abyte, 0, chunkmap.a, 0, j); return chunkmap;