mirror of
https://github.com/ViaVersion/ViaLegacy.git
synced 2025-01-02 18:28:57 +01:00
Use asUnformattedString instead of asLegacyFormatString
This commit is contained in:
parent
a6f47d6633
commit
f9f02c4729
@ -1364,7 +1364,7 @@ public class Protocolr1_7_6_10Tor1_8 extends AbstractProtocol<ClientboundPackets
|
||||
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);
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ public class ItemRewriter extends LegacyItemRewriter<ClientboundPackets1_7_2, Se
|
||||
|
||||
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()));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user