MCPcopy Index your code
hub / github.com/CleanroomMC/ModularUI

github.com/CleanroomMC/ModularUI @v3.1.6

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.1.6 ↗ · + Follow
6,507 symbols 18,999 edges 603 files 1,137 documented · 17%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

ModularUI

What is ModularUI?

ModularUI is a library for Minecraft aiming to make GUI's much easier.

Why ModularUI?

Minecrafts (and Forges) gui code is not very good and the code gets really messy really fast. With ModularUI you can build GUIs fast by adding Widgets to panels with layout widgets, so you don't have to calculate positions and sizes yourself. ModularUI is very dynamic and allows for very complicated client only or even client-server synced GUIs. A good example is fluid slots in GUIs. Minecraft and Forge don't offer anything to add fluid slots or tanks to a GUI. With ModularUI you simply call .child(new FluidSlot().syncHandler(new FluidTank(16000))) (along with some setters).

Key features

  • panel system similar to windows
  • widgets are placed in a tree like structure
  • widget rendering and interactions are automatically handled
  • no need to create GUI texture sheets, each widget is rendered dynamically
  • easy and dynamic widget sizing and positioning
  • build in APIs for various UI things like color, stencil (fancy scissor) and animations
  • easy syncing between client and server without
  • good for client only GUIs and client-server synced GUIs
  • GUI themes are loaded via JSON and can be added and modified by resourcepacks
  • JEI compat for things like exclusion zones and ghost ingredients

Planned Features

  • Create JEI recipe handlers with MUI
  • Improved text rendering

History

  • First appearance of ModularUI in GTCE by Archengius
  • on 30th December 2021 GTCEu released with some improvements to its GUI library
  • on 16th January 2022 Rongmario created the ModularUI repository in the CleanroomMC organization with the intention to rewrite it
  • on 19th February I (brachy) started working on ModularUI
  • on 21st May 2022 ModularUI version 1.0.0 was released on Curseforge
  • miozune decided to port ModularUI to 1.7.10 for GTNH
  • after 3 month of updates I decided to rewrite some parts of the library
  • the rewrite turned very large and thus ModularUI 2 was born
  • on 21st March 2023 I uploaded version 2.0.0 to Curseforge
  • since then ModularUI is constantly receiving updates

Extension points exported contracts — how you extend this code

ConverterIfc (Interface)
Converter interface used by the DefaultEvaluationValueConverter. [9 implementers]
src/main/java/com/ezylang/evalex/data/conversion/ConverterIfc.java
RecipeViewerIngredientProvider (Interface)
An interface for recipe viewer to get the ingredient from a widget to show recipes for example. Implement this on {@link [6 …
src/main/java/com/cleanroommc/modularui/integration/recipeviewer/RecipeViewerIngredientProvider.java
ILayoutWidget (Interface)
This is responsible for laying out widgets. [6 implementers]
src/main/java/com/cleanroommc/modularui/api/layout/ILayoutWidget.java
IInterpolation (Interface)
A function which interpolates between two values. [7 implementers]
src/main/java/com/cleanroommc/modularui/api/drawable/IInterpolation.java
IDrawable (Interface)
An object which can be drawn at any size. This is mainly used for backgrounds and overlays in {@link com.cleanroommc.mod [18 …
src/main/java/com/cleanroommc/modularui/api/drawable/IDrawable.java

Core symbols most depended-on inside this repo

get
called by 354
src/main/java/com/cleanroommc/modularui/api/ITheme.java
add
called by 283
src/main/java/com/cleanroommc/modularui/api/drawable/IRichTextBuilder.java
size
called by 258
src/main/java/com/cleanroommc/modularui/api/widget/IPositioned.java
child
called by 236
src/main/java/com/cleanroommc/modularui/api/widget/IParentWidget.java
getArea
called by 201
src/main/java/com/cleanroommc/modularui/api/widget/IWidget.java
put
called by 122
src/main/java/com/cleanroommc/modularui/theme/WidgetThemeMap.java
getThis
called by 116
src/main/java/com/cleanroommc/modularui/api/widget/ISynced.java
max
called by 112
src/main/java/com/cleanroommc/modularui/utils/DAM.java

Shape

Method 5,794
Class 546
Interface 136
Enum 31

Languages

Java100%

Modules by API surface

src/main/java/com/cleanroommc/modularui/screen/ModularPanel.java78 symbols
src/main/java/com/cleanroommc/modularui/widget/sizer/StandardResizer.java76 symbols
src/main/java/com/cleanroommc/modularui/utils/Color.java69 symbols
src/main/java/com/cleanroommc/modularui/api/widget/IPositioned.java67 symbols
src/main/java/com/cleanroommc/modularui/widget/Widget.java61 symbols
src/main/java/com/cleanroommc/modularui/widgets/layout/Grid.java58 symbols
src/main/java/com/cleanroommc/modularui/widget/sizer/Area.java57 symbols
src/main/java/com/cleanroommc/modularui/screen/ModularScreen.java53 symbols
src/main/java/com/cleanroommc/modularui/api/widget/IWidget.java53 symbols
src/main/java/com/cleanroommc/modularui/widgets/AbstractCycleButtonWidget.java51 symbols
src/main/java/com/cleanroommc/modularui/utils/FAM.java49 symbols
src/main/java/com/cleanroommc/modularui/utils/DAM.java49 symbols

For agents

$ claude mcp add ModularUI \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact