From f9f02c47296238d690011ada11909a39da44bbd5 Mon Sep 17 00:00:00 2001 From: RaphiMC <50594595+RaphiMC@users.noreply.github.com> Date: Tue, 24 Sep 2024 20:58:01 +0200 Subject: [PATCH] Use asUnformattedString instead of asLegacyFormatString --- .../release/r1_7_6_10tor1_8/Protocolr1_7_6_10Tor1_8.java | 2 +- .../protocol/release/r1_7_6_10tor1_8/rewriter/ItemRewriter.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 class Protocolr1_7_6_10Tor1_8 extends AbstractProtocol { 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 class ItemRewriter extends LegacyItemRewriter