Skip to content

fix(AutoEat): only select food that can be eaten at current hunger level - #6717

Merged
MineGame159 merged 1 commit into
MeteorDevelopment:masterfrom
Eccys:fix/autoeat-edible-check
Oct 17, 2026
Merged

MineGame159 merged 1 commit into
MeteorDevelopment:masterfrom
Eccys:fix/autoeat-edible-check

Conversation

@Eccys

@Eccys Eccys commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Type of change

  • Bug fix
  • New feature

Description

When AutoEat triggers due to low health (health or any threshold mode) while the player's hunger bar is full (!mc.player.getFoodData().needsFood()), findSlot() and findBestFood() previously considered all food items even if !food.canAlwaysEat(). If a regular food item (e.g. steak) had a higher nutrition/saturation score than an always-edible item (e.g. golden apple) or was in the offhand, AutoEat either failed to eat or held right-click indefinitely on an item that cannot be consumed at full hunger.

Introduce isEdible(ItemStack) checking mc.player.getFoodData().needsFood() || food.canAlwaysEat() and use it across findSlot(), findBestFood(), and onTick().

Related issues

Closes #6566

How Has This Been Tested?

Compiled with ./gradlew compileJava and verified findSlot(), findBestFood(), and onTick() behavior when hunger is full.

Checklist:

  • My code follows the style guidelines of this project.
  • I have added comments to my code in more complex areas.
  • I have tested the code in both development and production environments.

@MineGame159
MineGame159 merged commit 801275e into MeteorDevelopment:master Oct 17, 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.

[Bug] AutoEat bug prevents Baritone and KillAura from functioning

2 participants