From d848b2dd11e8f365bbe2df08aed73cb57e85c668 Mon Sep 17 00:00:00 2001 From: Patrick <73178245+Paddyk45@users.noreply.github.com> Date: Sun, 17 Dec 2023 21:31:28 +0100 Subject: [PATCH] Fix stuff (#287) Co-authored-by: Cloudburst <18114966+C10udburst@users.noreply.github.com> --- .../java/anticope/rejects/modules/AutoGrind.java | 2 +- .../anticope/rejects/modules/VehicleOneHit.java | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/main/java/anticope/rejects/modules/AutoGrind.java b/src/main/java/anticope/rejects/modules/AutoGrind.java index 483f1b87..25336d6a 100644 --- a/src/main/java/anticope/rejects/modules/AutoGrind.java +++ b/src/main/java/anticope/rejects/modules/AutoGrind.java @@ -63,7 +63,7 @@ private void onOpenScreen(OpenScreenEvent event) { if (mc.currentScreen == null) break; - InvUtils.quickSwap().slot(i); + InvUtils.shiftClick().slot(i); InvUtils.move().fromId(2).to(i); } } diff --git a/src/main/java/anticope/rejects/modules/VehicleOneHit.java b/src/main/java/anticope/rejects/modules/VehicleOneHit.java index ea8b4339..da88c031 100644 --- a/src/main/java/anticope/rejects/modules/VehicleOneHit.java +++ b/src/main/java/anticope/rejects/modules/VehicleOneHit.java @@ -25,24 +25,19 @@ public class VehicleOneHit extends Module { .build() ); - private boolean ignorePackets; - public VehicleOneHit() { super(MeteorRejectsAddon.CATEGORY, "vehicle-one-hit", "Destroy vehicles with one hit."); } @EventHandler private void onPacketSend(PacketEvent.Send event) { - if (ignorePackets - || !(event.packet instanceof PlayerInteractEntityC2SPacket) - || !(mc.crosshairTarget instanceof EntityHitResult ehr) - || (!(ehr.getEntity() instanceof AbstractMinecartEntity) && !(ehr.getEntity() instanceof BoatEntity)) + if (!(event.packet instanceof PlayerInteractEntityC2SPacket) + || !(mc.crosshairTarget instanceof EntityHitResult ehr) + || (!(ehr.getEntity() instanceof AbstractMinecartEntity) && !(ehr.getEntity() instanceof BoatEntity)) ) return; - ignorePackets = true; for (int i = 0; i < amount.get() - 1; i++) { - mc.player.networkHandler.sendPacket(event.packet); + mc.player.networkHandler.getConnection().send(event.packet, null); } - ignorePackets = false; } } \ No newline at end of file