Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-27 08:30:09 +01:00
Also handle play resource pack
Dieser Commit ist enthalten in:
Ursprung
20f4907a23
Commit
8769742917
@ -256,7 +256,7 @@ public final class Protocol1_20_3To1_20_2 extends AbstractProtocol<ClientboundPa
|
||||
|
||||
registerClientbound(State.CONFIGURATION, ClientboundConfigurationPackets1_20_2.DISCONNECT.getId(), ClientboundConfigurationPackets1_20_2.DISCONNECT.getId(), this::convertComponent);
|
||||
registerClientbound(ClientboundPackets1_20_2.DISCONNECT, this::convertComponent);
|
||||
registerClientbound(ClientboundPackets1_20_2.RESOURCE_PACK, resourcePackHandler());
|
||||
registerClientbound(ClientboundPackets1_20_2.RESOURCE_PACK, ClientboundPackets1_20_3.RESOURCE_PACK_PUSH, resourcePackHandler());
|
||||
registerClientbound(ClientboundPackets1_20_2.SERVER_DATA, this::convertComponent);
|
||||
registerClientbound(ClientboundPackets1_20_2.ACTIONBAR, this::convertComponent);
|
||||
registerClientbound(ClientboundPackets1_20_2.TITLE_TEXT, this::convertComponent);
|
||||
@ -318,10 +318,7 @@ public final class Protocol1_20_3To1_20_2 extends AbstractProtocol<ClientboundPa
|
||||
});
|
||||
|
||||
registerServerbound(State.CONFIGURATION, ServerboundConfigurationPackets1_20_2.RESOURCE_PACK, wrapper -> wrapper.read(Type.UUID));
|
||||
registerClientbound(State.CONFIGURATION, ClientboundConfigurationPackets1_20_2.RESOURCE_PACK.getId(), ClientboundConfigurationPackets1_20_3.RESOURCE_PACK_PUSH.getId(), wrapper -> {
|
||||
wrapper.write(Type.UUID, UUID.randomUUID());
|
||||
resourcePackHandler().handle(wrapper);
|
||||
});
|
||||
registerClientbound(State.CONFIGURATION, ClientboundConfigurationPackets1_20_2.RESOURCE_PACK.getId(), ClientboundConfigurationPackets1_20_3.RESOURCE_PACK_PUSH.getId(), resourcePackHandler());
|
||||
// TODO Auto map via packet types provider
|
||||
registerClientbound(State.CONFIGURATION, ClientboundConfigurationPackets1_20_2.UPDATE_ENABLED_FEATURES.getId(), ClientboundConfigurationPackets1_20_3.UPDATE_ENABLED_FEATURES.getId());
|
||||
registerClientbound(State.CONFIGURATION, ClientboundConfigurationPackets1_20_2.UPDATE_TAGS.getId(), ClientboundConfigurationPackets1_20_3.UPDATE_TAGS.getId());
|
||||
@ -329,6 +326,7 @@ public final class Protocol1_20_3To1_20_2 extends AbstractProtocol<ClientboundPa
|
||||
|
||||
private PacketHandler resourcePackHandler() {
|
||||
return wrapper -> {
|
||||
wrapper.write(Type.UUID, UUID.randomUUID());
|
||||
wrapper.passthrough(Type.STRING); // Url
|
||||
wrapper.passthrough(Type.STRING); // Hash
|
||||
wrapper.passthrough(Type.BOOLEAN); // Required
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren