Convert chat type in disguised chat packet

Fixes #3551
This commit is contained in:
Nassim Jahnke 2023-12-07 10:10:07 +01:00
parent d98c458a4c
commit 23ba848a69
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F
1 changed files with 6 additions and 1 deletions

View File

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