From abb2abe5c9b5aa6cf64428b74a5ef06fb5d0a9c6 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Wed, 13 Oct 2021 21:15:59 +0200 Subject: [PATCH] Update biome palette reading --- build.gradle.kts | 2 +- .../packets/BlockItemPackets1_18.java | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 10517456..fb3b0965 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,7 +5,7 @@ plugins { allprojects { group = "com.viaversion" - version = "4.1.0-21w40a-SNAPSHOT" + version = "4.1.0-21w41a-SNAPSHOT" description = "Allow older clients to join newer server versions." } diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_17_1to1_18/packets/BlockItemPackets1_18.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_17_1to1_18/packets/BlockItemPackets1_18.java index 76475d8e..30c88011 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_17_1to1_18/packets/BlockItemPackets1_18.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_17_1to1_18/packets/BlockItemPackets1_18.java @@ -48,7 +48,6 @@ public final class BlockItemPackets1_18 extends ItemRewriter> WIDTH_BITS + WIDTH_BITS) << 2) & 15; - final int minZ = (biomeIndex >> WIDTH_BITS & HORIZONTAL_MASK) << 2; - biomeData[biomeIndex] = biomePalette.idAt(minX, minY, minZ); + for (int i = 0; i < ChunkSection.BIOME_SIZE; i++) { + biomeData[biomeIndex++] = biomePalette.idAt(i); } // Rewrite ids