Skip to content

Commit

Permalink
pre rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Zorbatron committed Sep 19, 2024
1 parent 0f71bfa commit b795417
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import gregtech.api.metatileentity.interfaces.IGregTechTileEntity;
import gregtech.api.metatileentity.multiblock.IMultiblockAbilityPart;
import gregtech.api.metatileentity.multiblock.MultiblockAbility;
import gregtech.api.mui.GTGuiTextures;
import gregtech.api.mui.GTGuis;
import gregtech.client.renderer.texture.Textures;

import net.minecraft.client.resources.I18n;
Expand All @@ -35,6 +37,11 @@
import codechicken.lib.render.CCRenderState;
import codechicken.lib.render.pipeline.IVertexOperation;
import codechicken.lib.vec.Matrix4;
import com.cleanroommc.modularui.api.drawable.IKey;
import com.cleanroommc.modularui.factory.PosGuiData;
import com.cleanroommc.modularui.screen.ModularPanel;
import com.cleanroommc.modularui.value.sync.PanelSyncManager;
import com.cleanroommc.modularui.widgets.SlotGroupWidget;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

Expand Down Expand Up @@ -116,6 +123,28 @@ public void registerAbilities(List<IFluidTank> abilityList) {
abilityList.add(fluidTank);
}

@Override
public boolean usesMui2() {
return true;
}

@Override
public ModularPanel buildUI(PosGuiData guiData, PanelSyncManager guiSyncManager) {
guiSyncManager.registerSlotGroup("item_inv", 2);

// TODO: Change the position of the name when it's standardized.
return GTGuis.createPanel(this, 176, 166)
.child(IKey.lang(getMetaFullName()).asWidget().pos(5, 5))
.child(IKey.lang("gregtech.gui.fluid_amount").color(0xFFFFFF).asWidget().pos(11, 20))
.child(SlotGroupWidget.playerInventory().left(7).bottom(7))
.child(GTGuiTextures.DISPLAY.asWidget()
.left(7).top(16)
.size(81, 55))
.child(GTGuiTextures.TANK_ICON.asWidget()
.left(91).top(36)
.size(14, 15));
}

@Override
protected ModularUI createUI(EntityPlayer entityPlayer) {
return createTankUI(fluidTank, getMetaFullName(), entityPlayer).build(getHolder(), entityPlayer);
Expand Down

0 comments on commit b795417

Please sign in to comment.