From df749b433c053707c5fb7dbab88a8802986f4004 Mon Sep 17 00:00:00 2001 From: voruti <45130096+voruti@users.noreply.github.com> Date: Fri, 1 Dec 2023 21:27:19 +0100 Subject: [PATCH] Fix --- .../oktw/mixin/bungee/ServerHandshakeNetworkHandlerMixin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/one/oktw/mixin/bungee/ServerHandshakeNetworkHandlerMixin.java b/src/main/java/one/oktw/mixin/bungee/ServerHandshakeNetworkHandlerMixin.java index 36bc52e..735e8e6 100644 --- a/src/main/java/one/oktw/mixin/bungee/ServerHandshakeNetworkHandlerMixin.java +++ b/src/main/java/one/oktw/mixin/bungee/ServerHandshakeNetworkHandlerMixin.java @@ -37,7 +37,7 @@ public class ServerHandshakeNetworkHandlerMixin { @Inject(method = "onHandshake", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/network/ServerLoginNetworkHandler;(Lnet/minecraft/server/MinecraftServer;Lnet/minecraft/network/ClientConnection;)V")) private void onProcessHandshakeStart(HandshakeC2SPacket packet, CallbackInfo ci) { - if (packet.getIntendedState().equals(NetworkState.LOGIN)) { + if (NetworkState.LOGIN.equals(packet.getNewNetworkState())) { String[] split = ((HandshakeC2SPacketAccessor) packet).getAddress().split("\00"); if (split.length == 3 || split.length == 4) { // override/insert forwarded IP into connection: