From 1ad65d1bb02249293b7c1d54a4674a1f7cfb40fe Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Wed, 6 Dec 2023 10:55:12 +0100 Subject: [PATCH] Add component types in conversion --- .../Protocol1_20_3To1_20_2.java | 48 ++++++++++++++++--- 1 file changed, 41 insertions(+), 7 deletions(-) diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_20_3to1_20_2/Protocol1_20_3To1_20_2.java b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_20_3to1_20_2/Protocol1_20_3To1_20_2.java index d14a20db0..d43cc87b9 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_20_3to1_20_2/Protocol1_20_3To1_20_2.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_20_3to1_20_2/Protocol1_20_3To1_20_2.java @@ -391,10 +391,12 @@ public final class Protocol1_20_3To1_20_2 extends AbstractProtocol entry : element.getAsJsonObject().entrySet()) { - // Not strictly needed, but might as well make it more compact + final JsonObject jsonObject = element.getAsJsonObject(); + for (final Map.Entry entry : jsonObject.entrySet()) { convertObjectEntry(entry.getKey(), entry.getValue(), tag); } + + addComponentType(jsonObject, tag); return tag; } else if (element.isJsonArray()) { return convertJsonArray(element); @@ -420,6 +422,7 @@ public final class Protocol1_20_3To1_20_2 extends AbstractProtocol