Skip to content

fix AutoOmen constant mode double drinking - #331

Merged
rfresh2 merged 2 commits into
rfresh2:1.21.4from
AeiouJx:fix/auto-omen-single-drink
Sep 24, 2026
Merged

rfresh2 merged 2 commits into
rfresh2:1.21.4from
AeiouJx:fix/auto-omen-single-drink

Conversation

@AeiouJx

@AeiouJx AeiouJx commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Problem

When AutoOmen finishes drinking an ominous bottle, it immediately starts drinking a second one on the same tick, consuming two bottles per cycle instead of one.

Root cause

In AutoOmen.handleClientTick(), the drink-completion branch (if (isEating)) only reset the constant timer, then fell through to doInventoryActionsV2(). The bottle was still equipped, so it returned ITEM_IN_HAND and re-invoked startEating(), beginning another drink right away.

Fix

Finalize the drink state and return early after a completed drink instead of falling through and starting a second drink:

if (isEating) {
    isEating = false;
    // we completed eating successfully
    constantTimer.reset();
    return;
}

Comment thread src/main/java/com/zenith/module/impl/AutoOmen.java Outdated
// we completed eating successfully
constantTimer.reset();
delay = 0;
INVENTORY.submit(InventoryActionRequest.noAction(this, getPriority()));

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove, no need to block inv actions at this point

INVENTORY.submit(InventoryActionRequest.noAction(this, getPriority()));
return;
}
isEating = false;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove, is already false now

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review! I've addressed all three comments in 11f9976

@rfresh2 rfresh2 changed the title fix: auto omen drinks only one bottle fix AutoOmen constant mode double drinking Sep 24, 2026
@rfresh2
rfresh2 merged commit eae4434 into rfresh2:1.21.4 Sep 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants