Skip to content

Commit 7a53dd9

Browse files
committed
clean + spotless
1 parent e8bc2c9 commit 7a53dd9

File tree

2 files changed

+6
-19
lines changed

2 files changed

+6
-19
lines changed

src/main/java/gregtech/api/metatileentity/SimpleMachineMetaTileEntity.java

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
package gregtech.api.metatileentity;
22

3-
import com.cleanroommc.modularui.widgets.SlotGroupWidget;
4-
5-
import com.cleanroommc.modularui.widgets.layout.Flow;
6-
73
import gregtech.api.GTValues;
84
import gregtech.api.capability.GregtechTileCapabilities;
95
import gregtech.api.capability.IActiveOutputSide;
@@ -64,7 +60,9 @@
6460
import com.cleanroommc.modularui.value.sync.SyncHandlers;
6561
import com.cleanroommc.modularui.widget.Widget;
6662
import com.cleanroommc.modularui.widgets.ItemSlot;
63+
import com.cleanroommc.modularui.widgets.SlotGroupWidget;
6764
import com.cleanroommc.modularui.widgets.ToggleButton;
65+
import com.cleanroommc.modularui.widgets.layout.Flow;
6866
import org.jetbrains.annotations.NotNull;
6967
import org.jetbrains.annotations.Nullable;
7068

@@ -530,28 +528,20 @@ public ModularPanel buildUI(PosGuiData guiData, PanelSyncManager guiSyncManager)
530528
col.child(new ItemSlot()
531529
.debugName("charger.slot")
532530
.slot(SyncHandlers.itemSlot(chargerInventory, 0))
533-
// .pos(79, 62 + yOffset)
534531
.background(GTGuiTextures.SLOT, GTGuiTextures.CHARGER_OVERLAY)
535532
.addTooltipLine(IKey.lang("gregtech.gui.charger_slot.tooltip",
536533
GTValues.VNF[getTier()], GTValues.VNF[getTier()])));
537534

538-
int leftButtonStartX = 7;
539-
540535
if (exportItems.getSlots() > 0) {
541536
col.child(new ToggleButton()
542-
// .pos(leftButtonStartX, 62 + yOffset)
543537
.overlay(GTGuiTextures.BUTTON_ITEM_OUTPUT)
544538
.value(new BooleanSyncValue(() -> autoOutputItems, val -> autoOutputItems = val))
545539
.addTooltip(true, IKey.lang("gregtech.gui.item_auto_output.tooltip.enabled"))
546540
.addTooltip(false, IKey.lang("gregtech.gui.item_auto_output.tooltip.disabled")));
547-
548-
leftButtonStartX += 18;
549541
}
550542

551543
if (exportFluids.getTanks() > 0) {
552-
553544
col.child(new ToggleButton()
554-
// .pos(leftButtonStartX, 62 + yOffset)
555545
.overlay(GTGuiTextures.BUTTON_FLUID_OUTPUT)
556546
.value(new BooleanSyncValue(() -> autoOutputFluids, val -> autoOutputFluids = val))
557547
.addTooltip(true, IKey.lang("gregtech.gui.fluid_auto_output.tooltip.enabled"))
@@ -561,14 +551,13 @@ public ModularPanel buildUI(PosGuiData guiData, PanelSyncManager guiSyncManager)
561551
if (exportItems.getSlots() + exportFluids.getTanks() <= 9) {
562552
col.child(new Widget<>()
563553
.size(17)
564-
.marginTop(1).marginRight(1)
554+
.marginTop(1)
555+
.marginRight(1)
565556
.bottom(0)
566-
// .pos(152, 63 + yOffset)
567557
.background(GTGuiTextures.getLogo(getUITheme())));
568558

569559
if (hasGhostCircuitInventory() && circuitInventory != null) {
570560
col.child(new GhostCircuitSlotWidget()
571-
// .pos(124, 62 + yOffset)
572561
.slot(SyncHandlers.itemSlot(circuitInventory, 0))
573562
.background(GTGuiTextures.SLOT, GTGuiTextures.INT_CIRCUIT_OVERLAY));
574563
}

src/main/java/gregtech/api/recipes/ui/RecipeMapUI.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,8 @@ public ModularPanel constructPanel(ModularPanel panel, DoubleSupplier progressSu
559559
.crossAxisAlignment(Alignment.CrossAxis.CENTER)
560560
.top(23 - 7);
561561

562+
// this isn't great but it works for now
563+
// panel size is hardcoded because you can't get the panel size from the panel
562564
int m = calculateCenter(importItems.getSlots(), importFluids.getTanks(), 176 + 20);
563565

564566
row.child(makeInventorySlotGroup(importItems, importFluids, false)
@@ -568,14 +570,10 @@ public ModularPanel constructPanel(ModularPanel panel, DoubleSupplier progressSu
568570
.debugName("recipe.progress")
569571
.size(20)
570572
.margin(4, 0)
571-
// .alignX(0.5f)
572-
// .top(23 + yOffset)
573573
.value(progressValue)
574574
.texture(progressTexture, 20)
575575
.direction(progressDirection));
576576
row.child(makeInventorySlotGroup(exportItems, exportFluids, true));
577-
// addInventorySlotGroup(panel, importItems, importFluids, false, yOffset);
578-
// addInventorySlotGroup(panel, exportItems, exportFluids, true, yOffset);
579577
panel.child(row);
580578
if (specialDrawableTexture != null) {
581579
panel.child(specialDrawableTexture.asWidget()

0 commit comments

Comments
 (0)