Skip to content

Commit

Permalink
Do some stuff idk
Browse files Browse the repository at this point in the history
  • Loading branch information
Paddyk45 committed Aug 29, 2023
1 parent 1f0eef9 commit 5ba8be7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/main/java/anticope/rejects/modules/AutoGrind.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private void onOpenScreen(OpenScreenEvent event) {

if (mc.currentScreen == null) break;

InvUtils.quickMove().slot(i);
InvUtils.quickSwap().slot(i);
InvUtils.move().fromId(2).to(i);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/anticope/rejects/modules/AutoSoup.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private void onTick(TickEvent.Post event) {

// move soup in inventory to hotbar
if (soupInInventory != -1)
InvUtils.quickMove().slot(soupInInventory);
InvUtils.quickSwap().slot(soupInInventory);
}

private int findSoup(int startSlot, int endSlot) {
Expand Down
13 changes: 4 additions & 9 deletions src/main/java/anticope/rejects/modules/VehicleOneHit.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit 5ba8be7

Please sign in to comment.