VanillaRecipeProvider scans every RecipeType by output, prefers crafting-table recipes, and falls back to gather. Stub stays in unit tests. Overlay still HUD; persistence still RAM.
This commit is contained in:
@@ -119,7 +119,7 @@ Examples:
|
||||
- Save data storage
|
||||
- Inventory scanning
|
||||
|
||||
Shipped this slice: `StubRecipeProvider`, player-inventory snapshot, HUD overlay, tooltip+key capture. No save adapter yet. EMI/JEI/REI are not dependencies.
|
||||
Shipped this slice: `VanillaRecipeProvider` (`RecipeManager`, all types, one level), player-inventory snapshot, HUD overlay, tooltip+key capture. `StubRecipeProvider` is unit tests only. No save adapter yet. EMI/JEI/REI are not dependencies.
|
||||
|
||||
Infrastructure is never the source of domain truth.
|
||||
|
||||
@@ -131,7 +131,7 @@ The domain should never import a recipe viewer.
|
||||
|
||||
Port: [[🔌 Recipe Provider]] — `resolve(ItemId, quantity) → list of MaterialRequirement`.
|
||||
|
||||
Shipped: `StubRecipeProvider`. Next: `VanillaRecipeProvider` on `RecipeManager`. EMI/JEI/REI are not required. See ADR-016.
|
||||
Shipped: `VanillaRecipeProvider` on `RecipeManager`. EMI/JEI/REI are not required. See ADR-016.
|
||||
|
||||
Recipe viewing is out of scope. This port exists so the domain can resolve requirements, not so Satistaskory can become a recipe browser.
|
||||
|
||||
|
||||
@@ -264,7 +264,7 @@ A button next to the slot vanishes when the cursor leaves the item. A `Screen` r
|
||||
|
||||
**Decision:** Satistaskory does **not** depend on EMI, JEI, or REI.
|
||||
|
||||
Recipe lookup for [[🔌 Recipe Provider]] is Minecraft’s `RecipeManager` (vanilla + every mod that registers recipes through that API). Scan **by output** across **all** recipe types, not only `minecraft:crafting`. Next implementation after the stub: `VanillaRecipeProvider`.
|
||||
Recipe lookup for [[🔌 Recipe Provider]] is Minecraft’s `RecipeManager` (vanilla + every mod that registers recipes through that API). Scan **by output** across **all** recipe types, not only `minecraft:crafting`. Implementation: `VanillaRecipeProvider`. `StubRecipeProvider` remains for unit tests.
|
||||
|
||||
Examples that must work without EMI: CC:Tweaked turtle, AE2 crafting and inscriber items.
|
||||
|
||||
|
||||
@@ -29,7 +29,8 @@ com.sufficient.satistaskory
|
||||
|
||||
infrastructure/
|
||||
recipe/
|
||||
StubRecipeProvider # furnace, crafting_table, chest; else gather
|
||||
VanillaRecipeProvider # RecipeManager, all types, by output
|
||||
StubRecipeProvider # unit tests only
|
||||
inventory/
|
||||
PlayerInventoryAdapter # player inventory → InventoryState
|
||||
client/
|
||||
@@ -49,7 +50,6 @@ Dependencies point inward: `infrastructure` and `application` may import `domain
|
||||
|---------|-----|
|
||||
| `Project` | Organizational only; not in the slice |
|
||||
| Completion strategy | Ready ≠ complete; complete is not in the slice |
|
||||
| `VanillaRecipeProvider` | Next recipe impl; `RecipeManager` |
|
||||
| Persistence | In-memory goals. ADR-004 still holds; no save adapter yet |
|
||||
| Full-screen planner | Not discovered |
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ Dependency chains as an auto-expanded tree remain an expanded view, not this por
|
||||
|
||||
Lookup is **by output item**, across **every** `RecipeType` in `RecipeManager`, not only `minecraft:crafting`. Custom types (`computercraft:…`, `ae2:inscriber`, …) still live in `RecipeManager` if the mod registered them. Prefer a crafting-table recipe when several types match; otherwise pick one (ADR-014).
|
||||
|
||||
Acceptance when `VanillaRecipeProvider` ships:
|
||||
Acceptance:
|
||||
|
||||
- A **CC:Tweaked turtle** resolves to its registered ingredients (computer, chest, ingots — one level, not the computer’s own recipe).
|
||||
- An **AE2** item that has a `RecipeManager` entry (crafting *or* inscriber) resolves to those ingredients. Processors are inscriber recipes, still in `RecipeManager`, not in EMI.
|
||||
@@ -48,11 +48,11 @@ Catalysts (AE2 press not consumed) are not modelled yet. The adapter may list th
|
||||
|
||||
---
|
||||
|
||||
## First implementation: stub
|
||||
## Shipped implementation
|
||||
|
||||
`StubRecipeProvider` in `infrastructure.recipe` — three shaped recipes plus gather. Shipped.
|
||||
`VanillaRecipeProvider` over `RecipeManager` (all types, by output). Crafting-table recipes preferred when several match; else first highest score. Empty `getIngredients()` → gather.
|
||||
|
||||
Next: `VanillaRecipeProvider` over `RecipeManager` (vanilla and modded recipes registered with Minecraft). See ADR-016.
|
||||
`StubRecipeProvider` remains for unit tests.
|
||||
|
||||
EMI / JEI / REI are not implementations and not Gradle dependencies.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user