Skip to content
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

Add basic eating #115

Merged
merged 1 commit into from
Apr 14, 2023
Merged

Add basic eating #115

merged 1 commit into from
Apr 14, 2023

Conversation

grepsedawk
Copy link
Collaborator

It is a little heavy on the constants of it, but it's decent

Comment on lines +243 to +246
inventory.pick("baked_potato") ||
inventory.pick("bread") ||
inventory.pick("carrot") ||
raise "Bot food not found"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

should be configurable via habitat

@grepsedawk grepsedawk requested a review from Gjum April 13, 2023 19:23
raise "Bot food not found"

client.send_packet! Serverbound::UseItem.new :main_hand
until food >= 20
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could this be a method argument?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Probably. Incremental improvements

Comment on lines +243 to +245
inventory.pick("baked_potato") ||
inventory.pick("bread") ||
inventory.pick("carrot") ||
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could this be a method argument? Also, my bots have food in the off-hand, which doesn't require pick.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If you're using offhand food just use right click, this method is meant for an all inclusive eat.
Generally it's best to leave stuff out of the offhand (at least in vanilla) because it packets more

It is a little heavy on the constants of it, but it's decent
@grepsedawk grepsedawk merged commit 954d50a into main Apr 14, 2023
@grepsedawk grepsedawk deleted the eating branch April 14, 2023 01:27
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