mindcraft icon indicating copy to clipboard operation
mindcraft copied to clipboard

Add !searchChests command to check nearby chests for materials

Open Fuzzwah opened this issue 1 month ago • 1 comments

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:

  1. New searchNearbyChests skill (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
  2. New !searchChests command (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
  3. 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:

  1. Bot sees "chest" in !nearbyBlocks output
  2. Bot runs !searchChests to see contents
  3. If useful materials found, bot uses !takeFromChest to grab them
  4. 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

Fuzzwah avatar Nov 28 '25 06:11 Fuzzwah

P.S. The changes are in separate PRs, but they are stacking up - you can see all the changes in this one PR.

uukelele-scratch avatar Nov 28 '25 12:11 uukelele-scratch

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.

Sweaterdog avatar Dec 02 '25 01:12 Sweaterdog

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.

Sweaterdog avatar Dec 02 '25 01:12 Sweaterdog