From 5334f77d49e68853ab80c3497f0f4678f673010f Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Wed, 27 Dec 2023 17:30:47 +0100 Subject: [PATCH] Finish up things --- .../chat/TranslatableRewriter1_16.java | 33 ++----------------- .../Protocol1_19_1To1_19_3.java | 2 +- .../Protocol1_19To1_19_1.java | 2 +- .../Protocol1_20_2To1_20_3.java | 6 ++-- .../rewriter/EntityPacketRewriter1_20_3.java | 6 ++-- 5 files changed, 11 insertions(+), 38 deletions(-) diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_15_2to1_16/chat/TranslatableRewriter1_16.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_15_2to1_16/chat/TranslatableRewriter1_16.java index 76b60395..f37b59f0 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_15_2to1_16/chat/TranslatableRewriter1_16.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_15_2to1_16/chat/TranslatableRewriter1_16.java @@ -17,15 +17,13 @@ */ package com.viaversion.viabackwards.protocol.protocol1_15_2to1_16.chat; -import com.viaversion.viabackwards.ViaBackwards; import com.viaversion.viabackwards.api.rewriters.TranslatableRewriter; import com.viaversion.viabackwards.protocol.protocol1_15_2to1_16.Protocol1_15_2To1_16; -import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.libs.gson.JsonElement; import com.viaversion.viaversion.libs.gson.JsonObject; -import com.viaversion.viaversion.libs.gson.JsonParseException; import com.viaversion.viaversion.libs.gson.JsonPrimitive; import com.viaversion.viaversion.protocols.protocol1_16to1_15_2.ClientboundPackets1_16; +import com.viaversion.viaversion.util.ComponentUtil; public class TranslatableRewriter1_16 extends TranslatableRewriter { @@ -76,33 +74,8 @@ public class TranslatableRewriter1_16 extends TranslatableRewriter { @@ -99,10 +99,10 @@ public final class EntityPacketRewriter1_20_3 extends EntityRewriter { final MetaType type = meta.metaType(); if (type == Types1_20_3.META_TYPES.componentType) { - meta.setTypeAndValue(Types1_20_2.META_TYPES.componentType, ComponentConverter.tagComponentToJson(meta.value())); + meta.setTypeAndValue(Types1_20_2.META_TYPES.componentType, ComponentUtil.tagToJson(meta.value())); return; } else if (type == Types1_20_3.META_TYPES.optionalComponentType) { - meta.setTypeAndValue(Types1_20_2.META_TYPES.optionalComponentType, ComponentConverter.tagComponentToJson(meta.value())); + meta.setTypeAndValue(Types1_20_2.META_TYPES.optionalComponentType, ComponentUtil.tagToJson(meta.value())); return; } else if (type == Types1_20_3.META_TYPES.particleType) { final Particle particle = (Particle) meta.getValue();