Repository navigation
Machine module stage 1: internals and recipe core - #81
Conversation
Duplicate-definition messages name file-system paths, which print with backslashes on Windows, so the fragment check failed there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
…ules Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
Expression constants printed in E notation (1.0E7), which the parser can't read back. Saved internals put sockets beside the orphans list, so a socket named 'orphans' lost its parts on load. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
…d mixed outputs - MachineProduct now dispatches on its key like MachineIngredient: an entry with both 'item' and 'fluid', or neither, is an error instead of silently decoding as the item. - MachineRecipeSmoke: a recipe that makes an item and a fluid in one run, and rolls both back when the tank is full. - MachinePartsLoaderSmoke: part files from a real datapack, copied into the smoke world by the init script, reach MachineParts.current(); a file that doesn't decode is skipped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
|
Face o' Cat seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
f03fa12 to
6a76692
Compare
The machine module docs, machines.md and later testing.md now live in faceofcat/mod-design under mmdlib/docs. Links to them are removed from the docs that stay here; CLAUDE.md points at the sibling checkout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
CLAUDE.md moves to the private design repo as AGENTS.md, and the local pointer files are ignored, as in the other mod repos. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
|
Questions:
|
…eedily A broad ingredient listed first could use up the only item a later one accepts, so [#logs, oak_log] failed on slots [oak, birch] even though it could run. check and consume now share one assignment that can move an earlier claim elsewhere, for items and fluids alike, so ingredient order no longer matters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
Keys a part file or modifier doesn't use are now decode errors, so "durabilty" no longer gives a part that never wears. MachineParts.check runs on every load: it logs part and item IDs that match nothing, warns about special keys no material defines, and resolves every item so template errors appear on reload instead of at first use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
- Expr rejects empty segments such as $a..b. - MachineInternals.wear() refuses negative points, which would repair a part. - InternalsDefinition.socketAt() refuses negative slots. - MachineInternals.load() fires onChange once instead of once per slot. - Add the missing space in verification.gradle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
These rules only matter on one machine, so they now live in .git/info/exclude. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
|
Checked each of these against the code. Nothing is pushed yet; this is what's coming. 1. Client sync: will be added in a later PR. 2. Breaking mid-cycle: this PR has no processor, so nothing holds in-process ingredients yet. When the processor lands in a later PR, the items it took will drop when the machine is broken, as if the cycle never ran. Fluids and energy already used are lost. 3. Greedy matching: correct. Your example fails as you describe. Fluids have the same bug, and 4. Silent typos: partly. Malformed JSON, files that fail to decode and duplicate claims are already logged as errors. These are not, and I'll fix them:
Socket and stat names can't be checked yet: they belong to each machine, and nothing keeps a list of machines. I'd handle that in a later PR with a small registry of internals definitions, unless you'd prefer something else. 5. Nits: all correct, and I'll fix all five.
6. |
|
good work. |
What this is
Stage 1 of the machine module: a Java API under
zone.moddev.mc.lib.machine, with no screens and no processor yet. Design and API docs for the module are kept outside this repo.Internals. Parts sit in sockets and change a machine's stats.
InternalsDefinitionsets up sockets, stats and swap rules.data/<ns>/mmdlib/machine_part/. They support material templates and$variableexpressions.MachinePartsLoaderreloads part files.Phase 1 of the recipe core:
MachineIngredient: items, fluids and energy, with amount matching.MachineInventory, changed throughSnapshotTxtransactions.MachineProductfor item and fluid outputs.RecipeMatcher, which checks, consumes and produces all or nothing.MachineRecipeis only a data shape here. Registering it as a recipe type comes in the next PR.mmdlib:crushingis unchanged.Import rule. Only
machine.neoforgemay import NeoForge../gradlew verifyMachineImportsenforces this.Docs. The existing docs get small updates for what changed.
Review notes
f742165added docs and aCLAUDE.mdthat the last two commits move out of the repo, so you can skip those files in the commit view.test-infra: JUnit 5, NeoForge game tests, CI.machine-recipes: registered recipe types and generic JEI.Testing
verifyMachineImportspasses.🤖 Generated with Claude Code
https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo