Convert chat type in disguised chat packet

This commit is contained in:
Nassim Jahnke 2023-12-07 10:11:18 +01:00
parent deede5347e
commit c44bc88d2d
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F

View File

@ -241,7 +241,12 @@ public final class Protocol1_20_2To1_20_3 extends BackwardsProtocol<ClientboundP
registerClientbound(ClientboundPackets1_20_3.ACTIONBAR, this::convertComponent);
registerClientbound(ClientboundPackets1_20_3.TITLE_TEXT, this::convertComponent);
registerClientbound(ClientboundPackets1_20_3.TITLE_SUBTITLE, this::convertComponent);
registerClientbound(ClientboundPackets1_20_3.DISGUISED_CHAT, this::convertComponent);
registerClientbound(ClientboundPackets1_20_3.DISGUISED_CHAT, wrapper -> {
convertComponent(wrapper);
wrapper.passthrough(Type.VAR_INT); // Chat type
convertComponent(wrapper); // Name
convertOptionalComponent(wrapper); // Target name
});
registerClientbound(ClientboundPackets1_20_3.SYSTEM_CHAT, this::convertComponent);
registerClientbound(ClientboundPackets1_20_3.OPEN_WINDOW, wrapper -> {
wrapper.passthrough(Type.VAR_INT); // Container id