From cd2ba914a6b5b980ff56347455fcf43a9e3eea3b Mon Sep 17 00:00:00 2001 From: miozune Date: Sat, 26 Nov 2022 01:56:28 +0900 Subject: Rewrite GUIs with ModularUI (#440) * Update GT * NEI migration & cleanup Deprecate GTPP_Recipe_Map_Internal#sMappingsEx and delegate to GT_Recipe_Map#sMappings instead Remove recipe modification check * Boiler * Programmed Circuit & Super Bus * Lower the number of fluid slots for multi mixer NEI * Solar Generator * Crop Manager * Bronze Workbench & Advanced Workbench * Turbine Housing & Rotor Assembly * Iron Plated Blast Furnace * Player Safe * Advanced Muffler Hatch * spotlessApply * Auto Workbench * Breaker, Control Core, RTG Hatch, Steam Bus, some cleanup * Fix crash when removing Breaker * Data Orb Repository * Charging/Discharging Bus * Pollution Scrubber * Storage Crate, Shelf, TieredChest They're just broken in the first place, don't blame me * cleanup * Steam Condenser It's broken in the first place, never blame me! * Catalyst Housing, Ball Housing * Fluid Tank, generators, custom hatches, cleanup * Computer Cube MKII Many things are broken in the first place, I swear * Inventory Manager * Migrate multiblock dehydrator recipemap to ModularUI * Overflow cover * Redstone Circuit Block * Multiblock * cleanup * Update GT --- .../util/debug/DEBUG_MULTIBLOCK_ShapeSpawner.java | 27 ++++++---------------- 1 file changed, 7 insertions(+), 20 deletions(-) (limited to 'src/main/java/gtPlusPlus/core/util') diff --git a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_MULTIBLOCK_ShapeSpawner.java b/src/main/java/gtPlusPlus/core/util/debug/DEBUG_MULTIBLOCK_ShapeSpawner.java index b4d2480a02..9cff0758a7 100644 --- a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_MULTIBLOCK_ShapeSpawner.java +++ b/src/main/java/gtPlusPlus/core/util/debug/DEBUG_MULTIBLOCK_ShapeSpawner.java @@ -7,8 +7,7 @@ import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; -import gregtech.api.gui.GT_Container_MultiMachine; -import gregtech.api.gui.GT_GUIContainer_MultiMachine; +import gregtech.api.gui.modularui.GT_UIInfos; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.items.GT_MetaGenerated_Tool; @@ -22,7 +21,6 @@ import gregtech.api.util.GT_Utility; import gregtech.common.items.GT_MetaGenerated_Tool_01; import java.util.ArrayList; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.fluids.FluidStack; @@ -183,26 +181,10 @@ public abstract class DEBUG_MULTIBLOCK_ShapeSpawner extends MetaTileEntity { @Override public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) { - return true; - } - aBaseMetaTileEntity.openGUI(aPlayer); + GT_UIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer); return true; } - @Override - public Object getServerGUI( - final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_Container_MultiMachine(aPlayerInventory, aBaseMetaTileEntity); - } - - @Override - public Object getClientGUI( - final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine( - aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MultiblockDisplay.png"); - } - @Override public byte getTileEntityBaseType() { return 2; @@ -982,4 +964,9 @@ public abstract class DEBUG_MULTIBLOCK_ShapeSpawner extends MetaTileEntity { final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { return false; } + + @Override + public boolean useModularUI() { + return true; + } } -- cgit