aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/gregtech/api/gui
diff options
context:
space:
mode:
authormiozune <miozune@gmail.com>2022-11-26 01:56:28 +0900
committerGitHub <noreply@github.com>2022-11-25 17:56:28 +0100
commitcd2ba914a6b5b980ff56347455fcf43a9e3eea3b (patch)
tree9dfba22762592ee292edd9a6c2eb6e4c3d9c6e96 /src/main/java/gtPlusPlus/xmod/gregtech/api/gui
parent921527ce3cc5f92b067f180295fa55dae718461f (diff)
downloadGT5-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')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_AdvancedBoiler.java102
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Cyclotron.java40
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DataHatch.java76
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DeluxeTank.java76
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java53
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IndustrialCentrifuge.java42
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IronBlastFurnace.java31
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MatterFab.java104
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MetaTileMachineLong.java256
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine.java286
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine_NoPlayerInventory.java31
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_PowerSubStation.java85
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SafeBlock.java118
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SolarGenerator.java90
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SteamCondenser.java100
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java75
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_TreeFarmer.java72
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GTPP_UITextures.java150
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_AdvancedBoiler.java42
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Cyclotron.java49
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_DataHatch.java41
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_DeluxeTank.java39
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java51
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IndustrialCentrifuge.java74
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IronBlastFurnace.java44
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MatterFab.java95
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MultiMachine.java358
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MultiMachine_Default.java72
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Multi_Basic_Slotted.java92
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_PowerSubStation.java134
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SafeBlock.java46
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SolarGenerator.java43
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SteamCondenser.java52
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SuperChest.java37
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_TreeFarmer.java48
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/SyncedLong.java59
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/SyncedValueManager.java42
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_Container_ElectricAutoWorkbench.java137
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_Container_ElectricInventoryManager.java316
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_GUIContainer_ElectricAutoWorkbench.java66
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_GUIContainer_ElectricInventoryManager.java202
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/CONTAINER_PollutionCleaner.java100
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GT_Container_CropHarvestor.java179
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GT_GUIContainer_CropHarvestor.java77
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GUI_PollutionCleaner.java76
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_ComputerCube.java407
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_RedstoneCircuitBlock.java175
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_ComputerCube.java225
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_RedstoneCircuitBlock.java136
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/Container_FluidReactor.java174
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/GUI_FluidReactor.java135
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_1by1_Turbine.java60
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_2by2.java31
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_4by4.java43
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_HatchNbtConsumable.java298
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_1by1_Turbine.java36
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_2by2.java44
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_4by4.java44
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_HatchNbtConsumable.java55
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_2by2.java21
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_4by4.java33
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_2by2.java23
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_4by4.java23
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/power/CONTAINER_BasicTank.java66
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/power/GUI_BasicTank.java34
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/widget/DataStickSlotWidget.java28
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/widget/ElectricSlotWidget.java37
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_AdvancedWorkbench.java158
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_BronzeWorkbench.java153
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_AdvancedWorkbench.java89
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_BronzeWorkbench.java16
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) {
- this.mContent = ((GT_MetaTileEntity_DeluxeTank) this.mTileEntity.getMetaTileEntity()).mFluid.amount;
- } else {
- this.mContent = 0;
- }
- final Iterator var2 = this.crafters.iterator();
- while (var2.hasNext()) {
- final ICrafting var1 = (ICrafting) var2.next();
- var1.sendProgressBarUpdate(this, 100, this.mContent & 65535);
- var1.sendProgressBarUpdate(this, 101, this.mContent >>> 16);
- }
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void updateProgressBar(final int par1, final int par2) {
- super.updateProgressBar(par1, par2);
- switch (par1) {
- case 100:
- this.mContent = (this.mContent & -65536) | par2;
- break;
- case 101:
- this.mContent = (this.mContent & 65535) | (par2 << 16);
- break;
- }
- }
-
- @Override
- public int getSlotCount() {
- return 2;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 1;
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java
deleted file mode 100644
index 9031003349..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui;
-
-import gregtech.api.gui.GT_ContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.core.slots.SlotAirFilter;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class CONTAINER_Hatch_Muffler_Advanced extends GT_ContainerMetaTile_Machine {
-
- public long maxEU = 0;
- public long storedEU = 0;
-
- public CONTAINER_Hatch_Muffler_Advanced(
- final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public CONTAINER_Hatch_Muffler_Advanced(
- final InventoryPlayer aInventoryPlayer,
- final IGregTechTileEntity aTileEntity,
- final boolean bindInventory) {
- super(aInventoryPlayer, aTileEntity, bindInventory);
- }
-
- @Override
- public void addSlots(final InventoryPlayer aInventoryPlayer) {
- this.addSlotToContainer(new SlotAirFilter(this.mTileEntity, 0, 80, 35));
- }
-
- @Override
- public int getSlotCount() {
- return 1;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 1;
- }
-
- @Override
- public void updateProgressBar(final int id, final int value) {
- super.updateProgressBar(id, value);
- switch (id) {
- default:
- break;
- }
- }
-
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IndustrialCentrifuge.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IndustrialCentrifuge.java
deleted file mode 100644
index a24288e877..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IndustrialCentrifuge.java
+++ /dev/null
@@ -1,42 +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;
-import net.minecraft.inventory.Slot;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- * <p/>
- * The Container I use for all my Basic Machines
- */
-public class CONTAINER_IndustrialCentrifuge extends GT_ContainerMetaTile_Machine {
-
- public CONTAINER_IndustrialCentrifuge(
- final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) {
-
- super(aInventoryPlayer, aTileEntity);
- }
-
- public CONTAINER_IndustrialCentrifuge(
- 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 1;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 1;
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IronBlastFurnace.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IronBlastFurnace.java
deleted file mode 100644
index 483a1abc16..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IronBlastFurnace.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui;
-
-import gregtech.api.gui.GT_ContainerMetaTile_Machine;
-import gregtech.api.gui.GT_Slot_Output;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-
-public class CONTAINER_IronBlastFurnace extends GT_ContainerMetaTile_Machine {
- public CONTAINER_IronBlastFurnace(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- @Override
- public void addSlots(final InventoryPlayer aInventoryPlayer) {
- this.addSlotToContainer(new Slot(this.mTileEntity, 0, 34, 16));
- this.addSlotToContainer(new Slot(this.mTileEntity, 1, 34, 34));
- this.addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 2, 86, 25));
- this.addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 3, 104, 25));
- }
-
- @Override
- public int getSlotCount() {
- return 4;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 2;
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MatterFab.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MatterFab.java
deleted file mode 100644
index 43996e25c8..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MatterFab.java
+++ /dev/null
@@ -1,104 +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.machines.multi.production.GregtechMetaTileEntity_MassFabricator;
-import java.util.Iterator;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.ICrafting;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- * <p/>
- * The Container I use for all my Basic Machines
- */
-public class CONTAINER_MatterFab extends GT_ContainerMetaTile_Machine {
-
- public int mMatterProduced = 0;
- public int mScrapProduced = 0;
- public int mAmplifierProduced = 0;
- public int mScrapUsed = 0;
- public int mAmplifierUsed = 0;
-
- public CONTAINER_MatterFab(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public CONTAINER_MatterFab(
- final InventoryPlayer aInventoryPlayer,
- final IGregTechTileEntity aTileEntity,
- final boolean bindInventory) {
- super(aInventoryPlayer, aTileEntity, bindInventory);
- }
-
- @Override
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- // addSlotToContainer(new SlotNoInput(mTileEntity, 1, 152, 5));
- }
-
- @Override
- public int getSlotCount() {
- return 0;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 0;
- }
-
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) {
- return;
- }
- GregtechMetaTileEntity_MassFabricator aTile =
- ((GregtechMetaTileEntity_MassFabricator) this.mTileEntity.getMetaTileEntity());
-
- mAmplifierProduced = aTile.mAmplifierProduced;
- mAmplifierUsed = aTile.mAmplifierUsed;
- mMatterProduced = aTile.mMatterProduced;
- mScrapProduced = aTile.mScrapProduced;
- mScrapUsed = aTile.mScrapUsed;
-
- Iterator var2 = this.crafters.iterator();
- while (var2.hasNext()) {
- ICrafting var1 = (ICrafting) var2.next();
- var1.sendProgressBarUpdate(this, 201, mAmplifierProduced);
- var1.sendProgressBarUpdate(this, 202, mAmplifierUsed);
- var1.sendProgressBarUpdate(this, 203, mMatterProduced);
- var1.sendProgressBarUpdate(this, 204, mScrapProduced);
- var1.sendProgressBarUpdate(this, 205, mScrapUsed);
- }
- }
-
- @Override
- public void addCraftingToCrafters(ICrafting par1ICrafting) {
- super.addCraftingToCrafters(par1ICrafting);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void updateProgressBar(int par1, int par2) {
- super.updateProgressBar(par1, par2);
- switch (par1) {
- case 201:
- mAmplifierProduced = (par2);
- break;
- case 202:
- mAmplifierUsed = (par2);
- break;
- case 203:
- mMatterProduced = (par2);
- break;
- case 204:
- mScrapProduced = (par2);
- break;
- case 205:
- mScrapUsed = (par2);
- break;
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MetaTileMachineLong.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MetaTileMachineLong.java
deleted file mode 100644
index 456d501fdc..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MetaTileMachineLong.java
+++ /dev/null
@@ -1,256 +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;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_LanguageManager;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.api.objects.data.Pair;
-import java.util.Iterator;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.ICrafting;
-
-public class CONTAINER_MetaTileMachineLong extends GT_Container {
-
- public int mActive = 0,
- mMaxProgressTime = 0,
- mProgressTime = 0,
- mSteam = 0,
- mSteamStorage = 0,
- mOutput = 0,
- mInput = 0,
- mID = 0,
- mDisplayErrorCode = 0;
- private int oActive = 0,
- oMaxProgressTime = 0,
- oProgressTime = 0,
- oSteam = 0,
- oSteamStorage = 0,
- oOutput = 0,
- oInput = 0,
- oID = 0,
- oDisplayErrorCode = 0,
- mTimer = 0;
- public long pEnergy, pStorage;
- private long nEnergy, nStorage;
- public short pIntMaxCountCurrent, pIntMaxCountMax;
- private short nIntMaxCountCurrent, nIntMaxCountMax;
-
- public CONTAINER_MetaTileMachineLong(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
-
- mTileEntity = aTileEntity;
-
- if (mTileEntity != null && mTileEntity.getMetaTileEntity() != null) {
- addSlots(aInventoryPlayer);
- if (doesBindPlayerInventory()) bindPlayerInventory(aInventoryPlayer);
- detectAndSendChanges();
- } else {
- aInventoryPlayer.player.openContainer = aInventoryPlayer.player.inventoryContainer;
- }
- }
-
- public CONTAINER_MetaTileMachineLong(
- InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, boolean doesBindInventory) {
- super(aInventoryPlayer, aTileEntity);
- mTileEntity = aTileEntity;
-
- if (mTileEntity != null && mTileEntity.getMetaTileEntity() != null) {
- addSlots(aInventoryPlayer);
- if (doesBindPlayerInventory() && doesBindInventory) bindPlayerInventory(aInventoryPlayer);
- detectAndSendChanges();
- } else {
- aInventoryPlayer.player.openContainer = aInventoryPlayer.player.inventoryContainer;
- }
- }
-
- private Pair<Integer, Integer> getPowerStored() {
- final long mStoredPower = this.pEnergy;
- long mMaxInts = (mStoredPower / Integer.MAX_VALUE);
- long mLeftOver = (mStoredPower % Integer.MAX_VALUE);
- if (mMaxInts < 0 || mMaxInts >= /*4294967298L*/ Integer.MAX_VALUE) {
- return new Pair<Integer, Integer>(-1, 0);
- }
- if (mLeftOver < 0 || mLeftOver > Integer.MAX_VALUE) {
- mLeftOver = 0;
- }
- Pair<Integer, Integer> power = new Pair<Integer, Integer>((int) mMaxInts, (int) mLeftOver);
- return power;
- }
-
- private Pair<Integer, Integer> getMaxPowerStored() {
- final long mMaxStoredPower = this.pStorage;
- long mMaxInts = (mMaxStoredPower / Integer.MAX_VALUE);
- long mLeftOver = (mMaxStoredPower % Integer.MAX_VALUE);
- if (mMaxInts < 0 || mMaxInts >= /*4294967298L*/ Integer.MAX_VALUE) {
- return new Pair<Integer, Integer>(-1, 0);
- }
- if (mLeftOver < 0 || mLeftOver > Integer.MAX_VALUE) {
- mLeftOver = 0;
- }
- Pair<Integer, Integer> power = new Pair<Integer, Integer>((int) mMaxInts, (int) mLeftOver);
- return power;
- }
-
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) return;
- pStorage = Math.min(Long.MAX_VALUE, mTileEntity.getEUCapacity());
- pEnergy = Math.min(Long.MAX_VALUE, mTileEntity.getStoredEU());
- mSteamStorage = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getSteamCapacity());
- mSteam = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getStoredSteam());
- mOutput = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getOutputVoltage());
- mInput = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getInputVoltage());
- mDisplayErrorCode = mTileEntity.getErrorDisplayID();
- mProgressTime = mTileEntity.getProgress();
- mMaxProgressTime = mTileEntity.getMaxProgress();
- mActive = mTileEntity.isActive() ? 1 : 0;
- mTimer++;
-
- Pair<Integer, Integer> powerPacket = getPowerStored();
- Pair<Integer, Integer> maxPowerPacket = getMaxPowerStored();
-
- int mPacketsToSend = powerPacket.getKey();
- int mLeftOverPowerStored = powerPacket.getValue();
-
- int mMaxStorageA = maxPowerPacket.getKey();
- int mMaxStorageB = maxPowerPacket.getValue();
-
- // Someone has a VERY FULL power supply.
- if (mPacketsToSend == -1) {
- Logger.INFO("TOO MUCH MATH - USE BIGINTEGER - GAME BREAKING BUG MAY OCCUR");
- return;
- }
-
- Iterator var2 = this.crafters.iterator();
- while (var2.hasNext()) {
- ICrafting var1 = (ICrafting) var2.next();
- if (mTimer % 500 == 10 || nEnergy != pEnergy) {
- var1.sendProgressBarUpdate(this, 0, mLeftOverPowerStored & 65535);
- var1.sendProgressBarUpdate(this, 1, mLeftOverPowerStored >>> 16);
- var1.sendProgressBarUpdate(this, 7730, mPacketsToSend);
- }
- if (mTimer % 500 == 10 || nStorage != pStorage) {
- var1.sendProgressBarUpdate(this, 2, mMaxStorageB & 65535);
- var1.sendProgressBarUpdate(this, 3, mMaxStorageB >>> 16);
- var1.sendProgressBarUpdate(this, 7731, mMaxStorageA);
- }
- if (mTimer % 500 == 10 || oOutput != mOutput) {
- var1.sendProgressBarUpdate(this, 4, mOutput);
- }
- if (mTimer % 500 == 10 || oInput != mInput) {
- var1.sendProgressBarUpdate(this, 5, mInput);
- }
- if (mTimer % 500 == 10 || oDisplayErrorCode != mDisplayErrorCode) {
- var1.sendProgressBarUpdate(this, 6, mDisplayErrorCode);
- }
- if (mTimer % 500 == 10 || oProgressTime != mProgressTime) {
- var1.sendProgressBarUpdate(this, 11, mProgressTime & 65535);
- var1.sendProgressBarUpdate(this, 12, mProgressTime >>> 16);
- }
- if (mTimer % 500 == 10 || oMaxProgressTime != mMaxProgressTime) {
- var1.sendProgressBarUpdate(this, 13, mMaxProgressTime & 65535);
- var1.sendProgressBarUpdate(this, 14, mMaxProgressTime >>> 16);
- }
- if (mTimer % 500 == 10 || oID != mID) {
- var1.sendProgressBarUpdate(this, 15, mID);
- }
- if (mTimer % 500 == 10 || oActive != mActive) {
- var1.sendProgressBarUpdate(this, 16, mActive);
- }
- if (mTimer % 500 == 10 || oSteam != mSteam) {
- var1.sendProgressBarUpdate(this, 17, mSteam & 65535);
- var1.sendProgressBarUpdate(this, 18, mSteam >>> 16);
- }
- if (mTimer % 500 == 10 || oSteamStorage != mSteamStorage) {
- var1.sendProgressBarUpdate(this, 19, mSteamStorage & 65535);
- var1.sendProgressBarUpdate(this, 20, mSteamStorage >>> 16);
- }
- }
-
- oID = mID;
- oSteam = mSteam;
- oInput = mInput;
- oActive = mActive;
- oOutput = mOutput;
- nEnergy = pEnergy;
- nStorage = pStorage;
- oSteamStorage = mSteamStorage;
- oProgressTime = mProgressTime;
- oMaxProgressTime = mMaxProgressTime;
- oDisplayErrorCode = mDisplayErrorCode;
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public void updateProgressBar(int par1, int par2) {
- super.updateProgressBar(par1, par2);
- switch (par1) {
- /*case 7730:
- pIntMaxCountCurrent = par2;*/
- case 0:
- pEnergy = pEnergy & -65536 | par2;
- break;
- case 1:
- pEnergy = pEnergy & 65535 | par2 << 16;
- break;
- case 2:
- pStorage = pStorage & -65536 | par2;
- break;
- case 3:
- pStorage = pStorage & 65535 | par2 << 16;
- break;
- case 4:
- mOutput = par2;
- break;
- case 5:
- mInput = par2;
- break;
- case 6:
- mDisplayErrorCode = par2;
- break;
- case 11:
- mProgressTime = mProgressTime & -65536 | par2;
- break;
- case 12:
- mProgressTime = mProgressTime & 65535 | par2 << 16;
- break;
- case 13:
- mMaxProgressTime = mMaxProgressTime & -65536 | par2;
- break;
- case 14:
- mMaxProgressTime = mMaxProgressTime & 65535 | par2 << 16;
- break;
- case 15:
- mID = par2;
- break;
- case 16:
- mActive = par2;
- break;
- case 17:
- mSteam = mSteam & -65536 | par2;
- break;
- case 18:
- mSteam = mSteam & 65535 | par2 << 16;
- break;
- case 19:
- mSteamStorage = mSteamStorage & -65536 | par2;
- break;
- case 20:
- mSteamStorage = mSteamStorage & 65535 | par2 << 16;
- break;
- }
- }
-
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return mTileEntity.isUseableByPlayer(player);
- }
-
- public String trans(String aKey, String aEnglish) {
- return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false);
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine.java
deleted file mode 100644
index fd4aff592e..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine.java
+++ /dev/null
@@ -1,286 +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.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_Recipe;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.util.math.MathUtils;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
-import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
-import java.lang.reflect.Field;
-import java.util.ArrayList;
-import java.util.List;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Container;
-import net.minecraft.inventory.ICrafting;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- * <p/>
- * The Container I use for all my Basic Machines
- */
-public class CONTAINER_MultiMachine extends GT_ContainerMetaTile_Machine {
-
- public String[] mTileDescription;
- private String[] oTileDescription;
-
- private GregtechMeta_MultiBlockBase mMCTEI;
- private boolean mControllerSet = false;
-
- public CONTAINER_MultiMachine(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public CONTAINER_MultiMachine(
- final InventoryPlayer aInventoryPlayer,
- final IGregTechTileEntity aTileEntity,
- final boolean bindInventory) {
- super(aInventoryPlayer, aTileEntity, bindInventory);
- }
-
- public static void setControllerInstance(CONTAINER_MultiMachine aContainer, IGregTechTileEntity aTile) {
- if (aTile == null) {
- return;
- }
- final IMetaTileEntity aMetaTileEntity = aTile.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- return;
- }
- if (aMetaTileEntity instanceof GregtechMeta_MultiBlockBase) {
- aContainer.mMCTEI = (GregtechMeta_MultiBlockBase) aMetaTileEntity;
- }
- }
-
- public int aTotalTickTime = 0;
- public int aMaxParallel = 0;
- public int aPollutionTick = 0;
- public int aMaxInputVoltage = 0;
- public int aInputTier = 0;
- public int aOutputTier = 0;
- public int aRecipeDuration = 0;
- public int aRecipeEU = 0;
- public int aRecipeSpecial = 0;
- public int aPollutionReduction = 0;
- public int aStoredEnergy = 0;
- public int aMaxEnergy = 0;
- public int aEfficiency = 0;
-
- private int oTotalTickTime = 0;
- private int oMaxParallel = 0;
- private int oPollutionTick = 0;
- private int oMaxInputVoltage = 0;
- private int oInputTier = 0;
- private int oOutputTier = 0;
- private int oRecipeDuration = 0;
- private int oRecipeEU = 0;
- private int oRecipeSpecial = 0;
- private int oPollutionReduction = 0;
- private int oStoredEnergy = 0;
- private int oMaxEnergy = 0;
- private int oEfficiency = 0;
-
- private static Field timer;
- // private static Field crafters;
-
- @Override
- public final void detectAndSendChanges() {
- super.detectAndSendChanges();
- if (this.mTileEntity.isClientSide() || this.mTileEntity.getMetaTileEntity() == null) {
- return;
- }
- if (!mControllerSet) {
- setControllerInstance(this, this.mTileEntity);
- }
- mControllerSet = (mMCTEI != null);
- if (timer == null) {
- timer = ReflectionUtils.getField(getClass(), "mTimer");
- }
- if (crafters == null) {
- // crafters = ReflectionUtils.getField(getClass(), "crafters");
- }
- if (timer != null && crafters != null && mControllerSet) {
- // Logger.INFO("Trying to update clientside GUI data");
- try {
- // Logger.INFO("0");
- int aTimer = (int) ReflectionUtils.getFieldValue(timer, this);
-
- // List crafters1List = (List) crafters1;
- List<ICrafting> crafters2 = new ArrayList<ICrafting>();
- // Logger.INFO("1");
- for (Object o : crafters) {
- if (o instanceof ICrafting) {
- crafters2.add((ICrafting) o);
- }
- }
- // Logger.INFO("2");
- if (!crafters2.isEmpty()) {
- // Logger.INFO("3");
- handleInitialFieldSetting();
-
- try {
- // Logger.INFO("4");
- for (final ICrafting var3 : crafters2) {
- handleCraftingEvent(aTimer, var3);
- }
- // Logger.INFO("5");
- handleInternalFieldSetting();
- // Logger.INFO("6");
- } catch (Throwable t) {
-
- }
- }
- } catch (Throwable t) {
- t.printStackTrace();
- }
- } else {
- Logger.INFO("Failed.");
- }
- }
-
- public void handleInitialFieldSetting() {
- this.aTotalTickTime =
- MathUtils.balance((int) mMCTEI.getTotalRuntimeInTicks(), Integer.MIN_VALUE, Integer.MAX_VALUE);
- this.aMaxParallel = mMCTEI.getMaxParallelRecipes();
- this.aPollutionTick = mMCTEI.getPollutionPerTick(null);
- this.aMaxInputVoltage =
- MathUtils.balance((int) mMCTEI.getMaxInputVoltage(), Integer.MIN_VALUE, Integer.MAX_VALUE);
- this.aInputTier = MathUtils.balance((int) mMCTEI.getInputTier(), Integer.MIN_VALUE, Integer.MAX_VALUE);
- this.aOutputTier = MathUtils.balance((int) mMCTEI.getOutputTier(), Integer.MIN_VALUE, Integer.MAX_VALUE);
- if (mMCTEI.mLastRecipe != null) {
- GT_Recipe aRecipe = mMCTEI.mLastRecipe;
- this.aRecipeDuration = MathUtils.balance(aRecipe.mDuration, Integer.MIN_VALUE, Integer.MAX_VALUE);
- this.aRecipeEU = MathUtils.balance(aRecipe.mEUt, Integer.MIN_VALUE, Integer.MAX_VALUE);
- this.aRecipeSpecial = MathUtils.balance(aRecipe.mSpecialValue, Integer.MIN_VALUE, Integer.MAX_VALUE);
- }
- this.aPollutionReduction = mMCTEI.getPollutionReductionForAllMufflers();
-
- this.aStoredEnergy = MathUtils.balance(
- (int) mMCTEI.getStoredEnergyInAllEnergyHatches(), Integer.MIN_VALUE, Integer.MAX_VALUE);
- this.aMaxEnergy = MathUtils.balance(
- (int) mMCTEI.getMaxEnergyStorageOfAllEnergyHatches(), Integer.MIN_VALUE, Integer.MAX_VALUE);
- this.aEfficiency = MathUtils.balance(mMCTEI.mEfficiency, Integer.MIN_VALUE, Integer.MAX_VALUE);
- }
-
- public void handleCraftingEvent(int aTimer, ICrafting aCrafter) {
- int aID = 750;
- if (aTimer % 500 == 10 || this.oTotalTickTime != this.aTotalTickTime) {
- aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aTotalTickTime);
- }
- if (aTimer % 500 == 10 || this.oMaxParallel != this.aMaxParallel) {
- aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aMaxParallel);
- }
- if (aTimer % 500 == 10 || this.oPollutionTick != this.aPollutionTick) {
- aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aPollutionTick);
- }
- if (aTimer % 500 == 10 || this.oMaxInputVoltage != this.aMaxInputVoltage) {
- aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aMaxInputVoltage);
- }
- if (aTimer % 500 == 10 || this.oInputTier != this.aInputTier) {
- aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aInputTier);
- }
- if (aTimer % 500 == 10 || this.oOutputTier != this.aOutputTier) {
- aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aOutputTier);
- }
- if (aTimer % 500 == 10 || this.oRecipeDuration != this.aRecipeDuration) {
- aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aRecipeDuration);
- }
- if (aTimer % 500 == 10 || this.oRecipeEU != this.aRecipeEU) {
- aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aRecipeEU);
- }
- if (aTimer % 500 == 10 || this.oRecipeSpecial != this.aRecipeSpecial) {
- aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aRecipeSpecial);
- }
- if (aTimer % 500 == 10 || this.oPollutionReduction != this.aPollutionReduction) {
- aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aPollutionReduction);
- }
- if (aTimer % 500 == 10 || this.oStoredEnergy != this.aStoredEnergy) {
- aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aStoredEnergy);
- }
- if (aTimer % 500 == 10 || this.oMaxEnergy != this.aMaxEnergy) {
- aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aMaxEnergy);
- }
- if (aTimer % 500 == 10 || this.oEfficiency != this.aEfficiency) {
- aCrafter.sendProgressBarUpdate((Container) this, aID++, this.aEfficiency);
- }
- }
-
- public void handleInternalFieldSetting() {
- this.oTotalTickTime = this.aTotalTickTime;
- this.oMaxParallel = this.aMaxParallel;
- this.oPollutionTick = this.aPollutionTick;
- this.oMaxInputVoltage = this.aMaxInputVoltage;
- this.oInputTier = this.aInputTier;
- this.oOutputTier = this.aOutputTier;
- this.oRecipeDuration = this.aRecipeDuration;
- this.oRecipeEU = this.aRecipeEU;
- this.oRecipeSpecial = this.aRecipeSpecial;
- this.oPollutionReduction = this.aPollutionReduction;
- this.oStoredEnergy = this.aStoredEnergy;
- this.oMaxEnergy = this.aMaxEnergy;
- this.oEfficiency = this.aEfficiency;
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public void updateProgressBar(final int par1, final int par2) {
- super.updateProgressBar(par1, par2);
- int shiftedSwitch = par1 - 750;
- switch (shiftedSwitch) {
- case 0: {
- this.aTotalTickTime = par2;
- break;
- }
- case 1: {
- this.aMaxParallel = par2;
- break;
- }
- case 2: {
- this.aPollutionTick = par2;
- break;
- }
- case 3: {
- this.aMaxInputVoltage = par2;
- break;
- }
- case 4: {
- this.aInputTier = par2;
- break;
- }
- case 5: {
- this.aOutputTier = par2;
- break;
- }
- case 6: {
- this.aRecipeDuration = par2;
- break;
- }
- case 7: {
- this.aRecipeEU = par2;
- break;
- }
- case 8: {
- this.aRecipeSpecial = par2;
- break;
- }
- case 9: {
- this.aPollutionReduction = par2;
- break;
- }
- case 10: {
- this.aStoredEnergy = par2;
- break;
- }
- case 11: {
- this.aMaxEnergy = par2;
- break;
- }
- case 12: {
- this.aEfficiency = par2;
- break;
- }
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine_NoPlayerInventory.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine_NoPlayerInventory.java
deleted file mode 100644
index 579e0a7e1d..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine_NoPlayerInventory.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.item.ItemStack;
-
-public class CONTAINER_MultiMachine_NoPlayerInventory extends CONTAINER_MultiMachine {
-
- public CONTAINER_MultiMachine_NoPlayerInventory(
- final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public CONTAINER_MultiMachine_NoPlayerInventory(
- final InventoryPlayer aInventoryPlayer,
- final IGregTechTileEntity aTileEntity,
- final boolean bindInventory) {
- super(aInventoryPlayer, aTileEntity, bindInventory);
- }
-
- public boolean doesBindPlayerInventory() {
- return false;
- }
-
- @Override
- public ItemStack slotClick(
- final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer) {
- return null;
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_PowerSubStation.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_PowerSubStation.java
deleted file mode 100644
index f975539b83..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_PowerSubStation.java
+++ /dev/null
@@ -1,85 +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_MultiMachine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.core.slots.SlotNoInput;
-import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.GregtechMetaTileEntity_PowerSubStationController;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.*;
-
-public class CONTAINER_PowerSubStation extends GT_Container_MultiMachine {
- private final SyncedValueManager manager = new SyncedValueManager(21);
- public final SyncedLong mStoredEU = manager.allocateLong();
- public final SyncedLong mMaxStoredEU = manager.allocateLong();
- public final SyncedLong mAverageEuAdded = manager.allocateLong();
- public final SyncedLong mAverageEuConsumed = manager.allocateLong();
-
- public CONTAINER_PowerSubStation(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public CONTAINER_PowerSubStation(
- final InventoryPlayer aInventoryPlayer,
- final IGregTechTileEntity aTileEntity,
- final boolean bindInventory) {
- super(aInventoryPlayer, aTileEntity, bindInventory);
- }
-
- public void addSlots(final InventoryPlayer aInventoryPlayer) {
- this.addSlotToContainer(new Slot(this.mTileEntity, 1, 155, 5));
- this.addSlotToContainer(new SlotNoInput(this.mTileEntity, 2, 155, 23));
-
- for (int i = 0; i < 9; ++i) {
- this.addSlotToContainer(new Slot(aInventoryPlayer, i, 8 + i * 18, 167));
- }
- }
-
- @Override
- public boolean doesBindPlayerInventory() {
- return false;
- }
-
- public int getSlotCount() {
- return 10;
- }
-
- public int getShiftClickSlotCount() {
- return 1;
- }
-
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
-
- if (manager == null)
- // maybe not yet initialized
- // stupid java
- // ask greg why he wants to call a method that's definitely going to be overridden in subclass in
- // constructor
- return;
-
- GregtechMetaTileEntity_PowerSubStationController aPSS =
- (GregtechMetaTileEntity_PowerSubStationController) mTileEntity.getMetaTileEntity();
- mStoredEU.setValue(mTileEntity.getStoredEU());
- mMaxStoredEU.setValue(mTileEntity.getEUCapacity());
- mAverageEuAdded.setValue(aPSS.getAverageEuAdded());
- mAverageEuConsumed.setValue(aPSS.getAverageEuConsumed());
-
- manager.detectAndSendChanges(this::sendProgressBarUpdate, mTimer);
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public void updateProgressBar(int par1, int par2) {
- super.updateProgressBar(par1, par2);
- manager.updateProgressBar(par1, par2);
- }
-
- private void sendProgressBarUpdate(int short1, int short2) {
- for (Object crafter : this.crafters) {
- ((ICrafting) crafter).sendProgressBarUpdate(this, short1, short2);
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SafeBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SafeBlock.java
deleted file mode 100644
index e317583413..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SafeBlock.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui;
-
-import gregtech.api.gui.GT_ContainerMetaTile_Machine;
-import gregtech.api.gui.GT_Slot_Holo;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.core.util.player.PlayerCache;
-import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GregtechMetaSafeBlock;
-import java.util.UUID;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-public class CONTAINER_SafeBlock extends GT_ContainerMetaTile_Machine {
- public CONTAINER_SafeBlock(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- // public String UUID =
- // ((BaseMetaTileEntity)mTileEntity).getMetaTileEntity().getBaseMetaTileEntity().getOwnerName();
- public UUID ownerUUID = ((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).ownerUUID;
- public String tempPlayer = PlayerCache.lookupPlayerByUUID(this.ownerUUID);
- public boolean blockStatus = ((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bUnbreakable;
-
- @Override
- public void addSlots(final InventoryPlayer aInventoryPlayer) {
- for (int y = 0; y < 3; y++) {
- for (int x = 0; x < 9; x++) {
- this.addSlotToContainer(new Slot(this.mTileEntity, x + (y * 9), 8 + (x * 18), 5 + (y * 18)));
- }
- }
- this.addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 8, 63, false, true, 1));
- this.addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 26, 63, false, true, 1));
- this.addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 44, 63, false, true, 1));
- }
-
- @Override
- public ItemStack slotClick(
- final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer) {
- final int runs = 0;
- if (aSlotIndex < 27) {
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
- final Slot tSlot = (Slot) this.inventorySlots.get(aSlotIndex);
- if (tSlot != null) {
- if (this.mTileEntity.getMetaTileEntity() == null) {
- return null;
- }
- if (aSlotIndex == 27) {
-
- /*((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bOutput);
- if (((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bOutput) {
- if (aPlayer != null && aPlayer instanceof EntityPlayerMP && (((GregtechMetaSafeBlock)this.mTileEntity.getMetaTileEntity()).bOutput != false)) {
-
- Utils.LOG_INFO(String.valueOf(Sys.is64Bit()));
- Utils.messagePlayer(aPlayer, "Salmon");
- }
-
- GT_Utility.sendChatToPlayer(aPlayer, "Emit Energy to Outputside");
- } else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Energy");
- }
- return null;*/
-
- }
- if (aSlotIndex == 28) {}
- /* ((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull);
- if (((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) {
- GT_Utility.sendChatToPlayer(aPlayer, "Emit Redstone if no Slot is free");
- } else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Redstone");
- }
- return null;
- }*/
- if (aSlotIndex == 29) /*{
- if (((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bUnbreakable) {
- if (((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bUnbreakable) {
- makeIndestructible(aPlayer);
- }
- else {
-
- }
- } else {
- makeIndestructible(aPlayer);
- }
- return null;
- }*/ {
-
- ((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bUnbreakable =
- (!((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bUnbreakable);
- this.blockStatus = ((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bUnbreakable;
- this.ownerUUID = ((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).ownerUUID;
- // Utils.messagePlayer(aPlayer, "Is the safe locked? "+String.valueOf(((GregtechMetaSafeBlock)
- // this.mTileEntity.getMetaTileEntity()).bUnbreakable).toUpperCase());
- /*if (aPlayer != null && aPlayer instanceof EntityPlayerMP && (((GregtechMetaSafeBlock)this.mTileEntity.getMetaTileEntity()).bUnbreakable != false)) {
- UnbreakableBlockManager Xasda = new UnbreakableBlockManager();
- Xasda.setmTileEntity((BaseMetaTileEntity) mTileEntity, aPlayer);
- }
- else {
- UnbreakableBlockManager Xasda = new UnbreakableBlockManager();
- Xasda.setmTileEntity((BaseMetaTileEntity) mTileEntity, aPlayer);
- }*/
- return null;
- }
- }
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
-
- @Override
- public int getSlotCount() {
- return 27;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 27;
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SolarGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SolarGenerator.java
deleted file mode 100644
index 93ba937f45..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SolarGenerator.java
+++ /dev/null
@@ -1,90 +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.GregtechMetaTileEntitySolarGenerator;
-import java.util.Iterator;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.ICrafting;
-
-public class CONTAINER_SolarGenerator extends GT_ContainerMetaTile_Machine {
- public int mWaterAmount = 0;
- public int mSteamAmount = 0;
- public int mProcessingEnergy = 0;
- public int mTemperature = 2;
-
- public CONTAINER_SolarGenerator(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- @Override
- public void addSlots(final 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 0;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 0;
- }
-
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if ((this.mTileEntity.isClientSide()) || (this.mTileEntity.getMetaTileEntity() == null)) {
- return;
- }
- this.mTemperature = ((GregtechMetaTileEntitySolarGenerator) this.mTileEntity.getMetaTileEntity()).mSolarCharge;
- this.mProcessingEnergy =
- ((GregtechMetaTileEntitySolarGenerator) this.mTileEntity.getMetaTileEntity()).mProcessingEnergy;
-
- this.mTemperature = Math.min(
- 54,
- Math.max(
- 0,
- (this.mTemperature * 54)
- / (((GregtechMetaTileEntitySolarGenerator) this.mTileEntity.getMetaTileEntity())
- .maxProgresstime()
- - 10)));
- this.mEnergy = (int) Math.min(Integer.MAX_VALUE, this.mTileEntity.getStoredEU());
- this.mProcessingEnergy =
- Math.min(14, Math.max(this.mProcessingEnergy > 0 ? 1 : 0, (this.mProcessingEnergy * 14) / 1000));
-
- final Iterator var2 = this.crafters.iterator();
- while (var2.hasNext()) {
- final 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(final int par1, final 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_SteamCondenser.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SteamCondenser.java
deleted file mode 100644
index 361f24c4a1..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SteamCondenser.java
+++ /dev/null
@@ -1,100 +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.api.metatileentity.implementations.base.generators.GregtechMetaBoilerBase;
-import java.util.Iterator;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.ICrafting;
-import net.minecraft.inventory.Slot;
-
-public class CONTAINER_SteamCondenser extends GT_ContainerMetaTile_Machine {
- public CONTAINER_SteamCondenser(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- @Override
- public void addSlots(final InventoryPlayer aInventoryPlayer) {
- this.addSlotToContainer(new Slot(this.mTileEntity, 2, 116, 62));
- this.addSlotToContainer(new Slot(this.mTileEntity, 0, 44, 26));
- this.addSlotToContainer(new Slot(this.mTileEntity, 1, 44, 62));
- this.addSlotToContainer(new Slot(this.mTileEntity, 3, 116, 26));
- }
-
- @Override
- public int getSlotCount() {
- return 4;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 1;
- }
-
- public int mWaterAmount = 0;
- public int mSteamAmount = 0;
- public int mProcessingEnergy = 0;
- public int mTemperature = 2;
- public long mTickingTime = ((GregtechMetaBoilerBase) this.mTileEntity.getMetaTileEntity()).RI;
-
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if ((this.mTileEntity.isClientSide()) || (this.mTileEntity.getMetaTileEntity() == null)) {
- return;
- }
- int steamCapacity = ((GregtechMetaBoilerBase) this.mTileEntity.getMetaTileEntity()).getSteamCapacity();
- int waterCapacity = ((GregtechMetaBoilerBase) this.mTileEntity.getMetaTileEntity()).getCapacity();
- this.mTemperature = ((GregtechMetaBoilerBase) this.mTileEntity.getMetaTileEntity()).mTemperature;
- this.mProcessingEnergy = ((GregtechMetaBoilerBase) this.mTileEntity.getMetaTileEntity()).mProcessingEnergy;
- this.mSteamAmount = (((GregtechMetaBoilerBase) this.mTileEntity.getMetaTileEntity()).mSteam == null
- ? 0
- : ((GregtechMetaBoilerBase) this.mTileEntity.getMetaTileEntity()).mSteam.amount);
- this.mWaterAmount = (((GregtechMetaBoilerBase) this.mTileEntity.getMetaTileEntity()).mFluid == null
- ? 0
- : ((GregtechMetaBoilerBase) this.mTileEntity.getMetaTileEntity()).mFluid.amount);
- this.mTickingTime = ((GregtechMetaBoilerBase) this.mTileEntity.getMetaTileEntity()).RI;
-
- this.mTemperature = Math.min(
- 54,
- Math.max(
- 0,
- (this.mTemperature * 54)
- / (((GregtechMetaBoilerBase) 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));
-
- final Iterator var2 = this.crafters.iterator();
- while (var2.hasNext()) {
- final 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(final int par1, final 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_SuperChest.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java
deleted file mode 100644
index 65d4e46069..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java
+++ /dev/null
@@ -1,75 +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.gui.GT_Slot_Output;
-import gregtech.api.gui.GT_Slot_Render;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.core.slots.SlotLockedInput;
-import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredChest;
-import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf_Large;
-import java.util.Iterator;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.ICrafting;
-import net.minecraft.item.ItemStack;
-
-public class CONTAINER_SuperChest extends GT_ContainerMetaTile_Machine {
-
- public int mContent = 0;
- private ItemStack mLockedSlotStack = null;
-
- public CONTAINER_SuperChest(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- this.addSlotToContainer(new SlotLockedInput(this.mTileEntity, 0, 80, 17, mLockedSlotStack));
- this.addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 1, 80, 53));
- this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, 2, 59, 42));
- }
-
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if (!this.mTileEntity.isClientSide() && this.mTileEntity.getMetaTileEntity() != null) {
- if (this.mTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_TieredChest) {
- this.mContent = ((GT_MetaTileEntity_TieredChest) this.mTileEntity.getMetaTileEntity()).mItemCount;
- mLockedSlotStack = ((GT_MetaTileEntity_TieredChest) this.mTileEntity.getMetaTileEntity()).mItemStack;
- }
- if (this.mTileEntity.getMetaTileEntity() instanceof GT4Entity_Shelf_Large) {
- this.mContent = ((GT4Entity_Shelf_Large) this.mTileEntity.getMetaTileEntity()).mItemCount;
- mLockedSlotStack = ((GT4Entity_Shelf_Large) this.mTileEntity.getMetaTileEntity()).mItemStack;
- } else {
- this.mContent = 0;
- }
-
- Iterator var2 = this.crafters.iterator();
-
- while (var2.hasNext()) {
- ICrafting var1 = (ICrafting) var2.next();
- var1.sendProgressBarUpdate(this, 100, this.mContent & 65535);
- var1.sendProgressBarUpdate(this, 101, this.mContent >>> 16);
- }
- }
- }
-
- @SideOnly(Side.CLIENT)
- public void updateProgressBar(int par1, int par2) {
- super.updateProgressBar(par1, par2);
- switch (par1) {
- case 100:
- this.mContent = this.mContent & -65536 | par2;
- break;
- case 101:
- this.mContent = this.mContent & 65535 | par2 << 16;
- }
- }
-
- public int getSlotCount() {
- return 2;
- }
-
- public int getShiftClickSlotCount() {
- return 1;
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_TreeFarmer.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_TreeFarmer.java
deleted file mode 100644
index 5724ab6c04..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_TreeFarmer.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui;
-
-import gregtech.api.gui.GT_ContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.core.slots.SlotBuzzSaw;
-import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntityTreeFarm;
-import java.util.List;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.ICrafting;
-
-public class CONTAINER_TreeFarmer extends GT_ContainerMetaTile_Machine {
-
- public long maxEU = 0;
- public long storedEU = 0;
-
- public CONTAINER_TreeFarmer(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public CONTAINER_TreeFarmer(
- final InventoryPlayer aInventoryPlayer,
- final IGregTechTileEntity aTileEntity,
- final boolean bindInventory) {
- super(aInventoryPlayer, aTileEntity, bindInventory);
- }
-
- @Override
- public void addSlots(final InventoryPlayer aInventoryPlayer) {
- this.addSlotToContainer(new SlotBuzzSaw(this.mTileEntity, 1, 80, 17));
- }
-
- @Override
- public int getSlotCount() {
- return 1;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 1;
- }
-
- @Override
- public void updateProgressBar(final int id, final int value) {
- super.updateProgressBar(id, value);
- switch (id) {
- case 100:
- this.maxEU = value;
- return;
- case 101:
- this.storedEU = value;
- break;
- default:
- break;
- }
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- for (final ICrafting crafting : (List<ICrafting>) this.crafters) {
- crafting.sendProgressBarUpdate(this, 100, (int)
- ((GregtechMetaTileEntityTreeFarm) this.mTileEntity.getMetaTileEntity()).maxEUStore());
- crafting.sendProgressBarUpdate(this, 101, (int)
- ((GregtechMetaTileEntityTreeFarm) this.mTileEntity.getMetaTileEntity()).getEUVar());
- if (((GregtechMetaTileEntityTreeFarm) this.mTileEntity.getMetaTileEntity())
- .isCorrectMachinePart(this.mTileEntity.getStackInSlot(1))) {
- this.mTileEntity.markDirty();
- }
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GTPP_UITextures.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GTPP_UITextures.java
new file mode 100644
index 0000000000..06a59cc52e
--- /dev/null
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GTPP_UITextures.java
@@ -0,0 +1,150 @@
+package gtPlusPlus.xmod.gregtech.api.gui;
+
+import static gtPlusPlus.core.lib.CORE.MODID;
+
+import com.gtnewhorizons.modularui.api.drawable.AdaptableUITexture;
+import com.gtnewhorizons.modularui.api.drawable.UITexture;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+
+public class GTPP_UITextures {
+
+ public static final AdaptableUITexture BACKGROUND_YELLOW =
+ AdaptableUITexture.of(MODID, "gui/background/yellow", 176, 166, 4);
+
+ public static final AdaptableUITexture SLOT_ITEM_YELLOW =
+ AdaptableUITexture.of(MODID, "gui/slot/item_yellow", 18, 18, 1);
+ public static final AdaptableUITexture[] SLOT_INVENTORY_MANAGER = new AdaptableUITexture[] {
+ AdaptableUITexture.of(MODID, "gui/slot/red", 18, 18, 1),
+ AdaptableUITexture.of(MODID, "gui/slot/green", 18, 18, 1),
+ AdaptableUITexture.of(MODID, "gui/slot/blue", 18, 18, 1),
+ AdaptableUITexture.of(MODID, "gui/slot/cyan", 18, 18, 1),
+ AdaptableUITexture.of(MODID, "gui/slot/magenta", 18, 18, 1),
+ AdaptableUITexture.of(MODID, "gui/slot/yellow", 18, 18, 1),
+ };
+
+ public static final UITexture BUTTON_STANDARD_BRONZE = UITexture.fullImage(MODID, "gui/button/standard_bronze");
+ public static final UITexture BUTTON_STANDARD_16x16 = UITexture.fullImage(MODID, "gui/button/standard_16x16");
+
+ public static final UITexture OVERLAY_SLOT_COAL = UITexture.fullImage(MODID, "gui/overlay_slot/coal");
+ public static final UITexture OVERLAY_SLOT_CANISTER_DARK =
+ UITexture.fullImage(MODID, "gui/overlay_slot/canister_dark");
+ public static final UITexture OVERLAY_SLOT_WEED_EX = UITexture.fullImage(MODID, "gui/overlay_slot/weed_ex");
+ public static final UITexture OVERLAY_SLOT_FERTILIZER = UITexture.fullImage(MODID, "gui/overlay_slot/fertilizer");
+ public static final UITexture OVERLAY_SLOT_ELECTRIC_TOOL =
+ UITexture.fullImage(MODID, "gui/overlay_slot/electric_tool");
+ public static final UITexture OVERLAY_SLOT_PAGE_PRINTED_BRONZE =
+ UITexture.fullImage(MODID, "gui/overlay_slot/page_printed_bronze");
+ public static final UITexture OVERLAY_SLOT_ARROW = UITexture.fullImage(MODID, "gui/overlay_slot/arrow");
+ public static final UITexture OVERLAY_SLOT_ARROW_BRONZE =
+ UITexture.fullImage(MODID, "gui/overlay_slot/arrow_bronze");
+ public static final UITexture OVERLAY_SLOT_CRAFT_OUTPUT =
+ UITexture.fullImage(MODID, "gui/overlay_slot/craft_output");
+ public static final UITexture OVERLAY_SLOT_CRAFT_OUTPUT_BRONZE =
+ UITexture.fullImage(MODID, "gui/overlay_slot/craft_output_bronze");
+ public static final UITexture OVERLAY_SLOT_PARK = UITexture.fullImage(MODID, "gui/overlay_slot/park");
+ public static final UITexture OVERLAY_SLOT_PARK_BRONZE = UITexture.fullImage(MODID, "gui/overlay_slot/park_bronze");
+ public static final UITexture OVERLAY_SLOT_INGOT = UITexture.fullImage(MODID, "gui/overlay_slot/ingot");
+ public static final UITexture OVERLAY_SLOT_ARROW_4 = UITexture.fullImage(MODID, "gui/overlay_slot/arrow_4");
+ public static final UITexture OVERLAY_SLOT_TURBINE = UITexture.fullImage(MODID, "gui/overlay_slot/turbine");
+ public static final UITexture OVERLAY_SLOT_CHEST = UITexture.fullImage(MODID, "gui/overlay_slot/chest");
+ public static final UITexture[] OVERLAY_SLOT_INVENTORY_MANAGER_COLOR = new UITexture[] {
+ UITexture.fullImage(MODID, "gui/overlay_slot/red"),
+ UITexture.fullImage(MODID, "gui/overlay_slot/green"),
+ UITexture.fullImage(MODID, "gui/overlay_slot/blue"),
+ UITexture.fullImage(MODID, "gui/overlay_slot/cyan"),
+ UITexture.fullImage(MODID, "gui/overlay_slot/magenta"),
+ UITexture.fullImage(MODID, "gui/overlay_slot/yellow"),
+ };
+ public static final UITexture[] OVERLAY_SLOT_INVENTORY_MANAGER_ARROW = new UITexture[] {
+ UITexture.fullImage(MODID, "gui/overlay_slot/arrow_red"),
+ UITexture.fullImage(MODID, "gui/overlay_slot/arrow_green"),
+ UITexture.fullImage(MODID, "gui/overlay_slot/arrow_blue"),
+ UITexture.fullImage(MODID, "gui/overlay_slot/arrow_cyan"),
+ UITexture.fullImage(MODID, "gui/overlay_slot/arrow_magenta"),
+ UITexture.fullImage(MODID, "gui/overlay_slot/arrow_yellow"),
+ };
+
+ public static final UITexture PROGRESSBAR_FLUID_REACTOR =
+ UITexture.fullImage(MODID, "gui/progressbar/fluid_reactor");
+ public static final UITexture PROGRESSBAR_BOILER_EMPTY = UITexture.fullImage(MODID, "gui/progressbar/boiler_empty");
+ public static final UITexture PROGRESSBAR_FUEL = UITexture.fullImage(MODID, "gui/progressbar/fuel");
+ public static final UITexture PROGRESSBAR_ARROW_2 = UITexture.fullImage(MODID, "gui/progressbar/arrow_2");
+ public static final UITexture PROGRESSBAR_COMPUTER_ENERGY =
+ UITexture.fullImage(MODID, "gui/progressbar/computer_energy");
+ public static final UITexture PROGRESSBAR_PSS_ENERGY = UITexture.fullImage(MODID, "gui/progressbar/pss_energy");
+
+ public static final AdaptableUITexture TAB_TITLE_YELLOW =
+ AdaptableUITexture.of(MODID, "gui/tab/title_yellow", 28, 28, 4);
+ public static final AdaptableUITexture TAB_TITLE_ANGULAR_YELLOW =
+ AdaptableUITexture.of(MODID, "gui/tab/title_angular_yellow", 28, 28, 4);
+ public static final AdaptableUITexture TAB_TITLE_DARK_YELLOW =
+ AdaptableUITexture.of(MODID, "gui/tab/title_dark_yellow", 28, 28, 4);
+
+ public static final UITexture OVERLAY_BUTTON_HARVESTER_MODE =
+ UITexture.fullImage(MODID, "gui/overlay_button/harvester_mode");
+ public static final UITexture OVERLAY_BUTTON_FLUSH = UITexture.fullImage(MODID, "gui/overlay_button/flush");
+ public static final UITexture OVERLAY_BUTTON_FLUSH_BRONZE =
+ UITexture.fullImage(MODID, "gui/overlay_button/flush_bronze");
+ public static final UITexture OVERLAY_BUTTON_AUTOMATION =
+ UITexture.fullImage(MODID, "gui/overlay_button/automation");
+ public static final UITexture OVERLAY_BUTTON_LOCK = UITexture.fullImage(MODID, "gui/overlay_button/lock");
+ public static final UITexture[] OVERLAY_BUTTON_THROUGHPUT = IntStream.range(
+ 0, 4) // GT_MetaTileEntity_ElectricAutoWorkbench#MAX_THROUGHPUT
+ .mapToObj(i -> UITexture.fullImage(MODID, "gui/overlay_button/throughput_" + i))
+ .collect(Collectors.toList())
+ .toArray(new UITexture[0]);
+ public static final UITexture[] OVERLAY_BUTTON_MODE = IntStream.range(
+ 0, 10) // GT_MetaTileEntity_ElectricAutoWorkbench#MAX_MODES
+ .mapToObj(i -> UITexture.fullImage(MODID, "gui/overlay_button/mode_" + i))
+ .collect(Collectors.toList())
+ .toArray(new UITexture[0]);
+ public static final UITexture OVERLAY_BUTTON_COMPUTER_MODE =
+ UITexture.fullImage(MODID, "gui/overlay_button/computer_mode");
+ public static final UITexture OVERLAY_BUTTON_SAVE = UITexture.fullImage(MODID, "gui/overlay_button/save");
+ public static final UITexture OVERLAY_BUTTON_LOAD = UITexture.fullImage(MODID, "gui/overlay_button/load");
+ public static final UITexture OVERLAY_BUTTON_NUCLEAR_SWITCH =
+ UITexture.fullImage(MODID, "gui/overlay_button/nuclear_switch");
+ public static final UITexture OVERLAY_BUTTON_ARROW_LEFT =
+ UITexture.fullImage(MODID, "gui/overlay_button/arrow_left");
+ public static final UITexture OVERLAY_BUTTON_ARROW_RIGHT =
+ UITexture.fullImage(MODID, "gui/overlay_button/arrow_right");
+ public static final UITexture[] OVERLAY_BUTTON_DIRECTION = new UITexture[] {
+ UITexture.fullImage(MODID, "gui/overlay_button/bottom"),
+ UITexture.fullImage(MODID, "gui/overlay_button/top"),
+ UITexture.fullImage(MODID, "gui/overlay_button/north"),
+ UITexture.fullImage(MODID, "gui/overlay_button/south"),
+ UITexture.fullImage(MODID, "gui/overlay_button/west"),
+ UITexture.fullImage(MODID, "gui/overlay_button/east"),
+ };
+ public static final UITexture[] OVERLAY_BUTTON_DIRECTION_GRAY = new UITexture[] {
+ UITexture.fullImage(MODID, "gui/overlay_button/bottom_gray"),
+ UITexture.fullImage(MODID, "gui/overlay_button/top_gray"),
+ UITexture.fullImage(MODID, "gui/overlay_button/north_gray"),
+ UITexture.fullImage(MODID, "gui/overlay_button/south_gray"),
+ UITexture.fullImage(MODID, "gui/overlay_button/west_gray"),
+ UITexture.fullImage(MODID, "gui/overlay_button/east_gray"),
+ };
+ public static final UITexture OVERLAY_BUTTON_TIP_GREEN = UITexture.fullImage(MODID, "gui/overlay_button/tip_green");
+ public static final UITexture OVERLAY_BUTTON_TIP_RED = UITexture.fullImage(MODID, "gui/overlay_button/tip_red");
+ public static final UITexture OVERLAY_BUTTON_ACTIVE_STATE =
+ UITexture.fullImage(MODID, "gui/overlay_button/active_state");
+ public static final UITexture OVERLAY_BUTTON_CHANGE_MODE =
+ UITexture.fullImage(MODID, "gui/overlay_button/change_mode");
+ public static final UITexture OVERLAY_BUTTON_PLUS_MINUS =
+ UITexture.fullImage(MODID, "gui/overlay_button/plus_minus");
+
+ public static final UITexture PICTURE_WORKBENCH_CIRCLE = UITexture.fullImage(MODID, "gui/picture/workbench_circle");
+ public static final UITexture PICTURE_ARROW_WHITE_DOWN = UITexture.fullImage(MODID, "gui/picture/arrow_white_down");
+ public static final UITexture PICTURE_V202 = UITexture.fullImage(MODID, "gui/picture/v202");
+ public static final UITexture PICTURE_COMPUTER_TOP = UITexture.fullImage(MODID, "gui/picture/computer_top");
+ public static final UITexture PICTURE_COMPUTER_GRID = UITexture.fullImage(MODID, "gui/picture/computer_grid");
+ public static final UITexture PICTURE_ARROWS_SEPARATE = UITexture.fullImage(MODID, "gui/picture/arrows_separate");
+ public static final UITexture PICTURE_ARROWS_FUSION = UITexture.fullImage(MODID, "gui/picture/arrows_fusion");
+ public static final UITexture PICTURE_REDSTONE_CIRCUIT_SCREEN =
+ UITexture.fullImage(MODID, "gui/picture/redstone_circuit_screen");
+ public static final UITexture PICTURE_ELECTRICITY_ERROR =
+ UITexture.fullImage(MODID, "gui/picture/electricity_error");
+ public static final UITexture PICTURE_ELECTRICITY_FINE = UITexture.fullImage(MODID, "gui/picture/electricity_fine");
+ public static final UITexture PICTURE_ENERGY_FRAME = UITexture.fullImage(MODID, "gui/picture/energy_frame");
+}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_AdvancedBoiler.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_AdvancedBoiler.java
deleted file mode 100644
index a924e2a6a5..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_AdvancedBoiler.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GUI_AdvancedBoiler extends GT_GUIContainerMetaTile_Machine {
- public GUI_AdvancedBoiler(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aTextureName) {
- super(new CONTAINER_AdvancedBoiler(aInventoryPlayer, aTileEntity), "miscutils:textures/gui/" + aTextureName);
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- this.fontRendererObj.drawString("Advanced Boiler", 8, 4, 4210752);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (this.width - this.xSize) / 2;
- int y = (this.height - this.ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- if (this.mContainer != null) {
- int tScale = ((CONTAINER_AdvancedBoiler) this.mContainer).mSteamAmount;
- if (tScale > 0) {
- drawTexturedModalRect(x + 70, y + 25 + 54 - tScale, 194, 54 - tScale, 10, tScale);
- }
- tScale = ((CONTAINER_AdvancedBoiler) this.mContainer).mWaterAmount;
- if (tScale > 0) {
- drawTexturedModalRect(x + 83, y + 25 + 54 - tScale, 204, 54 - tScale, 10, tScale);
- }
- tScale = ((CONTAINER_AdvancedBoiler) this.mContainer).mTemperature;
- if (tScale > 0) {
- drawTexturedModalRect(x + 96, y + 25 + 54 - tScale, 214, 54 - tScale, 10, tScale);
- }
- tScale = ((CONTAINER_AdvancedBoiler) this.mContainer).mProcessingEnergy;
- if (tScale > 0) {
- drawTexturedModalRect(x + 117, y + 44 + 14 - tScale, 177, 14 - tScale, 15, tScale + 1);
- }
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Cyclotron.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Cyclotron.java
deleted file mode 100644
index b31bc7b24c..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Cyclotron.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui;
-
-import gregtech.api.gui.GT_Container_MultiMachine;
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GUI_Cyclotron extends GT_GUIContainerMetaTile_Machine {
- public final String mNEI;
- public final String mName;
-
- public GUI_Cyclotron(
- final InventoryPlayer aInventoryPlayer,
- final IGregTechTileEntity aTileEntity,
- final String aName,
- final String aNEI) {
- super(
- new GT_Container_MultiMachine(aInventoryPlayer, aTileEntity, false),
- "gregtech:textures/gui/multimachines/" + "FusionComputer.png");
- this.mName = aName;
- this.mNEI = aNEI;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(final int par1, final int par2) {
- this.fontRendererObj.drawString(this.mName, 8, -10, 16448255);
- if (this.mContainer != null) {
- if ((((GT_Container_MultiMachine) this.mContainer).mDisplayErrorCode & 0x40) != 0x0) {
- this.fontRendererObj.drawString("Incomplete Structure.", 10, 8, 16448255);
- }
- if (((GT_Container_MultiMachine) this.mContainer).mDisplayErrorCode == 0) {
- if (((GT_Container_MultiMachine) this.mContainer).mActive == 0) {
- this.fontRendererObj.drawString(
- "Hit with Soft Hammer to (re-)start the Machine if it doesn't start.", -70, 170, 16448255);
- } else {
- this.fontRendererObj.drawString("Running perfectly.", 10, 170, 16448255);
- }
- }
- }
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- final int x = (this.width - this.xSize) / 2;
- final int y = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_DataHatch.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_DataHatch.java
deleted file mode 100644
index b42e2fae2f..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_DataHatch.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui;
-
-import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GUI_DataHatch extends GT_GUIContainerMetaTile_Machine {
-
- private final String mName;
-
- public GUI_DataHatch(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
- super(new CONTAINER_DataHatch(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "HatchDataOrb.png");
- mName = aName;
- }
-
- public GUI_DataHatch(
- InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) {
- super(new CONTAINER_DataHatch(aInventoryPlayer, aTileEntity), RES_PATH_GUI + aBackground + "HatchDataOrb.png");
- mName = aName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- fontRendererObj.drawString(mName, 8, 4, 4210752);
- /*String[] aName = mName.trim().split("\\s+");
- int aY = 4;
- for (String s : aName) {
- fontRendererObj.drawString(s, 120, (aY += 12), 4210752);
- }*/
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_DeluxeTank.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_DeluxeTank.java
deleted file mode 100644
index 0b851332b8..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_DeluxeTank.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui;
-
-import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.util.StatCollector;
-
-public class GUI_DeluxeTank extends GT_GUIContainerMetaTile_Machine {
-
- private final String mName;
-
- public GUI_DeluxeTank(
- final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aName) {
- super(new CONTAINER_DeluxeTank(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "BasicTank.png");
- this.mName = aName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(final int par1, final int par2) {
- this.fontRendererObj.drawString(
- StatCollector.translateToLocal("container.inventory"), 8, (this.ySize - 96) + 2, 4210752);
- this.fontRendererObj.drawString(this.mName, 8, 6, 4210752);
- if (this.mContainer != null) {
- this.fontRendererObj.drawString("Fuel | A | B |", 10, 20, 16448255);
- // fontRendererObj.drawString(GT_Utility.parseNumberToString(((CONTAINER_DeluxeTank) mContainer).mContent),
- // 10, 30, 16448255);
- }
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- final int x = (this.width - this.xSize) / 2;
- final int y = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java
deleted file mode 100644
index af0462b773..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.core.lib.CORE;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GUI_Hatch_Muffler_Advanced extends GT_GUIContainerMetaTile_Machine {
-
- String mName = "";
- long maxPower = 0;
- long storedPower = 0;
-
- public GUI_Hatch_Muffler_Advanced(
- final InventoryPlayer aInventoryPlayer,
- final IGregTechTileEntity aTileEntity,
- final String aName,
- final String aTextureFile) {
- super(
- new CONTAINER_Hatch_Muffler_Advanced(aInventoryPlayer, aTileEntity),
- CORE.RES_PATH_GUI + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile));
- this.mName = aName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(final int par1, final int par2) {
- this.fontRendererObj.drawString(this.mName, 8, 8, 16448255);
- /*
- * ReflectionUtils.setField(this.fontRendererObj, "underlineStyle", true);
- * ReflectionUtils.setField(this.fontRendererObj, "italicStyle", true);
- * ReflectionUtils.setField(this.fontRendererObj, "boldStyle", true); boolean
- * isBold = ReflectionUtils.getField(this.fontRendererObj, "boldStyle");
- * this.fontRendererObj.drawString("Insert Air Filters - Bold: "+isBold, 8, 18,
- * 16448255);
- */
- if (this.mContainer != null) {
- // this.maxPower = ((CONTAINER_TreeFarmer)this.mContainer).maxEU;
- // this.storedPower = ((CONTAINER_TreeFarmer)this.mContainer).storedEU;
- }
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- // this.maxPower = ((CONTAINER_TreeFarmer)this.mContainer).maxEU;
- // this.storedPower = ((CONTAINER_TreeFarmer)this.mContainer).storedEU;
- final int x = (this.width - this.xSize) / 2;
- final int y = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IndustrialCentrifuge.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IndustrialCentrifuge.java
deleted file mode 100644
index 007669c8ba..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IndustrialCentrifuge.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.core.lib.CORE;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GUI_IndustrialCentrifuge extends GT_GUIContainerMetaTile_Machine {
-
- String mName = "";
- private short counter = 0;
-
- public GUI_IndustrialCentrifuge(
- final InventoryPlayer aInventoryPlayer,
- final IGregTechTileEntity aTileEntity,
- final String aName,
- final String aTextureFile) {
- super(
- new CONTAINER_IndustrialCentrifuge(aInventoryPlayer, aTileEntity),
- CORE.RES_PATH_GUI + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile));
- this.mName = aName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(final int par1, final int par2) {
- this.fontRendererObj.drawString(this.mName, 10, 8, 16448255);
- if (this.counter >= 100) {
- this.counter = 0;
- } else {
- this.counter++;
- }
- if (this.mContainer != null) {
- if ((((CONTAINER_IndustrialCentrifuge) this.mContainer).mDisplayErrorCode & 1) != 0) {
- this.fontRendererObj.drawString("Pipe is loose.", 10, 16, 16448255);
- }
- if ((((CONTAINER_IndustrialCentrifuge) this.mContainer).mDisplayErrorCode & 2) != 0) {
- this.fontRendererObj.drawString("Screws are loose.", 10, 24, 16448255);
- }
- if ((((CONTAINER_IndustrialCentrifuge) this.mContainer).mDisplayErrorCode & 4) != 0) {
- this.fontRendererObj.drawString("Something is stuck.", 10, 32, 16448255);
- }
- if ((((CONTAINER_IndustrialCentrifuge) this.mContainer).mDisplayErrorCode & 8) != 0) {
- this.fontRendererObj.drawString("Platings are dented.", 10, 40, 16448255);
- }
- if ((((CONTAINER_IndustrialCentrifuge) this.mContainer).mDisplayErrorCode & 32) != 0) {
- this.fontRendererObj.drawString("That doesn't belong there.", 10, 56, 16448255);
- }
- if ((((CONTAINER_IndustrialCentrifuge) this.mContainer).mDisplayErrorCode & 64) != 0) {
- this.fontRendererObj.drawString("Incomplete Structure.", 10, 64, 16448255);
- }
-
- if (((CONTAINER_IndustrialCentrifuge) this.mContainer).mDisplayErrorCode == 0) {
- if (((CONTAINER_IndustrialCentrifuge) this.mContainer).mActive == 0) {
- this.fontRendererObj.drawString("Hit with Soft Mallet", 10, 16, 16448255);
- this.fontRendererObj.drawString("to (re-)start the Machine", 10, 24, 16448255);
- this.fontRendererObj.drawString("if it doesn't start.", 10, 32, 16448255);
- } else {
- this.fontRendererObj.drawString("Running perfectly.", 10, 16, 16448255);
- /*if (CORE.DEBUG){
- fontRendererObj.drawString("Debug Counter: "+counter, 10, 56, 16448255);
- }*/
- }
- }
- }
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- final int x = (this.width - this.xSize) / 2;
- final int y = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IronBlastFurnace.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IronBlastFurnace.java
deleted file mode 100644
index 409e7a29ae..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IronBlastFurnace.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.core.lib.CORE;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GUI_IronBlastFurnace extends GT_GUIContainerMetaTile_Machine {
- public GUI_IronBlastFurnace(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) {
- super(
- new CONTAINER_IronBlastFurnace(aInventoryPlayer, aTileEntity),
- CORE.RES_PATH_GUI + "IronBlastFurnace.png");
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(final int par1, final int par2) {
- this.fontRendererObj.drawString("Iron Blast Furnace", 8, 4, 4210752);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- final int x = (this.width - this.xSize) / 2;
- final int y = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- if ((this.mContainer != null) && (this.mContainer.mProgressTime > 0)) {
- this.drawTexturedModalRect(
- x + 58,
- y + 28,
- 176,
- 0,
- Math.max(
- 0,
- Math.min(
- 20,
- 1
- + ((this.mContainer.mProgressTime * 20)
- / (this.mContainer.mMaxProgressTime < 1
- ? 1
- : this.mContainer.mMaxProgressTime)))),
- 11);
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MatterFab.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MatterFab.java
deleted file mode 100644
index 7a42ea01cd..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MatterFab.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.core.lib.CORE;
-import net.minecraft.entity.player.InventoryPlayer;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- * <p/>
- * The GUI-Container I use for all my Basic Machines
- * <p/>
- * As the NEI-RecipeTransferRect Handler can't handle one GUI-Class for all GUIs I needed to produce some dummy-classes which extend this class
- */
-public class GUI_MatterFab extends GT_GUIContainerMetaTile_Machine {
-
- String mName = "";
- public int mMatterProduced = 0;
- public int mScrapProduced = 0;
- public int mAmplifierProduced = 0;
- public int mScrapUsed = 0;
- public int mAmplifierUsed = 0;
-
- public GUI_MatterFab(
- final InventoryPlayer aInventoryPlayer,
- final IGregTechTileEntity aTileEntity,
- final String aName,
- final String aTextureFile) {
- super(
- new CONTAINER_MatterFab(aInventoryPlayer, aTileEntity),
- CORE.RES_PATH_GUI + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile));
- this.mName = aName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(final int par1, final int par2) {
- this.fontRendererObj.drawString(this.mName, 10, 8, 16448255);
-
- if (this.mContainer != null) {
- if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 1) != 0) {
- this.fontRendererObj.drawString("Pipe is loose.", 10, 16, 16448255);
- }
- if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 2) != 0) {
- this.fontRendererObj.drawString("Screws are loose.", 10, 24, 16448255);
- }
- if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 4) != 0) {
- this.fontRendererObj.drawString("Something is stuck.", 10, 32, 16448255);
- }
- if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 8) != 0) {
- this.fontRendererObj.drawString("Platings are dented.", 10, 40, 16448255);
- }
- if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 16) != 0) {
- this.fontRendererObj.drawString("Circuitry burned out.", 10, 48, 16448255);
- }
- if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 32) != 0) {
- this.fontRendererObj.drawString("That doesn't belong there.", 10, 56, 16448255);
- }
- if ((((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode & 64) != 0) {
- this.fontRendererObj.drawString("Incomplete Structure.", 10, 64, 16448255);
- }
-
- if (((CONTAINER_MatterFab) this.mContainer).mDisplayErrorCode == 0) {
- if (((CONTAINER_MatterFab) this.mContainer).mActive == 0) {
- this.fontRendererObj.drawString("Hit with Soft Mallet", 10, 16, 16448255);
- this.fontRendererObj.drawString("to (re-)start the Machine", 10, 24, 16448255);
- this.fontRendererObj.drawString("if it doesn't start.", 10, 32, 16448255);
- } else {
- CONTAINER_MatterFab aContainer = (CONTAINER_MatterFab) this.mContainer;
-
- this.mMatterProduced = aContainer.mMatterProduced;
- this.mAmplifierProduced = aContainer.mAmplifierProduced;
- this.mAmplifierUsed = aContainer.mAmplifierUsed;
- this.mScrapProduced = aContainer.mScrapProduced;
- this.mScrapUsed = aContainer.mScrapUsed;
-
- this.fontRendererObj.drawString("Running perfectly.", 10, 16, 16448255);
-
- this.fontRendererObj.drawString("Scrap Made: " + this.mScrapProduced, 10, 32, 16448255);
- this.fontRendererObj.drawString("Scrap Used: " + this.mScrapUsed, 10, 40, 16448255);
- this.fontRendererObj.drawString("UUA Made: " + this.mAmplifierProduced, 10, 48, 16448255);
- this.fontRendererObj.drawString("UUA Used: " + this.mAmplifierUsed, 10, 56, 16448255);
- this.fontRendererObj.drawString("UUM Made: " + this.mMatterProduced, 10, 64, 16448255);
- }
- }
- }
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- final int x = (this.width - this.xSize) / 2;
- final int y = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MultiMachine.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MultiMachine.java
deleted file mode 100644
index 7322570bab..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MultiMachine.java
+++ /dev/null
@@ -1,358 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui;
-
-import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.Materials;
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.items.GT_MetaGenerated_Tool_01;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.TimeUnit;
-import net.minecraft.client.gui.inventory.GuiContainer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.StatCollector;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- * <p/>
- * The GUI-Container I use for all my Basic Machines
- * <p/>
- * As the NEI-RecipeTransferRect Handler can't handle one GUI-Class for all GUIs I needed to produce some dummy-classes which extend this class
- */
-public class GUI_MultiMachine extends GT_GUIContainerMetaTile_Machine {
-
- private static final Materials GOOD;
- private static final Materials BAD;
- private final String mName;
-
- private static final ConcurrentHashMap<String, ItemStack> mToolStacks = new ConcurrentHashMap<String, ItemStack>();
-
- // net.minecraft.client.gui.inventory.GuiContainer.drawItemStack(ItemStack, int, int, String)
- private static final Method mDrawItemStack;
-
- static {
- GOOD = Materials.Uranium;
- BAD = Materials.Plutonium;
-
- // net.minecraft.client.gui.inventory.GuiContainer.drawItemStack(ItemStack, int, int, String)
- mDrawItemStack = ReflectionUtils.getMethod(
- GuiContainer.class, "drawItemStack", new Class[] {ItemStack.class, int.class, int.class, String.class});
- }
-
- public GUI_MultiMachine(
- final InventoryPlayer aInventoryPlayer,
- final IGregTechTileEntity aTileEntity,
- final String aName,
- final String aTextureFile) {
- super(
- new CONTAINER_MultiMachine_NoPlayerInventory(aInventoryPlayer, aTileEntity),
- CORE.RES_PATH_GUI + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile));
- this.mName = aName != null ? aName : "";
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(final int par1, final int par2) {
- if (this.mContainer != null) {
- drawGuiInfoTextLayer(par1, par2);
- drawGuiRepairStatusLayer(par1, par2);
- }
- }
-
- protected void drawGuiInfoTextLayer(final float par1, final int par2) {
-
- if ((((CONTAINER_MultiMachine) this.mContainer).mDisplayErrorCode & 64) != 0) {
- this.fontRendererObj.drawString(mName, 6, 7, 16448255); // Move down 8px
- this.fontRendererObj.drawString("Incomplete Structure.", 6, 15, 16448255); // Move down 8px
- } else {
- int aTotalTickTime = ((CONTAINER_MultiMachine) this.mContainer).aTotalTickTime;
- int aMaxParallel = ((CONTAINER_MultiMachine) this.mContainer).aMaxParallel;
- int aPollutionTick = ((CONTAINER_MultiMachine) this.mContainer).aPollutionTick;
- int aMaxInputVoltage = ((CONTAINER_MultiMachine) this.mContainer).aMaxInputVoltage;
- int aInputTier = ((CONTAINER_MultiMachine) this.mContainer).aInputTier;
- int aOutputTier = ((CONTAINER_MultiMachine) this.mContainer).aOutputTier;
- int aRecipeDuration = ((CONTAINER_MultiMachine) this.mContainer).aRecipeDuration;
- int aRecipeEU = ((CONTAINER_MultiMachine) this.mContainer).aRecipeEU;
- int aRecipeSpecial = ((CONTAINER_MultiMachine) this.mContainer).aRecipeSpecial;
- int aEfficiency = ((CONTAINER_MultiMachine) this.mContainer).aEfficiency;
-
- int aPollutionReduction = ((CONTAINER_MultiMachine) this.mContainer).aPollutionReduction;
-
- long aStoredEnergy = ((CONTAINER_MultiMachine) this.mContainer).aStoredEnergy;
- long aMaxEnergy = ((CONTAINER_MultiMachine) this.mContainer).aMaxEnergy;
-
- /*
- * Logic Block
- */
-
- long seconds = (aTotalTickTime / 20);
- int weeks = (int) (TimeUnit.SECONDS.toDays(seconds) / 7);
- int days = (int) (TimeUnit.SECONDS.toDays(seconds) - 7 * weeks);
- long hours =
- TimeUnit.SECONDS.toHours(seconds) - TimeUnit.DAYS.toHours(days) - TimeUnit.DAYS.toHours(7 * weeks);
- long minutes = TimeUnit.SECONDS.toMinutes(seconds) - (TimeUnit.SECONDS.toHours(seconds) * 60);
- long second = TimeUnit.SECONDS.toSeconds(seconds) - (TimeUnit.SECONDS.toMinutes(seconds) * 60);
-
- ArrayList<String> mInfo = new ArrayList<String>();
-
- String EU = StatCollector.translateToLocal("GTPP.info.eu");
-
- // GTPP.machines.tier
-
- mInfo.add(mName);
-
- if (aInputTier > 0) {
- mInfo.add(StatCollector.translateToLocal("GTPP.machines.input") + " "
- + StatCollector.translateToLocal("GTPP.machines.tier") + ": " + EnumChatFormatting.GREEN
- + GT_Values.VOLTAGE_NAMES[aInputTier]);
- }
- if (aOutputTier > 0) {
- mInfo.add(StatCollector.translateToLocal("GTPP.machines.output") + " "
- + StatCollector.translateToLocal("GTPP.machines.tier") + ": " + EnumChatFormatting.GREEN
- + GT_Values.VOLTAGE_NAMES[aOutputTier]);
- }
-
- mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.progress") + ": " + EnumChatFormatting.GREEN
- + Integer.toString(((CONTAINER_MultiMachine) this.mContainer).mProgressTime / 20)
- + EnumChatFormatting.RESET + " s / " + EnumChatFormatting.YELLOW
- + Integer.toString(((CONTAINER_MultiMachine) this.mContainer).mMaxProgressTime / 20)
- + EnumChatFormatting.RESET + " s");
-
- mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.energy") + ":");
- mInfo.add(StatCollector.translateToLocal("" + EnumChatFormatting.GREEN + Long.toString(aStoredEnergy)
- + EnumChatFormatting.RESET + " EU / " + EnumChatFormatting.YELLOW + Long.toString(aMaxEnergy)
- + EnumChatFormatting.RESET + " EU"));
-
- if (aRecipeEU != 0 && aRecipeDuration > 0) {
- if (aRecipeEU > 0) {
- mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.usage") + ":");
- mInfo.add(StatCollector.translateToLocal("" + EnumChatFormatting.RED + Integer.toString(-aRecipeEU)
- + EnumChatFormatting.RESET + " EU/t/parallel"));
- } else {
- mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.generation") + ":");
- mInfo.add(StatCollector.translateToLocal("" + EnumChatFormatting.GREEN + Integer.toString(aRecipeEU)
- + EnumChatFormatting.RESET + " EU/t/parallel"));
- }
- mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.duration") + ": " + EnumChatFormatting.RED
- + Integer.toString(aRecipeDuration) + EnumChatFormatting.RESET + " ticks");
- if (aRecipeSpecial > 0) {
- mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.specialvalue") + ": "
- + EnumChatFormatting.RED + Integer.toString(aRecipeEU) + EnumChatFormatting.RESET + "");
- }
- }
-
- mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.mei") + ":");
- mInfo.add(StatCollector.translateToLocal("" + EnumChatFormatting.YELLOW + Long.toString(aMaxInputVoltage)
- + EnumChatFormatting.RESET + " EU/t(*2A) " + StatCollector.translateToLocal("GTPP.machines.tier")
- + ": " + EnumChatFormatting.YELLOW + GT_Values.VN[GT_Utility.getTier(aMaxInputVoltage)]
- + EnumChatFormatting.RESET));
-
- mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.efficiency") + ": " + EnumChatFormatting.YELLOW
- + Float.toString(aEfficiency / 100.0F) + EnumChatFormatting.RESET + " %");
-
- mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.pollution") + ": " + EnumChatFormatting.RED
- + (aPollutionTick * 20) + EnumChatFormatting.RESET + "/sec");
- mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.pollutionreduced") + ": "
- + EnumChatFormatting.GREEN + aPollutionReduction + EnumChatFormatting.RESET + " %");
-
- // mInfo.add(StatCollector.translateToLocal("GTPP.CC.parallel")+":
- // "+EnumChatFormatting.GREEN+(aMaxParallel)+EnumChatFormatting.RESET);
-
- mInfo.add("Total Time Since Built: ");
- mInfo.add("" + EnumChatFormatting.DARK_GREEN + Integer.toString(weeks) + EnumChatFormatting.RESET
- + " Weeks,");
- mInfo.add(
- "" + EnumChatFormatting.DARK_GREEN + Integer.toString(days) + EnumChatFormatting.RESET + " Days,");
- mInfo.add("" + EnumChatFormatting.DARK_GREEN + Long.toString(hours) + EnumChatFormatting.RESET + " Hours,");
- mInfo.add("" + EnumChatFormatting.DARK_GREEN + Long.toString(minutes) + EnumChatFormatting.RESET
- + " Minutes,");
- mInfo.add(
- "" + EnumChatFormatting.DARK_GREEN + Long.toString(second) + EnumChatFormatting.RESET + " Seconds");
-
- // Machine Name
- // fontRendererObj.drawString(this.mName, 6, 7, 16448255);
-
- for (int i = 0; i < mInfo.size(); i++) {
- fontRendererObj.drawString(mInfo.get(i), 6, 7 + (i * 8), 16448255);
- }
- }
- }
-
- protected void drawGuiRepairStatusLayer(final float par1, final int par2) {
-
- boolean aWrench = (((CONTAINER_MultiMachine) this.mContainer).mDisplayErrorCode & 1) != 0;
- boolean aScrewdriver = (((CONTAINER_MultiMachine) this.mContainer).mDisplayErrorCode & 2) != 0;
- boolean aMallet = (((CONTAINER_MultiMachine) this.mContainer).mDisplayErrorCode & 4) != 0;
- boolean aHammer = (((CONTAINER_MultiMachine) this.mContainer).mDisplayErrorCode & 8) != 0;
- boolean aSoldering = (((CONTAINER_MultiMachine) this.mContainer).mDisplayErrorCode & 16) != 0;
- boolean aCrowbar = (((CONTAINER_MultiMachine) this.mContainer).mDisplayErrorCode & 32) != 0;
-
- if (mToolStacks.isEmpty()) {
- // Map Stacks of Repair items
- aWrench = false;
- aScrewdriver = false;
- aMallet = false;
- aHammer = false;
- aSoldering = false;
- aCrowbar = false;
- mToolStacks.put(
- aWrench + "WRENCH",
- GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- GT_MetaGenerated_Tool_01.WRENCH, 1, (aWrench ? BAD : GOOD), Materials.Tungsten, null));
- mToolStacks.put(
- aCrowbar + "CROWBAR",
- GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- GT_MetaGenerated_Tool_01.CROWBAR, 1, (aCrowbar ? BAD : GOOD), Materials.Tungsten, null));
- mToolStacks.put(
- aHammer + "HARDHAMMER",
- GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- GT_MetaGenerated_Tool_01.HARDHAMMER, 1, (aHammer ? BAD : GOOD), Materials.Tungsten, null));
- mToolStacks.put(
- aMallet + "SOFTHAMMER",
- GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- GT_MetaGenerated_Tool_01.SOFTHAMMER, 1, (aMallet ? BAD : GOOD), Materials.Tungsten, null));
- mToolStacks.put(
- aScrewdriver + "SCREWDRIVER",
- GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- GT_MetaGenerated_Tool_01.SCREWDRIVER,
- 1,
- (aScrewdriver ? BAD : GOOD),
- Materials.Tungsten,
- null));
- mToolStacks.put(
- aSoldering + "SOLDERING_IRON_LV",
- GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- GT_MetaGenerated_Tool_01.SOLDERING_IRON_LV,
- 1,
- (aSoldering ? BAD : GOOD),
- Materials.Tungsten,
- null));
-
- // Map Stacks of valid items
- aWrench = true;
- aScrewdriver = true;
- aMallet = true;
- aHammer = true;
- aSoldering = true;
- aCrowbar = true;
- mToolStacks.put(
- aWrench + "WRENCH",
- GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- GT_MetaGenerated_Tool_01.WRENCH, 1, (aWrench ? BAD : GOOD), Materials.Tungsten, null));
- mToolStacks.put(
- aCrowbar + "CROWBAR",
- GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- GT_MetaGenerated_Tool_01.CROWBAR, 1, (aCrowbar ? BAD : GOOD), Materials.Tungsten, null));
- mToolStacks.put(
- aHammer + "HARDHAMMER",
- GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- GT_MetaGenerated_Tool_01.HARDHAMMER, 1, (aHammer ? BAD : GOOD), Materials.Tungsten, null));
- mToolStacks.put(
- aMallet + "SOFTHAMMER",
- GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- GT_MetaGenerated_Tool_01.SOFTHAMMER, 1, (aMallet ? BAD : GOOD), Materials.Tungsten, null));
- mToolStacks.put(
- aScrewdriver + "SCREWDRIVER",
- GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- GT_MetaGenerated_Tool_01.SCREWDRIVER,
- 1,
- (aScrewdriver ? BAD : GOOD),
- Materials.Tungsten,
- null));
- mToolStacks.put(
- aSoldering + "SOLDERING_IRON_LV",
- GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
- GT_MetaGenerated_Tool_01.SOLDERING_IRON_LV,
- 1,
- (aSoldering ? BAD : GOOD),
- Materials.Tungsten,
- null));
-
- ItemStack aGlassPane1 = ItemUtils.getItemStackOfAmountFromOreDict("paneGlassRed", 1);
- ItemStack aGlassPane2 = ItemUtils.getItemStackOfAmountFromOreDict("paneGlassLime", 1);
- mToolStacks.put("falseGLASS", aGlassPane1);
- mToolStacks.put("trueGLASS", aGlassPane2);
-
- // Reset vars to real state
- aWrench = (((CONTAINER_MultiMachine) this.mContainer).mDisplayErrorCode & 1) != 0;
- aScrewdriver = (((CONTAINER_MultiMachine) this.mContainer).mDisplayErrorCode & 2) != 0;
- aMallet = (((CONTAINER_MultiMachine) this.mContainer).mDisplayErrorCode & 4) != 0;
- aHammer = (((CONTAINER_MultiMachine) this.mContainer).mDisplayErrorCode & 8) != 0;
- aSoldering = (((CONTAINER_MultiMachine) this.mContainer).mDisplayErrorCode & 16) != 0;
- aCrowbar = (((CONTAINER_MultiMachine) this.mContainer).mDisplayErrorCode & 32) != 0;
- }
-
- ItemStack aWrenchStack;
- ItemStack aCrowbarStack;
- ItemStack aHammerStack;
- ItemStack aMalletStack;
- ItemStack aScrewdriverStack;
- ItemStack aSolderingStack;
- if (!mToolStacks.isEmpty() && mDrawItemStack != null) {
-
- aWrenchStack = mToolStacks.get(aWrench + "WRENCH");
- aCrowbarStack = mToolStacks.get(aCrowbar + "CROWBAR");
- aHammerStack = mToolStacks.get(aHammer + "HARDHAMMER");
- aMalletStack = mToolStacks.get(aMallet + "SOFTHAMMER");
- aScrewdriverStack = mToolStacks.get(aScrewdriver + "SCREWDRIVER");
- aSolderingStack = mToolStacks.get(aSoldering + "SOLDERING_IRON_LV");
-
- try {
-
- ItemStack[] aToolStacks2 = new ItemStack[] {
- aWrenchStack, aCrowbarStack,
- aHammerStack, aMalletStack,
- aScrewdriverStack, aSolderingStack
- };
-
- int aIndex = 0;
- // Draw Repair status tools
- for (aIndex = 0; aIndex < 6; aIndex++) {
- int x = 156;
- int y = 112 - (18 * 3) + (aIndex * 18);
- mDrawItemStack.invoke(this, new Object[] {
- aToolStacks2[aIndex] != null ? aToolStacks2[aIndex] : ItemUtils.getErrorStack(1, "Bad Times"),
- x,
- y,
- "" + (aIndex == 2 ? "H" : aIndex == 3 ? "M" : "") // Stacksize Overlay
- });
- // this.fontRendererObj.drawString("", 10, 64, 16448255);
- }
-
- // Draw Running status
- boolean running = ((CONTAINER_MultiMachine) this.mContainer).mActive != 0;
- ItemStack aGlassPane = mToolStacks.get(running + "GLASS");
-
- if (aGlassPane == null) {
- aGlassPane = ItemUtils.getItemStackOfAmountFromOreDict("paneGlass" + (running ? "Lime" : "Red"), 1);
- mToolStacks.put(running + "GLASS", aGlassPane);
- }
-
- mDrawItemStack.invoke(this, new Object[] {
- aGlassPane != null ? aGlassPane : ItemUtils.getErrorStack(1, "Bad Times"),
- 156,
- 112 - (18 * 5),
- running ? "On" : "Off"
- }); // Stacksize Overlay
-
- } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
- e.printStackTrace();
- }
- }
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- final int x = (this.width - this.xSize) / 2;
- final int y = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MultiMachine_Default.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MultiMachine_Default.java
deleted file mode 100644
index e8d7a5e096..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MultiMachine_Default.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_LanguageManager;
-import gtPlusPlus.core.lib.CORE;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GUI_MultiMachine_Default extends GT_GUIContainerMetaTile_Machine {
- String mName;
-
- public GUI_MultiMachine_Default(
- final InventoryPlayer aInventoryPlayer,
- final IGregTechTileEntity aTileEntity,
- final String aName,
- final String aTextureFile) {
- super(
- new CONTAINER_MultiMachine(aInventoryPlayer, aTileEntity),
- CORE.RES_PATH_GUI + ((aTextureFile == null) ? "MultiblockDisplay" : aTextureFile));
- this.mName = "";
- this.mName = aName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(final int par1, final int par2) {
- this.fontRendererObj.drawString(this.mName, 10, 8, 16448255);
- if (this.mContainer != null) {
- if ((((CONTAINER_MultiMachine) this.mContainer).mDisplayErrorCode & 0x1) != 0x0) {
- this.fontRendererObj.drawString(this.trans("132", "Pipe is loose."), 10, 16, 16448255);
- }
- if ((((CONTAINER_MultiMachine) this.mContainer).mDisplayErrorCode & 0x2) != 0x0) {
- this.fontRendererObj.drawString(this.trans("133", "Screws are loose."), 10, 24, 16448255);
- }
- if ((((CONTAINER_MultiMachine) this.mContainer).mDisplayErrorCode & 0x4) != 0x0) {
- this.fontRendererObj.drawString(this.trans("134", "Something is stuck."), 10, 32, 16448255);
- }
- if ((((CONTAINER_MultiMachine) this.mContainer).mDisplayErrorCode & 0x8) != 0x0) {
- this.fontRendererObj.drawString(this.trans("135", "Platings are dented."), 10, 40, 16448255);
- }
- if ((((CONTAINER_MultiMachine) this.mContainer).mDisplayErrorCode & 0x10) != 0x0) {
- this.fontRendererObj.drawString(this.trans("136", "Circuitry burned out."), 10, 48, 16448255);
- }
- if ((((CONTAINER_MultiMachine) this.mContainer).mDisplayErrorCode & 0x20) != 0x0) {
- this.fontRendererObj.drawString(this.trans("137", "That doesn't belong there."), 10, 56, 16448255);
- }
- if ((((CONTAINER_MultiMachine) this.mContainer).mDisplayErrorCode & 0x40) != 0x0) {
- this.fontRendererObj.drawString(this.trans("138", "Incomplete Structure."), 10, 64, 16448255);
- }
- if (((CONTAINER_MultiMachine) this.mContainer).mDisplayErrorCode == 0) {
- if (((CONTAINER_MultiMachine) this.mContainer).mActive == 0) {
- this.fontRendererObj.drawString(this.trans("139", "Hit with Soft Mallet"), 10, 16, 16448255);
- this.fontRendererObj.drawString(this.trans("140", "to (re-)start the Machine"), 10, 24, 16448255);
- this.fontRendererObj.drawString(this.trans("141", "if it doesn't start."), 10, 32, 16448255);
- } else {
- this.fontRendererObj.drawString(this.trans("142", "Running perfectly."), 10, 16, 16448255);
- }
- }
- }
- }
-
- public String trans(final String aKey, final String aEnglish) {
- return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- final int x = (this.width - this.xSize) / 2;
- final int y = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Multi_Basic_Slotted.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Multi_Basic_Slotted.java
deleted file mode 100644
index 4050b5958a..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Multi_Basic_Slotted.java
+++ /dev/null
@@ -1,92 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui;
-
-import gregtech.api.gui.GT_Container_MultiMachine;
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.common.items.GT_MetaGenerated_Tool_01;
-import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbine;
-import gtPlusPlus.core.lib.CORE;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.item.ItemStack;
-
-public class GUI_Multi_Basic_Slotted extends GT_GUIContainerMetaTile_Machine {
- String mName = "";
-
- public GUI_Multi_Basic_Slotted(
- InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aTextureFile) {
- super(
- new GT_Container_MultiMachine(aInventoryPlayer, aTileEntity),
- CORE.RES_PATH_GUI + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile));
- this.mName = aName;
- }
-
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- this.fontRendererObj.drawString(this.mName, 10, 8, 16448255);
- if (this.mContainer != null) {
- if ((((GT_Container_MultiMachine) this.mContainer).mDisplayErrorCode & 1) != 0) {
- this.fontRendererObj.drawString(this.trans("132", "Pipe is loose."), 10, 16, 16448255);
- }
-
- if ((((GT_Container_MultiMachine) this.mContainer).mDisplayErrorCode & 2) != 0) {
- this.fontRendererObj.drawString(this.trans("133", "Screws are loose."), 10, 24, 16448255);
- }
-
- if ((((GT_Container_MultiMachine) this.mContainer).mDisplayErrorCode & 4) != 0) {
- this.fontRendererObj.drawString(this.trans("134", "Something is stuck."), 10, 32, 16448255);
- }
-
- if ((((GT_Container_MultiMachine) this.mContainer).mDisplayErrorCode & 8) != 0) {
- this.fontRendererObj.drawString(this.trans("135", "Platings are dented."), 10, 40, 16448255);
- }
-
- if ((((GT_Container_MultiMachine) this.mContainer).mDisplayErrorCode & 16) != 0) {
- this.fontRendererObj.drawString(this.trans("136", "Circuitry burned out."), 10, 48, 16448255);
- }
-
- if ((((GT_Container_MultiMachine) this.mContainer).mDisplayErrorCode & 32) != 0) {
- this.fontRendererObj.drawString(this.trans("137", "That doesn't belong there."), 10, 56, 16448255);
- }
-
- if ((((GT_Container_MultiMachine) this.mContainer).mDisplayErrorCode & 64) != 0) {
- this.fontRendererObj.drawString(this.trans("138", "Incomplete Structure."), 10, 64, 16448255);
- }
-
- if (((GT_Container_MultiMachine) this.mContainer).mDisplayErrorCode == 0) {
- if (((GT_Container_MultiMachine) this.mContainer).mActive == 0) {
- this.fontRendererObj.drawString(this.trans("139", "Hit with Soft Mallet"), 10, 16, 16448255);
- this.fontRendererObj.drawString(this.trans("140", "to (re-)start the Machine"), 10, 24, 16448255);
- this.fontRendererObj.drawString(this.trans("141", "if it doesn't start."), 10, 32, 16448255);
- } else {
- this.fontRendererObj.drawString(this.trans("142", "Running perfectly."), 10, 16, 16448255);
- }
-
- ItemStack tItem;
- if (this.mContainer.mTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_LargeTurbine) {
- tItem = this.mContainer.mTileEntity.getMetaTileEntity().getStackInSlot(1);
- if (tItem == null
- || tItem.getItem() != GT_MetaGenerated_Tool_01.INSTANCE
- || tItem.getItemDamage() < 170
- || tItem.getItemDamage() > 177) {
- this.fontRendererObj.drawString(
- this.trans("144", "Missing Turbine Rotor"),
- 10,
- ((GT_Container_MultiMachine) this.mContainer).mActive == 0 ? 40 : 24,
- 16448255);
- }
- }
- }
- }
- }
-
- public String trans(String aKey, String aEnglish) {
- return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false);
- }
-
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (this.width - this.xSize) / 2;
- int y = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_PowerSubStation.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_PowerSubStation.java
deleted file mode 100644
index beb6c1dc3e..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_PowerSubStation.java
+++ /dev/null
@@ -1,134 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_Utility;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.core.util.math.MathUtils;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GUI_PowerSubStation extends GT_GUIContainerMetaTile_Machine {
- public String mNEI;
- String mName;
- boolean[] mRepairStatus = new boolean[6];
-
- public final CONTAINER_PowerSubStation mPowerContainer;
-
- public GUI_PowerSubStation(
- final InventoryPlayer aInventoryPlayer,
- final IGregTechTileEntity aTileEntity,
- final String aName,
- final String aNEI) {
- super(
- new CONTAINER_PowerSubStation(aInventoryPlayer, aTileEntity, false),
- CORE.RES_PATH_GUI + "PowerSubStation.png");
- this.mName = aName;
- this.mNEI = aNEI;
- mPowerContainer = (CONTAINER_PowerSubStation) mContainer;
- /** The X size of the inventory window in pixels. */
- this.xSize = 196;
- /** The Y size of the inventory window in pixels. */
- this.ySize = 191;
- }
-
- protected void drawGuiContainerForegroundLayer(final int par1, final int par2) {
- this.fontRendererObj.drawString(this.mName, 8, -10, 16448255);
- if (this.mPowerContainer != null) {
-
- // this.fontRendererObj.drawString("Error Code: " + mPowerContainer.mDisplayErrorCode, 10, 142, 16448255);
-
- if (((this.mContainer).mDisplayErrorCode & 1) != 0) {
- mRepairStatus[0] = false;
- } else {
- mRepairStatus[0] = true;
- }
- if ((mPowerContainer.mDisplayErrorCode & 2) != 0) {
- mRepairStatus[1] = false;
- } else {
- mRepairStatus[1] = true;
- }
- if ((mPowerContainer.mDisplayErrorCode & 4) != 0) {
- mRepairStatus[2] = false;
- } else {
- mRepairStatus[2] = true;
- }
- if ((mPowerContainer.mDisplayErrorCode & 8) != 0) {
- mRepairStatus[3] = false;
- } else {
- mRepairStatus[3] = true;
- }
- if ((mPowerContainer.mDisplayErrorCode & 16) != 0) {
- mRepairStatus[4] = false;
- } else {
- mRepairStatus[4] = true;
- }
- if ((mPowerContainer.mDisplayErrorCode & 32) != 0) {
- mRepairStatus[5] = false;
- } else {
- mRepairStatus[5] = true;
- }
- if (mPowerContainer.mDisplayErrorCode == 0) {
- if (mPowerContainer.mActive == 0) {
- this.fontRendererObj.drawString("Turn on with Mallet", 10, 8, 16448255);
- } else {
- this.fontRendererObj.drawString("Running perfectly", 10, 8, 16448255);
- }
- }
-
- this.fontRendererObj.drawString("In", 178, 10, 16448255);
- this.fontRendererObj.drawString("Out", 176, 28, 16448255);
- this.fontRendererObj.drawString(
- "Avg In: " + GT_Utility.formatNumbers(this.mPowerContainer.mAverageEuAdded.getValue()) + " EU",
- 10,
- 20,
- 16448255);
- this.fontRendererObj.drawString(
- "Avg Out: " + GT_Utility.formatNumbers(this.mPowerContainer.mAverageEuConsumed.getValue()) + " EU",
- 10,
- 30,
- 16448255);
-
- final double tScale2 = MathUtils.findPercentage(
- this.mPowerContainer.mStoredEU.getValue(), this.mPowerContainer.mMaxStoredEU.getValue());
- final int tScale = (int) (tScale2 * 2.55);
- this.fontRendererObj.drawString("Stored:", 10, 132, 16448255);
- this.fontRendererObj.drawString(
- GT_Utility.formatNumbers(this.mPowerContainer.mStoredEU.getValue()) + " EU",
- 10,
- 142,
- Utils.rgbtoHexValue((255 - tScale), (0 + tScale), 0));
- this.fontRendererObj.drawString(GT_Utility.formatNumbers(tScale2) + "%", 70, 155, 16448255);
- }
- }
-
- protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) {
- /** The X size of the inventory window in pixels. */
- if (this.xSize != 196) this.xSize = 196;
- /** The Y size of the inventory window in pixels. */
- if (this.ySize != 191) this.ySize = 191;
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- final int x = (this.width - this.xSize) / 2;
- final int y = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- if (this.mPowerContainer != null) {
- final double tScale = MathUtils.findPercentage(
- this.mPowerContainer.mStoredEU.getValue(), this.mPowerContainer.mMaxStoredEU.getValue())
- / 100;
- this.drawTexturedModalRect(x + 5, y + 156, 0, 251, Math.min(147, (int) (tScale * 148.0)), 5);
-
- // A1
- this.drawTexturedModalRect(x + 154, y + 76, 238, (!mRepairStatus[0] ? 0 : 18), 18, 18);
- // A2
- this.drawTexturedModalRect(x + 154 + 20, y + 76, 238, (!mRepairStatus[1] ? 0 : 18), 18, 18);
- // B1
- this.drawTexturedModalRect(x + 154, y + 76 + 18, 238, (!mRepairStatus[2] ? 0 : 18), 18, 18);
- // B2
- this.drawTexturedModalRect(x + 154 + 20, y + 76 + 18, 238, (!mRepairStatus[3] ? 0 : 18), 18, 18);
- // C1
- this.drawTexturedModalRect(x + 154, y + 76 + 36, 238, (!mRepairStatus[4] ? 0 : 18), 18, 18);
- // C2
- this.drawTexturedModalRect(x + 154 + 20, y + 76 + 36, 238, (!mRepairStatus[5] ? 0 : 18), 18, 18);
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SafeBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SafeBlock.java
deleted file mode 100644
index c44dbd0e1f..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SafeBlock.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.core.lib.CORE;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GUI_SafeBlock extends GT_GUIContainerMetaTile_Machine {
- public GUI_SafeBlock(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) {
- super(new CONTAINER_SafeBlock(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + "SafeBlock.png");
- }
-
- // String UUID = ((CONTAINER_SafeBlock)this.mContainer).ownerUUID.toString();
- boolean blockStatus = ((CONTAINER_SafeBlock) this.mContainer).blockStatus;
- // String tempPlayer;
-
- private void updateVars() {
- // UUID = ((CONTAINER_SafeBlock)this.mContainer).ownerUUID;
- this.blockStatus = ((CONTAINER_SafeBlock) this.mContainer).blockStatus;
- // tempPlayer = PlayerCache.lookupPlayerByUUID(UUID);
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(final int par1, final int par2) {
- this.updateVars();
- // this.fontRendererObj.drawString("Owner: "+ tempPlayer, 64, 72, 4210752);
- // this.fontRendererObj.drawString(": "+ UUID.toLowerCase(), 44, 82, 4210752);
- this.fontRendererObj.drawString("Safe Status", 76, 61, 4210752);
- if (this.blockStatus) {
- this.fontRendererObj.drawString("Locked", 88, 73, 4210752);
- } else {
- this.fontRendererObj.drawString("Unlocked", 82, 73, 4210752);
- }
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- final int x = (this.width - this.xSize) / 2;
- final int y = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- /*String UUID = ((CONTAINER_SafeBlock)this.mContainer).UUID;
- this.fontRendererObj.drawString("Owner UUID: "+ UUID, 8, 12, 4210752);*/
-
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SolarGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SolarGenerator.java
deleted file mode 100644
index 8fb63fe148..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SolarGenerator.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GUI_SolarGenerator extends GT_GUIContainerMetaTile_Machine {
- public GUI_SolarGenerator(
- final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aTextureName) {
- super(new CONTAINER_SolarGenerator(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/" + aTextureName);
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(final int par1, final int par2) {
- this.fontRendererObj.drawString("Solar Generator", 8, 4, 4210752);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- final int x = (this.width - this.xSize) / 2;
- final int y = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- if (this.mContainer != null) {
- int tScale = ((CONTAINER_SolarGenerator) this.mContainer).mProcessingEnergy;
- if (tScale > 0) {
- this.drawTexturedModalRect(x + 70, (y + 25 + 54) - tScale, 194, 54 - tScale, 10, tScale);
- }
- tScale = ((CONTAINER_SolarGenerator) this.mContainer).mEnergy;
- if (tScale > 0) {
- this.drawTexturedModalRect(x + 83, (y + 25 + 54) - tScale, 204, 54 - tScale, 10, tScale);
- }
- tScale = ((CONTAINER_SolarGenerator) this.mContainer).mTemperature;
- if (tScale > 0) {
- this.drawTexturedModalRect(x + 96, (y + 25 + 54) - tScale, 214, 54 - tScale, 10, tScale);
- }
- tScale = ((CONTAINER_SolarGenerator) this.mContainer).mProcessingEnergy;
- if (tScale > 0) {
- this.drawTexturedModalRect(x + 117, (y + 44 + 14) - tScale, 177, 14 - tScale, 15, tScale + 1);
- }
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SteamCondenser.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SteamCondenser.java
deleted file mode 100644
index de3d56bdac..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SteamCondenser.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.preloader.CORE_Preloader;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GUI_SteamCondenser extends GT_GUIContainerMetaTile_Machine {
- long tickTime = 0;
-
- public GUI_SteamCondenser(
- final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aTextureName) {
- super(new CONTAINER_SteamCondenser(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + aTextureName);
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(final int par1, final int par2) {
- this.fontRendererObj.drawString("Condenser", 8, 4, 4210752);
- if (CORE_Preloader.DEBUG_MODE) {
- this.tickTime = ((CONTAINER_SteamCondenser) this.mContainer).mTickingTime;
- this.fontRendererObj.drawString("Tick Time: " + this.tickTime, 8, 12, 4210752);
- }
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- final int x = (this.width - this.xSize) / 2;
- final int y = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- if (this.mContainer != null) {
-
- int tScale = ((CONTAINER_SteamCondenser) this.mContainer).mSteamAmount;
- if (tScale > 0) {
- this.drawTexturedModalRect(x + 70, (y + 25 + 54) - tScale, 194, 54 - tScale, 10, tScale);
- }
- tScale = ((CONTAINER_SteamCondenser) this.mContainer).mWaterAmount;
- if (tScale > 0) {
- this.drawTexturedModalRect(x + 83, (y + 25 + 54) - tScale, 204, 54 - tScale, 10, tScale);
- }
- tScale = ((CONTAINER_SteamCondenser) this.mContainer).mTemperature;
- if (tScale > 0) {
- this.drawTexturedModalRect(x + 96, (y + 25 + 54) - tScale, 214, 54 - tScale, 10, tScale);
- }
- tScale = ((CONTAINER_SteamCondenser) this.mContainer).mProcessingEnergy;
- if (tScale > 0) {
- this.drawTexturedModalRect(x + 115, y + 44 + 2 /* - tScale*/, 177, 14 - tScale, 15, 1 + tScale);
- }
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SuperChest.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SuperChest.java
deleted file mode 100644
index b65ac110c3..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SuperChest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.util.StatCollector;
-
-public class GUI_SuperChest extends GT_GUIContainerMetaTile_Machine {
- private final String mName;
-
- public GUI_SuperChest(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
- super(new CONTAINER_SuperChest(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/BasicTank.png");
- this.mName = aName;
- }
-
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- this.fontRendererObj.drawString(
- StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
- this.fontRendererObj.drawString(this.mName, 8, 6, 4210752);
- if (this.mContainer != null) {
- this.fontRendererObj.drawString("Item Amount", 10, 20, 16448255);
- this.fontRendererObj.drawString(
- GT_Utility.parseNumberToString(((CONTAINER_SuperChest) this.mContainer).mContent),
- 10,
- 30,
- 16448255);
- }
- }
-
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (this.width - this.xSize) / 2;
- int y = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_TreeFarmer.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_TreeFarmer.java
deleted file mode 100644
index af6c212fdf..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_TreeFarmer.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.core.lib.CORE;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GUI_TreeFarmer extends GT_GUIContainerMetaTile_Machine {
-
- String mName = "";
- long maxPower = 0;
- long storedPower = 0;
-
- public GUI_TreeFarmer(
- final InventoryPlayer aInventoryPlayer,
- final IGregTechTileEntity aTileEntity,
- final String aName,
- final String aTextureFile) {
- super(
- new CONTAINER_TreeFarmer(aInventoryPlayer, aTileEntity),
- CORE.RES_PATH_GUI + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile));
- this.mName = aName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(final int par1, final int par2) {
- this.fontRendererObj.drawString(this.mName, 64, 6, 16448255);
- if (this.mContainer != null) {
- this.maxPower = ((CONTAINER_TreeFarmer) this.mContainer).maxEU;
- this.storedPower = ((CONTAINER_TreeFarmer) this.mContainer).storedEU;
- if (((CONTAINER_TreeFarmer) this.mContainer).mDisplayErrorCode == 0) {
- this.fontRendererObj.drawString("Current Power: " + this.storedPower + "EU", 8, 52, 16448255);
- this.fontRendererObj.drawString("Max Power: " + this.maxPower + "EU", 8, 60, 16448255);
- this.fontRendererObj.drawString("Current operations left: " + (this.storedPower / 32), 8, 68, 16448255);
- }
- }
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- this.maxPower = ((CONTAINER_TreeFarmer) this.mContainer).maxEU;
- this.storedPower = ((CONTAINER_TreeFarmer) this.mContainer).storedEU;
- final int x = (this.width - this.xSize) / 2;
- final int y = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/SyncedLong.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/SyncedLong.java
deleted file mode 100644
index c738d41422..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/SyncedLong.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui;
-
-import gtPlusPlus.xmod.gregtech.api.gui.SyncedValueManager.SendChanges;
-
-/**
- * A variable of long type that is automatically synchronized between client and server correctly.
- *
- * @author glee8e
- */
-class SyncedLong {
- private final int index;
- private long value;
- private final short[] pieces = new short[4];
- private int received;
-
- private boolean dirty = true;
-
- SyncedLong(int index) {
- this.index = index;
- }
-
- public long getValue() {
- return value;
- }
-
- public void setValue(long value) {
- if (this.value != value) {
- dirty = true;
- this.value = value;
- }
- }
-
- void detectAndSendChanges(SendChanges func, int timer) {
- if (dirty || (timer & 0xff) == 0) {
- for (int i = 0; i < 4; i++) {
- func.sendProgressBarUpdate(index + i, (int) ((value >> (16 * i)) & 0xffff));
- }
- dirty = false;
- }
- }
-
- private long getPiece(int index) {
- return ((long) pieces[index]) & 0xffff;
- }
-
- boolean updateProgressBar(int short1, int short2) {
- int offset = short1 - index;
- if (offset >= 0 && offset < 4) {
- pieces[offset] = (short) short2;
- received |= (1 << offset);
- if (received == 0b1111) {
- value = (getPiece(0)) | (getPiece(1) << 16) | (getPiece(2) << 32) | (getPiece(3) << 48);
- received = 0;
- }
- return true;
- }
- return false;
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/SyncedValueManager.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/SyncedValueManager.java
deleted file mode 100644
index 219e503a99..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/SyncedValueManager.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * A manager for managing synchronized variables. Handles large data type splitting and merging for you <b>correctly</b>.
- *
- * @author glee8e
- */
-class SyncedValueManager {
- private int offset;
- private final List<SyncedLong> longs = new ArrayList<>();
-
- SyncedValueManager(int offset) {
- this.offset = offset;
- }
-
- public SyncedLong allocateLong() {
- SyncedLong ret = new SyncedLong(offset);
- offset += 4;
- longs.add(ret);
- return ret;
- }
-
- public void detectAndSendChanges(SendChanges func, int timer) {
- for (SyncedLong val : longs) {
- val.detectAndSendChanges(func, timer);
- }
- }
-
- public void updateProgressBar(int short1, int short2) {
- for (SyncedLong val : longs) {
- if (val.updateProgressBar(short1, short2)) return;
- }
- }
-
- @FunctionalInterface
- public interface SendChanges {
- void sendProgressBarUpdate(int short1, int short2);
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_Container_ElectricAutoWorkbench.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_Container_ElectricAutoWorkbench.java
deleted file mode 100644
index 4efc08dad0..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_Container_ElectricAutoWorkbench.java
+++ /dev/null
@@ -1,137 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.automation;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.gui.GT_ContainerMetaTile_Machine;
-import gregtech.api.gui.GT_Slot_Holo;
-import gregtech.api.gui.GT_Slot_Output;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_Utility;
-import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_ElectricAutoWorkbench;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.ICrafting;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-public class GT_Container_ElectricAutoWorkbench extends GT_ContainerMetaTile_Machine {
-
- public int mMode;
- public int mThroughPut;
-
- public GT_Container_ElectricAutoWorkbench(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new Slot(mTileEntity, 0, 8, 5));
- addSlotToContainer(new Slot(mTileEntity, 1, 26, 5));
- addSlotToContainer(new Slot(mTileEntity, 2, 44, 5));
- addSlotToContainer(new Slot(mTileEntity, 3, 8, 23));
- addSlotToContainer(new Slot(mTileEntity, 4, 26, 23));
- addSlotToContainer(new Slot(mTileEntity, 5, 44, 23));
- addSlotToContainer(new Slot(mTileEntity, 6, 8, 41));
- addSlotToContainer(new Slot(mTileEntity, 7, 26, 41));
- addSlotToContainer(new Slot(mTileEntity, 8, 44, 41));
-
- addSlotToContainer(new GT_Slot_Output(mTileEntity, 9, 8, 60));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, 10, 26, 60));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, 11, 44, 60));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, 12, 62, 60));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, 13, 80, 60));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, 14, 98, 60));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, 15, 116, 60));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, 16, 134, 60));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, 17, 152, 60));
-
- addSlotToContainer(new GT_Slot_Output(mTileEntity, 18, 152, 41));
-
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 19, 64, 6, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 20, 81, 6, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 21, 98, 6, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 22, 64, 23, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 23, 81, 23, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 24, 98, 23, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 25, 64, 40, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 26, 81, 40, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 27, 98, 40, false, false, 1));
-
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 28, 152, 5, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 29, 121, 41, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 29, 121, 5, false, false, 1));
- }
-
- public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
- if (aSlotIndex < 18) return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
-
- Slot tSlot = (Slot) inventorySlots.get(aSlotIndex);
- if (tSlot != null) {
- if (mTileEntity.getMetaTileEntity() == null) return null;
- if (aSlotIndex > 18 && aSlotIndex < 28) {
- ItemStack tStack = aPlayer.inventory.getItemStack();
- if (tStack != null) {
- tStack = GT_Utility.copy(1, tStack);
- }
- tSlot.putStack(tStack);
- return null;
- }
- if (aSlotIndex == 28) return null;
- if (aSlotIndex == 29) {
- if (aMouseclick == 0) {
- ((GT_MetaTileEntity_ElectricAutoWorkbench) mTileEntity.getMetaTileEntity()).switchModeForward();
- } else {
- ((GT_MetaTileEntity_ElectricAutoWorkbench) mTileEntity.getMetaTileEntity()).switchModeBackward();
- }
- return null;
- }
- if (aSlotIndex == 30) {
- ((GT_MetaTileEntity_ElectricAutoWorkbench) mTileEntity.getMetaTileEntity()).switchThrough();
- return null;
- }
- }
-
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
-
- public int getSlotCount() {
- return 19;
- }
-
- public int getShiftClickSlotCount() {
- return 9;
- }
-
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) {
- return;
- }
- mMode = ((GT_MetaTileEntity_ElectricAutoWorkbench) mTileEntity.getMetaTileEntity()).mMode;
- mThroughPut = ((GT_MetaTileEntity_ElectricAutoWorkbench) mTileEntity.getMetaTileEntity()).mThroughPut;
- for (Object crafter : this.crafters) {
- ICrafting var1 = (ICrafting) crafter;
- var1.sendProgressBarUpdate(this, 103, this.mMode);
- var1.sendProgressBarUpdate(this, 104, this.mThroughPut);
- }
- }
-
- @Override
- public void addCraftingToCrafters(ICrafting par1ICrafting) {
- super.addCraftingToCrafters(par1ICrafting);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void updateProgressBar(int par1, int par2) {
- super.updateProgressBar(par1, par2);
- switch (par1) {
- case 103:
- this.mMode = par2;
- break;
- case 104:
- this.mThroughPut = par2;
- break;
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_Container_ElectricInventoryManager.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_Container_ElectricInventoryManager.java
deleted file mode 100644
index 0796c28a79..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_Container_ElectricInventoryManager.java
+++ /dev/null
@@ -1,316 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.automation;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.gui.GT_ContainerMetaTile_Machine;
-import gregtech.api.gui.GT_Slot_Holo;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_Utility;
-import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_ElectricInventoryManager;
-import java.util.Iterator;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.ICrafting;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.oredict.OreDictionary;
-
-public class GT_Container_ElectricInventoryManager extends GT_ContainerMetaTile_Machine {
-
- public int[] mTargetDirections = new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
- public int[] mRangeDirections = new int[] {0, 0, 0, 0};
- public int mTargetInOut;
- public int mTargetEnergy;
-
- public GT_Container_ElectricInventoryManager(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new Slot(mTileEntity, 0, 155, 5));
- addSlotToContainer(new Slot(mTileEntity, 1, 155, 23));
- addSlotToContainer(new Slot(mTileEntity, 2, 155, 41));
-
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 3, 5, 5, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 4, 5, 23, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 5, 5, 41, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 6, 61, 5, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 7, 61, 23, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 8, 61, 41, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 9, 80, 5, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 10, 80, 23, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 11, 80, 41, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 12, 136, 5, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 13, 136, 23, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 14, 136, 41, false, true, 1));
-
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 24, 5, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 24, 23, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 24, 41, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 42, 5, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 42, 23, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 42, 41, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 99, 5, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 99, 23, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 99, 41, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 117, 5, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 117, 23, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 117, 41, false, true, 1));
-
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 24, 60, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 42, 60, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 99, 60, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 117, 60, false, true, 1));
-
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 5, 60, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 61, 60, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 80, 60, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 136, 60, false, true, 1));
- }
-
- public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
- if (aSlotIndex < 3 || aSlotIndex >= getAllSlotCount())
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- Slot tSlot = (Slot) inventorySlots.get(aSlotIndex);
- if (tSlot != null) {
- if (mTileEntity.getMetaTileEntity() == null) return null;
- if (aSlotIndex < 15) {
- ItemStack tStack = aPlayer.inventory.getItemStack();
- if (tStack != null) {
- tStack = GT_Utility.copy(tStack);
- if (aMouseclick != 0) {
- tStack.setItemDamage(OreDictionary.WILDCARD_VALUE);
- }
- tSlot.putStack(tStack);
- } else {
- if (tSlot.getStack() != null) {
- if (aMouseclick == 0) {
- tSlot.getStack().stackSize -= (aShifthold == 1 ? 8 : 1);
- if (tSlot.getStack().stackSize <= 0) {
- tSlot.putStack(null);
- }
- } else {
- tSlot.getStack().stackSize += (aShifthold == 1 ? 8 : 1);
- if (tSlot.getStack().stackSize > tSlot.getStack().getMaxStackSize()) {
- tSlot.getStack().stackSize = tSlot.getStack().getMaxStackSize();
- }
- }
- }
- }
- return null;
- } else if (aSlotIndex >= 27 && aSlotIndex <= 30) {
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity())
- .iterateRangeDirection(aSlotIndex - 27);
- } else if (aSlotIndex >= 31 && aSlotIndex <= 34) {
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity())
- .switchRangeEnergy(aSlotIndex - 31);
- } else if (aSlotIndex % 3 == 0) {
- if (aMouseclick != 0)
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity())
- .switchSlot1InOut((aSlotIndex - 15) / 3);
- else
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity())
- .iterateSlot1Direction((aSlotIndex - 15) / 3);
- } else if (aSlotIndex % 3 == 1) {
- if (aMouseclick != 0)
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity())
- .switchSlot2InOut((aSlotIndex - 16) / 3);
- else
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity())
- .iterateSlot2Direction((aSlotIndex - 16) / 3);
- } else if (aSlotIndex % 3 == 2) {
- if (aMouseclick != 0)
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity())
- .switchSlot3InOut((aSlotIndex - 17) / 3);
- else
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity())
- .iterateSlot3Direction((aSlotIndex - 17) / 3);
- }
- }
- return null;
- }
-
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) {
- return;
- }
- mTargetDirections = new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
- mRangeDirections = new int[] {0, 0, 0, 0};
-
- mRangeDirections[0] =
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getRangeDirection(0);
- mRangeDirections[1] =
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getRangeDirection(1);
- mRangeDirections[2] =
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getRangeDirection(2);
- mRangeDirections[3] =
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getRangeDirection(3);
-
- mTargetDirections[0] =
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot1Direction(0);
- mTargetDirections[1] =
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot2Direction(0);
- mTargetDirections[2] =
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot3Direction(0);
- mTargetDirections[3] =
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot1Direction(1);
- mTargetDirections[4] =
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot2Direction(1);
- mTargetDirections[5] =
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot3Direction(1);
- mTargetDirections[6] =
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot1Direction(2);
- mTargetDirections[7] =
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot2Direction(2);
- mTargetDirections[8] =
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot3Direction(2);
- mTargetDirections[9] =
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot1Direction(3);
- mTargetDirections[10] =
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot2Direction(3);
- mTargetDirections[11] =
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot3Direction(3);
-
- mTargetInOut = 0;
- mTargetInOut |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot1InOut(0)
- ? 1 << 0
- : 0;
- mTargetInOut |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot2InOut(0)
- ? 1 << 1
- : 0;
- mTargetInOut |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot3InOut(0)
- ? 1 << 2
- : 0;
- mTargetInOut |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot1InOut(1)
- ? 1 << 3
- : 0;
- mTargetInOut |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot2InOut(1)
- ? 1 << 4
- : 0;
- mTargetInOut |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot3InOut(1)
- ? 1 << 5
- : 0;
- mTargetInOut |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot1InOut(2)
- ? 1 << 6
- : 0;
- mTargetInOut |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot2InOut(2)
- ? 1 << 7
- : 0;
- mTargetInOut |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot3InOut(2)
- ? 1 << 8
- : 0;
- mTargetInOut |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot1InOut(3)
- ? 1 << 9
- : 0;
- mTargetInOut |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot2InOut(3)
- ? 1 << 10
- : 0;
- mTargetInOut |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot3InOut(3)
- ? 1 << 11
- : 0;
-
- mTargetEnergy = 0;
- mTargetEnergy |=
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getRangeEnergy(0)
- ? 1 << 0
- : 0;
- mTargetEnergy |=
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getRangeEnergy(1)
- ? 1 << 1
- : 0;
- mTargetEnergy |=
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getRangeEnergy(2)
- ? 1 << 2
- : 0;
- mTargetEnergy |=
- ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getRangeEnergy(3)
- ? 1 << 3
- : 0;
-
- Iterator var2 = this.crafters.iterator();
- while (var2.hasNext()) {
- ICrafting var1 = (ICrafting) var2.next();
- for (int i = 0; i < 12; i++) var1.sendProgressBarUpdate(this, 100 + i, mTargetDirections[i]);
- var1.sendProgressBarUpdate(this, 113, mTargetInOut);
- var1.sendProgressBarUpdate(this, 114, mTargetEnergy);
- for (int i = 0; i < 4; i++) var1.sendProgressBarUpdate(this, 115 + i, mRangeDirections[i]);
- }
- }
-
- @Override
- public void addCraftingToCrafters(ICrafting par1ICrafting) {
- super.addCraftingToCrafters(par1ICrafting);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void updateProgressBar(int par1, int par2) {
- super.updateProgressBar(par1, par2);
- switch (par1) {
- case 100:
- mTargetDirections[0] = par2;
- break;
- case 101:
- mTargetDirections[1] = par2;
- break;
- case 102:
- mTargetDirections[2] = par2;
- break;
- case 103:
- mTargetDirections[3] = par2;
- break;
- case 104:
- mTargetDirections[4] = par2;
- break;
- case 105:
- mTargetDirections[5] = par2;
- break;
- case 106:
- mTargetDirections[6] = par2;
- break;
- case 107:
- mTargetDirections[7] = par2;
- break;
- case 108:
- mTargetDirections[8] = par2;
- break;
- case 109:
- mTargetDirections[9] = par2;
- break;
- case 110:
- mTargetDirections[10] = par2;
- break;
- case 111:
- mTargetDirections[11] = par2;
- break;
-
- case 113:
- mTargetInOut = par2;
- break;
- case 114:
- mTargetEnergy = par2;
- break;
- case 115:
- mRangeDirections[0] = par2;
- break;
- case 116:
- mRangeDirections[1] = par2;
- break;
- case 117:
- mRangeDirections[2] = par2;
- break;
- case 118:
- mRangeDirections[3] = par2;
- break;
- }
- }
-
- public int getSlotCount() {
- return 3;
- }
-
- public int getShiftClickSlotCount() {
- return 3;
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_GUIContainer_ElectricAutoWorkbench.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_GUIContainer_ElectricAutoWorkbench.java
deleted file mode 100644
index 6be7eb042e..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_GUIContainer_ElectricAutoWorkbench.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.automation;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.core.lib.CORE;
-import java.util.ArrayList;
-import java.util.List;
-import net.minecraft.client.renderer.RenderHelper;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GT_GUIContainer_ElectricAutoWorkbench extends GT_GUIContainerMetaTile_Machine {
-
- private static final String[] mModeText = new String[] {
- "Normal Crafting Table", "???", "1x1", "2x2", "3x3", "Unifier", "Dust", "???", "Hammer?", "Circle"
- };
-
- public GT_GUIContainer_ElectricAutoWorkbench(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(
- new GT_Container_ElectricAutoWorkbench(aInventoryPlayer, aTileEntity),
- CORE.RES_PATH_GUI + "ElectricAutoWorkbench.png");
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- drawTooltip(par1, par2);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
-
- if (mContainer != null) {
- int tMode = ((GT_Container_ElectricAutoWorkbench) mContainer).mMode;
- if (tMode != 0) drawTexturedModalRect(x + 120, y + 40, tMode * 18, 166, 18, 18);
- tMode = ((GT_Container_ElectricAutoWorkbench) mContainer).mThroughPut;
- drawTexturedModalRect(x + 120, y + 4, tMode * 18, 184, 18, 18);
- }
- }
-
- private void drawTooltip(final int x2, final int y2) {
- final int xStart = (this.width - this.xSize) / 2;
- final int yStart = (this.height - this.ySize) / 2;
- final int x3 = x2 - xStart;
- final int y3 = y2 - yStart + 5;
- List<String> list = new ArrayList<>();
- String[] mModeText = new String[] {
- "Normal Crafting Table", "???", "1x1", "2x2", "3x3", "Unifier", "Dust", "???", "Hammer?", "Circle"
- };
- if (y3 >= 45 && y3 <= 62) {
- if (x3 >= 120 && x3 <= 137) {
- list.add("Mode: " + mModeText[((GT_Container_ElectricAutoWorkbench) mContainer).mMode]);
- /*switch (((GT_Container_ElectricAutoWorkbench) mContainer).mMode) {
- case 0:
- list.add("Mode: ");
- }*/
- }
- }
- if (!list.isEmpty()) {
- drawHoveringText(list, x3, y3, fontRendererObj);
- RenderHelper.enableGUIStandardItemLighting();
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_GUIContainer_ElectricInventoryManager.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_GUIContainer_ElectricInventoryManager.java
deleted file mode 100644
index 77357056ba..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_GUIContainer_ElectricInventoryManager.java
+++ /dev/null
@@ -1,202 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.automation;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.core.lib.CORE;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GT_GUIContainer_ElectricInventoryManager extends GT_GUIContainerMetaTile_Machine {
-
- public GT_GUIContainer_ElectricInventoryManager(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(
- new GT_Container_ElectricInventoryManager(aInventoryPlayer, aTileEntity),
- CORE.RES_PATH_GUI + "InventoryManager.png");
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {}
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
-
- if (mContainer != null) {
- drawTexturedModalRect(
- x + 4,
- y + 4,
- ((GT_Container_ElectricInventoryManager) mContainer).mRangeDirections[0] * 18,
- 202,
- 18,
- 54);
- drawTexturedModalRect(
- x + 60,
- y + 4,
- ((GT_Container_ElectricInventoryManager) mContainer).mRangeDirections[1] * 18,
- 202,
- 18,
- 54);
- drawTexturedModalRect(
- x + 79,
- y + 4,
- ((GT_Container_ElectricInventoryManager) mContainer).mRangeDirections[2] * 18,
- 202,
- 18,
- 54);
- drawTexturedModalRect(
- x + 135,
- y + 4,
- ((GT_Container_ElectricInventoryManager) mContainer).mRangeDirections[3] * 18,
- 202,
- 18,
- 54);
-
- drawTexturedModalRect(
- x + 23,
- y + 59,
- ((GT_Container_ElectricInventoryManager) mContainer).mRangeDirections[0] * 18 + 126,
- 166,
- 18,
- 18);
- drawTexturedModalRect(
- x + 41,
- y + 59,
- ((GT_Container_ElectricInventoryManager) mContainer).mRangeDirections[1] * 18 + 126,
- 166,
- 18,
- 18);
- drawTexturedModalRect(
- x + 98,
- y + 59,
- ((GT_Container_ElectricInventoryManager) mContainer).mRangeDirections[2] * 18 + 126,
- 166,
- 18,
- 18);
- drawTexturedModalRect(
- x + 116,
- y + 59,
- ((GT_Container_ElectricInventoryManager) mContainer).mRangeDirections[3] * 18 + 126,
- 166,
- 18,
- 18);
-
- drawTexturedModalRect(
- x + 4,
- y + 59,
- 108,
- (((GT_Container_ElectricInventoryManager) mContainer).mTargetEnergy & 1) != 0 ? 184 : 166,
- 18,
- 18);
- drawTexturedModalRect(
- x + 60,
- y + 59,
- 108,
- (((GT_Container_ElectricInventoryManager) mContainer).mTargetEnergy & 2) != 0 ? 184 : 166,
- 18,
- 18);
- drawTexturedModalRect(
- x + 79,
- y + 59,
- 108,
- (((GT_Container_ElectricInventoryManager) mContainer).mTargetEnergy & 4) != 0 ? 184 : 166,
- 18,
- 18);
- drawTexturedModalRect(
- x + 135,
- y + 59,
- 108,
- (((GT_Container_ElectricInventoryManager) mContainer).mTargetEnergy & 8) != 0 ? 184 : 166,
- 18,
- 18);
-
- int i = -1;
-
- drawTexturedModalRect(
- x + 23,
- y + 4,
- ((GT_Container_ElectricInventoryManager) mContainer).mTargetDirections[++i] * 18,
- (((GT_Container_ElectricInventoryManager) mContainer).mTargetInOut & (1 << i)) != 0 ? 184 : 166,
- 18,
- 18);
- drawTexturedModalRect(
- x + 23,
- y + 22,
- ((GT_Container_ElectricInventoryManager) mContainer).mTargetDirections[++i] * 18,
- (((GT_Container_ElectricInventoryManager) mContainer).mTargetInOut & (1 << i)) != 0 ? 184 : 166,
- 18,
- 18);
- drawTexturedModalRect(
- x + 23,
- y + 40,
- ((GT_Container_ElectricInventoryManager) mContainer).mTargetDirections[++i] * 18,
- (((GT_Container_ElectricInventoryManager) mContainer).mTargetInOut & (1 << i)) != 0 ? 184 : 166,
- 18,
- 18);
- drawTexturedModalRect(
- x + 41,
- y + 4,
- ((GT_Container_ElectricInventoryManager) mContainer).mTargetDirections[++i] * 18,
- (((GT_Container_ElectricInventoryManager) mContainer).mTargetInOut & (1 << i)) != 0 ? 184 : 166,
- 18,
- 18);
- drawTexturedModalRect(
- x + 41,
- y + 22,
- ((GT_Container_ElectricInventoryManager) mContainer).mTargetDirections[++i] * 18,
- (((GT_Container_ElectricInventoryManager) mContainer).mTargetInOut & (1 << i)) != 0 ? 184 : 166,
- 18,
- 18);
- drawTexturedModalRect(
- x + 41,
- y + 40,
- ((GT_Container_ElectricInventoryManager) mContainer).mTargetDirections[++i] * 18,
- (((GT_Container_ElectricInventoryManager) mContainer).mTargetInOut & (1 << i)) != 0 ? 184 : 166,
- 18,
- 18);
- drawTexturedModalRect(
- x + 98,
- y + 4,
- ((GT_Container_ElectricInventoryManager) mContainer).mTargetDirections[++i] * 18,
- (((GT_Container_ElectricInventoryManager) mContainer).mTargetInOut & (1 << i)) != 0 ? 184 : 166,
- 18,
- 18);
- drawTexturedModalRect(
- x + 98,
- y + 22,
- ((GT_Container_ElectricInventoryManager) mContainer).mTargetDirections[++i] * 18,
- (((GT_Container_ElectricInventoryManager) mContainer).mTargetInOut & (1 << i)) != 0 ? 184 : 166,
- 18,
- 18);
- drawTexturedModalRect(
- x + 98,
- y + 40,
- ((GT_Container_ElectricInventoryManager) mContainer).mTargetDirections[++i] * 18,
- (((GT_Container_ElectricInventoryManager) mContainer).mTargetInOut & (1 << i)) != 0 ? 184 : 166,
- 18,
- 18);
- drawTexturedModalRect(
- x + 116,
- y + 4,
- ((GT_Container_ElectricInventoryManager) mContainer).mTargetDirections[++i] * 18,
- (((GT_Container_ElectricInventoryManager) mContainer).mTargetInOut & (1 << i)) != 0 ? 184 : 166,
- 18,
- 18);
- drawTexturedModalRect(
- x + 116,
- y + 22,
- ((GT_Container_ElectricInventoryManager) mContainer).mTargetDirections[++i] * 18,
- (((GT_Container_ElectricInventoryManager) mContainer).mTargetInOut & (1 << i)) != 0 ? 184 : 166,
- 18,
- 18);
- drawTexturedModalRect(
- x + 116,
- y + 40,
- ((GT_Container_ElectricInventoryManager) mContainer).mTargetDirections[++i] * 18,
- (((GT_Container_ElectricInventoryManager) mContainer).mTargetInOut & (1 << i)) != 0 ? 184 : 166,
- 18,
- 18);
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/CONTAINER_PollutionCleaner.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/CONTAINER_PollutionCleaner.java
deleted file mode 100644
index 373ba8ae08..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/CONTAINER_PollutionCleaner.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.basic;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.gui.*;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.slots.SlotPollutionScrubber;
-import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaAtmosphericReconditioner;
-import java.util.Iterator;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.ICrafting;
-import net.minecraft.item.ItemStack;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- * <p/>
- * The Container I use for all my Basic Machines
- */
-public class CONTAINER_PollutionCleaner extends GT_Container_BasicTank {
-
- public boolean mFluidTransfer = false, mItemTransfer = false, mStuttering = false;
- public int mReduction = 0;
-
- public CONTAINER_PollutionCleaner(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- @Override
- public void addSlots(InventoryPlayer aInventoryPlayer) {
-
- int tStartIndex = ((GT_MetaTileEntity_BasicMachine) mTileEntity.getMetaTileEntity()).getInputSlot();
- int aTier = ((GT_MetaTileEntity_BasicMachine) mTileEntity.getMetaTileEntity()).mTier;
-
- // Add 2 Item Slots
- addSlotToContainer(new SlotPollutionScrubber(0, aTier, mTileEntity, tStartIndex++, 53, 25));
- addSlotToContainer(new SlotPollutionScrubber(1, aTier, mTileEntity, tStartIndex++, 107, 25));
- // Upgrade Slot
- addSlotToContainer(new SlotPollutionScrubber(2, aTier, mTileEntity, tStartIndex++, 125, 63));
- }
-
- @Override
- public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
- Logger.INFO("Clicked on slot " + aSlotIndex);
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
-
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) return;
-
- Logger.INFO("TEST");
- mReduction = ((GregtechMetaAtmosphericReconditioner) mTileEntity.getMetaTileEntity()).mPollutionReduction;
-
- Iterator var2 = this.crafters.iterator();
- while (var2.hasNext()) {
- ICrafting var1 = (ICrafting) var2.next();
- var1.sendProgressBarUpdate(this, 105, mReduction);
- }
- }
-
- @Override
- public void addCraftingToCrafters(ICrafting par1ICrafting) {
- super.addCraftingToCrafters(par1ICrafting);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void updateProgressBar(int par1, int par2) {
- super.updateProgressBar(par1, par2);
- switch (par1) {
- case 105:
- mReduction = (par2);
- break;
- }
- }
-
- @Override
- public int getSlotStartIndex() {
- return 0;
- }
-
- @Override
- public int getShiftClickStartIndex() {
- return 0;
- }
-
- @Override
- public int getSlotCount() {
- return getShiftClickSlotCount();
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 3;
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GT_Container_CropHarvestor.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GT_Container_CropHarvestor.java
deleted file mode 100644
index 8380b2958f..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GT_Container_CropHarvestor.java
+++ /dev/null
@@ -1,179 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.basic;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.gui.GT_ContainerMetaTile_Machine;
-import gregtech.api.gui.GT_Slot_Holo;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.core.slots.SlotNoInput;
-import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_CropHarvestor;
-import ic2.core.item.ItemIC2;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.ICrafting;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-public class GT_Container_CropHarvestor extends GT_ContainerMetaTile_Machine {
-
- public boolean mModeAlternative = false;
- public int mWaterAmount = 0;
- public int mWaterRealAmount = 0;
-
- public GT_Container_CropHarvestor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public void addSlots(InventoryPlayer aInventoryPlayer) {
-
- int aSlot = 1;
-
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 0, 48, 64, false, true, 1));
- addSlotToContainer(new SlotWeedEx(mTileEntity, aSlot++, 8, 14));
- addSlotToContainer(new SlotWeedEx(mTileEntity, aSlot++, 26, 14));
- addSlotToContainer(new SlotFertilizer(mTileEntity, aSlot++, 8, 32));
- addSlotToContainer(new SlotFertilizer(mTileEntity, aSlot++, 26, 32));
- addSlotToContainer(new SlotFertilizer(mTileEntity, aSlot++, 8, 50));
- addSlotToContainer(new SlotFertilizer(mTileEntity, aSlot++, 26, 50));
-
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 61, 7));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 79, 7));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 97, 7));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 115, 7));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 133, 7));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 151, 7));
-
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 61, 25));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 79, 25));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 97, 25));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 115, 25));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 133, 25));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 151, 25));
-
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 61, 43));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 79, 43));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 97, 43));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 115, 43));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 133, 43));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 151, 43));
- }
-
- public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
-
- GT_MetaTileEntity_CropHarvestor machine = (GT_MetaTileEntity_CropHarvestor) mTileEntity.getMetaTileEntity();
-
- if (aSlotIndex == 0) {
- machine.mModeAlternative = !machine.mModeAlternative;
- return null;
- }
-
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
-
- @Override
- public int getSlotCount() {
- return 24;
- }
-
- @Override
- public int getSlotStartIndex() {
- return 1;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 6;
- }
-
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) {
- return;
- }
-
- // GT_MetaTileEntity_Boiler.getCapacity() is used for both water and steam capacity.
- int capacity = ((GT_MetaTileEntity_CropHarvestor) this.mTileEntity.getMetaTileEntity()).getCapacity();
-
- mModeAlternative = ((GT_MetaTileEntity_CropHarvestor) mTileEntity.getMetaTileEntity()).mModeAlternative;
- mWaterRealAmount = ((GT_MetaTileEntity_CropHarvestor) mTileEntity.getMetaTileEntity()).getFluidAmount();
- this.mWaterAmount = Math.min(54, Math.max(0, this.mWaterRealAmount * 54 / (capacity - 100)));
- for (Object crafter : this.crafters) {
- ICrafting var1 = (ICrafting) crafter;
- var1.sendProgressBarUpdate(this, 102, mModeAlternative ? 1 : 0);
- var1.sendProgressBarUpdate(this, 103, this.mWaterAmount);
- var1.sendProgressBarUpdate(this, 104, this.mWaterRealAmount);
- }
- }
-
- @Override
- public void addCraftingToCrafters(ICrafting par1ICrafting) {
- super.addCraftingToCrafters(par1ICrafting);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void updateProgressBar(int par1, int par2) {
- super.updateProgressBar(par1, par2);
- switch (par1) {
- case 102:
- mModeAlternative = (par2 != 0);
- break;
- case 103:
- this.mWaterAmount = par2;
- break;
- case 104:
- this.mWaterRealAmount = par2;
- break;
- }
- }
-
- public static class SlotWeedEx extends Slot {
-
- public SlotWeedEx(final IInventory inventory, final int slot, final int x, final int y) {
- super(inventory, slot, x, y);
- }
-
- @Override
- public synchronized boolean isItemValid(final ItemStack itemstack) {
- return isWeedEx(itemstack);
- }
-
- @Override
- public int getSlotStackLimit() {
- return 1;
- }
-
- private static boolean isWeedEx(ItemStack aStack) {
- if (aStack != null && aStack.getItem() instanceof ItemIC2) {
- if (aStack.getItem().getUnlocalizedName().equals("ic2.itemWeedEx")) {
- return true;
- }
- }
- return false;
- }
- }
-
- public class SlotFertilizer extends Slot {
-
- public SlotFertilizer(final IInventory inventory, final int slot, final int x, final int y) {
- super(inventory, slot, x, y);
- }
-
- @Override
- public synchronized boolean isItemValid(final ItemStack aStack) {
- if (aStack != null && aStack.getItem() instanceof ItemIC2) {
- if (aStack.getItem().getUnlocalizedName().equals("ic2.itemFertilizer")) {
- return true;
- }
- }
- return false;
- }
-
- @Override
- public int getSlotStackLimit() {
- return 64;
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GT_GUIContainer_CropHarvestor.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GT_GUIContainer_CropHarvestor.java
deleted file mode 100644
index 1b04ab15fe..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GT_GUIContainer_CropHarvestor.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.basic;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.core.lib.CORE;
-import java.util.ArrayList;
-import java.util.List;
-import net.minecraft.client.renderer.RenderHelper;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GT_GUIContainer_CropHarvestor extends GT_GUIContainerMetaTile_Machine {
-
- private final String mLocalName;
-
- public GT_GUIContainer_CropHarvestor(
- InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aLocalName) {
- super(new GT_Container_CropHarvestor(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + "CropHarvestor.png");
- mLocalName = aLocalName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- drawTooltip(par1, par2);
- // fontRendererObj.drawString("Crop Manager ("+this.mContainer.mTileEntity.getInputVoltage()+"v)", 8, 4,
- // 4210752);
- // fontRendererObj.drawString(mLocalName, 70, 69, 4210752);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
-
- if (((GT_Container_CropHarvestor) mContainer).mModeAlternative) {
- drawTexturedModalRect(x + 48, y + 64, 177, 37, 16, 16);
- }
-
- int tScale = ((GT_Container_CropHarvestor) this.mContainer).mWaterAmount;
- if (tScale > 0) {
- drawTexturedModalRect(x + 47, y + 61 - tScale, 204, 54 - tScale, 10, tScale);
- }
- ;
- }
-
- private void drawTooltip(int x2, int y2) {
- int xStart = (width - xSize) / 2;
- int yStart = (height - ySize) / 2;
- int x = x2 - xStart;
- int y = y2 - yStart + 5;
- List<String> list = new ArrayList<>();
- if (y >= 68 && y <= 85) {
- if (x >= 47 && x <= 64) {
- if (((GT_Container_CropHarvestor) mContainer).mModeAlternative) {
- list.add("Disable Hydration/Fertilizing/Weed-EX");
- } else {
- list.add("Enable Hydration/Fertilizing/Weed-EX");
- }
- }
- }
- if (y >= 12 && y <= 66) {
- if (x >= 47 && x <= 56) {
- int aWater = ((GT_Container_CropHarvestor) mContainer).mWaterRealAmount;
- list.add("Water: " + aWater + "L / "
- + ((GT_Container_CropHarvestor) mContainer)
- .mTileEntity
- .getMetaTileEntity()
- .getCapacity() + "L");
- }
- }
- if (!list.isEmpty()) {
- drawHoveringText(list, x, y, fontRendererObj);
- RenderHelper.enableGUIStandardItemLighting();
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GUI_PollutionCleaner.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GUI_PollutionCleaner.java
deleted file mode 100644
index 3e4280f650..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GUI_PollutionCleaner.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.basic;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.core.lib.CORE;
-import java.util.ArrayList;
-import java.util.List;
-import net.minecraft.client.renderer.RenderHelper;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GUI_PollutionCleaner extends GT_GUIContainerMetaTile_Machine {
- public final String mName;
- public final String mNEI;
- public final byte mProgressBarDirection;
- public final byte mProgressBarAmount;
- public int mReduction;
-
- public GUI_PollutionCleaner(
- final InventoryPlayer aInventoryPlayer,
- final IGregTechTileEntity aTileEntity,
- final String aName,
- final String aTextureFile) {
- this(aInventoryPlayer, aTileEntity, aName, aTextureFile, "PollutionCleaner", (byte) 0, (byte) 1);
- }
-
- public GUI_PollutionCleaner(
- final InventoryPlayer aInventoryPlayer,
- final IGregTechTileEntity aTileEntity,
- final String aName,
- final String aTextureFile,
- final String aNEI,
- final byte aProgressBarDirection,
- final byte aProgressBarAmount) {
- super(
- new CONTAINER_PollutionCleaner(aInventoryPlayer, aTileEntity),
- CORE.RES_PATH_GUI + "PollutionCleaner.png");
- this.mProgressBarDirection = aProgressBarDirection;
- this.mProgressBarAmount = (byte) Math.max(1, aProgressBarAmount);
- this.mName = aName;
- this.mNEI = aNEI;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(final int par1, final int par2) {
- this.fontRendererObj.drawString(this.mName, 8, 4, 4210752);
- this.drawTooltip(par1, par2);
- }
-
- private void drawTooltip(final int x2, final int y2) {
- final int xStart = (this.width - this.xSize) / 2;
- final int yStart = (this.height - this.ySize) / 2;
- final int x3 = x2 - xStart;
- final int y3 = y2 - yStart + 5;
- final List<String> list = new ArrayList<String>();
- if (y3 >= 67 && y3 <= 84) {
- if (x3 >= 77 && x3 <= 95) {
- // Do Dumb shit
- CONTAINER_PollutionCleaner aContainerCast = (CONTAINER_PollutionCleaner) this.mContainer;
- mReduction = aContainerCast.mReduction;
- list.add("Reduction: " + mReduction + "/s");
- }
- }
- if (!list.isEmpty()) {
- this.drawHoveringText(list, x3, y3, this.fontRendererObj);
- RenderHelper.enableGUIStandardItemLighting();
- }
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- final int x = (this.width - this.xSize) / 2;
- final int y = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_ComputerCube.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_ComputerCube.java
deleted file mode 100644
index 5aa0da1c8c..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_ComputerCube.java
+++ /dev/null
@@ -1,407 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.computer;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.gui.*;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.objects.GT_ItemStack;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.slots.SlotDataStick;
-import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.core.util.math.MathUtils;
-import gtPlusPlus.xmod.gregtech.common.tileentities.misc.GT_TileEntity_ComputerCube;
-import java.util.Iterator;
-import net.minecraft.entity.player.*;
-import net.minecraft.inventory.*;
-import net.minecraft.item.ItemStack;
-
-public class GT_Container_ComputerCube extends GT_ContainerMetaTile_Machine {
-
- public long mEUOut;
- public int mEUOut1;
- public int mEUOut2;
-
- public int mHeat;
-
- public int mMaxHeat;
-
- public int mHEM;
-
- public int mExplosionStrength;
-
- public long mEU;
- public int mEU1;
- public int mEU2;
-
- public long mStoredEU;
- public int mStoredEU1;
- public int mStoredEU2;
- public long mMaxStoredEU;
- public int mMaxStoredEU1;
- public int mMaxStoredEU2;
-
- public int mProgress;
-
- public int mID;
-
- public GT_Container_ComputerCube(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, int aID) {
- super(aInventoryPlayer, aTileEntity);
- Logger.INFO("1 Container Mode: " + aID);
- Logger.INFO("2 Container Mode: " + getMode());
- mID = getMode();
- Logger.INFO("3 Container Mode: " + getMode());
- // addSlotsComputer(aInventoryPlayer);
- detectAndSendChanges();
- }
-
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotsComputer(aInventoryPlayer);
- }
-
- private int getMode() {
- return ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mMode;
- }
-
- public void addSlotsComputer(InventoryPlayer aInventoryPlayer) {
- int y;
- mID = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mMode;
- Logger.INFO("" + (Utils.isClient() ? "Client" : "Server") + " Mode: " + mID);
- addSlotToContainer(
- new GT_Slot_Holo(this.mTileEntity, 58, 156 + ((this.mID == 5) ? 50 : 0), 4, false, false, 1));
- switch (this.mID) {
- case 1:
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 156, 86, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 156, 70, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 156, 54, false, false, 1));
- for (y = 0; y < 6; y++) {
- for (int x = 0; x < 9; x++)
- addSlotToContainer(new GT_Slot_Holo(
- this.mTileEntity, x + y * 9, 5 + x * 16, 5 + y * 16, false, false, 64));
- }
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 113, 153, 28, false, false, 64));
- break;
- case 2:
- addSlotToContainer(new SlotDataStick(this.mTileEntity, 54, 8, 28));
- addSlotToContainer(new Slot(this.mTileEntity, 55, 26, 28));
- addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 56, 134, 28));
- addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 57, 152, 28));
- break;
- case 3:
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 88, 65, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 104, 65, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 59, 122, 35, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 60, 92, 5, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 61, 122, 5, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 62, 152, 35, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 63, 122, 65, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 64, 92, 35, false, false, 64));
- break;
- case 4:
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 88, 65, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 104, 65, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 59, 122, 5, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 60, 122, 65, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 61, 152, 35, false, false, 64));
- break;
- case 5:
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 190, 146, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 206, 146, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 59, 206, 38, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 60, 206, 56, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 61, 206, 74, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 62, 206, 92, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 63, 206, 110, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 64, 153, 7, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 65, 169, 7, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 66, 185, 7, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 67, 153, 23, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 68, 169, 23, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 69, 185, 23, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 70, 153, 39, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 71, 169, 39, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 72, 185, 39, false, false, 64));
- break;
- case 6:
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 88, 65, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 104, 65, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 59, 122, 35, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 60, 92, 5, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 61, 122, 5, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 62, 152, 35, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 63, 122, 65, false, false, 64));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 64, 92, 35, false, false, 64));
- break;
- }
- }
-
- public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
- // Logger.INFO("Clicked slot " + aSlotIndex);
- if (aSlotIndex < 0) {
- // Logger.INFO("");
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
- if (this.mID != ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mMode) {
- // Logger.INFO("This ID: " + mID + ", Tile: " + ((GT_TileEntity_ComputerCube)
- // mTileEntity.getMetaTileEntity()).mMode);
- return null;
- }
- Slot tSlot = (Slot) this.inventorySlots.get(aSlotIndex);
- if (tSlot == null) {
- // Logger.INFO("Null Slot?");
- } else {
- ItemStack tStack = tSlot.getStack();
- // Logger.INFO("Good Slot!");
- if (aSlotIndex == 0) {
- // Logger.INFO("Slot is 0");
- if (aMouseclick == 0) {
- Logger.INFO("Forward");
- ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchModeForward();
- } else {
- Logger.INFO("Backwards");
- ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchModeBackward();
- }
- if (aPlayer instanceof EntityPlayerMP) {
- EntityPlayerMP aPlayerMP = (EntityPlayerMP) aPlayer;
- changePage(aPlayerMP, ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mMode);
- }
- // FMLNetworkHandler.openGui(entityPlayer, mod, modGuiId, world, x, y, z);
- // aPlayer.openGui(CORE.MODID, getComputerCubeGUIID(), this.mTileEntity.getWorld(),
- // this.mTileEntity.getXCoord(), this.mTileEntity.getYCoord(), this.mTileEntity.getZCoord());
- } else if (aSlotIndex <= 2 && this.mID == 3) {
- if (aSlotIndex == 1) {
- ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchCentrifugePageBackward();
- onCraftMatrixChanged(this.mTileEntity);
- } else if (aSlotIndex == 2) {
- ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchCentrifugePageForward();
- onCraftMatrixChanged(this.mTileEntity);
- }
- } else if (aSlotIndex <= 2 && this.mID == 6) {
- if (aSlotIndex == 1) {
- ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchElectrolyzerPageBackward();
- onCraftMatrixChanged(this.mTileEntity);
- } else if (aSlotIndex == 2) {
- ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchElectrolyzerPageForward();
- onCraftMatrixChanged(this.mTileEntity);
- }
- } else if (aSlotIndex <= 2 && this.mID == 4) {
- if (aSlotIndex == 1) {
- ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchFusionPageBackward();
- onCraftMatrixChanged(this.mTileEntity);
- } else if (aSlotIndex == 2) {
- ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchFusionPageForward();
- onCraftMatrixChanged(this.mTileEntity);
- }
- } else if (aSlotIndex <= 2 && this.mID == 5) {
- if (aSlotIndex == 1) {
- ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchDescriptionPageBackward();
- onCraftMatrixChanged(this.mTileEntity);
- } else if (aSlotIndex == 2) {
- ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchDescriptionPageForward();
- onCraftMatrixChanged(this.mTileEntity);
- }
- } else if (aSlotIndex <= 58 && this.mID == 1) {
- if (aSlotIndex == 1) {
- ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchNuclearReactor();
- onCraftMatrixChanged(this.mTileEntity);
- } else if (aSlotIndex == 2) {
- ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).loadNuclearReactor();
- onCraftMatrixChanged(this.mTileEntity);
- } else if (aSlotIndex == 3) {
- ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).saveNuclearReactor();
- } else {
- if (aShifthold == 1) {
- tSlot.putStack(null);
- ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity())
- .getSimulator()
- .slotClick(aSlotIndex, null);
- return null;
- }
-
- if (aMouseclick == 1) {
- tSlot.putStack(null);
- }
- if (aMouseclick == 0) {
- if (tStack == null) {
- if (getSlot(58).getStack() != null && aSlotIndex != 58) {
- tSlot.putStack(getSlot(58).getStack().copy());
- ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity())
- .getSimulator()
- .slotClick(
- aSlotIndex,
- new GT_ItemStack(
- getSlot(58).getStack().copy()));
- } else {
- tSlot.putStack(new ItemStack(GT_TileEntity_ComputerCube.sReactorList.get(0).mItem, 1));
- ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity())
- .getSimulator()
- .slotClick(aSlotIndex, GT_TileEntity_ComputerCube.sReactorList.get(0));
- }
- return null;
- }
- for (int i = 1; i < GT_TileEntity_ComputerCube.sReactorList.size(); i++) {
- if (GT_TileEntity_ComputerCube.sReactorList.get(i - 1).mItem == tStack.getItem()) {
- tSlot.putStack(
- new ItemStack(GT_TileEntity_ComputerCube.sReactorList.get(i).mItem, 1, 0));
- ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity())
- .getSimulator()
- .slotClick(aSlotIndex, GT_TileEntity_ComputerCube.sReactorList.get(i));
- /*if (tSlot.getStack() != null && tSlot.getStack().getItem() == GT_ModHandler.getIC2Item("reactorIsotopeCell", 1).getItem()) {
- tSlot.getStack().setItemDamage(tSlot.getStack().getMaxDamage() - 1);
- }*/
- return null;
- }
- }
- tSlot.putStack(null);
- ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity())
- .getSimulator()
- .slotClick(aSlotIndex, null);
- return null;
- }
- if (tStack == null) return null;
- if (tStack.stackSize < tStack.getMaxStackSize()) {
- tStack.stackSize++;
- return null;
- }
- tStack.stackSize = 1;
- return null;
- }
- } else {
- // Logger.INFO("Super 2");
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
- }
- // Logger.INFO("???");
- return null;
- }
-
- public void changePage(EntityPlayerMP aPlayerMP, int aMode) {
- GT_TileEntity_ComputerCube aCompTile = (GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity();
- aCompTile.onRightclick(mTileEntity, aPlayerMP);
- }
-
- public boolean doesBindPlayerInventory() {
- return (this.mID != 1 && this.mID != 5);
- }
-
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) {
- return;
- }
- mStoredEU = mTileEntity.getStoredEU();
- mMaxStoredEU = mTileEntity.getEUCapacity();
- int[] aStored = MathUtils.splitLongIntoTwoIntegers(mStoredEU);
- int[] aMaxStorage = MathUtils.splitLongIntoTwoIntegers(mMaxStoredEU);
- mStoredEU1 = aStored[0];
- mStoredEU2 = aStored[1];
- mMaxStoredEU1 = aMaxStorage[0];
- mMaxStoredEU2 = aMaxStorage[1];
-
- this.mID = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mMode;
- this.mEUOut = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mEUOut;
- int[] aEUSplit1 = MathUtils.splitLongIntoTwoIntegers(mEUOut);
- this.mEUOut1 = aEUSplit1[0];
- this.mEUOut2 = aEUSplit1[1];
- this.mHeat = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mHeat;
- this.mMaxHeat = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mMaxHeat;
- this.mHEM = (int) (((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mHEM * 10000.0F);
- this.mExplosionStrength =
- (int) (((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mExplosionStrength * 100.0F);
- this.mEU = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mEU;
- this.mProgress = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mProgress;
- this.mMaxProgressTime = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mMaxProgress;
- this.mProgressTime = (int) ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).getEUVar();
- int[] aEUSplit2 = MathUtils.splitLongIntoTwoIntegers(mEU);
- this.mEU1 = aEUSplit2[0];
- this.mEU2 = aEUSplit2[1];
- Iterator<ICrafting> var2 = this.crafters.iterator();
- while (var2.hasNext()) {
- ICrafting var1 = var2.next();
- var1.sendProgressBarUpdate(this, 101, this.mID);
- var1.sendProgressBarUpdate(this, 102, this.mHeat & 0xFFFF);
- var1.sendProgressBarUpdate(this, 103, this.mMaxHeat & 0xFFFF);
- var1.sendProgressBarUpdate(this, 104, this.mHEM);
- var1.sendProgressBarUpdate(this, 105, this.mExplosionStrength);
- var1.sendProgressBarUpdate(this, 106, this.mHeat >>> 16);
- var1.sendProgressBarUpdate(this, 107, this.mMaxHeat >>> 16);
- var1.sendProgressBarUpdate(this, 108, this.mEU1);
- var1.sendProgressBarUpdate(this, 109, this.mEU2);
- var1.sendProgressBarUpdate(this, 110, this.mProgress);
- var1.sendProgressBarUpdate(this, 111, this.mEUOut1);
- var1.sendProgressBarUpdate(this, 112, this.mEUOut2);
- var1.sendProgressBarUpdate(this, 113, mStoredEU1);
- var1.sendProgressBarUpdate(this, 114, mStoredEU2);
- var1.sendProgressBarUpdate(this, 115, mMaxStoredEU1);
- var1.sendProgressBarUpdate(this, 116, mMaxStoredEU2);
- }
- }
-
- @SideOnly(Side.CLIENT)
- public void updateProgressBar(int par1, int par2) {
- super.updateProgressBar(par1, par2);
- switch (par1) {
- case 101:
- this.mID = par2;
- break;
- case 102:
- this.mHeat = this.mHeat & 0xFFFF0000 | par2;
- break;
- case 103:
- this.mMaxHeat = this.mMaxHeat & 0xFFFF0000 | par2;
- break;
- case 104:
- this.mHEM = par2;
- break;
- case 105:
- this.mExplosionStrength = par2;
- break;
- case 106:
- this.mHeat = this.mHeat & 0xFFFF | par2 << 16;
- break;
- case 107:
- this.mMaxHeat = this.mMaxHeat & 0xFFFF | par2 << 16;
- break;
- case 108:
- this.mEU1 = par2;
- case 109:
- this.mEU2 = par2;
- this.mEU = MathUtils.combineTwoIntegersToLong(mEU1, mEU2);
- break;
- case 110:
- this.mProgress = par2;
- break;
- case 111:
- this.mEUOut1 = par2;
- case 112:
- this.mEUOut2 = par2;
- this.mEUOut = MathUtils.combineTwoIntegersToLong(mEUOut1, mEUOut2);
- break;
- case 113:
- mStoredEU1 = par2;
- break;
- case 114:
- mStoredEU2 = par2;
- mStoredEU = MathUtils.combineTwoIntegersToLong(mStoredEU1, mStoredEU2);
- break;
- case 115:
- mMaxStoredEU1 = par2;
- break;
- case 116:
- mMaxStoredEU2 = par2;
- mMaxStoredEU = MathUtils.combineTwoIntegersToLong(mMaxStoredEU1, mMaxStoredEU2);
- break;
- }
- }
-
- public int getSlotStartIndex() {
- return 1;
- }
-
- public int getSlotCount() {
- return (this.mID == 2) ? 4 : 0;
- }
-
- public int getShiftClickSlotCount() {
- return (this.mID == 2) ? 2 : 0;
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_RedstoneCircuitBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_RedstoneCircuitBlock.java
deleted file mode 100644
index d02061185a..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_RedstoneCircuitBlock.java
+++ /dev/null
@@ -1,175 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.computer;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.gui.GT_ContainerMetaTile_Machine;
-import gregtech.api.gui.GT_Slot_Holo;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_Utility;
-import gtPlusPlus.xmod.gregtech.common.tileentities.redstone.GT_MetaTileEntity_RedstoneCircuitBlock;
-import java.util.Iterator;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.ICrafting;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.oredict.OreDictionary;
-
-public class GT_Container_RedstoneCircuitBlock extends GT_ContainerMetaTile_Machine {
-
- public GT_Container_RedstoneCircuitBlock(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 0, 8, 6, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 0, 8, 24, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 0, 8, 42, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 0, 8, 60, false, true, 1));
-
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 0, 152, 6, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 0, 152, 24, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 0, 152, 42, false, true, 1));
-
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 1, 26, 6, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 2, 26, 24, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 3, 26, 42, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 4, 26, 60, false, true, 1));
- }
-
- public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
- if (aSlotIndex < 0 || aSlotIndex > 6) return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
-
- Slot tSlot = (Slot) inventorySlots.get(aSlotIndex);
- if (tSlot != null) {
- if (mTileEntity.getMetaTileEntity() == null) return null;
- if (aSlotIndex < 4) {
- ItemStack tStack = aPlayer.inventory.getItemStack();
- if (tStack == null) {
- ((GT_MetaTileEntity_RedstoneCircuitBlock) mTileEntity.getMetaTileEntity())
- .changeGateData(
- aSlotIndex,
- aMouseclick == 0
- ? aShifthold == 0 ? +1 : aShifthold == 1 ? +128 : +16
- : aShifthold == 0 ? -1 : aShifthold == 1 ? -128 : -16);
- } else {
- tStack = GT_Utility.copy(tStack);
- if (aMouseclick != 0) tStack.setItemDamage(OreDictionary.WILDCARD_VALUE);
- ((GT_MetaTileEntity_RedstoneCircuitBlock) mTileEntity.getMetaTileEntity())
- .stackGateData(aSlotIndex, tStack);
- }
- return null;
- } else if (aSlotIndex == 4) {
- ((GT_MetaTileEntity_RedstoneCircuitBlock) mTileEntity.getMetaTileEntity()).switchOutput();
- } else if (aSlotIndex == 5) {
- mTileEntity.setActive(!mTileEntity.isActive());
- } else if (aSlotIndex == 6) {
- if (aMouseclick == 0)
- ((GT_MetaTileEntity_RedstoneCircuitBlock) mTileEntity.getMetaTileEntity())
- .switchGateForward(aShifthold != 0);
- else
- ((GT_MetaTileEntity_RedstoneCircuitBlock) mTileEntity.getMetaTileEntity())
- .switchGateBackward(aShifthold != 0);
- }
- }
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
-
- public int mData[] = new int[] {0, 0, 0, 0, 0, 0, 0, 0}, mGate = 0;
-
- @SuppressWarnings("rawtypes")
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) return;
- mGate = ((GT_MetaTileEntity_RedstoneCircuitBlock) mTileEntity.getMetaTileEntity()).mGate;
- mData = ((GT_MetaTileEntity_RedstoneCircuitBlock) mTileEntity.getMetaTileEntity()).mGateData;
-
- Iterator var2 = this.crafters.iterator();
- while (var2.hasNext()) {
- ICrafting var1 = (ICrafting) var2.next();
- var1.sendProgressBarUpdate(this, 100, mGate & 65535);
- var1.sendProgressBarUpdate(this, 101, mGate >>> 16);
- var1.sendProgressBarUpdate(this, 102, mData[0] & 65535);
- var1.sendProgressBarUpdate(this, 103, mData[0] >>> 16);
- var1.sendProgressBarUpdate(this, 104, mData[1] & 65535);
- var1.sendProgressBarUpdate(this, 105, mData[1] >>> 16);
- var1.sendProgressBarUpdate(this, 106, mData[2] & 65535);
- var1.sendProgressBarUpdate(this, 107, mData[2] >>> 16);
- var1.sendProgressBarUpdate(this, 108, mData[3] & 65535);
- var1.sendProgressBarUpdate(this, 109, mData[3] >>> 16);
- var1.sendProgressBarUpdate(this, 110, mData[4] & 65535);
- var1.sendProgressBarUpdate(this, 111, mData[4] >>> 16);
- var1.sendProgressBarUpdate(this, 112, mData[5] & 65535);
- var1.sendProgressBarUpdate(this, 113, mData[5] >>> 16);
- var1.sendProgressBarUpdate(this, 114, mData[6] & 65535);
- var1.sendProgressBarUpdate(this, 115, mData[6] >>> 16);
- var1.sendProgressBarUpdate(this, 116, mData[7] & 65535);
- var1.sendProgressBarUpdate(this, 117, mData[7] >>> 16);
- }
- }
-
- public void addCraftingToCrafters(ICrafting par1ICrafting) {
- super.addCraftingToCrafters(par1ICrafting);
- }
-
- @SideOnly(Side.CLIENT)
- public void updateProgressBar(int par1, int par2) {
- super.updateProgressBar(par1, par2);
- switch (par1) {
- case 100:
- mGate = mGate & -65536 | par2;
- break;
- case 101:
- mGate = mGate & 65535 | par2 << 16;
- break;
- case 102:
- mData[0] = mData[0] & -65536 | par2;
- break;
- case 103:
- mData[0] = mData[0] & 65535 | par2 << 16;
- break;
- case 104:
- mData[1] = mData[1] & -65536 | par2;
- break;
- case 105:
- mData[1] = mData[1] & 65535 | par2 << 16;
- break;
- case 106:
- mData[2] = mData[2] & -65536 | par2;
- break;
- case 107:
- mData[2] = mData[2] & 65535 | par2 << 16;
- break;
- case 108:
- mData[3] = mData[3] & -65536 | par2;
- break;
- case 109:
- mData[3] = mData[3] & 65535 | par2 << 16;
- break;
- case 110:
- mData[4] = mData[4] & -65536 | par2;
- break;
- case 111:
- mData[4] = mData[4] & 65535 | par2 << 16;
- break;
- case 112:
- mData[5] = mData[5] & -65536 | par2;
- break;
- case 113:
- mData[5] = mData[5] & 65535 | par2 << 16;
- break;
- case 114:
- mData[6] = mData[6] & -65536 | par2;
- break;
- case 115:
- mData[6] = mData[6] & 65535 | par2 << 16;
- break;
- case 116:
- mData[7] = mData[7] & -65536 | par2;
- break;
- case 117:
- mData[7] = mData[7] & 65535 | par2 << 16;
- break;
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_ComputerCube.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_ComputerCube.java
deleted file mode 100644
index c7d2c47f7b..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_ComputerCube.java
+++ /dev/null
@@ -1,225 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.computer;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.core.util.math.MathUtils;
-import gtPlusPlus.xmod.gregtech.common.computer.GT_Computercube_Description;
-import gtPlusPlus.xmod.gregtech.common.tileentities.misc.GT_TileEntity_ComputerCube;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.util.StatCollector;
-
-public class GT_GUIContainer_ComputerCube extends GT_GUIContainerMetaTile_Machine {
-
- public final GT_Container_ComputerCube mPowerContainer;
-
- public GT_GUIContainer_ComputerCube(
- InventoryPlayer aInventoryPlayer, IGregTechTileEntity aBaseMetaTileEntity, int aID) {
- super(
- new GT_Container_ComputerCube(aInventoryPlayer, aBaseMetaTileEntity, aID),
- CORE.RES_PATH_GUI + "computer/" + aID + ".png");
- mPowerContainer = (GT_Container_ComputerCube) mContainer;
- if (mPowerContainer.mID == 5) {
- this.xSize += 50;
- }
- }
-
- public static ResourceLocation[] mGUIbackground = new ResourceLocation[8];
-
- static {
- mGUIbackground[0] = new ResourceLocation(CORE.RES_PATH_GUI + "computer/0.png");
- mGUIbackground[1] = new ResourceLocation(CORE.RES_PATH_GUI + "computer/1.png");
- mGUIbackground[2] = new ResourceLocation(CORE.RES_PATH_GUI + "computer/2.png");
- mGUIbackground[3] = new ResourceLocation(CORE.RES_PATH_GUI + "computer/3.png");
- mGUIbackground[4] = new ResourceLocation(CORE.RES_PATH_GUI + "computer/4.png");
- mGUIbackground[5] = new ResourceLocation(CORE.RES_PATH_GUI + "computer/5.png");
- mGUIbackground[6] = new ResourceLocation(CORE.RES_PATH_GUI + "computer/6.png");
- mGUIbackground[7] = new ResourceLocation(CORE.RES_PATH_GUI + "computer/Redstone.png");
- }
-
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- GT_Container_ComputerCube tContainer = (GT_Container_ComputerCube) this.mContainer;
- // Logger.INFO("3 GUI Mode: "+xSize);
- // GT_TileEntity_ComputerCube tTileEntity = (GT_TileEntity_ComputerCube) tContainer.mTileEntity;
- if (tContainer != null)
- switch (tContainer.mID) {
- case 0:
- this.fontRendererObj.drawString("Solaris 1.7.10", 56, 70, Utils.rgbtoHexValue(100, 190, 255));
- // this.fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8,
- // this.ySize - 96 + 2, 4210752);
- break;
- case 1:
- this.fontRendererObj.drawString("Reactorstats:", 7, 108, 16448255);
- this.fontRendererObj.drawString(
- toNumber(tContainer.mEU) + "EU at " + tContainer.mEUOut + "EU/t", 7, 120, 16448255);
- this.fontRendererObj.drawString("HEM: " + (tContainer.mHEM / 10000.0F), 7, 128, 16448255);
- this.fontRendererObj.drawString(
- toNumber(tContainer.mHeat) + "/" + toNumber(tContainer.mMaxHeat) + "Heat",
- 7,
- 136,
- 16448255);
- this.fontRendererObj.drawString(
- "Explosionpower: " + (tContainer.mExplosionStrength / 100.0F), 7, 144, 16448255);
- this.fontRendererObj.drawString(
- "Runtime: "
- + ((tContainer.mProgress > 0)
- ? (
- /*(tContainer.mEU / tContainer.mEUOut)*/ tContainer.mProgress / 20)
- : 0)
- + "secs",
- 7,
- 152,
- 16448255);
- break;
- case 2:
- this.fontRendererObj.drawString("Scanner", 51, 7, 16448255);
- if (tContainer.mProgress == 0) {
- this.fontRendererObj.drawString("Can be used to", 51, 24, 16448255);
- this.fontRendererObj.drawString("scan things", 51, 32, 16448255);
- this.fontRendererObj.drawString("Currently", 51, 48, Utils.rgbtoHexValue(200, 20, 20));
- this.fontRendererObj.drawString("Disabled", 51, 56, Utils.rgbtoHexValue(200, 20, 20));
- } else {
- this.fontRendererObj.drawString("Progress:", 51, 24, 16448255);
- this.fontRendererObj.drawString(
- MathUtils.findPercentage(tContainer.mProgress, tContainer.mMaxProgressTime) + " %",
- 51,
- 32,
- 16448255);
- }
- this.fontRendererObj.drawString(
- StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
- break;
- case 3:
- this.fontRendererObj.drawString("Centrifuge", 7, 7, 16448255);
- this.fontRendererObj.drawString(
- "Recipe: " + (tContainer.mMaxHeat + 1) + "/"
- + GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.size(),
- 7,
- 23,
- 16448255);
- this.fontRendererObj.drawString("EU: " + toNumber(tContainer.mEU), 7, 31, 16448255);
- break;
- case 4:
- this.fontRendererObj.drawString("Fusionreactor", 7, 7, 16448255);
- this.fontRendererObj.drawString(
- "Recipe: " + (tContainer.mMaxHeat + 1) + "/"
- + GT_TileEntity_ComputerCube.sFusionReactorRecipes.size(),
- 7,
- 15,
- 16448255);
- this.fontRendererObj.drawString("Start: " + toNumber(tContainer.mEU) + "EU", 7, 23, 16448255);
- this.fontRendererObj.drawString("EU/t: " + toNumber(tContainer.mEUOut), 7, 31, 16448255);
- this.fontRendererObj.drawString(toNumber(tContainer.mHeat) + " Ticks", 7, 39, 16448255);
- GT_Recipe tRecipe = GT_TileEntity_ComputerCube.sFusionReactorRecipes.get(tContainer.mMaxHeat);
- this.fontRendererObj.drawString("" + tRecipe.mFluidOutputs[0].getLocalizedName(), 7, 55, 16448255);
- if (tContainer.mEUOut < 0) {
- this.fontRendererObj.drawString(
- "IN: " + toNumber(-tContainer.mEUOut * tContainer.mHeat) + "EU", 7, 47, 16448255);
- break;
- }
- this.fontRendererObj.drawString(
- "OUT: " + toNumber(tContainer.mEUOut * tContainer.mHeat) + "EU", 7, 47, 16448255);
- break;
- case 5:
- if (tContainer.mID == 5 && this.xSize == 176) {
- this.xSize += 50;
- }
- if (tContainer.mMaxHeat >= 0
- && tContainer.mMaxHeat < GT_Computercube_Description.sDescriptions.size())
- for (int i = 0;
- i
- < ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(
- tContainer.mMaxHeat))
- .mDescription
- .length;
- i++) {
- if (i == 0) {
- this.fontRendererObj.drawString(
- ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(
- tContainer.mMaxHeat))
- .mDescription[i],
- 7,
- 7,
- 16448255);
- } else {
- this.fontRendererObj.drawString(
- ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(
- tContainer.mMaxHeat))
- .mDescription[i],
- 7,
- 7 + 8 * i,
- 16448255);
- }
- }
- break;
- case 6:
- this.fontRendererObj.drawString("Electrolyzer", 7, 7, 16448255);
- this.fontRendererObj.drawString(
- "Recipe: " + (tContainer.mMaxHeat + 1) + "/"
- + GT_Recipe_Map.sElectrolyzerRecipes.mRecipeList.size(),
- 7,
- 23,
- 16448255);
- this.fontRendererObj.drawString("EU: " + toNumber(tContainer.mEU), 7, 31, 16448255);
- break;
- }
- }
-
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- if (mContainer != null) {
- GT_Container_ComputerCube tContainer = (GT_Container_ComputerCube) this.mContainer;
- mc.renderEngine.bindTexture(mGUIbackground[((GT_Container_ComputerCube) this.mContainer).mID]);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- switch (tContainer.mID) {
- case 0:
- if (this.mPowerContainer.mStoredEU > 0 && this.mPowerContainer.mMaxStoredEU > 0) {
- final double tScale = MathUtils.findPercentage(
- this.mPowerContainer.mStoredEU, this.mPowerContainer.mMaxStoredEU);
- this.drawTexturedModalRect(
- x + 44, y + 8, 0, 166, Math.min(MathUtils.roundToClosestInt(tScale), 95), 5);
- } else {
- //
- // Logger.INFO("1 No Power? "+tContainer.mProgressTime+" |
- // "+tContainer.mTileEntity.getEUCapacity());
- // Logger.INFO("2 No Power? "+aComp.getEUVar()+" | "+aComp.maxEUStore());
- }
- break;
- case 5:
- if (tContainer.mExplosionStrength != 0) drawTexturedModalRect(x + 152, y + 6, 0, 166, 50, 50);
- break;
- }
- }
- }
-
- public String toNumber(long mEU) {
- String tString = "";
- boolean temp = true, negative = false;
- if (mEU < 0) {
- mEU *= -1;
- negative = true;
- }
- int i;
- for (i = 1000000000; i > 0; i /= 10) {
- long tDigit = mEU / i % 10;
- if (temp && tDigit != 0) temp = false;
- if (!temp) {
- tString = tString + tDigit;
- if (i != 1) {
- int j;
- for (j = i; j > 0; ) {
- if (j == 1) tString = tString + ",";
- j /= 1000;
- }
- }
- }
- }
- if (tString.equals("")) tString = "0";
- return negative ? ("-" + tString) : tString;
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_RedstoneCircuitBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_RedstoneCircuitBlock.java
deleted file mode 100644
index 2612ad5592..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_RedstoneCircuitBlock.java
+++ /dev/null
@@ -1,136 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.computer;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_CircuitryBehavior;
-import gregtech.api.util.GT_Utility;
-import gtPlusPlus.core.lib.CORE;
-import java.util.ArrayList;
-import java.util.List;
-import net.minecraft.client.renderer.RenderHelper;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GT_GUIContainer_RedstoneCircuitBlock extends GT_GUIContainerMetaTile_Machine {
-
- public GT_GUIContainer_RedstoneCircuitBlock(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(
- new GT_Container_RedstoneCircuitBlock(aInventoryPlayer, aTileEntity),
- CORE.RES_PATH_GUI + "RedstoneCircuitBlock.png");
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- GT_CircuitryBehavior tCircuit =
- GregTech_API.sCircuitryBehaviors.get(((GT_Container_RedstoneCircuitBlock) mContainer).mGate);
- if (tCircuit != null) {
- this.fontRendererObj.drawString(tCircuit.getName(), 46, 8, 16448255);
- this.fontRendererObj.drawString(tCircuit.getDescription(), 46, 19, 16448255);
-
- this.fontRendererObj.drawString(
- tCircuit.getDataDescription(((GT_Container_RedstoneCircuitBlock) mContainer).mData, 0),
- 46,
- 33,
- 16448255);
- this.fontRendererObj.drawString(
- tCircuit.getDataDescription(((GT_Container_RedstoneCircuitBlock) mContainer).mData, 1),
- 46,
- 44,
- 16448255);
- this.fontRendererObj.drawString(
- tCircuit.getDataDescription(((GT_Container_RedstoneCircuitBlock) mContainer).mData, 2),
- 46,
- 55,
- 16448255);
- this.fontRendererObj.drawString(
- tCircuit.getDataDescription(((GT_Container_RedstoneCircuitBlock) mContainer).mData, 3),
- 46,
- 66,
- 16448255);
-
- String tString;
- tString = tCircuit.getDataDisplay(((GT_Container_RedstoneCircuitBlock) mContainer).mData, 0);
- this.fontRendererObj.drawString(
- tString == null
- ? GT_Utility.parseNumberToString(((GT_Container_RedstoneCircuitBlock) mContainer).mData[0])
- : tString,
- 99,
- 33,
- 16448255);
- tString = tCircuit.getDataDisplay(((GT_Container_RedstoneCircuitBlock) mContainer).mData, 1);
- this.fontRendererObj.drawString(
- tString == null
- ? GT_Utility.parseNumberToString(((GT_Container_RedstoneCircuitBlock) mContainer).mData[1])
- : tString,
- 99,
- 44,
- 16448255);
- tString = tCircuit.getDataDisplay(((GT_Container_RedstoneCircuitBlock) mContainer).mData, 2);
- this.fontRendererObj.drawString(
- tString == null
- ? GT_Utility.parseNumberToString(((GT_Container_RedstoneCircuitBlock) mContainer).mData[2])
- : tString,
- 99,
- 55,
- 16448255);
- tString = tCircuit.getDataDisplay(((GT_Container_RedstoneCircuitBlock) mContainer).mData, 3);
- this.fontRendererObj.drawString(
- tString == null
- ? GT_Utility.parseNumberToString(((GT_Container_RedstoneCircuitBlock) mContainer).mData[3])
- : tString,
- 99,
- 66,
- 16448255);
- }
- this.drawTooltip(par1, par2);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
-
- if (mContainer != null) {
- if (((GT_Container_RedstoneCircuitBlock) mContainer).mOutput > 0)
- drawTexturedModalRect(x + 151, y + 5, 176, 0, 18, 18);
- if ((((GT_Container_RedstoneCircuitBlock) mContainer).mActive & 1) > 0)
- drawTexturedModalRect(x + 151, y + 23, 176, 18, 18, 18);
- if (((GT_Container_RedstoneCircuitBlock) mContainer).mDisplayErrorCode > 0)
- if ((((GT_Container_RedstoneCircuitBlock) mContainer).mTileEntity.getTimer() / 5) % 2 == 0)
- drawTexturedModalRect(x + 140, y + 9, 194, 0, 7, 7);
- else
- ;
- else drawTexturedModalRect(x + 140, y + 9, 201, 0, 7, 7);
- }
- }
-
- private void drawTooltip(final int x2, final int y2) {
- final int xStart = (this.width - this.xSize) / 2;
- final int yStart = (this.height - this.ySize) / 2;
- final int x3 = x2 - xStart;
- final int y3 = y2 - yStart + 5;
- final List<String> list = new ArrayList<String>();
-
- int y = 10;
- if (x3 >= 151 && x3 <= 168) {
- if (y3 >= y && y3 <= (y + 17)) {
- list.add("Toggle EU Output");
- }
- if (y3 >= (y + 18) && y3 <= (y + 35)) {
- list.add("Toggle Active State");
- }
- if (y3 >= (y + 36) && y3 <= (y + 53)) {
- list.add("Change Redstone Circuit");
- }
- }
-
- if (!list.isEmpty()) {
- // RenderHelper.enableGUIStandardItemLighting();
- this.drawHoveringText(list, x3, y3, this.fontRendererObj);
- RenderHelper.enableGUIStandardItemLighting();
- }
- // RenderHelper.enableStandardItemLighting();
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/Container_FluidReactor.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/Container_FluidReactor.java
deleted file mode 100644
index dff58351e0..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/Container_FluidReactor.java
+++ /dev/null
@@ -1,174 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.fluidreactor;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.gui.GT_Container_BasicMachine;
-import gregtech.api.gui.GT_Slot_Render;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.slots.SlotChemicalPlantInput;
-import gtPlusPlus.core.slots.SlotNoInput;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
-import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaTileEntity_ChemicalReactor;
-import java.util.Iterator;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.ICrafting;
-import net.minecraft.item.ItemStack;
-
-public class Container_FluidReactor extends GT_Container_BasicMachine {
-
- public boolean mFluidTransfer_1 = false;
- public boolean mFluidTransfer_2 = false;
- public boolean oFluidTransfer_1 = false;
- public boolean oFluidTransfer_2 = false;
-
- public Container_FluidReactor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- @Override
- public void addSlots(InventoryPlayer aInventoryPlayer) {
-
- // Gui Buttons
- this.addSlotToContainer(new SlotNoInput(this.mTileEntity, 0, 8, 63)); // Fluid 1
- this.addSlotToContainer(new SlotNoInput(this.mTileEntity, 1, 44, 63));
- this.addSlotToContainer(new SlotNoInput(this.mTileEntity, 2, 26, 63)); // Fluid 2
-
- int tStartIndex = 3;
- // Input Slots
- this.addSlotToContainer(new SlotChemicalPlantInput(this.mTileEntity, tStartIndex++, 8, 7));
- this.addSlotToContainer(new SlotChemicalPlantInput(this.mTileEntity, tStartIndex++, 26, 7));
- this.addSlotToContainer(new SlotChemicalPlantInput(this.mTileEntity, tStartIndex++, 44, 7));
- this.addSlotToContainer(new SlotChemicalPlantInput(this.mTileEntity, tStartIndex++, 62, 7));
-
- // Output Slots
- this.addSlotToContainer(new SlotNoInput(this.mTileEntity, tStartIndex++, 107, 16));
- this.addSlotToContainer(new SlotNoInput(this.mTileEntity, tStartIndex++, 125, 16));
- this.addSlotToContainer(new SlotNoInput(this.mTileEntity, tStartIndex++, 107, 34));
- this.addSlotToContainer(new SlotNoInput(this.mTileEntity, tStartIndex++, 125, 34));
-
- // Cell Collector Slot
- this.addSlotToContainer(new SlotNoInput(this.mTileEntity, tStartIndex++, 116, 63));
-
- // Inputs Fluids
- this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, tStartIndex++, 8, 42));
- this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, tStartIndex++, 26, 42));
- this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, tStartIndex++, 44, 42));
- this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, tStartIndex++, 62, 42));
-
- // Output Fluids
- this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, tStartIndex++, 143, 16));
- this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, tStartIndex++, 143, 34));
- }
-
- public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
- if (aSlotIndex == 0 || aSlotIndex == 2) {
- if (this.mTileEntity != null && this.mTileEntity.isServerSide()) {
- try {
- final IMetaTileEntity aMetaTileEntity = this.mTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- return null;
- }
- if (aMetaTileEntity instanceof GregtechMetaTileEntity_ChemicalReactor) {
- // Set Tile
- if (aSlotIndex == 0) {
- ((GregtechMetaTileEntity_ChemicalReactor) aMetaTileEntity).mFluidTransfer_1 =
- !((GregtechMetaTileEntity_ChemicalReactor) aMetaTileEntity).mFluidTransfer_1;
- } else if (aSlotIndex == 2) {
- ((GregtechMetaTileEntity_ChemicalReactor) aMetaTileEntity).mFluidTransfer_2 =
- !((GregtechMetaTileEntity_ChemicalReactor) aMetaTileEntity).mFluidTransfer_2;
- }
- return null;
- }
- } catch (Throwable t) {
- t.printStackTrace();
- }
- }
- }
- // Logger.INFO("Clicked slot "+aSlotIndex);
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
-
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if (this.mTileEntity != null && this.mTileEntity.isServerSide()) {
- try {
- Iterator var2 = this.crafters.iterator();
- final IMetaTileEntity aMetaTileEntity = this.mTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- Logger.INFO("bad");
- return;
- }
- if (aMetaTileEntity instanceof GregtechMetaTileEntity_ChemicalReactor) {
- // Read from Tile
- this.mFluidTransfer_1 = ((GregtechMetaTileEntity_ChemicalReactor) aMetaTileEntity).mFluidTransfer_1;
- this.mFluidTransfer_2 = ((GregtechMetaTileEntity_ChemicalReactor) aMetaTileEntity).mFluidTransfer_2;
- int mTimer;
- mTimer = (int)
- ReflectionUtils.getField(this.getClass(), "mTimer").get(this);
- while (true) {
- ICrafting var1;
- do {
- if (!var2.hasNext()) {
- this.oFluidTransfer_1 = this.mFluidTransfer_1;
- this.oFluidTransfer_2 = this.mFluidTransfer_2;
- return;
- }
- var1 = (ICrafting) var2.next();
- if (mTimer % 500 == 10 || this.oFluidTransfer_1 != this.mFluidTransfer_1) {
- var1.sendProgressBarUpdate(this, -50, this.mFluidTransfer_1 ? 1 : 0);
- }
- if (mTimer % 500 == 10 || this.oFluidTransfer_2 != this.mFluidTransfer_2) {
- var1.sendProgressBarUpdate(this, -51, this.mFluidTransfer_2 ? 1 : 0);
- }
- } while (mTimer % 500 != 10);
- }
- } else {
- Logger.INFO("bad cast");
- }
- } catch (IllegalArgumentException | IllegalAccessException e) {
- e.printStackTrace();
- }
- }
- }
-
- public void addCraftingToCrafters(ICrafting par1ICrafting) {
- super.addCraftingToCrafters(par1ICrafting);
- }
-
- @SideOnly(Side.CLIENT)
- public void updateProgressBar(int par1, int par2) {
- if (par1 > 0) {
- super.updateProgressBar(par1, par2);
- } else {
- switch (par1) {
- case -50:
- this.mFluidTransfer_1 = par2 != 0;
- break;
- case -51:
- this.mFluidTransfer_2 = par2 != 0;
- break;
- default:
- break;
- }
- }
- }
-
- public int getSlotStartIndex() {
- return 3;
- }
-
- public int getShiftClickStartIndex() {
- return 3;
- }
-
- public int getSlotCount() {
- return this.getShiftClickSlotCount() + 5 + 2;
- }
-
- public int getShiftClickSlotCount() {
- return 4;
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/GUI_FluidReactor.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/GUI_FluidReactor.java
deleted file mode 100644
index fa8c9f571d..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/GUI_FluidReactor.java
+++ /dev/null
@@ -1,135 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.fluidreactor;
-
-import gregtech.api.gui.GT_Container_BasicMachine;
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.core.lib.CORE;
-import java.util.ArrayList;
-import java.util.List;
-import net.minecraft.client.renderer.RenderHelper;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GUI_FluidReactor extends GT_GUIContainerMetaTile_Machine {
- public final String mName;
- public final String mNEI;
- public final byte mProgressBarDirection;
- public final byte mProgressBarAmount;
-
- public GUI_FluidReactor(
- InventoryPlayer aInventoryPlayer,
- IGregTechTileEntity aTileEntity,
- String aName,
- String aTextureFile,
- String aNEI) {
- this(aInventoryPlayer, aTileEntity, aName, aTextureFile, aNEI, (byte) 0, (byte) 1);
- }
-
- public GUI_FluidReactor(
- InventoryPlayer aInventoryPlayer,
- IGregTechTileEntity aTileEntity,
- String aName,
- String aTextureFile,
- String aNEI,
- byte aProgressBarDirection,
- byte aProgressBarAmount) {
- super(new Container_FluidReactor(aInventoryPlayer, aTileEntity), CORE.MODID + ":textures/gui/FluidReactor.png");
- this.mProgressBarDirection = aProgressBarDirection;
- this.mProgressBarAmount = (byte) Math.max(1, aProgressBarAmount);
- this.mName = aName;
- this.mNEI = aNEI;
- }
-
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- this.fontRendererObj.drawString(this.mName, 82, 5, 4210752);
- this.drawTooltip(par1, par2);
- }
-
- private void drawTooltip(int x2, int y2) {
- int xStart = (this.width - this.xSize) / 2;
- int yStart = (this.height - this.ySize) / 2;
- int x = x2 - xStart;
- int y = y2 - yStart + 5;
- List<String> list = new ArrayList();
- if (y >= 67 && y <= 84) {
- if (x >= 7 && x <= 24) {
- list.add("Fluid 1 Auto-Output");
- }
- if (x >= 25 && x <= 42) {
- list.add("Fluid 2 Auto-Output");
- }
- if (x >= 43 && x <= 61) {
- list.add("Item Auto-Output");
- }
- }
-
- if (!list.isEmpty()) {
- this.drawHoveringText(list, x, y, this.fontRendererObj);
- RenderHelper.enableGUIStandardItemLighting();
- }
- }
-
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (this.width - this.xSize) / 2;
- int y = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- if (this.mContainer != null) {
- if (((Container_FluidReactor) this.mContainer).mFluidTransfer_1) {
- this.drawTexturedModalRect(x + 7, y + 62, 176, 18, 18, 18);
- }
- if (((Container_FluidReactor) this.mContainer).mFluidTransfer_2) {
- this.drawTexturedModalRect(x + 25, y + 62, 194, 18, 18, 18);
- }
- if (((GT_Container_BasicMachine) this.mContainer).mItemTransfer) {
- this.drawTexturedModalRect(x + 43, y + 62, 176, 36, 18, 18);
- }
-
- if (((GT_Container_BasicMachine) this.mContainer).mStuttering) {
- this.drawTexturedModalRect(x + 79, y + 44, 176, 54, 18, 18);
- }
-
- if (this.mContainer.mMaxProgressTime > 0) {
- int tSize = this.mProgressBarDirection < 2 ? 20 : 18;
- int tProgress = Math.max(
- 1,
- Math.min(
- tSize * this.mProgressBarAmount,
- (this.mContainer.mProgressTime > 0 ? 1 : 0)
- + this.mContainer.mProgressTime
- * tSize
- * this.mProgressBarAmount
- / this.mContainer.mMaxProgressTime))
- % (tSize + 1);
- switch (this.mProgressBarDirection) {
- case 0:
- this.drawTexturedModalRect(x + 82, y + 24, 176, 0, tProgress, 18);
- break;
- case 1:
- this.drawTexturedModalRect(x + 82 + 20 - tProgress, y + 24, 196 - tProgress, 0, tProgress, 18);
- break;
- case 2:
- this.drawTexturedModalRect(x + 82, y + 24, 176, 0, 20, tProgress);
- break;
- case 3:
- this.drawTexturedModalRect(x + 82, y + 24 + 18 - tProgress, 176, 18 - tProgress, 20, tProgress);
- break;
- case 4:
- tProgress = 20 - tProgress;
- this.drawTexturedModalRect(x + 82, y + 24, 176, 0, tProgress, 18);
- break;
- case 5:
- tProgress = 20 - tProgress;
- this.drawTexturedModalRect(x + 82 + 20 - tProgress, y + 24, 196 - tProgress, 0, tProgress, 18);
- break;
- case 6:
- tProgress = 18 - tProgress;
- this.drawTexturedModalRect(x + 82, y + 24, 176, 0, 20, tProgress);
- break;
- case 7:
- tProgress = 18 - tProgress;
- this.drawTexturedModalRect(x + 82, y + 24 + 18 - tProgress, 176, 18 - tProgress, 20, tProgress);
- }
- }
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_1by1_Turbine.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_1by1_Turbine.java
deleted file mode 100644
index 836e7198c3..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_1by1_Turbine.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.hatches;
-
-import gregtech.api.gui.GT_Container_1by1;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.turbines.GregtechMetaTileEntity_LargerTurbineBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-public class CONTAINER_1by1_Turbine extends GT_Container_1by1 {
-
- public CONTAINER_1by1_Turbine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- @Override
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new SlotTurbine(mTileEntity, 0, 80, 35));
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 0;
- }
-
- @Override
- public boolean canDragIntoSlot(Slot par1Slot) {
- return false;
- }
-
- public class SlotTurbine extends Slot {
- public SlotTurbine(final IInventory inventory, final int x, final int y, final int z) {
- super(inventory, x, y, z);
- }
-
- @Override
- public boolean isItemValid(final ItemStack itemstack) {
- return GregtechMetaTileEntity_LargerTurbineBase.isValidTurbine(itemstack);
- }
-
- @Override
- public int getSlotStackLimit() {
- return 1;
- }
-
- @Override
- public boolean canTakeStack(EntityPlayer p_82869_1_) {
- return false;
- }
-
- @Override
- public void putStack(ItemStack aStack) {
- if (isItemValid(aStack)) {
- this.inventory.setInventorySlotContents(0, aStack);
- }
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_2by2.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_2by2.java
deleted file mode 100644
index 60106825a0..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_2by2.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.hatches;
-
-import gregtech.api.gui.GT_ContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-
-public class CONTAINER_2by2 extends GT_ContainerMetaTile_Machine {
-
- public CONTAINER_2by2(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- @Override
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new Slot(mTileEntity, 0, 71, 26));
- addSlotToContainer(new Slot(mTileEntity, 1, 89, 26));
- addSlotToContainer(new Slot(mTileEntity, 2, 71, 44));
- addSlotToContainer(new Slot(mTileEntity, 3, 89, 44));
- }
-
- @Override
- public int getSlotCount() {
- return 4;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 4;
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_4by4.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_4by4.java
deleted file mode 100644
index 0c011f164b..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_4by4.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.hatches;
-
-import gregtech.api.gui.GT_ContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-
-public class CONTAINER_4by4 extends GT_ContainerMetaTile_Machine {
-
- public CONTAINER_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- @Override
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new Slot(mTileEntity, 0, 53, 8));
- addSlotToContainer(new Slot(mTileEntity, 1, 71, 8));
- addSlotToContainer(new Slot(mTileEntity, 2, 89, 8));
- addSlotToContainer(new Slot(mTileEntity, 3, 107, 8));
- addSlotToContainer(new Slot(mTileEntity, 4, 53, 26));
- addSlotToContainer(new Slot(mTileEntity, 5, 71, 26));
- addSlotToContainer(new Slot(mTileEntity, 6, 89, 26));
- addSlotToContainer(new Slot(mTileEntity, 7, 107, 26));
- addSlotToContainer(new Slot(mTileEntity, 8, 53, 44));
- addSlotToContainer(new Slot(mTileEntity, 9, 71, 44));
- addSlotToContainer(new Slot(mTileEntity, 10, 89, 44));
- addSlotToContainer(new Slot(mTileEntity, 11, 107, 44));
- addSlotToContainer(new Slot(mTileEntity, 12, 53, 62));
- addSlotToContainer(new Slot(mTileEntity, 13, 71, 62));
- addSlotToContainer(new Slot(mTileEntity, 14, 89, 62));
- addSlotToContainer(new Slot(mTileEntity, 15, 107, 62));
- }
-
- @Override
- public int getSlotCount() {
- return 16;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 16;
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_HatchNbtConsumable.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_HatchNbtConsumable.java
deleted file mode 100644
index 9f3f42bb9b..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_HatchNbtConsumable.java
+++ /dev/null
@@ -1,298 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.hatches;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.gui.GT_Container;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_LanguageManager;
-import gtPlusPlus.core.slots.SlotNoInput;
-import java.util.Iterator;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.ICrafting;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-public class CONTAINER_HatchNbtConsumable extends GT_Container {
-
- public final int mInputslotCount;
- private final int mTotalSlotCount;
-
- public CONTAINER_HatchNbtConsumable(
- InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, int aInputslotCount) {
- super(aInventoryPlayer, aTileEntity);
- mInputslotCount = aInputslotCount;
- mTotalSlotCount = aInputslotCount * 2;
- mTileEntity = aTileEntity;
- if (mTileEntity != null && mTileEntity.getMetaTileEntity() != null) {
- addSlots(aInventoryPlayer);
- if (doesBindPlayerInventory()) {
- bindPlayerInventory(aInventoryPlayer);
- }
- detectAndSendChanges();
- } else {
- aInventoryPlayer.player.openContainer = aInventoryPlayer.player.inventoryContainer;
- }
- }
-
- @Override
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- if (mTotalSlotCount == 8) {
- final int aSlotYStart = 26;
- final int aSlotYFinish = aSlotYStart + (18 * 2);
- final int aSlotXStart1 = 26;
- final int aSlotXFinish1 = aSlotXStart1 + (18 * 2);
- final int aSlotXStart2 = 116;
- final int aSlotXFinish2 = aSlotXStart2 + (18 * 2);
- int aSlotID = 0;
- for (int y = aSlotYStart; y < aSlotYFinish; y += 18) {
- for (int x = aSlotXStart1; x < aSlotXFinish1; x += 18) {
- addSlotToContainer(new Slot(mTileEntity, aSlotID++, x, y));
- }
- }
- for (int y = aSlotYStart; y < aSlotYFinish; y += 18) {
- for (int x = aSlotXStart2; x < aSlotXFinish2; x += 18) {
- addSlotToContainer(new ViewingSlot(mTileEntity, aSlotID++, x, y));
- }
- }
- } else if (mTotalSlotCount == 18) {
- int aSlotYStart = 20;
- int aSlotYFinish = aSlotYStart + (18 * 3);
- int aSlotXStart1 = 26;
- int aSlotXFinish1 = aSlotXStart1 + (18 * 3);
- int aSlotXStart2 = 98;
- int aSlotXFinish2 = aSlotXStart2 + (18 * 3);
- int aSlotID = 0;
- for (int y = aSlotYStart; y < aSlotYFinish; y += 18) {
- for (int x = aSlotXStart1; x < aSlotXFinish1; x += 18) {
- addSlotToContainer(new Slot(mTileEntity, aSlotID++, x, y));
- }
- }
- for (int y = aSlotYStart; y < aSlotYFinish; y += 18) {
- for (int x = aSlotXStart2; x < aSlotXFinish2; x += 18) {
- addSlotToContainer(new ViewingSlot(mTileEntity, aSlotID++, x, y));
- }
- }
- } else if (mTotalSlotCount == 32) {
- int aSlotYStart = 8;
- int aSlotYFinish = aSlotYStart + (18 * 4);
- int aSlotXStart1 = 8;
- int aSlotXFinish1 = aSlotXStart1 + (18 * 4);
- int aSlotXStart2 = 97;
- int aSlotXFinish2 = aSlotXStart2 + (18 * 4);
- int aSlotID = 0;
- for (int y = aSlotYStart; y < aSlotYFinish; y += 18) {
- for (int x = aSlotXStart1; x < aSlotXFinish1; x += 18) {
- addSlotToContainer(new Slot(mTileEntity, aSlotID++, x, y));
- }
- }
- for (int y = aSlotYStart; y < aSlotYFinish; y += 18) {
- for (int x = aSlotXStart2; x < aSlotXFinish2; x += 18) {
- addSlotToContainer(new ViewingSlot(mTileEntity, aSlotID++, x, y));
- }
- }
- }
- }
-
- @Override
- public int getSlotCount() {
- return mTotalSlotCount;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return mInputslotCount;
- }
-
- /*
- * Uselss stuff copied from GT
- */
-
- public int mActive = 0,
- mMaxProgressTime = 0,
- mProgressTime = 0,
- mEnergy = 0,
- mSteam = 0,
- mSteamStorage = 0,
- mStorage = 0,
- mOutput = 0,
- mInput = 0,
- mID = 0,
- mDisplayErrorCode = 0;
- private int oActive = 0,
- oMaxProgressTime = 0,
- oProgressTime = 0,
- oEnergy = 0,
- oSteam = 0,
- oSteamStorage = 0,
- oStorage = 0,
- oOutput = 0,
- oInput = 0,
- oID = 0,
- oDisplayErrorCode = 0,
- mTimer = 0;
-
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) return;
- mStorage = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getEUCapacity());
- mEnergy = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getStoredEU());
- mSteamStorage = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getSteamCapacity());
- mSteam = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getStoredSteam());
- mOutput = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getOutputVoltage());
- mInput = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getInputVoltage());
- mDisplayErrorCode = mTileEntity.getErrorDisplayID();
- mProgressTime = mTileEntity.getProgress();
- mMaxProgressTime = mTileEntity.getMaxProgress();
- mActive = mTileEntity.isActive() ? 1 : 0;
- mTimer++;
-
- Iterator var2 = this.crafters.iterator();
- while (var2.hasNext()) {
- ICrafting var1 = (ICrafting) var2.next();
- if (mTimer % 500 == 10 || oEnergy != mEnergy) {
- var1.sendProgressBarUpdate(this, 0, mEnergy & 65535);
- var1.sendProgressBarUpdate(this, 1, mEnergy >>> 16);
- }
- if (mTimer % 500 == 10 || oStorage != mStorage) {
- var1.sendProgressBarUpdate(this, 2, mStorage & 65535);
- var1.sendProgressBarUpdate(this, 3, mStorage >>> 16);
- }
- if (mTimer % 500 == 10 || oOutput != mOutput) {
- var1.sendProgressBarUpdate(this, 4, mOutput);
- }
- if (mTimer % 500 == 10 || oInput != mInput) {
- var1.sendProgressBarUpdate(this, 5, mInput);
- }
- if (mTimer % 500 == 10 || oDisplayErrorCode != mDisplayErrorCode) {
- var1.sendProgressBarUpdate(this, 6, mDisplayErrorCode);
- }
- if (mTimer % 500 == 10 || oProgressTime != mProgressTime) {
- var1.sendProgressBarUpdate(this, 11, mProgressTime & 65535);
- var1.sendProgressBarUpdate(this, 12, mProgressTime >>> 16);
- }
- if (mTimer % 500 == 10 || oMaxProgressTime != mMaxProgressTime) {
- var1.sendProgressBarUpdate(this, 13, mMaxProgressTime & 65535);
- var1.sendProgressBarUpdate(this, 14, mMaxProgressTime >>> 16);
- }
- if (mTimer % 500 == 10 || oID != mID) {
- var1.sendProgressBarUpdate(this, 15, mID);
- }
- if (mTimer % 500 == 10 || oActive != mActive) {
- var1.sendProgressBarUpdate(this, 16, mActive);
- }
- if (mTimer % 500 == 10 || oSteam != mSteam) {
- var1.sendProgressBarUpdate(this, 17, mSteam & 65535);
- var1.sendProgressBarUpdate(this, 18, mSteam >>> 16);
- }
- if (mTimer % 500 == 10 || oSteamStorage != mSteamStorage) {
- var1.sendProgressBarUpdate(this, 19, mSteamStorage & 65535);
- var1.sendProgressBarUpdate(this, 20, mSteamStorage >>> 16);
- }
- }
-
- oID = mID;
- oSteam = mSteam;
- oInput = mInput;
- oActive = mActive;
- oOutput = mOutput;
- oEnergy = mEnergy;
- oStorage = mStorage;
- oSteamStorage = mSteamStorage;
- oProgressTime = mProgressTime;
- oMaxProgressTime = mMaxProgressTime;
- oDisplayErrorCode = mDisplayErrorCode;
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public void updateProgressBar(int par1, int par2) {
- super.updateProgressBar(par1, par2);
- switch (par1) {
- case 0:
- mEnergy = mEnergy & -65536 | par2;
- break;
- case 1:
- mEnergy = mEnergy & 65535 | par2 << 16;
- break;
- case 2:
- mStorage = mStorage & -65536 | par2;
- break;
- case 3:
- mStorage = mStorage & 65535 | par2 << 16;
- break;
- case 4:
- mOutput = par2;
- break;
- case 5:
- mInput = par2;
- break;
- case 6:
- mDisplayErrorCode = par2;
- break;
- case 11:
- mProgressTime = mProgressTime & -65536 | par2;
- break;
- case 12:
- mProgressTime = mProgressTime & 65535 | par2 << 16;
- break;
- case 13:
- mMaxProgressTime = mMaxProgressTime & -65536 | par2;
- break;
- case 14:
- mMaxProgressTime = mMaxProgressTime & 65535 | par2 << 16;
- break;
- case 15:
- mID = par2;
- break;
- case 16:
- mActive = par2;
- break;
- case 17:
- mSteam = mSteam & -65536 | par2;
- break;
- case 18:
- mSteam = mSteam & 65535 | par2 << 16;
- break;
- case 19:
- mSteamStorage = mSteamStorage & -65536 | par2;
- break;
- case 20:
- mSteamStorage = mSteamStorage & 65535 | par2 << 16;
- break;
- }
- }
-
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return mTileEntity.isUseableByPlayer(player);
- }
-
- public String trans(String aKey, String aEnglish) {
- return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false);
- }
-
- private static class ViewingSlot extends SlotNoInput {
-
- public ViewingSlot(IInventory inventory, int index, int x, int y) {
- super(inventory, index, x, y);
- }
-
- @Override
- public boolean isItemValid(ItemStack itemstack) {
- return false;
- }
-
- @Override
- public int getSlotStackLimit() {
- return 1;
- }
-
- @Override
- public boolean canTakeStack(EntityPlayer p_82869_1_) {
- return true;
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_1by1_Turbine.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_1by1_Turbine.java
deleted file mode 100644
index cd0381a1f1..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_1by1_Turbine.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.hatches;
-
-import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GUI_1by1_Turbine extends GT_GUIContainerMetaTile_Machine {
-
- private final String mName;
-
- public GUI_1by1_Turbine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
- super(new CONTAINER_1by1_Turbine(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "1by1.png");
- mName = aName;
- }
-
- public GUI_1by1_Turbine(
- InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) {
- super(new CONTAINER_1by1_Turbine(aInventoryPlayer, aTileEntity), RES_PATH_GUI + aBackground + "1by1.png");
- mName = aName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- fontRendererObj.drawString(mName, 8, 4, 4210752);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_2by2.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_2by2.java
deleted file mode 100644
index c31b74b0f8..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_2by2.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.hatches;
-
-import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GUI_2by2 extends GT_GUIContainerMetaTile_Machine {
-
- private final String mName;
-
- public GUI_2by2(
- CONTAINER_2by2 containerType,
- InventoryPlayer aInventoryPlayer,
- IGregTechTileEntity aTileEntity,
- String aName) {
- super(containerType, RES_PATH_GUI + "2by2.png");
- mName = aName;
- }
-
- public GUI_2by2(
- CONTAINER_2by2 containerType,
- InventoryPlayer aInventoryPlayer,
- IGregTechTileEntity aTileEntity,
- String aName,
- String aBackground) {
- super(containerType, RES_PATH_GUI + aBackground + "2by2.png");
- mName = aName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- fontRendererObj.drawString(mName, 8, 4, 4210752);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_4by4.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_4by4.java
deleted file mode 100644
index 379d1d7941..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_4by4.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.hatches;
-
-import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GUI_4by4 extends GT_GUIContainerMetaTile_Machine {
-
- private final String mName;
-
- public GUI_4by4(
- CONTAINER_4by4 containerType,
- InventoryPlayer aInventoryPlayer,
- IGregTechTileEntity aTileEntity,
- String aName) {
- super(containerType, RES_PATH_GUI + "4by4.png");
- mName = aName;
- }
-
- public GUI_4by4(
- CONTAINER_4by4 containerType,
- InventoryPlayer aInventoryPlayer,
- IGregTechTileEntity aTileEntity,
- String aName,
- String aBackground) {
- super(containerType, RES_PATH_GUI + aBackground + "4by4.png");
- mName = aName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- fontRendererObj.drawString(mName, 8, 4, 4210752);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_HatchNbtConsumable.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_HatchNbtConsumable.java
deleted file mode 100644
index 47d24764cc..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_HatchNbtConsumable.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.hatches;
-
-import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
-
-import gregtech.api.gui.GT_GUIContainer;
-
-public class GUI_HatchNbtConsumable extends GT_GUIContainer {
-
- private final String mName;
- private final int mTotalSlotCount;
- public final CONTAINER_HatchNbtConsumable mContainer;
-
- public GUI_HatchNbtConsumable(CONTAINER_HatchNbtConsumable aContainer, String aName) {
- super(aContainer, RES_PATH_GUI + getTextureForGUI(aContainer.mInputslotCount * 2) + ".png");
- mContainer = aContainer;
- mName = aName;
- mTotalSlotCount = aContainer.mInputslotCount * 2;
- }
-
- private static final String getTextureForGUI(int aTotalSlotCOunt) {
- if (aTotalSlotCOunt == 18) {
- return "HatchNbtConsumable_3By3";
- } else if (aTotalSlotCOunt == 32) {
- return "HatchNbtConsumable_4By4";
- } else {
- return "HatchNbtConsumable_2By2";
- }
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- if (mTotalSlotCount == 18) {
- fontRendererObj.drawString(mName, 8, 4, 4210752);
- fontRendererObj.drawString("Stock", 25, 14, 4210752);
- fontRendererObj.drawString("Active", 115, 14, 4210752);
- } else if (mTotalSlotCount == 32) {
- // fontRendererObj.drawString("Slots: "+mTotalSlotCount, 8, 4, 4210752);
- // fontRendererObj.drawString(mName, 8, 4, 4210752);
- // fontRendererObj.drawString("Stock", 25, 16, 4210752);
- // fontRendererObj.drawString("Active", 115, 16, 4210752);
- } else {
- fontRendererObj.drawString(mName, 8, 4, 4210752);
- fontRendererObj.drawString("Stock", 25, 16, 4210752);
- fontRendererObj.drawString("Active", 115, 16, 4210752);
- }
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_2by2.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_2by2.java
deleted file mode 100644
index 52627305e2..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_2by2.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.hatches.charge;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.core.slots.SlotElectric;
-import gtPlusPlus.xmod.gregtech.api.gui.hatches.CONTAINER_2by2;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class CONTAINER_Electric_2by2 extends CONTAINER_2by2 {
-
- public CONTAINER_Electric_2by2(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- @Override
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new SlotElectric(mTileEntity, 0, 71, 26));
- addSlotToContainer(new SlotElectric(mTileEntity, 1, 89, 26));
- addSlotToContainer(new SlotElectric(mTileEntity, 2, 71, 44));
- addSlotToContainer(new SlotElectric(mTileEntity, 3, 89, 44));
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_4by4.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_4by4.java
deleted file mode 100644
index 64f0f00fbd..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_4by4.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.hatches.charge;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.core.slots.SlotElectric;
-import gtPlusPlus.xmod.gregtech.api.gui.hatches.CONTAINER_4by4;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class CONTAINER_Electric_4by4 extends CONTAINER_4by4 {
-
- public CONTAINER_Electric_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- @Override
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new SlotElectric(mTileEntity, 0, 53, 8));
- addSlotToContainer(new SlotElectric(mTileEntity, 1, 71, 8));
- addSlotToContainer(new SlotElectric(mTileEntity, 2, 89, 8));
- addSlotToContainer(new SlotElectric(mTileEntity, 3, 107, 8));
- addSlotToContainer(new SlotElectric(mTileEntity, 4, 53, 26));
- addSlotToContainer(new SlotElectric(mTileEntity, 5, 71, 26));
- addSlotToContainer(new SlotElectric(mTileEntity, 6, 89, 26));
- addSlotToContainer(new SlotElectric(mTileEntity, 7, 107, 26));
- addSlotToContainer(new SlotElectric(mTileEntity, 8, 53, 44));
- addSlotToContainer(new SlotElectric(mTileEntity, 9, 71, 44));
- addSlotToContainer(new SlotElectric(mTileEntity, 10, 89, 44));
- addSlotToContainer(new SlotElectric(mTileEntity, 11, 107, 44));
- addSlotToContainer(new SlotElectric(mTileEntity, 12, 53, 62));
- addSlotToContainer(new SlotElectric(mTileEntity, 13, 71, 62));
- addSlotToContainer(new SlotElectric(mTileEntity, 14, 89, 62));
- addSlotToContainer(new SlotElectric(mTileEntity, 15, 107, 62));
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_2by2.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_2by2.java
deleted file mode 100644
index de06a97aaa..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_2by2.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.hatches.charge;
-
-import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.xmod.gregtech.api.gui.hatches.GUI_2by2;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GUI_Electric_2by2 extends GUI_2by2 {
-
- public GUI_Electric_2by2(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
- super(new CONTAINER_Electric_2by2(aInventoryPlayer, aTileEntity), aInventoryPlayer, aTileEntity, aName);
- }
-
- public GUI_Electric_2by2(
- InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) {
- super(
- new CONTAINER_Electric_2by2(aInventoryPlayer, aTileEntity),
- aInventoryPlayer,
- aTileEntity,
- RES_PATH_GUI + aBackground + "2by2.png");
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_4by4.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_4by4.java
deleted file mode 100644
index 16b1a44fea..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_4by4.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.hatches.charge;
-
-import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.xmod.gregtech.api.gui.hatches.GUI_4by4;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GUI_Electric_4by4 extends GUI_4by4 {
-
- public GUI_Electric_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
- super(new CONTAINER_Electric_4by4(aInventoryPlayer, aTileEntity), aInventoryPlayer, aTileEntity, aName);
- }
-
- public GUI_Electric_4by4(
- InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) {
- super(
- new CONTAINER_Electric_4by4(aInventoryPlayer, aTileEntity),
- aInventoryPlayer,
- aTileEntity,
- RES_PATH_GUI + aBackground + "4by4.png");
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/power/CONTAINER_BasicTank.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/power/CONTAINER_BasicTank.java
deleted file mode 100644
index 71c362b88b..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/power/CONTAINER_BasicTank.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.power;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.gui.GT_ContainerMetaTile_Machine;
-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.custom.power.GTPP_MTE_BasicTank;
-import java.util.Iterator;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.ICrafting;
-import net.minecraft.inventory.Slot;
-
-public class CONTAINER_BasicTank extends GT_ContainerMetaTile_Machine {
- public int mContent = 0;
-
- public CONTAINER_BasicTank(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public void addSlots(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, 59, 42));
- }
-
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if (!this.mTileEntity.isClientSide() && this.mTileEntity.getMetaTileEntity() != null) {
- if (((GTPP_MTE_BasicTank) this.mTileEntity.getMetaTileEntity()).mFluid != null) {
- this.mContent = ((GTPP_MTE_BasicTank) this.mTileEntity.getMetaTileEntity()).mFluid.amount;
- } else {
- this.mContent = 0;
- }
-
- Iterator var2 = this.crafters.iterator();
-
- while (var2.hasNext()) {
- ICrafting var1 = (ICrafting) var2.next();
- var1.sendProgressBarUpdate(this, 100, this.mContent & '￿');
- var1.sendProgressBarUpdate(this, 101, this.mContent >>> 16);
- }
- }
- }
-
- @SideOnly(Side.CLIENT)
- public void updateProgressBar(int par1, int par2) {
- super.updateProgressBar(par1, par2);
- switch (par1) {
- case 100:
- this.mContent = this.mContent & -65536 | par2;
- break;
- case 101:
- this.mContent = this.mContent & '￿' | par2 << 16;
- }
- }
-
- public int getSlotCount() {
- return 2;
- }
-
- public int getShiftClickSlotCount() {
- return 1;
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/power/GUI_BasicTank.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/power/GUI_BasicTank.java
deleted file mode 100644
index 468b7dc7a9..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/power/GUI_BasicTank.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.power;
-
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.util.StatCollector;
-
-public class GUI_BasicTank extends GT_GUIContainerMetaTile_Machine {
- private final String mName;
-
- public GUI_BasicTank(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
- super(new CONTAINER_BasicTank(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/BasicTank.png");
- this.mName = aName;
- }
-
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- this.fontRendererObj.drawString(
- StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
- this.fontRendererObj.drawString(this.mName, 8, 6, 4210752);
- if (this.mContainer != null) {
- this.fontRendererObj.drawString("Liquid Amount", 10, 20, 16448255);
- this.fontRendererObj.drawString(
- GT_Utility.parseNumberToString(((CONTAINER_BasicTank) this.mContainer).mContent), 10, 30, 16448255);
- }
- }
-
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (this.width - this.xSize) / 2;
- int y = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/widget/DataStickSlotWidget.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/widget/DataStickSlotWidget.java
new file mode 100644
index 0000000000..dbda217c27
--- /dev/null
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/widget/DataStickSlotWidget.java
@@ -0,0 +1,28 @@
+package gtPlusPlus.xmod.gregtech.api.gui.widget;
+
+import com.gtnewhorizons.modularui.api.ModularUITextures;
+import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable;
+import com.gtnewhorizons.modularui.common.internal.wrapper.BaseSlot;
+import com.gtnewhorizons.modularui.common.widget.SlotWidget;
+import gregtech.api.enums.ItemList;
+import gregtech.api.gui.modularui.GT_UITextures;
+import gregtech.api.util.GT_Utility;
+
+public class DataStickSlotWidget extends SlotWidget {
+
+ public DataStickSlotWidget(IItemHandlerModifiable handler, int index) {
+ this(new BaseSlot(handler, index) {
+ @Override
+ public int getSlotStackLimit() {
+ return 1;
+ }
+ });
+ }
+
+ private DataStickSlotWidget(BaseSlot slot) {
+ super(slot);
+ setFilter(stack -> GT_Utility.areStacksEqual(stack, ItemList.Tool_DataStick.get(1), true)
+ || GT_Utility.areStacksEqual(stack, ItemList.Tool_DataOrb.get(1), true));
+ setBackground(ModularUITextures.ITEM_SLOT, GT_UITextures.OVERLAY_SLOT_DATA_ORB);
+ }
+}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/widget/ElectricSlotWidget.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/widget/ElectricSlotWidget.java
new file mode 100644
index 0000000000..b575c3c4bd
--- /dev/null
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/widget/ElectricSlotWidget.java
@@ -0,0 +1,37 @@
+package gtPlusPlus.xmod.gregtech.api.gui.widget;
+
+import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable;
+import com.gtnewhorizons.modularui.common.internal.wrapper.BaseSlot;
+import com.gtnewhorizons.modularui.common.widget.SlotWidget;
+import gregtech.api.items.GT_MetaGenerated_Tool;
+import ic2.api.info.Info;
+import ic2.api.item.ElectricItem;
+import ic2.api.item.IElectricItem;
+import net.minecraft.item.ItemStack;
+
+public class ElectricSlotWidget extends SlotWidget {
+
+ public ElectricSlotWidget(IItemHandlerModifiable handler, int index) {
+ this(new BaseSlot(handler, index, false) {
+ @Override
+ public int getSlotStackLimit() {
+ return 1;
+ }
+ });
+ }
+
+ private ElectricSlotWidget(BaseSlot slot) {
+ super(slot);
+ setFilter(stack -> (accepts(stack))
+ || (stack.getItem() instanceof GT_MetaGenerated_Tool)
+ || (stack.getItem() instanceof IElectricItem));
+ }
+
+ private boolean accepts(final ItemStack stack) {
+ if (stack == null) {
+ return false;
+ }
+ return (Info.itemEnergy.getEnergyValue(stack) > 0.0D)
+ || (ElectricItem.manager.discharge(stack, (1.0D / 0.0D), 4, true, true, true) > 0.0D);
+ }
+}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_AdvancedWorkbench.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_AdvancedWorkbench.java
deleted file mode 100644
index 23dd924702..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_AdvancedWorkbench.java
+++ /dev/null
@@ -1,158 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.workbench;
-
-import gregtech.api.gui.GT_ContainerMetaTile_Machine;
-import gregtech.api.gui.GT_Slot_Holo;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_Utility;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.slots.SlotBlueprint;
-import gtPlusPlus.core.slots.SlotElectric;
-import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_AdvancedCraftingTable;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-public class GT_Container_AdvancedWorkbench extends GT_ContainerMetaTile_Machine {
-
- public GT_Container_AdvancedWorkbench(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new Slot(mTileEntity, 0, 8, 8));
- addSlotToContainer(new Slot(mTileEntity, 1, 26, 8));
- addSlotToContainer(new Slot(mTileEntity, 2, 44, 8));
- addSlotToContainer(new Slot(mTileEntity, 3, 62, 8));
- addSlotToContainer(new Slot(mTileEntity, 4, 8, 26));
- addSlotToContainer(new Slot(mTileEntity, 5, 26, 26));
- addSlotToContainer(new Slot(mTileEntity, 6, 44, 26));
- addSlotToContainer(new Slot(mTileEntity, 7, 62, 26));
- addSlotToContainer(new Slot(mTileEntity, 8, 8, 44));
- addSlotToContainer(new Slot(mTileEntity, 9, 26, 44));
- addSlotToContainer(new Slot(mTileEntity, 10, 44, 44));
- addSlotToContainer(new Slot(mTileEntity, 11, 62, 44));
- addSlotToContainer(new Slot(mTileEntity, 12, 8, 62));
- addSlotToContainer(new Slot(mTileEntity, 13, 26, 62));
- addSlotToContainer(new Slot(mTileEntity, 14, 44, 62));
- addSlotToContainer(new Slot(mTileEntity, 15, 62, 62));
-
- addSlotToContainer(new SlotElectric(mTileEntity, 16, 82, 8));
- addSlotToContainer(new SlotElectric(mTileEntity, 17, 100, 8));
- addSlotToContainer(new SlotElectric(mTileEntity, 18, 118, 8));
- addSlotToContainer(new SlotElectric(mTileEntity, 19, 136, 8));
- addSlotToContainer(new SlotElectric(mTileEntity, 20, 154, 8));
-
- addSlotToContainer(new Slot(mTileEntity, 21, 82, 28));
- addSlotToContainer(new Slot(mTileEntity, 22, 100, 28));
- addSlotToContainer(new Slot(mTileEntity, 23, 118, 28));
- addSlotToContainer(new Slot(mTileEntity, 24, 82, 46));
- addSlotToContainer(new Slot(mTileEntity, 25, 100, 46));
- addSlotToContainer(new Slot(mTileEntity, 26, 118, 46));
- addSlotToContainer(new Slot(mTileEntity, 27, 82, 64));
- addSlotToContainer(new Slot(mTileEntity, 28, 100, 64));
- addSlotToContainer(new Slot(mTileEntity, 29, 118, 64));
-
- addSlotToContainer(new Slot(mTileEntity, 33, 154, 28));
- addSlotToContainer(new Slot(mTileEntity, 34, 154, 64));
-
- addSlotToContainer(new SlotBlueprint(mTileEntity, 30, 136, 28));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 31, 136, 64, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 32, 154, 46, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 32, 136, 46, false, false, 1));
- }
-
- public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
- Logger.INFO("Clicked on slot " + aSlotIndex);
- if (aSlotIndex < 21 || aSlotIndex > 35) return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- if (mTileEntity == null || mTileEntity.getMetaTileEntity() == null) return null;
- try {
- ItemStack tStack = ((Slot) inventorySlots.get(aSlotIndex)).getStack();
- if (tStack != null
- && tStack.stackSize <= 0
- && !GT_Utility.areStacksEqual(tStack, aPlayer.inventory.getItemStack())) {
- return null;
- }
- if (aSlotIndex == 32) {
- if (aMouseclick == 0 && aShifthold == 1) {
- ((GT_MetaTileEntity_AdvancedCraftingTable) mTileEntity.getMetaTileEntity()).setBluePrint(null);
- return null;
- }
- } else if (aSlotIndex == 33) {
- ItemStack tStack2,
- tCraftedStack =
- ((GT_MetaTileEntity_AdvancedCraftingTable) mTileEntity.getMetaTileEntity())
- .getCraftingOutput();
- if (tCraftedStack != null) {
- if (aShifthold == 1) {
- for (byte i = 0; i < aPlayer.inventory.mainInventory.length; i++) {
- for (byte j = 0;
- j < tCraftedStack.getMaxStackSize() / tCraftedStack.stackSize
- && ((GT_MetaTileEntity_AdvancedCraftingTable)
- mTileEntity.getMetaTileEntity())
- .canDoCraftingOutput();
- j++) {
- if (!GT_Utility.areStacksEqual(
- tStack2 = ((GT_MetaTileEntity_AdvancedCraftingTable)
- mTileEntity.getMetaTileEntity())
- .getCraftingOutput(),
- tCraftedStack)
- || tStack.stackSize != tStack2.stackSize)
- return aPlayer.inventory.getItemStack();
- aPlayer.inventory.mainInventory[i] = (((GT_MetaTileEntity_AdvancedCraftingTable)
- mTileEntity.getMetaTileEntity())
- .consumeMaterials(aPlayer, aPlayer.inventory.mainInventory[i]));
- }
- }
- } else {
- if (aMouseclick == 0) {
- if (((GT_MetaTileEntity_AdvancedCraftingTable) mTileEntity.getMetaTileEntity())
- .canDoCraftingOutput())
- aPlayer.inventory.setItemStack(
- ((GT_MetaTileEntity_AdvancedCraftingTable) mTileEntity.getMetaTileEntity())
- .consumeMaterials(aPlayer, aPlayer.inventory.getItemStack()));
- return aPlayer.inventory.getItemStack();
- } else {
- for (int i = 0;
- i < tCraftedStack.getMaxStackSize() / tCraftedStack.stackSize
- && ((GT_MetaTileEntity_AdvancedCraftingTable)
- mTileEntity.getMetaTileEntity())
- .canDoCraftingOutput();
- i++) {
- if (!GT_Utility.areStacksEqual(
- tStack2 = ((GT_MetaTileEntity_AdvancedCraftingTable)
- mTileEntity.getMetaTileEntity())
- .getCraftingOutput(),
- tCraftedStack)
- || tStack.stackSize != tStack2.stackSize)
- return aPlayer.inventory.getItemStack();
- aPlayer.inventory.setItemStack(
- ((GT_MetaTileEntity_AdvancedCraftingTable) mTileEntity.getMetaTileEntity())
- .consumeMaterials(aPlayer, aPlayer.inventory.getItemStack()));
- }
- return aPlayer.inventory.getItemStack();
- }
- }
- }
- return null;
- } else if (aSlotIndex == 34) {
- ((GT_MetaTileEntity_AdvancedCraftingTable) mTileEntity.getMetaTileEntity()).mFlushMode = true;
- return null;
- } else if (aSlotIndex == 35) {
- ((GT_MetaTileEntity_AdvancedCraftingTable) mTileEntity.getMetaTileEntity()).sortIntoTheInputSlots();
- return null;
- }
- } catch (Throwable e) {
- // GT_Log.log.catching(e);
- }
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
-
- public int getSlotCount() {
- return 33;
- }
-
- public int getShiftClickSlotCount() {
- return 21;
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_BronzeWorkbench.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_BronzeWorkbench.java
deleted file mode 100644
index 46bd70e55a..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_BronzeWorkbench.java
+++ /dev/null
@@ -1,153 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.workbench;
-
-import gregtech.api.gui.GT_ContainerMetaTile_Machine;
-import gregtech.api.gui.GT_Slot_Holo;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_Utility;
-import gtPlusPlus.core.slots.SlotBlueprint;
-import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_BronzeCraftingTable;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-public class GT_Container_BronzeWorkbench extends GT_ContainerMetaTile_Machine {
-
- public GT_Container_BronzeWorkbench(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new Slot(mTileEntity, 0, 8, 8));
- addSlotToContainer(new Slot(mTileEntity, 1, 26, 8));
- addSlotToContainer(new Slot(mTileEntity, 2, 44, 8));
- addSlotToContainer(new Slot(mTileEntity, 3, 62, 8));
- addSlotToContainer(new Slot(mTileEntity, 4, 8, 26));
- addSlotToContainer(new Slot(mTileEntity, 5, 26, 26));
- addSlotToContainer(new Slot(mTileEntity, 6, 44, 26));
- addSlotToContainer(new Slot(mTileEntity, 7, 62, 26));
- addSlotToContainer(new Slot(mTileEntity, 8, 8, 44));
- addSlotToContainer(new Slot(mTileEntity, 9, 26, 44));
- addSlotToContainer(new Slot(mTileEntity, 10, 44, 44));
- addSlotToContainer(new Slot(mTileEntity, 11, 62, 44));
- addSlotToContainer(new Slot(mTileEntity, 12, 8, 62));
- addSlotToContainer(new Slot(mTileEntity, 13, 26, 62));
- addSlotToContainer(new Slot(mTileEntity, 14, 44, 62));
- addSlotToContainer(new Slot(mTileEntity, 15, 62, 62));
-
- addSlotToContainer(new Slot(mTileEntity, 16, 82, 8));
- addSlotToContainer(new Slot(mTileEntity, 17, 100, 8));
- addSlotToContainer(new Slot(mTileEntity, 18, 118, 8));
- addSlotToContainer(new Slot(mTileEntity, 19, 136, 8));
- addSlotToContainer(new Slot(mTileEntity, 20, 154, 8));
-
- addSlotToContainer(new Slot(mTileEntity, 21, 82, 28));
- addSlotToContainer(new Slot(mTileEntity, 22, 100, 28));
- addSlotToContainer(new Slot(mTileEntity, 23, 118, 28));
- addSlotToContainer(new Slot(mTileEntity, 24, 82, 46));
- addSlotToContainer(new Slot(mTileEntity, 25, 100, 46));
- addSlotToContainer(new Slot(mTileEntity, 26, 118, 46));
- addSlotToContainer(new Slot(mTileEntity, 27, 82, 64));
- addSlotToContainer(new Slot(mTileEntity, 28, 100, 64));
- addSlotToContainer(new Slot(mTileEntity, 29, 118, 64));
-
- addSlotToContainer(new Slot(mTileEntity, 33, 154, 28));
- addSlotToContainer(new Slot(mTileEntity, 34, 154, 64));
-
- addSlotToContainer(new SlotBlueprint(mTileEntity, 30, 136, 28));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 31, 136, 64, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 32, 154, 46, false, false, 1));
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 32, 136, 46, false, false, 1));
- }
-
- public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
- if (aSlotIndex < 21 || aSlotIndex > 35) return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- if (mTileEntity == null || mTileEntity.getMetaTileEntity() == null) return null;
- try {
- ItemStack tStack = ((Slot) inventorySlots.get(aSlotIndex)).getStack();
- if (tStack != null
- && tStack.stackSize <= 0
- && !GT_Utility.areStacksEqual(tStack, aPlayer.inventory.getItemStack())) {
- return null;
- }
- if (aSlotIndex == 32) {
- if (aMouseclick == 0 && aShifthold == 1) {
- ((GT_MetaTileEntity_BronzeCraftingTable) mTileEntity.getMetaTileEntity()).setBluePrint(null);
- return null;
- }
- } else if (aSlotIndex == 33) {
- ItemStack tStack2,
- tCraftedStack =
- ((GT_MetaTileEntity_BronzeCraftingTable) mTileEntity.getMetaTileEntity())
- .getCraftingOutput();
- if (tCraftedStack != null) {
- if (aShifthold == 1) {
- for (byte i = 0; i < aPlayer.inventory.mainInventory.length; i++) {
- for (byte j = 0;
- j < tCraftedStack.getMaxStackSize() / tCraftedStack.stackSize
- && ((GT_MetaTileEntity_BronzeCraftingTable) mTileEntity.getMetaTileEntity())
- .canDoCraftingOutput();
- j++) {
- if (!GT_Utility.areStacksEqual(
- tStack2 = ((GT_MetaTileEntity_BronzeCraftingTable)
- mTileEntity.getMetaTileEntity())
- .getCraftingOutput(),
- tCraftedStack)
- || tStack.stackSize != tStack2.stackSize)
- return aPlayer.inventory.getItemStack();
- aPlayer.inventory.mainInventory[i] = (((GT_MetaTileEntity_BronzeCraftingTable)
- mTileEntity.getMetaTileEntity())
- .consumeMaterials(aPlayer, aPlayer.inventory.mainInventory[i]));
- }
- }
- } else {
- if (aMouseclick == 0) {
- if (((GT_MetaTileEntity_BronzeCraftingTable) mTileEntity.getMetaTileEntity())
- .canDoCraftingOutput())
- aPlayer.inventory.setItemStack(
- ((GT_MetaTileEntity_BronzeCraftingTable) mTileEntity.getMetaTileEntity())
- .consumeMaterials(aPlayer, aPlayer.inventory.getItemStack()));
- return aPlayer.inventory.getItemStack();
- } else {
- for (int i = 0;
- i < tCraftedStack.getMaxStackSize() / tCraftedStack.stackSize
- && ((GT_MetaTileEntity_BronzeCraftingTable) mTileEntity.getMetaTileEntity())
- .canDoCraftingOutput();
- i++) {
- if (!GT_Utility.areStacksEqual(
- tStack2 = ((GT_MetaTileEntity_BronzeCraftingTable)
- mTileEntity.getMetaTileEntity())
- .getCraftingOutput(),
- tCraftedStack)
- || tStack.stackSize != tStack2.stackSize)
- return aPlayer.inventory.getItemStack();
- aPlayer.inventory.setItemStack(
- ((GT_MetaTileEntity_BronzeCraftingTable) mTileEntity.getMetaTileEntity())
- .consumeMaterials(aPlayer, aPlayer.inventory.getItemStack()));
- }
- return aPlayer.inventory.getItemStack();
- }
- }
- }
- return null;
- } else if (aSlotIndex == 34) {
- ((GT_MetaTileEntity_BronzeCraftingTable) mTileEntity.getMetaTileEntity()).mFlushMode = true;
- return null;
- } else if (aSlotIndex == 35) {
- ((GT_MetaTileEntity_BronzeCraftingTable) mTileEntity.getMetaTileEntity()).sortIntoTheInputSlots();
- return null;
- }
- } catch (Throwable e) {
- // GT_Log.log.catching(e);
- }
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
-
- public int getSlotCount() {
- return 33;
- }
-
- public int getShiftClickSlotCount() {
- return 21;
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_AdvancedWorkbench.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_AdvancedWorkbench.java
deleted file mode 100644
index d341a0766d..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_AdvancedWorkbench.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.workbench;
-
-import gregtech.api.gui.GT_ContainerMetaTile_Machine;
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.sys.KeyboardUtils;
-import java.util.ArrayList;
-import java.util.List;
-import net.minecraft.client.renderer.RenderHelper;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GT_GUIContainer_AdvancedWorkbench extends GT_GUIContainerMetaTile_Machine {
-
- private final String mLocalName;
-
- public GT_GUIContainer_AdvancedWorkbench(
- InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aLocalName) {
- super(
- new GT_Container_AdvancedWorkbench(aInventoryPlayer, aTileEntity),
- CORE.RES_PATH_GUI + "AdvancedCraftingTable.png");
- mLocalName = aLocalName;
- }
-
- public GT_GUIContainer_AdvancedWorkbench(
- GT_ContainerMetaTile_Machine aContainer, String aLocalName, String aResource) {
- super(aContainer, aResource);
- mLocalName = aLocalName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- // fontRendererObj.drawString(mLocalName, 8, 4, 4210752);
- this.drawTooltip(par1, par2);
- }
-
- private void drawTooltip(final int x2, final int y2) {
- final int xStart = (this.width - this.xSize) / 2;
- final int yStart = (this.height - this.ySize) / 2;
- final int x3 = x2 - xStart;
- final int y3 = y2 - yStart + 5;
- final List<String> list = new ArrayList<String>();
- // 154 - 172
-
- if (KeyboardUtils.isShiftKeyDown()) {
- if (y3 >= 30 && y3 <= 49) {
- if (x3 >= 135 && x3 <= 154) {
- list.add("Blueprint Slot");
- list.add("Shift+Lmb Sets to crafting output");
- }
- if (x3 >= 153 && x3 <= 170) {
- list.add("Extraction Slot");
- list.add("Things can always be pulled from here");
- }
- }
- if (y3 >= 50 && y3 <= 67) {
- if (x3 >= 135 && x3 <= 152) {
- list.add("Flush");
- list.add("Empty crafting grid back to storage");
- }
- if (x3 >= 153 && x3 <= 170) {
- list.add("Automation");
- list.add("Allows output while");
- list.add("crafting grid is full");
- }
- }
- if (y3 >= 68 && y3 <= 85) {
- if (x3 >= 135 && x3 <= 152) {
- list.add("Output Slot");
- }
- if (x3 >= 153 && x3 <= 170) {
- list.add("Free Parking");
- }
- }
- }
- if (!list.isEmpty()) {
- this.drawHoveringText(list, x3, y3, this.fontRendererObj);
- RenderHelper.enableGUIStandardItemLighting();
- }
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_BronzeWorkbench.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_BronzeWorkbench.java
deleted file mode 100644
index 0967317090..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_BronzeWorkbench.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package gtPlusPlus.xmod.gregtech.api.gui.workbench;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.core.lib.CORE;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class GT_GUIContainer_BronzeWorkbench extends GT_GUIContainer_AdvancedWorkbench {
-
- public GT_GUIContainer_BronzeWorkbench(
- InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aLocalName) {
- super(
- new GT_Container_BronzeWorkbench(aInventoryPlayer, aTileEntity),
- aLocalName,
- CORE.RES_PATH_GUI + "BronzeCraftingTable.png");
- }
-}