Skip to content

fix: auto omen drinks only one bottle - #331

Open
AeiouJx wants to merge 1 commit into
rfresh2:1.21.4from
AeiouJx:fix/auto-omen-single-drink
Open

AeiouJx wants to merge 1 commit into
rfresh2:1.21.4from
AeiouJx:fix/auto-omen-single-drink

Conversation

@AeiouJx

@AeiouJx AeiouJx commented Sep 23, 2026

Copy link
Copy Markdown

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:

  • set \isEating = false\ and \delay = 0\ to settle state
  • submit a
    oAction\ inventory request so the inventory executor can settle

  • eturn\ to avoid falling through and starting a second drink

Notes

  • The extra \delay = 0\ /
    oAction\ submit on the completion path are defensive no-ops in the normal flow but keep the state consistent.

isEating = false;
// we completed eating successfully
constantTimer.reset();
delay = 0;

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, delay is already known to be 0

// 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

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