Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-09-07 21:32:52 +02:00
Handle bad heightmaps in 1.17->1.16.4 (#743)
Dieser Commit ist enthalten in:
Ursprung
6292c5a5a5
Commit
1a22b371cd
@ -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);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren