diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_16_4to1_17/packets/BlockItemPackets1_17.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_16_4to1_17/packets/BlockItemPackets1_17.java index 715e686a2..6c5b866d8 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_16_4to1_17/packets/BlockItemPackets1_17.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_16_4to1_17/packets/BlockItemPackets1_17.java @@ -339,6 +339,10 @@ public void register() { CompoundTag heightMaps = chunk.getHeightMap(); for (Tag heightMapTag : heightMaps.values()) { + if (!(heightMapTag instanceof LongArrayTag)) { + continue; // Client can handle bad data + } + LongArrayTag heightMap = (LongArrayTag) heightMapTag; int[] heightMapData = new int[256]; int bitsPerEntry = MathUtil.ceilLog2((currentWorldSectionHeight << 4) + 1);