Skip to content

Add shared powered machines, inherited screens and inventory safeguards - #96

Merged
dshadowwolf merged 10 commits into
master-2.0-1.21.1-neofrom
codex/architectural_sanity
Nov 7, 2026
Merged

dshadowwolf merged 10 commits into
master-2.0-1.21.1-neofrom
codex/architectural_sanity

Conversation

@faceofcat

@faceofcat faceofcat commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Machine inventories now share one validated resource definition across automation, recipes and screen bindings. MMDLib supplies a reusable powered block entity and XML screen template, so consumers can define their machine-specific resources and recipes without duplicating power, persistence, ticking or processor controls.

Stacked on #95: this PR targets codex/stats-drawer. Merge #95 first, then retarget this PR to master-2.0-1.21.1-neo.

  • Add stable slot/tank identities, legacy index migration and recovery of displaced contents; centralize storage persistence, processor restoration, transfer pause policy and recovery handoff. Validate resource membership and screen bindings, and filter recipe-linked inputs by compatible recipes, including recipe reloads.
  • Add abstract XML screens, named placeholders/fills, inheritance chains and source-aware validation. Ship mmdlib:base_powered_machine in the library, with inherited entity bindings, energy display, a default processor control and an info panel. All five companion screens inherit it; {machineId} in translation keys resolves to the concrete screen ID.
  • Add BasePoweredMachine with configurable power storage, feature host, statistics, screen opening, tick hooks, save/load, client feature synchronization, optional redstone integration and inventory lifecycle support. Migrate all five companion machines to it while preserving specialized layouts and save keys. The base automatically includes its power buffer in custom lifecycles and rejects conflicting bindings. It supplies common processor/redstone warnings and isolated hooks for additional client state, while preserving legacy feature-only updates. Machine-specific resources, recipes, capabilities, registration and recovery items remain consumer-owned.
  • Add generic processor-button controls with an optional processor-key, pause/unpause APIs and immediate synchronization. Omitted keys select the first registered recipe processor. Manual pause releases reservations and preserves resumable progress. Centered pause/stop/play icons show paused/working/idle states, with conflict dots and compact tooltips; redstone overlays show whether monitored inputs permit processing. Manual pause takes priority.
  • Install Jade in playable companion and client smoke runs, keeping mock server GameTests isolated from its login packets.

Validation:

  • Latest base hardening: 40 focused XML and feature-host unit tests; all 52 companion server GameTests; companion test compilation; build, import-boundary and packaging checks passed.
  • New regression coverage verifies power and metadata persistence across all five machines, feature updates preserving inventories/configuration, shared clearing, and XML binding through the library base. Additional coverage checks omitted/conflicting power bindings, warning statuses and pause policies, client packet hooks, and separation of client-only state from world saves.
  • Earlier inventory changes passed the full unit/library/companion server checks and companion client smoke with Jade and all five menus. The full UI suite was not repeated for these updates, per the focused-test policy.
  • git diff --check passed. Public guides now cover the powered base, lifecycle/client hooks, storage identities/recovery, resource definitions/filtering, inherited screens, processor/redstone controls and all five companion machines. Documentation validation checked local links/anchors, four XML examples against the shipped schema, API names, translation keys and sprite sizes.

# Conflicts:
#	src/companionTest/java/zone/moddev/mc/companion/test/CompanionGameTests.java
#	src/main/java/zone/moddev/mc/lib/gui/runtime/MachineMenu.java
@faceofcat
faceofcat marked this pull request as draft November 7, 2026 09:58
@faceofcat faceofcat changed the title Harden machine inventories and add inherited screens with processor controls Add shared powered machines, inherited screens and inventory safeguards Nov 7, 2026
@faceofcat
faceofcat marked this pull request as ready for review November 7, 2026 11:55
Base automatically changed from codex/stats-drawer to master-2.0-1.21.1-neo November 7, 2026 13:35
@faceofcat
faceofcat requested a review from dshadowwolf November 7, 2026 13:40
@dshadowwolf
dshadowwolf merged commit f4841ac into master-2.0-1.21.1-neo Nov 7, 2026
5 checks passed
@faceofcat
faceofcat deleted the codex/architectural_sanity branch November 7, 2026 16:31
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.

2 participants