From cd2ba914a6b5b980ff56347455fcf43a9e3eea3b Mon Sep 17 00:00:00 2001 From: miozune Date: Sat, 26 Nov 2022 01:56:28 +0900 Subject: Rewrite GUIs with ModularUI (#440) * Update GT * NEI migration & cleanup Deprecate GTPP_Recipe_Map_Internal#sMappingsEx and delegate to GT_Recipe_Map#sMappings instead Remove recipe modification check * Boiler * Programmed Circuit & Super Bus * Lower the number of fluid slots for multi mixer NEI * Solar Generator * Crop Manager * Bronze Workbench & Advanced Workbench * Turbine Housing & Rotor Assembly * Iron Plated Blast Furnace * Player Safe * Advanced Muffler Hatch * spotlessApply * Auto Workbench * Breaker, Control Core, RTG Hatch, Steam Bus, some cleanup * Fix crash when removing Breaker * Data Orb Repository * Charging/Discharging Bus * Pollution Scrubber * Storage Crate, Shelf, TieredChest They're just broken in the first place, don't blame me * cleanup * Steam Condenser It's broken in the first place, never blame me! * Catalyst Housing, Ball Housing * Fluid Tank, generators, custom hatches, cleanup * Computer Cube MKII Many things are broken in the first place, I swear * Inventory Manager * Migrate multiblock dehydrator recipemap to ModularUI * Overflow cover * Redstone Circuit Block * Multiblock * cleanup * Update GT --- .../gregtech/api/gui/CONTAINER_AdvancedBoiler.java | 102 ---- .../xmod/gregtech/api/gui/CONTAINER_Cyclotron.java | 40 -- .../xmod/gregtech/api/gui/CONTAINER_DataHatch.java | 76 --- .../gregtech/api/gui/CONTAINER_DeluxeTank.java | 76 --- .../api/gui/CONTAINER_Hatch_Muffler_Advanced.java | 53 --- .../api/gui/CONTAINER_IndustrialCentrifuge.java | 42 -- .../api/gui/CONTAINER_IronBlastFurnace.java | 31 -- .../xmod/gregtech/api/gui/CONTAINER_MatterFab.java | 104 ----- .../api/gui/CONTAINER_MetaTileMachineLong.java | 256 ---------- .../gregtech/api/gui/CONTAINER_MultiMachine.java | 286 ------------ .../CONTAINER_MultiMachine_NoPlayerInventory.java | 31 -- .../api/gui/CONTAINER_PowerSubStation.java | 85 ---- .../xmod/gregtech/api/gui/CONTAINER_SafeBlock.java | 118 ----- .../gregtech/api/gui/CONTAINER_SolarGenerator.java | 90 ---- .../gregtech/api/gui/CONTAINER_SteamCondenser.java | 100 ---- .../gregtech/api/gui/CONTAINER_SuperChest.java | 75 --- .../gregtech/api/gui/CONTAINER_TreeFarmer.java | 72 --- .../xmod/gregtech/api/gui/GTPP_UITextures.java | 150 ++++++ .../xmod/gregtech/api/gui/GUI_AdvancedBoiler.java | 42 -- .../xmod/gregtech/api/gui/GUI_Cyclotron.java | 49 -- .../xmod/gregtech/api/gui/GUI_DataHatch.java | 41 -- .../xmod/gregtech/api/gui/GUI_DeluxeTank.java | 39 -- .../api/gui/GUI_Hatch_Muffler_Advanced.java | 51 -- .../gregtech/api/gui/GUI_IndustrialCentrifuge.java | 74 --- .../gregtech/api/gui/GUI_IronBlastFurnace.java | 44 -- .../xmod/gregtech/api/gui/GUI_MatterFab.java | 95 ---- .../xmod/gregtech/api/gui/GUI_MultiMachine.java | 358 -------------- .../gregtech/api/gui/GUI_MultiMachine_Default.java | 72 --- .../gregtech/api/gui/GUI_Multi_Basic_Slotted.java | 92 ---- .../xmod/gregtech/api/gui/GUI_PowerSubStation.java | 134 ------ .../xmod/gregtech/api/gui/GUI_SafeBlock.java | 46 -- .../xmod/gregtech/api/gui/GUI_SolarGenerator.java | 43 -- .../xmod/gregtech/api/gui/GUI_SteamCondenser.java | 52 --- .../xmod/gregtech/api/gui/GUI_SuperChest.java | 37 -- .../xmod/gregtech/api/gui/GUI_TreeFarmer.java | 48 -- .../xmod/gregtech/api/gui/SyncedLong.java | 59 --- .../xmod/gregtech/api/gui/SyncedValueManager.java | 42 -- .../GT_Container_ElectricAutoWorkbench.java | 137 ------ .../GT_Container_ElectricInventoryManager.java | 316 ------------- .../GT_GUIContainer_ElectricAutoWorkbench.java | 66 --- .../GT_GUIContainer_ElectricInventoryManager.java | 202 -------- .../api/gui/basic/CONTAINER_PollutionCleaner.java | 100 ---- .../api/gui/basic/GT_Container_CropHarvestor.java | 179 ------- .../gui/basic/GT_GUIContainer_CropHarvestor.java | 77 --- .../api/gui/basic/GUI_PollutionCleaner.java | 76 --- .../gui/computer/GT_Container_ComputerCube.java | 407 ---------------- .../GT_Container_RedstoneCircuitBlock.java | 175 ------- .../gui/computer/GT_GUIContainer_ComputerCube.java | 225 --------- .../GT_GUIContainer_RedstoneCircuitBlock.java | 136 ------ .../gui/fluidreactor/Container_FluidReactor.java | 174 ------- .../api/gui/fluidreactor/GUI_FluidReactor.java | 135 ------ .../api/gui/hatches/CONTAINER_1by1_Turbine.java | 60 --- .../gregtech/api/gui/hatches/CONTAINER_2by2.java | 31 -- .../gregtech/api/gui/hatches/CONTAINER_4by4.java | 43 -- .../gui/hatches/CONTAINER_HatchNbtConsumable.java | 298 ------------ .../gregtech/api/gui/hatches/GUI_1by1_Turbine.java | 36 -- .../xmod/gregtech/api/gui/hatches/GUI_2by2.java | 44 -- .../xmod/gregtech/api/gui/hatches/GUI_4by4.java | 44 -- .../api/gui/hatches/GUI_HatchNbtConsumable.java | 55 --- .../hatches/charge/CONTAINER_Electric_2by2.java | 21 - .../hatches/charge/CONTAINER_Electric_4by4.java | 33 -- .../api/gui/hatches/charge/GUI_Electric_2by2.java | 23 - .../api/gui/hatches/charge/GUI_Electric_4by4.java | 23 - .../api/gui/power/CONTAINER_BasicTank.java | 66 --- .../xmod/gregtech/api/gui/power/GUI_BasicTank.java | 34 -- .../api/gui/widget/DataStickSlotWidget.java | 28 ++ .../api/gui/widget/ElectricSlotWidget.java | 37 ++ .../workbench/GT_Container_AdvancedWorkbench.java | 158 ------- .../workbench/GT_Container_BronzeWorkbench.java | 153 ------ .../GT_GUIContainer_AdvancedWorkbench.java | 89 ---- .../workbench/GT_GUIContainer_BronzeWorkbench.java | 16 - .../power/GTPP_MTE_BasicLosslessGenerator.java | 14 +- .../custom/power/GTPP_MTE_BasicMachine.java | 24 +- .../custom/power/GTPP_MTE_BasicTank.java | 13 - .../GT_MetaTileEntity_BasicBreaker.java | 35 +- .../GT_MetaTileEntity_DeluxeMachine.java | 34 +- .../GT_MetaTileEntity_DeluxeTank.java | 15 - .../GT_MetaTileEntity_Hatch_ControlCore.java | 27 +- ...etaTileEntity_Hatch_ElementalDataOrbHolder.java | 50 +- .../GT_MetaTileEntity_Hatch_Energy_RTG.java | 29 +- .../GT_MetaTileEntity_Hatch_InputBattery.java | 52 +-- .../GT_MetaTileEntity_Hatch_Muffler_Adv.java | 63 ++- .../GT_MetaTileEntity_Hatch_OutputBattery.java | 52 +-- .../GT_MetaTileEntity_Hatch_Steam_BusInput.java | 29 +- .../GT_MetaTileEntity_Hatch_Steam_BusOutput.java | 29 +- .../GT_MetaTileEntity_Hatch_Turbine.java | 36 +- .../GT_MetaTileEntity_Hatch_TurbineProvider.java | 28 +- .../GT_MetaTileEntity_SuperBus_Input.java | 28 +- .../GT_MetaTileEntity_SuperBus_Output.java | 15 - .../implementations/base/CustomMetaTileBase.java | 4 +- .../GT_MetaTileEntity_Hatch_CustomFluidBase.java | 9 +- .../base/GregtechMeta_MultiBlockBase.java | 346 +++++++++++--- .../base/GregtechMeta_SteamMultiBase.java | 10 - .../GregtechDoubleFuelGeneratorBase.java | 8 +- .../base/generators/GregtechMetaBoilerBase.java | 3 +- .../generators/GregtechMetaSolarGenerator.java | 3 +- .../GregtechRocketFuelGeneratorBase.java | 11 +- .../base/machines/GregtechMetaSafeBlockBase.java | 3 +- .../GT_MetaTileEntity_Hatch_NbtConsumable.java | 113 ++++- .../common/covers/GTPP_Cover_Overflow.java | 158 +++---- .../GT_MetaTileEntity_ElectricAutoWorkbench.java | 134 ++++-- ...GT_MetaTileEntity_ElectricInventoryManager.java | 201 +++++++- .../generators/GT_MetaTileEntity_Boiler_Base.java | 63 ++- .../generators/GT_MetaTileEntity_Boiler_Solar.java | 15 - .../generators/GT_MetaTileEntity_RfConvertor.java | 13 - .../GregtechMetaTileEntityGeothermalGenerator.java | 6 +- .../GregtechMetaTileEntitySolarGenerator.java | 84 +++- .../creative/GregtechMetaCreativeEnergyBuffer.java | 13 - .../basic/GT_MetaTileEntity_CropHarvestor.java | 82 +++- .../GregtechMetaAtmosphericReconditioner.java | 69 ++- .../machines/basic/GregtechMetaCondensor.java | 81 +++- .../GregtechMetaTileEntity_ChemicalReactor.java | 26 -- ...regtechMetaTileEntity_CompactFusionReactor.java | 13 - .../basic/GregtechMetaTileEntity_PocketFusion.java | 13 - .../machines/multi/misc/GMTE_AmazonPackager.java | 10 - .../multi/misc/GregtechMTE_TeslaTower.java | 15 +- ...gtechMetaTileEntity_IndustrialAlloySmelter.java | 17 - ...regtechMetaTileEntity_IndustrialArcFurnace.java | 10 - ...regtechMetaTileEntity_IndustrialCentrifuge.java | 10 - .../GregtechMetaTileEntity_IndustrialChisel.java | 15 - .../GregtechMetaTileEntity_IndustrialCokeOven.java | 10 - ...echMetaTileEntity_IndustrialCuttingMachine.java | 10 - ...regtechMetaTileEntity_IndustrialDehydrator.java | 15 - ...gtechMetaTileEntity_IndustrialElectrolyzer.java | 10 - .../GregtechMetaTileEntity_IndustrialExtruder.java | 10 - ...egtechMetaTileEntity_IndustrialFluidHeater.java | 10 - ...egtechMetaTileEntity_IndustrialForgeHammer.java | 10 - ...GregtechMetaTileEntity_IndustrialMacerator.java | 10 - .../GregtechMetaTileEntity_IndustrialMixer.java | 10 - ...aTileEntity_IndustrialMolecularTransformer.java | 15 - ...gtechMetaTileEntity_IndustrialMultiMachine.java | 10 - ...regtechMetaTileEntity_IndustrialPlatePress.java | 10 - .../GregtechMetaTileEntity_IndustrialSifter.java | 10 - .../GregtechMetaTileEntity_IndustrialSinter.java | 5 - ...MetaTileEntity_IndustrialThermalCentrifuge.java | 10 - ...techMetaTileEntity_IndustrialVacuumFreezer.java | 15 - ...GregtechMetaTileEntity_IndustrialWashPlant.java | 10 - .../GregtechMetaTileEntity_IndustrialWireMill.java | 10 - .../GregtechMetaTileEntity_IronBlastFurnace.java | 58 ++- .../processing/GregtechMetaTileEntity_IsaMill.java | 10 - .../GregtechMetaTileEntity_SpargeTower.java | 23 - .../GregtechMetaTileEntity_Adv_AssemblyLine.java | 17 - ...egtechMetaTileEntity_Adv_DistillationTower.java | 25 - .../advanced/GregtechMetaTileEntity_Adv_EBF.java | 15 - .../GregtechMetaTileEntity_Adv_HeatExchanger.java | 18 - .../GregtechMetaTileEntity_Adv_Implosion.java | 15 - .../multi/production/GT4Entity_AutoCrafter.java | 10 - .../multi/production/GT4Entity_ThermalBoiler.java | 15 - .../GregtechMTE_ElementalDuplicator.java | 20 +- .../production/GregtechMTE_FastNeutronReactor.java | 10 - .../production/GregtechMTE_FrothFlotationCell.java | 10 - .../production/GregtechMTE_LargeNaqReactor.java | 15 - .../production/GregtechMTE_MiniFusionPlant.java | 10 - .../production/GregtechMTE_NuclearReactor.java | 10 - .../GregtechMetaTileEntityGeneratorArray.java | 15 - .../production/GregtechMetaTileEntityTreeFarm.java | 15 - .../GregtechMetaTileEntity_AlloyBlastSmelter.java | 15 - .../GregtechMetaTileEntity_Cyclotron.java | 29 +- ...egtechMetaTileEntity_IndustrialFishingPond.java | 10 - ...egtechMetaTileEntity_IndustrialRockBreaker.java | 17 +- .../GregtechMetaTileEntity_LargeRocketEngine.java | 22 +- ...techMetaTileEntity_LargeSemifluidGenerator.java | 17 - .../GregtechMetaTileEntity_MassFabricator.java | 54 ++- .../GregtechMetaTileEntity_Refinery.java | 10 - .../GregtechMetaTileEntity_SolarTower.java | 15 +- .../algae/GregtechMTE_AlgaePondBase.java | 10 - ...chMetaTileEntity_BedrockMiningPlatformBase.java | 18 - .../chemplant/GregtechMTE_ChemicalPlant.java | 12 +- .../turbines/GT_MTE_LargeTurbine_Gas.java | 5 - .../turbines/GT_MTE_LargeTurbine_Plasma.java | 5 - .../turbines/GT_MTE_LargeTurbine_SCSteam.java | 5 - .../turbines/GT_MTE_LargeTurbine_SHSteam.java | 5 - .../turbines/GT_MTE_LargeTurbine_Steam.java | 5 - .../GregtechMetaTileEntity_LargerTurbineBase.java | 12 - .../storage/GregtechMetaTileEntity_MultiTank.java | 10 - ...chMetaTileEntity_PowerSubStationController.java | 136 ++++-- .../misc/GT_TileEntity_ComputerCube.java | 516 ++++++++++++++++++++- .../redstone/GT_MetaTileEntity_RedstoneBase.java | 17 - .../GT_MetaTileEntity_RedstoneCircuitBlock.java | 220 ++++++++- .../GT_MetaTileEntity_AdvancedCraftingTable.java | 211 ++++++++- .../GT_MetaTileEntity_BronzeCraftingTable.java | 76 ++- .../GT_MetaTileEntity_ConnectableCrate.java | 59 ++- .../storage/GT_MetaTileEntity_TieredChest.java | 59 ++- .../storage/GT_MetaTileEntity_TieredTank.java | 12 +- .../storage/GregtechMetaEnergyBuffer.java | 16 - .../storage/GregtechMetaSafeBlock.java | 37 +- .../GT_MetaTileEntity_InfiniteItemHolder.java | 11 - .../storage/shelving/GT4Entity_Shelf_Large.java | 44 +- .../RecipeGen_MultisUsingFluidInsteadOfCells.java | 6 +- .../xmod/gregtech/recipes/GregtechRecipeAdder.java | 2 +- 190 files changed, 2800 insertions(+), 8432 deletions(-) delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_AdvancedBoiler.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Cyclotron.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DataHatch.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DeluxeTank.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IndustrialCentrifuge.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IronBlastFurnace.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MatterFab.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MetaTileMachineLong.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine_NoPlayerInventory.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_PowerSubStation.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SafeBlock.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SolarGenerator.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SteamCondenser.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_TreeFarmer.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GTPP_UITextures.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_AdvancedBoiler.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Cyclotron.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_DataHatch.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_DeluxeTank.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IndustrialCentrifuge.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_IronBlastFurnace.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MatterFab.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MultiMachine.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_MultiMachine_Default.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Multi_Basic_Slotted.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_PowerSubStation.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SafeBlock.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SolarGenerator.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SteamCondenser.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_SuperChest.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GUI_TreeFarmer.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/SyncedLong.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/SyncedValueManager.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_Container_ElectricAutoWorkbench.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_Container_ElectricInventoryManager.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_GUIContainer_ElectricAutoWorkbench.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_GUIContainer_ElectricInventoryManager.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/CONTAINER_PollutionCleaner.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GT_Container_CropHarvestor.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GT_GUIContainer_CropHarvestor.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GUI_PollutionCleaner.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_ComputerCube.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_RedstoneCircuitBlock.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_ComputerCube.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_RedstoneCircuitBlock.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/Container_FluidReactor.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/fluidreactor/GUI_FluidReactor.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_1by1_Turbine.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_2by2.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_4by4.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_HatchNbtConsumable.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_1by1_Turbine.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_2by2.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_4by4.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_HatchNbtConsumable.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_2by2.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_4by4.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_2by2.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_4by4.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/power/CONTAINER_BasicTank.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/power/GUI_BasicTank.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/widget/DataStickSlotWidget.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/widget/ElectricSlotWidget.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_AdvancedWorkbench.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_BronzeWorkbench.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_AdvancedWorkbench.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_BronzeWorkbench.java (limited to 'src/main/java/gtPlusPlus/xmod/gregtech') 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!!! - *

- * 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!!! - *

- * 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!!! - *

- * 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!!! - *

- * 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 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(-1, 0); - } - if (mLeftOver < 0 || mLeftOver > Integer.MAX_VALUE) { - mLeftOver = 0; - } - Pair power = new Pair((int) mMaxInts, (int) mLeftOver); - return power; - } - - private Pair 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(-1, 0); - } - if (mLeftOver < 0 || mLeftOver > Integer.MAX_VALUE) { - mLeftOver = 0; - } - Pair power = new Pair((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 powerPacket = getPowerStored(); - Pair 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!!! - *

- * 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 crafters2 = new ArrayList(); - // 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_Multi