package ganarchy.friendcode.mixin; import ganarchy.friendcode.client.LanSendPing; import net.minecraft.client.network.LanServerPinger; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(LanServerPinger.class) public class LanPingerMixin implements LanSendPing { @Inject( method = "run()V", remap = false, at = @At( remap = false, value = "INVOKE", target = "Ljava/net/InetAddress;getByName(Ljava/lang/String;)Ljava/net/InetAddress;" ) ) public void onSendPing(CallbackInfo info) { this.friendcodeSendPing(); } @Override public void friendcodeSendPing() { } }