Skip to content

Add reservation-aware machine processing and a playable companion mod - #90

Open
faceofcat wants to merge 66 commits into
master-2.0-1.21.1-neofrom
machine-processor
Open

faceofcat wants to merge 66 commits into
master-2.0-1.21.1-neofrom
machine-processor

Conversation

@faceofcat

@faceofcat faceofcat commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Machines can now run recipe cycles while reserving their inputs and output space, preserve progress across saves and interruptions, and synchronize processor state and reservations with their menus. A separately packaged companion mod demonstrates the API with four playable machines.

Changes

  • Add slot/tank reservation plans, transactional cycle completion and rollback, recipe processors, and a feature host for ticking, persistence, and synchronization.
  • Respect reservations in automation and menu interactions, including client prediction, partial transfers, interruption/resume, and multiple processors sharing storage. Preserve contents correctly when machines are broken or replaced.
  • Add the optional mmdlib_companion source set and jar: Crusher, one-slot Converter, Dual Crusher, and Creative Power Source. Keep companion and test content out of the library jar.
  • Add reusable energy gauges and bookmark-style information drawers; update recessed slots, shaded progress arrows, and fluid rendering. The Crusher's water/lava preview tank supports held and cursor fluid containers without mixing fluids.
  • Fix persistence after in-place shift-click merges and partial extraction: server-side machine slots now notify the block entity when vanilla changes a stack directly.
  • Document the processor, reservations, screen components, and companion setup.
  • Merge the latest base build/release changes, migrate companion runs to ModDevGradle, and consolidate CI into build_status.yml. Remove duplicate ci.yml while retaining library GUI smoke tests with/without JEI, adding the companion smoke, and preserving diagnostic artifacts.

Validation

  • ./gradlew check passed after integrating base commit 1a11cdc: 91 JUnit tests and 76 server game tests (65 library, 11 companion), plus asset, import, and packaging checks.
  • Both shift-click persistence regressions failed before the fix and pass afterward. They check the chunk save flag and saved item counts; a rejected transfer leaves the save flag unchanged.
  • runCompanionClientSmoke passed under ModDevGradle, opening all four networked menus and checking synchronized values and fluid-container transfers. Partial, full, and empty gauges were visually inspected during UI validation.
  • The library GUI smoke passed with and without JEI under the merged build setup. Consolidated workflow YAML parsed successfully.
  • build verifyReleaseClasses verifyCompanionPackaging passed after the GUI runs, confirming release artifacts exclude injected test content.

Integration note

The build/release-system changes from #89 are merged into this branch with a merge commit; existing feature history is preserved. The shared base workflow now owns build/check and GUI validation, without a second duplicate check job.

faceofcat and others added 30 commits November 3, 2026 03:29
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
…fusal

place caps each slot and tank by what is physically there once the recipe's
own take has run, and keeps a different item or fluid out until then.
restore returns false instead of throwing or ignoring, and is documented as
the loading path. Skip and bypass tests now fail without the code they cover.

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
A processor's state now carries paused, resume recipe and progress beside the cycle.
A cycle that won't decode, can't be put back, or needs an energy group that is gone
cancels; restore releases a running cycle first, since storages keep their plans.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
interrupt() releases the cycle and remembers its recipe and progress; resume() lets the
next tick reserve that recipe again, keeping progress only if it still fits.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
… time

A paused processor saves the time its recipe took; if the current definition takes
longer or shorter, resume restarts it from 0 rather than carrying the old ticks over.

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
…it goes away

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
…al connection

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
faceofcat and others added 30 commits November 3, 2026 12:20
…the last two table rows

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
…free part

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
…ives

The menu sized the move from the plan, so a storage that gives less
than the plan frees duplicated items. It now asks the storage with a
simulated extract. The test-only client constructor is protected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
…Clearable

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
…plan back

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
…pe change

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant