From 74221deae37c8ef76bda309e8f5f41f7ef06d6ea Mon Sep 17 00:00:00 2001 From: sebseb7 Date: Sun, 2 Jul 2023 01:48:07 +0200 Subject: [PATCH] one action at a time --- .../github/sebseb7/autotrade/event/KeybindCallbacks.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/github/sebseb7/autotrade/event/KeybindCallbacks.java b/src/main/java/com/github/sebseb7/autotrade/event/KeybindCallbacks.java index e1ebb6f..a67db32 100644 --- a/src/main/java/com/github/sebseb7/autotrade/event/KeybindCallbacks.java +++ b/src/main/java/com/github/sebseb7/autotrade/event/KeybindCallbacks.java @@ -283,6 +283,7 @@ public class KeybindCallbacks implements IHotkeyCallback, IClientTickHandler { newVillagersInRange.add(entity); mc.interactionManager.interactEntity(mc.player, entity, Hand.MAIN_HAND); state = false; + break; } } } @@ -295,6 +296,9 @@ public class KeybindCallbacks implements IHotkeyCallback, IClientTickHandler { } } villagersInRange = newVillagersInRange; + if (found) { + return; + } BlockPos input = new BlockPos(Configs.Generic.INPUT_CONTAINER_X.getIntegerValue(), Configs.Generic.INPUT_CONTAINER_Y.getIntegerValue(), @@ -310,6 +314,7 @@ public class KeybindCallbacks implements IHotkeyCallback, IClientTickHandler { new BlockHitResult(input.toCenterPos(), Direction.UP, input, false)); if (result.isAccepted()) { inputOpened = true; + return; } } if ((output.toCenterPos().distanceTo(mc.player.getPos()) < 4) && (outputInRange == false)) { @@ -318,6 +323,7 @@ public class KeybindCallbacks implements IHotkeyCallback, IClientTickHandler { new BlockHitResult(output.toCenterPos(), Direction.UP, output, false)); if (result.isAccepted()) { outputOpened = true; + return; } }