-
Notifications
You must be signed in to change notification settings - Fork 653
feat: Add survival improvements (auto modes, !autoCraft, enhanced skills) #693
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
base: develop
Are you sure you want to change the base?
feat: Add survival improvements (auto modes, !autoCraft, enhanced skills) #693
Conversation
- auto_eat: automatically eat when hunger <= 15 - auto_sleep: sleep at night to avoid monsters - fall_protection: MLG water bucket placement when falling - Helper functions: isNightTime(), getBestFood(), getSafeEscapePosition() - Improved mode documentation and hints
- Intelligent crafting chains (logs -> planks -> sticks -> tools) - Support for tools, weapons, armor, beds, boats, redstone items - Material detection and automatic gathering - Progress feedback during crafting - Wood type selection based on available materials
- Sort inventory display by quantity (descending) - Categorize craftable items (tools/weapons/armor/blocks/other) - Add crafting hints for common recipes - Better formatting for readability
Skills improvements: - Better error handling for edge cases - Improved block placement strategies - Enhanced pathfinding and movement - More robust crafting operations World improvements: - Better block detection - Improved entity queries - Enhanced position calculations
- Add position packet throttling (50ms) to reduce server load - Suppress PartialReadError for non-critical packets - Better connection timeout handling - More graceful error recovery
- Treat responses containing only tab character as empty - Prevents unnecessary processing of whitespace responses
Testing NotesThese changes have been tested extensively on Minecraft 1.21.11 Java Edition for approximately 2 weeks with acceptable results. Test EnvironmentThe testing was performed using the following PRs that add support for Minecraft 1.21.11:
Test ResultsDuring the 2-week testing period:
Note: Once the minecraft-data and mineflayer PRs are merged, these improvements will be fully compatible with official 1.21.11 support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
|
Seems great! I haven't tested, but looking at the README of the PR looks like you, or something working for you, added a feature already present. Agents already ate food when they were low on hunger if I am not to be mistaken. If they didn't eat before automatically, I'd be super surprised. Great work! I like the auto crafting feature a ton. |
|
@Sweaterdog Thanks for the feedback! 🙏 To clarify about
The new
So this is genuinely new functionality - the agents would previously only eat if the LLM decided to call That said, if there's an existing feature I missed somewhere else in the codebase, please let me know! I did a grep search for "eat", "food", "hunger" in modes.js and skills.js and didn't find any automatic eating logic. The main features I'm most excited about are:
|
|
Thanks for the great contributions! |
|
Hi Contributor |
Summary
This PR introduces several survival improvements and quality-of-life features for the Mindcraft bot.
New Features
1. Survival Modes (
src/agent/modes.js)auto_eat: Automatically eats food when hunger drops to 15 or belowauto_sleep: Sleeps at night to avoid monster spawnsfall_protection: MLG water bucket placement when falling from heightsHelper functions added:
isNightTime()- Detects Minecraft night timegetBestFood()- Selects best available food itemgetSafeEscapePosition()- Finds safe landing spots2. !autoCraft Command (
src/agent/commands/actions.js)Intelligent automated crafting that handles full crafting chains:
Features:
3. Improved Queries (
src/agent/commands/queries.js)4. Enhanced Skills (
src/agent/library/skills.js,src/agent/library/world.js)5. Paper Server Stability (
src/utils/mcdata.js)6. Minor Fix (
src/agent/agent.js)Testing
Related Issues
This PR may help address:
Changes: 7 files, +1682/-119 lines