3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-16 13:00:06 +01:00

Clear out empty extended block ID array. Fixes BUKKIT-2923

If a chunk gets a block added to it that requires the extended block id
nibble array (block id greater than 255) the array is created and saved
with the chunk. When the blocks are verified to make sure they exist these
entries are erased but the extended block id array is not. This causes the
server and client to disagree about how much data a chunk has which makes
the client crash while trying to load the chunk for rendering.

To resolve these issues we now clear the extended block id array on chunk
load if there is no valid data in it.
Dieser Commit ist enthalten in:
Travis Watkins 2012-11-14 11:22:15 -06:00
Ursprung 2b22ae2d45
Commit 188a71ad5b

Datei anzeigen

@ -219,6 +219,20 @@ public class ChunkSection {
}
public void a(NibbleArray nibblearray) {
// CraftBukkit start - don't hang on to an empty nibble array
boolean empty = true;
for (int i = 0; i < nibblearray.a.length; i++) {
if (nibblearray.a[i] != 0) {
empty = false;
break;
}
}
if (empty) {
return;
}
// CraftBukkit end
this.extBlockIds = nibblearray;
}