Skip to content

fix: AutoEat not switching slots when food runs out #5380

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

uxmlen
Copy link

@uxmlen uxmlen commented May 5, 2025

Type of change

  • Bug fix
  • New feature

Description

Fixed condition that checks for food in current slot to allow switching when food is depleted.

When using AutoEat, if the food in the current slot runs out, the module fails to switch to another slot with food. The player gets stuck with the empty slot until another food item appears in that same slot.

  • Fixed the condition in onTick that checks if the current slot contains food
  • refactor method onTick to remove nesting

bug demo:
2025-05-05 14-30-34

Related issues

#4836

How Has This Been Tested?

2025-05-05 14-58-40

you can see in the gif that the slots can be switched after applying this patch

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.

uxmlen added 3 commits May 5, 2025 14:36
Fixed condition that checks for food in current slot to allow switching
when food is depleted.
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.

1 participant