From e020dd69ef2fae426b72c1095d95dafe9cfbb909 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Mon, 11 Dec 2023 11:27:52 +0100 Subject: [PATCH] Fix tab complete tooltip reading in old versions Fixes #648 --- .../protocol1_12_2to1_13/packets/PlayerPacket1_13.java | 5 +---- .../protocol/protocol1_13to1_13_1/Protocol1_13To1_13_1.java | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_12_2to1_13/packets/PlayerPacket1_13.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_12_2to1_13/packets/PlayerPacket1_13.java index 997a97e3..205bb35d 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_12_2to1_13/packets/PlayerPacket1_13.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_12_2to1_13/packets/PlayerPacket1_13.java @@ -319,10 +319,7 @@ public class PlayerPacket1_13 extends RewriterBase { for (int i = 0; i < count; i++) { String match = wrapper.read(Type.STRING); wrapper.write(Type.STRING, (start == 0 && !storage.isLastAssumeCommand() ? "/" : "") + match); - // Ignore tooltip - if (wrapper.read(Type.BOOLEAN)) { - wrapper.read(Type.STRING); - } + wrapper.read(Type.OPTIONAL_COMPONENT); // Remove tooltip } }); diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_13to1_13_1/Protocol1_13To1_13_1.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_13to1_13_1/Protocol1_13To1_13_1.java index be98a8bd..eda6c3fd 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_13to1_13_1/Protocol1_13To1_13_1.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_13to1_13_1/Protocol1_13To1_13_1.java @@ -136,10 +136,7 @@ public class Protocol1_13To1_13_1 extends BackwardsProtocol