diff --git a/src/main/java/one/oktw/mixin/bungee/HandshakeC2SPacketAccessor.java b/src/main/java/one/oktw/mixin/bungee/HandshakeC2SPacketAccessor.java deleted file mode 100644 index 45bb131..0000000 --- a/src/main/java/one/oktw/mixin/bungee/HandshakeC2SPacketAccessor.java +++ /dev/null @@ -1,11 +0,0 @@ -package one.oktw.mixin.bungee; - -import net.minecraft.network.packet.c2s.handshake.HandshakeC2SPacket; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.gen.Accessor; - -@Mixin(HandshakeC2SPacket.class) -public interface HandshakeC2SPacketAccessor { - @Accessor - String getAddress(); -} diff --git a/src/main/java/one/oktw/mixin/bungee/ServerHandshakeNetworkHandlerMixin.java b/src/main/java/one/oktw/mixin/bungee/ServerHandshakeNetworkHandlerMixin.java index 735e8e6..f87d345 100644 --- a/src/main/java/one/oktw/mixin/bungee/ServerHandshakeNetworkHandlerMixin.java +++ b/src/main/java/one/oktw/mixin/bungee/ServerHandshakeNetworkHandlerMixin.java @@ -38,7 +38,7 @@ public class ServerHandshakeNetworkHandlerMixin { "Lnet/minecraft/server/network/ServerLoginNetworkHandler;(Lnet/minecraft/server/MinecraftServer;Lnet/minecraft/network/ClientConnection;)V")) private void onProcessHandshakeStart(HandshakeC2SPacket packet, CallbackInfo ci) { if (NetworkState.LOGIN.equals(packet.getNewNetworkState())) { - String[] split = ((HandshakeC2SPacketAccessor) packet).getAddress().split("\00"); + String[] split = packet.address().split("\00"); if (split.length == 3 || split.length == 4) { // override/insert forwarded IP into connection: ((ClientConnectionAccessor) connection).setAddress(