downgrade netty to old version to fix annoying network bugs WHYYYYYYYYYYYYYYYYYYYYY?!?!?!?!

This commit is contained in:
Sen 2025-05-25 17:53:55 +02:00
parent 10fdaf0b1a
commit 77b5a34a33
15 changed files with 51 additions and 220 deletions

View file

@ -663,6 +663,7 @@ public final class Server implements IThreadListener {
this.saveAllWorlds(false);
this.saveTimer = 0;
}
Log.flushLog();
this.tickTimes[this.perfTimer++] = System.currentTimeMillis() - now;
if(this.perfTimer == 100) {
this.perfTimer = 0;

View file

@ -43,7 +43,9 @@ public class HandshakeHandler extends NetHandler implements IHandshakeHandler
}
else
{
this.networkManager.setNetHandler(new LoginHandler(this.server, this.networkManager));
LoginHandler handler = new LoginHandler(this.server, this.networkManager);
this.networkManager.setNetHandler(handler);
handler.sendLoginPacket();
}
}
}

View file

@ -13,7 +13,6 @@ import common.network.ILoginHandler;
import common.network.IPlayer;
import common.network.NetConnection;
import common.network.NetHandler;
import common.packet.LPacketLogin;
import common.packet.LPacketPasswordResponse;
import common.packet.LPacketStartEncrypt;
import common.packet.RPacketDisconnect;
@ -105,9 +104,9 @@ public class LoginHandler extends NetHandler implements ILoginHandler
this.state = LoginState.ACCEPTED;
}
public void processLogin(LPacketLogin packet) {
public void sendLoginPacket() {
if(this.state != LoginState.INIT)
throw new IllegalStateException("Unerwartetes Login-Paket");
throw new IllegalStateException("Unerwartetes Handshake-Paket");
this.state = LoginState.ENCRYPT;
this.loginToken = new byte[4];
TOKEN_RNG.nextBytes(this.loginToken);