3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 20:40:08 +01:00

Fix empty chunks not sending biome properly and causing client side issues. Fixes BUKKIT-2396

Dieser Commit ist enthalten in:
feildmaster 2012-08-25 08:46:59 -05:00
Ursprung bedc2f0357
Commit cb84d6b994

Datei anzeigen

@ -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;