From 3f01f0100c16fcfd7aa1be027481538103f39cc1 Mon Sep 17 00:00:00 2001 From: KennyTV Date: Sun, 4 Jul 2021 12:03:57 +0200 Subject: [PATCH] 4.0.1 Release --- build.gradle.kts | 2 +- .../viabackwards/api/rewriters/LegacyBlockItemRewriter.java | 2 +- .../protocol1_12_2to1_13/packets/BlockItemPackets1_13.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index ddacb3ea..de97d2af 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,7 +5,7 @@ plugins { allprojects { group = "com.viaversion" - version = "4.0.1-1.17.1-rc1-SNAPSHOT" + version = "4.0.1" description = "Allow older clients to join newer server versions." } diff --git a/common/src/main/java/com/viaversion/viabackwards/api/rewriters/LegacyBlockItemRewriter.java b/common/src/main/java/com/viaversion/viabackwards/api/rewriters/LegacyBlockItemRewriter.java index 89accd86..fe052fe0 100644 --- a/common/src/main/java/com/viaversion/viabackwards/api/rewriters/LegacyBlockItemRewriter.java +++ b/common/src/main/java/com/viaversion/viabackwards/api/rewriters/LegacyBlockItemRewriter.java @@ -174,7 +174,7 @@ public abstract class LegacyBlockItemRewriter exten tags.put(pos, tag); // Handle given Block Entities - if (pos.getY() < 0) continue; // 1.17 + if (pos.getY() < 0 || pos.getY() > 255) continue; // 1.17 ChunkSection section = chunk.getSections()[pos.getY() >> 4]; if (section == null) continue; diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_12_2to1_13/packets/BlockItemPackets1_13.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_12_2to1_13/packets/BlockItemPackets1_13.java index fde6d1f6..eb1f7626 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_12_2to1_13/packets/BlockItemPackets1_13.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_12_2to1_13/packets/BlockItemPackets1_13.java @@ -302,7 +302,7 @@ public class BlockItemPackets1_13 extends com.viaversion.viabackwards.api.rewrit if (!provider.isHandled(id)) continue; int sectionIndex = ((NumberTag) tag.get("y")).asInt() >> 4; - if (sectionIndex < 0) { + if (sectionIndex < 0 || sectionIndex > 15) { // 1.17 chunks continue; }