Skip to content

Commit 25d6911

Browse files
committed
clarify delay logic
1 parent 416eb7e commit 25d6911

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/java/com/zenith/module/impl/AutoEat.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ void handleClientTick(final ClientBotTick e) {
8080
var invActionResult = doInventoryActionsV2();
8181
switch (invActionResult.state()) {
8282
case ITEM_IN_HAND -> {
83-
startEating();
84-
INVENTORY.submit(InventoryActionRequest.noAction(this, getPriority()));
8583
delay = invActionResult.expectedDelay();
84+
startEating(); // if accepted, will set delay to 50 (the eating duration ticks)
85+
INVENTORY.submit(InventoryActionRequest.noAction(this, getPriority()));
8686
}
8787
case NO_ITEM -> {
8888
if (CONFIG.client.extra.autoEat.warning

src/main/java/com/zenith/module/impl/AutoOmen.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ public void handleClientTick(final ClientBotTick e) {
8989
var invActionResult = doInventoryActionsV2();
9090
switch (invActionResult.state()) {
9191
case ITEM_IN_HAND -> {
92-
startEating();
93-
INVENTORY.submit(InventoryActionRequest.noAction(this, getPriority()));
9492
delay = invActionResult.expectedDelay();
93+
startEating(); // if accepted, will set delay to 50 (the eating duration ticks)
94+
INVENTORY.submit(InventoryActionRequest.noAction(this, getPriority()));
9595
}
9696
case NO_ITEM -> {}
9797
case SWAPPING -> {

0 commit comments

Comments
 (0)