Count every plank a chest will take, not only oak.
Build / build (push) Failing after 32s

Tag ingredients are one interchangeable requirement. Available is the sum. Overlay names the stack the player holds; empty shows Planks, not oak-by-default.
This commit is contained in:
Stephen Fasciani
2026-09-08 06:28:04 -04:00
parent 5d49f1482f
commit bac020f335
20 changed files with 361 additions and 34 deletions
@@ -14,6 +14,8 @@ Combines requirements from multiple [[🎯 Goal|goals]].
Same material from two goals is one entry. Goal A needs Diamond x4. Goal B needs Diamond x8. Aggregated: Diamond x12.
The same interchangeable set (every plank type) from two goals is one entry.
---
## Rule
@@ -31,6 +31,7 @@ aggregate requirements
(same material → one row)
for each material:
available = sum of every interchangeable option (or that one item)
missing = max(0, required − available)
```
+2 -2
View File
@@ -11,7 +11,7 @@ Missing = Required - Available
```
Required comes from goals (after resolution and aggregation).
Available comes from [[🎒 Inventory State]].
Available comes from [[🎒 Inventory State]]. For interchangeable items (any plank), available is the **sum** of every option.
---
@@ -19,7 +19,7 @@ Available comes from [[🎒 Inventory State]].
Missing materials are the **default** materials view. On the golden day they live in the **lower region** of the play overlay, under the goal list. See [[🚶 Day in the Life]] and [[🖼️ Wireframes]].
The player should see this first — one row per material, with how many are still needed:
The player should see this first — one row per material, with how many are still needed. A tag ingredient is still one row. If they hold spruce, the row says spruce. If they hold none, a generic label (Planks), not oak-by-default.
- Diamond x12
- Redstone x82
+5 -1
View File
@@ -2,7 +2,9 @@
A quantity of a material required to complete a [[🎯 Goal]].
Identified by the same **ItemId** as Target Item (`namespace:path`). Quantity ≥ 1.
Identified by one **ItemId**, or by **any of several** ItemIds when the recipe accepts substitutes (planks for a chest). Quantity ≥ 1.
Tags are not a domain type. The provider names the concrete items that all count.
---
@@ -28,6 +30,8 @@ Aggregated requirement:
Diamond x12
Chest needs any plank ×8. Crafting table needs any plank ×4. Aggregated: any plank ×12. Spruce and oak both count.
Projects do not change this. See [[📁 Project]] and [[➕ Material Aggregation]].
---
+18
View File
@@ -330,6 +330,24 @@ Remote identity is the **multiplayer list name plus MOTD**, not the IP. Hostname
---
### ADR-019 — Interchangeable ingredients are any-of, not the first tag member
**Date:** 2026-09-08
**Decision:** When a recipe ingredient matches several items (a tag, a custom ingredient), [[🧱 Material Requirement]] is one row with **all** of those ItemIds. Available is the sum. The overlay shows the option the player holds most of; if they hold none, a generic path label (Planks), not oak-by-default.
Not a tag type in the domain. Not biome-based wood. Not a recipe browser.
**Reason:**
A chest crafts from any `#minecraft:planks`. Picking `getItems()[0]` made spruce in a spruce biome invisible, and mixed stacks look short. The walk failed.
**Status:** ✅ Accepted
**Refines:** ADR-014 (concrete items; this is how several concretes count)
---
## Related Documents
[[🏛️ Architecture]]
+3 -3
View File
@@ -17,7 +17,7 @@ RecipeProvider
`ItemId` is `namespace:path` (e.g. `minecraft:furnace`). Not `net.minecraft.world.item.Item`.
`MaterialRequirement` is `(ItemId, quantity)`.
`MaterialRequirement` is `(options, quantity)`. `options` is one ItemId, or several that all count.
---
@@ -29,7 +29,7 @@ RecipeProvider
| Item has a recipe | **One crafting level** of ingredients, already scaled for `quantity` (including recipe output count) |
| Item has no recipe | One requirement: `(target, quantity)` — a gather |
| Several recipes exist | Provider picks **one**. Recipe choice is not in the slice |
| Ingredient is a tag | Provider returns **concrete** ItemIds. Tags are not a domain type yet |
| Ingredient is a tag | One requirement whose **options** are every concrete member. Tags are not a domain type. Available = sum of the members. |
Not a recipe tree. Not a recipe browser.
@@ -50,7 +50,7 @@ Catalysts (AE2 press not consumed) are not modelled yet. The adapter may list th
## Shipped implementation
`VanillaRecipeProvider` over `RecipeManager` (all types, by output). Crafting-table recipes preferred when several match; else first highest score. Empty `getIngredients()` → gather.
`VanillaRecipeProvider` over `RecipeManager` (all types, by output). Crafting-table recipes preferred when several match; else first highest score. Empty `getIngredients()` → gather. Several `getItems()` → one interchangeable requirement (chest + spruce planks).
`StubRecipeProvider` remains for unit tests.
+1 -1
View File
@@ -6,7 +6,7 @@ What exists, and what is next. Implementation detail will live in an Implementat
## ✅ Now (docs)
- Philosophy Rules #1–#10; ADRs **001–018**
- Philosophy Rules #1–#10; ADRs **001–019**
- Vision, ubiquitous language, bounded context (one: Goal Planning)
- Goal invariants: one per ItemId, quantity ≥ 1, create at 1 / +1, `[-]` at 1 removes
- Packages named; [[🔌 Recipe Provider]] sketched; [[▶️ Create Goal]] written
@@ -425,6 +425,16 @@ The frozen first slice has been walked. Still listen. Still do not open Project
---
## 📜 2026-09-08 (any plank counts)
Greetings, Wayfinder.
The walk reported: chests take more than oak. Spruce in a spruce biome did not count.
ADR-019: a tag ingredient is one requirement, every member counts. Overlay names the stack they have; empty → “Planks”, not oak. Not biome. Mixed spruce + birch covering a chest is Ready.
---
## Related Documents
[[🌟 Project Vision]]
+1 -1
View File
@@ -62,7 +62,7 @@ The overlay answers both halves of the vision question:
Walking has no cursor. Overlay `[+]` / `[-]` / Clear are HUD hit-tests (vanilla button sprites + click sound), not a `Screen`. Open chat (`T` or `/`) to click them. Capture does not use a clickable chip you leave the item to hit.
Same material from two goals is one row. Changing a goal quantity recalculates the lower list. As inventory fills, counts shrink.
Same material from two goals is one row. Any-plank recipes (chest, crafting table) are one row too: spruce counts, mixed stacks count. If they hold none, the row says Planks, not Oak. Changing a goal quantity recalculates the lower list. As inventory fills, counts shrink.
Coming back is part of the prosthetic. Singleplayer: the plan belongs to that world. A server: the plan belongs to **the name you gave it in the multiplayer list**, plus that server’s description (MOTD). Not the IP. Two list entries with different names are two plans, even if they are the same host.