3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-12-27 08:30:10 +01:00

Handle bad heightmaps in 1.17->1.16.4 (#743)

Dieser Commit ist enthalten in:
EnZaXD 2024-05-09 21:56:14 +02:00 committet von GitHub
Ursprung 6292c5a5a5
Commit 1a22b371cd
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194

Datei anzeigen

@ -339,6 +339,10 @@ public final class BlockItemPackets1_17 extends BackwardsItemRewriter<Clientboun
CompoundTag heightMaps = chunk.getHeightMap(); CompoundTag heightMaps = chunk.getHeightMap();
for (Tag heightMapTag : heightMaps.values()) { for (Tag heightMapTag : heightMaps.values()) {
if (!(heightMapTag instanceof LongArrayTag)) {
continue; // Client can handle bad data
}
LongArrayTag heightMap = (LongArrayTag) heightMapTag; LongArrayTag heightMap = (LongArrayTag) heightMapTag;
int[] heightMapData = new int[256]; int[] heightMapData = new int[256];
int bitsPerEntry = MathUtil.ceilLog2((currentWorldSectionHeight << 4) + 1); int bitsPerEntry = MathUtil.ceilLog2((currentWorldSectionHeight << 4) + 1);