ModularUI2
107 merged pull requests.
New Features
- #155 Enhanced error message in AbstractCycleButtonWidget to include the attempted state and valid state range for easier debugging. - @FourIsTheNumber
- #148 Extended ModularUIConfig with localization keys derived from .tooltip annotations and added translation entries to en_US.lang. - @Ranzuu
- Added: config localization support, config tooltip translations
- #139 Added configuration flag to ModularScreen and ClientScreenHandler to toggle the default dark overlay rendering. - @RealSilverMoon
- Added: ModularScreen overlay toggle option
- #134 Added filtering logic to FluidSlotSyncHandler class to allow fluid slot synchronization with filter constraints. - @TheYoingLad
- Added: fluid filter support in FluidSlotSyncHandler
- #131 Enhanced TextFieldHandler and MathUtils to parse SI prefixes and modifiers similar to GTNHLib. Added scroll step support for ALT modifier and improved modifier stacking. Added test GUI with text field examples. - @brachy84
- Added: SI prefix support, % operator, ALT scroll step, INumberParser interface
- Fixed: number input expression parsing
- #127 Added row and column alignment properties to Grid widget layout system. - @TheYoingLad
- Added: per-row alignment, per-column alignment
- #122 Added showSlotOverlay config flag to ModularUIConfig. Conditionally render slot background in ItemSlot and FluidSlot based on config. - @Ranzuu
- Added: showSlotOverlay configuration option
- #114 Added color configuration fields to ModularUIConfig and localization keys to lang file. Refactored ClientScreenHandler debug rendering to use config colors. - @Ranzuu
- Added: debug screen color config, debug text localization
- #109 Added NEI overlay layer rendering in ItemSlot to support overlay and underlay rendering similar to ModularUI1. - @Luca-Guettinger
- Added: NEI overlay/underlay support
- #106 Modified FluidSlotSyncHandler to allow fluid stacks with amount 0 to be displayed when configured. - @TheYoingLad
- #104 Implemented IShortValue interface and ShortSyncValue synchronization handler, mirroring existing boolean and integer sync value implementations. - @TheYoingLad
- Added: IShortValue interface, ShortValue class, ShortSyncValue handler
- #103 Introduced IModernInteractable interface for widgets, added lwjgl3 event handling in ClientProxy and TextFieldWidget, and added API for mods to implement custom lwjgl3 compatibility. - @brachy84
- Added: IModernInteractable interface, lwjgl3 compatibility layer
- #90 New public method in ItemSlot to retrieve the ItemStack used for rendering purposes. - @Kogepan229
- Added: getItemStackForRendering method
- #89 Extracted stack rendering into a protected method in GuiDraw and added long-based override for ItemSlot to support compressed bus ultra-large stacks. - @RecursivePineapple
- Added: Protected stack rendering method, Long-based stack amount rendering
- #85 Added NEI mixin, recipe transfer handler (INEIRecipeTransfer), stack overlay positioning, and configuration class for NEI compatibility. - @Shigure-Ruiseki
- Added: NEI integration system, RecipeInfoMixin, INEIRecipeTransfer interface, NEI stack overlay and positioning classes
- #84 New FluidDrawable class provides fluid rendering capabilities, with test integration in TestTile. - @chrombread
- Added: FluidDrawable widget class
- #74 Added direct port of MUI1 fluid handler classes: FluidTankLong, FluidTanksHandler, IFluidTankLong, IFluidTanksHandler, and ListFluidHandler. - @serenibyss
- Added: FluidTankLong, FluidTanksHandler, IFluidTankLong, IFluidTanksHandler, ListFluidHandler
- #73 Implemented EntityDisplayWidget for displaying entities in GUIs, refactored from UIE source using ModularUI2 helper methods. - @chrombread
- Added: EntityDisplayWidget
- #71 Added on-close action callback mechanism to ModularPanel to address cleanup issues in Godforge and other mods. - @serenibyss
- Added: on-close action callback for ModularPanel
- #65 Made ItemDisplayWidget resizable. - @Spicierspace153
- Added: resize support for ItemDisplayWidget
- #64 Implemented FluidDisplayWidget with supporting drawing utilities in GuiDraw. - @Spicierspace153
- Added: FluidDisplayWidget, fluid display drawing support
- #61 Added click sound override capability to AbstractCycleButtonWidget, allowing Toggle and Cycle buttons to use custom sound effects. - @serenibyss
- Added: click sound override for Toggle and Cycle buttons
- #60 Added scroll wheel support to TextFieldWidget that increments/decrements numeric values when focused and enabled. - @chrombread
- Added: scroll-to-adjust feature for numeric text fields
- #58 Added
ReversedListutility class; extendedFlowwidget with reverse-order option for child iteration. - @chrombread- Added: ReversedList utility, Flow reverse order option
- #57 Added
nonOpaquebuilder method toUITexture; updatedGuiDrawandPlatformto conditionally enable GL blend when rendering non-opaque textures. - @serenibyss- Added: nonOpaque option for UITexture, blend mode support
- #56 Extended
TextFieldWidgetwith tooltip override methods; updatedTestTileto demonstrate usage. - @chrombread- Added: tooltip override methods in TextFieldWidget
- #40 Added
IThemeApiinterface andThemeAPIimplementation; expandedWidgetSlotThemeto accept theme parameters inSlotGroupWidget. - @rspforhp- Added: theme API for widgets, WidgetSlotTheme customization
New Content
- #143 Added SUN and MOON entries to GuiTextures icon enumeration and updated the icons.png sprite sheet. - @Eldrinn-Elantey
- Added: SUN icon, MOON icon
- #140 Added COLOR_WHEEL entry to GuiTextures icon enumeration and updated the icons.png sprite sheet. - @Eldrinn-Elantey
- Added: COLOR_WHEEL icon
- #130 Added FAVORITE_EMPTY icon definition to GuiTextures pointing to UV (192, 48) in icons.png texture. - @Eldrinn-Elantey
- Added: FAVORITE_EMPTY icon
Changes
- #157 Modified AbstractFluidDisplayWidget and FluidSlot to fall back to NumberFormatUtil.getFluidUnit() for fluid unit determination instead of hardcoding UNIT_LITER, while preserving explicit fluidUnit() overrides. - @Eldrinn-Elantey
- Fixed: useForgeFluidMillibuckets config not affecting GUI labels
- #154 Changed ModularUI1 dependency configuration from compileOnly to compileOnlyApi in dependencies.gradle. - @SuperSoupr
- #142 Modified FluidSlotSyncHandler fluid transfer logic and updated en_US.lang localization to reflect MUI1 behavior. - @AnsonYeung
- Fixed: fluid cell stack transfer behavior
- Migration: A GUI mouse-button change: left click on a tank moves the whole held stack of cells, right click moves one.
- Closes GTNH#25123, GTNH#25283
- #132 Updated FAVORITE_EMPTY to FAVORITE_OUTLINE in GuiTextures. - @Caedis
- Removed: FAVORITE_EMPTY
- #121 Modified ISynced generic interface to require explicit sync direction. Updated all sync value and handler classes to specify direction via generic type. Defaults to server-to-client only. - @brachy84
- Added: sync direction generic type parameter
- Migration: Custom sync handler classes must add the new generic type parameter and explicitly enable client-to-server packets where needed via the new setter.
- #117 Updated gradle.properties with curseforge and modrinth project IDs. - @brachy84
- #116 Updated mixin plugin to conditionally disable Thaumcraft compat mixins based on Salis Arcana mod detection. - @Alexdoru
- Added: Salis Arcana mod detection
- #107 Changed FluidSlotSyncHandler.tryClickContainer and tryClickPhantom from private to protected, and added null check in FluidInteractions.getFluidForItem to prevent NPE. - @TheYoingLad
- Added: null check in FluidInteractions
- Fixed: potential null pointer exception
- #100 Bumped Nea dependency version in dependencies.gradle to fix Maven resolution problems. - @brachy84
- Fixed: Maven dependency issue
- #99 Updated GT5-Unofficial dependency version and adjusted MCHelper text formatting methods. - @iouter
- #98 Removed local JAR files and updated dependencies.gradle to fetch NEA from CurseMaven instead. - @brachy84
- Removed: Local NEA JAR files
- #96 Removed unused client event handlers, cleaned up imports, and adjusted network packet serialization and container logic. - @brachy84
- Removed: Unused ClientProxy code, Unused MCHelper methods, RecipeViewerSettings
- #95 Major refactor including new IResizeParent/IResizeable layout system, IDelegatingWidget, ITreeNode, improved IThemeApi, and numerous widget/drawable updates spanning 150+ files. - @brachy84
- Added: IResizeParent interface, IDelegatingWidget interface, ITreeNode interface, FormatTest functional test
- Migration: Test thoroughly and check for breakage in IResizeable, IGuiElement, IPositioned, and related layout APIs.
- #86 Major refactor including new IPanelHandler, ISyncOrValue API, expanded IParentWidget, refactored ISynced, and numerous drawable/widget changes across 250+ lines. - @brachy84
- Added: ISyncOrValue API, IPanelHandler interface, EntityPlayerMPMixin
- Removed: Unused ModularUI initialization code
- Migration: Review usage of changed API classes (IParentWidget, ISynced, IValue, IDrawable, IRichTextBuilder) and adapt accordingly.
- #80 Added another verification check in ModularPanel to prevent issues with disposed widget access. - @RealSilverMoon
- #75 Multiple updates across API and implementation classes including IKey enhancements, IRichTextBuilder, ISynced improvements, DynamicKey refactor, and factory/screen updates. - @brachy84
- Added: IKey methods, IRichTextBuilder, ISynced enhancements
- #69 Added FloatValue and IFloatValue classes, new FloatSyncValue and IFloatSyncValue for float synchronization, and updated sync handlers with new capabilities. - @brachy84
- Added: FloatValue, IFloatValue, FloatSyncValue, IFloatSyncValue, enhanced sync handlers
- Removed: IDoubleValue (replaced with float variants)
- #68 Removed @Experimental annotations from TextFieldWidget.setFormatAsInteger() and TextFieldRenderer. - @serenibyss
- Removed: @Experimental annotations from setFormatAsInteger
- #66 Multiple API and implementation changes across drawable, widget, and value systems; includes new interface methods, enhanced drawable capabilities, and recipe viewer integration improvements. - @brachy84
- Added: IIcon interface, new drawable methods, layout widget improvements
- #62 Increased sync value key length limit in PacketSyncHandler. - @serenibyss
- #55 Refactored
DropDownMenutext drawing logic to prevent position shifting on first open and to improve text layout within dropdown bounds. - @DarkShadow44- Fixed: text jumping on dropdown open, unintended line breaks
- #54 Modified
DropDownMenubackground rendering to inherit the main item's background instead of using a separate style. - @DarkShadow44 - #53 Adjusted
DropDownMenuarrow positioning to include 1-2px margin on the right side. - @DarkShadow44 - #46 Updated
ITheme,IThemeApi,DrawableSerialization, addedScrollbardrawable, refinedColorandColorShadeutilities, and fixed minor issues in screen handlers and test GUIs. - @brachy84- Added: Scrollbar drawable, color utilities
- Fixed: various upstream issues
- #44 Complete revert of PR#43, restoring prior state before the major upstream WidgetTheme refactor. - @Dream-Master
Bug Fixes
- #161 Modified GuiDraw to use a fixed 16 GUI pixel tile size for fluid texture tiling instead of deriving it from sprite resolution, making tiling independent of atlas padding or HD texture scaling. - @Eldrinn-Elantey
- Fixed: fluid icon cropping with padded sprite atlas
- #160 Added explicit check in ModularContainer to prevent slot swapping operations when source and destination slots are identical. - @mcmlevi
- Added: same-slot swap prevention
- Fixed: items deleted when hotbar slot key pressed on same slot
- Closes GTNH#26398
- #153 Modified MathUtils and TextFieldWidget to preserve the original input expression during validation, distinguishing explicit percentages (e.g., "50%") from absolute values (e.g., "1"). Added regression tests. - @Worive
- Added: percentage input validation in bounded fields, regression tests
- Fixed: explicit percentage calculation in bounded numeric fields
- #152 Added early return for zero or negative fluid amounts in AbstractFluidDisplayWidget to skip texture rendering and removed redundant amount check. - @tiffit
- Removed: redundant fluid amount check
- Fixed: empty fluid stack rendering
- #151 Added try-catch wrapper around BigDecimal parsing in Expression.java and EvaluationValue.java to catch and rethrow all parsing failures as BaseException for proper handling in mathUtils. - @vnesterovskyi
- Added: exception handling in expression evaluation
- Fixed: uncaught BigDecimal parsing exceptions
- #147 Added GL state preservation and restoration after untextured draw operations in GuiDraw, Rectangle, ClientScreenHandler, Platform, and TextFieldRenderer to prevent state pollution to other mods. - @Algent
- Added: GL state push/pop for untextured draws
- Fixed: white NEI item rendering, GL state leakage
- Closes GTNH#25499
- #145 Fixed TextRenderer and TextFieldHandler to properly handle caret movement bounds, scaling calculations, multi-line copying, and pasting at document end. - @TheYoingLad
- Fixed: text field OOB errors, text field renderer scaling, multi-line copy, end-of-line paste
- #138 Corrected ModularUIContainerObjectHandler slot obstruction check to properly detect when no UI elements are obscuring the slot, allowing NEI shift-drop to function. - @AnsonYeung
- Fixed: shift+drop stack functionality
- Closes GTNH#25138
- #137 Adjusted ToggleButton background overlay logic to respect theme background settings. - @TheYoingLad
- Fixed: toggle button bgOverlay theme override
- #136 Added validation in EvaluationValue.numberOfString() to check for invalid decimal point placement in exponent notation, preventing parser exceptions. - @Miklebe
- Fixed: BigDecimal parsing with invalid exponent notation
- #135 Modified GuiContainerMixin and SlotGroup to expose a dummy inventory for object comparison in vanilla shift-click logic, ensuring destination inventory is correctly identified for gather operations. - @AnsonYeung
- Added: dummy inventory for slot group comparison
- Fixed: shift-click stack gathering when destination inventory is full
- Closes GTNH#25006
- #133 Added sync handler initialization check in PanelSyncHandler.closePanelInternal() to skip sync ops when torn down. Clamped cursor position in TextFieldHandler.insert() to prevent StringIndexOutOfBoundsException. - @Luca-Guettinger
- Fixed: IllegalStateException during GUI close, StringIndexOutOfBoundsException in text input
- #129 Added early locking of PanelSyncManager in init() to prevent post-init handler registration. - @brachy84
- Fixed: sync handler registration race condition
- #126 Modified tooltip rendering logic in Widget, ItemSlot, and TextFieldWidget to suppress tooltips during panel drag operations. - @TheYoingLad
- Fixed: tooltips showing through dragged panels
- Closes GTNH#24612
- #125 Fixed typo in IPositioned.disableCoverChildrenHeight method name. - @TheYoingLad
- Fixed: method name typo
- #123 Refined ClientScreenHandler key binding logic to distinguish between escape and inventory shortcut, allowing layered close behavior. - @brachy84
- Fixed: inventory shortcut closing UI layers incorrectly
- Closes GTNH#24648
- #120 Fixed spelling error in en_US.lang debug string. - @Ranzuu
- Fixed: debug text typo
- #119 Added null check in GuiDraw to gracefully handle missing fluid textures instead of throwing exception. - @Luca-Guettinger
- Fixed: crash from null fluid icon
- #118 Enhanced ClientScreenHandler screen close logic and added PanelManager focus state management. Improved BaseTextFieldWidget focus tracking during input. - @brachy84
- Added: PanelManager focus management
- Fixed: text field focus state issues
- #113 Added null safety check in ClientProxy during world unload event handling. - @brachy84
- Fixed: NullPointerException on world unload
- #112 Added opacity field copying to copy() methods in UITexture, AdaptableUITexture, and TiledUITexture. - @TheYoingLad
- Fixed: opacity not being copied with UITexture instances
- #111 Split shared container stack in GuiManager and ModularNetwork into per-player stacks tracked by ModularNetworkSide. Sync handlers now manage per-player state. - @brachy84
- Added: per-player container stack management
- Fixed: GregTech UI freezing from concurrent player interactions
- Closes GTNH#24188
- #102 Removed problematic theme configuration rules for red slot states in vanilla.json theme. - @Ranzuu
- Removed: red slot theme rules
- Fixed: red slot visual glitch
- #101 Added exception handling in TextFieldWidget and modified onRemoveFocus to strip non-numeric characters instead of throwing InvalidNumberException for integer-formatted fields. - @NeutronSelector
- Fixed: InvalidNumberException on non-numeric input, numeric field initialization
- #97 Uncommented slot group assignment logic in SlotGroupWidget. - @brachy84
- Fixed: Slot group not being applied to slots
- #94 GuiDraw stack rendering now handles fractional stack sizes correctly. - @chrombread
- Fixed: Incorrect rendering of sub-1 stack sizes
- #92 FluidSlot tooltip logic now checks the actual drain/fill capability of the fluid handler instead of always suggesting filling. - @danyadev
- Fixed: Incorrect fluid slot tooltips
- #88 FluidInteractions.getContainerForFilledItem now returns null when IFluidContainerItem.drain returns null, preventing invalid state progression. - @SuperSoupr
- Fixed: Fluid duping with Super Tanks and failed drain operations
- Closes GTNH#23153
- #82 ModularContainer now checks ItemStack max stack size when validating slot capacity, since Slot.getItemStackLimit(ItemStack) doesn't exist in 1.7.10. - @brachy84
- Fixed: Slots ignoring item max stack size
- #81 Fixed FluidSlotSyncHandler to properly update cursor stack counts on drain/fill operations and handle containers that don't support specific fluids. - @chrombread
- Fixed: fluid synchronization desync with cells, NPE for unsupported fluid containers
- #79 Corrected Widget base class to properly call value setter in sync handler operations for TextFieldWidget. - @chrombread
- Fixed: TextFieldWidget sync handler value callback
- #78 Commented out the crash-causing code in EventHandler with a TODO note, as it appears unused. - @chrombread
- Fixed: crash on emerald right-click in test environments
- #77 Added pre and post-draw consumer callbacks to GuiDraw.drawEntityLookingAtMouse and corrected entity rotation logic in EntityDisplayWidget. - @chrombread
- Added: pre/post-draw consumer support
- Fixed: entity display widget rendering
- #76 Corrected issues in Flex sizing, AbstractCycleButtonWidget, ItemDisplayWidget, ProgressWidget, SliderWidget, and TextFieldWidget caused by upstream changes. - @brachy84
- Fixed: Flex sizing, cycle button widget, item display widget, progress widget, slider widget, text field widget
- #72 Corrected text rendering offset calculations in TextRenderer for specific alignment modes. - @serenibyss
- Fixed: text rendering offset with certain alignments
- #70 Added verification checks in ModularPanel before executing operations to prevent getContext() calls on disposed widgets. - @RealSilverMoon
- Fixed: DynamicSyncWidget disposal handling
- #59 Re-added missing condition line in
TextFieldWidgetto properly gate tooltip display. - @chrombread- Fixed: tooltip always showing on TextFieldWidget
- #52 Changed
StyledTextto callgetTextColor()instead ofgetColor()to preserve intended text coloring. - @DarkShadow44- Fixed: StyledText color override
- #51 Added click-blocking logic to
DropDownMenuto prevent click events from passing through to elements underneath. - @DarkShadow44- Fixed: dropdown click-through issue
- #50 Refactored
DynamicSyncHandlerwith improved value caching and sync triggering; adjustedWidgetTreeandDynamicSyncedWidgetto work correctly with the new handler. - @brachy84- Fixed: dynamic sync in certain scenarios
- #49 Refined
PlayerSlotTypeslot detection, adjusted cursor z-layer inClientScreenHandler, and simplifiedIThemeApiinterface. - @brachy84- Fixed: player slot detection, cursor rendering order
- #45 Restored null check in
EventHandler.javathat was accidentally removed during upstream sync. - @chrombread- Fixed: NPE preventing UI opening with empty hand
- #42 Re-added deprecated constructor to
WidgetSlotThemethat accepts null theme parameters and defaults to fallback slot-type-specific behavior. - @cubefury- Added: legacy WidgetSlotTheme constructor
- Fixed: crashes from GT5u and other mods using old constructor
- #41 Added minimum text width constraint in
RichTextCompilertooltip renderer. - @cubefury- Fixed: tooltip rendering with small widths
Internal / Refactor
- #110 Deprecated Grid methods and added new implementations. Updated test code to use new method signatures. Methods remain functional. - @brachy84
- #105 Merged upstream UI framework updates including IPositioned, drawable serialization, UITexture, and ModularContainer improvements. Added deprecations and new methods while maintaining compatibility. - @brachy84
- Added: ColorType, new drawable methods, ModularContainer methods
- #93 FluidSlotSyncHandler and FluidInteractions rewritten to handle complex scenarios: slots can be filled to capacity, containers can be partially filled to their limits, and stacks are intelligently consumed. - @danyadev
- Added: Enhanced fluid container handling
- #48 Added
InternalWidgetTreeclass, expandedIWidgetinterface, refactoredWidgetTreeandPanelSyncManager, deprecateddebugNameand related methods. - @brachy84- Added: WidgetTree test, InternalWidgetTree, Widget.name property
- Migration: Replace Widget.debugName references with Widget.name; update any WidgetTree method calls against documentation.
- #47 Refactored
ILayoutWidget,IResizeable,IViewportStackAPIs; updatedClientScreenHandler, viewport and overlay managers, and addedMCHelperutility class. - @brachy84- Added: MCHelper utility, viewport stack API
- Migration: Update custom widgets implementing ILayoutWidget to match the new interface contract.
- #43 Large upstream sync affecting animation system, proxy structure, error handling, and theme architecture. WidgetTheme refactor documented in CleanroomMC/ModularUI#162. - @brachy84
- Added: functional camera test
- Removed: TODO.md
- Fixed: various upstream issues
- Migration: Update any custom widgets inheriting WidgetSlotTheme to use the new constructor signature.
Documentation
- #108 Corrected mcmod.info logo path reference. - @JackOfNoneTrades
Chores
- #83 Deleted unused event registration from ClientProxy. - @Alexdoru
- Removed: Useless event registration
Contributors
Everyone who authored, reviewed or co-authored a change on this page, with how many of them:
@brachy84 (63), @chrombread (34), @TheYoingLad (23), @Dream-Master (14), @serenibyss (14), @Spicierspace153 (8), @FrostyFire1 (6), @DarkShadow44 (5), @Eldrinn-Elantey (5), @Luca-Guettinger (5), @Ranzuu (5), @AnsonYeung (4), @Caedis (4), @danyadev (4), @cubefury (3), @ghzdude (3), @Miklebe (3), @Nockyx (3), @RealSilverMoon (3), @Alexdoru (2), @Algent (2), @miozune (2), @RecursivePineapple (2), @SuperSoupr (2), @UltraProdigy (2), @Zorbatron (2), @ALongStringOfNumbers (1), @Angry3vilbot (1), @boubou19 (1), @czqwq (1), @FourIsTheNumber (1), @iouter (1), @JackOfNoneTrades (1), @Kogepan229 (1), @marisathewitch (1), @mcmlevi (1), @MLGfruitshoot (1), @NeutronSelector (1), @Nikolay-Sitnikov (1), @purebluez (1), @rspforhp (1), @seventh-june (1), @Shigure-Ruiseki (1), @tiffit (1), @vnesterovskyi (1), @Worive (1), @YannickMG (1)