From dccb6f234b8892e7d50dc08c499f4ec2155ea138 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Wed, 18 Oct 2023 19:48:19 +1000 Subject: [PATCH] Add missing switch breaks --- .../viaversion/viaversion/rewriter/ComponentRewriter.java | 2 ++ .../viaversion/template/protocols/Protocol1_99To_98.java | 6 +++--- .../protocols/rewriter/BlockItemPacketRewriter1_99.java | 6 +++--- .../protocols/rewriter/EntityPacketRewriter1_99.java | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/common/src/main/java/com/viaversion/viaversion/rewriter/ComponentRewriter.java b/common/src/main/java/com/viaversion/viaversion/rewriter/ComponentRewriter.java index 60e18b917..ed9c4e8ae 100644 --- a/common/src/main/java/com/viaversion/viaversion/rewriter/ComponentRewriter.java +++ b/common/src/main/java/com/viaversion/viaversion/rewriter/ComponentRewriter.java @@ -165,8 +165,10 @@ public class ComponentRewriter { switch (type) { case JSON: processText(wrapper.passthrough(Type.COMPONENT)); + break; case NBT: processTag(wrapper.passthrough(Type.TAG)); + break; } } diff --git a/template/src/main/java/com/viaversion/viaversion/template/protocols/Protocol1_99To_98.java b/template/src/main/java/com/viaversion/viaversion/template/protocols/Protocol1_99To_98.java index c428206d9..e7298d5c1 100644 --- a/template/src/main/java/com/viaversion/viaversion/template/protocols/Protocol1_99To_98.java +++ b/template/src/main/java/com/viaversion/viaversion/template/protocols/Protocol1_99To_98.java @@ -71,7 +71,7 @@ public final class Protocol1_99To_98 extends AbstractProtocol(this).register(ClientboundPackets1_20_2.STATISTICS); // Uncomment if an existing type changed serialization format. Mappings for argument type keys can also be defined in mapping files - /*final CommandRewriter1_z commandRewriter = new CommandRewriter1_z(this) { + /*final CommandRewriter1_19_4 commandRewriter = new CommandRewriter1_19_4(this) { @Override public void handleArgument(final PacketWrapper wrapper, final String argumentType) throws Exception { if (argumentType.equals("minecraft:abc")) { @@ -105,9 +105,9 @@ public final class Protocol1_99To_98 extends AbstractProtocol { @@ -45,7 +45,7 @@ public final class BlockItemPacketRewriter1_99 extends ItemRewriter