diff --git a/common/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/Protocol1_13To1_13_1.java b/common/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/Protocol1_13To1_13_1.java index 0e38fea7..b17156da 100644 --- a/common/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/Protocol1_13To1_13_1.java +++ b/common/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13to1_13_1/Protocol1_13To1_13_1.java @@ -36,9 +36,12 @@ import us.myles.ViaVersion.api.rewriters.StatisticsRewriter; import us.myles.ViaVersion.api.rewriters.TagRewriter; import us.myles.ViaVersion.api.type.Type; import us.myles.ViaVersion.protocols.protocol1_13_1to1_13.Protocol1_13_1To1_13; +import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.ChatRewriter; import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.ClientboundPackets1_13; import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.ServerboundPackets1_13; import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld; +import us.myles.viaversion.libs.gson.JsonElement; +import us.myles.viaversion.libs.gson.JsonObject; public class Protocol1_13To1_13_1 extends BackwardsProtocol { @@ -58,7 +61,6 @@ public class Protocol1_13To1_13_1 extends BackwardsProtocol { + JsonElement title = wrapper.read(Type.COMPONENT); + translatableRewriter.processText(title); + + // https://bugs.mojang.com/browse/MC-124543 + JsonObject legacyComponent = new JsonObject(); + legacyComponent.addProperty("text", ChatRewriter.jsonToLegacyText(title.toString())); + + wrapper.write(Type.COMPONENT, legacyComponent); + }); + } + }); + registerOutgoing(ClientboundPackets1_13.TAB_COMPLETE, new PacketRemapper() { @Override public void registerMap() {