Skip to content

Commit

Permalink
revert more thoroughly
Browse files Browse the repository at this point in the history
  • Loading branch information
Wide-Cat committed May 24, 2024
1 parent f9b1c75 commit 56fbe95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
}
}

Expand Down

0 comments on commit 56fbe95

Please sign in to comment.