3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-17 05:20:14 +01:00

Drop non-FML handshake packets if the game start process is not done.

Dieser Commit ist enthalten in:
Andrew Steinborn 2018-09-14 13:56:38 -04:00
Ursprung 0469aaa03a
Commit 496c579e46

Datei anzeigen

@ -278,8 +278,11 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
}
if (player.getConnectedServer().isLegacyForge() && !player.getConnectedServer().hasCompletedJoin()) {
// Ensure that the messages are forwarded
player.getConnectedServer().getMinecraftConnection().write(packet);
// Ensure that the FML handshake is forwarded. Do not try to forward other client-side plugin messages, as
// some mods are poorly coded and will crash if mod packets are sent during the handshake/join game process.
if (packet.getChannel().equals(VelocityConstants.FORGE_LEGACY_HANDSHAKE_CHANNEL)) {
player.getConnectedServer().getMinecraftConnection().write(packet);
}
return;
}