From e24a170e773d87b7320b233605e9a6144aa5022f Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Thu, 7 Dec 2023 23:17:55 +0100 Subject: [PATCH] Fix reset score reading --- .../protocol1_20_2to1_20_3/Protocol1_20_2To1_20_3.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_2to1_20_3/Protocol1_20_2To1_20_3.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_2to1_20_3/Protocol1_20_2To1_20_3.java index 84cdf228..0ec6e29e 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_2to1_20_3/Protocol1_20_2To1_20_3.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_2to1_20_3/Protocol1_20_2To1_20_3.java @@ -88,7 +88,9 @@ public final class Protocol1_20_2To1_20_3 extends BackwardsProtocol { wrapper.passthrough(Type.STRING); // Owner wrapper.write(Type.BYTE, (byte) 1); // Reset score - wrapper.passthrough(Type.STRING); // Objective name + + final String objectiveName = wrapper.read(Type.OPTIONAL_STRING); + wrapper.write(Type.STRING, objectiveName != null ? objectiveName : ""); // Objective name }); registerClientbound(ClientboundPackets1_20_3.UPDATE_SCORE, wrapper -> { wrapper.passthrough(Type.STRING); // Owner