Skip to content

Refactor Configurable Maintenance Hatch to fix the UI - #5573

Open
DilithiumThoride wants to merge 12 commits into
1.21from
dt/config-maint-hatch
Open

DilithiumThoride wants to merge 12 commits into
1.21from
dt/config-maint-hatch

Conversation

@DilithiumThoride

@DilithiumThoride DilithiumThoride commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What

Fixes #5436 , fixing the hover tooltips and converting the text input into a +/- button interface.

Also refactors the entire Configurable Maintenance Hatch into being its own separate class rather than all packed into the base Maintenance Hatch class.
Also fixes the balance issue where Configurable Maintenance Hatches would make Generators burn 10% less fuel while also having less maintenance.

(Also fixes the UI widget for regular maintenance hatches using Tools with size 18 icons rather than size 16 icons, making them look weirdly stretched.)

Implementation Details

And creates a new createDecimalInputWithButtons method (and helpers) within GTMuiWidgets, allowing other UIs to make decimals rather than just ints or buckets. Implementation based on #5415 , including doing the input using ints as a proxy for fixed-point decimals. Also adds overrides for the button hover and increment methods to allow increment multipliers other than 4.

This PR changes 1 lang entry and has a run of Datagen, however the Datagen task is currently broken on 1.21 likely due to something from #5538 (#5531)

AI Usage

  • [ X ] No AI driven tools were used for this pull request.

Outcome

image image image

@DilithiumThoride
DilithiumThoride requested a review from a team as a code owner October 19, 2026 02:06
@DilithiumThoride DilithiumThoride added type: refactor Suggestion to refactor a section of code Release: Patch - 0.0.X Smaller changes that either are bug fixes or very minor tweaks. labels Oct 19, 2026
@github-actions github-actions Bot added 1.21 Tests: Passed Game Tests have passed on this PR labels Oct 19, 2026
Comment thread src/main/java/com/gregtechceu/gtceu/common/mui/GTMuiWidgets.java
}

public static String formattedDecimalValue(int value, int decimalPlaces) {
String formatter = "%0" + (decimalPlaces + 1) + "d";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String.format? do we not have a string util to specify variable decmial places

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for this purpose?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.21 Release: Patch - 0.0.X Smaller changes that either are bug fixes or very minor tweaks. Tests: Passed Game Tests have passed on this PR type: refactor Suggestion to refactor a section of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants