diff --git a/src/main/java/net/raphimc/vialegacy/protocol/release/r1_7_6_10tor1_8/Protocolr1_7_6_10Tor1_8.java b/src/main/java/net/raphimc/vialegacy/protocol/release/r1_7_6_10tor1_8/Protocolr1_7_6_10Tor1_8.java index 1fa1910..95cf2cd 100644 --- a/src/main/java/net/raphimc/vialegacy/protocol/release/r1_7_6_10tor1_8/Protocolr1_7_6_10Tor1_8.java +++ b/src/main/java/net/raphimc/vialegacy/protocol/release/r1_7_6_10tor1_8/Protocolr1_7_6_10Tor1_8.java @@ -1364,7 +1364,7 @@ public void register() { handler(wrapper -> { for (int i = 0; i < 4; i++) { final JsonElement component = wrapper.read(Types.COMPONENT); // line - String text = TextComponentSerializer.V1_8.deserialize(component).asLegacyFormatString(); + String text = TextComponentSerializer.V1_8.deserialize(component).asUnformattedString(); if (text.length() > 15) text = text.substring(0, 15); wrapper.write(Types.STRING, text); } diff --git a/src/main/java/net/raphimc/vialegacy/protocol/release/r1_7_6_10tor1_8/rewriter/ItemRewriter.java b/src/main/java/net/raphimc/vialegacy/protocol/release/r1_7_6_10tor1_8/rewriter/ItemRewriter.java index 8f17189..977f136 100644 --- a/src/main/java/net/raphimc/vialegacy/protocol/release/r1_7_6_10tor1_8/rewriter/ItemRewriter.java +++ b/src/main/java/net/raphimc/vialegacy/protocol/release/r1_7_6_10tor1_8/rewriter/ItemRewriter.java @@ -133,7 +133,7 @@ public Item handleItemToServer(final UserConnection user, final Item item) { for (int i = 0; i < pages.size(); i++) { final String text = pages.get(i).getValue(); - pages.set(i, new StringTag(TextComponentSerializer.V1_8.deserialize(text).asLegacyFormatString())); + pages.set(i, new StringTag(TextComponentSerializer.V1_8.deserialize(text).asUnformattedString())); } }