From 4302dd61aa86428a7efe2aa449467a3285f3e51d Mon Sep 17 00:00:00 2001 From: EnZaXD <60033407+FlorianMichael@users.noreply.github.com> Date: Thu, 18 Apr 2024 15:26:13 +0200 Subject: [PATCH] Remove Protocol1_9To1_8#FIX_JSON usage in 1.11->1.12 (#3791) --- .../protocol1_12to1_11_1/Protocol1_12To1_11_1.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_12to1_11_1/Protocol1_12To1_11_1.java b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_12to1_11_1/Protocol1_12To1_11_1.java index 0780be88c..b7b0ab2f1 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_12to1_11_1/Protocol1_12To1_11_1.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_12to1_11_1/Protocol1_12To1_11_1.java @@ -100,11 +100,11 @@ public class Protocol1_12To1_11_1 extends AbstractProtocol { if (!Via.getConfig().is1_12NBTArrayFix()) return; try { - JsonElement obj = Protocol1_9To1_8.FIX_JSON.transform(null, wrapper.passthrough(Type.COMPONENT).toString()); - TranslateRewriter.toClient(obj); - ChatItemRewriter.toClient(obj); + final JsonElement element = wrapper.passthrough(Type.COMPONENT); + TranslateRewriter.toClient(element); + ChatItemRewriter.toClient(element); - wrapper.set(Type.COMPONENT, 0, obj); + wrapper.set(Type.COMPONENT, 0, element); } catch (Exception e) { Via.getPlatform().getLogger().log(Level.WARNING, "Error converting 1.11.2 -> 1.12 chat item", e); }