mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2025-01-22 23:41:27 +01:00
Remove Protocol1_9To1_8#FIX_JSON usage in 1.11->1.12 (#3791)
This commit is contained in:
parent
98c5d38d0c
commit
4302dd61aa
@ -100,11 +100,11 @@ public class Protocol1_12To1_11_1 extends AbstractProtocol<ClientboundPackets1_9
|
||||
registerClientbound(ClientboundPackets1_9_3.CHAT_MESSAGE, wrapper -> {
|
||||
if (!Via.getConfig().is1_12NBTArrayFix()) return;
|
||||
try {
|
||||
JsonElement obj = Protocol1_9To1_8.FIX_JSON.transform(null, wrapper.passthrough(Type.COMPONENT).toString());
|
||||
TranslateRewriter.toClient(obj);
|
||||
ChatItemRewriter.toClient(obj);
|
||||
final JsonElement element = wrapper.passthrough(Type.COMPONENT);
|
||||
TranslateRewriter.toClient(element);
|
||||
ChatItemRewriter.toClient(element);
|
||||
|
||||
wrapper.set(Type.COMPONENT, 0, obj);
|
||||
wrapper.set(Type.COMPONENT, 0, element);
|
||||
} catch (Exception e) {
|
||||
Via.getPlatform().getLogger().log(Level.WARNING, "Error converting 1.11.2 -> 1.12 chat item", e);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user