Repository navigation
Make machine GUIs extensible with element-owned behavior - #103
Merged
Merged
Conversation
…x/extensible-machine-ui
dshadowwolf
reviewed
Nov 10, 2026
dshadowwolf
reviewed
Nov 10, 2026
dshadowwolf
reviewed
Nov 10, 2026
dshadowwolf
reviewed
Nov 10, 2026
dshadowwolf
reviewed
Nov 10, 2026
dshadowwolf
reviewed
Nov 10, 2026
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 screens previously centralized element drawing, input, storage assumptions and feature-specific synchronization in the screen/menu. This follow-up to #97 moves those responsibilities into extensible elements, inventory adapters and menu components, so mods can supply their own controls and storage behavior through public contracts.
Changes
Elementan open common interface, with inheritable controls ingui.model.elementsand layouts ingui.model.containers. Fluid tanks and energy gauges own their snapshots, presentation and interactions; sprite/progress and coloured-group elements compose reusable displays.InventoryElementcontains item/ghost slot elements, with dedicated player inventory/armour/offhand elements. Slot factories, bindings, roles, placement, native rendering, hit bounds, hints, reservations and shift-click routing are overridable while shared code enforces identity and acceptance rules.ElementTypecommon declarations and client-onlyElementClientattachments that forward to the existing registries; migrate built-ins and preserve renderer/behavior inheritance and XML aliases.Compatibility and review notes
Validation
gradlew check build javadoc --offline, including Spotless/import fixtures, 374 unit tests, 81 companion + 93 library server GameTests, and packaging checks.runCompanionClientSmoke -PredstoneConnectionSmokeOnlyrun passed for actual drawer requests and client-world Emit/Ignore/Read updates; the user also confirmed the Read-face fix in game.gradlew spotlessApply check build javadoc --offline, plus focused-PredstoneConnectionSmokeOnlyand-PdrawerSmokeOnlyclient runs. Added regressions for each review finding.runCompanionClientSmoke -PinheritanceSmokeOnly; inherited tank/energy/progress drawing and bucket interactions passed, with the resulting screenshot inspected.docs/custom-fluid-element.mdcompile against this checkout. XML namespace, translation keys, links and whitespace were checked.06afa85: all checks passed in both PR CI and push CI, including the full companion GUI suite and library GUI suites with and without JEI. The latestmaster-2.0-1.21.1-neois included.