Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
153389a
Bump mui2 to rc6 from rc4
Zorbatron Sep 4, 2025
93c208b
com.cleanroommc.modularui.widgets.ItemSlot moved to com.cleanroommc.m…
Zorbatron Sep 4, 2025
93b6c33
com.cleanroommc.modularui.api.IGuiHolder#buildUI gained a third argument
Zorbatron Sep 4, 2025
95c951e
SlotGroupWidget.playerInventory signature change
Zorbatron Sep 4, 2025
fb0bb45
com.cleanroommc.modularui.api.IGuiHolder#buildUI gained a third argum…
Zorbatron Sep 4, 2025
cd8fbc9
ModularPanel#closeIfOpen no longer takes a boolean
Zorbatron Sep 4, 2025
9cb0c1c
GuiDraw#drawItem takes a z level now. Set to 100 to match previous be…
Zorbatron Sep 4, 2025
dbaa9bf
SlotGroupWidget#playerInventory signature change pt2
Zorbatron Sep 4, 2025
807880a
ItemSlotSH phantom behavior was extracted out into PhantomItemSlotSH
Zorbatron Sep 4, 2025
9ce3f07
phantom item slot changes
Zorbatron Sep 4, 2025
8054819
Fix change to HoveredWidgetList
Zorbatron Sep 4, 2025
ee026d3
NumberFormat changes
Zorbatron Sep 4, 2025
c2c1ad2
TextRenderer changes
Zorbatron Sep 4, 2025
ec3c6c4
spotless
Zorbatron Sep 4, 2025
dbecf42
Undo #2854 now that we have 159 pr 159
Zorbatron Sep 4, 2025
c6cb5e2
Remove mixin superseded by rc5
Zorbatron Sep 6, 2025
af2d201
Partially remove mixin superseded by rc6
Zorbatron Sep 6, 2025
24563a5
Merge branch 'master' into zb/mui-rc6
Zorbatron Sep 20, 2025
2f19324
Remove superseded mixins after merge
Zorbatron Sep 20, 2025
0902148
Forgot to remove the mixins from the json
Zorbatron Sep 20, 2025
790809d
Update to 2.5 full release
Zorbatron Oct 2, 2025
ee5c426
simplify method in JEIUtil
ghzdude Oct 3, 2025
38d4a43
wip
Zorbatron Oct 10, 2025
17df8c0
Merge remote-tracking branch 'origin/zb/mui-rc6' into zb/mui-rc6
Zorbatron Oct 29, 2025
6da01f8
merge in ghz's change
Zorbatron Oct 29, 2025
3fd338f
UITexture ColorType
Zorbatron Oct 29, 2025
258eff6
Update to v3.0.3
Zorbatron Oct 30, 2025
1cb313f
It compiles now
Zorbatron Oct 30, 2025
701d589
Merge branch 'master' into zb/mui-rc6
Zorbatron Oct 30, 2025
ac0835c
update bogo dep
ghzdude Oct 31, 2025
9090f28
forgor export slots
ghzdude Oct 31, 2025
c68d9a9
fix simple item filters
ghzdude Oct 31, 2025
7ad5380
fix filter in-hand ui player inventory positioning
ghzdude Oct 31, 2025
47e0166
use dev and sources
ghzdude Nov 3, 2025
7cd8f10
move clear grid back into place
ghzdude Nov 3, 2025
24cb987
removing panel padding from item/fluid filter hand ui
ghzdude Nov 3, 2025
ea0f7c2
refactor ghost circuit slot to not extend itemslot related classes
ghzdude Nov 3, 2025
67e73f6
Merge remote-tracking branch 'origin/zb/mui-rc6' into zb/mui-rc6
Zorbatron Nov 6, 2025
fdd37cf
Fix up quantum storage
Zorbatron Nov 6, 2025
311ec09
handle missed edge cases for locking fluid
ghzdude Nov 8, 2025
e6e079a
fix animator crash on dispose
ghzdude Nov 8, 2025
5801771
update to mui 3.0.4
ghzdude Nov 10, 2025
5f03fe5
fix scrolling text widget
ghzdude Nov 10, 2025
00c40e8
fix lines having too much space
ghzdude Nov 10, 2025
902f479
replace our big int sync handler with mui2
ghzdude Nov 11, 2025
b8c5e49
why did i make the item inventory modifiable?
ghzdude Nov 11, 2025
a5f0b7a
no longer need to disable hover background
ghzdude Nov 11, 2025
7938d5b
properly disable background
ghzdude Nov 11, 2025
6fbf055
fix scroll bar not rendering
ghzdude Nov 11, 2025
76889b3
fix and reorganize fluid slot tooltips to match item slot tooltips
ghzdude Nov 11, 2025
a576d8c
update filter max transfer size on popup open
ghzdude Nov 11, 2025
a0ed159
forgor to update this, only valid filters are allowed
ghzdude Nov 11, 2025
f14d6ff
disable fill on quantum fluid slot (it felt weird to me)
ghzdude Nov 12, 2025
438bf47
bump mui dep requirement
ghzdude Nov 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ local.properties
/classes/
/out/
/build/
.run/

# Linux
*~
Expand Down
5 changes: 3 additions & 2 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@
dependencies {
// Published dependencies
api("codechicken:codechickenlib:3.2.3.358")
api("com.cleanroommc:modularui:2.5.0-rc4") { transitive = false }
api("com.cleanroommc:modularui:3.0.4") { transitive = false }
api("com.cleanroommc:groovyscript:1.2.0-hotfix1") { transitive = false }
api("curse.maven:inventory-bogosorter-632327:4951607-deobf-4951608-sources-4951609")
api("curse.maven:inventory-bogosorter-632327:7102721-deobf-6717233-sources-6717234") // Inventory BogoSorter − v1.5.0
api("curse.maven:key-binding-patch-928895:5951859") // Key Binding Patch v1.3.3.3, needed by Inventory BogoSorter v1.5.0+
api("CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.1.20.700")
api("appeng:ae2-uel:v0.56.4") { transitive = false }
api rfg.deobf("curse.maven:ctm-267602:2915363") // CTM 1.0.2.31
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/gregtech/GregTechMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
acceptedMinecraftVersions = "[1.12.2,1.13)",
version = GTInternalTags.VERSION,
dependencies = "required:forge@[14.23.5.2847,);" + "required-after:codechickenlib@[3.2.3,);" +
"required-after:modularui@[2.5.0-rc,);" + "required-after:mixinbooter@[8.0,);" +
"required-after:modularui@[3.0.4,);" + "required-after:mixinbooter@[8.0,);" +
"after:appliedenergistics2;" +
"after:forestry;" + "after:extrabees;" + "after:extratrees;" + "after:genetics;" + "after:magicbees;" +
"after:jei@[4.15.0,);" + "after:crafttweaker@[4.1.20,);" + "after:groovyscript@[1.2.0,);" +
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/gregtech/api/cover/CoverWithUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import com.cleanroommc.modularui.factory.SidedPosGuiData;
import com.cleanroommc.modularui.screen.ModularPanel;
import com.cleanroommc.modularui.screen.ModularScreen;
import com.cleanroommc.modularui.screen.UISettings;
import com.cleanroommc.modularui.utils.Alignment;
import com.cleanroommc.modularui.utils.Color;
import com.cleanroommc.modularui.utils.MouseData;
Expand Down Expand Up @@ -65,7 +66,7 @@ default GTGuiTheme getUITheme() {
}

@Override
default ModularPanel buildUI(SidedPosGuiData guiData, PanelSyncManager guiSyncManager) {
default ModularPanel buildUI(SidedPosGuiData guiData, PanelSyncManager guiSyncManager, UISettings settings) {
return null;
}

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/gregtech/api/items/gui/ItemUIFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.cleanroommc.modularui.factory.HandGuiData;
import com.cleanroommc.modularui.screen.ModularPanel;
import com.cleanroommc.modularui.screen.ModularScreen;
import com.cleanroommc.modularui.screen.UISettings;
import com.cleanroommc.modularui.value.sync.PanelSyncManager;
import org.jetbrains.annotations.ApiStatus;

Expand All @@ -39,7 +40,7 @@ default GTGuiTheme getUITheme() {
}

@Override
default ModularPanel buildUI(HandGuiData guiData, PanelSyncManager guiSyncManager) {
default ModularPanel buildUI(HandGuiData guiData, PanelSyncManager guiSyncManager, UISettings settings) {
return null;
}
}
9 changes: 5 additions & 4 deletions src/main/java/gregtech/api/items/toolitem/IGTTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@
import com.cleanroommc.modularui.factory.HandGuiData;
import com.cleanroommc.modularui.factory.ItemGuiFactory;
import com.cleanroommc.modularui.screen.ModularPanel;
import com.cleanroommc.modularui.screen.UISettings;
import com.cleanroommc.modularui.utils.Alignment;
import com.cleanroommc.modularui.value.sync.IntSyncValue;
import com.cleanroommc.modularui.value.sync.PanelSyncManager;
import com.cleanroommc.modularui.widgets.ButtonWidget;
import com.cleanroommc.modularui.widgets.TextWidget;
import com.cleanroommc.modularui.widgets.layout.Flow;
import com.enderio.core.common.interfaces.IOverlayRenderAware;
import com.google.common.collect.HashMultimap;
Expand Down Expand Up @@ -947,7 +947,7 @@ default void playSound(EntityPlayer player) {
}

@Override
default ModularPanel buildUI(HandGuiData guiData, PanelSyncManager manager) {
default ModularPanel buildUI(HandGuiData guiData, PanelSyncManager manager, UISettings settings) {
final var usedStack = guiData.getUsedItemStack();
final var behaviorsTag = getBehaviorsTag(usedStack);
final var defaultDefinition = getMaxAoEDefinition(usedStack);
Expand Down Expand Up @@ -1006,14 +1006,15 @@ default Flow createColumn(IntSyncValue syncValue, String lang, boolean shouldDou

return Flow.column()
.coverChildren()
.child(new TextWidget(IKey.lang("item.gt.tool.aoe." + lang))
.child(IKey.lang("item.gt.tool.aoe." + lang)
.asWidget()
.marginBottom(5))
.child(Flow.row()
.coverChildren()
.marginBottom(5)
.child(increaseButton)
.child(decreaseButton))
.child(new TextWidget(display)
.child(display.asWidget()
.alignment(Alignment.Center)
.widthRel(1f));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@
import com.cleanroommc.modularui.api.drawable.IKey;
import com.cleanroommc.modularui.factory.HandGuiData;
import com.cleanroommc.modularui.screen.ModularPanel;
import com.cleanroommc.modularui.screen.UISettings;
import com.cleanroommc.modularui.value.sync.PanelSyncManager;
import com.cleanroommc.modularui.value.sync.SyncHandlers;
import com.cleanroommc.modularui.widgets.ItemSlot;
import com.cleanroommc.modularui.widgets.layout.Grid;
import com.cleanroommc.modularui.widgets.slot.ItemSlot;
import com.cleanroommc.modularui.widgets.slot.SlotGroup;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Multimap;
Expand Down Expand Up @@ -106,12 +107,12 @@ public ItemStack getToolInSlot(@NotNull ItemStack toolbelt, int slot) {
}

@Override
public ModularPanel buildUI(HandGuiData guiData, PanelSyncManager guiSyncManager) {
public ModularPanel buildUI(HandGuiData guiData, PanelSyncManager guiSyncManager, UISettings settings) {
final var usedStack = guiData.getUsedItemStack();
final var handler = getHandler(usedStack);
final var selected = handler.getSelectedStack();
if (!selected.isEmpty() && selected.getItem() instanceof ItemUIFactory factory) {
return factory.buildUI(guiData, guiSyncManager);
return factory.buildUI(guiData, guiSyncManager, settings);
}

int heightBonus = (handler.getSlots() / 9) * 18;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
import com.cleanroommc.modularui.factory.PosGuiData;
import com.cleanroommc.modularui.screen.ModularPanel;
import com.cleanroommc.modularui.screen.ModularScreen;
import com.cleanroommc.modularui.screen.UISettings;
import com.cleanroommc.modularui.value.sync.PanelSyncManager;
import com.google.common.base.Preconditions;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
Expand Down Expand Up @@ -493,7 +494,7 @@ public GTGuiTheme getUITheme() {
}

@Override
public ModularPanel buildUI(PosGuiData guiData, PanelSyncManager panelSyncManager) {
public ModularPanel buildUI(PosGuiData guiData, PanelSyncManager panelSyncManager, UISettings settings) {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

import com.cleanroommc.modularui.factory.PosGuiData;
import com.cleanroommc.modularui.screen.ModularPanel;
import com.cleanroommc.modularui.screen.UISettings;
import com.cleanroommc.modularui.value.sync.PanelSyncManager;
import org.jetbrains.annotations.NotNull;

Expand Down Expand Up @@ -394,7 +395,7 @@ protected MultiblockUIFactory createUIFactory() {
}

@Override
public final ModularPanel buildUI(PosGuiData guiData, PanelSyncManager panelSyncManager) {
public final ModularPanel buildUI(PosGuiData guiData, PanelSyncManager panelSyncManager, UISettings settings) {
if (uiFactory == null) uiFactory = createUIFactory();
return this.uiFactory.buildUI(guiData, panelSyncManager);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public MultiblockUIBuilder structureFormed(boolean structureFormed) {
}

public MultiblockUIBuilder title(String lang) {
addKey(KeyUtil.lang(TextFormatting.WHITE, lang));
addOperation(Operation.addLine(KeyUtil.lang(TextFormatting.WHITE, lang)).spaceLine(2));
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public MultiblockUIFactory addScreenChildren(ScreenFunction function) {
this.screenFunction.addWidgets(panel, panelSyncManager);
}

var playerInv = SlotGroupWidget.playerInventory(0);
var playerInv = SlotGroupWidget.playerInventory(false);
if (disableButtons) {
playerInv.alignX(0.5f);
} else {
Expand Down Expand Up @@ -360,7 +360,7 @@ protected Widget<?> createScreen(PanelSyncManager syncManager) {
.debugName("display_text")
.sizeRel(1f)
.alignment(Alignment.TopLeft)
.margin(4, 4)
.margin(4)
.autoUpdate(true)
.textBuilder(display::build));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ static Operation add(IDrawable drawable) {
}

static Operation addLineSpace(IDrawable drawable) {
return addLine(drawable).spaceLine(2);
return addLine(drawable).spaceLine(1);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ default float syncFloat(float initial) {
}

default BigInteger syncBigInt(BigInteger initial) {
return syncObject(initial, GTByteBufAdapters.BIG_INT);
return syncObject(initial, ByteBufAdapters.BIG_INT);
}

default <T> T syncObject(T initial, IByteBufSerializer<T> serializer, IByteBufDeserializer<T> deserializer) {
Expand Down
5 changes: 0 additions & 5 deletions src/main/java/gregtech/api/mui/GTByteBufAdapters.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import org.jetbrains.annotations.NotNull;

import java.io.IOException;
import java.math.BigInteger;
import java.util.Objects;

public class GTByteBufAdapters {
Expand All @@ -22,10 +21,6 @@ public class GTByteBufAdapters {
public static final IByteBufAdapter<ChancedFluidOutput> CHANCED_FLUID_OUTPUT = makeAdapter(
ChancedFluidOutput::fromBuffer, ChancedFluidOutput::toBuffer);

public static final IByteBufAdapter<BigInteger> BIG_INT = makeAdapter(
buffer -> new BigInteger(buffer.readByteArray()),
(buffer, value) -> buffer.writeByteArray(value.toByteArray()));

public static final IByteBufAdapter<Fluid> FLUID = makeAdapter(NetworkUtil::readFluid, NetworkUtil::writeFluid);

public static <T> IByteBufAdapter<T> makeAdapter(@NotNull IByteBufDeserializer<T> deserializer,
Expand Down
Loading
Loading