Skip to content

Comments

a#1

Open
pravinl23 wants to merge 1 commit intomainfrom
test
Open

a#1
pravinl23 wants to merge 1 commit intomainfrom
test

Conversation

@pravinl23
Copy link
Collaborator

a

@DepsCian
Copy link

DepsCian commented Nov 7, 2025

b

@maityyy
Copy link

maityyy commented Nov 7, 2025

c

@ParvePalial
Copy link

d

@PlumpAlbert
Copy link

E

@agafonesy767
Copy link

f

@Siberian-World
Copy link

g

@RussiaTails
Copy link

h

@ammarali0416
Copy link

i

@DarthJahus
Copy link

j

@michaelabilliot
Copy link

k

@papacthulu
Copy link

L

@tember8003
Copy link

m

@Hakkush-07
Copy link

n

kulkanmalik pushed a commit to kulkanmalik/Stevever that referenced this pull request Nov 11, 2025
This commit implements the full crafting system for Steve entities, enabling
autonomous crafting of Minecraft items with recipe validation, ingredient
checking, and crafting table management.

## Changes

### 1. SteveEntity (entity/SteveEntity.java)
- Added ItemStackHandler inventory (36 slots, same as player)
- Implemented NBT serialization for inventory persistence
- Added getInventory() accessor method

### 2. InventoryHelper (util/InventoryHelper.java)
- Complete implementation of inventory management utilities
- Item query methods: hasItem(), getItemCount(), getInventoryFullness()
- Item manipulation: addItem(), removeItem()
- Tool management: findBestTool(), needsToolRepair(), hasRequiredTool()
- Chest operations: findNearestChest(), transferToChest(), retrieveFromChest()
- Helper methods: isInventoryFull(), getEmptySlotCount()

### 3. RecipeHelper (util/RecipeHelper.java)
- Full Minecraft recipe system integration
- Recipe lookup: hasRecipe(), findRecipe()
- Ingredient extraction: getRequiredIngredients(), getMissingIngredients()
- Crafting table detection: requiresCraftingTable()
- Recursive crafting chain analysis: getFullCraftingChain()
- Recipe validation: hasAllIngredients(), getRecipeResultCount()
- Recipe metadata: isShapedRecipe(), getRecipeDimensions()

### 4. CraftItemAction (action/actions/CraftItemAction.java)
- Complete crafting workflow implementation with 6 phases:
  1. VALIDATING - Check recipe exists and ingredients available
  2. FINDING_TABLE - Search for crafting table within 16 blocks
  3. PLACING_TABLE - Place crafting table if not found
  4. NAVIGATING_TO_TABLE - Navigate to crafting table location
  5. CRAFTING - Execute crafting operations
  6. COMPLETED - Finish action
- Intelligent crafting table management (find, place, navigate)
- Multi-quantity crafting support with progress tracking
- Ingredient validation with detailed error messages
- Inventory rollback on failure
- Timeout handling (10 minutes max, 30s navigation)

### 5. Development Roadmap (DEVELOPMENT_ROADMAP.md)
- Comprehensive 5-phase development plan
- Detailed specifications for all future features
- Implementation checklists and success criteria
- Risk management and best practices documentation

## Features

- ✅ Steve entities can now craft any Minecraft item with a recipe
- ✅ Automatic ingredient checking before crafting
- ✅ Intelligent crafting table finding and placement
- ✅ Full inventory management (add, remove, transfer to chests)
- ✅ Tool durability tracking and selection
- ✅ Persistent inventory across world reloads
- ✅ Support for both shaped and shapeless recipes
- ✅ Multi-quantity crafting (e.g., "craft 10 sticks")
- ✅ Detailed error messages for missing ingredients

## Technical Details

- Uses Minecraft Forge 1.20.1 RecipeManager API
- Leverages ItemStackHandler for robust inventory handling
- Implements NBT serialization for data persistence
- State machine pattern for crafting workflow
- Comprehensive Javadoc documentation

## Testing Required

Build the project locally:
```bash
./gradlew build
```

Test crafting in-game:
```
/steve spawn TestSteve
/steve tell TestSteve "craft wooden_pickaxe"
```

## Next Steps (Phase 1.2)

- Implement advanced inventory management (auto-storage, sorting)
- Add persistent memory system
- Integrate real vector store for semantic memory
- Implement async action execution

---

Related to: DEVELOPMENT_ROADMAP.md Phase 1.1
Implements: Crafting System (YuvDwi#1 Priority Feature)
@hiwafeizi
Copy link

o

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.