diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/packets/WorldPackets.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/packets/WorldPackets.java index 0ea006e83..ae74f4451 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/packets/WorldPackets.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/packets/WorldPackets.java @@ -134,7 +134,7 @@ public class WorldPackets { int[] motionBlocking = new int[16 * 16]; int[] worldSurface = new int[16 * 16]; - for (int s = 0; s < 16; s++) { + for (int s = 0; s < chunk.getSections().length; s++) { ChunkSection section = chunk.getSections()[s]; if (section == null) continue; diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_15to1_14_4/packets/WorldPackets.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_15to1_14_4/packets/WorldPackets.java index 42729f2a4..0a3f0f8e6 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_15to1_14_4/packets/WorldPackets.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_15to1_14_4/packets/WorldPackets.java @@ -53,7 +53,7 @@ public class WorldPackets { chunk.setBiomeData(newBiomeData); } - for (int s = 0; s < 16; s++) { + for (int s = 0; s < chunk.getSections().length; s++) { ChunkSection section = chunk.getSections()[s]; if (section == null) continue; for (int i = 0; i < section.getPaletteSize(); i++) { diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_16_2to1_16_1/packets/WorldPackets.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_16_2to1_16_1/packets/WorldPackets.java index c19ca7826..f3c563e88 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_16_2to1_16_1/packets/WorldPackets.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_16_2to1_16_1/packets/WorldPackets.java @@ -36,7 +36,7 @@ public class WorldPackets { Chunk chunk = wrapper.read(new Chunk1_16Type()); wrapper.write(new Chunk1_16_2Type(), chunk); - for (int s = 0; s < 16; s++) { + for (int s = 0; s < chunk.getSections().length; s++) { ChunkSection section = chunk.getSections()[s]; if (section == null) continue; for (int i = 0; i < section.getPaletteSize(); i++) { diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_16to1_15_2/packets/WorldPackets.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_16to1_15_2/packets/WorldPackets.java index 9b718d321..adb8dbc9d 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_16to1_15_2/packets/WorldPackets.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_16to1_15_2/packets/WorldPackets.java @@ -48,7 +48,7 @@ public class WorldPackets { chunk.setIgnoreOldLightData(chunk.isFullChunk()); - for (int s = 0; s < 16; s++) { + for (int s = 0; s < chunk.getSections().length; s++) { ChunkSection section = chunk.getSections()[s]; if (section == null) continue; for (int i = 0; i < section.getPaletteSize(); i++) { diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_17to1_16_4/packets/WorldPackets.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_17to1_16_4/packets/WorldPackets.java index 289bcb9ec..81e62580b 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_17to1_16_4/packets/WorldPackets.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_17to1_16_4/packets/WorldPackets.java @@ -82,7 +82,7 @@ public class WorldPackets { public void registerMap() { handler(wrapper -> { Chunk chunk = wrapper.read(new Chunk1_16_2Type()); - wrapper.write(new Chunk1_17Type(16), chunk); + wrapper.write(new Chunk1_17Type(chunk.getSections().length), chunk); BiomeStorage biomeStorage = wrapper.user().get(BiomeStorage.class); if (chunk.isFullChunk()) { @@ -98,7 +98,7 @@ public class WorldPackets { } } - for (int s = 0; s < 16; s++) { + for (int s = 0; s < chunk.getSections().length; s++) { ChunkSection section = chunk.getSections()[s]; if (section == null) continue; for (int i = 0; i < section.getPaletteSize(); i++) {