3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-07-03 14:18:03 +02:00

Fix ordering issue in login ack send on the server

Fixes 1.20.2+ Fabric servers with Fabric API

Co-authored-by: EnZaXD <60033407+FlorianMichael@users.noreply.github.com>
Dieser Commit ist enthalten in:
Nassim Jahnke 2023-11-30 18:39:41 +01:00
Ursprung f556a29d38
Commit d30766a17a
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F

Datei anzeigen

@ -78,7 +78,7 @@ public final class Protocol1_20To1_20_2 extends BackwardsProtocol<ClientboundPac
wrapper.user().getProtocolInfo().setClientState(State.LOGIN);
// States set to configuration in the base protocol
wrapper.create(ServerboundLoginPackets.LOGIN_ACKNOWLEDGED).sendToServer(Protocol1_20To1_20_2.class);
wrapper.create(ServerboundLoginPackets.LOGIN_ACKNOWLEDGED).scheduleSendToServer(Protocol1_20To1_20_2.class);
});
registerClientbound(State.CONFIGURATION, ClientboundConfigurationPackets1_20_2.FINISH_CONFIGURATION.getId(), ClientboundConfigurationPackets1_20_2.FINISH_CONFIGURATION.getId(), wrapper -> {
@ -118,6 +118,9 @@ public final class Protocol1_20To1_20_2 extends BackwardsProtocol<ClientboundPac
registerClientbound(State.CONFIGURATION, ClientboundConfigurationPackets1_20_2.KEEP_ALIVE.getId(), -1, wrapper -> {
wrapper.setPacketType(ClientboundPackets1_19_4.KEEP_ALIVE);
});
registerClientbound(State.CONFIGURATION, ClientboundConfigurationPackets1_20_2.PING.getId(), -1, wrapper -> {
wrapper.setPacketType(ClientboundPackets1_19_4.PING);
});
registerClientbound(State.CONFIGURATION, ClientboundConfigurationPackets1_20_2.RESOURCE_PACK.getId(), -1, wrapper -> {
// Send after join. We have to pretend the client accepted, else the server won't continue...
wrapper.user().get(ConfigurationPacketStorage.class).setResourcePack(wrapper);