Add !searchChests command to check nearby chests for materials
Summary
Adds a new !searchChests command that allows the bot to scan all nearby chests and report their contents. This helps the bot use existing materials from storage instead of always gathering resources from scratch.
Problem
Currently, when the bot is given a task (like crafting a pickaxe), it always starts by gathering raw materials - punching trees, making a new crafting table, etc. - even when there are chests nearby with useful materials already stored in them.
Solution
This PR adds:
-
New
searchNearbyChestsskill (src/agent/library/skills.js)- Finds all chests within range (default 32 blocks, max 16 chests)
- Opens each chest and reports its contents
- Provides a summary of all items found across all chests
-
New
!searchChestscommand (src/agent/commands/actions.js)- Exposes the skill to the bot with an optional range parameter
- Description helps the bot understand when to use it
-
Conversation examples (
profiles/defaults/_default.json)- Added examples showing the bot checking chests when it sees one nearby
- Examples demonstrate the workflow: see chest → search → take items → craft
- Teaches the bot to prioritize existing materials over gathering new ones
Usage
The bot can now:
!searchChests # Search chests within 32 blocks
!searchChests(64) # Search chests within 64 blocks
Example workflow the bot learns from the new examples:
- Bot sees "chest" in
!nearbyBlocksoutput - Bot runs
!searchCheststo see contents - If useful materials found, bot uses
!takeFromChestto grab them - Bot crafts using existing materials instead of gathering new ones
Testing
- Verified JSON is valid
- No linting errors
- Ready for testing on a server with chests containing materials
P.S. The changes are in separate PRs, but they are stacking up - you can see all the changes in this one PR.
This seems redundant, there is already a command to go to any block, so if !nearbyBlocks returns a chest, the bot can use !searchForBlock to walk to it. And then use !openChest to see inside. More tools for the model to use adds a lot of confusion, minimalism is better.
So, since 3 reviewers have said no, I believe it is right to say this will be closed. Not deleted, if needed we can re-open, of if you want to fight for it.