mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-12-21 16:47:57 +01:00
Send registry data before finish configuration in 1.20.5->1.20.3 (#778)
This commit is contained in:
parent
2f5fbd93ea
commit
e93e30c235
@ -78,17 +78,17 @@ public final class Protocol1_20_5To1_20_3 extends BackwardsProtocol<ClientboundP
|
|||||||
super.registerPackets();
|
super.registerPackets();
|
||||||
|
|
||||||
tagRewriter.registerGeneric(ClientboundPackets1_20_5.UPDATE_TAGS);
|
tagRewriter.registerGeneric(ClientboundPackets1_20_5.UPDATE_TAGS);
|
||||||
registerClientbound(ClientboundConfigurationPackets1_20_5.UPDATE_TAGS, wrapper -> {
|
tagRewriter.registerGeneric(ClientboundConfigurationPackets1_20_5.UPDATE_TAGS);
|
||||||
|
|
||||||
|
registerClientbound(ClientboundPackets1_20_5.START_CONFIGURATION, wrapper -> wrapper.user().get(RegistryDataStorage.class).clear());
|
||||||
|
|
||||||
|
registerClientbound(ClientboundConfigurationPackets1_20_5.FINISH_CONFIGURATION, wrapper -> {
|
||||||
// Send off registry data first
|
// Send off registry data first
|
||||||
final PacketWrapper registryDataPacket = wrapper.create(ClientboundConfigurationPackets1_20_3.REGISTRY_DATA);
|
final PacketWrapper registryDataPacket = wrapper.create(ClientboundConfigurationPackets1_20_3.REGISTRY_DATA);
|
||||||
registryDataPacket.write(Types.COMPOUND_TAG, wrapper.user().get(RegistryDataStorage.class).registryData().copy());
|
registryDataPacket.write(Types.COMPOUND_TAG, wrapper.user().get(RegistryDataStorage.class).registryData().copy());
|
||||||
registryDataPacket.send(Protocol1_20_5To1_20_3.class);
|
registryDataPacket.send(Protocol1_20_5To1_20_3.class);
|
||||||
|
|
||||||
tagRewriter.getGenericHandler().handle(wrapper);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
registerClientbound(ClientboundPackets1_20_5.START_CONFIGURATION, wrapper -> wrapper.user().get(RegistryDataStorage.class).clear());
|
|
||||||
|
|
||||||
final SoundRewriter<ClientboundPacket1_20_5> soundRewriter = new SoundRewriter<>(this);
|
final SoundRewriter<ClientboundPacket1_20_5> soundRewriter = new SoundRewriter<>(this);
|
||||||
soundRewriter.registerSound1_19_3(ClientboundPackets1_20_5.SOUND);
|
soundRewriter.registerSound1_19_3(ClientboundPackets1_20_5.SOUND);
|
||||||
soundRewriter.registerSound1_19_3(ClientboundPackets1_20_5.SOUND_ENTITY);
|
soundRewriter.registerSound1_19_3(ClientboundPackets1_20_5.SOUND_ENTITY);
|
||||||
|
Loading…
Reference in New Issue
Block a user