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:
@@ -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]]
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user