summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server
diff options
context:
space:
mode:
authorfeildmaster <admin@feildmaster.com>2012-08-23 14:47:38 -0500
committerfeildmaster <admin@feildmaster.com>2012-08-23 14:58:23 -0500
commit35cff16da572292785201dfb683413623efd0a43 (patch)
tree67b70ba772f498f0d6c94578cd3ffd1025549ef5 /src/main/java/net/minecraft/server
parentc88531eca6007c8de0b1b0c340f3e7d51d4492f3 (diff)
downloadcraftbukkit-35cff16da572292785201dfb683413623efd0a43.tar
craftbukkit-35cff16da572292785201dfb683413623efd0a43.tar.gz
craftbukkit-35cff16da572292785201dfb683413623efd0a43.tar.lz
craftbukkit-35cff16da572292785201dfb683413623efd0a43.tar.xz
craftbukkit-35cff16da572292785201dfb683413623efd0a43.zip
Fix EmptyChunk's not sending to the Client correctly. Fixes BUKKIT-2206
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r--src/main/java/net/minecraft/server/Packet51MapChunk.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/Packet51MapChunk.java b/src/main/java/net/minecraft/server/Packet51MapChunk.java
index b3bb3a8c..80b13e9b 100644
--- a/src/main/java/net/minecraft/server/Packet51MapChunk.java
+++ b/src/main/java/net/minecraft/server/Packet51MapChunk.java
@@ -183,6 +183,14 @@ 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;