diff --git a/src/main/java/meteordevelopment/meteorclient/events/packets/PacketEvent.java b/src/main/java/meteordevelopment/meteorclient/events/packets/PacketEvent.java index d525056c51..2603e5dc5a 100644 --- a/src/main/java/meteordevelopment/meteorclient/events/packets/PacketEvent.java +++ b/src/main/java/meteordevelopment/meteorclient/events/packets/PacketEvent.java @@ -27,7 +27,6 @@ public static Receive get(Packet packet, ClientConnection connection) { public static class Send extends Cancellable { private static final Send INSTANCE = new Send(); - // overwriting this will overwrite the packet being sent public Packet packet; public static Send get(Packet packet) { diff --git a/src/main/java/meteordevelopment/meteorclient/mixin/ClientConnectionMixin.java b/src/main/java/meteordevelopment/meteorclient/mixin/ClientConnectionMixin.java index d0e1ad5571..7275fbb4af 100644 --- a/src/main/java/meteordevelopment/meteorclient/mixin/ClientConnectionMixin.java +++ b/src/main/java/meteordevelopment/meteorclient/mixin/ClientConnectionMixin.java @@ -5,8 +5,6 @@ package meteordevelopment.meteorclient.mixin; -import com.llamalad7.mixinextras.sugar.Local; -import com.llamalad7.mixinextras.sugar.ref.LocalRef; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelPipeline; import io.netty.handler.proxy.Socks4ProxyHandler; @@ -69,9 +67,9 @@ private static void onConnect(InetSocketAddress address, boolean useEpoll, Clien } @Inject(at = @At("HEAD"), method = "send(Lnet/minecraft/network/packet/Packet;Lnet/minecraft/network/PacketCallbacks;)V", cancellable = true) - private void onSendPacketHead(CallbackInfo info, @Local(argsOnly = true) Packet packet) { + private void onSendPacketHead(Packet packet, PacketCallbacks callbacks, CallbackInfo ci) { if (MeteorClient.EVENT_BUS.post(PacketEvent.Send.get(packet)).isCancelled()) { - info.cancel(); + ci.cancel(); } }