From fa1c3e15200e4aa3a5c423ae270f87c8dbdd9558 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Thu, 1 Feb 2024 17:53:18 +0100 Subject: [PATCH] 24w05b --- .../rewriter/EntityPacketRewriter1_20_5.java | 6 +++++- gradle.properties | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/rewriter/EntityPacketRewriter1_20_5.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/rewriter/EntityPacketRewriter1_20_5.java index b490b3b6..e1047d2f 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/rewriter/EntityPacketRewriter1_20_5.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/rewriter/EntityPacketRewriter1_20_5.java @@ -37,6 +37,7 @@ import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.packet.Clientb import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.packet.ClientboundPacket1_20_5; import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.packet.ClientboundPackets1_20_5; import com.viaversion.viaversion.util.Key; +import com.viaversion.viaversion.util.MathUtil; import java.util.HashMap; import java.util.Map; @@ -163,7 +164,10 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter { wrapper.passthrough(Type.VAR_INT); // Entity ID wrapper.passthrough(Type.VAR_INT); // Effect ID - wrapper.passthrough(Type.BYTE); // Amplifier + + final int amplifier = wrapper.read(Type.VAR_INT); + wrapper.write(Type.BYTE, (byte) MathUtil.clamp(amplifier, 0, 127)); + wrapper.passthrough(Type.VAR_INT); // Duration wrapper.passthrough(Type.BYTE); // Flags wrapper.write(Type.OPTIONAL_COMPOUND_TAG, null); // Add empty factor data diff --git a/gradle.properties b/gradle.properties index 5a53bda4..e1c7b3f3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -projectVersion=4.10.0-24w05a-SNAPSHOT +projectVersion=4.10.0-24w05b-SNAPSHOT # Smile emoji mcVersions=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