diff options
| author | miozune <miozune@gmail.com> | 2022-11-26 01:56:28 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-25 17:56:28 +0100 |
| commit | cd2ba914a6b5b980ff56347455fcf43a9e3eea3b (patch) | |
| tree | 9dfba22762592ee292edd9a6c2eb6e4c3d9c6e96 /src/main/java/gtPlusPlus/xmod/gregtech/api/gui | |
| parent | 921527ce3cc5f92b067f180295fa55dae718461f (diff) | |
| download | GT5-Unofficial-cd2ba914a6b5b980ff56347455fcf43a9e3eea3b.tar.gz GT5-Unofficial-cd2ba914a6b5b980ff56347455fcf43a9e3eea3b.tar.bz2 GT5-Unofficial-cd2ba914a6b5b980ff56347455fcf43a9e3eea3b.zip | |
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
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/api/gui')
71 files changed, 215 insertions, 6687 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_AdvancedBoiler.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_AdvancedBoiler.java deleted file mode 100644 index 005485cbde..0000000000 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_AdvancedBoiler.java +++ /dev/null @@ -1,102 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.gui.GT_ContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GT_MetaTileEntity_Boiler_Base; -import java.util.Iterator; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.Slot; - -public class CONTAINER_AdvancedBoiler extends GT_ContainerMetaTile_Machine { - public int mWaterAmount = 0; - public int mSteamAmount = 0; - public int mProcessingEnergy = 0; - public int mTemperature = 2; - - public CONTAINER_AdvancedBoiler(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } - - @Override - public void addSlots(InventoryPlayer aInventoryPlayer) { - addSlotToContainer(new Slot(this.mTileEntity, 2, 116, 62)); - addSlotToContainer(new Slot(this.mTileEntity, 0, 44, 26)); - addSlotToContainer(new Slot(this.mTileEntity, 1, 44, 62)); - addSlotToContainer(new Slot(this.mTileEntity, 3, 116, 26)); - } - - @Override - public int getSlotCount() { - return 4; - } - - @Override - public int getShiftClickSlotCount() { - return 1; - } - - @Override - public void detectAndSendChanges() { - super.detectAndSendChanges(); - if ((this.mTileEntity.isClientSide()) || (this.mTileEntity.getMetaTileEntity() == null)) { - return; - } - - int steamCapacity = ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).getSteamCapacity(); - int waterCapacity = ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).getCapacity(); - this.mTemperature = ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mTemperature; - this.mProcessingEnergy = - ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mProcessingEnergy; - this.mSteamAmount = (((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mSteam == null - ? 0 - : ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mSteam.amount); - this.mWaterAmount = (((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mFluid == null - ? 0 - : ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mFluid.amount); - - this.mTemperature = Math.min( - 54, - Math.max( - 0, - this.mTemperature - * 54 - / (((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()) - .maxProgresstime() - - 10))); - this.mSteamAmount = Math.min(54, Math.max(0, this.mSteamAmount * 54 / (steamCapacity - 100))); - this.mWaterAmount = Math.min(54, Math.max(0, this.mWaterAmount * 54 / (waterCapacity - 100))); - this.mProcessingEnergy = - Math.min(14, Math.max(this.mProcessingEnergy > 0 ? 1 : 0, this.mProcessingEnergy * 14 / 1000)); - - Iterator<?> var2 = this.crafters.iterator(); - while (var2.hasNext()) { - ICrafting var1 = (ICrafting) var2.next(); - var1.sendProgressBarUpdate(this, 100, this.mTemperature); - var1.sendProgressBarUpdate(this, 101, this.mProcessingEnergy); - var1.sendProgressBarUpdate(this, 102, this.mSteamAmount); - var1.sendProgressBarUpdate(this, 103, this.mWaterAmount); - } - } - - @Override - @SideOnly(Side.CLIENT) - public void updateProgressBar(int par1, int par2) { - super.updateProgressBar(par1, par2); - switch (par1) { - case 100: - this.mTemperature = par2; - break; - case 101: - this.mProcessingEnergy = par2; - break; - case 102: - this.mSteamAmount = par2; - break; - case 103: - this.mWaterAmount = par2; - } - } -} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Cyclotron.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Cyclotron.java deleted file mode 100644 index f11a943e44..0000000000 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Cyclotron.java +++ /dev/null @@ -1,40 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import gregtech.api.gui.GT_ContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.entity.player.InventoryPlayer; - -/** - * NEVER INCLUDE THIS FILE IN YOUR MOD!!! - * <p/> - * The Container I use for all my Basic Machines - */ -public class CONTAINER_Cyclotron extends GT_ContainerMetaTile_Machine { - - public CONTAINER_Cyclotron(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { - - super(aInventoryPlayer, aTileEntity); - } - - public CONTAINER_Cyclotron( - final InventoryPlayer aInventoryPlayer, - final IGregTechTileEntity aTileEntity, - final boolean bindInventory) { - super(aInventoryPlayer, aTileEntity, bindInventory); - } - - @Override - public void addSlots(final InventoryPlayer aInventoryPlayer) { - // this.addSlotToContainer(new Slot(this.mTileEntity, 1, 154, 42)); - } - - @Override - public int getSlotCount() { - return 0; - } - - @Override - public int getShiftClickSlotCount() { - return 0; - } -} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DataHatch.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DataHatch.java deleted file mode 100644 index 0951c231d5..0000000000 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DataHatch.java +++ /dev/null @@ -1,76 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import gregtech.api.enums.ItemList; -import gregtech.api.gui.GT_ContainerMetaTile_Machine; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gtPlusPlus.core.slots.SlotIntegratedCircuit; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class CONTAINER_DataHatch extends GT_ContainerMetaTile_Machine { - - public CONTAINER_DataHatch(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } - - @Override - public void addSlots(InventoryPlayer aInventoryPlayer) { - addSlotToContainer(new GT_Slot_DataOrb(mTileEntity, 0, 53, 8)); - addSlotToContainer(new GT_Slot_DataOrb(mTileEntity, 1, 71, 8)); - addSlotToContainer(new GT_Slot_DataOrb(mTileEntity, 2, 89, 8)); - addSlotToContainer(new GT_Slot_DataOrb(mTileEntity, 3, 107, 8)); - addSlotToContainer(new GT_Slot_DataOrb(mTileEntity, 4, 53, 26)); - addSlotToContainer(new GT_Slot_DataOrb(mTileEntity, 5, 71, 26)); - addSlotToContainer(new GT_Slot_DataOrb(mTileEntity, 6, 89, 26)); - addSlotToContainer(new GT_Slot_DataOrb(mTileEntity, 7, 107, 26)); - addSlotToContainer(new GT_Slot_DataOrb(mTileEntity, 8, 53, 44)); - addSlotToContainer(new GT_Slot_DataOrb(mTileEntity, 9, 71, 44)); - addSlotToContainer(new GT_Slot_DataOrb(mTileEntity, 10, 89, 44)); - addSlotToContainer(new GT_Slot_DataOrb(mTileEntity, 11, 107, 44)); - addSlotToContainer(new GT_Slot_DataOrb(mTileEntity, 12, 53, 62)); - addSlotToContainer(new GT_Slot_DataOrb(mTileEntity, 13, 71, 62)); - addSlotToContainer(new GT_Slot_DataOrb(mTileEntity, 14, 89, 62)); - addSlotToContainer(new GT_Slot_DataOrb(mTileEntity, 15, 107, 62)); - addSlotToContainer(new SlotIntegratedCircuit(mTileEntity, 16, 19, 35)); - } - - @Override - public int getSlotCount() { - return 17; - } - - @Override - public int getShiftClickSlotCount() { - return 0; - } - - @Override - public void putStackInSlot(int par1, ItemStack par2ItemStack) { - /*Logger.INFO("Slot: "+par1); - if (par1 < 16 && ItemList.Tool_DataOrb.isStackEqual(par2ItemStack)) { - super.putStackInSlot(par1, par2ItemStack); - } - if (par1 == 16 && ItemUtils.isControlCircuit(par2ItemStack)) { - super.putStackInSlot(par1, par2ItemStack); - }*/ - super.putStackInSlot(par1, par2ItemStack); - } - - @Override - public boolean canDragIntoSlot(Slot par1Slot) { - return super.canDragIntoSlot(par1Slot); - } - - public class GT_Slot_DataOrb extends Slot { - public GT_Slot_DataOrb(IInventory par1iInventory, int par2, int par3, int par4) { - super(par1iInventory, par2, par3, par4); - } - - @Override - public boolean isItemValid(ItemStack aStack) { - return ItemList.Tool_DataOrb.isStackEqual(aStack, false, true); - } - } -} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DeluxeTank.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DeluxeTank.java deleted file mode 100644 index e0698f9d24..0000000000 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DeluxeTank.java +++ /dev/null @@ -1,76 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.gui; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.gui.GT_Container_BasicTank; -import gregtech.api.gui.GT_Slot_Output; -import gregtech.api.gui.GT_Slot_Render; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_DeluxeTank; -import java.util.Iterator; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.Slot; - -/** - * NEVER INCLUDE THIS FILE IN YOUR MOD!!! - * <p/> - * The Container I use for all my Basic Tanks - */ -public class CONTAINER_DeluxeTank extends GT_Container_BasicTank { - - public CONTAINER_DeluxeTank(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } - - @Override - public void addSlots(final InventoryPlayer aInventoryPlayer) { - this.addSlotToContainer(new Slot(this.mTileEntity, 0, 80, 17)); - this.addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 1, 80, 53)); - this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, 2, 41, 42)); - this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, 3, 59, 42)); - } - - @Override - public void detectAndSendChanges() { - super.detectAndSendChanges(); - if (this.mTileEntity.isClientSide() || (this.mTileEntity.getMetaTileEntity() == null)) { - return; - } - if (((GT_MetaTileEntity_DeluxeTank) this.mTileEntity.getMetaTileEntity()).mFluid != null) { |
