Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix EmptyChunk's not sending to the Client correctly. Fixes BUKKIT-2206

  • Loading branch information...
commit 256c5295c9adf9b2ff9ac5d8158b92288866faf6 1 parent 37a6cf0
authored August 23, 2012
8  src/main/java/net/minecraft/server/Packet51MapChunk.java
@@ -183,6 +183,14 @@ public static ChunkMap a(Chunk chunk, boolean flag, int i) {
183 183
             j += abyte2.length;
184 184
         }
185 185
 
  186
+        // CraftBukkit start - Hackiest hack to have ever hacked.
  187
+        // First of all, check to see if we flagged it to send, and all data is "0"
  188
+        // This means that it's an "EmptyChunk," HOWEVER... It's not a physical EmptyChunk on the server, there is simply no data present
  189
+        if (flag && i == 0xffff && k == 0 && chunkmap.b == 0 && chunkmap.c == 0) {
  190
+            chunkmap.b = 1;
  191
+        }
  192
+        // CraftBukkit end
  193
+
186 194
         chunkmap.a = new byte[j];
187 195
         System.arraycopy(abyte, 0, chunkmap.a, 0, j);
188 196
         return chunkmap;

2 notes on commit 256c529

Joe

New record besides Packet 15 Place?

Bone008

Thanks a lot. I've had a lot of trouble with that, and ended up writing an own Chunk implementation that would resent itself as soon as it turns non-empty. Didn't know the solution would be as "simple" as that.

Please sign in to comment.
Something went wrong with that request. Please try again.