aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchBeamlineConnector.java2
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchInputBeamline.java4
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchOutputBeamline.java4
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java5
-rw-r--r--src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsBA0.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_EnderFluidLink.java5
-rw-r--r--src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCapacitor.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Capacitor.java7
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoMulti.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoTunnel.java7
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyTunnel.java7
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Holder.java5
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Param.java5
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Rack.java5
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Uncertainty.java5
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_WirelessComputation_Input.java5
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_WirelessMulti.java15
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java13
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_BuckConverter.java14
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugPollutor.java5
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugPowerGenerator.java7
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java5
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_WetTransformer.java2
-rw-r--r--src/main/java/com/github/technus/tectech/util/CommonValues.java5
-rw-r--r--src/main/java/com/github/technus/tectech/util/TT_Utility.java6
-rw-r--r--src/main/java/goodgenerator/blocks/tileEntity/GTMetaTileEntity/NeutronSensor.java5
-rw-r--r--src/main/java/goodgenerator/blocks/tileEntity/SupercriticalFluidTurbine.java2
-rw-r--r--src/main/java/gregtech/GT_Mod.java14
-rw-r--r--src/main/java/gregtech/api/GregTech_API.java42
-rw-r--r--src/main/java/gregtech/api/enums/GT_Values.java10
-rw-r--r--src/main/java/gregtech/api/enums/OrePrefixes.java44
-rw-r--r--src/main/java/gregtech/api/graphs/paths/PowerNodePath.java36
-rw-r--r--src/main/java/gregtech/api/gui/GT_Container.java740
-rw-r--r--src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java244
-rw-r--r--src/main/java/gregtech/api/gui/GT_Container_1by1.java30
-rw-r--r--src/main/java/gregtech/api/gui/GT_Container_2by2.java33
-rw-r--r--src/main/java/gregtech/api/gui/GT_Container_3by3.java38
-rw-r--r--src/main/java/gregtech/api/gui/GT_Container_4by4.java45
-rw-r--r--src/main/java/gregtech/api/gui/GT_Container_BasicTank.java138
-rw-r--r--src/main/java/gregtech/api/gui/GT_Container_MultiMachine.java39
-rw-r--r--src/main/java/gregtech/api/gui/GT_GUIColorOverride.java1
-rw-r--r--src/main/java/gregtech/api/gui/GT_GUIContainer.java99
-rw-r--r--src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java271
-rw-r--r--src/main/java/gregtech/api/gui/GT_GUIContainer_1by1.java42
-rw-r--r--src/main/java/gregtech/api/gui/GT_GUIContainer_2by2.java42
-rw-r--r--src/main/java/gregtech/api/gui/GT_GUIContainer_3by3.java42
-rw-r--r--src/main/java/gregtech/api/gui/GT_GUIContainer_4by4.java42
-rw-r--r--src/main/java/gregtech/api/gui/GT_GUIContainer_BasicTank.java47
-rw-r--r--src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java173
-rw-r--r--src/main/java/gregtech/api/gui/GT_GUICover.java55
-rw-r--r--src/main/java/gregtech/api/gui/GT_GUIDialogSelectItem.java229
-rw-r--r--src/main/java/gregtech/api/gui/GT_GUIScreen.java327
-rw-r--r--src/main/java/gregtech/api/gui/GT_Slot_Armor.java30
-rw-r--r--src/main/java/gregtech/api/gui/GT_Slot_DataOrb.java19
-rw-r--r--src/main/java/gregtech/api/gui/GT_Slot_Holo.java77
-rw-r--r--src/main/java/gregtech/api/gui/GT_Slot_Output.java17
-rw-r--r--src/main/java/gregtech/api/gui/GT_Slot_Render.java24
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java179
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_GuiFakeItemButton.java162
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_GuiIcon.java157
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_GuiIconButton.java114
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_GuiIconCheckButton.java43
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java73
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_GuiSlotTooltip.java24
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_GuiSmartTooltip.java27
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_GuiTab.java174
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_GuiTabLine.java274
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_GuiTooltip.java121
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_GuiTooltipManager.java80
-rw-r--r--src/main/java/gregtech/api/interfaces/IDragAndDropSupport.java58
-rw-r--r--src/main/java/gregtech/api/interfaces/IFluidAccess.java26
-rw-r--r--src/main/java/gregtech/api/interfaces/IGlobalWirelessEnergy.java98
-rw-r--r--src/main/java/gregtech/api/interfaces/IGuiIcon.java19
-rw-r--r--src/main/java/gregtech/api/interfaces/IGuiScreen.java45
-rw-r--r--src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java26
-rw-r--r--src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java23
-rw-r--r--src/main/java/gregtech/api/items/GT_Generic_Item.java5
-rw-r--r--src/main/java/gregtech/api/metatileentity/BaseTileEntity.java21
-rw-r--r--src/main/java/gregtech/api/metatileentity/CommonMetaTileEntity.java2
-rw-r--r--src/main/java/gregtech/api/metatileentity/CoverableTileEntity.java20
-rw-r--r--src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java16
-rw-r--r--src/main/java/gregtech/api/metatileentity/MetaTileEntity.java34
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java20
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java11
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java5
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java5
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java5
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java20
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java5
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DataAccess.java5
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java5
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java12
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java5
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_MultiInput.java5
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java5
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java12
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MagHatch.java5
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java11
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java7
-rw-r--r--src/main/java/gregtech/api/net/GT_PacketTypes.java8
-rw-r--r--src/main/java/gregtech/api/net/GT_Packet_GtTileEntityGuiRequest.java122
-rw-r--r--src/main/java/gregtech/api/net/GT_Packet_Sound.java5
-rw-r--r--src/main/java/gregtech/api/net/GT_Packet_TileEntityCover.java98
-rw-r--r--src/main/java/gregtech/api/net/GT_Packet_TileEntityCoverGUI.java219
-rw-r--r--src/main/java/gregtech/api/net/GT_Packet_TileEntityCoverNew.java119
-rw-r--r--src/main/java/gregtech/api/net/GT_Packet_WirelessRedstoneCover.java99
-rw-r--r--src/main/java/gregtech/api/util/GT_CoverBehavior.java29
-rw-r--r--src/main/java/gregtech/api/util/GT_CoverBehaviorBase.java35
-rw-r--r--src/main/java/gregtech/api/util/GT_ModHandler.java54
-rw-r--r--src/main/java/gregtech/api/util/GT_PlayedSound.java11
-rw-r--r--src/main/java/gregtech/api/util/GT_Utility.java100
-rw-r--r--src/main/java/gregtech/common/GT_Proxy.java57
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Casings4.java14
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Casings8.java11
-rw-r--r--src/main/java/gregtech/common/covers/CoverInfo.java4
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Arm.java5
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java5
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java5
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java5
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java5
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java5
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_FluidLimiter.java5
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java5
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java5
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java5
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java5
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java5
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java5
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java5
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Pump.java5
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java5
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Shutter.java5
-rw-r--r--src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedWirelessRedstoneBase.java5
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_None.java6
-rw-r--r--src/main/java/gregtech/common/net/MessageSetFlaskCapacity.java68
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/debug/GT_MetaTileEntity_AdvDebugStructureWriter.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_BetterJukebox.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java33
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/purification/GT_MetaTileEntity_pHSensor.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java5
-rw-r--r--src/main/java/gregtech/loaders/preload/GT_PreLoad.java16
-rw-r--r--src/main/java/gtPlusPlus/core/container/Container_PestKiller.java89
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java9
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_ElectricAutoWorkbench.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CropHarvestor.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_AutoChisel.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java2
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java2
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneCircuitBlock.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredChest.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java5
-rw-r--r--src/main/java/kubatech/api/implementations/KubaTechGTMultiBlockBase.java5
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/1by1.pngbin1502 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/2by2.pngbin1535 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/3by3.pngbin1543 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/4by4.pngbin1566 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/AdvancedCraftingTable.pngbin1991 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/BasicTank.pngbin1710 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/BronzeCraftingTable.pngbin1928 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/ComputerCubeRedstone.pngbin2290 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/CropHarvestor.pngbin1858 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/ElectricAutoWorkbench.pngbin2797 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/ElectricBufferSmall.pngbin1859 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/ElectricItemCleaner.pngbin1854 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/GuiButtons.pngbin19542 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/GuiTabs.pngbin924 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/Implosion.pngbin2003 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/InventoryManager.pngbin3462 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/MagicAbsorber.pngbin3530 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/RedstoneCircuitBlock.pngbin2208 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/Retriever.pngbin1831 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/Safe.pngbin1499 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/Sonictron.pngbin1570 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/Tradeomat_Inventory.pngbin1452 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/Tradeomat_Main.pngbin1661 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/Tradeomat_Settings.pngbin1658 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/armorgui3x3.pngbin2847 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/armorgui3x4.pngbin3812 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/basicmachines/Default.pngbin2034 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/basicmachines/LCRNEI.pngbin2841 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/multimachines/MultiblockDisplay.pngbin1594 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/void.pngbin132 -> 0 bytes
213 files changed, 152 insertions, 6440 deletions
diff --git a/src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchBeamlineConnector.java b/src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchBeamlineConnector.java
index c0fa41774b..0c9cb9ad51 100644
--- a/src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchBeamlineConnector.java
+++ b/src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchBeamlineConnector.java
@@ -33,7 +33,7 @@ public abstract class TileHatchBeamlineConnector<T extends DataPacket> extends G
TT_Utility.setTier(aTier, this);
}
- protected TileHatchBeamlineConnector(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
+ protected TileHatchBeamlineConnector(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
super(aName, aTier, 0, aDescription, aTextures);
}
diff --git a/src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchInputBeamline.java b/src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchInputBeamline.java
index e5a5c9df2f..ffa0ecf56c 100644
--- a/src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchInputBeamline.java
+++ b/src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchInputBeamline.java
@@ -34,7 +34,7 @@ public class TileHatchInputBeamline extends TileHatchBeamlineConnector<BeamLineP
TT_Utility.setTier(tier, this);
}
- public TileHatchInputBeamline(String name, int tier, String desc, ITexture[][][] textures) {
+ public TileHatchInputBeamline(String name, int tier, String[] desc, ITexture[][][] textures) {
super(name, tier, desc, textures);
}
@@ -58,7 +58,7 @@ public class TileHatchInputBeamline extends TileHatchBeamlineConnector<BeamLineP
@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity tile) {
- return new TileHatchInputBeamline(mName, mTier, mDescription, mTextures);
+ return new TileHatchInputBeamline(mName, mTier, mDescriptionArray, mTextures);
}
@Override
diff --git a/src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchOutputBeamline.java b/src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchOutputBeamline.java
index 5483ee1d0f..31a18ea58d 100644
--- a/src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchOutputBeamline.java
+++ b/src/main/java/com/elisis/gtnhlanth/common/hatch/TileHatchOutputBeamline.java
@@ -32,7 +32,7 @@ public class TileHatchOutputBeamline extends TileHatchBeamlineConnector<BeamLine
TT_Utility.setTier(tier, this);
}
- public TileHatchOutputBeamline(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
+ public TileHatchOutputBeamline(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
}
@@ -133,6 +133,6 @@ public class TileHatchOutputBeamline extends TileHatchBeamlineConnector<BeamLine
@Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity arg0) {
- return new TileHatchOutputBeamline(mName, mTier, mDescription, mTextures);
+ return new TileHatchOutputBeamline(mName, mTier, mDescriptionArray, mTextures);
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java
index e2ab668f47..2644138bf3 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java
@@ -492,9 +492,4 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch
return new GUITextureSet().setMainBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT)
.setGregTechLogo(GT_UITextures.PICTURE_GT_LOGO_17x17_TRANSPARENT);
}
-
- @Override
- public boolean useModularUI() {
- return true;
- }
}
diff --git a/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java b/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java
index 014579bdd1..db3212ad86 100644
--- a/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java
+++ b/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java
@@ -308,7 +308,7 @@ import static com.github.technus.tectech.thing.CustomItemList.hatch_CreativeMain
import static com.github.technus.tectech.thing.CustomItemList.hatch_CreativeUncertainty;
import static com.github.technus.tectech.thing.CustomItemList.holder_Hatch;
import static com.github.technus.tectech.thing.CustomItemList.rack_Hatch;
-import static com.github.technus.tectech.util.CommonValues.V;
+import static gregtech.api.enums.GT_Values.V;
import static gregtech.api.enums.MetaTileEntityIDs.ActiveTransformer;
import static gregtech.api.enums.MetaTileEntityIDs.AdvancedTeslaTransceiver1by1;
import static gregtech.api.enums.MetaTileEntityIDs.AdvancedTeslaTransceiver2by2;
diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsBA0.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsBA0.java
index de6336ed60..2aa0d41249 100644
--- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsBA0.java
+++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsBA0.java
@@ -2,7 +2,7 @@ package com.github.technus.tectech.thing.casing;
import static com.github.technus.tectech.util.CommonValues.COSMIC_MARK;
import static com.github.technus.tectech.util.CommonValues.THETA_MOVEMENT;
-import static com.github.technus.tectech.util.CommonValues.V;
+import static gregtech.api.enums.GT_Values.V;
import static gregtech.api.util.GT_Utility.formatNumbers;
import static net.minecraft.util.EnumChatFormatting.AQUA;
import static net.minecraft.util.EnumChatFormatting.GRAY;
diff --git a/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_EnderFluidLink.java b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_EnderFluidLink.java
index b3fe110201..a2589e904a 100644
--- a/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_EnderFluidLink.java
+++ b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_EnderFluidLink.java
@@ -115,11 +115,6 @@ public class GT_Cover_TM_EnderFluidLink extends GT_CoverBehavior {
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) {
// Only open gui if we're placed on a fluid tank
if (buildContext.getTile() instanceof IFluidHandler) {
diff --git a/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCapacitor.java b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCapacitor.java
index 6e292bc9c7..5b841a766d 100644
--- a/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCapacitor.java
+++ b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCapacitor.java
@@ -2,7 +2,7 @@ package com.github.technus.tectech.thing.item;
import static com.github.technus.tectech.Reference.MODID;
import static com.github.technus.tectech.thing.CustomItemList.teslaCapacitor;
-import static com.github.technus.tectech.util.CommonValues.V;
+import static gregtech.api.enums.GT_Values.V;
import static net.minecraft.util.StatCollector.translateToLocal;
import java.util.List;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Capacitor.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Capacitor.java
index 3cb7a93f77..1dc7b5513e 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Capacitor.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Capacitor.java
@@ -1,8 +1,8 @@
package com.github.technus.tectech.thing.metaTileEntity.hatch;
import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE;
-import static com.github.technus.tectech.util.CommonValues.V;
import static com.github.technus.tectech.util.TT_Utility.getUniqueIdentifier;
+import static gregtech.api.enums.GT_Values.V;
import static net.minecraft.util.StatCollector.translateToLocal;
import java.util.HashMap;
@@ -167,11 +167,6 @@ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch i
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
SlotGroup.ofItemHandler(inventoryHandler, 4)
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoMulti.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoMulti.java
index 4ada48b3d3..d9b36d263f 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoMulti.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoMulti.java
@@ -1,7 +1,7 @@
package com.github.technus.tectech.thing.metaTileEntity.hatch;
import static com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_IN_POWER_TT;
-import static com.github.technus.tectech.util.CommonValues.V;
+import static gregtech.api.enums.GT_Values.V;
import static net.minecraft.util.StatCollector.translateToLocal;
import net.minecraft.entity.player.EntityPlayer;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoTunnel.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoTunnel.java
index 6ee5280e51..3da59f5016 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoTunnel.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoTunnel.java
@@ -2,7 +2,7 @@ package com.github.technus.tectech.thing.metaTileEntity.hatch;
import static com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_OUT_LASER_TT;
import static com.github.technus.tectech.util.CommonValues.TRANSFER_AT;
-import static com.github.technus.tectech.util.CommonValues.V;
+import static gregtech.api.enums.GT_Values.V;
import static net.minecraft.util.StatCollector.translateToLocal;
import net.minecraft.entity.player.EntityPlayer;
@@ -264,11 +264,6 @@ public class GT_MetaTileEntity_Hatch_DynamoTunnel extends GT_MetaTileEntity_Hatc
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.setBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT);
builder.setGuiTint(getGUIColorization());
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java
index 6b84e75530..509473e9ba 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java
@@ -1,7 +1,7 @@
package com.github.technus.tectech.thing.metaTileEntity.hatch;
import static com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_IN_POWER_TT;
-import static com.github.technus.tectech.util.CommonValues.V;
+import static gregtech.api.enums.GT_Values.V;
import static net.minecraft.util.StatCollector.translateToLocal;
import static net.minecraft.util.StatCollector.translateToLocalFormatted;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyTunnel.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyTunnel.java
index 071379e367..ae3e698836 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyTunnel.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyTunnel.java
@@ -2,7 +2,7 @@ package com.github.technus.tectech.thing.metaTileEntity.hatch;
import static com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_IN_LASER_TT;
import static com.github.technus.tectech.util.CommonValues.TRANSFER_AT;
-import static com.github.technus.tectech.util.CommonValues.V;
+import static gregtech.api.enums.GT_Values.V;
import static net.minecraft.util.StatCollector.translateToLocal;
import net.minecraft.entity.player.EntityPlayer;
@@ -163,11 +163,6 @@ public class GT_MetaTileEntity_Hatch_EnergyTunnel extends GT_MetaTileEntity_Hatc
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.setBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT);
builder.setGuiTint(getGUIColorization());
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Holder.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Holder.java
index 38dd876553..14a75ce797 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Holder.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Holder.java
@@ -128,11 +128,6 @@ public class GT_MetaTileEntity_Hatch_Holder extends GT_MetaTileEntity_Hatch impl
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addGregTechLogo(ModularWindow.Builder builder) {
builder.widget(
new DrawableWidget().setDrawable(TecTechUITextures.PICTURE_TECTECH_LOGO)
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Param.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Param.java
index 90f0267695..828a935321 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Param.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Param.java
@@ -219,11 +219,6 @@ public class GT_MetaTileEntity_Hatch_Param extends GT_MetaTileEntity_Hatch imple
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addGregTechLogo(ModularWindow.Builder builder) {
builder.widget(
new DrawableWidget().setDrawable(TecTechUITextures.PICTURE_TECTECH_LOGO_DARK)
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Rack.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Rack.java
index 2b65ba607e..6ebb16d85e 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Rack.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Rack.java
@@ -291,11 +291,6 @@ public class GT_MetaTileEntity_Hatch_Rack extends GT_MetaTileEntity_Hatch implem
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addGregTechLogo(ModularWindow.Builder builder) {
builder.widget(
new DrawableWidget().setDrawable(TecTechUITextures.PICTURE_TECTECH_LOGO)
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Uncertainty.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Uncertainty.java
index 6ecbe67d22..2b0a4f2674 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Uncertainty.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Uncertainty.java
@@ -341,11 +341,6 @@ public class GT_MetaTileEntity_Hatch_Uncertainty extends GT_MetaTileEntity_Hatch
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addGregTechLogo(ModularWindow.Builder builder) {
builder.widget(
new DrawableWidget().setDrawable(TecTechUITextures.PICTURE_TECTECH_LOGO_DARK)
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_WirelessComputation_Input.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_WirelessComputation_Input.java
index c29a5320dd..6824ce2ef1 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_WirelessComputation_Input.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_WirelessComputation_Input.java
@@ -85,11 +85,6 @@ public class GT_MetaTileEntity_Hatch_WirelessComputation_Input extends GT_MetaTi
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addGregTechLogo(ModularWindow.Builder builder) {
builder.widget(
new DrawableWidget().setDrawable(TecTechUITextures.PICTURE_TECTECH_LOGO)
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_WirelessMulti.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_WirelessMulti.java
index 3d3f417b51..7d4baca7cd 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_WirelessMulti.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_WirelessMulti.java
@@ -9,9 +9,12 @@ import static com.gtnewhorizon.gtnhlib.util.AnimatedTooltipHandler.BOLD;
import static com.gtnewhorizon.gtnhlib.util.AnimatedTooltipHandler.GRAY;
import static gregtech.api.enums.GT_Values.AuthorColen;
import static gregtech.api.enums.GT_Values.V;
+import static gregtech.common.misc.WirelessNetworkManager.addEUToGlobalEnergyMap;
+import static gregtech.common.misc.WirelessNetworkManager.strongCheckOrAddUser;
import static java.lang.Long.min;
import java.math.BigInteger;
+import java.util.UUID;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
@@ -19,21 +22,19 @@ import net.minecraftforge.common.util.ForgeDirection;
import com.github.technus.tectech.util.TT_Utility;
-import gregtech.api.interfaces.IGlobalWirelessEnergy;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.interfaces.tileentity.IWirelessEnergyHatchInformation;
import gregtech.api.metatileentity.MetaTileEntity;
public class GT_MetaTileEntity_Hatch_WirelessMulti extends GT_MetaTileEntity_Hatch_EnergyMulti
- implements IGlobalWirelessEnergy, IWirelessEnergyHatchInformation {
+ implements IWirelessEnergyHatchInformation {
private final BigInteger eu_transferred_per_operation = BigInteger
.valueOf(Amperes * V[mTier] * ticks_between_energy_addition);
private final long eu_transferred_per_operation_long = eu_transferred_per_operation.longValue();
- private String owner_uuid;
- private String owner_name;
+ private UUID owner_uuid;
public GT_MetaTileEntity_Hatch_WirelessMulti(int aID, String aName, String aNameRegional, int aTier, int aAmp) {
super(
@@ -177,11 +178,9 @@ public class GT_MetaTileEntity_Hatch_WirelessMulti extends GT_MetaTileEntity_Hat
// On first tick find the player name and attempt to add them to the map.
// UUID and username of the owner.
- owner_uuid = aBaseMetaTileEntity.getOwnerUuid()
- .toString();
- owner_name = aBaseMetaTileEntity.getOwnerName();
+ owner_uuid = aBaseMetaTileEntity.getOwnerUuid();
- strongCheckOrAddUser(owner_uuid, owner_name);
+ strongCheckOrAddUser(owner_uuid);
tryFetchingEnergy();
}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java
index 8d578c8f5d..b091d33e32 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java
@@ -18,6 +18,8 @@ import static gregtech.api.enums.GT_Values.AuthorColen;
import static gregtech.api.util.GT_ParallelHelper.calculateChancedOutputMultiplier;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
import static gregtech.api.util.GT_Utility.formatNumbers;
+import static gregtech.common.misc.WirelessNetworkManager.addEUToGlobalEnergyMap;
+import static gregtech.common.misc.WirelessNetworkManager.strongCheckOrAddUser;
import static java.lang.Math.exp;
import static java.lang.Math.max;
import static java.lang.Math.pow;
@@ -37,6 +39,7 @@ import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.UUID;
import javax.annotation.Nonnull;
@@ -76,7 +79,6 @@ import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Materials;
import gregtech.api.enums.MaterialsUEVplus;
import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IGlobalWirelessEnergy;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -97,7 +99,7 @@ import pers.gwyog.gtneioreplugin.plugin.block.ModBlocks;
@SuppressWarnings("SpellCheckingInspection")
public class GT_MetaTileEntity_EM_EyeOfHarmony extends GT_MetaTileEntity_MultiblockBase_EM
- implements IConstructable, IGlobalWirelessEnergy, ISurvivalConstructable {
+ implements IConstructable, ISurvivalConstructable {
public static final boolean EOH_DEBUG_MODE = false;
private static final long MOLTEN_SPACETIME_PER_FAILURE_TIER = 14_400L;
@@ -128,7 +130,7 @@ public class GT_MetaTileEntity_EM_EyeOfHarmony extends GT_MetaTileEntity_Multibl
// Exact value to get 2^21 parallels.
private static final long ASTRAL_ARRAY_LIMIT = 8637;
- private String userUUID = "";
+ private UUID userUUID;
private BigInteger outputEU_BigInt = BigInteger.ZERO;
private long startEU = 0;
@@ -1506,9 +1508,8 @@ public class GT_MetaTileEntity_EM_EyeOfHarmony extends GT_MetaTileEntity_Multibl
super.onPreTick(aBaseMetaTileEntity, aTick);
if (aTick == 1) {
- userUUID = String.valueOf(getBaseMetaTileEntity().getOwnerUuid());
- String userName = getBaseMetaTileEntity().getOwnerName();
- strongCheckOrAddUser(userUUID, userName);
+ userUUID = getBaseMetaTileEntity().getOwnerUuid();
+ strongCheckOrAddUser(userUUID);
}
if (!recipeRunning && mMachine) {
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java
index c3aef39047..1d358e4947 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java
@@ -7,11 +7,11 @@ import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStat
import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.STATUS_OK;
import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.STATUS_TOO_LOW;
import static com.github.technus.tectech.util.CommonValues.MULTI_CHECK_AT;
-import static com.github.technus.tectech.util.CommonValues.V;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
import static gregtech.api.enums.GT_HatchElement.Energy;
import static gregtech.api.enums.GT_HatchElement.Maintenance;
+import static gregtech.api.enums.GT_Values.V;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
import static gregtech.api.util.GT_Utility.filterValidMTEs;
import static net.minecraft.util.StatCollector.translateToLocal;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java
index b084e632d4..cc4954a15d 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java
@@ -4,9 +4,9 @@ import static com.github.technus.tectech.recipe.TT_recipeAdder.nullItem;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
-import static com.github.technus.tectech.util.CommonValues.V;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.enums.GT_Values.V;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
import static net.minecraft.util.StatCollector.translateToLocal;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java
index e890f86ebf..5f1e4f4778 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java
@@ -3,12 +3,12 @@ package com.github.technus.tectech.thing.metaTileEntity.multi;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
-import static com.github.technus.tectech.util.CommonValues.V;
-import static com.github.technus.tectech.util.CommonValues.VN;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
import static gregtech.api.enums.GT_HatchElement.Energy;
import static gregtech.api.enums.GT_HatchElement.Maintenance;
+import static gregtech.api.enums.GT_Values.V;
+import static gregtech.api.enums.GT_Values.VN;
import static gregtech.api.recipe.RecipeMaps.scannerFakeRecipes;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
import static gregtech.api.util.GT_Utility.filterValidMTEs;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java
index b408e63af4..60eeb842a0 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java
@@ -9,9 +9,9 @@ import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStat
import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.STATUS_OK;
import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.STATUS_TOO_LOW;
import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.STATUS_WRONG;
-import static com.github.technus.tectech.util.CommonValues.V;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.enums.GT_Values.V;
import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
import static net.minecraft.util.StatCollector.translateToLocal;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java
index 8c3ad47ebe..4bf5b8f868 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java
@@ -18,7 +18,6 @@ import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStat
import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.STATUS_TOO_LOW;
import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.STATUS_WRONG;
import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.STATUS_WTF;
-import static com.github.technus.tectech.util.CommonValues.V;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlocksTiered;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
@@ -27,6 +26,7 @@ import static gregtech.api.enums.GT_HatchElement.Energy;
import static gregtech.api.enums.GT_HatchElement.InputHatch;
import static gregtech.api.enums.GT_HatchElement.Maintenance;
import static gregtech.api.enums.GT_HatchElement.OutputHatch;
+import static gregtech.api.enums.GT_Values.V;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
import static gregtech.api.util.GT_Utility.filterValidMTEs;
import static java.lang.Math.min;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java
index 2e89aa7f82..48c2e44bba 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java
@@ -6,8 +6,6 @@ import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texture
import static com.github.technus.tectech.util.CommonValues.MULTI_CHECK_AT;
import static com.github.technus.tectech.util.CommonValues.RECIPE_AT;
import static com.github.technus.tectech.util.CommonValues.TEC_MARK_GENERAL;
-import static com.github.technus.tectech.util.CommonValues.V;
-import static com.github.technus.tectech.util.CommonValues.VN;
import static com.github.technus.tectech.util.TT_Utility.getTier;
import static gregtech.api.enums.GT_HatchElement.InputBus;
import static gregtech.api.enums.GT_HatchElement.InputHatch;
@@ -15,6 +13,8 @@ import static gregtech.api.enums.GT_HatchElement.Maintenance;
import static gregtech.api.enums.GT_HatchElement.Muffler;
import static gregtech.api.enums.GT_HatchElement.OutputBus;
import static gregtech.api.enums.GT_HatchElement.OutputHatch;
+import static gregtech.api.enums.GT_Values.V;
+import static gregtech.api.enums.GT_Values.VN;
import static gregtech.api.metatileentity.BaseTileEntity.TOOLTIP_DELAY;
import static gregtech.api.util.GT_Utility.filterValidMTEs;
import static java.lang.Math.min;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_BuckConverter.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_BuckConverter.java
index f8ed346fa9..a4187da2ef 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_BuckConverter.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_BuckConverter.java
@@ -3,7 +3,8 @@ package com.github.technus.tectech.thing.metaTileEntity.single;
import static com.github.technus.tectech.thing.metaTileEntity.Textures.MACHINE_CASINGS_TT;
import static com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_IN_POWER_TT;
import static com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_OUT_POWER_TT;
-import static com.github.technus.tectech.util.CommonValues.VN;
+import static gregtech.api.enums.GT_Values.V;
+import static gregtech.api.enums.GT_Values.VN;
import static net.minecraft.util.StatCollector.translateToLocal;
import java.util.function.Consumer;
@@ -173,7 +174,7 @@ public class GT_MetaTileEntity_BuckConverter extends GT_MetaTileEntity_TieredMac
@Override
public long maxEUInput() {
- return CommonValues.V[mTier];
+ return V[mTier];
}
@Override
@@ -183,12 +184,12 @@ public class GT_MetaTileEntity_BuckConverter extends GT_MetaTileEntity_TieredMac
@Override
public long maxEUStore() {
- return CommonValues.V[mTier] << 4;
+ return V[mTier] << 4;
}
@Override
public long getMinimumStoredEU() {
- return CommonValues.V[mTier] << 2;
+ return V[mTier] << 2;
}
@Override
@@ -202,11 +203,6 @@ public class GT_MetaTileEntity_BuckConverter extends GT_MetaTileEntity_TieredMac
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addGregTechLogo(ModularWindow.Builder builder) {
builder.widget(
new DrawableWidget().setDrawable(GT_UITextures.PICTURE_GT_LOGO_17x17_TRANSPARENT_GRAY)
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugPollutor.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugPollutor.java
index 9e2a5ced60..0e1ad53a1b 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugPollutor.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugPollutor.java
@@ -155,11 +155,6 @@ public class GT_MetaTileEntity_DebugPollutor extends GT_MetaTileEntity_TieredMac
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addGregTechLogo(ModularWindow.Builder builder) {
builder.widget(
new DrawableWidget().setDrawable(GT_UITextures.PICTURE_GT_LOGO_17x17_TRANSPARENT_GRAY)
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugPowerGenerator.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugPowerGenerator.java
index 342ca69864..469e6e4225 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugPowerGenerator.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugPowerGenerator.java
@@ -6,7 +6,7 @@ import static com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_
import static com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_OUT_LASER_TT;
import static com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_OUT_POWER_TT;
import static com.github.technus.tectech.util.CommonValues.TRANSFER_AT;
-import static com.github.technus.tectech.util.CommonValues.VN;
+import static gregtech.api.enums.GT_Values.VN;
import static net.minecraft.util.StatCollector.translateToLocal;
import java.util.function.Consumer;
@@ -312,11 +312,6 @@ public class GT_MetaTileEntity_DebugPowerGenerator extends GT_MetaTileEntity_Tie
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addGregTechLogo(ModularWindow.Builder builder) {
builder.widget(
new DrawableWidget().setDrawable(GT_UITextures.PICTURE_GT_LOGO_17x17_TRANSPARENT_GRAY)
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java
index 519ea19641..1b9455fb6e 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java
@@ -209,11 +209,6 @@ public class GT_MetaTileEntity_DebugStructureWriter extends GT_MetaTileEntity_Ti
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addGregTechLogo(ModularWindow.Builder builder) {
builder.widget(
new DrawableWidget().setDrawable(GT_UITextures.PICTURE_GT_LOGO_17x17_TRANSPARENT_GRAY)
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java
index e19ac1bf7d..d5c0be6b21 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java
@@ -9,7 +9,7 @@ import static com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_
import static com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_OUT_POWER_TT;
import static com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_OUT_TT;
import static com.github.technus.tectech.thing.metaTileEntity.Textures.TESLA_TRANSCEIVER_TOP_BA;
-import static com.github.technus.tectech.util.CommonValues.V;
+import static gregtech.api.enums.GT_Values.V;
import static java.lang.Math.round;
import static net.minecraft.util.StatCollector.translateToLocal;
import static net.minecraft.util.StatCollector.translateToLocalFormatted;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_WetTransformer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_WetTransformer.java
index ab73cba63e..dfb43eca51 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_WetTransformer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_WetTransformer.java
@@ -1,6 +1,6 @@
package com.github.technus.tectech.thing.metaTileEntity.single;
-import static com.github.technus.tectech.util.CommonValues.V;
+import static gregtech.api.enums.GT_Values.V;
import static net.minecraft.util.StatCollector.translateToLocal;
import com.github.technus.tectech.util.CommonValues;
diff --git a/src/main/java/com/github/technus/tectech/util/CommonValues.java b/src/main/java/com/github/technus/tectech/util/CommonValues.java
index 8e4539a17a..3f9e3eabac 100644
--- a/src/main/java/com/github/technus/tectech/util/CommonValues.java
+++ b/src/main/java/com/github/technus/tectech/util/CommonValues.java
@@ -2,8 +2,6 @@ package com.github.technus.tectech.util;
import net.minecraft.util.EnumChatFormatting;
-import gregtech.api.enums.GT_Values;
-
/**
* Created by danie_000 on 11.01.2017.
*/
@@ -23,9 +21,6 @@ public final class CommonValues {
public static final byte MULTI_CHECK_AT = 12; // multiblock checks its state
public static final byte TRANSFER_AT = 16;
- public static final String[] VN = GT_Values.VN;
- public static final long[] V = GT_Values.V;
-
public static final String[] EOH_TIER_FANCY_NAMES = { "Crude", "Primitive", "Stable", "Advanced", "Superb",
"Exotic", "Perfect", "Tipler", EnumChatFormatting.BOLD + "Gallifreyan" };
diff --git a/src/main/java/com/github/technus/tectech/util/TT_Utility.java b/src/main/java/com/github/technus/tectech/util/TT_Utility.java
index cc5f262018..1bf7eae552 100644
--- a/src/main/java/com/github/technus/tectech/util/TT_Utility.java
+++ b/src/main/java/com/github/technus/tectech/util/TT_Utility.java
@@ -1,5 +1,7 @@
package com.github.technus.tectech.util;
+import static gregtech.api.enums.GT_Values.V;
+
import java.lang.reflect.Field;
import java.math.BigInteger;
import java.util.Formatter;
@@ -98,10 +100,10 @@ public final class TT_Utility {
do {
++b;
- if (b >= CommonValues.V.length) {
+ if (b >= V.length) {
return b;
}
- } while (l > CommonValues.V[b]);
+ } while (l > V[b]);
return b;
}
diff --git a/src/main/java/goodgenerator/blocks/tileEntity/GTMetaTileEntity/NeutronSensor.java b/src/main/java/goodgenerator/blocks/tileEntity/GTMetaTileEntity/NeutronSensor.java
index 86bcbeece9..10a6814ddb 100644
--- a/src/main/java/goodgenerator/blocks/tileEntity/GTMetaTileEntity/NeutronSensor.java
+++ b/src/main/java/goodgenerator/blocks/tileEntity/GTMetaTileEntity/NeutronSensor.java
@@ -235,11 +235,6 @@ public class NeutronSensor extends GT_MetaTileEntity_Hatch {
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
final String INVERTED = GT_Utility.trans("INVERTED", "Inverted");
final String NORMAL = GT_Utility.trans("NORMAL", "Normal");
diff --git a/src/main/java/goodgenerator/blocks/tileEntity/SupercriticalFluidTurbine.java b/src/main/java/goodgenerator/blocks/tileEntity/SupercriticalFluidTurbine.java
index 26ed966008..f04cf2eecb 100644
--- a/src/main/java/goodgenerator/blocks/tileEntity/SupercriticalFluidTurbine.java
+++ b/src/main/java/goodgenerator/blocks/tileEntity/SupercriticalFluidTurbine.java
@@ -1,5 +1,7 @@
package goodgenerator.blocks.tileEntity;
+import static gregtech.api.util.GT_Utility.trans;
+
import java.util.ArrayList;
import net.minecraft.block.Block;
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java
index 4c23d22802..17d76f564d 100644
--- a/src/main/java/gregtech/GT_Mod.java
+++ b/src/main/java/gregtech/GT_Mod.java
@@ -166,16 +166,8 @@ import ic2.api.recipe.RecipeOutput;
+ " after:gendustry;")
public class GT_Mod implements IGT_Mod {
- @Deprecated // Keep for use in BaseMetaTileEntity
- public static final int VERSION = VERSION_MAJOR, SUBVERSION = VERSION_MINOR;
-
- @Deprecated
- public static final int TOTAL_VERSION = calculateTotalGTVersion(VERSION, SUBVERSION);
public static final int NBT_VERSION = calculateTotalGTVersion(VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH);
- @Deprecated
- public static final int REQUIRED_IC2 = 624;
-
@Mod.Instance(Mods.Names.GREG_TECH)
public static GT_Mod instance;
@@ -214,11 +206,6 @@ public class GT_Mod implements IGT_Mod {
Textures.ItemIcons.VOID.name();
}
- @SuppressWarnings("unused") // TODO: Delete this method
- public static int calculateTotalGTVersion(int minorVersion) {
- return calculateTotalGTVersion(VERSION, minorVersion);
- }
-
public static int calculateTotalGTVersion(int majorVersion, int minorVersion) {
return calculateTotalGTVersion(majorVersion, minorVersion, 0);
}
@@ -243,7 +230,6 @@ public class GT_Mod implements IGT_Mod {
}
Configuration tMainConfig = GT_PreLoad.getConfiguration(aEvent.getModConfigurationDirectory());
- GT_PreLoad.initCompat();
GT_PreLoad.createLogFiles(
aEvent.getModConfigurationDirectory()
.getParentFile(),
diff --git a/src/main/java/gregtech/api/GregTech_API.java b/src/main/java/gregtech/api/GregTech_API.java
index cdcc3b4a0f..932cd3b715 100644
--- a/src/main/java/gregtech/api/GregTech_API.java
+++ b/src/main/java/gregtech/api/GregTech_API.java
@@ -1,8 +1,6 @@
package gregtech.api;
import static gregtech.api.enums.GT_Values.B;
-import static gregtech.api.enums.GT_Values.L;
-import static gregtech.api.enums.GT_Values.M;
import static gregtech.api.enums.Mods.IndustrialCraft2;
import java.util.ArrayList;
@@ -95,16 +93,6 @@ import gregtech.common.items.GT_IntegratedCircuit_Item;
public class GregTech_API {
/**
- * @deprecated Use {@link GT_Values#M}
- */
- @Deprecated
- public static final long MATERIAL_UNIT = M;
- /**
- * @deprecated Use {@link GT_Values#L}
- */
- @Deprecated
- public static final long FLUID_MATERIAL_UNIT = L;
- /**
* Fixes the HashMap Mappings for ItemStacks once the Server started
* <br>
* <br>
@@ -312,16 +300,6 @@ public class GregTech_API {
sMachineWireFire = true, mOutputRF = false, mInputRF = false, meIOLoaded = false, mRFExplosions = false,
mServerStarted = false;
- @Deprecated
- public static boolean mIC2Classic = false, mMagneticraft = false, mImmersiveEngineering = false,
- mGTPlusPlus = false, mTranslocator = false, mTConstruct = false, mGalacticraft = false, mHodgepodge = false,
- mAvaritia = false;
- /**
- * This is always set to true
- */
- @Deprecated
- public boolean mAE2 = true;
-
public static int mEUtoRF = 360, mRFtoEU = 20;
/**
@@ -901,17 +879,6 @@ public class GregTech_API {
/**
* returns a Cover behavior, guaranteed to not return null after preload
- */
- @Deprecated
- public static GT_CoverBehavior getCoverBehavior(ItemStack aStack) {
- if (aStack == null || aStack.getItem() == null) return sNoBehavior;
- GT_CoverBehaviorBase<?> rCover = sCoverBehaviors.get(new GT_ItemStack(aStack));
- if (!(rCover instanceof GT_CoverBehavior)) return sDefaultBehavior;
- return (GT_CoverBehavior) rCover;
- }
-
- /**
- * returns a Cover behavior, guaranteed to not return null after preload
*
* @return The Cover behavior
*/
@@ -927,15 +894,6 @@ public class GregTech_API {
/**
* returns a Cover behavior, guaranteed to not return null
*/
- @Deprecated
- public static GT_CoverBehavior getCoverBehavior(int aStack) {
- if (aStack == 0) return sNoBehavior;
- return getCoverBehavior(GT_Utility.intToStack(aStack));
- }
-
- /**
- * returns a Cover behavior, guaranteed to not return null
- */
public static GT_CoverBehaviorBase<?> getCoverBehaviorNew(int aStack) {
if (aStack == 0) return sNoBehavior;
return getCoverBehaviorNew(GT_Utility.intToStack(aStack));
diff --git a/src/main/java/gregtech/api/enums/GT_Values.java b/src/main/java/gregtech/api/enums/GT_Values.java
index a7fde53b66..ec4a6ce5c7 100644
--- a/src/main/java/gregtech/api/enums/GT_Values.java
+++ b/src/main/java/gregtech/api/enums/GT_Values.java
@@ -208,16 +208,6 @@ public class GT_Values {
@Deprecated
public static final String TEX_DIR = "textures/";
@Deprecated
- public static final String TEX_DIR_GUI = TEX_DIR + "gui/";
- @Deprecated
- public static final String TEX_DIR_ITEM = TEX_DIR + "items/";
- @Deprecated
- public static final String TEX_DIR_BLOCK = TEX_DIR + "blocks/";
- @Deprecated
- public static final String TEX_DIR_ENTITY = TEX_DIR + "entity/";
- @Deprecated
- public static final String TEX_DIR_ASPECTS = TEX_DIR + "aspects/";
- @Deprecated
public static final String RES_PATH = GregTech.getResourcePath(TEX_DIR);
@Deprecated
public static final String RES_PATH_GUI = GregTech.getResourcePath("textures", "gui/");
diff --git a/src/main/java/gregtech/api/enums/OrePrefixes.java b/src/main/java/gregtech/api/enums/OrePrefixes.java
index a703e8690a..67371a3a9a 100644
--- a/src/main/java/gregtech/api/enums/OrePrefixes.java
+++ b/src/main/java/gregtech/api/enums/OrePrefixes.java
@@ -35,16 +35,6 @@ public enum OrePrefixes {
___placeholder___("Placeholder", "", "", false, false, false, false, false, false, false, false, false, false, 0, 0,
1, -1),
- @Deprecated
- pulp("Pulps", "", "", false, false, false, false, false, false, false, false, false, false,
- B[0] | B[1] | B[2] | B[3], -1, 64, -1),
- @Deprecated
- leaves("Leaves", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1),
- @Deprecated
- sapling("Saplings", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1),
- @Deprecated
- itemDust("Dusts", "", "", false, false, false, false, false, false, false, false, false, false,
- B[0] | B[1] | B[2] | B[3], -1, 64, -1),
/** In case of an End-Ores Mod. Ore -> Material is a Oneway Operation! */
oreBlackgranite("Black Granite Ores", "Granite ", " Ore", true, true, false, false, false, true, false, false,
false, true, B[3], -1, 64, -1),
@@ -63,9 +53,6 @@ public enum OrePrefixes {
/** Prefix of the Nether-Ores Mod. Causes Ores to double. Ore -> Material is a Oneway Operation! */
oreNether("Nether Ores", "Nether ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3],
-1, 64, -1),
- @Deprecated
- denseore("Dense Ores", "", "", false, false, false, false, false, true, false, false, false, true, B[3], -1, 64,
- -1),
/** Prefix of the Dense-Ores Mod. Causes Ores to double. Ore -> Material is a Oneway Operation! */
oreDense("Dense Ores", "Dense ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1,
64, -1),
@@ -87,8 +74,6 @@ public enum OrePrefixes {
/** In case of an End-Ores Mod. Ore -> Material is a Oneway Operation! */
oreEnd("End Ores", "End ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64,
-1),
- @Deprecated
- oreGem("Ores", "", "", false, false, false, false, false, true, false, false, false, true, B[3], -1, 64, -1),
/** Regular Ore Prefix. Ore -> Material is a Oneway Operation! Introduced by Eloraam */
ore("Ores", "", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, 68),
crushedCentrifuged("Centrifuged Ores", "Centrifuged ", " Ore", true, true, false, false, false, false, false, true,
@@ -118,9 +103,6 @@ public enum OrePrefixes {
/** A quadruple Ingot. */
ingotQuadruple("4x Ingots", "Quadruple ", " Ingot", true, true, false, false, false, false, true, true, false,
false, B[1], M * 4, 64, 15),
- @Deprecated
- ingotQuad("4x Ingots", "Quadruple ", " Ingot", false, false, false, false, false, false, false, false, false, false,
- B[1], -1, 64, 15),
/** A triple Ingot. */
ingotTriple("3x Ingots", "Triple ", " Ingot", true, true, false, false, false, false, true, false, false, false,
B[1], M * 3, 64, 14),
@@ -147,9 +129,6 @@ public enum OrePrefixes {
false, B[2], M * 4, 64, 62),
/** A regular Gem worth one Dust. Introduced by Eloraam */
gem("Gemstones", "", "", true, true, true, false, false, false, true, true, false, false, B[2], M * 1, 64, 8),
- @Deprecated
- dustDirty("Impure Dusts", "", "", false, false, false, false, false, false, false, false, false, true, B[3], -1, 64,
- 3),
/** 1/9th of a Dust. */
dustTiny("Tiny Dusts", "Tiny Pile of ", " Dust", true, true, false, false, false, false, false, true, false, false,
B[0] | B[1] | B[2] | B[3], M / 9, 64, 0),
@@ -181,9 +160,6 @@ public enum OrePrefixes {
false, B[1], M * 5, 64, 21),
plateQuadruple("4x Plates", "Quadruple ", " Plate", true, true, false, false, false, false, true, true, false,
false, B[1], M * 4, 64, 20),
- @Deprecated
- plateQuad("4x Plates", "", "", false, false, false, false, false, false, false, false, false, false, B[1], -1, 64,
- 20),
plateTriple("3x Plates", "Triple ", " Plate", true, true, false, false, false, false, true, true, false, false,
B[1], M * 3, 64, 19),
plateDouble("2x Plates", "Double ", " Plate", true, true, false, false, false, false, true, true, false, false,
@@ -391,15 +367,9 @@ public enum OrePrefixes {
/** Mossy Cobble. */
stoneMossy("Mossy Stones", "", "", false, false, true, false, false, true, false, false, false, false, 0, -1, 64,
-1),
- @Deprecated
- stoneBricksMossy("Mossy Stone Bricks", "", "", false, false, false, false, false, true, false, false, false, false,
- 0, -1, 64, -1),
/** Stone Bricks. */
stoneBricks("Stone Bricks", "", "", false, false, true, false, false, true, false, false, false, false, 0, -1, 64,
-1),
- @Deprecated
- stoneBrick("Stone Bricks", "", "", false, false, false, false, false, true, false, false, false, false, 0, -1, 64,
- -1),
/** Cracked Bricks. */
stoneCracked("Cracked Stones", "", "", false, false, true, false, false, true, false, false, false, false, 0, -1,
64, -1),
@@ -655,18 +625,6 @@ public enum OrePrefixes {
cellSteamCracked3);
static {
- pulp.mPrefixInto = dust;
- oreGem.mPrefixInto = ore;
- leaves.mPrefixInto = treeLeaves;
- sapling.mPrefixInto = treeSapling;
- itemDust.mPrefixInto = dust;
- dustDirty.mPrefixInto = dustImpure;
- denseore.mPrefixInto = oreDense;
- ingotQuad.mPrefixInto = ingotQuadruple;
- plateQuad.mPrefixInto = plateQuadruple;
- stoneBrick.mPrefixInto = stoneBricks;
- stoneBricksMossy.mPrefixInto = stoneMossyBricks;
-
ingotHot.mHeatDamage = 3.0F;
cellMolten.mHeatDamage = 3;
cellPlasma.mHeatDamage = 6.0F;
@@ -977,7 +935,7 @@ public enum OrePrefixes {
public final List<TC_AspectStack> mAspects = new ArrayList<>();
public final Collection<OrePrefixes> mFamiliarPrefixes = new HashSet<>();
/**
- * Used to determine the amount of Material this Prefix contains. Multiply or Divide GregTech_API.MATERIAL_UNIT to
+ * Used to determine the amount of Material this Prefix contains. Multiply or Divide GT_Values.M to
* get the Amounts in comparision to one Ingot. 0 = Null Negative = Undefined Amount
*/
public final long mMaterialAmount;
diff --git a/src/main/java/gregtech/api/graphs/paths/PowerNodePath.java b/src/main/java/gregtech/api/graphs/paths/PowerNodePath.java
index 8a869c333e..d09cf059e9 100644
--- a/src/main/java/gregtech/api/graphs/paths/PowerNodePath.java
+++ b/src/main/java/gregtech/api/graphs/paths/PowerNodePath.java
@@ -85,42 +85,6 @@ public class PowerNodePath extends NodePath {
}
}
- // if no amps pass through for more than 0.5 second reduce them to minimize wrong results
- // but still allow the player to see if activity is happening
- @Deprecated
- public long getAmps() {
- int tTime = MinecraftServer.getServer()
- .getTickCounter() - 10;
- if (mTick < tTime) {
- reset(tTime - mTick);
- mTick = tTime;
- }
- return mAmps;
- }
-
- @Deprecated
- public long getVoltage(MetaPipeEntity aCable) {
- int tLoss = 0;
- if (mCountUp) {
- for (MetaPipeEntity mPipe : mPipes) {
- GT_MetaPipeEntity_Cable tCable = (GT_MetaPipeEntity_Cable) mPipe;
- tLoss += tCable.mCableLossPerMeter;
- if (aCable == tCable) {
- return Math.max(mVoltage - tLoss, 0);
- }
- }
- } else {
- for (int i = mPipes.length - 1; i >= 0; i--) {
- GT_MetaPipeEntity_Cable tCable = (GT_MetaPipeEntity_Cable) mPipes[i];
- tLoss += tCable.mCableLossPerMeter;
- if (aCable == tCable) {
- return Math.max(mVoltage - tLoss, 0);
- }
- }
- }
- return -1;
- }
-
public long getAmperage() {
return avgAmperageCounter.getLast();
}
diff --git a/src/main/java/gregtech/api/gui/GT_Container.java b/src/main/java/gregtech/api/gui/GT_Container.java
deleted file mode 100644
index 851e1f6461..0000000000
--- a/src/main/java/gregtech/api/gui/GT_Container.java
+++ /dev/null
@@ -1,740 +0,0 @@
-package gregtech.api.gui;
-
-import java.util.List;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Container;
-import net.minecraft.inventory.ICrafting;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.IFluidContainerItem;
-
-import gregtech.api.interfaces.IFluidAccess;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_Log;
-import gregtech.api.util.GT_Utility;
-
-/**
- * The main Container class. It is used for all GregTech GUIs.
- * <p>
- * Never include this file in your mod - it will break your modpack.
- */
-public class GT_Container extends Container {
-
- public IGregTechTileEntity mTileEntity;
- public InventoryPlayer mPlayerInventory;
-
- public GT_Container(InventoryPlayer aPlayerInventory, IGregTechTileEntity aTileEntityInventory) {
-
- mTileEntity = aTileEntityInventory;
- mPlayerInventory = aPlayerInventory;
- mTileEntity.openInventory();
- }
-
- /**
- * To add the Slots to your GUI
- */
- public void addSlots(InventoryPlayer aPlayerInventory) {
- //
- }
-
- /**
- * Amount of regular Slots in the GUI (so, non-HoloSlots)
- */
- public int getSlotCount() {
- return 0;
- }
-
- /**
- * Amount of ALL Slots in the GUI including HoloSlots and ArmorSlots, but excluding regular Player Slots
- */
- protected final int getAllSlotCount() {
- if (inventorySlots != null) {
- if (doesBindPlayerInventory()) return inventorySlots.size() - 36;
- return inventorySlots.size();
- }
- return getSlotCount();
- }
-
- /**
- * Start-Index of the usable Slots (the first non-HoloSlot)
- */
- public int getSlotStartIndex() {
- return 0;
- }
-
- public int getShiftClickStartIndex() {
- return getSlotStartIndex();
- }
-
- /**
- * Amount of Slots in the GUI the player can Shift-Click into. Uses also getSlotStartIndex
- */
- public int getShiftClickSlotCount() {
- return 0;
- }
-
- /**
- * Is Player-Inventory visible?
- */
- public boolean doesBindPlayerInventory() {
- return true;
- }
-
- /**
- * Override this Function with something like "return mTileEntity.isUseableByPlayer(aPlayer);"
- */
- @Override
- public boolean canInteractWith(EntityPlayer aPlayer) {
- return false;
- }
-
- protected void bindPlayerInventory(InventoryPlayer aInventoryPlayer) {
- for (int i = 0; i < 3; i++) {
- for (int j = 0; j < 9; j++) {
- addSlotToContainer(new Slot(aInventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
- }
- }
-
- for (int i = 0; i < 9; i++) {
- addSlotToContainer(new Slot(aInventoryPlayer, i, 8 + i * 18, 142));
- }
- }
-
- @Override
- public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
- mTileEntity.markDirty();
-
- if (aSlotIndex >= 0) {
- if (inventorySlots.get(aSlotIndex) == null || inventorySlots.get(aSlotIndex) instanceof GT_Slot_Holo)
- return null;
- if (!(inventorySlots.get(aSlotIndex) instanceof GT_Slot_Armor)) if (aSlotIndex < getAllSlotCount())
- if (aSlotIndex < getSlotStartIndex() || aSlotIndex >= getSlotStartIndex() + getSlotCount()) return null;
- }
-
- try {
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
-
- // It looks like the rest of this code should ideally never be
- // called, and might in fact never be called.
-
- ItemStack rStack = null;
- InventoryPlayer aPlayerInventory = aPlayer.inventory;
- Slot aSlot;
- ItemStack tTempStack;
- int tTempStackSize;
- ItemStack aHoldStack;
-
- if ((aShifthold == 0 || aShifthold == 1) && (aMouseclick == 0 || aMouseclick == 1)) {
- if (aSlotIndex == -999) {
- if (aPlayerInventory.getItemStack() != null) {
- if (aMouseclick == 0) {
- aPlayer.dropPlayerItemWithRandomChoice(aPlayerInventory.getItemStack(), true);
- aPlayerInventory.setItemStack(null);
- }
- if (aMouseclick == 1) {
- aPlayer.dropPlayerItemWithRandomChoice(
- aPlayerInventory.getItemStack()
- .splitStack(1),
- true);
- if (aPlayerInventory.getItemStack().stackSize == 0) {
- aPlayerInventory.setItemStack(null);
- }
- }
- }
- } else if (aShifthold == 1) {
- aSlot = this.inventorySlots.get(aSlotIndex);
- if (aSlot != null && aSlot.canTakeStack(aPlayer)) {
- tTempStack = this.transferStackInSlot(aPlayer, aSlotIndex);
- if (tTempStack != null) {
- rStack = GT_Utility.copyOrNull(tTempStack);
- if (aSlot.getStack() != null && aSlot.getStack()
- .getItem() == tTempStack.getItem()) {
- slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
- }
- }
- } else {
- if (aSlotIndex < 0) {
- return null;
- }
- aSlot = this.inventorySlots.get(aSlotIndex);
- if (aSlot != null) {
- tTempStack = aSlot.getStack();
- ItemStack mouseStack = aPlayerInventory.getItemStack();
- if (tTempStack != null) {
- rStack = GT_Utility.copyOrNull(tTempStack);
- }
- if (tTempStack == null) {
- if (mouseStack != null && aSlot.isItemValid(mouseStack)) {
- tTempStackSize = aMouseclick == 0 ? mouseStack.stackSize : 1;
- if (tTempStackSize > aSlot.getSlotStackLimit()) {
- tTempStackSize = aSlot.getSlotStackLimit();
- }
- aSlot.putStack(mouseStack.splitStack(tTempStackSize));
-
- if (mouseStack.stackSize == 0) {
- aPlayerInventory.setItemStack(null);
- }
- }
- } else if (aSlot.canTakeStack(aPlayer)) {
- if (mouseStack == null) {
- tTempStackSize = aMouseclick == 0 ? tTempStack.stackSize : (tTempStack.stackSize + 1) / 2;
- aHoldStack = aSlot.decrStackSize(tTempStackSize);
- aPlayerInventory.setItemStack(aHoldStack);
- if (tTempStack.stackSize == 0) {
- aSlot.putStack(null);
- }
- aSlot.onPickupFromSlot(aPlayer, aPlayerInventory.getItemStack());
- } else if (aSlot.isItemValid(mouseStack)) {
- if (tTempStack.getItem() == mouseStack.getItem()
- && tTempStack.getItemDamage() == mouseStack.getItemDamage()
- && ItemStack.areItemStackTagsEqual(tTempStack, mouseStack)) {
- tTempStackSize = aMouseclick == 0 ? mouseStack.stackSize : 1;
- if (tTempStackSize > aSlot.getSlotStackLimit() - tTempStack.stackSize) {
- tTempStackSize = aSlot.getSlotStackLimit() - tTempStack.stackSize;
- }
- if (tTempStackSize > mouseStack.getMaxStackSize() - tTempStack.stackSize) {
- tTempStackSize = mouseStack.getMaxStackSize() - tTempStack.stackSize;
- }
- mouseStack.splitStack(tTempStackSize);
- if (mouseStack.stackSize == 0) {
- aPlayerInventory.setItemStack(null);
- }
- tTempStack.stackSize += tTempStackSize;
- } else if (mouseStack.stackSize <= aSlot.getSlotStackLimit()) {
- aSlot.putStack(mouseStack);
- aPlayerInventory.setItemStack(tTempStack);
- }
- } else if (tTempStack.getItem() == mouseStack.getItem() && mouseStack.getMaxStackSize() > 1
- && (!tTempStack.getHasSubtypes()
- || tTempStack.getItemDamage() == mouseStack.getItemDamage())
- && ItemStack.areItemStackTagsEqual(tTempStack, mouseStack)) {
- tTempStackSize = tTempStack.stackSize;
-
- if (tTempStackSize > 0
- && tTempStackSize + mouseStack.stackSize <= mouseStack.getMaxStackSize()) {
- mouseStack.stackSize += tTempStackSize;
- tTempStack = aSlot.decrStackSize(tTempStackSize);
-
- if (tTempStack.stackSize == 0) {
- aSlot.putStack(null);
- }
-
- aSlot.onPickupFromSlot(aPlayer, aPlayerInventory.getItemStack());
- }
- }
- }
- aSlot.onSlotChanged();
- }
- }
- // Did the player try to swap a slot with his hotbar using a
- // number key from 1 to 9
- // aMouseclick == 0 means number 1, aMouseclick == 8 means number 9
- } else if (aShifthold == 2 && aMouseclick >= 0 && aMouseclick < 9) {
- aSlot = this.inventorySlots.get(aSlotIndex);
-
- if (aSlot.canTakeStack(aPlayer)) {
- // get the stack at the specified hotbar slot.
- tTempStack = aPlayerInventory.getStackInSlot(aMouseclick);
- boolean canSwap = tTempStack == null
- || aSlot.inventory == aPlayerInventory && aSlot.isItemValid(tTempStack);
- tTempStackSize = -1;
-
- if (!canSwap) {
- tTempStackSize = aPlayerInventory.getFirstEmptyStack();
- canSwap = tTempStackSize > -1;
- }
-
- if (canSwap && aSlot.getHasStack()) {
- aHoldStack = aSlot.getStack();
- aPlayerInventory.setInventorySlotContents(aMouseclick, aHoldStack);
-
- if (tTempStack != null && (aSlot.inventory != aPlayerInventory || !aSlot.isItemValid(tTempStack))) {
- if (tTempStackSize > -1) {
- aPlayerInventory.addItemStackToInventory(tTempStack);
- aSlot.decrStackSize(aHoldStack.stackSize);
- aSlot.putStack(null);
- aSlot.onPickupFromSlot(aPlayer, aHoldStack);
- }
- } else {
- aSlot.decrStackSize(aHoldStack.stackSize);
- aSlot.putStack(tTempStack);
- aSlot.onPickupFromSlot(aPlayer, aHoldStack);
- }
- } else if (tTempStack != null && !aSlot.getHasStack() && aSlot.isItemValid(tTempStack)) {
- aPlayerInventory.setInventorySlotContents(aMouseclick, null);
- aSlot.putStack(tTempStack);
- }
- }
- } else if (aShifthold == 3 && aPlayer.capabilities.isCreativeMode
- && aPlayerInventory.getItemStack() == null
- && aSlotIndex >= 0) {
- aSlot = this.inventorySlots.get(aSlotIndex);
- if (aSlot != null && aSlot.getHasStack()) {
- tTempStack = GT_Utility.copyOrNull(aSlot.getStack());
- tTempStack.stackSize = tTempStack.getMaxStackSize();
- aPlayerInventory.setItemStack(tTempStack);
- }
- }
- return rStack;
- }
-
- @Override
- public ItemStack transferStackInSlot(EntityPlayer aPlayer, int aSlotIndex) {
- ItemStack stack = null;
- Slot slotObject = inventorySlots.get(aSlotIndex);
-
- mTileEntity.markDirty();
-
- // null checks and checks if the item can be stacked (maxStackSize > 1)
- if (getSlotCount() > 0 && slotObject != null
- && slotObject.getHasStack()
- && !(slotObject instanceof GT_Slot_Holo)) {
- ItemStack stackInSlot = slotObject.getStack();
- stack = GT_Utility.copyOrNull(stackInSlot);
-
- // TileEntity -> Player
- if (aSlotIndex < getAllSlotCount()) {
- if (doesBindPlayerInventory())
- if (!mergeItemStack(stackInSlot, getAllSlotCount(), getAllSlotCount() + 36, true)) {
- return null;
- }
- // Player -> TileEntity
- } else if (!mergeItemStack(
- stackInSlot,
- getShiftClickStartIndex(),
- getShiftClickStartIndex() + getShiftClickSlotCount(),
- false)) {
- return null;
- }
-
- if (stackInSlot.stackSize == 0) {
- slotObject.putStack(null);
- } else {
- slotObject.onSlotChanged();
- }
- }
- return stack;
- }
-
- /**
- * merges provided ItemStack with the first avaliable one in the container/player inventory
- */
- @Override
- protected boolean mergeItemStack(ItemStack aStack, int aStartIndex, int aSlotCount, boolean reverseOrder) {
- boolean transferredStack = false;
- int slotIndex = aStartIndex;
-
- mTileEntity.markDirty();
-
- if (reverseOrder) {
- slotIndex = aSlotCount - 1;
- }
-
- Slot slot;
- ItemStack itemStack;
-
- if (aStack.isStackable()) {
- while (aStack.stackSize > 0
- && (!reverseOrder && slotIndex < aSlotCount || reverseOrder && slotIndex >= aStartIndex)) {
- slot = this.inventorySlots.get(slotIndex);
- itemStack = slot.getStack();
- if (!(slot instanceof GT_Slot_Holo) && !(slot instanceof GT_Slot_Output)
- && slot.isItemValid(aStack)
- && itemStack != null
- && itemStack.getItem() == aStack.getItem()
- && (!aStack.getHasSubtypes() || aStack.getItemDamage() == itemStack.getItemDamage())
- && ItemStack.areItemStackTagsEqual(aStack, itemStack)) {
- int combinedStackSize = itemStack.stackSize + aStack.stackSize;
- if (itemStack.stackSize < mTileEntity.getInventoryStackLimit()) {
- if (combinedStackSize <= aStack.getMaxStackSize()) {
- aStack.stackSize = 0;
- itemStack.stackSize = combinedStackSize;
- slot.onSlotChanged();
- transferredStack = true;
- } else if (itemStack.stackSize < aStack.getMaxStackSize()) {
- aStack.stackSize -= aStack.getMaxStackSize() - itemStack.stackSize;
- itemStack.stackSize = aStack.getMaxStackSize();
- slot.onSlotChanged();
- transferredStack = true;
- }
- }
- }
-
- if (reverseOrder) {
- --slotIndex;
- } else {
- ++slotIndex;
- }
- }
- }
- if (aStack.stackSize > 0) {
- if (reverseOrder) {
- slotIndex = aSlotCount - 1;
- } else {
- slotIndex = aStartIndex;
- }
-
- while (!reverseOrder && slotIndex < aSlotCount || reverseOrder && slotIndex >= aStartIndex) {
- slot = this.inventorySlots.get(slotIndex);
- itemStack = slot.getStack();
-
- if (slot.isItemValid(aStack) && itemStack == null) {
- int quantityToTransfer = Math.min(aStack.stackSize, mTileEntity.getInventoryStackLimit());
- slot.putStack(GT_Utility.copyAmount(quantityToTransfer, aStack));
- slot.onSlotChanged();
- aStack.stackSize -= quantityToTransfer;
- transferredStack = true;
- break;
- }
-
- if (reverseOrder) {
- --slotIndex;
- } else {
- ++slotIndex;
- }
- }
- }
-
- return transferredStack;
- }
-
- @Override
- protected Slot addSlotToContainer(Slot slot) {
- try {
- return super.addSlotToContainer(slot);
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- return slot;
- }
-
- @Override
- public void addCraftingToCrafters(ICrafting player) {
- try {
- super.addCraftingToCrafters(player);
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- public List<ItemStack> getInventory() {
- try {
- return super.getInventory();
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- return null;
- }
-
- @Override
- public void removeCraftingFromCrafters(ICrafting player) {
- try {
- super.removeCraftingFromCrafters(player);
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- public void detectAndSendChanges() {
- try {
- super.detectAndSendChanges();
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- public boolean enchantItem(EntityPlayer player, int slotIndex) {
- try {
- return super.enchantItem(player, slotIndex);
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- return false;
- }
-
- @Override
- public Slot getSlotFromInventory(IInventory inventory, int slotIndex) {
- try {
- return super.getSlotFromInventory(inventory, slotIndex);
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- return null;
- }
-
- @Override
- public Slot getSlot(int slotIndex) {
- try {
- if (this.inventorySlots.size() > slotIndex) return super.getSlot(slotIndex);
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- return null;
- }
-
- @Override
- public boolean func_94530_a(ItemStack itemStack, Slot slot) {
- try {
- return super.func_94530_a(itemStack, slot);
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- return true;
- }
-
- @Override
- protected void retrySlotClick(int slotIndex, int mouseButton, boolean aShifthold, EntityPlayer player) {
- try {
- super.retrySlotClick(slotIndex, mouseButton, aShifthold, player);
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- public void onContainerClosed(EntityPlayer player) {
- try {
- super.onContainerClosed(player);
- mTileEntity.closeInventory();
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- public void onCraftMatrixChanged(IInventory inventory) {
- try {
- super.onCraftMatrixChanged(inventory);
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- public void putStackInSlot(int slotIndex, ItemStack itemStack) {
- try {
- super.putStackInSlot(slotIndex, itemStack);
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- public void putStacksInSlots(ItemStack[] itemStacks) {
- try {
- super.putStacksInSlots(itemStacks);
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- public void updateProgressBar(int id, int value) {
- try {
- super.updateProgressBar(id, value);
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- public short getNextTransactionID(InventoryPlayer inventoryPlayer) {
- try {
- return super.getNextTransactionID(inventoryPlayer);
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- return 0;
- }
-
- @Override
- public boolean isPlayerNotUsingContainer(EntityPlayer player) {
- try {
- return super.isPlayerNotUsingContainer(player);
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- return true;
- }
-
- @Override
- public void setPlayerIsPresent(EntityPlayer player, boolean value) {
- try {
- super.setPlayerIsPresent(player, value);
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- protected void func_94533_d() {
- try {
- super.func_94533_d();
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- }
-
- @Override
- public boolean canDragIntoSlot(Slot slot) {
- try {
- return super.canDragIntoSlot(slot);
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
- return true;
- }
-
- protected static ItemStack handleFluidSlotClick(IFluidAccess aFluidAccess, EntityPlayer aPlayer,
- boolean aProcessFullStack, boolean aCanDrain, boolean aCanFill) {
- ItemStack tStackHeld = aPlayer.inventory.getItemStack();
- ItemStack tStackSizedOne = GT_Utility.copyAmount(1, tStackHeld);
- if (tStackSizedOne == null || tStackHeld.stackSize == 0) return null;
- FluidStack tInputFluid = aFluidAccess.get();
- FluidStack tFluidHeld = GT_Utility.getFluidForFilledItem(tStackSizedOne, true);
- if (tFluidHeld != null && tFluidHeld.amount <= 0) tFluidHeld = null;
- if (tInputFluid == null) {
- // tank empty, consider fill only from now on
- if (!aCanFill)
- // cannot fill and nothing to take, bail out
- return null;
- if (tFluidHeld == null)
- // no fluid to fill
- return null;
- return fillFluid(aFluidAccess, aPlayer, tFluidHeld, aProcessFullStack);
- }
- // tank not empty, both action possible
- if (tFluidHeld != null && tInputFluid.amount < aFluidAccess.getCapacity()) {
- // both nonnull and have space left for filling.
- if (aCanFill)
- // actually both pickup and fill is reasonable, but I'll go with fill here
- return fillFluid(aFluidAccess, aPlayer, tFluidHeld, aProcessFullStack);
- if (!aCanDrain)
- // cannot take AND cannot fill, why make this call then?
- return null;
- // the slot does not allow filling, so try take some
- return drainFluid(aFluidAccess, aPlayer, aProcessFullStack);
- } else {
- // cannot fill and there is something to take
- if (!aCanDrain)
- // but the slot does not allow taking, so bail out
- return null;
- return drainFluid(aFluidAccess, aPlayer, aProcessFullStack);
- }
- }
-
- protected static ItemStack drainFluid(IFluidAccess aFluidAccess, EntityPlayer aPlayer, boolean aProcessFullStack) {
- FluidStack tTankStack = aFluidAccess.get();
- if (tTankStack == null) return null;
- ItemStack tStackHeld = aPlayer.inventory.getItemStack();
- ItemStack tStackSizedOne = GT_Utility.copyAmount(1, tStackHeld);
- if (tStackSizedOne == null || tStackHeld.stackSize == 0) return null;
- int tOriginalFluidAmount = tTankStack.amount;
- ItemStack tFilledContainer = GT_Utility.fillFluidContainer(tTankStack, tStackSizedOne, true, false);
- if (tFilledContainer == null && tStackSizedOne.getItem() instanceof IFluidContainerItem tContainerItem) {
- int tFilledAmount = tContainerItem.fill(tStackSizedOne, tTankStack, true);
- if (tFilledAmount > 0) {
- tFilledContainer = tStackSizedOne;
- tTankStack.amount -= tFilledAmount;
- }
- }
- if (tFilledContainer != null) {
- if (aProcessFullStack) {
- int tFilledAmount = tOriginalFluidAmount - tTankStack.amount;
- /*
- * work out how many more items we can fill one cell is already used, so account for that the round down
- * behavior will left over a fraction of a cell worth of fluid the user then get to decide what to do
- * with it it will not be too fancy if it spills out partially filled cells
- */
- int tAdditionalParallel = Math.min(tStackHeld.stackSize - 1, tTankStack.amount / tFilledAmount);
- tTankStack.amount -= tFilledAmount * tAdditionalParallel;
- tFilledContainer.stackSize += tAdditionalParallel;
- }
- replaceCursorItemStack(aPlayer, tFilledContainer);
- }
- aFluidAccess.verifyFluidStack();
- return tFilledContainer;
- }
-
- protected static ItemStack fillFluid(IFluidAccess aFluidAccess, EntityPlayer aPlayer, FluidStack aFluidHeld,
- boolean aProcessFullStack) {
- // we are not using aMachine.fill() here any more, so we need to check for fluid type here ourselves
- if (aFluidAccess.get() != null && !aFluidAccess.get()
- .isFluidEqual(aFluidHeld)) return null;
- ItemStack tStackHeld = aPlayer.inventory.getItemStack();
- ItemStack tStackSizedOne = GT_Utility.copyAmount(1, tStackHeld);
- if (tStackSizedOne == null) return null;
-
- int tFreeSpace = aFluidAccess.getCapacity() - (aFluidAccess.get() != null ? aFluidAccess.get().amount : 0);
- if (tFreeSpace <= 0)
- // no space left
- return null;
-
- // find out how much fluid can be taken
- // some cells cannot be partially filled
- ItemStack tStackEmptied = null;
- int tAmountTaken = 0;
- if (tFreeSpace >= aFluidHeld.amount) {
- // fully accepted - try take it from item now
- // IFluidContainerItem is intentionally not checked here. it will be checked later
- tStackEmptied = GT_Utility.getContainerForFilledItem(tStackSizedOne, false);
- tAmountTaken = aFluidHeld.amount;
- }
- if (tStackEmptied == null && tStackSizedOne.getItem() instanceof IFluidContainerItem container) {
- // either partially accepted, or is IFluidContainerItem
- FluidStack tDrained = container.drain(tStackSizedOne, tFreeSpace, true);
- if (tDrained != null && tDrained.amount > 0) {
- // something is actually drained - change the cell and drop it to player
- tStackEmptied = tStackSizedOne;
- tAmountTaken = tDrained.amount;
- }
- }
- if (tStackEmptied == null)
- // somehow the cell refuse to give out that amount of fluid, no op then
- return null;
-
- // find out how many fill can we do
- // same round down behavior as above
- // however here the fluid stack is not changed at all, so the exact code will slightly differ
- int tParallel = aProcessFullStack ? Math.min(tFreeSpace / tAmountTaken, tStackHeld.stackSize) : 1;
- if (aFluidAccess.get() == null) {
- FluidStack tNewFillableStack = aFluidHeld.copy();
- tNewFillableStack.amount = tAmountTaken * tParallel;
- aFluidAccess.set(tNewFillableStack);
- } else {
- aFluidAccess.addAmount(tAmountTaken * tParallel);
- }
- tStackEmptied.stackSize = tParallel;
- replaceCursorItemStack(aPlayer, tStackEmptied);
- return tStackEmptied;
- }
-
- private static void replaceCursorItemStack(EntityPlayer aPlayer, ItemStack tStackResult) {
- int tStackResultMaxStackSize = tStackResult.getMaxStackSize();
- while (tStackResult.stackSize > tStackResultMaxStackSize) {
- aPlayer.inventory.getItemStack().stackSize -= tStackResultMaxStackSize;
- GT_Utility.addItemToPlayerInventory(aPlayer, tStackResult.splitStack(tStackResultMaxStackSize));
- }
- if (aPlayer.inventory.getItemStack().stackSize == tStackResult.stackSize) {
- // every cell is mutated. it could just stay on the cursor.
- aPlayer.inventory.setItemStack(tStackResult);
- } else {
- // some cells not mutated. The mutated cells must go into the inventory
- // or drop into the world if there isn't enough space.
- ItemStack tStackHeld = aPlayer.inventory.getItemStack();
- tStackHeld.stackSize -= tStackResult.stackSize;
- GT_Utility.addItemToPlayerInventory(aPlayer, tStackResult);
- }
- }
-}
diff --git a/src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java b/src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java
deleted file mode 100644
index a77f376e00..0000000000
--- a/src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java
+++ /dev/null
@@ -1,244 +0,0 @@
-package gregtech.api.gui;
-
-import java.util.List;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.ICrafting;
-import net.minecraft.item.ItemStack;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.interfaces.IConfigurationCircuitSupport;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_Utility;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- * <p/>
- * The Container I use for all my MetaTileEntities
- */
-public class GT_ContainerMetaTile_Machine extends GT_Container {
-
- public int mActive = 0, mMaxProgressTime = 0, mProgressTime = 0, mEnergy = 0, mSteam = 0, mSteamStorage = 0,
- mStorage = 0, mOutput = 0, mInput = 0, mID = 0, mDisplayErrorCode = 0;
- public long mEnergyLong = 0, mStorageLong = 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;
- private long oEnergyLong = 0, oStorageLong = 0;
- protected int mTimer = 0;
- protected Runnable circuitSlotClickCallback;
-
- public GT_ContainerMetaTile_Machine(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 GT_ContainerMetaTile_Machine(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;
- }
- }
-
- protected void addCircuitSlot() {
- if (mTileEntity.getMetaTileEntity() instanceof IConfigurationCircuitSupport ccs) {
- GT_Slot_Render slotCircuit = new GT_Slot_Render(
- mTileEntity,
- ccs.getCircuitSlot(),
- ccs.getCircuitSlotX(),
- ccs.getCircuitSlotY());
- addSlotToContainer(slotCircuit);
- slotCircuit.setEnabled(ccs.allowSelectCircuit());
- }
- }
-
- @Override
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addCircuitSlot();
- }
-
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) return;
- mStorage = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getEUCapacity());
- mStorageLong = mTileEntity.getEUCapacity();
- mEnergy = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getStoredEU());
- mEnergyLong = 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++;
-
- for (ICrafting player : this.crafters) {
- if (mTimer % 500 == 10 || oEnergy != mEnergy) {
- player.sendProgressBarUpdate(this, 0, mEnergy & 65535);
- player.sendProgressBarUpdate(this, 1, mEnergy >>> 16);
- }
- if (mTimer % 500 == 10 || oStorage != mStorage) {
- player.sendProgressBarUpdate(this, 2, mStorage & 65535);
- player.sendProgressBarUpdate(this, 3, mStorage >>> 16);
- }
- if (mTimer % 500 == 10 || oOutput != mOutput) {
- player.sendProgressBarUpdate(this, 4, mOutput);
- }
- if (mTimer % 500 == 10 || oInput != mInput) {
- player.sendProgressBarUpdate(this, 5, mInput);
- }
- if (mTimer % 500 == 10 || oDisplayErrorCode != mDisplayErrorCode) {
- player.sendProgressBarUpdate(this, 6, mDisplayErrorCode);
- }
- if (mTimer % 500 == 10 || oProgressTime != mProgressTime) {
- player.sendProgressBarUpdate(this, 11, mProgressTime & 65535);
- player.sendProgressBarUpdate(this, 12, mProgressTime >>> 16);
- }
- if (mTimer % 500 == 10 || oMaxProgressTime != mMaxProgressTime) {
- player.sendProgressBarUpdate(this, 13, mMaxProgressTime & 65535);
- player.sendProgressBarUpdate(this, 14, mMaxProgressTime >>> 16);
- }
- if (mTimer % 500 == 10 || oID != mID) {
- player.sendProgressBarUpdate(this, 15, mID);
- }
- if (mTimer % 500 == 10 || oActive != mActive) {
- player.sendProgressBarUpdate(this, 16, mActive);
- }
- if (mTimer % 500 == 10 || oSteam != mSteam) {
- player.sendProgressBarUpdate(this, 17, mSteam & 65535);
- player.sendProgressBarUpdate(this, 18, mSteam >>> 16);
- }
- if (mTimer % 500 == 10 || oSteamStorage != mSteamStorage) {
- player.sendProgressBarUpdate(this, 19, mSteamStorage & 65535);
- player.sendProgressBarUpdate(this, 20, mSteamStorage >>> 16);
- }
- if (mTimer % 500 == 10 || oEnergyLong != mEnergyLong) {
- player.sendProgressBarUpdate(this, 21, (int) mEnergyLong);
- player.sendProgressBarUpdate(this, 22, (int) (mEnergyLong >>> 32));
- }
- if (mTimer % 500 == 10 || oStorageLong != mStorageLong) {
- player.sendProgressBarUpdate(this, 23, (int) mStorageLong);
- player.sendProgressBarUpdate(this, 24, (int) (mStorageLong >>> 32));
- }
- }
-
- oID = mID;
- oSteam = mSteam;
- oInput = mInput;
- oActive = mActive;
- oOutput = mOutput;
- oEnergy = mEnergy;
- oEnergyLong = mEnergyLong;
- oStorage = mStorage;
- oStorageLong = mStorageLong;
- oSteamStorage = mSteamStorage;
- oProgressTime = mProgressTime;
- oMaxProgressTime = mMaxProgressTime;
- oDisplayErrorCode = mDisplayErrorCode;
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public void updateProgressBar(int id, int value) {
- super.updateProgressBar(id, value);
- switch (id) {
- case 0 -> mEnergy = mEnergy & 0xffff0000 | value & 0x0000ffff;
- case 1 -> mEnergy = mEnergy & 0x0000ffff | value << 16;
- case 2 -> mStorage = mStorage & 0xffff0000 | value & 0x0000ffff;
- case 3 -> mStorage = mStorage & 0x0000ffff | value << 16;
- case 4 -> mOutput = value;
- case 5 -> mInput = value;
- case 6 -> mDisplayErrorCode = value;
- case 11 -> mProgressTime = mProgressTime & 0xffff0000 | value;
- case 12 -> mProgressTime = mProgressTime & 0x0000ffff | value << 16;
- case 13 -> mMaxProgressTime = mMaxProgressTime & 0xffff0000 | value & 0x0000ffff;
- case 14 -> mMaxProgressTime = mMaxProgressTime & 0x0000ffff | value << 16;
- case 15 -> mID = value;
- case 16 -> mActive = value;
- case 17 -> mSteam = mSteam & 0xffff0000 | value & 0x0000ffff;
- case 18 -> mSteam = mSteam & 0x0000ffff | value << 16;
- case 19 -> mSteamStorage = mSteamStorage & 0xffff0000 | value & 0x0000ffff;
- case 20 -> mSteamStorage = mSteamStorage & 0x0000ffff | value << 16;
- case 21 -> mEnergyLong = mEnergyLong & 0xffffffff00000000L | value & 0x00000000ffffffffL;
- case 22 -> mEnergyLong = mEnergyLong & 0x00000000ffffffffL | (long) value << 32;
- case 23 -> mStorageLong = mStorageLong & 0xffffffff00000000L | value & 0x00000000ffffffffL;
- case 24 -> mStorageLong = mStorageLong & 0x00000000ffffffffL | (long) value << 32;
- }
- }
-
- @Override
- public boolean canInteractWith(EntityPlayer player) {
- return mTileEntity.isUseableByPlayer(player);
- }
-
- @Deprecated
- public String trans(String aKey, String aEnglish) {
- return GT_Utility.trans(aKey, aEnglish);
- }
-
- public void setCircuitSlotClickCallback(Runnable circuitSlotClickCallback) {
- this.circuitSlotClickCallback = circuitSlotClickCallback;
- }
-
- @Override
- public ItemStack slotClick(int aSlotNumber, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
- if (mTileEntity.getMetaTileEntity() instanceof IConfigurationCircuitSupport) {
- IMetaTileEntity machine = mTileEntity.getMetaTileEntity();
- IConfigurationCircuitSupport ccs = (IConfigurationCircuitSupport) machine;
- if (ccs.allowSelectCircuit() && aSlotNumber == ccs.getCircuitGUISlot() && aMouseclick < 2) {
- ItemStack newCircuit;
- if (aShifthold == 1) {
- if (aMouseclick == 0) {
- if (circuitSlotClickCallback != null) circuitSlotClickCallback.run();
- return null;
- } else {
- // clear
- newCircuit = null;
- }
- } else {
- ItemStack cursorStack = aPlayer.inventory.getItemStack();
- List<ItemStack> tCircuits = ccs.getConfigurationCircuits();
- int index = GT_Utility.findMatchingStackInList(tCircuits, cursorStack);
- if (index < 0) {
- int curIndex = GT_Utility
- .findMatchingStackInList(tCircuits, machine.getStackInSlot(ccs.getCircuitSlot())) + 1;
- if (aMouseclick == 0) {
- curIndex += 1;
- } else {
- curIndex -= 1;
- }
- curIndex = Math.floorMod(curIndex, tCircuits.size() + 1) - 1;
- newCircuit = curIndex < 0 ? null : tCircuits.get(curIndex);
- } else {
- // set to whatever it is
- newCircuit = tCircuits.get(index);
- }
- }
- mTileEntity.setInventorySlotContents(ccs.getCircuitSlot(), newCircuit);
- return newCircuit;
- }
- }
- return super.slotClick(aSlotNumber, aMouseclick, aShifthold, aPlayer);
- }
-}
diff --git a/src/main/java/gregtech/api/gui/GT_Container_1by1.java b/src/main/java/gregtech/api/gui/GT_Container_1by1.java
deleted file mode 100644
index 06efaee5ef..0000000000
--- a/src/main/java/gregtech/api/gui/GT_Container_1by1.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package gregtech.api.gui;
-
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-
-@Deprecated
-public class GT_Container_1by1 extends GT_ContainerMetaTile_Machine {
-
- public GT_Container_1by1(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- @Override
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new Slot(mTileEntity, 0, 80, 35));
- super.addSlots(aInventoryPlayer);
- }
-
- @Override
- public int getSlotCount() {
- return 1;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 1;
- }
-}
diff --git a/src/main/java/gregtech/api/gui/GT_Container_2by2.java b/src/main/java/gregtech/api/gui/GT_Container_2by2.java
deleted file mode 100644
index 4e3584a0a6..0000000000
--- a/src/main/java/gregtech/api/gui/GT_Container_2by2.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package gregtech.api.gui;
-
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-
-@Deprecated
-public class GT_Container_2by2 extends GT_ContainerMetaTile_Machine {
-
- public GT_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));
- super.addSlots(aInventoryPlayer);
- }
-
- @Override
- public int getSlotCount() {
- return 4;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 4;
- }
-}
diff --git a/src/main/java/gregtech/api/gui/GT_Container_3by3.java b/src/main/java/gregtech/api/gui/GT_Container_3by3.java
deleted file mode 100644
index 4c0f7f946b..0000000000
--- a/src/main/java/gregtech/api/gui/GT_Container_3by3.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package gregtech.api.gui;
-
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-
-@Deprecated
-public class GT_Container_3by3 extends GT_ContainerMetaTile_Machine {
-
- public GT_Container_3by3(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- @Override
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new Slot(mTileEntity, 0, 62, 17));
- addSlotToContainer(new Slot(mTileEntity, 1, 80, 17));
- addSlotToContainer(new Slot(mTileEntity, 2, 98, 17));
- addSlotToContainer(new Slot(mTileEntity, 3, 62, 35));
- addSlotToContainer(new Slot(mTileEntity, 4, 80, 35));
- addSlotToContainer(new Slot(mTileEntity, 5, 98, 35));
- addSlotToContainer(new Slot(mTileEntity, 6, 62, 53));
- addSlotToContainer(new Slot(mTileEntity, 7, 80, 53));
- addSlotToContainer(new Slot(mTileEntity, 8, 98, 53));
- super.addSlots(aInventoryPlayer);
- }
-
- @Override
- public int getSlotCount() {
- return 9;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 9;
- }
-}
diff --git a/src/main/java/gregtech/api/gui/GT_Container_4by4.java b/src/main/java/gregtech/api/gui/GT_Container_4by4.java
deleted file mode 100644
index db5cde4cfe..0000000000
--- a/src/main/java/gregtech/api/gui/GT_Container_4by4.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package gregtech.api.gui;
-
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-
-@Deprecated
-public class GT_Container_4by4 extends GT_ContainerMetaTile_Machine {
-
- public GT_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));
- super.addSlots(aInventoryPlayer);
- }
-
- @Override
- public int getSlotCount() {
- return 16;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 16;
- }
-}
diff --git a/src/main/java/gregtech/api/gui/GT_Container_BasicTank.java b/src/main/java/gregtech/api/gui/GT_Container_BasicTank.java
deleted file mode 100644
index 403de4bab5..0000000000
--- a/src/main/java/gregtech/api/gui/GT_Container_BasicTank.java
+++ /dev/null
@@ -1,138 +0,0 @@
-package gregtech.api.gui;
-
-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.fluids.FluidStack;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.interfaces.IFluidAccess;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank;
-import gregtech.api.util.GT_Utility;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- * <p/>
- * The Container I use for all my Basic Tanks
- */
-public class GT_Container_BasicTank extends GT_ContainerMetaTile_Machine {
-
- public int mContent = 0;
- protected int oContent = 0;
-
- public GT_Container_BasicTank(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- /**
- * Subclasses must ensure third slot (aSlotIndex==2) is drainable fluid display item slot. Otherwise, subclasses
- * must intercept the appropriate the slotClick event and call super.slotClick(2, xxx) if necessary
- */
- @Override
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new Slot(mTileEntity, 0, 80, 17));
- addSlotToContainer(new GT_Slot_Output(mTileEntity, 1, 80, 53));
- addSlotToContainer(new GT_Slot_Render(mTileEntity, 2, 59, 42));
- }
-
- @Override
- public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
- if (aSlotIndex == 2 && aMouseclick < 2) {
- GT_MetaTileEntity_BasicTank tTank = (GT_MetaTileEntity_BasicTank) mTileEntity.getMetaTileEntity();
- if (mTileEntity.isClientSide()) {
- /*
- * While a logical client don't really need to process fluid cells upon click (it could have just wait
- * for server side to send the result), doing so would result in every fluid interaction having a
- * noticeable delay between clicking and changes happening even on single player. I'd imagine this lag
- * to become only more severe when playing MP over ethernet, which would have much more latency than a
- * memory connection
- */
- Slot slot = inventorySlots.get(aSlotIndex);
- tTank.setDrainableStack(GT_Utility.getFluidFromDisplayStack(slot.getStack()));
- }
- IFluidAccess tDrainableAccess = constructFluidAccess(tTank, false);
- return handleFluidSlotClick(
- tDrainableAccess,
- aPlayer,
- aMouseclick == 0,
- true,
- !tTank.isDrainableStackSeparate());
- }
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
-
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) return;
- if (((GT_MetaTileEntity_BasicTank) mTileEntity.getMetaTileEntity()).mFluid != null)
- mContent = ((GT_MetaTileEntity_BasicTank) mTileEntity.getMetaTileEntity()).mFluid.amount;
- else mContent = 0;
- sendProgressBar();
- oContent = mContent;
- }
-
- public void sendProgressBar() {
- for (ICrafting player : this.crafters) {
- if (mTimer % 500 == 0 || oContent != mContent) {
- player.sendProgressBarUpdate(this, 100, mContent & 65535);
- player.sendProgressBarUpdate(this, 101, mContent >>> 16);
- }
- }
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void updateProgressBar(int id, int value) {
- super.updateProgressBar(id, value);
- switch (id) {
- case 100 -> mContent = mContent & 0xffff0000 | value & 0x0000ffff;
- case 101 -> mContent = mContent & 0xffff | value << 16;
- }
- }
-
- @Override
- public int getSlotCount() {
- return 2;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 1;
- }
-
- protected IFluidAccess constructFluidAccess(GT_MetaTileEntity_BasicTank aTank, boolean aIsFillableStack) {
- return new BasicTankFluidAccess(aTank, aIsFillableStack);
- }
-
- static class BasicTankFluidAccess implements IFluidAccess {
-
- protected final GT_MetaTileEntity_BasicTank mTank;
- protected final boolean mIsFillableStack;
-
- public BasicTankFluidAccess(GT_MetaTileEntity_BasicTank aTank, boolean aIsFillableStack) {
- this.mTank = aTank;
- this.mIsFillableStack = aIsFillableStack;
- }
-
- @Override
- public void set(FluidStack stack) {
- if (mIsFillableStack) mTank.setFillableStack(stack);
- else mTank.setDrainableStack(stack);
- }
-
- @Override
- public FluidStack get() {
- return mIsFillableStack ? mTank.getFillableStack() : mTank.getDrainableStack();
- }
-
- @Override
- public int getCapacity() {
- return mTank.getCapacity();
- }
- }
-}
diff --git a/src/main/java/gregtech/api/gui/GT_Container_MultiMachine.java b/src/main/java/gregtech/api/gui/GT_Container_MultiMachine.java
deleted file mode 100644
index 142b84e008..0000000000
--- a/src/main/java/gregtech/api/gui/GT_Container_MultiMachine.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package gregtech.api.gui;
-
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- * <p/>
- * The Container I use for all my Basic Machines
- */
-@Deprecated
-public class GT_Container_MultiMachine extends GT_ContainerMetaTile_Machine {
-
- public GT_Container_MultiMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public GT_Container_MultiMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity,
- boolean bindInventory) {
- super(aInventoryPlayer, aTileEntity, bindInventory);
- }
-
- @Override
- public void addSlots(InventoryPlayer aInventoryPlayer) {
- addSlotToContainer(new Slot(mTileEntity, 1, 152, 5));
- }
-
- @Override
- public int getSlotCount() {
- return 1;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 1;
- }
-}
diff --git a/src/main/java/gregtech/api/gui/GT_GUIColorOverride.java b/src/main/java/gregtech/api/gui/GT_GUIColorOverride.java
index 304e792a2a..6ade7b030d 100644
--- a/src/main/java/gregtech/api/gui/GT_GUIColorOverride.java
+++ b/src/main/java/gregtech/api/gui/GT_GUIColorOverride.java
@@ -18,6 +18,7 @@ import cpw.mods.fml.relauncher.Side;
import gregtech.api.GregTech_API;
import gregtech.api.util.ColorsMetadataSection;
+@SuppressWarnings("UnstableApiUsage")
public class GT_GUIColorOverride {
private static final Object NOT_FOUND = new Object();
diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer.java b/src/main/java/gregtech/api/gui/GT_GUIContainer.java
deleted file mode 100644
index 639bd56162..0000000000
--- a/src/main/java/gregtech/api/gui/GT_GUIContainer.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package gregtech.api.gui;
-
-import static gregtech.GT_Mod.GT_FML_LOGGER;
-
-import net.minecraft.client.gui.inventory.GuiContainer;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.inventory.Container;
-import net.minecraft.inventory.Slot;
-import net.minecraft.util.ResourceLocation;
-
-import org.lwjgl.input.Mouse;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- * <p/>
- * Main GUI-Container-Class which basically contains the Code needed to prevent crashes from improperly Coded Items.
- */
-public class GT_GUIContainer extends GuiContainer {
-
- public boolean mCrashed = false;
-
- public ResourceLocation mGUIbackground;
-
- public GT_GUIColorOverride colorOverride;
-
- public String mGUIbackgroundPath;
-
- public GT_GUIContainer(Container aContainer, String aGUIbackground) {
- super(aContainer);
- mGUIbackground = new ResourceLocation(mGUIbackgroundPath = aGUIbackground);
- colorOverride = GT_GUIColorOverride.get(aGUIbackground);
- }
-
- protected int getTextColorOrDefault(String textType, int defaultColor) {
- return colorOverride.getTextColorOrDefault(textType, defaultColor);
- }
-
- public int getLeft() {
- return guiLeft;
- }
-
- public int getTop() {
- return guiTop;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
- //
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float parTicks, int mouseX, int mouseY) {
- mc.renderEngine.bindTexture(mGUIbackground);
- }
-
- @Override
- public void drawScreen(int mouseX, int mouseY, float parTicks) {
- try {
- super.drawScreen(mouseX, mouseY, parTicks);
- } catch (Throwable e) {
- try {
- Tessellator.instance.draw();
- } catch (Throwable f) {
- //
- }
- }
- }
-
- @Override
- public void handleMouseInput() {
- int delta = Mouse.getEventDWheel();
- if (delta != 0) {
- int i = Mouse.getEventX() * this.width / this.mc.displayWidth;
- int j = this.height - Mouse.getEventY() * this.height / this.mc.displayHeight - 1;
- onMouseWheel(i, j, delta);
- }
- super.handleMouseInput();
- }
-
- protected void onMouseWheel(int mx, int my, int delta) {}
-
- public boolean isMouseOverSlot(int slotIndex, int mx, int my) {
- int size = inventorySlots.inventorySlots.size();
- if (slotIndex < 0 || slotIndex >= size) {
- // slot does not exist somehow. log and carry on
- GT_FML_LOGGER.error("Slot {} required where only {} is present", slotIndex, size);
- return false;
- }
- Slot slot = inventorySlots.getSlot(slotIndex);
- return this.func_146978_c(slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, mx, my);
- }
-
- /*
- * @Override protected void drawSlotInventory(Slot slot) { try { super.drawSlotInventory(slot); } catch(Throwable e)
- * { try { Tessellator.instance.draw(); } catch(Throwable f) {} if (!mCrashed) { GT_Log.out.
- * println("Clientside Slot drawing Crash prevented. Seems one Itemstack causes Problems with negative Damage Values or the Wildcard Damage Value. This is absolutely NOT a Bug of the GregTech-Addon, so don't even think about reporting it to me, it's a Bug of the Mod, which belongs to the almost-crash-causing Item, so bug that Mods Author and not me! Did you hear it? NOT ME!!!"
- * ); e.printStackTrace(); mCrashed = true; } } }
- */
-}
diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java b/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java
deleted file mode 100644
index df395858a9..0000000000
--- a/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java
+++ /dev/null
@@ -1,271 +0,0 @@
-package gregtech.api.gui;
-
-import java.util.List;
-
-import net.minecraft.client.gui.FontRenderer;
-import net.minecraft.client.renderer.entity.RenderItem;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.StatCollector;
-
-import org.lwjgl.opengl.GL11;
-
-import gregtech.GT_Mod;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Dyes;
-import gregtech.api.enums.GT_Values;
-import gregtech.api.gui.widgets.GT_GuiCoverTabLine;
-import gregtech.api.gui.widgets.GT_GuiIcon;
-import gregtech.api.gui.widgets.GT_GuiSlotTooltip;
-import gregtech.api.gui.widgets.GT_GuiTabLine.DisplayStyle;
-import gregtech.api.gui.widgets.GT_GuiTabLine.GT_GuiTabIconSet;
-import gregtech.api.gui.widgets.GT_GuiTabLine.GT_ITabRenderer;
-import gregtech.api.gui.widgets.GT_GuiTooltip;
-import gregtech.api.gui.widgets.GT_GuiTooltipManager;
-import gregtech.api.gui.widgets.GT_GuiTooltipManager.GT_IToolTipRenderer;
-import gregtech.api.interfaces.IConfigurationCircuitSupport;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.net.GT_Packet_SetConfigurationCircuit;
-import gregtech.api.util.GT_TooltipDataCache;
-import gregtech.api.util.GT_Util;
-import gregtech.api.util.GT_Utility;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- * <p/>
- * The GUI-Container I use for all my MetaTileEntities
- */
-public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer implements GT_IToolTipRenderer, GT_ITabRenderer {
-
- public final GT_ContainerMetaTile_Machine mContainer;
-
- protected final GT_GuiTooltipManager mTooltipManager = new GT_GuiTooltipManager();
- protected final GT_TooltipDataCache mTooltipCache = new GT_TooltipDataCache();
- private static final String GHOST_CIRCUIT_TOOLTIP = "GT5U.machines.select_circuit.tooltip";
-
- private final int guiTint;
-
- // Cover Tabs support. Subclasses can override display position, style and visuals by overriding setupCoverTabs
- public GT_GuiCoverTabLine coverTabs;
- private static final int COVER_TAB_LEFT = -16, COVER_TAB_TOP = 1, COVER_TAB_HEIGHT = 20, COVER_TAB_WIDTH = 18,
- COVER_TAB_SPACING = 2;
- private static final DisplayStyle COVER_TAB_X_DIR = DisplayStyle.NONE, COVER_TAB_Y_DIR = DisplayStyle.NORMAL;
- private static final GT_GuiTabIconSet TAB_ICONSET = new GT_GuiTabIconSet(
- GT_GuiIcon.TAB_NORMAL,
- GT_GuiIcon.TAB_HIGHLIGHT,
- GT_GuiIcon.TAB_DISABLED);
-
- public GT_GUIContainerMetaTile_Machine(GT_ContainerMetaTile_Machine aContainer, String aGUIbackground) {
- super(aContainer, aGUIbackground);
- mContainer = aContainer;
-
- DisplayStyle preferredDisplayStyle = GT_Mod.gregtechproxy.mCoverTabsVisible
- ? (GT_Mod.gregtechproxy.mCoverTabsFlipped ? DisplayStyle.INVERSE : DisplayStyle.NORMAL)
- : DisplayStyle.NONE;
- setupCoverTabs(preferredDisplayStyle);
-
- // Only setup tooltips if they're currently enabled.
- if (GT_Mod.gregtechproxy.mTooltipVerbosity > 0 || GT_Mod.gregtechproxy.mTooltipShiftVerbosity > 0) {
- setupTooltips();
- }
-
- guiTint = getColorization();
- mContainer.setCircuitSlotClickCallback(this::openSelectCircuitDialog);
- }
-
- public GT_GUIContainerMetaTile_Machine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity,
- String aGUIbackground) {
- this(new GT_ContainerMetaTile_Machine(aInventoryPlayer, aTileEntity), aGUIbackground);
- }
-
- /**
- * Initialize the coverTabs object according to client preferences
- */
- protected void setupCoverTabs(DisplayStyle preferredDisplayStyle) {
- coverTabs = new GT_GuiCoverTabLine(
- this,
- COVER_TAB_LEFT,
- COVER_TAB_TOP,
- COVER_TAB_HEIGHT,
- COVER_TAB_WIDTH,
- COVER_TAB_SPACING,
- COVER_TAB_X_DIR,
- COVER_TAB_Y_DIR,
- preferredDisplayStyle,
- getTabBackground(),
- getMachine().getBaseMetaTileEntity(),
- getColorization());
- }
-
- @Override
- public void drawScreen(int mouseX, int mouseY, float parTicks) {
- super.drawScreen(mouseX, mouseY, parTicks);
- if (mc.thePlayer.inventory.getItemStack() == null) {
- GL11.glPushMatrix();
- GL11.glTranslatef(guiLeft, guiTop, 0.0F);
- mTooltipManager.onTick(this, mouseX, mouseY);
- GL11.glPopMatrix();
- }
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float parTicks, int mouseX, int mouseY) {
- // Drawing tabs
- coverTabs.drawTabs(parTicks, mouseX, mouseY);
-
- // Applying machine coloration, which subclasses rely on
- GL11.glColor3ub((byte) ((guiTint >> 16) & 0xFF), (byte) ((guiTint >> 8) & 0xFF), (byte) (guiTint & 0xFF));
-
- // Binding machine's own texture, which subclasses rely on being set
- super.drawGuiContainerBackgroundLayer(parTicks, mouseX, mouseY);
- }
-
- /**
- * @return The color used to render this machine's GUI
- */
- private int getColorization() {
- Dyes dye = Dyes.dyeWhite;
- if (this.colorOverride.sLoaded()) {
- if (this.colorOverride.sGuiTintingEnabled()) {
- dye = getDyeFromIndex(mContainer.mTileEntity.getColorization());
- return this.colorOverride.getGuiTintOrDefault(dye.mName, GT_Util.getRGBInt(dye.getRGBA()));
- }
- } else if (GregTech_API.sColoredGUI) {
- if (GregTech_API.sMachineMetalGUI) {
- dye = Dyes.MACHINE_METAL;
- } else if (mContainer != null && mContainer.mTileEntity != null) {
- dye = getDyeFromIndex(mContainer.mTileEntity.getColorization());
- }
- }
- return GT_Util.getRGBInt(dye.getRGBA());
- }
-
- private Dyes getDyeFromIndex(short index) {
- return index != -1 ? Dyes.get(index) : Dyes.MACHINE_METAL;
- }
-
- /**
- * @return This machine's MetaTileEntity
- */
- private MetaTileEntity getMachine() {
- return (MetaTileEntity) mContainer.mTileEntity.getMetaTileEntity();
- }
-
- // Tabs support
-
- @Override
- protected void mouseClicked(int mouseX, int mouseY, int mouseButton) {
- super.mouseClicked(mouseX, mouseY, mouseButton);
- // Check for clicked tabs
- coverTabs.onMouseClicked(mouseX, mouseY, mouseButton);
- }
-
- @Override
- public void initGui() {
- super.initGui();
- // Perform layout of tabs
- coverTabs.onInit();
- }
-
- /**
- * @return the background textures used by this machine GUI's tabs
- */
- protected GT_GuiTabIconSet getTabBackground() {
- return TAB_ICONSET;
- }
-
- // Tooltips support
-
- /**
- * Load data for and create appropriate tooltips for this machine. Only called when one of regular or shift tooltips
- * are enabled.
- */
- protected void setupTooltips() {
- if (mContainer.mTileEntity.getMetaTileEntity() instanceof IConfigurationCircuitSupport ccs) {
- if (ccs.allowSelectCircuit()) addToolTip(
- new GT_GuiSlotTooltip(
- mContainer.getSlot(ccs.getCircuitGUISlot()),
- mTooltipCache.getData(GHOST_CIRCUIT_TOOLTIP)));
- }
- }
-
- // GT_IToolTipRenderer and GT_ITabRenderer implementations
- @Override
- public void drawHoveringText(List<String> text, int mouseX, int mouseY, FontRenderer font) {
- super.drawHoveringText(text, mouseX, mouseY, font);
- }
-
- @Override
- public int getGuiTop() {
- return guiTop;
- }
-
- @Override
- public int getGuiLeft() {
- return guiLeft;
- }
-
- @Override
- public int getXSize() {
- return xSize;
- }
-
- @Override
- public FontRenderer getFontRenderer() {
- return fontRendererObj;
- }
-
- @Override
- public RenderItem getItemRenderer() {
- return itemRender;
- }
-
- @Override
- public void addToolTip(GT_GuiTooltip toolTip) {
- mTooltipManager.addToolTip(toolTip);
- }
-
- @Override
- public boolean removeToolTip(GT_GuiTooltip toolTip) {
- return mTooltipManager.removeToolTip(toolTip);
- }
-
- @Override
- protected void onMouseWheel(int mx, int my, int delta) {
- if (mContainer.mTileEntity.getMetaTileEntity() instanceof IConfigurationCircuitSupport ccs) {
- Slot slotCircuit = mContainer.getSlot(ccs.getCircuitGUISlot());
- if (slotCircuit != null
- && func_146978_c(slotCircuit.xDisplayPosition, slotCircuit.yDisplayPosition, 16, 16, mx, my)) {
- // emulate click
- handleMouseClick(slotCircuit, -1, delta > 0 ? 1 : 0, 0);
- return;
- }
- }
- super.onMouseWheel(mx, my, delta);
- }
-
- private void openSelectCircuitDialog() {
- IMetaTileEntity machine = mContainer.mTileEntity.getMetaTileEntity();
- IConfigurationCircuitSupport ccs = (IConfigurationCircuitSupport) machine;
- List<ItemStack> circuits = ccs.getConfigurationCircuits();
- mc.displayGuiScreen(
- new GT_GUIDialogSelectItem(
- StatCollector.translateToLocal("GT5U.machines.select_circuit"),
- machine.getStackForm(0),
- this,
- this::onCircuitSelected,
- circuits,
- GT_Utility.findMatchingStackInList(circuits, machine.getStackInSlot(ccs.getCircuitSlot()))));
- }
-
- private void onCircuitSelected(ItemStack selected) {
- GT_Values.NW.sendToServer(new GT_Packet_SetConfigurationCircuit(mContainer.mTileEntity, selected));
- // we will not do any validation on client side
- // it doesn't get to actually decide what inventory contains anyway
- IConfigurationCircuitSupport ccs = (IConfigurationCircuitSupport) mContainer.mTileEntity.getMetaTileEntity();
- mContainer.mTileEntity.setInventorySlotContents(ccs.getCircuitSlot(), selected);
- }
-}
diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_1by1.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_1by1.java
deleted file mode 100644
index 5bd44668c5..0000000000
--- a/src/main/java/gregtech/api/gui/GT_GUIContainer_1by1.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package gregtech.api.gui;
-
-import static gregtech.api.enums.Mods.GregTech;
-
-import net.minecraft.entity.player.InventoryPlayer;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-
-@Deprecated
-public class GT_GUIContainer_1by1 extends GT_GUIContainerMetaTile_Machine {
-
- private final String mName;
- private final int textColor = this.getTextColorOrDefault("title", 0x404040);
-
- public GT_GUIContainer_1by1(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
- super(
- new GT_Container_1by1(aInventoryPlayer, aTileEntity),
- GregTech.getResourcePath("textures", "gui", "1by1.png"));
- mName = aName;
- }
-
- public GT_GUIContainer_1by1(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName,
- String aBackground) {
- super(
- new GT_Container_1by1(aInventoryPlayer, aTileEntity),
- GregTech.getResourcePath("textures", "gui", aBackground + "1by1.png"));
- mName = aName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
- fontRendererObj.drawString(mName, 8, 4, textColor);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float parTicks, int mouseX, int mouseY) {
- super.drawGuiContainerBackgroundLayer(parTicks, mouseX, mouseY);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
-}
diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_2by2.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_2by2.java
deleted file mode 100644
index 107bcc3859..0000000000
--- a/src/main/java/gregtech/api/gui/GT_GUIContainer_2by2.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package gregtech.api.gui;
-
-import static gregtech.api.enums.Mods.GregTech;
-
-import net.minecraft.entity.player.InventoryPlayer;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-
-@Deprecated
-public class GT_GUIContainer_2by2 extends GT_GUIContainerMetaTile_Machine {
-
- private final String mName;
- private final int textColor = this.getTextColorOrDefault("title", 0x404040);
-
- public GT_GUIContainer_2by2(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
- super(
- new GT_Container_2by2(aInventoryPlayer, aTileEntity),
- GregTech.getResourcePath("textures", "gui", "2by2.png"));
- mName = aName;
- }
-
- public GT_GUIContainer_2by2(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName,
- String aBackground) {
- super(
- new GT_Container_2by2(aInventoryPlayer, aTileEntity),
- GregTech.getResourcePath("textures", "gui", aBackground + "2by2.png"));
- mName = aName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
- fontRendererObj.drawString(mName, 8, 4, textColor);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float parTicks, int mouseX, int mouseY) {
- super.drawGuiContainerBackgroundLayer(parTicks, mouseX, mouseY);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
-}
diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_3by3.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_3by3.java
deleted file mode 100644
index 0c8b63664a..0000000000
--- a/src/main/java/gregtech/api/gui/GT_GUIContainer_3by3.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package gregtech.api.gui;
-
-import static gregtech.api.enums.Mods.GregTech;
-
-import net.minecraft.entity.player.InventoryPlayer;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-
-@Deprecated
-public class GT_GUIContainer_3by3 extends GT_GUIContainerMetaTile_Machine {
-
- private final String mName;
- private final int textColor = this.getTextColorOrDefault("title", 0x404040);
-
- public GT_GUIContainer_3by3(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
- super(
- new GT_Container_3by3(aInventoryPlayer, aTileEntity),
- GregTech.getResourcePath("textures", "gui", "3by3.png"));
- mName = aName;
- }
-
- public GT_GUIContainer_3by3(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName,
- String aBackground) {
- super(
- new GT_Container_3by3(aInventoryPlayer, aTileEntity),
- GregTech.getResourcePath("textures", "gui", aBackground + "3by3.png"));
- mName = aName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
- fontRendererObj.drawString(mName, 8, 4, textColor);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float parTicks, int mouseX, int mouseY) {
- super.drawGuiContainerBackgroundLayer(parTicks, mouseX, mouseY);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
-}
diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_4by4.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_4by4.java
deleted file mode 100644
index 9e5d7f7155..0000000000
--- a/src/main/java/gregtech/api/gui/GT_GUIContainer_4by4.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package gregtech.api.gui;
-
-import static gregtech.api.enums.Mods.GregTech;
-
-import net.minecraft.entity.player.InventoryPlayer;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-
-@Deprecated
-public class GT_GUIContainer_4by4 extends GT_GUIContainerMetaTile_Machine {
-
- private final String mName;
- private final int textColor = this.getTextColorOrDefault("title", 0x404040);
-
- public GT_GUIContainer_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
- super(
- new GT_Container_4by4(aInventoryPlayer, aTileEntity),
- GregTech.getResourcePath("textures", "gui", "4by4.png"));
- mName = aName;
- }
-
- public GT_GUIContainer_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName,
- String aBackground) {
- super(
- new GT_Container_4by4(aInventoryPlayer, aTileEntity),
- GregTech.getResourcePath("textures", "gui", aBackground + "4by4.png"));
- mName = aName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
- fontRendererObj.drawString(mName, 8, 4, textColor);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float parTicks, int mouseX, int mouseY) {
- super.drawGuiContainerBackgroundLayer(parTicks, mouseX, mouseY);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
-}
diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicTank.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicTank.java
deleted file mode 100644
index 54aa42d2a3..0000000000
--- a/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicTank.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package gregtech.api.gui;
-
-import static gregtech.api.enums.Mods.GregTech;
-
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.util.StatCollector;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_Utility;
-
-public class GT_GUIContainer_BasicTank extends GT_GUIContainerMetaTile_Machine {
-
- private final String mName;
- private final int textColor = this.getTextColorOrDefault("text", 0xFAFAFF),
- textColorTitle = this.getTextColorOrDefault("title", 0x404040),
- textColorValue = this.getTextColorOrDefault("value", 0xFAFAFF);
-
- public GT_GUIContainer_BasicTank(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
- super(
- new GT_Container_BasicTank(aInventoryPlayer, aTileEntity),
- GregTech.getResourcePath("textures", "gui", "BasicTank.png"));
- mName = aName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
- fontRendererObj
- .drawString(StatCollector.translateToLocal("container.inventory"), 8, ySize - 96 + 2, textColorTitle);
- fontRendererObj.drawString(mName, 8, 6, textColorTitle);
- if (mContainer != null) {
- fontRendererObj.drawString("Liquid Amount", 10, 20, textColor);
- fontRendererObj.drawString(
- GT_Utility.parseNumberToString(((GT_Container_BasicTank) mContainer).mContent),
- 10,
- 30,
- textColorValue);
- }
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float parTicks, int mouseX, int mouseY) {
- super.drawGuiContainerBackgroundLayer(parTicks, mouseX, mouseY);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
-}
diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java
deleted file mode 100644
index 3d9515b19a..0000000000
--- a/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java
+++ /dev/null
@@ -1,173 +0,0 @@
-package gregtech.api.gui;
-
-import static gregtech.api.enums.Mods.GregTech;
-
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.item.ItemStack;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.items.GT_MetaGenerated_Tool_01;
-import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_DrillerBase;
-import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbine;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- * <p/>
- * The GUI-Container I use for all my Basic Machines
- */
-@Deprecated
-public class GT_GUIContainer_MultiMachine extends GT_GUIContainerMetaTile_Machine {
-
- final String mName;
- private final int textColor = this.getTextColorOrDefault("text", 0xFAFAFF),
- textColorTitle = this.getTextColorOrDefault("title", 0xFAFAFF);
-
- public GT_GUIContainer_MultiMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName,
- String aTextureFile) {
- super(
- new GT_Container_MultiMachine(aInventoryPlayer, aTileEntity),
- GregTech.getResourcePath(
- "textures",
- "gui",
- "multimachines",
- aTextureFile == null ? "MultiblockDisplay" : aTextureFile));
- mName = aName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
-
- // If text is drawn iterate down GUI 8 pixels (height of characters).
- int line_counter = 7;
- int max_chars_per_line = 26;
-
- if (mName.length() > 26) {
-
- // Split the machine name into an array, so we can try fit it on one line but if not use more.
- String[] split = mName.split(" ");
-
- int total_line_length = 0;
- StringBuilder current_line = new StringBuilder();
-
- int index = 0;
-
- for (String str : split) {
-
- total_line_length += str.length();
-
- if (total_line_length > max_chars_per_line) {
- fontRendererObj.drawString(current_line.toString(), 10, line_counter, textColorTitle);
- line_counter += 8;
- current_line = new StringBuilder();
- index = 0;
- total_line_length = str.length();
- }
-
- if (index == 0) {
- current_line.append(str);
- } else {
- current_line.append(" ")
- .append(str);
- }
- index++;
- }
- fontRendererObj.drawString(current_line.toString(), 10, line_counter, textColorTitle);
- } else {
- fontRendererObj.drawString(mName, 10, line_counter, textColorTitle);
- }
- line_counter += 8;
-
- if (mContainer != null) { // (mWrench ? 0 : 1) | (mScrewdriver ? 0 : 2) | (mSoftHammer ? 0 : 4) | (mHardHammer ?
- // 0 : 8)
- // | (mSolderingTool ? 0 : 16) | (mCrowbar ? 0 : 32) | (mMachine ? 0 : 64));
- if ((mContainer.mDisplayErrorCode & 1) != 0) {
- fontRendererObj.drawString(GT_Utility.trans("132", "Pipe is loose."), 10, line_counter, textColor);
- line_counter += 8;
- }
-
- if ((mContainer.mDisplayErrorCode & 2) != 0) {
- fontRendererObj.drawString(GT_Utility.trans("133", "Screws are loose."), 10, line_counter, textColor);
- line_counter += 8;
- }
-
- if ((mContainer.mDisplayErrorCode & 4) != 0) {
- fontRendererObj.drawString(GT_Utility.trans("134", "Something is stuck."), 10, line_counter, textColor);
- line_counter += 8;
- }
-
- if ((mContainer.mDisplayErrorCode & 8) != 0) {
- fontRendererObj
- .drawString(GT_Utility.trans("135", "Platings are dented."), 10, line_counter, textColor);
- line_counter += 8;
- }
-
- if ((mContainer.mDisplayErrorCode & 16) != 0) {
- fontRendererObj
- .drawString(GT_Utility.trans("136", "Circuitry burned out."), 10, line_counter, textColor);
- line_counter += 8;
- }
-
- if ((mContainer.mDisplayErrorCode & 32) != 0) {
- fontRendererObj
- .drawString(GT_Utility.trans("137", "That doesn't belong there."), 10, line_counter, textColor);
- line_counter += 8;
- }
-
- if ((mContainer.mDisplayErrorCode & 64) != 0) {
- fontRendererObj
- .drawString(GT_Utility.trans("138", "Incomplete Structure."), 10, line_counter, textColor);
- line_counter += 8;
- }
-
- if (mContainer.mDisplayErrorCode == 0) {
- if (mContainer.mActive == 0) {
- fontRendererObj
- .drawString(GT_Utility.trans("139", "Hit with Soft Mallet"), 10, line_counter, textColor);
- line_counter += 8;
- fontRendererObj
- .drawString(GT_Utility.trans("140", "to (re-)start the Machine"), 10, line_counter, textColor);
- line_counter += 8;
- fontRendererObj
- .drawString(GT_Utility.trans("141", "if it doesn't start."), 10, line_counter, textColor);
- } else {
- fontRendererObj
- .drawString(GT_Utility.trans("142", "Running perfectly."), 10, line_counter, textColor);
- }
- line_counter += 8;
- if (mContainer.mTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_DrillerBase) {
- ItemStack tItem = mContainer.mTileEntity.getMetaTileEntity()
- .getStackInSlot(1);
- if (tItem == null
- || !GT_Utility.areStacksEqual(tItem, GT_ModHandler.getIC2Item("miningPipe", 1L))) {
- fontRendererObj
- .drawString(GT_Utility.trans("143", "Missing Mining Pipe"), 10, line_counter, textColor);
- }
- } else if (mContainer.mTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_LargeTurbine) {
- ItemStack tItem = mContainer.mTileEntity.getMetaTileEntity()
- .getStackInSlot(1);
- if (tItem == null
- || !(tItem.getItem() == GT_MetaGenerated_Tool_01.INSTANCE && tItem.getItemDamage() >= 170
- && tItem.getItemDamage() <= 177)) {
- fontRendererObj
- .drawString(GT_Utility.trans("144", "Missing Turbine Rotor"), 10, line_counter, textColor);
- }
- }
- }
- }
- }
-
- @Deprecated
- public String trans(String aKey, String aEnglish) {
- return GT_Utility.trans(aKey, aEnglish);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float parTicks, int mouseX, int mouseY) {
- super.drawGuiContainerBackgroundLayer(parTicks, mouseX, mouseY);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
-}
diff --git a/src/main/java/gregtech/api/gui/GT_GUICover.java b/src/main/java/gregtech/api/gui/GT_GUICover.java
deleted file mode 100644
index 5729ada685..0000000000
--- a/src/main/java/gregtech/api/gui/GT_GUICover.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package gregtech.api.gui;
-
-import net.minecraft.item.ItemStack;
-
-import gregtech.api.enums.GT_Values;
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.net.GT_Packet_GtTileEntityGuiRequest;
-
-@Deprecated
-public abstract class GT_GUICover extends GT_GUIScreen {
-
- public final ICoverable tile;
- public int parentGuiId = -1;
-
- public GT_GUICover(ICoverable tile, int width, int height, ItemStack cover) {
- super(width, height, cover == null ? "" : cover.getDisplayName());
- this.tile = tile;
- headerIcon.setItem(cover);
- }
-
- @Override
- public void updateScreen() {
- super.updateScreen();
- if (!tile.isUseableByPlayer(mc.thePlayer)) {
- closeScreen();
- }
- }
-
- /**
- * The parent GUI to exit to. -1 is ignored.
- *
- * @param parentGuiId parent GUI ID
- */
- public void setParentGuiId(int parentGuiId) {
- this.parentGuiId = parentGuiId;
- }
-
- @Override
- public void closeScreen() {
- // If this cover was given a guiId, tell the server to open it for us when this GUI closes.
- if (parentGuiId != -1 && tile.isUseableByPlayer(mc.thePlayer)) {
- GT_Values.NW.sendToServer(
- new GT_Packet_GtTileEntityGuiRequest(
- tile.getXCoord(),
- tile.getYCoord(),
- tile.getZCoord(),
- parentGuiId,
- tile.getWorld().provider.dimensionId,
- mc.thePlayer.getEntityId()));
- } else {
- this.mc.displayGuiScreen(null);
- this.mc.setIngameFocus();
- }
- }
-}
diff --git a/src/main/java/gregtech/api/gui/GT_GUIDialogSelectItem.java b/src/main/java/gregtech/api/gui/GT_GUIDialogSelectItem.java
deleted file mode 100644
index 03a6fb2a70..0000000000
--- a/src/main/java/gregtech/api/gui/GT_GUIDialogSelectItem.java
+++ /dev/null
@@ -1,229 +0,0 @@
-package gregtech.api.gui;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.function.Consumer;
-
-import net.minecraft.client.gui.GuiButton;
-import net.minecraft.client.gui.GuiScreen;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.StatCollector;
-
-import gregtech.api.gui.widgets.GT_GuiFakeItemButton;
-import gregtech.api.gui.widgets.GT_GuiIcon;
-import gregtech.api.gui.widgets.GT_GuiIconButton;
-import gregtech.api.util.GT_Utility;
-
-@Deprecated
-public class GT_GUIDialogSelectItem extends GT_GUIScreen {
-
- public static final int UNSELECTED = -1;
- private static final int cols = 9;
- private static final int rows = 3;
- private final int textColor = this.getTextColorOrDefault("text", 0xff555555);
- private final GuiScreen parent;
- private final Consumer<ItemStack> selectedCallback;
- // passed in stack
- private final List<ItemStack> stacks;
- // all slots not including btnCurrent
- private final List<GT_GuiFakeItemButton> slots = new ArrayList<>();
- // the currently selected slot content
- private final GT_GuiFakeItemButton btnCurrent = new GT_GuiFakeItemButton(this, 8, 25, GT_GuiIcon.SLOT_DARKGRAY)
- .setMimicSlot(true);
- private final boolean noDeselect;
- private int selected;
- private int scroll = 0;
- private GT_GuiIconButton btnUp;
- private GT_GuiIconButton btnDown;
-
- public GT_GUIDialogSelectItem(String header, ItemStack headerItem, GuiScreen parent,
- Consumer<ItemStack> selectedCallback, List<ItemStack> stacks) {
- this(header, headerItem, parent, selectedCallback, stacks, UNSELECTED);
- }
-
- public GT_GUIDialogSelectItem(String header, ItemStack headerItem, GuiScreen parent,
- Consumer<ItemStack> selectedCallback, List<ItemStack> stacks, int selected) {
- this(header, headerItem, parent, selectedCallback, stacks, selected, false);
- }
-
- /**
- * Open a dialog to select an item from given list. Given callback may be called zero or more times depending on
- * user action.
- *
- * @param header Header text
- * @param headerItem ItemStack to use as Dialog icon
- * @param parent open which GUIScreen when this dialog is closed. use null if it has no parent.
- * @param selectedCallback callback upon selected
- * @param stacks list to choose from
- * @param selected preselected item. Use {@link #UNSELECTED} for unselected. Invalid selected will be
- * clamped to 0 or highest index
- * @param noDeselect true if player cannot deselect, false otherwise. If this is set to true, selectedCallback
- * is guaranteed to be called with a nonnull stack
- */
- public GT_GUIDialogSelectItem(String header, ItemStack headerItem, GuiScreen parent,
- Consumer<ItemStack> selectedCallback, List<ItemStack> stacks, int selected, boolean noDeselect) {
- super(176, 107, header);
- this.noDeselect = noDeselect;
- if (headerItem != null) this.headerIcon.setItem(headerItem);
- this.parent = parent;
- this.selectedCallback = selectedCallback;
- this.stacks = stacks;
-
- if (stacks.size() > rows * cols) {
- btnUp = new GT_GuiIconButton(this, 0, 134, 25, GT_GuiIcon.GREEN_ARROW_UP);
- btnDown = new GT_GuiIconButton(this, 1, 152, 25, GT_GuiIcon.GREEN_ARROW_DOWN);
- }
-
- for (int i = 0; i < rows; i++) {
- for (int j = 0; j < cols; j++) {
- slots.add(
- new GT_GuiFakeItemButton(this, 8 + 18 * j, 44 + 18 * i, GT_GuiIcon.SLOT_GRAY).setMimicSlot(true));
- }
- }
-
- setSelected(noDeselect ? Math.max(0, selected) : selected);
- ensureSelectedDisplayed();
- }
-
- @Override
- protected void onInitGui(int guiLeft, int guiTop, int gui_width, int gui_height) {
- btnCurrent
- .setX(8 + 2 + fontRendererObj.getStringWidth(StatCollector.translateToLocal("GT5U.gui.select.current")));
- }
-
- @Override
- public void closeScreen() {
- selectedCallback.accept(getCandidate(getSelected()));
- mc.displayGuiScreen(parent);
- if (parent == null) mc.setIngameFocus();
- }
-
- @Override
- public void buttonClicked(GuiButton button) {
- switch (button.id) {
- case 0 -> {
- setScroll(scroll - 1);
- return;
- }
- case 1 -> {
- setScroll(scroll + 1);
- return;
- }
- }
- super.buttonClicked(button);
- }
-
- @Override
- public void drawExtras(int mouseX, int mouseY, float parTicks) {
- int y = 25 + (18 - getFontRenderer().FONT_HEIGHT) / 2;
- getFontRenderer().drawString(StatCollector.translateToLocal("GT5U.gui.select.current"), 8, y, textColor);
- super.drawExtras(mouseX, mouseY, parTicks);
- }
-
- @Override
- public void mouseClicked(int x, int y, int button) {
- int mx = x - guiLeft, my = y - guiTop;
- if (button == 0) {
- if (btnCurrent.getBounds()
- .contains(mx, my)) {
- ensureSelectedDisplayed();
- return;
- }
-
- for (int i = 0, slotsSize = slots.size(); i < slotsSize; i++) {
- GT_GuiFakeItemButton slot = slots.get(i);
- if (slot.getBounds()
- .contains(mx, my)) {
- setSelected(slotIndexToListIndex(i));
- return;
- }
- }
- } else if (button == 1 && getSelected() >= 0) {
- if (btnCurrent.getBounds()
- .contains(mx, my)) {
- setSelected(UNSELECTED);
- return;
- }
- GT_GuiFakeItemButton slot = getSlot(listIndexToSlotIndex(getSelected()));
- if (slot != null && slot.getBounds()
- .contains(mx, my)) {
- setSelected(UNSELECTED);
- }
- }
- super.mouseClicked(x, y, button);
- }
-
- @Override
- public void onMouseWheel(int x, int y, int delta) {
- if (delta < 0) setScroll(scroll + 1);
- else if (delta > 0) setScroll(scroll - 1);
- }
-
- private void fillSlots() {
- for (int i = 0, j = scroll * cols; i < slots.size(); i++, j++) {
- slots.get(i)
- .setItem(getCandidate(j))
- .setBgIcon(j == getSelected() ? GT_GuiIcon.SLOT_DARKGRAY : GT_GuiIcon.SLOT_GRAY);
- }
- }
-
- private void ensureSelectedDisplayed() {
- if (getSelected() < scroll * cols) {
- setScroll(getSelected() / cols);
- } else if (getSelected() > (scroll + rows) * cols) {
- setScroll((getSelected() - (rows - 1) * cols) / cols);
- } else {
- // called nonetheless to update button enabled states
- setScroll(scroll);
- }
- }
-
- private int slotIndexToListIndex(int index) {
- int mapped = scroll * cols + index;
- return mapped >= stacks.size() ? UNSELECTED : mapped;
- }
-
- private int listIndexToSlotIndex(int index) {
- return index - scroll * cols;
- }
-
- public int getSelected() {
- return selected;
- }
-
- public void setSelected(int selected) {
- if (selected == this.selected) return;
- int newSelected = GT_Utility.clamp(selected, UNSELECTED, stacks.size() - 1);
-
- if (noDeselect && newSelected == UNSELECTED) return;
-
- GT_GuiFakeItemButton selectedSlot = getSlot(this.selected);
- if (selectedSlot != null) selectedSlot.setBgIcon(GT_GuiIcon.SLOT_GRAY);
-
- this.selected = newSelected;
-
- btnCurrent.setItem(getCandidate(this.selected));
-
- selectedSlot = getSlot(this.selected);
- if (selectedSlot != null) selectedSlot.setBgIcon(GT_GuiIcon.SLOT_DARKGRAY);
- }
-
- private void setScroll(int scroll) {
- if (stacks.size() > rows * cols) {
- int lo = 0;
- int hi = (stacks.size() - rows * cols) / cols + 1;
- this.scroll = GT_Utility.clamp(scroll, lo, hi);
- btnUp.enabled = this.scroll != lo;
- btnDown.enabled = this.scroll != hi;
- }
- fillSlots();
- }
-
- private ItemStack getCandidate(int listIndex) {
- return listIndex < 0 || listIndex >= stacks.size() ? null : stacks.get(listIndex);
- }
-
- private GT_GuiFakeItemButton getSlot(int slotIndex) {
- return slotIndex < 0 || slotIndex >= slots.size() ? null : slots.get(slotIndex);
- }
-}
diff --git a/src/main/java/gregtech/api/gui/GT_GUIScreen.java b/src/main/java/gregtech/api/gui/GT_GUIScreen.java
deleted file mode 100644
index 2ff2973792..0000000000
--- a/src/main/java/gregtech/api/gui/GT_GUIScreen.java
+++ /dev/null
@@ -1,327 +0,0 @@
-package gregtech.api.gui;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import net.minecraft.client.gui.FontRenderer;
-import net.minecraft.client.gui.GuiButton;
-import net.minecraft.client.gui.GuiScreen;
-import net.minecraft.client.gui.GuiTextField;
-import net.minecraft.client.renderer.RenderHelper;
-import net.minecraft.client.renderer.entity.RenderItem;
-import net.minecraft.util.ResourceLocation;
-
-import org.lwjgl.input.Mouse;
-import org.lwjgl.opengl.GL11;
-import org.lwjgl.opengl.GL12;
-
-import gregtech.api.enums.Dyes;
-import gregtech.api.gui.widgets.GT_GuiFakeItemButton;
-import gregtech.api.gui.widgets.GT_GuiIntegerTextBox;
-import gregtech.api.gui.widgets.GT_GuiTooltip;
-import gregtech.api.gui.widgets.GT_GuiTooltipManager;
-import gregtech.api.gui.widgets.GT_GuiTooltipManager.GT_IToolTipRenderer;
-import gregtech.api.interfaces.IGuiScreen;
-
-@Deprecated
-public abstract class GT_GUIScreen extends GuiScreen implements GT_IToolTipRenderer, IGuiScreen {
-
- protected final GT_GuiTooltipManager ttManager = new GT_GuiTooltipManager();
-
- protected int gui_width = 176;
- protected int gui_height = 107;
- protected int guiTop, guiLeft;
- protected final boolean drawButtons = true;
- protected final ResourceLocation mGUIbackgroundLocation;
-
- private GuiButton selectedButton;
- private final GT_GUIColorOverride colorOverride;
- private final int textColor;
- private static final String guiTexturePath = "gregtech:textures/gui/GuiCover.png";
-
- public String header;
- public GT_GuiFakeItemButton headerIcon;
-
- protected final List<IGuiElement> elements = new ArrayList<>();
- protected final List<GT_GuiIntegerTextBox> textBoxes = new ArrayList<>();
-
- public GT_GUIScreen(int width, int height, String header) {
- this.gui_width = width;
- this.gui_height = height;
- this.header = header;
- this.headerIcon = new GT_GuiFakeItemButton(this, 5, 5, null);
- this.mGUIbackgroundLocation = new ResourceLocation(guiTexturePath);
- this.colorOverride = GT_GUIColorOverride.get(guiTexturePath);
- this.textColor = getTextColorOrDefault("title", 0xFF222222);
- }
-
- @Override
- public void initGui() {
- guiLeft = (this.width - this.gui_width) / 2;
- guiTop = (this.height - this.gui_height) / 2;
-
- for (IGuiElement element : elements) {
- if (element instanceof GuiButton button) buttonList.add(button);
- if (element instanceof GT_GuiIntegerTextBox) textBoxes.add((GT_GuiIntegerTextBox) element);
- }
-
- onInitGui(guiLeft, guiTop, gui_width, gui_height);
-
- for (IGuiElement element : elements) {
- element.onInit();
- }
- super.initGui();
- }
-
- protected abstract void onInitGui(int guiLeft, int guiTop, int gui_width, int gui_height);
-
- protected int getTextColorOrDefault(String textType, int defaultColor) {
- return colorOverride.getTextColorOrDefault(textType, defaultColor);
- }
-
- public void onMouseWheel(int x, int y, int delta) {}
-
- @Override
- public void handleMouseInput() {
- int delta = Mouse.getEventDWheel();
- if (delta != 0) {
- int i = Mouse.getEventX() * this.width / this.mc.displayWidth;
- int j = this.height - Mouse.getEventY() * this.height / this.mc.displayHeight - 1;
- onMouseWheel(i, j, delta);
- }
- super.handleMouseInput();
- }
-
- @Override
- public void drawScreen(int mouseX, int mouseY, float parTicks) {
- drawDefaultBackground();
-
- drawBackground(mouseX, mouseY, parTicks);
-
- RenderHelper.disableStandardItemLighting();
- GL11.glDisable(GL11.GL_LIGHTING);
- GL11.glDisable(GL11.GL_DEPTH_TEST);
- GL11.glDisable(GL12.GL_RESCALE_NORMAL);
- if (drawButtons) {
- RenderHelper.enableGUIStandardItemLighting();
- for (IGuiElement e : elements) e.draw(mouseX, mouseY, parTicks);
- }
- GL11.glEnable(GL12.GL_RESCALE_NORMAL);
-
- GL11.glPushMatrix();
- GL11.glTranslatef(guiLeft, guiTop, 0.0F);
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
-
- GL11.glDisable(GL11.GL_LIGHTING);
- drawForegroundLayer(mouseX, mouseY, parTicks);
- GL11.glEnable(GL11.GL_LIGHTING);
-
- GL11.glPopMatrix();
-
- GL11.glEnable(GL11.GL_LIGHTING);
- GL11.glEnable(GL11.GL_DEPTH_TEST);
- RenderHelper.enableStandardItemLighting();
- }
-
- public void drawForegroundLayer(int mouseX, int mouseY, float parTicks) {
- drawExtras(mouseX, mouseY, parTicks);
- ttManager.onTick(this, mouseX, mouseY);
- }
-
- public void drawBackground(int mouseX, int mouseY, float parTicks) {
- short[] color = Dyes.MACHINE_METAL.getRGBA();
- GL11.glColor3ub((byte) color[0], (byte) color[1], (byte) color[2]);
- this.mc.renderEngine.bindTexture(mGUIbackgroundLocation);
- drawTexturedModalRect(guiLeft, guiTop, 0, 0, gui_width, gui_height);
- }
-
- public void drawExtras(int mouseX, int mouseY, float parTicks) {
- this.fontRendererObj.drawString(header, 25, 9, textColor);
- }
-
- @Override
- public boolean doesGuiPauseGame() {
- return false;
- }
-
- public void closeScreen() {
- this.mc.displayGuiScreen(null);
- this.mc.setIngameFocus();
- }
-
- @Override
- public void updateScreen() {
- super.updateScreen();
- for (GuiTextField f : textBoxes) {
- f.updateCursorCounter();
- }
- }
-
- @Override
- public void mouseClicked(int x, int y, int button) {
- for (GT_GuiIntegerTextBox tBox : textBoxes) {
- boolean hadFocus = tBox.isFocused();
- if (tBox.isEnabled() || hadFocus) tBox.mouseClicked(x, y, button);
-
- if (tBox.isFocused() && button == 1 && tBox.isEnabled()) // rightclick -> lcear it
- tBox.setText("0");
- else if (hadFocus && !tBox.isFocused()) applyTextBox(tBox);
- }
- super.mouseClicked(x, y, button);
- }
-
- @Override
- public void keyTyped(char c, int key) {
- GT_GuiIntegerTextBox focusedTextBox = null;
- for (GT_GuiIntegerTextBox textBox : textBoxes) {
- if (textBox.isFocused()) focusedTextBox = textBox;
- }
-
- if (key == 1) { // esc
- if (focusedTextBox != null) {
- resetTextBox(focusedTextBox);
- setFocusedTextBox(null);
- } else {
- closeScreen();
- // don't fall through to parent
- }
- return;
- }
-
- if (c == '\t') { // tab
- for (int i = 0; i < textBoxes.size(); i++) {
- GT_GuiIntegerTextBox box = textBoxes.get(i);
- if (box.isFocused()) {
- applyTextBox(box);
- setFocusedTextBox(((i + 1) < textBoxes.size()) ? textBoxes.get(i + 1) : null);
- return;
- }
- }
- if (!textBoxes.isEmpty()) setFocusedTextBox(textBoxes.get(0));
- return;
- }
-
- if (focusedTextBox != null && focusedTextBox.textboxKeyTyped(c, key)) {
- return;
- }
-
- if (key == 28 && focusedTextBox != null) { // enter
- applyTextBox(focusedTextBox);
- setFocusedTextBox(null);
- return;
- }
-
- if (key == this.mc.gameSettings.keyBindInventory.getKeyCode()) {
- if (focusedTextBox != null) {
- applyTextBox(focusedTextBox);
- setFocusedTextBox(null);
- return;
- }
- closeScreen();
- return;
- }
- super.keyTyped(c, key);
- }
-
- /**
- * Button
- */
- @Override
- public void actionPerformed(GuiButton button) {
- selectedButton = button;
- }
-
- @Override
- public void clearSelectedButton() {
- selectedButton = null;
- }
-
- @Override
- public GuiButton getSelectedButton() {
- return selectedButton;
- }
-
- @Override
- public void buttonClicked(GuiButton button) {}
-
- /**
- * TextBoxes
- */
- private void setFocusedTextBox(GT_GuiIntegerTextBox boxToFocus) {
- for (GT_GuiIntegerTextBox textBox : textBoxes) {
- textBox.setFocused(textBox.equals(boxToFocus) && textBox.isEnabled());
- }
- }
-
- /**
- * Given textbox's value might have changed.
- */
- public void applyTextBox(GT_GuiIntegerTextBox box) {}
-
- /**
- * Reset the given textbox to the last valid value, <b>NOT</b> 0.
- */
- public void resetTextBox(GT_GuiIntegerTextBox box) {}
-
- /**
- * GT_IToolTipRenderer
- */
- @Override
- public void drawHoveringText(List<String> text, int mouseX, int mouseY, FontRenderer render) {
- super.drawHoveringText(text, mouseX, mouseY, render);
- }
-
- @Override
- public FontRenderer getFontRenderer() {
- return super.fontRendererObj;
- }
-
- @Override
- public void addToolTip(GT_GuiTooltip toolTip) {
- ttManager.addToolTip(toolTip);
- }
-
- @Override
- public boolean removeToolTip(GT_GuiTooltip toolTip) {
- return ttManager.removeToolTip(toolTip);
- }
-
- /**
- * Junk
- */
- @Override
- public int getGuiTop() {
- return guiTop;
- }
-
- @Override
- public int getGuiLeft() {
- return guiLeft;
- }
-
- @Override
- public int getXSize() {
- return gui_width;
- }
-
- @Override
- public int getYSize() {
- return gui_height;
- }
-
- @Override
- public RenderItem getItemRenderer() {
- return itemRender;
- }
-
- @Override
- public void addElement(IGuiElement element) {
- if (elements.contains(element)) return;
- elements.add(element);
- }
-
- @Override
- public boolean removeElement(IGuiElement element) {
- return elements.remove(element);
- }
-}
diff --git a/src/main/java/gregtech/api/gui/GT_Slot_Armor.java b/src/main/java/gregtech/api/gui/GT_Slot_Armor.java
deleted file mode 100644
index 1c48b01430..0000000000
--- a/src/main/java/gregtech/api/gui/GT_Slot_Armor.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package gregtech.api.gui;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-public class GT_Slot_Armor extends Slot {
-
- final int mArmorType;
- final EntityPlayer mPlayer;
-
- public GT_Slot_Armor(IInventory inventory, int slotIndex, int xPos, int yPos, int armorType, EntityPlayer aPlayer) {
- super(inventory, slotIndex, xPos, yPos);
- mArmorType = armorType;
- mPlayer = aPlayer;
- }
-
- @Override
- public int getSlotStackLimit() {
- return 1;
- }
-
- @Override
- public boolean isItemValid(ItemStack aStack) {
- return aStack != null && aStack.getItem() != null
- && aStack.getItem()
- .isValidArmor(aStack, mArmorType, mPlayer);
- }
-}
diff --git a/src/main/java/gregtech/api/gui/GT_Slot_DataOrb.java b/src/main/java/gregtech/api/gui/GT_Slot_DataOrb.java
deleted file mode 100644
index 115b50ddb8..0000000000
--- a/src/main/java/gregtech/api/gui/GT_Slot_DataOrb.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package gregtech.api.gui;
-
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-import gregtech.api.enums.ItemList;
-
-public class GT_Slot_DataOrb extends Slot {
-
- public GT_Slot_DataOrb(IInventory inventory, int slotIndex, int xPos, int yPos) {
- super(inventory, slotIndex, xPos, yPos);
- }
-
- @Override
- public boolean isItemValid(ItemStack aStack) {
- return ItemList.Tool_DataOrb.isStackEqual(aStack, false, true);
- }
-}
diff --git a/src/main/java/gregtech/api/gui/GT_Slot_Holo.java b/src/main/java/gregtech/api/gui/GT_Slot_Holo.java
deleted file mode 100644
index 9b7b75f0b2..0000000000
--- a/src/main/java/gregtech/api/gui/GT_Slot_Holo.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package gregtech.api.gui;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class GT_Slot_Holo extends Slot {
-
- public final int mSlotIndex;
- public boolean mEnabled = true;
- public boolean mCanInsertItem, mCanStackItem;
- public int mMaxStacksize = 127;
-
- public GT_Slot_Holo(IInventory inventory, int slotIndex, int xPos, int yPos, boolean aCanInsertItem,
- boolean aCanStackItem, int aMaxStacksize) {
- super(inventory, slotIndex, xPos, yPos);
- mCanInsertItem = aCanInsertItem;
- mCanStackItem = aCanStackItem;
- mMaxStacksize = aMaxStacksize;
- mSlotIndex = slotIndex;
- }
-
- @Override
- public boolean isItemValid(ItemStack itemStack) {
- return mCanInsertItem;
- }
-
- @Override
- public int getSlotStackLimit() {
- return mMaxStacksize;
- }
-
- @Override
- public boolean getHasStack() {
- return false;
- }
-
- @Override
- public ItemStack decrStackSize(int amount) {
- if (!mCanStackItem) return null;
- return super.decrStackSize(amount);
- }
-
- @Override
- public boolean canTakeStack(EntityPlayer player) {
- return false;
- }
-
- /**
- * Sets if this slot should be ignored in event-processing. For example, highlight the slot on mouseOver.
- *
- * @param enabled if the slot should be enabled
- */
- public void setEnabled(boolean enabled) {
- mEnabled = enabled;
- }
-
- /**
- * Use this value to determine whether to ignore this slot in event processing
- */
- public boolean isEnabled() {
- return mEnabled;
- }
-
- /**
- * This function controls whether to highlight the slot on mouseOver.
- */
- @Override
- @SideOnly(Side.CLIENT)
- public boolean func_111238_b() {
- return isEnabled();
- }
-}
diff --git a/src/main/java/gregtech/api/gui/GT_Slot_Output.java b/src/main/java/gregtech/api/gui/GT_Slot_Output.java
deleted file mode 100644
index 7c883ea2d1..0000000000
--- a/src/main/java/gregtech/api/gui/GT_Slot_Output.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package gregtech.api.gui;
-
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-public class GT_Slot_Output extends Slot {
-
- public GT_Slot_Output(IInventory inventory, int slotIndex, int xPos, int yPos) {
- super(inventory, slotIndex, xPos, yPos);
- }
-
- @Override
- public boolean isItemValid(ItemStack itemStack) {
- return false;
- }
-}
diff --git a/src/main/java/gregtech/api/gui/GT_Slot_Render.java b/src/main/java/gregtech/api/gui/GT_Slot_Render.java
deleted file mode 100644
index ae03ce83ea..0000000000
--- a/src/main/java/gregtech/api/gui/GT_Slot_Render.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package gregtech.api.gui;
-
-import net.minecraft.inventory.IInventory;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-
-public class GT_Slot_Render extends GT_Slot_Holo {
-
- public GT_Slot_Render(IInventory inventory, int slotIndex, int xPos, int yPos) {
- super(inventory, slotIndex, xPos, yPos, false, false, 0);
- }
-
- /**
- * NEI has a nice and "useful" Delete-All Function, which would delete the Content of this Slot. This is here to
- * prevent that.
- */
- @Override
- public void putStack(ItemStack aStack) {
- if (inventory instanceof TileEntity && ((TileEntity) inventory).getWorldObj().isRemote) {
- inventory.setInventorySlotContents(getSlotIndex(), aStack);
- }
- onSlotChanged();
- }
-}
diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java
deleted file mode 100644
index 6f4eb0e2c2..0000000000
--- a/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java
+++ /dev/null
@@ -1,179 +0,0 @@
-package gregtech.api.gui.widgets;
-
-import java.awt.Rectangle;
-import java.util.List;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.inventory.GuiContainer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.StatCollector;
-import net.minecraftforge.common.util.ForgeDirection;
-
-import org.lwjgl.opengl.GL11;
-
-import codechicken.nei.api.API;
-import codechicken.nei.api.INEIGuiAdapter;
-import gregtech.api.enums.GT_Values;
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.net.GT_Packet_GtTileEntityGuiRequest;
-import gregtech.common.GT_Proxy;
-
-/**
- * Let's you access a GregTech IGregTechTileEntity's covers as tabs on the GUI's sides
- */
-public class GT_GuiCoverTabLine extends GT_GuiTabLine {
-
- // Names of the block a cover could be on
- private static final String[] SIDES = new String[] { "GT5U.interface.coverTabs.down", "GT5U.interface.coverTabs.up",
- "GT5U.interface.coverTabs.north", "GT5U.interface.coverTabs.south", "GT5U.interface.coverTabs.west",
- "GT5U.interface.coverTabs.east" };
-
- // Not sure if there's a point in JIT translation but that's what this is
- private final String[] translatedSides;
- private final IGregTechTileEntity tile;
- private final int colorization;
-
- /**
- * Let's you access an IGregTechTileEntity's covers as tabs on the GUI's sides
- *
- * @param gui GT_ITabRenderer gui which this tab line attaches to
- * @param tabLineLeft left position of the tab line in relation to the gui
- * @param tabLineTop top position of the tab line in relation to the gui
- * @param tabHeight height of a tab
- * @param tabWidth width of a tab
- * @param tabSpacing pixels between each tab
- * @param xDir whether to extend the line horizontally to the right (NORMAL), the left (INVERSE) or not at
- * all (NONE)
- * @param yDir whether to extend the line vertically down (NORMAL), up (INVERSE) or not at all (NONE)
- * @param displayMode whether to display on the left side of the GT_ITabRenderer (NORMAL), on it's right side
- * (INVERSE) or not at all (NONE)
- * @param tabBackground the set of textures used to draw this tab line's tab backgrounds
- * @param tile The IGregTechTileEntity the covers of which we are accessing
- * @param colorization The colorization of the GUI we are adding tabs to
- */
- public GT_GuiCoverTabLine(GT_GUIContainerMetaTile_Machine gui, int tabLineLeft, int tabLineTop, int tabHeight,
- int tabWidth, int tabSpacing, DisplayStyle xDir, DisplayStyle yDir, DisplayStyle displayMode,
- GT_GuiTabIconSet tabBackground, IGregTechTileEntity tile, int colorization) {
- super(gui, 6, tabLineLeft, tabLineTop, tabHeight, tabWidth, tabSpacing, xDir, yDir, displayMode, tabBackground);
- this.tile = tile;
- this.colorization = colorization;
- this.translatedSides = new String[6];
- setupTabs();
- }
-
- /**
- * Add a tab for each existing cover on this IGregTechTileEntity at creation time
- */
- private void setupTabs() {
- for (final ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) {
- final ItemStack cover = tile.getCoverItemAtSide(side);
- if (cover != null) {
- addCoverToTabs(side, cover);
- }
- }
- }
-
- @Override
- protected void drawBackground(float parTicks, int mouseX, int mouseY) {
- // Apply this tile's coloration to draw the background
- GL11.glColor3ub(
- (byte) ((colorization >> 16) & 0xFF),
- (byte) ((colorization >> 8) & 0xFF),
- (byte) (colorization & 0xFF));
- super.drawBackground(parTicks, mouseX, mouseY);
- }
-
- @Override
- protected void tabClicked(int tabId, int mouseButton) {
- if (mouseButton == 0 && mTabs[tabId].enabled) {
- GT_Values.NW.sendToServer(
- new GT_Packet_GtTileEntityGuiRequest(
- this.tile.getXCoord(),
- this.tile.getYCoord(),
- this.tile.getZCoord(),
- tabId + GT_Proxy.GUI_ID_COVER_SIDE_BASE,
- this.tile.getWorld().provider.dimensionId,
- Minecraft.getMinecraft().thePlayer.getEntityId(),
- 0));
- }
- }
-
- /**
- * Add the cover on this side of the IGregTechTileEntity to the tabs
- *
- * @param side side to apply the cover to
- * @param cover cover to add
- */
- private void addCoverToTabs(ForgeDirection side, ItemStack cover) {
- final boolean enabled = this.tile.getCoverBehaviorAtSideNew(side)
- .hasCoverGUI();
- final int ordinalSide = side.ordinal();
- this.setTab(ordinalSide, cover, null, getTooltipForCoverTab(side, cover, enabled));
- this.setTabEnabled(ordinalSide, enabled);
- }
-
- /**
- * Decorate the cover's tooltips according to the side it's on and on whether the tab is enabled or not
- *
- * @param side side
- * @param cover cover which tooltip to decorate
- * @param enabled if the tab is enabled
- * @return This cover tab's tooltip
- */
- private String[] getTooltipForCoverTab(ForgeDirection side, ItemStack cover, boolean enabled) {
- final List<String> tooltip = cover.getTooltip(Minecraft.getMinecraft().thePlayer, true);
- tooltip.set(
- 0,
- (enabled ? EnumChatFormatting.UNDERLINE : EnumChatFormatting.DARK_GRAY) + getSideDescription(side)
- + (enabled ? EnumChatFormatting.RESET + ": " : ": " + EnumChatFormatting.RESET)
- + tooltip.get(0));
- return tooltip.toArray(new String[0]);
- }
-
- /**
- * Get the translated name for a side of the IGregTechTileEntity
- *
- * @param side side of the entity
- * @return translated name for a side of the IGregTechTileEntity
- */
- private String getSideDescription(ForgeDirection side) {
- final int ordinalSide = side.ordinal();
- if (ordinalSide < SIDES.length) {
- if (this.translatedSides[ordinalSide] == null) {
- this.translatedSides[ordinalSide] = StatCollector.translateToLocal(SIDES[ordinalSide]);
- }
- return this.translatedSides[ordinalSide];
- }
- return null;
- }
-
- /**
- * Hide any NEI slots that would intersect with a cover tab
- */
- static class CoverTabLineNEIHandler extends INEIGuiAdapter {
-
- @Override
- public boolean hideItemPanelSlot(GuiContainer gui, int x, int y, int w, int h) {
- final Rectangle neiSlotArea = new Rectangle(x, y, w, h);
- if (gui instanceof GT_GUIContainerMetaTile_Machine) {
- final GT_GuiTabLine tabLine = ((GT_GUIContainerMetaTile_Machine) gui).coverTabs;
- if (!tabLine.visible) {
- return false;
- }
- for (int i = 0; i < tabLine.mTabs.length; i++) {
- if (tabLine.mTabs[i] != null && tabLine.mTabs[i].getBounds()
- .intersects(neiSlotArea)) {
- return true;
- }
- }
- }
- return false;
- }
- }
-
- static {
- API.registerNEIGuiHandler(new CoverTabLineNEIHandler());
- }
-}
diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiFakeItemButton.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiFakeItemButton.java
deleted file mode 100644
index 9f4287a65b..0000000000
--- a/src/main/java/gregtech/api/gui/widgets/GT_GuiFakeItemButton.java
+++ /dev/null
@@ -1,162 +0,0 @@
-package gregtech.api.gui.widgets;
-
-import java.awt.Rectangle;
-import java.util.List;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.item.ItemBlock;
-import net.minecraft.item.ItemStack;
-
-import org.lwjgl.opengl.GL11;
-import org.lwjgl.opengl.GL12;
-
-import codechicken.lib.gui.GuiDraw;
-import gregtech.api.interfaces.IGuiScreen;
-import gregtech.api.util.GT_UtilityClient;
-
-public class GT_GuiFakeItemButton implements IGuiScreen.IGuiElement {
-
- private GT_GuiIcon bgIcon;
- private ItemStack item;
- private final IGuiScreen gui;
- private int xPosition, yPosition;
- private List<String> itemTooltips;
- private final GT_GuiTooltip tooltip = new GT_GuiTooltip(null) {
-
- @Override
- public List<String> getToolTipText() {
- return itemTooltips;
- }
-
- @Override
- public boolean isDelayed() {
- return false;
- }
-
- @Override
- public Rectangle getBounds() {
- return GT_GuiFakeItemButton.this.getBounds();
- }
- };
- private final Rectangle rectangle;
- private boolean mimicSlot;
-
- public GT_GuiFakeItemButton(IGuiScreen gui, int x, int y, GT_GuiIcon bgIcon) {
- this.gui = gui;
- this.bgIcon = bgIcon;
- item = null;
- rectangle = new Rectangle(x, y, 18, 18);
- gui.addElement(this);
- }
-
- public GT_GuiFakeItemButton setItem(ItemStack i) {
- item = i;
- if (getMimicSlot()) updateTooltip();
- return this;
- }
-
- private void updateTooltip() {
- itemTooltips = item == null ? null : GT_UtilityClient.getTooltip(item, true);
- }
-
- public ItemStack getItem() {
- return item;
- }
-
- public GT_GuiFakeItemButton setMimicSlot(boolean mimicSlot) {
- if (mimicSlot != this.mimicSlot) {
- if (mimicSlot) {
- updateTooltip();
- gui.addToolTip(tooltip);
- } else {
- gui.removeToolTip(tooltip);
- }
- this.mimicSlot = mimicSlot;
- }
- return this;
- }
-
- public boolean getMimicSlot() {
- return mimicSlot;
- }
-
- public GT_GuiIcon getBgIcon() {
- return bgIcon;
- }
-
- public GT_GuiFakeItemButton setBgIcon(GT_GuiIcon bgIcon) {
- this.bgIcon = bgIcon;
- return this;
- }
-
- @Override
- public void onInit() {
- xPosition = rectangle.x + gui.getGuiLeft();
- yPosition = rectangle.y + gui.getGuiTop();
- }
-
- @Override
- public void onRemoved() {
- if (mimicSlot) gui.removeToolTip(tooltip);
- }
-
- @Override
- public void draw(int mouseX, int mouseY, float parTicks) {
- GL11.glColor4f(1, 1, 1, 1);
- GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
- GL11.glEnable(GL11.GL_BLEND);
- GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
-
- if (bgIcon != null) {
- GT_GuiIcon.render(bgIcon, xPosition - 1, yPosition - 1, 18, 18, 0, true);
- }
-
- if (item != null) {
- if (item.getItem() instanceof ItemBlock) {
- GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
- GL11.glEnable(GL12.GL_RESCALE_NORMAL);
- }
- gui.getItemRenderer()
- .renderItemAndEffectIntoGUI(
- gui.getFontRenderer(),
- Minecraft.getMinecraft()
- .getTextureManager(),
- item,
- xPosition,
- yPosition);
-
- if (item.getItem() instanceof ItemBlock) GL11.glPopAttrib();
- }
-
- if (getMimicSlot()) if (getBounds().contains(mouseX - gui.getGuiLeft(), mouseY - gui.getGuiTop())) {
- GL11.glDisable(GL11.GL_LIGHTING);
- GL11.glDisable(GL11.GL_DEPTH_TEST);
- GL11.glColorMask(true, true, true, false);
- GuiDraw.drawGradientRect(xPosition, yPosition, 16, 16, 0x80ffffff, 0x80ffffff);
- GL11.glColorMask(true, true, true, true);
- // no glEnable, state will be recovered by glPopAttrib
- }
-
- GL11.glPopAttrib();
- }
-
- public Rectangle getBounds() {
- return rectangle;
- }
-
- public void setX(int x) {
- rectangle.x = x;
- }
-
- public void setY(int y) {
- rectangle.y = y;
- }
-
- public void setWidth(int width) {
- rectangle.width = width;
- }
-
- public void setHeight(int height) {
- rectangle.height = height;
- }
-}
diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiIcon.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiIcon.java
deleted file mode 100644
index 66ab27356e..0000000000
--- a/src/main/java/gregtech/api/gui/widgets/GT_GuiIcon.java
+++ /dev/null
@@ -1,157 +0,0 @@
-package gregtech.api.gui.widgets;
-
-import static gregtech.api.enums.Mods.GregTech;
-
-import java.util.Arrays;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.util.ResourceLocation;
-
-import gregtech.api.interfaces.IGuiIcon;
-
-public enum GT_GuiIcon implements IGuiIcon {
-
- BUTTON_NORMAL(0, 0, 0),
- BUTTON_DOWN(0, 32, 0),
- BUTTON_HIGHLIGHT(0, 32 * 2, 0),
- BUTTON_HIGHLIGHT_DOWN(0, 32 * 3, 0),
- BUTTON_DISABLED(0, 32 * 4, 0),
-
- DISABLE(0, 0, 32),
- REDSTONE_OFF(0, 32, 32),
- REDSTONE_ON(0, 32 * 2, 32),
- CHECKMARK(0, 32 * 3, 32),
- CROSS(0, 32 * 4, 32),
- WHITELIST(0, 32 * 5, 32),
- BLACKLIST(0, 32 * 6, 32),
- PROGRESS(0, 32 * 7, 32),
-
- EXPORT(0, 0, 32 * 2),
- IMPORT(0, 32, 32 * 2),
- ALLOW_INPUT(0, 32 * 2, 32 * 2),
- BLOCK_INPUT(0, 32 * 3, 32 * 2),
- GREEN_ARROW_UP(0, 32 * 4, 32 * 2),
- GREEN_ARROW_DOWN(0, 32 * 5, 32 * 2),
- CYCLIC(0, 32 * 6, 32 * 2),
-
- AND_GATE(0, 0, 32 * 3),
- NAND_GATE(0, 32, 32 * 3),
- OR_GATE(0, 32 * 2, 32 * 3),
- NOR_GATE(0, 32 * 3, 32 * 3),
- ANALOG_MODE(0, 32 * 4, 32 * 3),
-
- SLOT_DARKGRAY(1, 176, 0, 18, 18),
- SLOT_GRAY(1, 176, 18, 18, 18),
-
- TAB_NORMAL(2, 0, 0, 18, 20),
- TAB_HIGHLIGHT(2, 18, 0, 18, 20),
- TAB_DISABLED(2, 18 * 2, 0, 18, 20),
- TAB_NORMAL_BRONZE(2, 0, 20, 18, 20),
- TAB_HIGHLIGHT_BRONZE(2, 18, 20, 18, 20),
- TAB_DISABLED_BRONZE(2, 18 * 2, 20, 18, 20),
- TAB_NORMAL_STEEL(2, 0, 2 * 20, 18, 20),
- TAB_HIGHLIGHT_STEEL(2, 18, 2 * 20, 18, 20),
- TAB_DISABLED_STEEL(2, 18 * 2, 2 * 20, 18, 20),
- TAB_NORMAL_BRICK(2, 0, 3 * 20, 18, 20),
- TAB_HIGHLIGHT_BRICK(2, 18, 3 * 20, 18, 20),
- TAB_DISABLED_BRICK(2, 18 * 2, 3 * 20, 18, 20),
- TAB_INFO_GRAY(2, 220, 0, 18, 20),
- TAB_INFO_BLUE(2, 220 + 18, 0, 18, 20),;
-
- private static final int T_SIZE = 256;
- private static ResourceLocation[] TEXTURES = { new ResourceLocation(GregTech.ID, "textures/gui/GuiButtons.png"),
- new ResourceLocation(GregTech.ID, "textures/gui/GuiCover.png"),
- new ResourceLocation(GregTech.ID, "textures/gui/GuiTabs.png"), };
-
- public final int x, y, width, height;
- public final IGuiIcon overlay;
- private final int texID;
-
- GT_GuiIcon(int texID, int x, int y, int width, int height, IGuiIcon overlay) {
- this.x = x;
- this.y = y;
- this.width = width;
- this.height = height;
- this.overlay = overlay;
- this.texID = texID;
- }
-
- GT_GuiIcon(int texID, int x, int y) {
- this(texID, x, y, 32, 32, null);
- }
-
- GT_GuiIcon(int texID, int x, int y, int width, int height) {
- this(texID, x, y, width, height, null);
- }
-
- public static void render(IGuiIcon icon, double x, double y, double width, double height, double zLevel,
- boolean doDraw) {
- render(icon, x, y, width, height, zLevel, doDraw, false);
- }
-
- public static void render(IGuiIcon icon, double x, double y, double width, double height, double zLevel,
- boolean doDraw, boolean flipHoritontally) {
- Tessellator tess = Tessellator.instance;
- if (doDraw) {
- Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURES[icon.getTexId()]);
- tess.startDrawingQuads();
- }
- double minU = (double) (icon.getX() + (flipHoritontally ? icon.getWidth() : 0)) / T_SIZE;
- double maxU = (double) (icon.getX() + (flipHoritontally ? 0 : icon.getWidth())) / T_SIZE;
- double minV = (double) icon.getY() / T_SIZE;
- double maxV = (double) (icon.getY() + icon.getHeight()) / T_SIZE;
- tess.addVertexWithUV(x, y + height, zLevel, minU, maxV);
- tess.addVertexWithUV(x + width, y + height, zLevel, maxU, maxV);
- tess.addVertexWithUV(x + width, y + 0, zLevel, maxU, minV);
- tess.addVertexWithUV(x, y + 0, zLevel, minU, minV);
-
- if (icon.getOverlay() != null) render(icon.getOverlay(), x, y, width, height, zLevel, false);
-
- if (doDraw) tess.draw();
- }
-
- /**
- * This is intended to enable addon mods to register additional textures. They can then add to this enum using
- * EnumHelper.addEnum or by creating their enum that implements IGuiIcon (still requires adding a texture here)
- *
- * @param location location of the texture to add
- */
- public static void addTextures(ResourceLocation... location) {
- if (location == null || location.length == 0) return;
-
- int startIndex = TEXTURES.length;
- TEXTURES = Arrays.copyOf(TEXTURES, location.length);
- System.arraycopy(location, 0, TEXTURES, startIndex, location.length);
- }
-
- @Override
- public int getX() {
- return this.x;
- }
-
- @Override
- public int getY() {
- return this.y;
- }
-
- @Override
- public int getWidth() {
- return this.width;
- }
-
- @Override
- public int getHeight() {
- return this.height;
- }
-
- @Override
- public int getTexId() {
- return this.texID;
- }
-
- @Override
- public IGuiIcon getOverlay() {
- return this.overlay;
- }
-}
diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiIconButton.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiIconButton.java
deleted file mode 100644
index d4bfe31404..0000000000
--- a/src/main/java/gregtech/api/gui/widgets/GT_GuiIconButton.java
+++ /dev/null
@@ -1,114 +0,0 @@
-package gregtech.api.gui.widgets;
-
-import java.awt.Rectangle;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.GuiButton;
-
-import org.lwjgl.opengl.GL11;
-
-import gregtech.api.interfaces.IGuiScreen;
-
-public class GT_GuiIconButton extends GuiButton implements IGuiScreen.IGuiElement {
-
- public static final int DEFAULT_WIDTH = 16;
- public static final int DEFAULT_HEIGHT = 16;
-
- protected GT_GuiIcon icon;
- private final int x0;
- private final int y0;
- protected final IGuiScreen gui;
-
- private GT_GuiTooltip tooltip;
-
- public GT_GuiIconButton(IGuiScreen gui, int id, int x, int y, GT_GuiIcon icon) {
- super(id, x, y, DEFAULT_WIDTH, DEFAULT_HEIGHT, "");
- this.gui = gui;
- this.icon = icon;
- this.x0 = x;
- this.y0 = y;
- gui.addElement(this);
- }
-
- @Override
- public void onInit() {
- if (tooltip != null) gui.addToolTip(tooltip);
- xPosition = x0 + gui.getGuiLeft();
- yPosition = y0 + gui.getGuiTop();
- }
-
- @Override
- public void draw(int mouseX, int mouseY, float parTicks) {
- drawButton(Minecraft.getMinecraft(), mouseX, mouseY);
- }
-
- @Override
- public void drawButton(Minecraft mc, int mouseX, int mouseY) {
- if (this.tooltip != null) this.tooltip.enabled = true;
-
- if (this.visible) {
- // moused over
- this.field_146123_n = mouseX >= this.xPosition && mouseY >= this.yPosition
- && mouseX < this.xPosition + width
- && mouseY < this.yPosition + height;
-
- mouseDragged(mc, mouseX, mouseY);
-
- GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
- GL11.glEnable(GL11.GL_BLEND);
- GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
-
- int x = xPosition;
- int y = yPosition;
- if (!this.field_146123_n) {
- // GL11.glColor4f(200F/255F, 210F/255F, 1, 1);
- } else GL11.glColor4f(1, 1, 1, 1);
-
- GT_GuiIcon.render(getButtonTexture(this.field_146123_n), x, y, width, height, 0, true);
-
- GL11.glColor4f(1, 1, 1, 1);
- if (icon != null) {
- GT_GuiIcon.render(icon, x, y, width, height, 0, true);
- }
-
- GL11.glPopAttrib();
- }
- }
-
- @Override
- public void mouseReleased(int mouseX, int mouseY) {
- this.gui.clearSelectedButton();
- if (mousePressed(Minecraft.getMinecraft(), mouseX, mouseY)) this.gui.buttonClicked(this);
- }
-
- public GT_GuiIcon getButtonTexture(boolean mouseOver) {
- if (!enabled) return GT_GuiIcon.BUTTON_DISABLED;
- if (this.equals(this.gui.getSelectedButton()))
- return mouseOver ? GT_GuiIcon.BUTTON_HIGHLIGHT_DOWN : GT_GuiIcon.BUTTON_DOWN;
-
- return mouseOver ? GT_GuiIcon.BUTTON_HIGHLIGHT : GT_GuiIcon.BUTTON_NORMAL;
- }
-
- public GT_GuiIcon getIcon() {
- return icon;
- }
-
- public GT_GuiIconButton setIcon(GT_GuiIcon icon) {
- this.icon = icon;
- return this;
- }
-
- public GT_GuiTooltip getTooltip() {
- return tooltip;
- }
-
- public GT_GuiIconButton setTooltipText(String... text) {
- if (tooltip == null) tooltip = new GT_GuiTooltip(getBounds(), text);
- else tooltip.setToolTipText(text);
- return this;
- }
-
- public Rectangle getBounds() {
- return new Rectangle(x0, y0, width, height);
- }
-}
diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiIconCheckButton.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiIconCheckButton.java
deleted file mode 100644
index 5b5007fef3..0000000000
--- a/src/main/java/gregtech/api/gui/widgets/GT_GuiIconCheckButton.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package gregtech.api.gui.widgets;
-
-import gregtech.api.interfaces.IGuiScreen;
-
-public class GT_GuiIconCheckButton extends GT_GuiIconButton {
-
- private final GT_GuiIcon checkedIcon;
- private final GT_GuiIcon normalIcon;
- private final String checkedTooltip;
- private final String normalTooltip;
- private boolean checked = false;
-
- public GT_GuiIconCheckButton(IGuiScreen gui, int id, int x, int y, GT_GuiIcon checkedIcon, GT_GuiIcon normalIcon) {
- this(gui, id, x, y, checkedIcon, normalIcon, null, null);
- }
-
- public GT_GuiIconCheckButton(IGuiScreen gui, int id, int x, int y, GT_GuiIcon checkedIcon, GT_GuiIcon normalIcon,
- String checkedTooltip, String normalTooltip) {
- super(gui, id, x, y, normalIcon);
- this.checkedIcon = checkedIcon;
- this.normalIcon = normalIcon;
- this.checkedTooltip = checkedTooltip;
- this.normalTooltip = normalTooltip;
- }
-
- @Override
- public GT_GuiIcon getButtonTexture(boolean mouseOver) {
- if (!enabled) return GT_GuiIcon.BUTTON_DISABLED;
- if (this.equals(super.gui.getSelectedButton()))
- return mouseOver ? GT_GuiIcon.BUTTON_HIGHLIGHT_DOWN : GT_GuiIcon.BUTTON_DOWN;
- return mouseOver ? GT_GuiIcon.BUTTON_HIGHLIGHT : GT_GuiIcon.BUTTON_NORMAL;
- }
-
- public boolean isChecked() {
- return checked;
- }
-
- public void setChecked(boolean checked) {
- super.setIcon(checked ? checkedIcon : normalIcon);
- super.setTooltipText(checked ? checkedTooltip : normalTooltip);
- this.checked = checked;
- }
-}
diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java
deleted file mode 100644
index 2d3c7374bd..0000000000
--- a/src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package gregtech.api.gui.widgets;
-
-import java.awt.Rectangle;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.GuiTextField;
-
-import gregtech.api.interfaces.IGuiScreen;
-
-public class GT_GuiIntegerTextBox extends GuiTextField implements IGuiScreen.IGuiElement {
-
- private final int x0, y0;
- private final IGuiScreen gui;
- public final int id;
- private boolean enabled;
-
- public GT_GuiIntegerTextBox(IGuiScreen gui, int id, int x, int y, int width, int height) {
- super(Minecraft.getMinecraft().fontRenderer, x, y, width, height);
- super.setText("");
- this.id = id;
- x0 = x;
- y0 = y;
- this.gui = gui;
- enabled = true;
- gui.addElement(this);
- }
-
- @Override
- public void onInit() {
- xPosition = x0 + gui.getGuiLeft();
- yPosition = y0 + gui.getGuiTop();
- }
-
- @Override
- public void draw(int mouseX, int mouseY, float parTicks) {
- super.drawTextBox();
- }
-
- public Rectangle getBounds() {
- return new Rectangle(x0, y0, width, height);
- }
-
- public boolean validChar(char c, int key) {
- return Character.isDigit(c);
- }
-
- @Override
- public boolean textboxKeyTyped(char c, int key) {
- if (validChar(c, key) || c == 1
- || c == 3
- || c == 22
- || c == 24
- || key == 14
- || key == 199
- || key == 203
- || key == 205
- || key == 207
- || key == 211) {
- return super.textboxKeyTyped(c, key);
- }
- return false;
- }
-
- @Override
- public void setEnabled(boolean p_146184_1_) {
- super.setEnabled(p_146184_1_);
- enabled = p_146184_1_;
- }
-
- public boolean isEnabled() {
- return enabled;
- }
-}
diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiSlotTooltip.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiSlotTooltip.java
deleted file mode 100644
index 015c8c7697..0000000000
--- a/src/main/java/gregtech/api/gui/widgets/GT_GuiSlotTooltip.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package gregtech.api.gui.widgets;
-
-import java.awt.Rectangle;
-
-import net.minecraft.inventory.Slot;
-
-import gregtech.api.util.GT_TooltipDataCache.TooltipData;
-
-public class GT_GuiSlotTooltip extends GT_GuiTooltip {
-
- private final Slot slot;
-
- public GT_GuiSlotTooltip(Slot slot, TooltipData data) {
- super(new Rectangle(slot.xDisplayPosition - 1, slot.yDisplayPosition - 1, 18, 18), data);
- this.slot = slot;
- }
-
- @Override
- protected void onTick() {
- super.onTick();
- // If disabled by super, stay disabled.
- this.enabled = this.enabled && this.slot.getStack() == null;
- }
-}
diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiSmartTooltip.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiSmartTooltip.java
deleted file mode 100644
index ffae5c30e6..0000000000
--- a/src/main/java/gregtech/api/gui/widgets/GT_GuiSmartTooltip.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package gregtech.api.gui.widgets;
-
-import java.awt.Rectangle;
-
-import gregtech.api.util.GT_TooltipDataCache.TooltipData;
-
-public class GT_GuiSmartTooltip extends GT_GuiTooltip {
-
- public interface TooltipVisibilityProvider {
-
- boolean shouldShowTooltip();
- }
-
- private final TooltipVisibilityProvider visibilityProvider;
-
- public GT_GuiSmartTooltip(Rectangle bounds, TooltipVisibilityProvider visibilityProvider, TooltipData data) {
- super(bounds, data);
- this.visibilityProvider = visibilityProvider;
- }
-
- @Override
- protected void onTick() {
- super.onTick();
- // If disabled by super, stay disabled.
- this.enabled = this.enabled && this.visibilityProvider.shouldShowTooltip();
- }
-}
diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiTab.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiTab.java
deleted file mode 100644
index d06c2bd2eb..0000000000
--- a/src/main/java/gregtech/api/gui/widgets/GT_GuiTab.java
+++ /dev/null
@@ -1,174 +0,0 @@
-package gregtech.api.gui.widgets;
-
-import java.awt.Rectangle;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.item.ItemBlock;
-import net.minecraft.item.ItemStack;
-
-import org.lwjgl.opengl.GL11;
-import org.lwjgl.opengl.GL12;
-
-import gregtech.api.gui.widgets.GT_GuiTabLine.GT_GuiTabIconSet;
-import gregtech.api.gui.widgets.GT_GuiTabLine.GT_ITabRenderer;
-import gregtech.api.interfaces.IGuiIcon;
-
-/**
- * A tab to be attached to a tab line
- */
-public class GT_GuiTab {
-
- private static final int SLOT_SIZE = 18;
-
- public boolean visible = true, mousedOver, enabled = true;
-
- private Rectangle bounds;
- private final GT_GuiTabIconSet tabBackground;
- private final ItemStack item;
- private final GT_ITabRenderer gui;
- private GT_GuiTooltip tooltip;
- private final IGuiIcon overlay;
- private final boolean flipHorizontally;
-
- /**
- * A tab to be attached to a tab line
- *
- * @param gui IGregTechTileEntity the tab line this tab belongs to is attached to
- * @param id both the ID and position in the tab line of this tab. Not used, kept for compatibility.
- * @param bounds bounds of this tab
- * @param tabBackground set of background textures
- * @param item item to draw atop the background texture, not colored
- * @param overlay texture to draw atop the background texture, not colored
- * @param tooltipText tooltip of this tab
- * @param flipHorizontally whether to draw this tab on the right side of the IGregTechTileEntity
- */
- public GT_GuiTab(GT_ITabRenderer gui, int id, Rectangle bounds, GT_GuiTabIconSet tabBackground, ItemStack item,
- IGuiIcon overlay, String[] tooltipText, boolean flipHorizontally) {
- this.gui = gui;
- this.bounds = bounds;
- this.item = item;
- this.tabBackground = tabBackground;
- this.overlay = overlay;
- if (tooltipText != null) {
- setTooltipText(tooltipText);
- }
- this.flipHorizontally = flipHorizontally;
- }
-
- public GT_GuiTab(GT_ITabRenderer gui, int id, Rectangle bounds, GT_GuiTabIconSet tabBackground) {
- this(gui, id, bounds, tabBackground, null, null, null, false);
- }
-
- /**
- * Set this tab's tooltip text
- *
- * @param text text to set
- * @return This tab for chaining
- */
- public GT_GuiTab setTooltipText(String... text) {
- if (tooltip == null) {
- tooltip = new GT_GuiTooltip(bounds, text);
- gui.addToolTip(tooltip);
- } else {
- tooltip.setToolTipText(text);
- }
- return this;
- }
-
- /**
- * @return This tab's tooltip object
- */
- public GT_GuiTooltip getTooltip() {
- return tooltip;
- }
-
- /**
- * Draw the background texture for this tab
- *
- * @param mouseX not used, likely kept for backward compatibility
- * @param mouseY not used, likely kept for backward compatibility
- * @param parTicks not used, likely kept for backward compatibility
- */
- public void drawBackground(int mouseX, int mouseY, float parTicks) {
- if (this.visible) {
- GT_GuiIcon.render(
- getBackgroundTexture(),
- bounds.x,
- bounds.y,
- bounds.width,
- bounds.height,
- 1,
- true,
- this.flipHorizontally);
- }
- }
-
- /**
- * Draw overlay textures and items atop the background texture
- *
- * @param mouseX X mouse coordinate
- * @param mouseY Y mouse coordinate
- * @param parTicks not used, likely kept for backward compatibility
- */
- public void drawOverlays(int mouseX, int mouseY, float parTicks) {
- this.mousedOver = bounds.contains(mouseX, mouseY);
-
- if (this.tooltip != null) {
- this.tooltip.enabled = this.visible;
- }
-
- if (this.visible) {
- if (overlay != null) {
- GL11.glColor4f(1, 1, 1, 1);
- GT_GuiIcon.render(overlay, bounds.x, bounds.y, bounds.width, bounds.height, 1, true);
- }
- if (item != null) {
- GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
-
- if (item.getItem() instanceof ItemBlock) {
- GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
- GL11.glEnable(GL12.GL_RESCALE_NORMAL);
- }
- int margin = (bounds.height - SLOT_SIZE);
- gui.getItemRenderer()
- .renderItemAndEffectIntoGUI(
- gui.getFontRenderer(),
- Minecraft.getMinecraft()
- .getTextureManager(),
- item,
- bounds.x + (this.flipHorizontally ? 0 : margin),
- bounds.y + margin);
-
- if (item.getItem() instanceof ItemBlock) GL11.glPopAttrib();
-
- GL11.glPopAttrib();
- }
- }
- }
-
- /**
- * @return the texture this tab should currently use as it's background
- */
- protected IGuiIcon getBackgroundTexture() {
- if (!enabled) return tabBackground.disabled;
-
- return mousedOver ? tabBackground.highlight : tabBackground.normal;
- }
-
- /**
- * @return the screen space occupied by this tab
- */
- public Rectangle getBounds() {
- return this.bounds;
- }
-
- /**
- * Reposition this tab on the screen
- *
- * @param xPos X tab coordinate
- * @param yPos Y tab coordinate
- */
- public void setPosition(int xPos, int yPos) {
- this.bounds = new Rectangle(xPos, yPos, bounds.width, bounds.height);
- }
-}
diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiTabLine.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiTabLine.java
deleted file mode 100644
index 950478cdfa..0000000000
--- a/src/main/java/gregtech/api/gui/widgets/GT_GuiTabLine.java
+++ /dev/null
@@ -1,274 +0,0 @@
-package gregtech.api.gui.widgets;
-
-import java.awt.Rectangle;
-
-import net.minecraft.client.gui.FontRenderer;
-import net.minecraft.client.renderer.entity.RenderItem;
-import net.minecraft.item.ItemStack;
-
-import org.lwjgl.opengl.GL11;
-
-import gregtech.api.interfaces.IGuiIcon;
-
-/**
- * Draws clickable and configurable tabs on the left or right side of another GUI
- */
-public class GT_GuiTabLine {
-
- /**
- * Defines a set of textures a tab line can use to render it's tab backgrounds
- */
- public static class GT_GuiTabIconSet {
-
- public IGuiIcon disabled;
- public IGuiIcon normal;
- public IGuiIcon highlight;
-
- public GT_GuiTabIconSet(IGuiIcon normalIcon, IGuiIcon highlightIcon, IGuiIcon disabledIcon) {
- this.normal = normalIcon;
- this.highlight = highlightIcon;
- this.disabled = disabledIcon;
- }
- }
-
- /**
- * Controls the rendering style of the tab line
- */
- public enum DisplayStyle {
-
- NONE((byte) 0),
- NORMAL((byte) 1),
- INVERSE((byte) -1);
-
- private final byte value;
-
- DisplayStyle(byte value) {
- this.value = value;
- }
-
- public byte getValue() {
- return value;
- }
- }
-
- /**
- * A GUI should implement these methods as well as call the tab line's onMouseClicked, onInit and drawTabs for the
- * tab line to attach to it properly.
- */
- public interface GT_ITabRenderer {
-
- int getGuiLeft();
-
- int getGuiTop();
-
- int getXSize();
-
- RenderItem getItemRenderer();
-
- FontRenderer getFontRenderer();
-
- void addToolTip(GT_GuiTooltip tooltip);
-
- boolean removeToolTip(GT_GuiTooltip tooltip);
- }
-
- // The tabs are arranged according to their index in this array
- protected final GT_GuiTab[] mTabs;
-
- private final int tabLineLeft;
- private final int tabLineTop;
- private final int tabHeight;
- private final int tabWidth;
- private final int tabSpacing;
-
- // In which direction to draw the tab line
- private final DisplayStyle xDir;
- private final DisplayStyle yDir;
-
- // Whether to display on the right side of the GT_ITabRenderer instead of left
- protected final boolean flipHorizontally;
- protected final boolean visible;
-
- private final GT_GuiTabIconSet tabBackground;
- private final GT_ITabRenderer gui;
-
- /**
- * Draws clickable and configurable tabs on the left or right side of a GT_ITabRenderer
- *
- * @param gui GT_ITabRenderer gui which this tab line attaches to
- * @param numTabs number of tab positions in this tab line
- * @param tabLineLeft left position of the tab line in relation to the gui
- * @param tabLineTop top position of the tab line in relation to the gui
- * @param tabHeight height of a tab
- * @param tabWidth width of a tab
- * @param tabSpacing pixels between each tab
- * @param xDir whether to extend the line horizontally to the right (NORMAL), the left (INVERSE) or not at
- * all (NONE)
- * @param yDir whether to extend the line vertically down (NORMAL), up (INVERSE) or not at all (NONE)
- * @param displayMode whether to display on the left side of the GT_ITabRenderer (NORMAL), on it's right side
- * (INVERSE) or not at all (NONE)
- * @param tabBackground the set of textures used to draw this tab line's tab backgrounds
- */
- public GT_GuiTabLine(GT_ITabRenderer gui, int numTabs, int tabLineLeft, int tabLineTop, int tabHeight, int tabWidth,
- int tabSpacing, DisplayStyle xDir, DisplayStyle yDir, DisplayStyle displayMode,
- GT_GuiTabIconSet tabBackground) {
- this.gui = gui;
- this.mTabs = new GT_GuiTab[numTabs];
- this.tabLineLeft = tabLineLeft;
- this.tabLineTop = tabLineTop;
- this.tabHeight = tabHeight;
- this.tabWidth = tabWidth;
- this.tabSpacing = tabSpacing;
- this.xDir = xDir;
- this.yDir = yDir;
- this.tabBackground = tabBackground;
- this.flipHorizontally = displayMode == DisplayStyle.INVERSE;
- this.visible = !(displayMode == DisplayStyle.NONE);
- }
-
- /**
- * Creates a new tab at the specified position with the given parameters. This class handles the positioning.
- *
- * @param tabId tab ID
- * @param item item to draw atop the background texture, not colored
- * @param overlay texture to draw atop the background texture, not colored
- * @param text tooltip of this tab
- */
- public void setTab(int tabId, ItemStack item, IGuiIcon overlay, String[] text) {
- mTabs[tabId] = new GT_GuiTab(
- this.gui,
- tabId,
- getBoundsForTab(tabId),
- this.tabBackground,
- item,
- overlay,
- text,
- this.flipHorizontally);
- }
-
- /**
- * Get the bounds a given tab should occupy
- *
- * @param tabId tab ID
- * @return tab bounds
- */
- protected Rectangle getBoundsForTab(int tabId) {
- return new Rectangle(getTabX(tabId), getTabY(tabId), this.tabWidth, this.tabHeight);
- }
-
- /**
- * Enable or disable a tab. Disabled tabs have a dark background.
- *
- * @param tabId tab ID
- * @param enable true to enable, false to disable
- */
- public void setTabEnabled(int tabId, boolean enable) {
- if (mTabs[tabId] != null) {
- mTabs[tabId].enabled = enable;
- }
- }
-
- /**
- * Draw the tabs for this tab bar GT_ITabRenderer must call this method on drawGuiContainerBackgroundLayer or on
- * drawScreen.
- *
- * @param parTicks
- */
- public void drawTabs(float parTicks, int mouseX, int mouseY) {
- if (this.visible) {
- GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
- GL11.glEnable(GL11.GL_BLEND);
- GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
- drawBackground(parTicks, mouseX, mouseY);
- drawOverlays(parTicks, mouseX, mouseY);
- GL11.glPopAttrib();
- }
- }
-
- /**
- * Draw the tab's backgrounds first
- *
- * @param parTicks not used, likely kept for compatibility
- * @param mouseX mouse X position
- * @param mouseY mouse Y position
- */
- protected void drawOverlays(float parTicks, int mouseX, int mouseY) {
- for (GT_GuiTab mTab : mTabs) {
- if (mTab != null) {
- mTab.drawOverlays(mouseX, mouseY, parTicks);
- }
- }
- }
-
- /**
- * Draw anything that overlays the tab's background texture
- *
- * @param parTicks not used, likely kept for compatibility
- * @param mouseX mouse X position
- * @param mouseY mouse Y position
- */
- protected void drawBackground(float parTicks, int mouseX, int mouseY) {
- for (GT_GuiTab mTab : mTabs) {
- if (mTab != null) {
- mTab.drawBackground(mouseX, mouseY, parTicks);
- }
- }
- }
-
- /**
- * Call tabClick for every tab that was clicked. GT_ITabRenderer must call this method on mouseClicked.
- *
- * @param mouseX mouse X position
- * @param mouseY mouse Y position
- * @param mouseButton which mouse button was used to click
- */
- public void onMouseClicked(int mouseX, int mouseY, int mouseButton) {
- for (int tabId = 0; tabId < mTabs.length; tabId++) {
- if (mTabs[tabId] != null && mTabs[tabId].getBounds()
- .contains(mouseX, mouseY)) {
- tabClicked(tabId, mouseButton);
- return;
- }
- }
- }
-
- /**
- * Act on a tab being clicked.
- *
- * @param tabId tab ID
- * @param mouseButton which mouse button was used to click
- */
- protected void tabClicked(int tabId, int mouseButton) {}
-
- /**
- * Reposition ourselves whenever the GT_ITabRenderer does so. GT_ITabRenderer must call this method on Init.
- */
- public void onInit() {
- for (int i = 0; i < mTabs.length; i++) {
- if (mTabs[i] != null) {
- mTabs[i].setPosition(getTabX(i), getTabY(i));
- }
- }
- }
-
- /**
- * Get the proper X position for a given tab
- *
- * @param tabId tab ID
- * @return X position of the tab
- */
- private int getTabX(int tabId) {
- return this.gui.getGuiLeft() + (flipHorizontally ? (gui.getXSize() - tabLineLeft - tabWidth) : tabLineLeft)
- + (tabId * (tabWidth + tabSpacing) * xDir.getValue());
- }
-
- /**
- * Get the proper Y position for a given tab
- *
- * @param tabId tab ID
- * @return Y position of the tab
- */
- private int getTabY(int tabId) {
- return this.gui.getGuiTop() + tabLineTop + (tabId * (tabHeight + tabSpacing) * yDir.getValue());
- }
-}
diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltip.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltip.java
deleted file mode 100644
index fe20b2b57a..0000000000
--- a/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltip.java
+++ /dev/null
@@ -1,121 +0,0 @@
-package gregtech.api.gui.widgets;
-
-import java.awt.Rectangle;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.lwjgl.input.Keyboard;
-
-import gregtech.api.util.GT_TooltipDataCache.TooltipData;
-
-public class GT_GuiTooltip {
-
- protected final Rectangle bounds;
- protected TooltipData data;
- private List<String> displayedText;
- public boolean enabled = true;
-
- /**
- * Used to create a tooltip that will appear over the specified bounds. This will initially be a "static" tooltip
- * that doesn't respect verbosity levels or respond to the shift key.
- *
- * @param bounds tooltip bounds
- * @param text tooltip text
- */
- public GT_GuiTooltip(Rectangle bounds, String... text) {
- this.bounds = bounds;
- setToolTipText(text);
- }
-
- /**
- * Used to create a tooltip that will appear over the specified bounds. This will initially be a "dynamic" tooltip
- * that respects verbosity levels and responds to the shift key.
- *
- * @param bounds tooltip bounds
- * @param data tooltip data
- */
- public GT_GuiTooltip(Rectangle bounds, TooltipData data) {
- this.bounds = bounds;
- // Trust that the tooltips have already been formatted and colored, just make sure it has no nulls
- this.data = sanitizeTooltipData(data);
- }
-
- private TooltipData sanitizeTooltipData(TooltipData data) {
- if (data.text == null) {
- data.text = Collections.emptyList();
- }
- if (data.shiftText == null) {
- data.shiftText = Collections.emptyList();
- }
- return data;
- }
-
- /**
- * Called before the tooltip manager checks whether this tooltip is enabled
- */
- protected void onTick() {
- // Switch which of our 2 stored texts we're displaying now.
- this.displayedText = Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) ? this.data.shiftText : this.data.text;
- // If this text is empty, let's not display a tooltip at all.
- this.enabled = this.displayedText.size() != 0;
- }
-
- /**
- * Called once this tooltip has been determined to be enabled
- */
- protected void updateText() {}
-
- /**
- * Used to set a "static" tooltip that doesn't respect verbosity levels or respond to the shift key
- *
- * @param text tooltip text
- */
- public void setToolTipText(String... text) {
- this.data = formatTooltip(text);
- this.displayedText = data.text;
- }
-
- /**
- * Used to set a "dynamic" tooltip that respects verbosity levels and responds to the shift key
- *
- * @param data tooltip data
- */
- public void setToolTipText(TooltipData data) {
- // Trust that the tooltips have already been formatted and colored, just make sure it has no nulls
- this.data = sanitizeTooltipData(data);
- }
-
- /**
- * Apply tooltip colors in case the text doesn't contain them and return as tooltip data
- *
- * @param text text to apply the colors to
- * @return colored tooltip lines as list
- */
- protected TooltipData formatTooltip(String[] text) {
- List<String> list;
- if (text != null) {
- list = new ArrayList<>(text.length);
- for (String s : text) {
- if (s == null) continue;
- if (list.isEmpty()) list.add("\u00a7f" + s);
- else list.add("\u00a77" + s);
- }
- } else {
- list = Collections.emptyList();
- }
- return new TooltipData(list, list);
- }
-
- public List<String> getToolTipText() {
- return this.displayedText;
- }
-
- public Rectangle getBounds() {
- return bounds;
- }
-
- public boolean isDelayed() {
- return true;
- }
-}
diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltipManager.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltipManager.java
deleted file mode 100644
index 4304ca14fc..0000000000
--- a/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltipManager.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package gregtech.api.gui.widgets;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import net.minecraft.client.gui.FontRenderer;
-
-public class GT_GuiTooltipManager {
-
- public interface GT_IToolTipRenderer {
-
- int getGuiLeft();
-
- int getGuiTop();
-
- int getXSize();
-
- FontRenderer getFontRenderer();
-
- void drawHoveringText(List<String> text, int mouseX, int mouseY, FontRenderer font);
- }
-
- private static final long DELAY = 5;
- private int mouseStopped;
- private int lastMouseX = -1;
- private int lastMouseY = -1;
- private final List<GT_GuiTooltip> tips = new ArrayList<>();
-
- public void addToolTip(GT_GuiTooltip tip) {
- if (tip != null && !tips.contains(tip)) tips.add(tip);
- }
-
- public boolean removeToolTip(GT_GuiTooltip tip) {
- return tips.remove(tip);
- }
-
- public final void onTick(GT_IToolTipRenderer render, int mouseX, int mouseY) {
- if ((Math.abs(mouseX - lastMouseX) < 2) && (Math.abs(mouseY - lastMouseY) < 2)) {
- mouseStopped = Math.min(mouseStopped + 1, 50);
- } else {
- mouseStopped = 0;
- }
-
- lastMouseX = mouseX;
- lastMouseY = mouseY;
-
- mouseX -= render.getGuiLeft();
- mouseY -= render.getGuiTop();
- for (GT_GuiTooltip tip : tips) {
- // Give the tooltip the opportunity to decide whether they should be enabled
- tip.onTick();
- if (tip.enabled && (!tip.isDelayed() || mouseStopped > DELAY)
- && tip.getBounds()
- .contains(mouseX, mouseY)) {
- tip.updateText();
- drawTooltip(tip, mouseX, mouseY, render);
- break;
- }
- }
- }
-
- private void drawTooltip(GT_GuiTooltip tip, int mouseX, int mouseY, GT_IToolTipRenderer render) {
- List<String> text = tip.getToolTipText();
- if (text == null) return;
-
- if (mouseX > render.getGuiLeft() + render.getXSize() / 2) {
- int maxWidth = 0;
- for (String s : text) {
- int w = render.getFontRenderer()
- .getStringWidth(s);
- if (w > maxWidth) {
- maxWidth = w;
- }
- }
- mouseX -= (maxWidth + 18);
- }
-
- render.drawHoveringText(text, mouseX, mouseY, render.getFontRenderer());
- }
-}
diff --git a/src/main/java/gregtech/api/interfaces/IDragAndDropSupport.java b/src/main/java/gregtech/api/interfaces/IDragAndDropSupport.java
deleted file mode 100644
index b516db5bad..0000000000
--- a/src/main/java/gregtech/api/interfaces/IDragAndDropSupport.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package gregtech.api.interfaces;
-
-import java.util.Collections;
-import java.util.List;
-
-import net.minecraft.client.gui.inventory.GuiContainer;
-import net.minecraft.item.ItemStack;
-
-import codechicken.nei.NEIClientUtils;
-import codechicken.nei.VisiblityData;
-import codechicken.nei.api.INEIGuiHandler;
-import codechicken.nei.api.TaggedInventoryArea;
-import cpw.mods.fml.common.Optional;
-import gregtech.api.enums.Mods;
-
-/**
- * Implement this interface if your GuiContainer supports Drag-And-Drop behavior on NEI.
- */
-@Optional.Interface(modid = Mods.Names.NOT_ENOUGH_ITEMS, iface = "codechicken.nei.api.INEIGuiHandler")
-public interface IDragAndDropSupport extends INEIGuiHandler {
-
- /**
- * Implement this to handle Drag-And-Drop behavior. This may be invoked on normal click too
- * ({@code isGhost==false}), so be careful if your slot supports both Drag-And-Drop and other behaviors e.g. fluid
- * I/O with FluidDisplay click
- *
- * @param gui Current gui instance. Make sure to check if it is an instance of your GuiContainer.
- * @param mousex X position of the mouse
- * @param mousey Y position of the mouse
- * @param draggedStack ItemStack user is holding on cursor
- * @param button 0 = left click, 1 = right click
- * @param isGhost Whether {@code draggedStack} is dragged from ItemPanel/BookmarkPanel, or actual item player
- * holds
- * @return True if success
- */
- boolean handleDragAndDropGT(GuiContainer gui, int mousex, int mousey, ItemStack draggedStack, int button,
- boolean isGhost);
-
- default boolean handleDragNDrop(GuiContainer gui, int mousex, int mousey, ItemStack draggedStack, int button) {
- return handleDragAndDropGT(gui, mousex, mousey, draggedStack, button, NEIClientUtils.getHeldItem() == null);
- }
-
- default VisiblityData modifyVisiblity(GuiContainer gui, VisiblityData currentVisibility) {
- return currentVisibility;
- }
-
- default Iterable<Integer> getItemSpawnSlots(GuiContainer gui, ItemStack item) {
- return Collections.emptyList();
- }
-
- default List<TaggedInventoryArea> getInventoryAreas(GuiContainer gui) {
- return null;
- }
-
- default boolean hideItemPanelSlot(GuiContainer gui, int x, int y, int w, int h) {
- return false;
- }
-}
diff --git a/src/main/java/gregtech/api/interfaces/IFluidAccess.java b/src/main/java/gregtech/api/interfaces/IFluidAccess.java
deleted file mode 100644
index 8fa9b3a3fa..0000000000
--- a/src/main/java/gregtech/api/interfaces/IFluidAccess.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package gregtech.api.interfaces;
-
-import net.minecraftforge.fluids.FluidStack;
-
-public interface IFluidAccess {
-
- void set(FluidStack stack);
-
- FluidStack get();
-
- int getCapacity();
-
- default int getRealCapacity() {
- return getCapacity();
- }
-
- default void addAmount(int amount) {
- if (get() != null) {
- get().amount = Math.min(get().amount + amount, getRealCapacity());
- }
- }
-
- default void verifyFluidStack() {
- if (get() != null && get().amount <= 0) set(null);
- }
-}
diff --git a/src/main/java/gregtech/api/interfaces/IGlobalWirelessEnergy.java b/src/main/java/gregtech/api/interfaces/IGlobalWirelessEnergy.java
deleted file mode 100644
index b931549a07..0000000000
--- a/src/main/java/gregtech/api/interfaces/IGlobalWirelessEnergy.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package gregtech.api.interfaces;
-
-import java.math.BigInteger;
-import java.util.UUID;
-
-import net.minecraft.entity.player.EntityPlayer;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.common.misc.WirelessNetworkManager;
-import gregtech.common.misc.spaceprojects.SpaceProjectManager;
-
-// If you are adding very late-game content feel free to tap into this interface.
-// The eventual goal is to bypass laser/dynamo stuff and have energy deposited directly from ultra-endgame
-// multi-blocks directly into the users network.
-/**
- * Use WirelessNetworkManager instead
- */
-@Deprecated
-public interface IGlobalWirelessEnergy {
-
- // Adds a user to the energy map if they do not already exist. Otherwise, do
- // nothing. Will also check if the user
- // has changed their username and adjust the maps accordingly. This should be
- // called infrequently. Ideally on first
- // tick of a machine being placed only.
-
- default void strongCheckOrAddUser(EntityPlayer user) {
- WirelessNetworkManager.strongCheckOrAddUser(user.getUniqueID());
- }
-
- default void strongCheckOrAddUser(UUID user_uuid, String user_name) {
- WirelessNetworkManager.strongCheckOrAddUser(user_uuid);
- }
-
- default void strongCheckOrAddUser(String user_uuid, String user_name) {
- WirelessNetworkManager.strongCheckOrAddUser(UUID.fromString(user_uuid));
- }
-
- // ------------------------------------------------------------------------------------
- // Add EU to the users global energy. You can enter a negative number to
- // subtract it.
- // If the value goes below 0 it will return false and not perform the operation.
- // BigIntegers have much slower operations than longs/ints. You should call
- // these methods
- // as infrequently as possible and bulk store values to add to the global map.
- default boolean addEUToGlobalEnergyMap(String userUUID, BigInteger EU) {
- return WirelessNetworkManager.addEUToGlobalEnergyMap(UUID.fromString(userUUID), EU);
- }
-
- default boolean addEUToGlobalEnergyMap(UUID user_uuid, BigInteger EU) {
- return addEUToGlobalEnergyMap(user_uuid.toString(), EU);
- }
-
- default boolean addEUToGlobalEnergyMap(UUID user_uuid, long EU) {
- return addEUToGlobalEnergyMap(user_uuid.toString(), BigInteger.valueOf(EU));
- }
-
- default boolean addEUToGlobalEnergyMap(UUID user_uuid, int EU) {
- return addEUToGlobalEnergyMap(user_uuid.toString(), BigInteger.valueOf(EU));
- }
-
- default boolean addEUToGlobalEnergyMap(String user_uuid, long EU) {
- return addEUToGlobalEnergyMap(user_uuid, BigInteger.valueOf(EU));
- }
-
- default boolean addEUToGlobalEnergyMap(String user_uuid, int EU) {
- return addEUToGlobalEnergyMap(user_uuid, BigInteger.valueOf(EU));
- }
-
- // ------------------------------------------------------------------------------------
-
- default BigInteger getUserEU(String user_uuid) {
- return WirelessNetworkManager.getUserEU(UUID.fromString(user_uuid));
- }
-
- // This overwrites the EU in the network. Only use this if you are absolutely
- // sure you know what you are doing.
- default void setUserEU(String user_uuid, BigInteger EU) {
- WirelessNetworkManager.setUserEU(UUID.fromString(user_uuid), EU);
- }
-
- default String GetUsernameFromUUID(String uuid) {
- return SpaceProjectManager.getPlayerNameFromUUID(UUID.fromString(uuid));
- }
-
- default String getUUIDFromUsername(String username) {
- return SpaceProjectManager.getPlayerUUIDFromName(username)
- .toString();
- }
-
- static void clearGlobalEnergyInformationMaps() {
- WirelessNetworkManager.clearGlobalEnergyInformationMaps();
- }
-
- default UUID processInitialSettings(final IGregTechTileEntity machine) {
- return WirelessNetworkManager.processInitialSettings(machine);
- }
-}
diff --git a/src/main/java/gregtech/api/interfaces/IGuiIcon.java b/src/main/java/gregtech/api/interfaces/IGuiIcon.java
deleted file mode 100644
index 0bc7408250..0000000000
--- a/src/main/java/gregtech/api/interfaces/IGuiIcon.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package gregtech.api.interfaces;
-
-/**
- * To allow addons to make use of GT_GuiIcon
- */
-public interface IGuiIcon {
-
- int getX();
-
- int getY();
-
- int getWidth();
-
- int getHeight();
-
- int getTexId();
-
- IGuiIcon getOverlay();
-}
diff --git a/src/main/java/gregtech/api/interfaces/IGuiScreen.java b/src/main/java/gregtech/api/interfaces/IGuiScreen.java
deleted file mode 100644
index c33838fc7f..0000000000
--- a/src/main/java/gregtech/api/interfaces/IGuiScreen.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package gregtech.api.interfaces;
-
-import net.minecraft.client.gui.FontRenderer;
-import net.minecraft.client.gui.GuiButton;
-import net.minecraft.client.renderer.entity.RenderItem;
-
-import gregtech.api.gui.widgets.GT_GuiTooltip;
-
-public interface IGuiScreen {
-
- interface IGuiElement {
-
- void onInit();
-
- default void onRemoved() {}
-
- void draw(int mouseX, int mouseY, float parTicks);
- }
-
- void addToolTip(GT_GuiTooltip toolTip);
-
- boolean removeToolTip(GT_GuiTooltip toolTip);
-
- GuiButton getSelectedButton();
-
- void clearSelectedButton();
-
- void buttonClicked(GuiButton button);
-
- int getGuiLeft();
-
- int getGuiTop();
-
- int getXSize();
-
- int getYSize();
-
- void addElement(IGuiElement element);
-
- boolean removeElement(IGuiElement element);
-
- RenderItem getItemRenderer();
-
- FontRenderer getFontRenderer();
-}
diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java
index 2c222e76a8..946caaa172 100644
--- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java
+++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java
@@ -11,7 +11,6 @@ import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
@@ -199,31 +198,6 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand
boolean isFacingValid(ForgeDirection facing);
/**
- * @return the Server Side Container
- * @deprecated Use ModularUI
- */
- @Deprecated
- default Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @return the Client Side GUI Container
- * @deprecated Use ModularUI
- */
- @Deprecated
- default Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * For back compatibility, you need to override this if this MetaTileEntity uses ModularUI.
- */
- default boolean useModularUI() {
- return false;
- }
-
- /**
* From new ISidedInventory
*/
boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, ItemStack aStack);
diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java b/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java
index 6d81d5c401..b62c3e92cf 100644
--- a/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java
+++ b/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java
@@ -1,7 +1,6 @@
package gregtech.api.interfaces.tileentity;
import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
@@ -137,7 +136,7 @@ public interface IHasWorldObjectAndCoords {
/**
* Sends a Block Event to the Client TileEntity.
- *
+ *
* @param aValue value to sync
*/
void sendBlockEvent(byte aID, byte aValue);
@@ -167,24 +166,4 @@ public interface IHasWorldObjectAndCoords {
* Function of the regular TileEntity
*/
boolean isInvalidTileEntity();
-
- /**
- * Opens the GUI with this ID of this MetaTileEntity
- *
- * @deprecated Use ModularUI
- */
- @Deprecated
- default boolean openGUI(EntityPlayer aPlayer, int aID) {
- return false;
- }
-
- /**
- * Opens the GUI with the ID = 0 of this TileEntity
- *
- * @deprecated Use ModularUI
- */
- @Deprecated
- default boolean openGUI(EntityPlayer aPlayer) {
- return false;
- }
}
diff --git a/src/main/java/gregtech/api/items/GT_Generic_Item.java b/src/main/java/gregtech/api/items/GT_Generic_Item.java
index a1e01c92c7..3fe2083a96 100644
--- a/src/main/java/gregtech/api/items/GT_Generic_Item.java
+++ b/src/main/java/gregtech/api/items/GT_Generic_Item.java
@@ -143,11 +143,6 @@ public class GT_Generic_Item extends Item implements IProjectileItem {
return getContainerItem(aStack) != null;
}
- @Deprecated
- public String trans(String aKey, String aEnglish) {
- return transItem(aKey, aEnglish);
- }
-
public String transItem(String aKey, String aEnglish) {
return GT_LanguageManager.addStringLocalization("Item_DESCRIPTION_Index_" + aKey, aEnglish);
}
diff --git a/src/main/java/gregtech/api/metatileentity/BaseTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseTileEntity.java
index f3c65a1bfe..c2cef8628d 100644
--- a/src/main/java/gregtech/api/metatileentity/BaseTileEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/BaseTileEntity.java
@@ -1,6 +1,5 @@
package gregtech.api.metatileentity;
-import static gregtech.api.enums.GT_Values.GT;
import static gregtech.api.enums.GT_Values.NW;
import java.util.Arrays;
@@ -15,7 +14,6 @@ import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
@@ -187,20 +185,6 @@ public abstract class BaseTileEntity extends TileEntity implements IHasWorldObje
}
@Override
- @Deprecated
- public final boolean openGUI(EntityPlayer player) {
- return openGUI(player, 0);
- }
-
- @Override
- @Deprecated
- public final boolean openGUI(EntityPlayer player, int aID) {
- if (player == null) return false;
- player.openGui(GT, aID, worldObj, xCoord, yCoord, zCoord);
- return true;
- }
-
- @Override
public boolean isInvalidTileEntity() {
return isInvalid();
}
@@ -597,11 +581,6 @@ public abstract class BaseTileEntity extends TileEntity implements IHasWorldObje
return null;
}
- @Deprecated
- public String trans(String aKey, String aEnglish) {
- return GT_Utility.trans(aKey, aEnglish);
- }
-
protected Supplier<Boolean> getValidator() {
return () -> !this.isDead();
}
diff --git a/src/main/java/gregtech/api/metatileentity/CommonMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/CommonMetaTileEntity.java
index d0b7a2e194..c3528d44d7 100644
--- a/src/main/java/gregtech/api/metatileentity/CommonMetaTileEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/CommonMetaTileEntity.java
@@ -234,7 +234,7 @@ public abstract class CommonMetaTileEntity extends CoverableTileEntity
@Override
public boolean useModularUI() {
- return hasValidMetaTileEntity() && getMetaTileEntity().useModularUI();
+ return hasValidMetaTileEntity();
}
@Override
diff --git a/src/main/java/gregtech/api/metatileentity/CoverableTileEntity.java b/src/main/java/gregtech/api/metatileentity/CoverableTileEntity.java
index 4dce0a083e..aa3d70e56b 100644
--- a/src/main/java/gregtech/api/metatileentity/CoverableTileEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/CoverableTileEntity.java
@@ -58,7 +58,6 @@ import gregtech.api.interfaces.tileentity.ICoverable;
import gregtech.api.interfaces.tileentity.IGregtechWailaProvider;
import gregtech.api.net.GT_Packet_RequestCoverData;
import gregtech.api.net.GT_Packet_SendCoverData;
-import gregtech.api.net.GT_Packet_TileEntityCoverGUI;
import gregtech.api.objects.GT_ItemStack;
import gregtech.api.util.GT_CoverBehavior;
import gregtech.api.util.GT_CoverBehaviorBase;
@@ -751,23 +750,8 @@ public abstract class CoverableTileEntity extends BaseTileEntity implements ICov
protected void onTabClicked(Widget.ClickData ignoredClickData, Widget widget, ForgeDirection side) {
if (isClientSide()) return;
- final CoverInfo coverInfo = getCoverInfoAtSide(side);
- if (coverInfo.useModularUI()) {
- widget.getContext()
- .openSyncedWindow(side.ordinal() + COVER_WINDOW_ID_START);
- } else {
- final GT_Packet_TileEntityCoverGUI packet = new GT_Packet_TileEntityCoverGUI(
- coverInfo,
- getWorld().provider.dimensionId,
- widget.getContext()
- .getPlayer()
- .getEntityId(),
- 0);
- GT_Values.NW.sendToPlayer(
- packet,
- (EntityPlayerMP) widget.getContext()
- .getPlayer());
- }
+ widget.getContext()
+ .openSyncedWindow(side.ordinal() + COVER_WINDOW_ID_START);
}
@NotNull
diff --git a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java
index a7e05355a4..a4c5df4efe 100644
--- a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java
@@ -14,7 +14,6 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -747,16 +746,6 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable {
}
@Override
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return null;
- }
-
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return null;
- }
-
- @Override
public float getExplosionResistance(ForgeDirection side) {
return (mConnections & IConnectable.HAS_FOAM) != 0 ? 50.0F : 5.0F;
}
@@ -864,11 +853,6 @@ public abstract class MetaPipeEntity implements IMetaTileEntity, IConnectable {
return "";
}
- @Deprecated
- public String trans(String aKey, String aEnglish) {
- return GT_Utility.trans(aKey, aEnglish);
- }
-
protected boolean connectableColor(TileEntity tTileEntity) {
// Determine if two entities are connectable based on their colorization:
// Uncolored can connect to anything
diff --git a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java
index 0a56f8467f..604c1dfb3b 100644
--- a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java
@@ -12,7 +12,6 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -156,16 +155,6 @@ public abstract class MetaTileEntity implements IMetaTileEntity, ICleanroomRecei
colorOverride = GT_GUIColorOverride.get(getGUITextureSet().getMainBackground().location);
}
- /**
- * This method will only be called on client side
- *
- * @return whether the secondary description should be display. default is false
- */
- @Deprecated
- public boolean isDisplaySecondaryDescription() {
- return false;
- }
-
@Override
public IGregTechTileEntity getBaseMetaTileEntity() {
return mBaseMetaTileEntity;
@@ -1079,24 +1068,6 @@ public abstract class MetaTileEntity implements IMetaTileEntity, ICleanroomRecei
//
}
- /**
- * @deprecated Use ModularUI
- */
- @Deprecated
- @Override
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return null;
- }
-
- /**
- * @deprecated Use ModularUI
- */
- @Deprecated
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return null;
- }
-
@Override
public boolean connectsToItemPipe(ForgeDirection side) {
return false;
@@ -1187,11 +1158,6 @@ public abstract class MetaTileEntity implements IMetaTileEntity, ICleanroomRecei
return false;
}
- @Deprecated
- public String trans(String aKey, String aEnglish) {
- return GT_Utility.trans(aKey, aEnglish);
- }
-
@Override
public boolean hasAlternativeModeText() {
return false;
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java
index 1477f989f8..f5ab88fb45 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java
@@ -75,19 +75,10 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile
public final boolean mInsulated, mCanShock;
public int mTransferredAmperage = 0;
- public long mTransferredVoltage = 0;
- @Deprecated
- public int mTransferredAmperageLast20 = 0, mTransferredAmperageLast20OK = 0, mTransferredAmperageOK = 0;
- @Deprecated
- public long mTransferredVoltageLast20 = 0, mTransferredVoltageLast20OK = 0, mTransferredVoltageOK = 0;
-
- public long mRestRF;
public int mOverheat;
public static short mMaxOverheat = (short) (GT_Mod.gregtechproxy.mWireHeatingTicks * 100);
- private long lastWorldTick;
-
public GT_MetaPipeEntity_Cable(int aID, String aName, String aNameRegional, float aThickNess, Materials aMaterial,
long aCableLossPerMeter, long aAmperage, long aVoltage, boolean aInsulated, boolean aCanShock) {
super(aID, aName, aNameRegional, 0);
@@ -268,17 +259,6 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile
}
@Override
- public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) {
- if (aBaseMetaTileEntity.isServerSide()) {
- lastWorldTick = aBaseMetaTileEntity.getWorld()
- .getTotalWorldTime() - 1;
- // sets initial value -1 since it is
- // in the same tick as first on post
- // tick
- }
- }
-
- @Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
super.onPostTick(aBaseMetaTileEntity, aTick);
if (aTick % 20 == 0 && aBaseMetaTileEntity.isServerSide()
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java
index f604f1583f..d94a7c0ac2 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java
@@ -133,12 +133,6 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity {
addInfo(aID);
}
- @Deprecated
- public GT_MetaPipeEntity_Fluid(String aName, float aThickNess, Materials aMaterial, int aCapacity,
- int aHeatResistance, boolean aGasProof) {
- this(aName, aThickNess, aMaterial, aCapacity, aHeatResistance, aGasProof, 1);
- }
-
public GT_MetaPipeEntity_Fluid(String aName, float aThickNess, Materials aMaterial, int aCapacity,
int aHeatResistance, boolean aGasProof, int aFluidTypes) {
super(aName, 0);
@@ -217,11 +211,6 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity {
Dyes.getModulation(colorIndex, aMaterial.mRGBa));
}
- @Deprecated
- protected static ITexture getRestrictorTexture(byte borderMask) {
- return getRestrictorTexture((int) borderMask);
- }
-
protected static ITexture getRestrictorTexture(int borderMask) {
final IIconContainer restrictorIcon = RESTR_TEXTURE_MAP.get(borderMask);
return restrictorIcon != null ? TextureFactory.of(restrictorIcon) : null;
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java
index ece64e2c1d..cff63caeb5 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java
@@ -373,11 +373,6 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
switch (mInventory.length) {
case 4 -> builder.widget(
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java
index 897f9dad6f..7a968afc4b 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java
@@ -336,9 +336,4 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity
public int getTankPressure() {
return -100;
}
-
- @Override
- public boolean useModularUI() {
- return true;
- }
}
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java
index 4709c82776..377646f85a 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java
@@ -1269,11 +1269,6 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
// GUI stuff
@Override
- public boolean useModularUI() {
- return getRecipeMap() != null;
- }
-
- @Override
public int getCircuitSlotX() {
return 153;
}
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java
index 7f1bcfdf4a..25fc7e7855 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java
@@ -1,6 +1,5 @@
package gregtech.api.metatileentity.implementations;
-import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.common.util.ForgeDirection;
@@ -16,8 +15,6 @@ import com.gtnewhorizons.modularui.common.widget.FluidSlotWidget;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
import com.gtnewhorizons.modularui.common.widget.TextWidget;
-import gregtech.api.gui.GT_Container_BasicTank;
-import gregtech.api.gui.GT_GUIContainer_BasicTank;
import gregtech.api.gui.modularui.GT_UITextures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.modularui.IAddUIWidgets;
@@ -144,23 +141,6 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier
return false;
}
- @Deprecated
- public FluidStack getDisplayedFluid() {
- return getDrainableStack();
- }
-
- @Deprecated
- @Override
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_Container_BasicTank(aPlayerInventory, aBaseMetaTileEntity);
- }
-
- @Deprecated
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_BasicTank(aPlayerInventory, aBaseMetaTileEntity, getLocalName());
- }
-
@Override
public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
if (aBaseMetaTileEntity.isServerSide()) {
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java
index 1fc347da1f..ef64d99db8 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java
@@ -472,11 +472,6 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM
return super.onSolderingToolRightClick(side, wrenchingSide, entityPlayer, aX, aY, aZ);
}
- @Override
- public boolean useModularUI() {
- return true;
- }
-
protected void addEmitEnergyButton(ModularWindow.Builder builder) {
builder.widget(
createToggleButton(
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DataAccess.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DataAccess.java
index f5bfd1d27e..18344082ea 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DataAccess.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DataAccess.java
@@ -158,11 +158,6 @@ public class GT_MetaTileEntity_Hatch_DataAccess extends GT_MetaTileEntity_Hatch
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
if (mTier == 4) {
getBaseMetaTileEntity()
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java
index 18aef371b6..705a3e6248 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java
@@ -193,9 +193,4 @@ public class GT_MetaTileEntity_Hatch_Input extends GT_MetaTileEntity_Hatch {
public int getTankPressure() {
return -100;
}
-
- @Override
- public boolean useModularUI() {
- return true;
- }
}
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java
index 089aec53e0..8c99e813e2 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java
@@ -73,13 +73,6 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch
"Capacity: " + getSlots(tier) + " stack" + (getSlots(tier) >= 2 ? "s" : "")));
}
- @Deprecated
- // having too many constructors is bad, don't be so lazy, use GT_MetaTileEntity_Hatch_InputBus(String, int,
- // String[], ITexture[][][])
- public GT_MetaTileEntity_Hatch_InputBus(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- this(aName, aTier, ArrayExt.of(aDescription), aTextures);
- }
-
public GT_MetaTileEntity_Hatch_InputBus(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
this(aName, aTier, getSlots(aTier) + 1, aDescription, aTextures);
}
@@ -276,11 +269,6 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch
return getSlots(mTier);
}
- @Override
- public boolean useModularUI() {
- return true;
- }
-
private void addSortStacksButton(ModularWindow.Builder builder) {
builder.widget(
createToggleButton(
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java
index cdd289221a..8a4d718244 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java
@@ -362,11 +362,6 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
if (mAuto) {
getBaseMetaTileEntity().add2by2Slots(builder);
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_MultiInput.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_MultiInput.java
index cea2e25baa..267c2d0f1c 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_MultiInput.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_MultiInput.java
@@ -286,11 +286,6 @@ public class GT_MetaTileEntity_Hatch_MultiInput extends GT_MetaTileEntity_Hatch_
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
final int SLOT_NUMBER = 4;
final Pos2d[] positions = new Pos2d[] { new Pos2d(70, 25), new Pos2d(88, 25), new Pos2d(70, 43),
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java
index fd83f6899b..2aa2410bd1 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java
@@ -474,11 +474,6 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
super.addUIWidgets(builder, buildContext);
builder.widget(
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java
index 4bb85cbd09..5fdfa7899b 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java
@@ -66,13 +66,6 @@ public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch i
super(aID, aName, aNameRegional, aTier, inventorySize, aDescription);
}
- @Deprecated
- // having too many constructors is bad, don't be so lazy, use GT_MetaTileEntity_Hatch_OutputBus(String, int,
- // String[], ITexture[][][])
- public GT_MetaTileEntity_Hatch_OutputBus(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- this(aName, aTier, getSlots(aTier), ArrayExt.of(aDescription), aTextures);
- }
-
public GT_MetaTileEntity_Hatch_OutputBus(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
super(aName, aTier, getSlots(aTier), aDescription, aTextures);
}
@@ -267,11 +260,6 @@ public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch i
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
switch (mTier) {
case 0 -> getBaseMetaTileEntity().add1by1Slot(builder);
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MagHatch.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MagHatch.java
index 9000d63ba5..8a462d12c6 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MagHatch.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MagHatch.java
@@ -46,11 +46,6 @@ public class GT_MetaTileEntity_MagHatch extends GT_MetaTileEntity_Hatch {
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
new SlotWidget(inventoryHandler, 0)
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
index ca3e73dfbf..e8b81bc966 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
@@ -39,7 +39,6 @@ import net.minecraftforge.fluids.FluidStack;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.TestOnly;
-import org.lwjgl.input.Keyboard;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
@@ -193,11 +192,6 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity
}
@Override
- public boolean isDisplaySecondaryDescription() {
- return Keyboard.isKeyDown(Keyboard.KEY_LSHIFT);
- }
-
- @Override
public boolean allowCoverOnSide(ForgeDirection side, GT_ItemStack aCoverID) {
return side != getBaseMetaTileEntity().getFrontFacing();
}
@@ -2376,11 +2370,6 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public int getGUIWidth() {
return 198;
}
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java
index dd21d6f412..a08e49fd6c 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java
@@ -20,9 +20,6 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit
*/
public final byte mTier;
- @Deprecated
- public final String mDescription;
-
/**
* A simple Description.
*/
@@ -38,7 +35,6 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit
super(aID, aName, aNameRegional, aInvSlotCount);
mTier = (byte) Math.max(0, Math.min(aTier, 14));
mDescriptionArray = aDescription == null ? new String[0] : new String[] { aDescription };
- mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : "";
// must always be the last call!
if (GT.isClientSide()) mTextures = getTextureSet(aTextures);
else mTextures = null;
@@ -49,7 +45,6 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit
super(aID, aName, aNameRegional, aInvSlotCount);
mTier = (byte) Math.max(0, Math.min(aTier, 15));
mDescriptionArray = aDescription == null ? new String[0] : aDescription;
- mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : "";
// must always be the last call!
if (GT.isClientSide()) mTextures = getTextureSet(aTextures);
@@ -61,7 +56,6 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit
super(aName, aInvSlotCount);
mTier = (byte) aTier;
mDescriptionArray = aDescription == null ? new String[0] : new String[] { aDescription };
- mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : "";
mTextures = aTextures;
}
@@ -70,7 +64,6 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit
super(aName, aInvSlotCount);
mTier = (byte) aTier;
mDescriptionArray = aDescription == null ? new String[0] : aDescription;
- mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : "";
mTextures = aTextures;
}
diff --git a/src/main/java/gregtech/api/net/GT_PacketTypes.java b/src/main/java/gregtech/api/net/GT_PacketTypes.java
index f59a7918a9..5907b2176b 100644
--- a/src/main/java/gregtech/api/net/GT_PacketTypes.java
+++ b/src/main/java/gregtech/api/net/GT_PacketTypes.java
@@ -3,7 +3,6 @@ package gregtech.api.net;
import java.util.Arrays;
import gregtech.common.blocks.GT_Packet_Ores;
-import gregtech.common.net.MessageSetFlaskCapacity;
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
/**
@@ -16,16 +15,9 @@ public enum GT_PacketTypes {
BLOCK_EVENT(2, new GT_Packet_Block_Event()),
ORES(3, new GT_Packet_Ores()),
POLLUTION(4, new GT_Packet_Pollution()),
- @SuppressWarnings("deprecation")
- SET_FLASK_CAPACITY(5, new MessageSetFlaskCapacity()),
- COVER(6, new GT_Packet_TileEntityCover()),
- COVER_GUI(7, new GT_Packet_TileEntityCoverGUI()),
CLIENT_PREFERENCE(9, new GT_Packet_ClientPreference()),
- WIRELESS_REDSTONE_COVER(10, new GT_Packet_WirelessRedstoneCover()),
- COVER_NEW(11, new GT_Packet_TileEntityCoverNew()),
SET_CONFIGURATION_CIRCUIT(12, new GT_Packet_SetConfigurationCircuit()),
UPDATE_ITEM(13, new GT_Packet_UpdateItem()),
- TILE_ENTITY_GUI_REQUEST(15, new GT_Packet_GtTileEntityGuiRequest()),
SEND_COVER_DATA(16, new GT_Packet_SendCoverData()),
REQUEST_COVER_DATA(17, new GT_Packet_RequestCoverData()),
MULTI_TILE_ENTITY(18, new GT_Packet_MultiTileEntity(true)),
diff --git a/src/main/java/gregtech/api/net/GT_Packet_GtTileEntityGuiRequest.java b/src/main/java/gregtech/api/net/GT_Packet_GtTileEntityGuiRequest.java
deleted file mode 100644
index 8fe680e96b..0000000000
--- a/src/main/java/gregtech/api/net/GT_Packet_GtTileEntityGuiRequest.java
+++ /dev/null
@@ -1,122 +0,0 @@
-package gregtech.api.net;
-
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import net.minecraftforge.common.DimensionManager;
-import net.minecraftforge.common.util.ForgeDirection;
-
-import com.google.common.io.ByteArrayDataInput;
-
-import gregtech.api.enums.GT_Values;
-import gregtech.api.gui.modularui.GT_UIInfos;
-import gregtech.api.metatileentity.BaseTileEntity;
-import gregtech.api.metatileentity.CoverableTileEntity;
-import gregtech.common.GT_Proxy;
-import io.netty.buffer.ByteBuf;
-
-/**
- * Client -> Server: Request that the server opens a Gregtech GUI for us after providing us with the required data.
- */
-public class GT_Packet_GtTileEntityGuiRequest extends GT_Packet_New {
-
- protected int mX;
- protected short mY;
- protected int mZ;
-
- protected int guiId;
- protected int dimId, playerId;
-
- protected int parentGuiId;
-
- public GT_Packet_GtTileEntityGuiRequest() {
- super(true);
- }
-
- public GT_Packet_GtTileEntityGuiRequest(int mX, short mY, int mZ, int guiId, int dimID, int playerID,
- int parentGuiId) {
- super(false);
- this.mX = mX;
- this.mY = mY;
- this.mZ = mZ;
-
- this.guiId = guiId;
-
- this.dimId = dimID;
- this.playerId = playerID;
-
- this.parentGuiId = parentGuiId;
- }
-
- public GT_Packet_GtTileEntityGuiRequest(int mX, short mY, int mZ, int guiId, int dimID, int playerID) {
- this(mX, mY, mZ, guiId, dimID, playerID, -1);
- }
-
- @Override
- public void encode(ByteBuf aOut) {
- aOut.writeInt(mX);
- aOut.writeShort(mY);
- aOut.writeInt(mZ);
-
- aOut.writeInt(guiId);
-
- aOut.writeInt(dimId);
- aOut.writeInt(playerId);
-
- aOut.writeInt(parentGuiId);
- }
-
- @Override
- public GT_Packet_New decode(ByteArrayDataInput aData) {
- return new GT_Packet_GtTileEntityGuiRequest(
- aData.readInt(),
- aData.readShort(),
- aData.readInt(),
- aData.readInt(),
- aData.readInt(),
- aData.readInt(),
- aData.readInt());
- }
-
- @Override
- public byte getPacketID() {
- return GT_PacketTypes.TILE_ENTITY_GUI_REQUEST.id;
- }
-
- @Override
- public void process(IBlockAccess aWorld) {
- final World world = DimensionManager.getWorld(this.dimId);
- if (world == null) return;
- final TileEntity tile = world.getTileEntity(this.mX, this.mY, this.mZ);
- if (!(tile instanceof BaseTileEntity baseTile) || baseTile.isDead()) return;
-
- final EntityPlayerMP player = (EntityPlayerMP) world.getEntityByID(playerId);
- final CoverableTileEntity coverableTile = (baseTile instanceof CoverableTileEntity)
- ? (CoverableTileEntity) baseTile
- : null;
- // If the requested Gui ID corresponds to a cover, send the cover data to the client so they can open it.
- if (GT_Proxy.GUI_ID_COVER_SIDE_BASE <= guiId && guiId < GT_Proxy.GUI_ID_COVER_SIDE_BASE + 6
- && coverableTile != null) {
- final ForgeDirection coverSide = ForgeDirection
- .getOrientation((byte) (guiId - GT_Proxy.GUI_ID_COVER_SIDE_BASE));
- final GT_Packet_TileEntityCoverGUI packet = new GT_Packet_TileEntityCoverGUI(
- this.mX,
- this.mY,
- this.mZ,
- coverSide,
- coverableTile.getCoverIDAtSide(coverSide),
- coverableTile.getComplexCoverDataAtSide(coverSide),
- this.dimId,
- this.playerId,
- parentGuiId);
- GT_Values.NW.sendToPlayer(packet, player);
- } else if (guiId == 0) {
- if (baseTile.useModularUI()) {
- GT_UIInfos.openGTTileEntityUI(baseTile, player);
- } else {
- baseTile.openGUI(player);
- }
- }
- }
-}
diff --git a/src/main/java/gregtech/api/net/GT_Packet_Sound.java b/src/main/java/gregtech/api/net/GT_Packet_Sound.java
index 04d7f8ac72..93bfdfd3aa 100644
--- a/src/main/java/gregtech/api/net/GT_Packet_Sound.java
+++ b/src/main/java/gregtech/api/net/GT_Packet_Sound.java
@@ -2,6 +2,7 @@ package gregtech.api.net;
import java.io.IOException;
+import net.minecraft.util.ResourceLocation;
import net.minecraft.world.IBlockAccess;
import com.google.common.io.ByteArrayDataInput;
@@ -60,7 +61,9 @@ public class GT_Packet_Sound extends GT_Packet_New {
@Override
public void process(IBlockAccess aWorld) {
- GT_Utility.doSoundAtClient(mSoundName, 1, mSoundStrength, mSoundPitch, mX, mY, mZ);
+ if (mSoundName != null) {
+ GT_Utility.doSoundAtClient(new ResourceLocation(mSoundName), 1, mSoundStrength, mSoundPitch, mX, mY, mZ);
+ }
}
@Override
diff --git a/src/main/java/gregtech/api/net/GT_Packet_TileEntityCover.java b/src/main/java/gregtech/api/net/GT_Packet_TileEntityCover.java
deleted file mode 100644
index 4b4ef5d50d..0000000000
--- a/src/main/java/gregtech/api/net/GT_Packet_TileEntityCover.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package gregtech.api.net;
-
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import net.minecraftforge.common.DimensionManager;
-import net.minecraftforge.common.util.ForgeDirection;
-
-import com.google.common.io.ByteArrayDataInput;
-
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import io.netty.buffer.ByteBuf;
-
-/**
- * Client -> Server: Update cover data. use this only if you are using the legacy data storage
- */
-public class GT_Packet_TileEntityCover extends GT_Packet_New {
-
- protected int mX;
- protected short mY;
- protected int mZ;
-
- protected ForgeDirection side;
- protected int coverID, coverData, dimID;
-
- public GT_Packet_TileEntityCover() {
- super(true);
- }
-
- public GT_Packet_TileEntityCover(int mX, short mY, int mZ, ForgeDirection coverSide, int coverID, int coverData,
- int dimID) {
- super(false);
- this.mX = mX;
- this.mY = mY;
- this.mZ = mZ;
-
- this.side = coverSide;
- this.coverID = coverID;
- this.coverData = coverData;
-
- this.dimID = dimID;
- }
-
- public GT_Packet_TileEntityCover(ForgeDirection coverSide, int coverID, int coverData, ICoverable tile) {
- super(false);
- this.mX = tile.getXCoord();
- this.mY = tile.getYCoord();
- this.mZ = tile.getZCoord();
-
- this.side = coverSide;
- this.coverID = coverID;
- this.coverData = coverData;
-
- this.dimID = tile.getWorld().provider.dimensionId;
- }
-
- @Override
- public byte getPacketID() {
- return GT_PacketTypes.COVER.id;
- }
-
- @Override
- public void encode(ByteBuf aOut) {
- aOut.writeInt(mX);
- aOut.writeShort(mY);
- aOut.writeInt(mZ);
-
- aOut.writeByte(side.ordinal());
- aOut.writeInt(coverID);
- aOut.writeInt(coverData);
-
- aOut.writeInt(dimID);
- }
-
- @Override
- public GT_Packet_New decode(ByteArrayDataInput aData) {
- return new GT_Packet_TileEntityCover(
- aData.readInt(),
- aData.readShort(),
- aData.readInt(),
- ForgeDirection.getOrientation(aData.readByte()),
- aData.readInt(),
- aData.readInt(),
- aData.readInt());
- }
-
- @Override
- public void process(IBlockAccess aWorld) {
- World world = DimensionManager.getWorld(dimID);
- if (world != null) {
- TileEntity tile = world.getTileEntity(mX, mY, mZ);
- if (tile instanceof IGregTechTileEntity && !((IGregTechTileEntity) tile).isDead()) {
- ((IGregTechTileEntity) tile).receiveCoverData(side, coverID, coverData);
- }
- }
- }
-}
diff --git a/src/main/java/gregtech/api/net/GT_Packet_TileEntityCoverGUI.java b/src/main/java/gregtech/api/net/GT_Packet_TileEntityCoverGUI.java
deleted file mode 100644
index 95b1bbac99..0000000000
--- a/src/main/java/gregtech/api/net/GT_Packet_TileEntityCoverGUI.java
+++ /dev/null
@@ -1,219 +0,0 @@
-package gregtech.api.net;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.GuiScreen;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
-
-import com.google.common.io.ByteArrayDataInput;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.gui.GT_GUICover;
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_CoverBehaviorBase;
-import gregtech.api.util.ISerializableObject;
-import gregtech.common.covers.CoverInfo;
-import io.netty.buffer.ByteBuf;
-
-/**
- * Server -> Client: Show GUI
- */
-public class GT_Packet_TileEntityCoverGUI extends GT_Packet_New {
-
- protected int mX;
- protected short mY;
- protected int mZ;
-
- protected ForgeDirection side;
- protected int coverID, dimID, playerID;
- protected ISerializableObject coverData;
-
- protected int parentGuiId;
-
- public GT_Packet_TileEntityCoverGUI() {
- super(true);
- }
-
- public GT_Packet_TileEntityCoverGUI(int mX, short mY, int mZ, ForgeDirection coverSide, int coverID, int coverData,
- int dimID, int playerID) {
- super(false);
- this.mX = mX;
- this.mY = mY;
- this.mZ = mZ;
-
- this.side = coverSide;
- this.coverID = coverID;
- this.coverData = new ISerializableObject.LegacyCoverData(coverData);
-
- this.dimID = dimID;
- this.playerID = playerID;
- this.parentGuiId = -1;
- }
-
- public GT_Packet_TileEntityCoverGUI(int mX, short mY, int mZ, ForgeDirection coverSide, int coverID,
- ISerializableObject coverData, int dimID, int playerID) {
- super(false);
- this.mX = mX;
- this.mY = mY;
- this.mZ = mZ;
-
- this.side = coverSide;
- this.coverID = coverID;
- this.coverData = coverData;
- this.dimID = dimID;
- this.playerID = playerID;
- this.parentGuiId = -1;
- }
-
- public GT_Packet_TileEntityCoverGUI(CoverInfo coverInfo, int dimID, int playerID, int parentGuiId) {
- super(false);
- final ICoverable tile = coverInfo.getTile();
- this.mX = tile.getXCoord();
- this.mY = tile.getYCoord();
- this.mZ = tile.getZCoord();
-
- this.side = coverInfo.getSide();
- this.coverID = coverInfo.getCoverID();
- this.coverData = coverInfo.getCoverData();
-
- this.dimID = dimID;
- this.playerID = playerID;
- this.parentGuiId = parentGuiId;
- }
-
- public GT_Packet_TileEntityCoverGUI(int mX, short mY, int mZ, ForgeDirection coverSide, int coverID,
- ISerializableObject coverData, int dimID, int playerID, int parentGuiId) {
- super(false);
- this.mX = mX;
- this.mY = mY;
- this.mZ = mZ;
-
- this.side = coverSide;
- this.coverID = coverID;
- this.coverData = coverData;
- this.dimID = dimID;
- this.playerID = playerID;
- this.parentGuiId = parentGuiId;
- }
-
- public GT_Packet_TileEntityCoverGUI(ForgeDirection side, int coverID, int coverData, ICoverable tile,
- EntityPlayerMP aPlayer) {
- super(false);
-
- this.mX = tile.getXCoord();
- this.mY = tile.getYCoord();
- this.mZ = tile.getZCoord();
-
- this.side = side;
- this.coverID = coverID;
- this.coverData = new ISerializableObject.LegacyCoverData(coverData);
-
- this.dimID = tile.getWorld().provider.dimensionId;
- this.playerID = aPlayer.getEntityId();
- this.parentGuiId = -1;
- }
-
- public GT_Packet_TileEntityCoverGUI(ForgeDirection coverSide, int coverID, int coverData,
- IGregTechTileEntity tile) {
- super(false);
- this.mX = tile.getXCoord();
- this.mY = tile.getYCoord();
- this.mZ = tile.getZCoord();
-
- this.side = coverSide;
- this.coverID = coverID;
- this.coverData = new ISerializableObject.LegacyCoverData(coverData);
-
- this.dimID = tile.getWorld().provider.dimensionId;
- this.parentGuiId = -1;
- }
-
- public GT_Packet_TileEntityCoverGUI(ForgeDirection side, int coverID, ISerializableObject coverData,
- ICoverable tile, EntityPlayerMP aPlayer) {
- super(false);
- this.mX = tile.getXCoord();
- this.mY = tile.getYCoord();
- this.mZ = tile.getZCoord();
-
- this.side = side;
- this.coverID = coverID;
- this.coverData = coverData.copy(); // make a copy so we don't get a race condition
-
- this.dimID = tile.getWorld().provider.dimensionId;
- this.playerID = aPlayer.getEntityId();
- this.parentGuiId = -1;
- }
-
- @Override
- public byte getPacketID() {
- return GT_PacketTypes.COVER_GUI.id;
- }
-
- @Override
- public void encode(ByteBuf aOut) {
- aOut.writeInt(mX);
- aOut.writeShort(mY);
- aOut.writeInt(mZ);
-
- aOut.writeByte(side.ordinal());
- aOut.writeInt(coverID);
- coverData.writeToByteBuf(aOut);
-
- aOut.writeInt(dimID);
- aOut.writeInt(playerID);
-
- aOut.writeInt(parentGuiId);
- }
-
- @Override
- public GT_Packet_New decode(ByteArrayDataInput aData) {
- final int coverID;
- return new GT_Packet_TileEntityCoverGUI(
- aData.readInt(),
- aData.readShort(),
- aData.readInt(),
- ForgeDirection.getOrientation(aData.readByte()),
- coverID = aData.readInt(),
- GregTech_API.getCoverBehaviorNew(coverID)
- .createDataObject()
- .readFromPacket(aData, null),
- aData.readInt(),
- aData.readInt(),
- aData.readInt());
- }
-
- @Override
- public void process(IBlockAccess aWorld) {
- if (aWorld instanceof World) {
- // Using EntityPlayer instead of EntityClientPlayerMP so both client and server can load this
- final EntityPlayer thePlayer = ((EntityPlayer) ((World) aWorld).getEntityByID(playerID));
- final TileEntity tile = aWorld.getTileEntity(mX, mY, mZ);
- if (tile instanceof IGregTechTileEntity gtTile && !gtTile.isDead()) {
- gtTile.setCoverDataAtSide(side, coverData); // Set it client side to read later.
-
- GT_CoverBehaviorBase<?> cover = gtTile.getCoverBehaviorAtSideNew(side);
- if (cover.hasCoverGUI()) {
- final GuiScreen gui = (GuiScreen) cover.getClientGUI(
- side,
- gtTile.getCoverIDAtSide(side),
- gtTile.getComplexCoverDataAtSide(side),
- gtTile,
- thePlayer,
- thePlayer.worldObj);
- // If it's one of this mod's covers, tell it to exit to the GUI with the specified ID (-1 is
- // ignored)
- if (gui instanceof GT_GUICover guiCover) {
- guiCover.setParentGuiId(parentGuiId);
- }
- Minecraft.getMinecraft()
- .displayGuiScreen(gui);
- }
- }
- }
- }
-}
diff --git a/src/main/java/gregtech/api/net/GT_Packet_TileEntityCoverNew.java b/src/main/java/gregtech/api/net/GT_Packet_TileEntityCoverNew.java
deleted file mode 100644
index 5ba0c3ea64..0000000000
--- a/src/main/java/gregtech/api/net/GT_Packet_TileEntityCoverNew.java
+++ /dev/null
@@ -1,119 +0,0 @@
-package gregtech.api.net;
-
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.network.INetHandler;
-import net.minecraft.network.NetHandlerPlayServer;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import net.minecraftforge.common.DimensionManager;
-import net.minecraftforge.common.util.ForgeDirection;
-
-import com.google.common.io.ByteArrayDataInput;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.ISerializableObject;
-import io.netty.buffer.ByteBuf;
-
-/**
- * Client -> Server: Update cover data
- */
-public class GT_Packet_TileEntityCoverNew extends GT_Packet_New {
-
- protected int mX;
- protected short mY;
- protected int mZ;
-
- protected ForgeDirection side;
- protected int coverID, dimID;
- protected ISerializableObject coverData;
-
- protected EntityPlayerMP mPlayer;
-
- public GT_Packet_TileEntityCoverNew() {
- super(true);
- }
-
- public GT_Packet_TileEntityCoverNew(int mX, short mY, int mZ, ForgeDirection coverSide, int coverID,
- ISerializableObject coverData, int dimID) {
- super(false);
- this.mX = mX;
- this.mY = mY;
- this.mZ = mZ;
-
- this.side = coverSide;
- this.coverID = coverID;
- this.coverData = coverData;
-
- this.dimID = dimID;
- }
-
- public GT_Packet_TileEntityCoverNew(ForgeDirection coverSide, int coverID, ISerializableObject coverData,
- ICoverable tile) {
- super(false);
- this.mX = tile.getXCoord();
- this.mY = tile.getYCoord();
- this.mZ = tile.getZCoord();
-
- this.side = coverSide;
- this.coverID = coverID;
- this.coverData = coverData;
-
- this.dimID = tile.getWorld().provider.dimensionId;
- }
-
- @Override
- public byte getPacketID() {
- return GT_PacketTypes.COVER_NEW.id;
- }
-
- @Override
- public void setINetHandler(INetHandler aHandler) {
- if (aHandler instanceof NetHandlerPlayServer) {
- mPlayer = ((NetHandlerPlayServer) aHandler).playerEntity;
- }
- }
-
- @Override
- public void encode(ByteBuf aOut) {
- aOut.writeInt(mX);
- aOut.writeShort(mY);
- aOut.writeInt(mZ);
-
- aOut.writeByte(side.ordinal());
- aOut.writeInt(coverID);
- coverData.writeToByteBuf(aOut);
-
- aOut.writeInt(dimID);
- }
-
- @Override
- public GT_Packet_New decode(ByteArrayDataInput aData) {
- int coverId;
- return new GT_Packet_TileEntityCoverNew(
- aData.readInt(),
- aData.readShort(),
- aData.readInt(),
- ForgeDirection.getOrientation(aData.readByte()),
- coverId = aData.readInt(),
- GregTech_API.getCoverBehaviorNew(coverId)
- .createDataObject()
- .readFromPacket(aData, mPlayer),
- aData.readInt());
- }
-
- @Override
- public void process(IBlockAccess aWorld) {
- if (mPlayer == null) // impossible, but who knows
- return;
- World world = DimensionManager.getWorld(dimID);
- if (world != null) {
- TileEntity tile = world.getTileEntity(mX, mY, mZ);
- if (tile instanceof IGregTechTileEntity && !((IGregTechTileEntity) tile).isDead()) {
- ((IGregTechTileEntity) tile).receiveCoverData(side, coverID, coverData, mPlayer);
- }
- }
- }
-}
diff --git a/src/main/java/gregtech/api/net/GT_Packet_WirelessRedstoneCover.java b/src/main/java/gregtech/api/net/GT_Packet_WirelessRedstoneCover.java
deleted file mode 100644
index 1426a3954c..0000000000
--- a/src/main/java/gregtech/api/net/GT_Packet_WirelessRedstoneCover.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package gregtech.api.net;
-
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.network.INetHandler;
-import net.minecraft.network.NetHandlerPlayServer;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import net.minecraftforge.common.DimensionManager;
-import net.minecraftforge.common.util.ForgeDirection;
-
-import com.google.common.io.ByteArrayDataInput;
-
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import io.netty.buffer.ByteBuf;
-
-public class GT_Packet_WirelessRedstoneCover extends GT_Packet_TileEntityCover {
-
- private static final int PRIVATE_MASK = 0xFFFE0000;
- private static final int PUBLIC_MASK = 0x0000FFFF;
- private static final int CHECKBOX_MASK = 0x00010000;
-
- private EntityPlayerMP mPlayer;
- private int mPublicChannel;
- private int mCheckBoxValue;
-
- public GT_Packet_WirelessRedstoneCover() {
- super();
- }
-
- public GT_Packet_WirelessRedstoneCover(int mX, short mY, int mZ, ForgeDirection coverSide, int coverID, int dimID,
- int publicChannel, int checkBoxValue) {
- super(mX, mY, mZ, coverSide, coverID, 0, dimID);
- mPublicChannel = publicChannel;
- mCheckBoxValue = checkBoxValue;
- }
-
- public GT_Packet_WirelessRedstoneCover(ForgeDirection coverSide, int coverID, ICoverable tile, int publicChannel,
- int checkBoxValue) {
- super(coverSide, coverID, 0, tile);
- mPublicChannel = publicChannel;
- mCheckBoxValue = checkBoxValue;
- }
-
- @Override
- public byte getPacketID() {
- return GT_PacketTypes.WIRELESS_REDSTONE_COVER.id;
- }
-
- @Override
- public void setINetHandler(INetHandler aHandler) {
- if (aHandler instanceof NetHandlerPlayServer) {
- mPlayer = ((NetHandlerPlayServer) aHandler).playerEntity;
- }
- }
-
- @Override
- public void encode(ByteBuf aOut) {
- aOut.writeInt(mX);
- aOut.writeShort(mY);
- aOut.writeInt(mZ);
-
- aOut.writeByte(side.ordinal());
- aOut.writeInt(coverID);
-
- aOut.writeInt(dimID);
-
- aOut.writeInt(mPublicChannel);
- aOut.writeInt(mCheckBoxValue);
- }
-
- @Override
- public GT_Packet_New decode(ByteArrayDataInput aData) {
- return new GT_Packet_WirelessRedstoneCover(
- aData.readInt(),
- aData.readShort(),
- aData.readInt(),
- ForgeDirection.getOrientation(aData.readByte()),
- aData.readInt(),
- aData.readInt(),
- aData.readInt(),
- aData.readInt());
- }
-
- @Override
- public void process(IBlockAccess aWorld) {
- World world = DimensionManager.getWorld(dimID);
- if (world != null && world.blockExists(mX, mY, mZ)) {
- TileEntity tile = world.getTileEntity(mX, mY, mZ);
- if (tile instanceof IGregTechTileEntity && !((IGregTechTileEntity) tile).isDead()) {
- int tPrivateChannel = (mCheckBoxValue > 0) ? mPlayer.getUniqueID()
- .hashCode() & PRIVATE_MASK : 0;
- int tCoverData = tPrivateChannel | (mCheckBoxValue & CHECKBOX_MASK) | (mPublicChannel & PUBLIC_MASK);
- ((IGregTechTileEntity) tile).receiveCoverData(side, coverID, tCoverData);
- }
- }
- }
-}
diff --git a/src/main/java/gregtech/api/util/GT_CoverBehavior.java b/src/main/java/gregtech/api/util/GT_CoverBehavior.java
index 3c3a8607fe..9394b3957f 100644
--- a/src/main/java/gregtech/api/util/GT_CoverBehavior.java
+++ b/src/main/java/gregtech/api/util/GT_CoverBehavior.java
@@ -7,15 +7,12 @@ import java.lang.ref.WeakReference;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.Fluid;
-import gregtech.api.enums.GT_Values;
import gregtech.api.gui.modularui.GT_UIInfos;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.net.GT_Packet_TileEntityCoverGUI;
/**
* For Covers with a special behavior. Has fixed storage format of 4 byte. Not very convenient...
@@ -85,14 +82,6 @@ public abstract class GT_CoverBehavior extends GT_CoverBehaviorBase<ISerializabl
return onCoverShiftRightclick(side, aCoverID, convert(aCoverVariable), aTileEntity, aPlayer);
}
- @Deprecated
- @Override
- protected Object getClientGUIImpl(ForgeDirection side, int aCoverID,
- ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer,
- World aWorld) {
- return getClientGUI(side, aCoverID, convert(aCoverVariable), aTileEntity);
- }
-
@Override
protected boolean onCoverRemovalImpl(ForgeDirection side, int aCoverID,
ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, boolean aForced) {
@@ -256,28 +245,12 @@ public abstract class GT_CoverBehavior extends GT_CoverBehaviorBase<ISerializabl
if (hasCoverGUI() && aPlayer instanceof EntityPlayerMP) {
lastPlayer = new WeakReference<>(aPlayer);
mPlayerNotified = false;
- if (useModularUI()) {
- GT_UIInfos.openCoverUI(aTileEntity, aPlayer, side);
- } else {
- GT_Values.NW.sendToPlayer(
- new GT_Packet_TileEntityCoverGUI(
- side,
- aCoverID,
- aCoverVariable,
- aTileEntity,
- (EntityPlayerMP) aPlayer),
- (EntityPlayerMP) aPlayer);
- }
+ GT_UIInfos.openCoverUI(aTileEntity, aPlayer, side);
return true;
}
return false;
}
- @Deprecated
- public Object getClientGUI(ForgeDirection side, int aCoverID, int coverData, ICoverable aTileEntity) {
- return null;
- }
-
/**
* Removes the Cover if this returns true, or if aForced is true. Doesn't get called when the Machine Block is
* getting broken, only if you break the Cover away from the Machine.
diff --git a/src/main/java/gregtech/api/util/GT_CoverBehaviorBase.java b/src/main/java/gregtech/api/util/GT_CoverBehaviorBase.java
index 76408e59c0..c66251439b 100644
--- a/src/main/java/gregtech/api/util/GT_CoverBehaviorBase.java
+++ b/src/main/java/gregtech/api/util/GT_CoverBehaviorBase.java
@@ -14,7 +14,6 @@ import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagInt;
-import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.Fluid;
@@ -28,14 +27,12 @@ import com.gtnewhorizons.modularui.common.widget.ButtonWidget;
import com.gtnewhorizons.modularui.common.widget.TextWidget;
import gregtech.api.GregTech_API;
-import gregtech.api.enums.GT_Values;
import gregtech.api.gui.GT_GUIColorOverride;
import gregtech.api.gui.modularui.GT_CoverUIBuildContext;
import gregtech.api.gui.modularui.GT_UIInfos;
import gregtech.api.gui.widgets.GT_CoverTickRateButton;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.net.GT_Packet_TileEntityCoverGUI;
import gregtech.common.covers.CoverInfo;
/**
@@ -223,12 +220,6 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> {
return onCoverShiftRightClickImpl(side, aCoverID, forceCast(aCoverVariable), aTileEntity, aPlayer);
}
- @Deprecated
- public final Object getClientGUI(ForgeDirection side, int aCoverID, ISerializableObject aCoverVariable,
- ICoverable aTileEntity, EntityPlayer aPlayer, World aWorld) {
- return getClientGUIImpl(side, aCoverID, forceCast(aCoverVariable), aTileEntity, aPlayer, aWorld);
- }
-
/**
* Removes the Cover if this returns true, or if aForced is true. Doesn't get called when the Machine Block is
* getting broken, only if you break the Cover away from the Machine.
@@ -420,13 +411,6 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> {
protected GT_GUIColorOverride colorOverride;
private static final String guiTexturePath = "gregtech:textures/gui/GuiCover.png";
- /**
- * For back compatibility, you need to override this if this cover uses ModularUI.
- */
- public boolean useModularUI() {
- return false;
- }
-
public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) {
return new UIFactory(buildContext).createWindow();
}
@@ -632,29 +616,12 @@ public abstract class GT_CoverBehaviorBase<T extends ISerializableObject> {
ICoverable aTileEntity, EntityPlayer aPlayer) {
if (hasCoverGUI() && aPlayer instanceof EntityPlayerMP) {
lastPlayer = new WeakReference<>(aPlayer);
- if (useModularUI()) {
- GT_UIInfos.openCoverUI(aTileEntity, aPlayer, side);
- } else {
- GT_Values.NW.sendToPlayer(
- new GT_Packet_TileEntityCoverGUI(
- side,
- aCoverID,
- aCoverVariable,
- aTileEntity,
- (EntityPlayerMP) aPlayer),
- (EntityPlayerMP) aPlayer);
- }
+ GT_UIInfos.openCoverUI(aTileEntity, aPlayer, side);
return true;
}
return false;
}
- @Deprecated
- protected Object getClientGUIImpl(ForgeDirection side, int aCoverID, T aCoverVariable, ICoverable aTileEntity,
- EntityPlayer aPlayer, World aWorld) {
- return null;
- }
-
/**
* Removes the Cover if this returns true, or if aForced is true. Doesn't get called when the Machine Block is
* getting broken, only if you break the Cover away from the Machine.
diff --git a/src/main/java/gregtech/api/util/GT_ModHandler.java b/src/main/java/gregtech/api/util/GT_ModHandler.java
index 18f52d1bd0..b91bb810b6 100644
--- a/src/main/java/gregtech/api/util/GT_ModHandler.java
+++ b/src/main/java/gregtech/api/util/GT_ModHandler.java
@@ -290,11 +290,6 @@ public class GT_ModHandler {
return FluidRegistry.getFluidStack("milk", (int) aAmount);
}
- @Deprecated
- public static ItemStack getEmptyFuelCan(long aAmount) {
- return null;
- }
-
public static ItemStack getEmptyCell(long aAmount) {
return ItemList.Cell_Empty.get(aAmount);
}
@@ -331,23 +326,6 @@ public class GT_ModHandler {
}
/**
- * @param aValue Fuel value in EU
- */
- @Deprecated
- public static ItemStack getFuelCan(int aValue) {
- return null;
- }
-
- /**
- * @param aFuelCan the Item you want to check
- * @return the exact Value in EU the Fuel Can is worth if its even a Fuel Can.
- */
- @Deprecated
- public static int getFuelCanValue(ItemStack aFuelCan) {
- return 0;
- }
-
- /**
* Gets an Item from IndustrialCraft, and returns a Replacement Item if not possible
*/
public static ItemStack getIC2Item(String aItem, long aAmount, ItemStack aReplacement) {
@@ -1664,33 +1642,6 @@ public class GT_ModHandler {
}
/**
- * Used in my own Macerator. Decreases StackSize of the Input if wanted.
- */
- @Deprecated
- public static ItemStack getMaceratorOutput(ItemStack aInput, boolean aRemoveInput, ItemStack aOutputSlot) {
- return GT_Utility.copyOrNull(
- getMachineOutput(aInput, getMaceratorRecipeList(), aRemoveInput, new NBTTagCompound(), aOutputSlot)[0]);
- }
-
- /**
- * Used in my own Extractor. Decreases StackSize of the Input if wanted.
- */
- @Deprecated
- public static ItemStack getExtractorOutput(ItemStack aInput, boolean aRemoveInput, ItemStack aOutputSlot) {
- return GT_Utility.copyOrNull(
- getMachineOutput(aInput, getExtractorRecipeList(), aRemoveInput, new NBTTagCompound(), aOutputSlot)[0]);
- }
-
- /**
- * Used in my own Compressor. Decreases StackSize of the Input if wanted.
- */
- @Deprecated
- public static ItemStack getCompressorOutput(ItemStack aInput, boolean aRemoveInput, ItemStack aOutputSlot) {
- return GT_Utility.copyOrNull(
- getMachineOutput(aInput, getCompressorRecipeList(), aRemoveInput, new NBTTagCompound(), aOutputSlot)[0]);
- }
-
- /**
* Used in my own Furnace.
*/
public static ItemStack getSmeltingOutput(ItemStack aInput, boolean aRemoveInput, ItemStack aOutputSlot) {
@@ -2114,11 +2065,6 @@ public class GT_ModHandler {
}
}
- @Deprecated
- public static void registerBoxableItemToToolBox(Item aItem) {
- registerBoxableItemToToolBox(new ItemStack(aItem, 1, GT_Values.W));
- }
-
public static int getCapsuleCellContainerCountMultipliedWithStackSize(ItemStack... aStacks) {
int rAmount = 0;
for (ItemStack tStack : aStacks)
diff --git a/src/main/java/gregtech/api/util/GT_PlayedSound.java b/src/main/java/gregtech/api/util/GT_PlayedSound.java
index 05d61e9833..8604d9b81f 100644
--- a/src/main/java/gregtech/api/util/GT_PlayedSound.java
+++ b/src/main/java/gregtech/api/util/GT_PlayedSound.java
@@ -1,7 +1,5 @@
package gregtech.api.util;
-import static gregtech.api.enums.GT_Values.E;
-
import net.minecraft.util.ResourceLocation;
public class GT_PlayedSound {
@@ -16,15 +14,6 @@ public class GT_PlayedSound {
mZ = (int) aZ;
}
- /**
- * @inheritDoc
- * @deprecated Use {@link GT_PlayedSound(ResourceLocation, double, double, double)}
- */
- @Deprecated
- public GT_PlayedSound(String aSoundName, double aX, double aY, double aZ) {
- this(new ResourceLocation(aSoundName == null ? E : aSoundName), aX, aY, aZ);
- }
-
@Override
public boolean equals(Object aObject) {
if (aObject instanceof GT_PlayedSound) {
diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java
index fb1b026cc7..65504dda75 100644
--- a/src/main/java/gregtech/api/util/GT_Utility.java
+++ b/src/main/java/gregtech/api/util/GT_Utility.java
@@ -2312,24 +2312,6 @@ public class GT_Utility {
return true;
}
- /**
- * @inheritDoc
- * @Deprecated Use {@link #doSoundAtClient(ResourceLocation, int, float, float, double, double, double)}
- */
- @Deprecated
- public static boolean doSoundAtClient(String aSoundName, int aTimeUntilNextSound, float aSoundStrength,
- float aSoundModulation, double aX, double aY, double aZ) {
- if (isStringInvalid(aSoundName)) return false;
- return doSoundAtClient(
- new ResourceLocation(aSoundName),
- aTimeUntilNextSound,
- aSoundStrength,
- aSoundModulation,
- aX,
- aY,
- aZ);
- }
-
public static boolean sendSoundToPlayers(World aWorld, String aSoundName, float aSoundStrength,
float aSoundModulation, int aX, int aY, int aZ) {
if (isStringInvalid(aSoundName) || aWorld == null || aWorld.isRemote) return false;
@@ -2432,11 +2414,6 @@ public class GT_Utility {
return rList;
}
- @Deprecated // why do you use Objects?
- public static Block getBlock(Object aBlock) {
- return (Block) aBlock;
- }
-
public static Block getBlockFromStack(ItemStack itemStack) {
if (isStackInvalid(itemStack)) return Blocks.air;
return getBlockFromItem(itemStack.getItem());
@@ -2446,16 +2423,6 @@ public class GT_Utility {
return Block.getBlockFromItem(item);
}
- @Deprecated // why do you use Objects? And if you want to check your block to be not null, check it directly!
- public static boolean isBlockValid(Object aBlock) {
- return (aBlock instanceof Block);
- }
-
- @Deprecated // why do you use Objects? And if you want to check your block to be null, check it directly!
- public static boolean isBlockInvalid(Object aBlock) {
- return !(aBlock instanceof Block);
- }
-
public static boolean isStringValid(Object aString) {
return aString != null && !aString.toString()
.isEmpty();
@@ -2614,16 +2581,6 @@ public class GT_Utility {
*
* @return casing texture 0 to 16383
*/
- @Deprecated
- public static int getTextureId(ItemStack stack) {
- return getTextureId(Block.getBlockFromItem(stack.getItem()), (byte) stack.getItemDamage());
- }
-
- /**
- * Return texture id from item stack, unoptimized but readable?
- *
- * @return casing texture 0 to 16383
- */
public static int getTextureId(Block blockFromBlock, byte metaFromBlock) {
for (int page = 0; page < Textures.BlockIcons.casingTexturePages.length; page++) {
ITexture[] casingTexturePage = Textures.BlockIcons.casingTexturePages[page];
@@ -2902,13 +2859,6 @@ public class GT_Utility {
return false;
}
- @Deprecated
- public static ItemStack setStack(Object aSetStack, Object aToStack) {
- if (aSetStack instanceof ItemStack setStack && aToStack instanceof ItemStack toStack)
- return setStack(setStack, toStack);
- return null;
- }
-
public static ItemStack setStack(ItemStack aSetStack, ItemStack aToStack) {
if (isStackInvalid(aSetStack) || isStackInvalid(aToStack)) return null;
aSetStack.func_150996_a(aToStack.getItem());
@@ -2991,14 +2941,6 @@ public class GT_Utility {
return rStack;
}
- /**
- * @deprecated use {@link #multiplyStack(int, ItemStack)} instead
- */
- @Deprecated
- public static ItemStack multiplyStack(long aMultiplier, Object... aStacks) {
- return multiplyStack((int) aMultiplier, firstStackOrNull(aStacks));
- }
-
public static ItemStack multiplyStack(int aMultiplier, ItemStack aStack) {
ItemStack rStack = copy(aStack);
if (isStackInvalid(rStack)) return null;
@@ -3011,14 +2953,6 @@ public class GT_Utility {
}
/**
- * @deprecated use {@link #copyAmountUnsafe(int, ItemStack)} instead
- */
- @Deprecated
- public static ItemStack copyAmountUnsafe(long aAmount, Object... aStacks) {
- return copyAmountUnsafe((int) aAmount, firstStackOrNull(aStacks));
- }
-
- /**
* Unlike {@link #copyAmount(int, ItemStack)}, this method does not restrict stack size by 64.
*/
public static ItemStack copyAmountUnsafe(int aAmount, ItemStack aStack) {
@@ -3029,14 +2963,6 @@ public class GT_Utility {
return rStack;
}
- /**
- * @deprecated use {@link #copyMetaData(int, ItemStack)} instead
- */
- @Deprecated
- public static ItemStack copyMetaData(long aMetaData, Object... aStacks) {
- return copyMetaData((int) aMetaData, firstStackOrNull(aStacks));
- }
-
public static ItemStack copyMetaData(int aMetaData, ItemStack aStack) {
ItemStack rStack = copy(aStack);
if (isStackInvalid(rStack)) return null;
@@ -3048,14 +2974,6 @@ public class GT_Utility {
* @deprecated use {@link #copyAmountAndMetaData(int, int, ItemStack)} instead
*/
@Deprecated
- public static ItemStack copyAmountAndMetaData(long aAmount, long aMetaData, Object... aStacks) {
- return copyAmountAndMetaData(aAmount, aMetaData, firstStackOrNull(aStacks));
- }
-
- /**
- * @deprecated use {@link #copyAmountAndMetaData(int, int, ItemStack)} instead
- */
- @Deprecated
public static ItemStack copyAmountAndMetaData(long aAmount, long aMetaData, ItemStack aStack) {
return copyAmountAndMetaData((int) aAmount, (int) aMetaData, aStack);
}
@@ -3068,14 +2986,6 @@ public class GT_Utility {
}
/**
- * @deprecated use {@link #mul(int, ItemStack)} instead
- */
- @Deprecated
- public static ItemStack mul(long aMultiplier, Object... aStacks) {
- return mul((int) aMultiplier, firstStackOrNull(aStacks));
- }
-
- /**
* returns a copy of an ItemStack with its Stacksize being multiplied by aMultiplier
*/
public static ItemStack mul(int aMultiplier, ItemStack aStack) {
@@ -4710,16 +4620,6 @@ public class GT_Utility {
return null;
}
- /**
- * @deprecated typo in method name. use {@link #isAnyIntegratedCircuit(ItemStack)} instead.
- */
- @Deprecated
- public static boolean checkIfSameIntegratedCircuit(ItemStack itemStack) {
- if (itemStack == null) return false;
- for (int i = 0; i < 25; i++) if (itemStack.isItemEqual(GT_Utility.getIntegratedCircuit(i))) return true;
- return false;
- }
-
public static boolean isAnyIntegratedCircuit(ItemStack itemStack) {
if (itemStack == null) return false;
return itemStack.getItem() == ItemList.Circuit_Integrated.getItem() && 0 <= itemStack.getItemDamage()
diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java
index 8e0c636c98..f67addacd5 100644
--- a/src/main/java/gregtech/common/GT_Proxy.java
+++ b/src/main/java/gregtech/common/GT_Proxy.java
@@ -88,7 +88,6 @@ import net.minecraft.world.World;
import net.minecraft.world.WorldSettings.GameType;
import net.minecraft.world.gen.feature.WorldGenMinable;
import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.event.ForgeEventFactory;
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
import net.minecraftforge.event.entity.living.EnderTeleportEvent;
@@ -119,8 +118,6 @@ import cpw.mods.fml.common.eventhandler.Event.Result;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
import cpw.mods.fml.common.network.FMLNetworkEvent;
-import cpw.mods.fml.common.network.IGuiHandler;
-import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
@@ -159,7 +156,6 @@ import gregtech.api.util.GT_BlockMap;
import gregtech.api.util.GT_CLS_Compat;
import gregtech.api.util.GT_ChunkAssociatedData;
import gregtech.api.util.GT_ClientPreference;
-import gregtech.api.util.GT_CoverBehaviorBase;
import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Log;
import gregtech.api.util.GT_ModHandler;
@@ -179,7 +175,7 @@ import gregtech.common.misc.GlobalMetricsCoverDatabase;
import gregtech.common.misc.spaceprojects.SpaceProjectWorldSavedData;
import gregtech.common.tileentities.machines.multi.drone.GT_MetaTileEntity_DroneCentre;
-public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
+public abstract class GT_Proxy implements IGT_Mod, IFuelHandler {
private static final EnumSet<OreGenEvent.GenerateMinable.EventType> PREVENTED_ORES = EnumSet.of(
OreGenEvent.GenerateMinable.EventType.COAL,
@@ -858,7 +854,6 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
this.mIgnoreTcon = GregTech_API.sOPStuff.get(ConfigCategories.general, "ignoreTConstruct", true);
this.mWireHeatingTicks = GregTech_API.sOPStuff.get(ConfigCategories.general, "WireHeatingTicks", 4);
this.replicatorExponent = GregTech_API.sOPStuff.get("Replicator", "Nerf Exponent", 1.2D);
- NetworkRegistry.INSTANCE.registerGuiHandler(GT_Values.GT, this);
for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry
.getRegisteredFluidContainerData()) {
if ((tData.filledContainer.getItem() == Items.potionitem) && (tData.filledContainer.getItemDamage() == 0)) {
@@ -2460,56 +2455,6 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
mClientPrefernces.put(aPlayerID, aPreference);
}
- @Override
- public Object getServerGuiElement(int aID, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) {
- if (aID >= 1000) {
- return null;
- }
- final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
- if ((tTileEntity instanceof IGregTechTileEntity)) {
- if (GUI_ID_COVER_SIDE_BASE <= aID && aID < GUI_ID_COVER_SIDE_BASE + 6) {
- return null;
- }
- final IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity();
- if (tMetaTileEntity != null && !tMetaTileEntity.useModularUI()) {
- return tMetaTileEntity.getServerGUI(aID, aPlayer.inventory, (IGregTechTileEntity) tTileEntity);
- }
- }
- return null;
- }
-
- @Override
- public Object getClientGuiElement(int aID, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) {
- if (aID >= 1000) {
- return null;
- }
- final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
- if ((tTileEntity instanceof IGregTechTileEntity tile)) {
-
- if (GUI_ID_COVER_SIDE_BASE <= aID && aID < GUI_ID_COVER_SIDE_BASE + 6) {
- final ForgeDirection side = ForgeDirection
- .getOrientation((byte) (aID - GT_Proxy.GUI_ID_COVER_SIDE_BASE));
- GT_CoverBehaviorBase<?> cover = tile.getCoverBehaviorAtSideNew(side);
-
- if (cover.hasCoverGUI() && !cover.useModularUI()) {
- return cover.getClientGUI(
- side,
- tile.getCoverIDAtSide(side),
- tile.getComplexCoverDataAtSide(side),
- tile,
- aPlayer,
- aWorld);
- }
- return null;
- }
- final IMetaTileEntity tMetaTileEntity = tile.getMetaTileEntity();
- if (tMetaTileEntity != null && !tMetaTileEntity.useModularUI()) {
- return tMetaTileEntity.getClientGUI(aID, aPlayer.inventory, tile);
- }
- }
- return null;
- }
-
private static List<String> getOreDictNames(ItemStack stack) {
return Arrays.stream(OreDictionary.getOreIDs(stack))
.mapToObj(OreDictionary::getOreName)
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java
index 49c9c6c992..d5472e9217 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java
@@ -113,20 +113,6 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract {
}
@Deprecated
- public IIcon getTurbineCasing(int meta, int iconIndex, boolean active) {
- return switch (meta) {
- case 10 -> active ? Textures.BlockIcons.TURBINE_ACTIVE1[iconIndex].getIcon()
- : Textures.BlockIcons.TURBINE1[iconIndex].getIcon();
- case 11 -> active ? Textures.BlockIcons.TURBINE_ACTIVE2[iconIndex].getIcon()
- : Textures.BlockIcons.TURBINE2[iconIndex].getIcon();
- case 12 -> active ? Textures.BlockIcons.TURBINE_ACTIVE3[iconIndex].getIcon()
- : Textures.BlockIcons.TURBINE3[iconIndex].getIcon();
- default -> active ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon()
- : Textures.BlockIcons.TURBINE[iconIndex].getIcon();
- };
- }
-
- @Deprecated
public IIcon getTurbineCasing(int meta, int iconIndex, boolean active, boolean hasTurbine) {
return switch (meta) {
case 10 -> active ? Textures.BlockIcons.TURBINE_ACTIVE1[iconIndex].getIcon()
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java
index fdef0def82..0baeea1411 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java
@@ -100,17 +100,6 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract {
};
}
- @Deprecated
- public IIcon getTurbineCasing(int meta, int iconIndex, boolean active) {
- // noinspection SwitchStatementWithTooFewBranches // "if" is harder to edit
- return switch (meta) {
- case 9 -> active ? Textures.BlockIcons.TURBINE_ADVGASACTIVE[iconIndex].getIcon()
- : Textures.BlockIcons.TURBINEADVGAS[iconIndex].getIcon();
- default -> active ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon()
- : Textures.BlockIcons.TURBINE[iconIndex].getIcon();
- };
- }
-
public IIcon getTurbineCasing(int meta, int iconIndex, boolean active, boolean hasTurbine) {
// noinspection SwitchStatementWithTooFewBranches // "if" is harder to edit
return switch (meta) {
diff --git a/src/main/java/gregtech/common/covers/CoverInfo.java b/src/main/java/gregtech/common/covers/CoverInfo.java
index f6c8fd963c..48f6dd9748 100644
--- a/src/main/java/gregtech/common/covers/CoverInfo.java
+++ b/src/main/java/gregtech/common/covers/CoverInfo.java
@@ -193,10 +193,6 @@ public final class CoverInfo {
return getCoverBehavior().hasCoverGUI();
}
- public boolean useModularUI() {
- return getCoverBehavior().useModularUI();
- }
-
public boolean letsItemsIn(int aSlot) {
return getCoverBehavior().letsItemsIn(coverSide, coverID, coverData, aSlot, coveredTile.get());
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java
index f2440ebc44..51f330e8df 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java
@@ -277,11 +277,6 @@ public class GT_Cover_Arm extends GT_CoverBehavior {
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) {
return new ArmUIFactory(buildContext).createWindow();
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java b/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java
index 320876568f..2c51cdc355 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java
@@ -177,11 +177,6 @@ public class GT_Cover_ControlsWork extends GT_CoverBehavior implements IControls
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) {
return new ControlsWorkUIFactory(buildContext).createWindow();
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java
index fcedfbe768..b7eb782bbf 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java
@@ -159,11 +159,6 @@ public class GT_Cover_Conveyor extends GT_CoverBehavior {
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) {
return new ConveyorUIFactory(buildContext).createWindow();
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java b/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java
index 4e32a69330..96ef77f207 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java
@@ -140,11 +140,6 @@ public class GT_Cover_DoesWork extends GT_CoverBehavior {
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) {
return new DoesWorkUIFactory(buildContext).createWindow();
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java
index 0010f7745b..5b1f48d04f 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java
@@ -173,11 +173,6 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase<GT_Cover_EUMeter.EUMe
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) {
return new EUMeterUIFactory(buildContext).createWindow();
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java b/src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java
index a8d853dc1b..4d7d0eb7ee 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java
@@ -303,11 +303,6 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase<GT_Cover_
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) {
return new FacadeBaseUIFactory(buildContext).createWindow();
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_FluidLimiter.java b/src/main/java/gregtech/common/covers/GT_Cover_FluidLimiter.java
index 142cb875c3..e7d8288ccf 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_FluidLimiter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_FluidLimiter.java
@@ -164,11 +164,6 @@ public class GT_Cover_FluidLimiter extends GT_CoverBehaviorBase<GT_Cover_FluidLi
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) {
return new FluidLimiterUIFactory(buildContext).createWindow();
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java b/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java
index c22410fa9f..3805dfe2de 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java
@@ -224,11 +224,6 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehaviorBase<GT_Cover_Fluid
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) {
return new FluidRegulatorUIFactory(buildContext).createWindow();
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java b/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java
index 5a6999e055..44e264c8e8 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java
@@ -219,11 +219,6 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase<GT_Cover_Fluidfil
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) {
return new FluidFilterUIFactory(buildContext).createWindow();
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java b/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java
index d93c4b29d1..2274722c9a 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java
@@ -181,11 +181,6 @@ public class GT_Cover_ItemFilter extends GT_CoverBehaviorBase<GT_Cover_ItemFilte
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) {
return new ItemFilterUIFactory(buildContext).createWindow();
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java
index 5ff48ef88a..46be8daddd 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java
@@ -190,11 +190,6 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter.
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) {
return new ItemMeterUIFactory(buildContext).createWindow();
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java
index c3a4b4ff89..f7c8bb8cd3 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java
@@ -162,11 +162,6 @@ public class GT_Cover_LiquidMeter extends GT_CoverBehaviorBase<GT_Cover_LiquidMe
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) {
return new LiquidMeterUIFactory(buildContext).createWindow();
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java b/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java
index 0ac85337f3..cf51f9bdea 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java
@@ -171,11 +171,6 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior {
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) {
return new NeedMaintainanceUIFactory(buildContext).createWindow();
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java b/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java
index d358c4e578..600e167f2d 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java
@@ -146,11 +146,6 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior {
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) {
return new PlayerDetectorUIFactory(buildContext).createWindow();
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java
index e1bbf950ce..c4671f586e 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java
@@ -165,11 +165,6 @@ public class GT_Cover_Pump extends GT_CoverBehavior {
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) {
return new PumpUIFactory(buildContext).createWindow();
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java
index df298c2489..54d025898a 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java
@@ -161,11 +161,6 @@ public abstract class GT_Cover_RedstoneWirelessBase extends GT_CoverBehavior {
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) {
return new RedstoneWirelessBaseUIFactory(buildContext).createWindow();
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java b/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java
index 670506141c..40fad1c537 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java
@@ -133,11 +133,6 @@ public class GT_Cover_Shutter extends GT_CoverBehavior {
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) {
return new ShutterUIFactory(buildContext).createWindow();
}
diff --git a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedWirelessRedstoneBase.java b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedWirelessRedstoneBase.java
index d19db38177..6ee9e2480f 100644
--- a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedWirelessRedstoneBase.java
+++ b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedWirelessRedstoneBase.java
@@ -225,11 +225,6 @@ public abstract class GT_Cover_AdvancedWirelessRedstoneBase<T extends GT_Cover_A
return true;
}
- @Override
- public boolean useModularUI() {
- return true;
- }
-
protected abstract class AdvancedWirelessRedstoneBaseUIFactory extends UIFactory {
protected static final int startX = 10;
diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java
index 4ce7f60da0..c31ddc723d 100644
--- a/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java
+++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java
@@ -18,7 +18,6 @@ import net.minecraftforge.common.util.ForgeDirection;
import gregtech.api.enums.SubTag;
import gregtech.api.interfaces.IItemBehaviour;
import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.api.util.GT_Utility;
public class Behaviour_None implements IItemBehaviour<GT_MetaBase_Item> {
@@ -88,9 +87,4 @@ public class Behaviour_None implements IItemBehaviour<GT_MetaBase_Item> {
EntityLivingBase aEntity, float aSpeed) {
return null;
}
-
- @Deprecated
- public String trans(String aKey, String aEnglish) {
- return GT_Utility.trans(aKey, aEnglish);
- }
}
diff --git a/src/main/java/gregtech/common/net/MessageSetFlaskCapacity.java b/src/main/java/gregtech/common/net/MessageSetFlaskCapacity.java
deleted file mode 100644
index 15e5481224..0000000000
--- a/src/main/java/gregtech/common/net/MessageSetFlaskCapacity.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package gregtech.common.net;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import net.minecraftforge.common.DimensionManager;
-
-import com.google.common.io.ByteArrayDataInput;
-
-import gregtech.api.net.GT_PacketTypes;
-import gregtech.api.net.GT_Packet_New;
-import gregtech.common.items.GT_VolumetricFlask;
-import io.netty.buffer.ByteBuf;
-
-@Deprecated
-public final class MessageSetFlaskCapacity extends GT_Packet_New {
-
- private int capacity, dimID, playerID;
-
- public MessageSetFlaskCapacity() {
- super(true);
- }
-
- public MessageSetFlaskCapacity(int capacity, int dimID, int playerID) {
- super(false);
- this.capacity = capacity;
- this.dimID = dimID;
- this.playerID = playerID;
- }
-
- public MessageSetFlaskCapacity(int capacity, EntityPlayer p) {
- super(false);
- this.capacity = capacity;
- this.dimID = p.worldObj.provider.dimensionId;
- this.playerID = p.getEntityId();
- }
-
- @Override
- public byte getPacketID() {
- return GT_PacketTypes.SET_FLASK_CAPACITY.id;
- }
-
- @Override
- public void encode(ByteBuf aOut) {
- aOut.writeInt(capacity);
- aOut.writeInt(dimID);
- aOut.writeInt(playerID);
- }
-
- @Override
- public GT_Packet_New decode(ByteArrayDataInput aData) {
- return new MessageSetFlaskCapacity(aData.readInt(), aData.readInt(), aData.readInt());
- }
-
- @Override
- public void process(IBlockAccess aWorld) {
- World w = DimensionManager.getWorld(dimID);
- if (w != null && w.getEntityByID(playerID) instanceof EntityPlayer) {
- ItemStack stack = ((EntityPlayer) w.getEntityByID(playerID)).getHeldItem();
- if ((stack != null) && (stack.stackSize > 0)) {
- Item item = stack.getItem();
- if ((item instanceof GT_VolumetricFlask)) ((GT_VolumetricFlask) item).setCapacity(stack, capacity);
- }
- }
- }
-}
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java
index a40a65f0b4..6964b13165 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java
@@ -433,11 +433,6 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
new SlotWidget(inventoryHandler, 0).setFilter(this::isItemValidFluidFilledItem)
diff --git a/src/main/java/gregtech/common/tileentities/debug/GT_MetaTileEntity_AdvDebugStructureWriter.java b/src/main/java/gregtech/common/tileentities/debug/GT_MetaTileEntity_AdvDebugStructureWriter.java
index 057c651aab..e61ae456f0 100644
--- a/src/main/java/gregtech/common/tileentities/debug/GT_MetaTileEntity_AdvDebugStructureWriter.java
+++ b/src/main/java/gregtech/common/tileentities/debug/GT_MetaTileEntity_AdvDebugStructureWriter.java
@@ -235,11 +235,6 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK)
diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java
index b32a7be172..f4d78ec9b3 100644
--- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java
+++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java
@@ -369,11 +369,6 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
getBaseMetaTileEntity().add1by1Slot(builder);
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java
index 8a4bd3a5e8..b173987aa2 100644
--- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java
+++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java
@@ -437,11 +437,6 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
getBaseMetaTileEntity().add1by1Slot(builder);
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_BetterJukebox.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_BetterJukebox.java
index da14d7c7cb..f9a9fba8f4 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_BetterJukebox.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_BetterJukebox.java
@@ -484,11 +484,6 @@ public class GT_MetaTileEntity_BetterJukebox extends GT_MetaTileEntity_BasicMach
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
protected BasicUIProperties getUIProperties() {
return super.getUIProperties().toBuilder()
.itemInputPositionsGetter(count -> UIHelper.getGridPositions(count, 7, 6, 7, 3))
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java
index 50f544334c..9249673c7c 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java
@@ -1200,11 +1200,6 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
AUTOQUEEN_TOOLTIP = "GT5U.machines.industrialapiary.autoqueen.tooltip";
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder
.widget(
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java
index fc6afbd06f..aa8616e03d 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java
@@ -408,11 +408,6 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt
return null;
}
- @Override
- public boolean useModularUI() {
- return true;
- }
-
protected static final NumberFormatMUI numberFormat = new NumberFormatMUI();
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java
index 2acaea8050..b1ce994fb3 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java
@@ -395,11 +395,6 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine
return pipe;
}
- @Override
- public boolean useModularUI() {
- return true;
- }
-
private static final FallbackableUITexture progressBarTexture = GT_UITextures
.fallbackableProgressbar("miner", GT_UITextures.PROGRESSBAR_CANNER);
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java
index 8cac0c3df7..eff998d405 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java
@@ -146,11 +146,6 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_BasicMachine {
return new GT_MetaTileEntity_Pump(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
}
- @Override
- public boolean useModularUI() {
- return true;
- }
-
private static final FallbackableUITexture progressBarTexture = GT_UITextures
.fallbackableProgressbar("pump", GT_UITextures.PROGRESSBAR_CANNER);
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java
index 0666c55ac4..1c95ee563d 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java
@@ -516,11 +516,6 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank
return null;
}
- @Override
- public boolean useModularUI() {
- return true;
- }
-
protected static final NumberFormatMUI numberFormat = new NumberFormatMUI();
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java
index db58a1152e..322797cbba 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java
@@ -301,17 +301,6 @@ public abstract class GT_MetaTileEntity_DrillerBase
}
/**
- * Added for compability reasons
- *
- * @return true if the state is 0 false otherwise.
- * @deprecated compatibility reason
- */
- @Deprecated
- protected boolean tryLowerPipe() {
- return tryLowerPipeState(false) == 0;
- }
-
- /**
* @return 0 for succeeded, 1 for invalid block, 2 for not having mining pipes, 3 for event canceled.
*/
protected int tryLowerPipeState() {
@@ -665,23 +654,6 @@ public abstract class GT_MetaTileEntity_DrillerBase
return true;
}
- @Deprecated
- protected boolean checkCasingBlock(int xOff, int yOff, int zOff) {
- return checkBlockAndMetaOffset(xOff, yOff, zOff, casingBlock, casingMeta);
- }
-
- // meta of frame is getTileEntityBaseType; frame should be checked using its drops (possible a high weight
- // operation)
- @Deprecated
- protected boolean checkFrameBlock(int xOff, int yOff, int zOff) {
- return checkBlockAndMetaOffset(xOff, yOff, zOff, GregTech_API.sBlockMachines, frameMeta);
- }
-
- @Deprecated
- protected boolean checkBlockAndMetaOffset(int xOff, int yOff, int zOff, Block block, int meta) {
- return checkBlockAndMeta(xDrill + xOff, yDrill + yOff, zDrill + zOff, block, meta);
- }
-
private boolean checkBlockAndMeta(int x, int y, int z, Block block, int meta) {
return (meta == W || getBaseMetaTileEntity().getMetaID(x, y, z) == meta)
&& getBaseMetaTileEntity().getBlock(x, y, z) == block;
@@ -718,11 +690,6 @@ public abstract class GT_MetaTileEntity_DrillerBase
protected abstract ItemList getCasingBlockItem();
- @Deprecated
- protected String getCasingName() {
- return null;
- }
-
protected abstract Materials getFrameMaterial();
protected abstract int getCasingTextureIndex();
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java
index ada01bc002..140c6c37df 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java
@@ -1004,11 +1004,6 @@ public class GT_MetaTileEntity_PCBFactory extends
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public byte getUpdateData() {
byte data = 0;
if (mSetTier == 1) {
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java
index e69d2c2921..d28aae81ce 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java
@@ -461,11 +461,6 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder
.widget(
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/purification/GT_MetaTileEntity_pHSensor.java b/src/main/java/gregtech/common/tileentities/machines/multi/purification/GT_MetaTileEntity_pHSensor.java
index 49ed4072b1..e8e393cb3c 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/purification/GT_MetaTileEntity_pHSensor.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/purification/GT_MetaTileEntity_pHSensor.java
@@ -94,11 +94,6 @@ public class GT_MetaTileEntity_pHSensor extends GT_MetaTileEntity_Hatch {
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public String[] getDescription() {
return new String[] { "Can be installed in the pH Neutralization Purification Unit.",
"Outputs Redstone Signal according to the current pH value.",
diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java
index d1bdd9763a..1576f61ff8 100644
--- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java
+++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java
@@ -519,11 +519,6 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti
tag.setTag("itemType", is.writeToNBT(new NBTTagCompound()));
}
- @Override
- public boolean useModularUI() {
- return true;
- }
-
protected static final NumberFormatMUI numberFormat = new NumberFormatMUI();
protected int clientItemCount;
diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java
index e94458c116..cd609af343 100644
--- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java
+++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java
@@ -539,11 +539,6 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit
else if (tag.hasKey("mFluid")) tag.removeTag("mFluid");
}
- @Override
- public boolean useModularUI() {
- return true;
- }
-
protected static final NumberFormatMUI numberFormat = new NumberFormatMUI();
@Override
diff --git a/src/main/java/gregtech/loaders/preload/GT_PreLoad.java b/src/main/java/gregtech/loaders/preload/GT_PreLoad.java
index 6bd91fe027..72cff5f0b2 100644
--- a/src/main/java/gregtech/loaders/preload/GT_PreLoad.java
+++ b/src/main/java/gregtech/loaders/preload/GT_PreLoad.java
@@ -1,16 +1,10 @@
package gregtech.loaders.preload;
import static gregtech.GT_Mod.GT_FML_LOGGER;
-import static gregtech.api.enums.Mods.Avaritia;
import static gregtech.api.enums.Mods.CraftTweaker;
import static gregtech.api.enums.Mods.EnderIO;
-import static gregtech.api.enums.Mods.GTPlusPlus;
import static gregtech.api.enums.Mods.GalacticraftCore;
import static gregtech.api.enums.Mods.GregTech;
-import static gregtech.api.enums.Mods.HodgePodge;
-import static gregtech.api.enums.Mods.IndustrialCraft2Classic;
-import static gregtech.api.enums.Mods.TinkerConstruct;
-import static gregtech.api.enums.Mods.Translocator;
import java.io.BufferedReader;
import java.io.File;
@@ -160,16 +154,6 @@ public class GT_PreLoad {
return tMainConfig;
}
- public static void initCompat() {
- GregTech_API.mIC2Classic = IndustrialCraft2Classic.isModLoaded();
- GregTech_API.mGTPlusPlus = GTPlusPlus.isModLoaded();
- GregTech_API.mTranslocator = Translocator.isModLoaded();
- GregTech_API.mTConstruct = TinkerConstruct.isModLoaded();
- GregTech_API.mGalacticraft = GalacticraftCore.isModLoaded();
- GregTech_API.mHodgepodge = HodgePodge.isModLoaded();
- GregTech_API.mAvaritia = Avaritia.isModLoaded();
- }
-
public static void createLogFiles(File parentFile, Configuration tMainConfig) {
GT_Log.mLogFile = new File(parentFile, "logs/GregTech.log");
if (!GT_Log.mLogFile.exists()) {
diff --git a/src/main/java/gtPlusPlus/core/container/Container_PestKiller.java b/src/main/java/gtPlusPlus/core/container/Container_PestKiller.java
index d6afa0d68f..315f34595e 100644
--- a/src/main/java/gtPlusPlus/core/container/Container_PestKiller.java
+++ b/src/main/java/gtPlusPlus/core/container/Container_PestKiller.java
@@ -3,12 +3,15 @@ package gtPlusPlus.core.container;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
+import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidStack;
-import gregtech.api.gui.GT_Slot_Render;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.inventories.InventoryPestKiller;
import gtPlusPlus.core.slots.SlotGeneric;
@@ -144,4 +147,88 @@ public class Container_PestKiller extends Container {
public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) {
return super.func_94530_a(p_94530_1_, p_94530_2_);
}
+
+ private class GT_Slot_Render extends Slot {
+
+ public final int mSlotIndex;
+ public boolean mEnabled = true;
+ public boolean mCanInsertItem, mCanStackItem;
+ public int mMaxStacksize = 127;
+
+ public GT_Slot_Render(IInventory inventory, int slotIndex, int xPos, int yPos) {
+ this(inventory, slotIndex, xPos, yPos, false, false, 0);
+ }
+
+ public GT_Slot_Render(IInventory inventory, int slotIndex, int xPos, int yPos, boolean aCanInsertItem,
+ boolean aCanStackItem, int aMaxStacksize) {
+ super(inventory, slotIndex, xPos, yPos);
+ mCanInsertItem = aCanInsertItem;
+ mCanStackItem = aCanStackItem;
+ mMaxStacksize = aMaxStacksize;
+ mSlotIndex = slotIndex;
+ }
+
+ @Override
+ public boolean isItemValid(ItemStack itemStack) {
+ return mCanInsertItem;
+ }
+
+ @Override
+ public int getSlotStackLimit() {
+ return mMaxStacksize;
+ }
+
+ @Override
+ public boolean getHasStack() {
+ return false;
+ }
+
+ @Override
+ public ItemStack decrStackSize(int amount) {
+ if (!mCanStackItem) return null;
+ return super.decrStackSize(amount);
+ }
+
+ @Override
+ public boolean canTakeStack(EntityPlayer player) {
+ return false;
+ }
+
+ /**
+ * Sets if this slot should be ignored in event-processing. For example, highlight the slot on mouseOver.
+ *
+ * @param enabled if the slot should be enabled
+ */
+ public void setEnabled(boolean enabled) {
+ mEnabled = enabled;
+ }
+
+ /**
+ * Use this value to determine whether to ignore this slot in event processing
+ */
+ public boolean isEnabled() {
+ return mEnabled;
+ }
+
+ /**
+ * This function controls whether to highlight the slot on mouseOver.
+ */
+ @Override
+ @SideOnly(Side.CLIENT)
+ public boolean func_111238_b() {
+ return isEnabled();
+ }
+
+ /**
+ * NEI has a nice and "useful" Delete-All Function, which would delete the Content of this Slot. This is here to
+ * prevent that.
+ */
+ @Override
+ public void putStack(ItemStack aStack) {
+ if (inventory instanceof TileEntity && ((TileEntity) inventory).getWorldObj().isRemote) {
+ inventory.setInventorySlotContents(getSlotIndex(), aStack);
+ }
+ onSlotChanged();
+ }
+ }
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java
index 336c6eb011..a33994402b 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java
@@ -210,11 +210,6 @@ public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileE
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
SlotGroup.ofItemHandler(inventoryHandler, 4)
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java
index c55ddda47d..31b332e7a5 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java
@@ -215,11 +215,6 @@ public class GT_MetaTileEntity_Hatch_InputBattery extends GT_MetaTileEntity_Hatc
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
if (mTier == 2) {
for (int i = 0; i < 4; i++) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java
index a3261af6f6..e9046d229f 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java
@@ -343,11 +343,6 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addGregTechLogo(ModularWindow.Builder builder) {}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java
index 58dc7ec380..1d6507732c 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java
@@ -202,11 +202,6 @@ public class GT_MetaTileEntity_Hatch_OutputBattery extends GT_MetaTileEntity_Hat
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
if (mTier == 2) {
for (int i = 0; i < 4; i++) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java
index 5cc1e64d13..457eca1dad 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java
@@ -268,11 +268,6 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
getBaseMetaTileEntity().add2by2Slots(builder);
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java
index 1d4dbc8987..5868995d49 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java
@@ -204,11 +204,6 @@ public class GT_MetaTileEntity_Hatch_Steam_BusOutput extends GT_MetaTileEntity_H
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
getBaseMetaTileEntity().add2by2Slots(builder);
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java
index ed3101f309..6c545af332 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java
@@ -421,11 +421,6 @@ public class GT_MetaTileEntity_Hatch_Turbine extends GT_MetaTileEntity_Hatch {
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
new SlotWidget(inventoryHandler, 0).setFilter(GregtechMetaTileEntity_LargerTurbineBase::isValidTurbine)
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java
index 6a85c06c1b..fa6d3a5b91 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java
@@ -203,11 +203,6 @@ public class GT_MetaTileEntity_Hatch_CustomFluidBase extends GT_MetaTileEntity_H
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
protected FluidSlotWidget createFluidSlot() {
return super.createFluidSlot().setFilter(f -> f == mLockedFluid);
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java
index 83745f393a..43ead231b3 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java
@@ -330,9 +330,4 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_
public int getTankPressure() {
return -100;
}
-
- @Override
- public boolean useModularUI() {
- return true;
- }
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java
index e81c9ed554..e18fc489b0 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java
@@ -246,7 +246,7 @@ public abstract class GT_MetaTileEntity_Hatch_NbtConsumable extends GT_MetaTileE
/**
* Items that get compared when checking for Usage Slot validity. Can return an empty map if
* isItemValidForUsageSlot() is overridden.
- *
+ *
* @return
*/
public abstract AutoMap<ItemStack> getItemsValidForUsageSlots();
@@ -254,7 +254,7 @@ public abstract class GT_MetaTileEntity_Hatch_NbtConsumable extends GT_MetaTileE
/**
* Checks if the given item is valid for Usage Slots. Can be overridden for easier handling if you already have
* methods to check this.
- *
+ *
* @param aStack
* @return
*/
@@ -270,11 +270,6 @@ public abstract class GT_MetaTileEntity_Hatch_NbtConsumable extends GT_MetaTileE
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addGregTechLogo(ModularWindow.Builder builder) {
switch (mTotalSlotCount) {
case 8, 18 -> builder.widget(
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow.java
index 8b75f4f156..a3341ea077 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow.java
@@ -158,11 +158,6 @@ public class GTPP_Cover_Overflow extends GT_CoverBehavior {
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) {
return new OverflowUIFactory(buildContext).createWindow();
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_ElectricAutoWorkbench.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_ElectricAutoWorkbench.java
index 87ae66b2ad..c1ba23c3c7 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_ElectricAutoWorkbench.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_ElectricAutoWorkbench.java
@@ -788,11 +788,6 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addGregTechLogo(ModularWindow.Builder builder) {
builder.widget(
new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo())
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CropHarvestor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CropHarvestor.java
index 17447f4399..04332b44b5 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CropHarvestor.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CropHarvestor.java
@@ -647,11 +647,6 @@ public class GT_MetaTileEntity_CropHarvestor extends GT_MetaTileEntity_BasicTank
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
new CycleButtonWidget().setToggle(() -> mModeAlternative, val -> mModeAlternative = val)
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java
index b03532807d..4bc9004944 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java
@@ -857,11 +857,6 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(new SlotWidget(inventoryHandler, SLOT_ROTOR).setFilter(stack -> {
if (stack.getItem() instanceof ItemBasicScrubberTurbine) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_AutoChisel.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_AutoChisel.java
index 751771f2b4..a845982e8b 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_AutoChisel.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_AutoChisel.java
@@ -161,11 +161,6 @@ public class GregtechMetaTileEntity_AutoChisel extends GT_MetaTileEntity_BasicMa
return DID_NOT_FIND_RECIPE;
}
- @Override
- public boolean useModularUI() {
- return true;
- }
-
private static final FallbackableUITexture progressBarTexture = GT_UITextures
.fallbackableProgressbar("auto_chisel", GT_UITextures.PROGRESSBAR_COMPRESS);
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java
index 3f4c4ccfa4..0e2a72cfa4 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java
@@ -51,13 +51,11 @@ public class GregtechMetaTileEntity_IndustrialMixer
public GregtechMetaTileEntity_IndustrialMixer(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 2);
- inputSeparation = true;
}
public GregtechMetaTileEntity_IndustrialMixer(final String aName) {
super(aName);
CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 2);
- inputSeparation = true;
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java
index 15ae5a96f8..ef4123273f 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java
@@ -45,12 +45,10 @@ public class GregtechMetaTileEntity_IndustrialWireMill
public GregtechMetaTileEntity_IndustrialWireMill(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
- inputSeparation = true;
}
public GregtechMetaTileEntity_IndustrialWireMill(final String aName) {
super(aName);
- inputSeparation = true;
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneCircuitBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneCircuitBlock.java
index 66d8b76e0c..3b9b9af9a0 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneCircuitBlock.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneCircuitBlock.java
@@ -482,11 +482,6 @@ public class GT_MetaTileEntity_RedstoneCircuitBlock extends GT_MetaTileEntity_Re
}
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
new DrawableWidget().setDrawable(GTPP_UITextures.PICTURE_REDSTONE_CIRCUIT_SCREEN)
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredChest.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredChest.java
index 07a63a6ba4..2b1591ab80 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredChest.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredChest.java
@@ -213,11 +213,6 @@ public class GT_MetaTileEntity_TieredChest extends GT_MetaTileEntity_TieredMachi
return new ITexture[0][0][0];
}
- @Override
- public boolean useModularUI() {
- return true;
- }
-
protected static final NumberFormatMUI numberFormat = new NumberFormatMUI();
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java
index a9fc7a3fd4..90702f5bdc 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java
@@ -186,9 +186,4 @@ public class GT_MetaTileEntity_TieredTank extends GT_MetaTileEntity_BasicTank {
}
}
}
-
- @Override
- public boolean useModularUI() {
- return true;
- }
}
diff --git a/src/main/java/kubatech/api/implementations/KubaTechGTMultiBlockBase.java b/src/main/java/kubatech/api/implementations/KubaTechGTMultiBlockBase.java
index 4451e3f401..c811c2f9b0 100644
--- a/src/main/java/kubatech/api/implementations/KubaTechGTMultiBlockBase.java
+++ b/src/main/java/kubatech/api/implementations/KubaTechGTMultiBlockBase.java
@@ -264,11 +264,6 @@ public abstract class KubaTechGTMultiBlockBase<T extends GT_MetaTileEntity_Exten
public static final UITexture PICTURE_KUBATECH_LOGO = UITexture.fullImage(Tags.MODID, "gui/logo_13x15_dark");
@Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
public void addGregTechLogo(ModularWindow.Builder builder) {
builder.widget(
new DrawableWidget().setDrawable(PICTURE_KUBATECH_LOGO)
diff --git a/src/main/resources/assets/gregtech/textures/gui/1by1.png b/src/main/resources/assets/gregtech/textures/gui/1by1.png
deleted file mode 100644
index 48dae4757f..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/1by1.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/2by2.png b/src/main/resources/assets/gregtech/textures/gui/2by2.png
deleted file mode 100644
index db24e01cfc..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/2by2.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/3by3.png b/src/main/resources/assets/gregtech/textures/gui/3by3.png
deleted file mode 100644
index 6716e6403a..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/3by3.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/4by4.png b/src/main/resources/assets/gregtech/textures/gui/4by4.png
deleted file mode 100644
index 87f7ca9b86..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/4by4.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/AdvancedCraftingTable.png b/src/main/resources/assets/gregtech/textures/gui/AdvancedCraftingTable.png
deleted file mode 100644
index de6a0f566c..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/AdvancedCraftingTable.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/BasicTank.png b/src/main/resources/assets/gregtech/textures/gui/BasicTank.png
deleted file mode 100644
index 4cb189aa92..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/BasicTank.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/BronzeCraftingTable.png b/src/main/resources/assets/gregtech/textures/gui/BronzeCraftingTable.png
deleted file mode 100644
index c44a6d9eec..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/BronzeCraftingTable.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/ComputerCubeRedstone.png b/src/main/resources/assets/gregtech/textures/gui/ComputerCubeRedstone.png
deleted file mode 100644
index 734fd0fcaa..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/ComputerCubeRedstone.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/CropHarvestor.png b/src/main/resources/assets/gregtech/textures/gui/CropHarvestor.png
deleted file mode 100644
index 920224a113..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/CropHarvestor.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/ElectricAutoWorkbench.png b/src/main/resources/assets/gregtech/textures/gui/ElectricAutoWorkbench.png
deleted file mode 100644
index 2984d5bf0f..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/ElectricAutoWorkbench.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/ElectricBufferSmall.png b/src/main/resources/assets/gregtech/textures/gui/ElectricBufferSmall.png
deleted file mode 100644
index 81f999d766..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/ElectricBufferSmall.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/ElectricItemCleaner.png b/src/main/resources/assets/gregtech/textures/gui/ElectricItemCleaner.png
deleted file mode 100644
index 75732e6127..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/ElectricItemCleaner.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/GuiButtons.png b/src/main/resources/assets/gregtech/textures/gui/GuiButtons.png
deleted file mode 100644
index b001b0833a..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/GuiButtons.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/GuiTabs.png b/src/main/resources/assets/gregtech/textures/gui/GuiTabs.png
deleted file mode 100644
index 25b08872a0..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/GuiTabs.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/Implosion.png b/src/main/resources/assets/gregtech/textures/gui/Implosion.png
deleted file mode 100644
index e5841c7873..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/Implosion.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/InventoryManager.png b/src/main/resources/assets/gregtech/textures/gui/InventoryManager.png
deleted file mode 100644
index f208834f07..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/InventoryManager.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/MagicAbsorber.png b/src/main/resources/assets/gregtech/textures/gui/MagicAbsorber.png
deleted file mode 100644
index 522d953733..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/MagicAbsorber.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/RedstoneCircuitBlock.png b/src/main/resources/assets/gregtech/textures/gui/RedstoneCircuitBlock.png
deleted file mode 100644
index a91d0b6855..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/RedstoneCircuitBlock.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/Retriever.png b/src/main/resources/assets/gregtech/textures/gui/Retriever.png
deleted file mode 100644
index 842030f446..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/Retriever.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/Safe.png b/src/main/resources/assets/gregtech/textures/gui/Safe.png
deleted file mode 100644
index 99f3dc72e0..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/Safe.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/Sonictron.png b/src/main/resources/assets/gregtech/textures/gui/Sonictron.png
deleted file mode 100644
index 872d20da90..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/Sonictron.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/Tradeomat_Inventory.png b/src/main/resources/assets/gregtech/textures/gui/Tradeomat_Inventory.png
deleted file mode 100644
index b9922c67a6..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/Tradeomat_Inventory.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/Tradeomat_Main.png b/src/main/resources/assets/gregtech/textures/gui/Tradeomat_Main.png
deleted file mode 100644
index 5af79e7b22..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/Tradeomat_Main.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/Tradeomat_Settings.png b/src/main/resources/assets/gregtech/textures/gui/Tradeomat_Settings.png
deleted file mode 100644
index 77d6912113..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/Tradeomat_Settings.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/armorgui3x3.png b/src/main/resources/assets/gregtech/textures/gui/armorgui3x3.png
deleted file mode 100644
index 80467e9a84..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/armorgui3x3.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/armorgui3x4.png b/src/main/resources/assets/gregtech/textures/gui/armorgui3x4.png
deleted file mode 100644
index 736a26b316..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/armorgui3x4.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/basicmachines/Default.png b/src/main/resources/assets/gregtech/textures/gui/basicmachines/Default.png
deleted file mode 100644
index 309edae171..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/basicmachines/Default.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/basicmachines/LCRNEI.png b/src/main/resources/assets/gregtech/textures/gui/basicmachines/LCRNEI.png
deleted file mode 100644
index f0920e87b4..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/basicmachines/LCRNEI.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/multimachines/MultiblockDisplay.png b/src/main/resources/assets/gregtech/textures/gui/multimachines/MultiblockDisplay.png
deleted file mode 100644
index d28e21bbfd..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/multimachines/MultiblockDisplay.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/gregtech/textures/gui/void.png b/src/main/resources/assets/gregtech/textures/gui/void.png
deleted file mode 100644
index cf532b7153..0000000000
--- a/src/main/resources/assets/gregtech/textures/gui/void.png
+++ /dev/null
Binary files differ