3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-11-18 05:50:08 +01:00

Send the config ack packet

Dieser Commit ist enthalten in:
Nassim Jahnke 2023-09-19 13:25:25 +10:00
Ursprung ea2fac0788
Commit b69ebe6657

Datei anzeigen

@ -94,6 +94,9 @@ public final class Protocol1_20To1_20_2 extends BackwardsProtocol<ClientboundPac
registerClientbound(ClientboundPackets1_20_2.START_CONFIGURATION, null, wrapper -> {
wrapper.cancel();
// TODO: Check whether all the necessary data for the join game packet is always expected by the client or if we need to cache it from the initial login
final PacketWrapper configAcknowledgedPacket = wrapper.create(ServerboundPackets1_20_2.CONFIGURATION_ACKNOWLEDGED);
configAcknowledgedPacket.sendToServer(Protocol1_20To1_20_2.class);
wrapper.user().put(new ConfigurationPacketStorage());
});
cancelClientbound(ClientboundPackets1_20_2.PONG_RESPONSE);
@ -151,7 +154,7 @@ public final class Protocol1_20To1_20_2 extends BackwardsProtocol<ClientboundPac
} else if (id == ServerboundPackets1_19_4.RESOURCE_PACK_STATUS.getId()) {
wrapper.setPacketType(ServerboundConfigurationPackets1_20_2.RESOURCE_PACK);
} else {
// Can't do (maybe should do?)
// TODO Queue
throw CancelException.generate();
}
}