Resolve one crafting level from RecipeManager.
Build / build (push) Failing after 27s

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:
Stephen Fasciani
2026-09-08 05:32:10 -04:00
parent 149e3619bf
commit f807a9e603
12 changed files with 134 additions and 20 deletions
+2 -2
View File
@@ -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.
+1 -1
View File
@@ -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.
+2 -2
View File
@@ -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 |
+4 -4
View File
@@ -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.
+2 -5
View File
@@ -6,22 +6,19 @@ What exists, and what is next. Implementation detail will live in an Implementat
## ✅ Now (docs)
- Philosophy Rules #1–#10; ADRs **001–014**
- Philosophy Rules #1–#10; ADRs **001–016**
- 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
- Experience: capture in place; overlay on the right (goals + aggregated needed counts)
First slice **code exists** and has been played: domain, stub `RecipeProvider` (furnace / crafting table / chest; else gather), in-memory `Planner`, player inventory, play overlay on the right. Capture is hover + rebindable Add key (default `=`). `/satistaskory add` is a debug caller. Plan does not survive restart.
First slice **code exists** and has been played: domain, `VanillaRecipeProvider` (`RecipeManager`, all types, one level), in-memory `Planner`, player inventory, play overlay, hover + Add key. Plan does not survive restart.
---
## 🔲 Next
The walk is real.
1. World-save persistence
2. Vanilla `RecipeProvider` on `RecipeManager` (one crafting level). No EMI/JEI/REI.
EMI is not a dependency. See ADR-016.
@@ -353,6 +353,20 @@ EMI may be where they *see* the computer. Capture still does not depend on EMI;
---
## 📜 2026-09-08 (VanillaRecipeProvider)
Greetings, Wayfinder.
`PlannerSession` now asks `VanillaRecipeProvider`. It scans every `RecipeType` in `RecipeManager` by output, one level, crafting-table preferred. Empty ingredients still gather.
`StubRecipeProvider` is tests only. Oak planks as a goal should now be logs (or the first tag member), not more planks.
Play on the gaming PC: furnace, crafting table, chest, oak planks, then a CC turtle and an AE2 processor if those mods are loaded.
Next is still world save. Not EMI. Not a Screen rewrite.
---
## Related Documents
[[🌟 Project Vision]]
-1
View File
@@ -6,7 +6,6 @@ Not a build queue.
---
- Vanilla `RecipeProvider` on `RecipeManager` (next after world save)
- Viewer-only recipe adapter (EMI/JEI/REI) **if** a recipe never appears in `RecipeManager`
- Persistence (world save / server / cloud)
- Inventory-detection completion (alongside manual)