Repository navigation
Add shared powered machines, inherited screens and inventory safeguards - #96
Merged
Merged
Conversation
# Conflicts: # src/companionTest/java/zone/moddev/mc/companion/test/CompanionGameTests.java # src/main/java/zone/moddev/mc/lib/gui/runtime/MachineMenu.java
faceofcat
marked this pull request as draft
November 7, 2026 09:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 tomaster-2.0-1.21.1-neo.mmdlib:base_powered_machinein 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.BasePoweredMachinewith 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.processor-buttoncontrols with an optionalprocessor-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.Validation:
git diff --checkpassed. 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.