From 4b58f6d154765bdd3974d878030375abecef1daf Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Mon, 10 Jun 2024 15:23:50 +0200 Subject: [PATCH] 1.21-rc1 --- .../rewriter/BlockItemPacketRewriter1_21.java | 12 ++++++++---- .../rewriter/EntityPacketRewriter1_21.java | 7 +------ gradle.properties | 2 +- gradle/libs.versions.toml | 2 +- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/v1_21to1_20_5/rewriter/BlockItemPacketRewriter1_21.java b/common/src/main/java/com/viaversion/viabackwards/protocol/v1_21to1_20_5/rewriter/BlockItemPacketRewriter1_21.java index 5ca725fb..70228869 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/v1_21to1_20_5/rewriter/BlockItemPacketRewriter1_21.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/v1_21to1_20_5/rewriter/BlockItemPacketRewriter1_21.java @@ -120,8 +120,10 @@ public final class BlockItemPacketRewriter1_21 extends BackwardsStructuredItemRe } @Override - public @Nullable Item handleItemToClient(final UserConnection connection, @Nullable final Item item) { - if (item == null) return null; + public Item handleItemToClient(final UserConnection connection, final Item item) { + if (item.isEmpty()) { + return item; + } final StructuredDataContainer data = item.dataContainer(); data.setIdLookup(protocol, true); @@ -153,8 +155,10 @@ public final class BlockItemPacketRewriter1_21 extends BackwardsStructuredItemRe } @Override - public @Nullable Item handleItemToServer(final UserConnection connection, @Nullable final Item item) { - if (item == null) return null; + public Item handleItemToServer(final UserConnection connection, final Item item) { + if (item.isEmpty()) { + return item; + } final StructuredDataContainer dataContainer = item.dataContainer(); dataContainer.setIdLookup(protocol, false); diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/v1_21to1_20_5/rewriter/EntityPacketRewriter1_21.java b/common/src/main/java/com/viaversion/viabackwards/protocol/v1_21to1_20_5/rewriter/EntityPacketRewriter1_21.java index cbe79bf1..0139af39 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/v1_21to1_20_5/rewriter/EntityPacketRewriter1_21.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/v1_21to1_20_5/rewriter/EntityPacketRewriter1_21.java @@ -176,7 +176,6 @@ public final class EntityPacketRewriter1_21 extends EntityRewriter { - final int blockState = data.value(); - data.setValue(protocol.getMappingData().getNewBlockStateId(blockState)); - }); + registerBlockStateHandler(EntityTypes1_20_5.ABSTRACT_MINECART, 11); } @Override diff --git a/gradle.properties b/gradle.properties index 9501133b..d522de94 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -projectVersion=5.0.0-1.21-pre3-SNAPSHOT +projectVersion=5.0.0-1.21-rc1-SNAPSHOT # Smile emoji mcVersions=1.20.6,1.20.5,1.20.4, 1.20.3, 1.20.2, 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17.1, 1.17, 1.16.5, 1.16.4, 1.16.3, 1.16.2, 1.16.1, 1.16, 1.15.2, 1.15.1, 1.15, 1.14.4, 1.14.3, 1.14.2, 1.14.1, 1.14, 1.13.2, 1.13.1, 1.13, 1.12.2, 1.12.1, 1.12, 1.11.2, 1.11.1, 1.11, 1.10.2, 1.10.1, 1.10 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d6609de8..0f40b9d4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,7 +3,7 @@ metadata.format.version = "1.1" [versions] # ViaVersion -viaver = "5.0.0-1.21-pre3-SNAPSHOT" +viaver = "5.0.0-1.21-rc1-SNAPSHOT" # Common provided netty = "4.0.20.Final"