aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/gregtech/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/common')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java324
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java41
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java119
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java211
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java26
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java25
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java74
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java21
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java47
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java31
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksPipeGearbox.java12
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java1
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java6
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java32
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java24
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java50
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java18
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java12
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java50
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java51
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java3
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java3
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java70
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java113
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java149
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java58
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java654
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java15
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java8
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java171
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_ComputerCube_Setup.java76
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_Computercube_Description.java754
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_Computercube_Simulator.java72
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java158
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow.java103
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow_Item.java56
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java57
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java152
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/CraftingHelper.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/FlotationRecipeHandler.java8
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/GT_MethodHelper.java37
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/MachineUpdateHandler.java6
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java230
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/VolumetricFlaskHelper.java24
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Container.java7
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java8
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/tesseract/TesseractHelper.java54
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/treefarm/TreeGenerator.java107
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java49
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java1534
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java64
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java54
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java86
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Grinder.java44
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java73
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/items/covers/MetaItemCoverCasings.java13
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java127
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_FlaskRenderer.java10
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_Render_MachineBlock.java184
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_ElectricAutoWorkbench.java295
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_ElectricInventoryManager.java640
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java179
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java161
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java55
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_HV.java19
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_LV.java19
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_MV.java19
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java78
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_RfConvertor.java192
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java79
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java92
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java88
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java75
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java175
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java141
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_CombustionGenerator.java17
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_GasTurbine.java19
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_SteamTurbine.java19
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java86
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CropHarvestor.java237
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java95
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java315
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaCondensor.java171
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java113
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java133
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java159
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java179
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityThaumcraftResearcher.java86
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_AutoChisel.java72
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_BasicWasher.java44
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ChemicalReactor.java186
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java187
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java188
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorColdTrap.java47
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorProcessingUnit.java36
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java202
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java89
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GregtechMTE_TeslaTower.java118
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java111
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java113
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java54
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialChisel.java81
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCokeOven.java67
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java55
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java103
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialElectrolyzer.java49
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java52
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialFluidHeater.java66
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialForgeHammer.java63
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMacerator.java89
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java58
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMolecularTransformer.java70
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java125
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java55
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSifter.java73
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSinter.java329
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java38
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java86
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java88
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java81
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IronBlastFurnace.java280
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java113
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java115
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_AssemblyLine.java201
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java137
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java130
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java70
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_HeatExchanger.java228
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java31
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java41
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java41
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java265
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java63
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java301
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FastNeutronReactor.java254
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FrothFlotationCell.java87
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_LargeNaqReactor.java623
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java444
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java201
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java205
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java198
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java76
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java164
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java226
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialRockBreaker.java111
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java112
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeSemifluidGenerator.java74
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java189
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_QuantumForceTransformer.java719
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java61
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_SolarTower.java597
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java126
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform1.java51
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform2.java51
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java68
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java202
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/mega/GregTechMetaTileEntity_MegaAlloyBlastSmelter.java517
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Gas.java25
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Plasma.java63
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SCSteam.java14
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java35
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java33
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java333
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_MultiTank.java850
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java306
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/GT_TileEntity_ComputerCube.java1035
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/TileEntitySolarHeater.java126
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneBase.java37
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneButtonPanel.java109
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneCircuitBlock.java360
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneLamp.java16
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneStrengthDisplay.java93
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneStrengthScale.java33
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_AdvancedCraftingTable.java480
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_BronzeCraftingTable.java12
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_ConnectableCrate.java155
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredChest.java119
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java63
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java229
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaSafeBlock.java46
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/creative/GT_MetaTileEntity_InfiniteItemHolder.java17
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java98
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java9
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java14
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java17
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Iron.java14
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Large.java99
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_AngleGrinder.java86
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java41
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java76
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricButcherKnife.java43
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java41
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricSnips.java28
193 files changed, 10861 insertions, 15248 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
index 535b4b7169..2ae449e012 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
@@ -1,5 +1,23 @@
package gtPlusPlus.xmod.gregtech.common;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.util.*;
+
+import net.minecraft.block.Block;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
+import org.apache.commons.lang3.ArrayUtils;
+
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.relauncher.Side;
@@ -27,21 +45,6 @@ import gtPlusPlus.xmod.gregtech.common.helpers.MachineUpdateHandler;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_WorldAccelerator;
import ic2.core.init.BlocksItems;
import ic2.core.init.InternalName;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-import net.minecraft.block.Block;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
-import org.apache.commons.lang3.ArrayUtils;
public class Meta_GT_Proxy {
@@ -60,8 +63,7 @@ public class Meta_GT_Proxy {
public static AchievementHandler mAssemblyAchievements;
- public static final Map<String, FormattedTooltipString> mCustomGregtechMetaTooltips =
- new LinkedHashMap<String, FormattedTooltipString>();
+ public static final Map<String, FormattedTooltipString> mCustomGregtechMetaTooltips = new LinkedHashMap<String, FormattedTooltipString>();
/**
* Does this feature exist within GT? Saves loading useless content if not.
@@ -152,32 +154,13 @@ public class Meta_GT_Proxy {
}
}
- String[] aLangs = new String[] {
- "de_DE", "en_US", "en_GB", "en_IC", "es_AR", "es_ES", "es_MX", "es_UY", "es_VE", "fr_CA", "fr_FR",
- "it_IT", "ko_KR", "pt_BR", "pt_PT", "ru_RU", "sv_SE", "tr_TR", "zh_CN", "zh_TW",
- };
- String[] aLangValues = new String[] {
- "Erhitztes Wasser",
- "Heated Water",
- "Heated Water",
- "Heated Water",
- "Agua caliente",
- "Agua caliente",
- "Agua caliente",
- "Agua caliente",
- "Agua caliente",
- "Eau chauffée",
- "Eau chauffée",
- "Acqua riscaldata",
- "온수",
- "Água aquecida",
- "Água aquecida",
- "Вода с подогревом",
- "Uppvärmt vatten",
- "Isıtılmış Su",
- "热水",
- "热水",
- };
+ String[] aLangs = new String[] { "de_DE", "en_US", "en_GB", "en_IC", "es_AR", "es_ES", "es_MX", "es_UY",
+ "es_VE", "fr_CA", "fr_FR", "it_IT", "ko_KR", "pt_BR", "pt_PT", "ru_RU", "sv_SE", "tr_TR", "zh_CN",
+ "zh_TW", };
+ String[] aLangValues = new String[] { "Erhitztes Wasser", "Heated Water", "Heated Water", "Heated Water",
+ "Agua caliente", "Agua caliente", "Agua caliente", "Agua caliente", "Agua caliente", "Eau chauffée",
+ "Eau chauffée", "Acqua riscaldata", "온수", "Água aquecida", "Água aquecida", "Вода с подогревом",
+ "Uppvärmt vatten", "Isıtılmış Su", "热水", "热水", };
for (int i = 0; i < aLangs.length; i++) {
Logger.REFLECTION(
"Trying to inject new lang data for " + aLangs[i] + ", using value: " + aLangValues[i]);
@@ -248,9 +231,12 @@ public class Meta_GT_Proxy {
// Skip this material
if (aMoltenFluid == null || aPlasma == null || aPlasma.isFluidEqual(NULL_PLASMA)) {
- Logger.INFO("Could not generate Advanced Vacuum Freezer recipe. Cooling " + s
- + " plasma. Molten Form Exists? " + (aMoltenFluid != null) + " | Plasma Exists? "
- + (aPlasma != null));
+ Logger.INFO(
+ "Could not generate Advanced Vacuum Freezer recipe. Cooling " + s
+ + " plasma. Molten Form Exists? "
+ + (aMoltenFluid != null)
+ + " | Plasma Exists? "
+ + (aPlasma != null));
continue;
} else {
// Build a new plasma recipe
@@ -260,9 +246,9 @@ public class Meta_GT_Proxy {
new ItemStack[] {},
new ItemStack[] {},
null,
- new int[] {10000},
- new FluidStack[] {aPlasma, FluidUtils.getFluidStack("cryotheum", aTotalTickTime)},
- new FluidStack[] {aMoltenFluid},
+ new int[] { 10000 },
+ new FluidStack[] { aPlasma, FluidUtils.getFluidStack("cryotheum", aTotalTickTime) },
+ new FluidStack[] { aMoltenFluid },
aTotalTickTime,
(int) GT_Values.V[4 + aAtomicTier],
aAtomicMass);
@@ -316,12 +302,8 @@ public class Meta_GT_Proxy {
Constructor<?> g = BaseCustomTileEntity.class.getConstructors()[0];
g.setAccessible(true);
return (BaseCustomTileEntity) g.newInstance();
- } catch (InstantiationException
- | IllegalAccessException
- | IllegalArgumentException
- | InvocationTargetException
- | SecurityException e) {
- }
+ } catch (InstantiationException | IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException | SecurityException e) {}
}
}
try {
@@ -332,13 +314,10 @@ public class Meta_GT_Proxy {
Constructor<?> g = BaseCustomTileEntity.class.getConstructors()[0];
g.setAccessible(true);
return (BaseCustomTileEntity) g.newInstance();
- } catch (InstantiationException
- | IllegalAccessException
- | IllegalArgumentException
- | InvocationTargetException
- | SecurityException e) {
- GT_Log.err.println(
- "GT++ Mod: Fatal Error ocurred while initializing TileEntities, crashing Minecraft.");
+ } catch (InstantiationException | IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException | SecurityException e) {
+ GT_Log.err
+ .println("GT++ Mod: Fatal Error ocurred while initializing TileEntities, crashing Minecraft.");
e.printStackTrace(GT_Log.err);
CORE.crash(
"GT++ Mod: Fatal Error ocurred while initializing custom BaseMetaTileEntities, crashing Minecraft.");
@@ -357,11 +336,8 @@ public class Meta_GT_Proxy {
Constructor<?> g = BaseCustomPower_MTE.class.getConstructors()[0];
g.setAccessible(true);
return (BaseCustomPower_MTE) g.newInstance();
- } catch (InstantiationException
- | IllegalAccessException
- | IllegalArgumentException
- | InvocationTargetException
- | SecurityException e) {
+ } catch (InstantiationException | IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException | SecurityException e) {
// e.printStackTrace();
}
}
@@ -375,13 +351,10 @@ public class Meta_GT_Proxy {
Constructor<?> g = BaseCustomPower_MTE.class.getConstructors()[0];
g.setAccessible(true);
return (BaseCustomPower_MTE) g.newInstance();
- } catch (InstantiationException
- | IllegalAccessException
- | IllegalArgumentException
- | InvocationTargetException
- | SecurityException e) {
- GT_Log.err.println(
- "GT++ Mod: Fatal Error ocurred while initializing TileEntities, crashing Minecraft.");
+ } catch (InstantiationException | IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException | SecurityException e) {
+ GT_Log.err
+ .println("GT++ Mod: Fatal Error ocurred while initializing TileEntities, crashing Minecraft.");
e.printStackTrace(GT_Log.err);
CORE.crash(
"GT++ Mod: Fatal Error ocurred while initializing custom BaseMetaTileEntities, crashing Minecraft.");
@@ -410,8 +383,8 @@ public class Meta_GT_Proxy {
}
}
} else {
- GT_MetaTileEntity_WorldAccelerator.BlacklistedTileEntiyClassNames =
- ArrayUtils.add(GT_MetaTileEntity_WorldAccelerator.BlacklistedTileEntiyClassNames, aClassName);
+ GT_MetaTileEntity_WorldAccelerator.BlacklistedTileEntiyClassNames = ArrayUtils
+ .add(GT_MetaTileEntity_WorldAccelerator.BlacklistedTileEntiyClassNames, aClassName);
return true;
}
return false;
@@ -452,8 +425,8 @@ public class Meta_GT_Proxy {
mCustomGregtechMetaTooltips.put(aNbtTagName, aData);
}
- public static void conStructGtTileBlockTooltip(
- ItemStack aStack, EntityPlayer aPlayer, List<Object> aList, boolean par4) {
+ public static void conStructGtTileBlockTooltip(ItemStack aStack, EntityPlayer aPlayer, List<Object> aList,
+ boolean par4) {
try {
int tDamage = aStack.getItemDamage();
if ((tDamage <= 0) || (tDamage >= GregTech_API.METATILEENTITIES.length)) {
@@ -471,18 +444,18 @@ public class Meta_GT_Proxy {
if (tString.length >= 2) {
StringBuffer tBuffer = new StringBuffer();
Object tRep[] = new String[tString.length / 2];
- for (int j = 0; j < tString.length; j++)
- if (j % 2 == 0) tBuffer.append(tString[j]);
- else {
- tBuffer.append(" %s");
- tRep[j / 2] = tString[j];
- }
- aList.add(String.format(
- GT_LanguageManager.addStringLocalization(
- "TileEntity_DESCRIPTION_" + tDamage + "_Index_" + i++,
- tBuffer.toString(),
- !GregTech_API.sPostloadFinished),
- tRep));
+ for (int j = 0; j < tString.length; j++) if (j % 2 == 0) tBuffer.append(tString[j]);
+ else {
+ tBuffer.append(" %s");
+ tRep[j / 2] = tString[j];
+ }
+ aList.add(
+ String.format(
+ GT_LanguageManager.addStringLocalization(
+ "TileEntity_DESCRIPTION_" + tDamage + "_Index_" + i++,
+ tBuffer.toString(),
+ !GregTech_API.sPostloadFinished),
+ tRep));
}
} else {
String tTranslated = GT_LanguageManager.addStringLocalization(
@@ -506,26 +479,37 @@ public class Meta_GT_Proxy {
if ((aOffset) <= 10) {
tTier -= 2;
aList.add(EnumChatFormatting.BOLD + "16" + " Fuse Slots" + EnumChatFormatting.GRAY);
- aList.add("Per each fuse, you may insert " + EnumChatFormatting.YELLOW
- + (GT_Values.V[tTier]) + EnumChatFormatting.GRAY + " EU/t");
- aList.add("However this " + EnumChatFormatting.ITALIC + EnumChatFormatting.RED + "MUST"
- + EnumChatFormatting.GRAY + " be in a single Amp");
- aList.add("This machine can accept upto a single amp of "
- + GT_Values.VN[Math.min(tTier + 2, 12)] + " as a result");
- aList.add(GT_LanguageManager.addStringLocalization(
+ aList.add(
+ "Per each fuse, you may insert " + EnumChatFormatting.YELLOW
+ + (GT_Values.V[tTier])
+ + EnumChatFormatting.GRAY
+ + " EU/t");
+ aList.add(
+ "However this " + EnumChatFormatting.ITALIC
+ + EnumChatFormatting.RED
+ + "MUST"
+ + EnumChatFormatting.GRAY
+ + " be in a single Amp");
+ aList.add(
+ "This machine can accept upto a single amp of "
+ + GT_Values.VN[Math.min(tTier + 2, 12)]
+ + " as a result");
+ aList.add(
+ GT_LanguageManager.addStringLocalization(
"TileEntity_Breaker_Loss",
- "Breaker Loss: " + EnumChatFormatting.RED + ""
+ "Breaker Loss: " + EnumChatFormatting.RED
+ + ""
+ (GT_Values.V[Math.max(tTier - 1, 0)] / 10)
- + EnumChatFormatting.GRAY + " EU/t",
- !GregTech_API.sPostloadFinished)
- + EnumChatFormatting.GRAY);
+ + EnumChatFormatting.GRAY
+ + " EU/t",
+ !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY);
}
- aList.add(GT_LanguageManager.addStringLocalization(
+ aList.add(
+ GT_LanguageManager.addStringLocalization(
"TileEntity_Special_Power_1",
EnumChatFormatting.RED + "Special Power Handling, please read manual",
- !GregTech_API.sPostloadFinished)
- + EnumChatFormatting.GRAY);
+ !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY);
// aList.add(GT_LanguageManager.addStringLocalization("TileEntity_BreakerBox_2",
// EnumChatFormatting.RED+"Special Power Handling, please read manual",
// !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY);
@@ -537,92 +521,126 @@ public class Meta_GT_Proxy {
if (tTileEntity.getInputVoltage() > 0L) {
String inA = "0";
if (tTileEntity.getInputAmperage() >= 1L) {
- inA = " at " + EnumChatFormatting.YELLOW + tTileEntity.getInputAmperage()
- + EnumChatFormatting.GRAY + " Amps";
+ inA = " at " + EnumChatFormatting.YELLOW
+ + tTileEntity.getInputAmperage()
+ + EnumChatFormatting.GRAY
+ + " Amps";
} else {
- inA = " at " + EnumChatFormatting.WHITE + tTileEntity.getInputAmperage()
- + EnumChatFormatting.GRAY + " Amps";
+ inA = " at " + EnumChatFormatting.WHITE
+ + tTileEntity.getInputAmperage()
+ + EnumChatFormatting.GRAY
+ + " Amps";
}
- String a1 = "Voltage IN: " + EnumChatFormatting.GREEN + tTileEntity.getInputVoltage()
- + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getInputVoltage())] + ")"
- + EnumChatFormatting.GRAY + inA;
+ String a1 = "Voltage IN: " + EnumChatFormatting.GREEN
+ + tTileEntity.getInputVoltage()
+ + " ("
+ + GT_Values.VN[GT_Utility.getTier(tTileEntity.getInputVoltage())]
+ + ")"
+ + EnumChatFormatting.GRAY
+ + inA;
aList.add(a1);
}
if (tTileEntity.getOutputVoltage() > 0L) {
String outA = "0";
if (tTileEntity.getOutputAmperage() >= 1L) {
- outA = " at " + EnumChatFormatting.YELLOW + tTileEntity.getOutputAmperage()
- + EnumChatFormatting.GRAY + " Amps";
+ outA = " at " + EnumChatFormatting.YELLOW
+ + tTileEntity.getOutputAmperage()
+ + EnumChatFormatting.GRAY
+ + " Amps";
} else {
- outA = " at " + EnumChatFormatting.WHITE + tTileEntity.getOutputAmperage()
- + EnumChatFormatting.GRAY + " Amps";
+ outA = " at " + EnumChatFormatting.WHITE
+ + tTileEntity.getOutputAmperage()
+ + EnumChatFormatting.GRAY
+ + " Amps";
}
- String a1 = "Voltage OUT: " + EnumChatFormatting.GREEN + tTileEntity.getOutputVoltage()
- + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getOutputVoltage())] + ")"
- + EnumChatFormatting.GRAY + outA;
+ String a1 = "Voltage OUT: " + EnumChatFormatting.GREEN
+ + tTileEntity.getOutputVoltage()
+ + " ("
+ + GT_Values.VN[GT_Utility.getTier(tTileEntity.getOutputVoltage())]
+ + ")"
+ + EnumChatFormatting.GRAY
+ + outA;
aList.add(a1);
}
if (tTileEntity.getOutputVoltage() > 0L) {
- aList.add(GT_LanguageManager.addStringLocalization(
+ aList.add(
+ GT_LanguageManager.addStringLocalization(
"TileEntity_Lossess_EU",
- "Transmission Loss: " + EnumChatFormatting.DARK_BLUE + ""
+ "Transmission Loss: " + EnumChatFormatting.DARK_BLUE
+ + ""
+ (tDamage < 30500 && tDamage >= 30400 ? 0 : 1),
- !GregTech_API.sPostloadFinished)
- + EnumChatFormatting.GRAY);
+ !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY);
}
if (tTileEntity.getEUCapacity() > 0) {
- aList.add(GT_LanguageManager.addStringLocalization(
- "TileEntity_EUp_STORE2", "Internal Capacity: ", !GregTech_API.sPostloadFinished)
- + EnumChatFormatting.BLUE
- + tTileEntity.getEUCapacity() + EnumChatFormatting.GRAY + " EU");
+ aList.add(
+ GT_LanguageManager.addStringLocalization(
+ "TileEntity_EUp_STORE2",
+ "Internal Capacity: ",
+ !GregTech_API.sPostloadFinished) + EnumChatFormatting.BLUE
+ + tTileEntity.getEUCapacity()
+ + EnumChatFormatting.GRAY
+ + " EU");
}
}
- /*if (tTileEntity.getEUCapacity() > 0L) {
- if (tTileEntity.getInputVoltage() > 0L) {
- aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_IN", "Voltage IN: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.GREEN + tTileEntity.getInputVoltage() + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getInputVoltage())] + ")" + EnumChatFormatting.GRAY);
- }
- if (tTileEntity.getOutputVoltage() > 0L) {
- aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_OUT", "Voltage OUT: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.GREEN + tTileEntity.getOutputVoltage() + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getOutputVoltage())] + ")" + EnumChatFormatting.GRAY);
- }
- if (tTileEntity.getOutputAmperage() > 1L) {
- aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_AMOUNT", "Amperage: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.YELLOW + tTileEntity.getOutputAmperage() + EnumChatFormatting.GRAY);
- }
- aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_STORE", "Capacity: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.BLUE + tTileEntity.getEUCapacity() + EnumChatFormatting.GRAY);
- }*/
+ /*
+ * if (tTileEntity.getEUCapacity() > 0L) { if (tTileEntity.getInputVoltage() > 0L) {
+ * aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_IN", "Voltage IN: ",
+ * !GregTech_API.sPostloadFinished ) + EnumChatFormatting.GREEN + tTileEntity.getInputVoltage() + " (" +
+ * GT_Values.VN[GT_Utility.getTier(tTileEntity.getInputVoltage())] + ")" + EnumChatFormatting.GRAY); }
+ * if (tTileEntity.getOutputVoltage() > 0L) {
+ * aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_OUT", "Voltage OUT: ",
+ * !GregTech_API.sPostloadFinished ) + EnumChatFormatting.GREEN + tTileEntity.getOutputVoltage() + " ("
+ * + GT_Values.VN[GT_Utility.getTier(tTileEntity.getOutputVoltage())] + ")" + EnumChatFormatting.GRAY);
+ * } if (tTileEntity.getOutputAmperage() > 1L) {
+ * aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_AMOUNT", "Amperage: ",
+ * !GregTech_API.sPostloadFinished ) + EnumChatFormatting.YELLOW + tTileEntity.getOutputAmperage() +
+ * EnumChatFormatting.GRAY); }
+ * aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_STORE", "Capacity: ",
+ * !GregTech_API.sPostloadFinished ) + EnumChatFormatting.BLUE + tTileEntity.getEUCapacity() +
+ * EnumChatFormatting.GRAY); }
+ */
}
NBTTagCompound aNBT = aStack.getTagCompound();
if (aNBT != null) {
if (aNBT.getBoolean("mMuffler")) {
- aList.add(GT_LanguageManager.addStringLocalization(
- "GT_TileEntity_MUFFLER", "has Muffler Upgrade", !GregTech_API.sPostloadFinished));
+ aList.add(
+ GT_LanguageManager.addStringLocalization(
+ "GT_TileEntity_MUFFLER",
+ "has Muffler Upgrade",
+ !GregTech_API.sPostloadFinished));
}
if (aNBT.getBoolean("mSteamConverter")) {
- aList.add(GT_LanguageManager.addStringLocalization(
- "GT_TileEntity_STEAMCONVERTER", "has Steam Upgrade", !GregTech_API.sPostloadFinished));
+ aList.add(
+ GT_LanguageManager.addStringLocalization(
+ "GT_TileEntity_STEAMCONVERTER",
+ "has Steam Upgrade",
+ !GregTech_API.sPostloadFinished));
}
int tAmount = 0;
if ((tAmount = aNBT.getByte("mSteamTanks")) > 0) {
- aList.add(tAmount + " "
- + GT_LanguageManager.addStringLocalization(
- "GT_TileEntity_STEAMTANKS",
- "Steam Tank Upgrades",
- !GregTech_API.sPostloadFinished));
+ aList.add(
+ tAmount + " "
+ + GT_LanguageManager.addStringLocalization(
+ "GT_TileEntity_STEAMTANKS",
+ "Steam Tank Upgrades",
+ !GregTech_API.sPostloadFinished));
}
- FluidStack afluid =
- net.minecraftforge.fluids.FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluid"));
+ FluidStack afluid = net.minecraftforge.fluids.FluidStack
+ .loadFluidStackFromNBT(aNBT.getCompoundTag("mFluid"));
if (afluid != null) {
int tFluidAmount = afluid.amount;
if (tFluidAmount > 0) {
- aList.add(GT_LanguageManager.addStringLocalization(
- "GT_TileEntity_FLUIDTANK",
- "Tank Fluid: " + tFluidAmount + "L " + afluid.getLocalizedName() + "",
- !GregTech_API.sPostloadFinished));
+ aList.add(
+ GT_LanguageManager.addStringLocalization(
+ "GT_TileEntity_FLUIDTANK",
+ "Tank Fluid: " + tFluidAmount + "L " + afluid.getLocalizedName() + "",
+ !GregTech_API.sPostloadFinished));
}
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java
index 0f98d8ab55..502674fb18 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java
@@ -1,5 +1,17 @@
package gtPlusPlus.xmod.gregtech.common;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+
import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
@@ -17,16 +29,6 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.reflect.ProxyFinder;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
public class StaticFields59 {
@@ -88,14 +90,19 @@ public class StaticFields59 {
mPyrolyseRecipes = null;
}
- mCalculatePollutionReduction =
- getMethod(GT_MetaTileEntity_Hatch_Muffler.class, "calculatePollutionReduction", int.class);
+ mCalculatePollutionReduction = getMethod(
+ GT_MetaTileEntity_Hatch_Muffler.class,
+ "calculatePollutionReduction",
+ int.class);
Logger.INFO("[SH] Got Method: calculatePollutionReduction");
// Yep...
if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) {
mAddFurnaceRecipe = getMethod(
- GT_ModHandler.class, "addSmeltingAndAlloySmeltingRecipe", ItemStack.class, ItemStack.class);
+ GT_ModHandler.class,
+ "addSmeltingAndAlloySmeltingRecipe",
+ ItemStack.class,
+ ItemStack.class);
Logger.INFO("[SH] Got Method: addSmeltingAndAlloySmeltingRecipe");
} else {
mAddFurnaceRecipe = getMethod(
@@ -182,7 +189,7 @@ public class StaticFields59 {
try {
return (String[]) mDescriptionArray.get(aTile);
} catch (IllegalArgumentException | IllegalAccessException e) {
- return new String[] {aTile.mDescription};
+ return new String[] { aTile.mDescription };
}
}
@@ -211,8 +218,7 @@ public class StaticFields59 {
proxyGT = Meta_GT_Proxy.mProxies[1];
} else {
try {
- proxyGT = (client
- ? ProxyFinder.getClientProxy(GT_Mod.instance)
+ proxyGT = (client ? ProxyFinder.getClientProxy(GT_Mod.instance)
: ProxyFinder.getServerProxy(GT_Mod.instance));
} catch (final ReflectiveOperationException e1) {
proxyGT = null;
@@ -228,8 +234,7 @@ public class StaticFields59 {
if (proxyGT != null && proxyGT instanceof GT_Proxy) {
try {
return ReflectionUtils.getField(proxyGT.getClass(), fieldName).get(proxyGT);
- } catch (IllegalArgumentException | IllegalAccessException e) {
- }
+ } catch (IllegalArgumentException | IllegalAccessException e) {}
}
return null;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java
index 83cbc0065c..a408663ee0 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java
@@ -1,24 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.blocks;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures.BlockIcons;
-import gregtech.api.interfaces.IDebugableBlock;
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.items.GT_Generic_Block;
-import gregtech.api.metatileentity.BaseMetaPipeEntity;
-import gregtech.api.metatileentity.BaseMetaTileEntity;
-import gregtech.api.metatileentity.BaseTileEntity;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.blocks.GT_Material_Machines;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.api.objects.random.XSTR;
-import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy;
-import gtPlusPlus.xmod.gregtech.common.render.GTPP_Render_MachineBlock;
import java.util.ArrayList;
import java.util.List;
+
import net.minecraft.block.Block;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -41,7 +25,26 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.Textures.BlockIcons;
+import gregtech.api.interfaces.IDebugableBlock;
+import gregtech.api.interfaces.tileentity.ICoverable;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.items.GT_Generic_Block;
+import gregtech.api.metatileentity.BaseMetaPipeEntity;
+import gregtech.api.metatileentity.BaseMetaTileEntity;
+import gregtech.api.metatileentity.BaseTileEntity;
+import gregtech.api.util.GT_Utility;
+import gregtech.common.blocks.GT_Material_Machines;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.api.objects.random.XSTR;
+import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy;
+import gtPlusPlus.xmod.gregtech.common.render.GTPP_Render_MachineBlock;
+
public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableBlock, ITileEntityProvider {
+
public static ThreadLocal<IGregTechTileEntity> mTemporaryTileEntity = new ThreadLocal<IGregTechTileEntity>();
public GTPP_Block_Machines() {
@@ -104,8 +107,7 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
}
public String getLocalizedName() {
- String aName = StatCollector.translateToLocal(this.getUnlocalizedName() + ".name");
- ;
+ String aName = StatCollector.translateToLocal(this.getUnlocalizedName() + ".name");;
if (aName.toLowerCase().contains(".name")) {
aName = StatCollector.translateToLocal(getUnlocalizedName() + ".name");
}
@@ -128,8 +130,7 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
}
public int getRenderType() {
- return GTPP_Render_MachineBlock.INSTANCE == null
- ? super.getRenderType()
+ return GTPP_Render_MachineBlock.INSTANCE == null ? super.getRenderType()
: GTPP_Render_MachineBlock.INSTANCE.mRenderID;
}
@@ -195,8 +196,8 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
return tTileEntity != null ? tTileEntity.receiveClientEvent(aData1, aData2) : false;
}
- public void addCollisionBoxesToList(
- World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List outputAABB, Entity collider) {
+ public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List outputAABB,
+ Entity collider) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
if (tTileEntity instanceof IGregTechTileEntity
&& ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) {
@@ -210,18 +211,18 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
return tTileEntity instanceof IGregTechTileEntity
- && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null
- ? ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ)
- : super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ);
+ && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null
+ ? ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ)
+ : super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ);
}
@SideOnly(Side.CLIENT)
public AxisAlignedBB getSelectedBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
return tTileEntity instanceof IGregTechTileEntity
- && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null
- ? ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ)
- : super.getSelectedBoundingBoxFromPool(aWorld, aX, aY, aZ);
+ && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null
+ ? ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ)
+ : super.getSelectedBoundingBoxFromPool(aWorld, aX, aY, aZ);
}
public void setBlockBoundsBasedOnState(IBlockAccess blockAccess, int aX, int aY, int aZ) {
@@ -264,15 +265,13 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
public float getPlayerRelativeBlockHardness(EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
- return tTileEntity instanceof BaseMetaTileEntity
- && ((BaseMetaTileEntity) tTileEntity).privateAccess()
- && !((BaseMetaTileEntity) tTileEntity).playerOwnsThis(aPlayer, true)
- ? -1.0F
- : super.getPlayerRelativeBlockHardness(aPlayer, aWorld, aX, aY, aZ);
+ return tTileEntity instanceof BaseMetaTileEntity && ((BaseMetaTileEntity) tTileEntity).privateAccess()
+ && !((BaseMetaTileEntity) tTileEntity).playerOwnsThis(aPlayer, true) ? -1.0F
+ : super.getPlayerRelativeBlockHardness(aPlayer, aWorld, aX, aY, aZ);
}
- public boolean onBlockActivated(
- World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer, int aSide, float par1, float par2, float par3) {
+ public boolean onBlockActivated(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer, int aSide, float par1,
+ float par2, float par3) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
if (tTileEntity == null) {
return false;
@@ -289,13 +288,11 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
}
}
- return tTileEntity instanceof IGregTechTileEntity
- ? (((IGregTechTileEntity) tTileEntity).getTimer() < 50L
- ? false
- : (!aWorld.isRemote && !((IGregTechTileEntity) tTileEntity).isUseableByPlayer(aPlayer)
- ? true
- : ((IGregTechTileEntity) tTileEntity)
- .onRightclick(aPlayer, (byte) aSide, par1, par2, par3)))
+ return tTileEntity instanceof IGregTechTileEntity ? (((IGregTechTileEntity) tTileEntity).getTimer() < 50L
+ ? false
+ : (!aWorld.isRemote && !((IGregTechTileEntity) tTileEntity).isUseableByPlayer(aPlayer) ? true
+ : ((IGregTechTileEntity) tTileEntity)
+ .onRightclick(aPlayer, (byte) aSide, par1, par2, par3)))
: false;
}
}
@@ -339,8 +336,7 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
(double) ((float) aZ + tRandom.nextFloat() * 0.8F + 0.1F),
new ItemStack(tItem.getItem(), tItem.stackSize, tItem.getItemDamage()));
if (tItem.hasTagCompound()) {
- tItemEntity.getEntityItem().setTagCompound((NBTTagCompound)
- tItem.getTagCompound().copy());
+ tItemEntity.getEntityItem().setTagCompound((NBTTagCompound) tItem.getTagCompound().copy());
}
tItemEntity.motionX = tRandom.nextGaussian() * 0.0500000007450581D;
@@ -359,10 +355,8 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
public ArrayList<ItemStack> getDrops(World aWorld, int aX, int aY, int aZ, int aMeta, int aFortune) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
- return tTileEntity instanceof IGregTechTileEntity
- ? ((IGregTechTileEntity) tTileEntity).getDrops()
- : (mTemporaryTileEntity.get() == null
- ? new ArrayList()
+ return tTileEntity instanceof IGregTechTileEntity ? ((IGregTechTileEntity) tTileEntity).getDrops()
+ : (mTemporaryTileEntity.get() == null ? new ArrayList()
: ((IGregTechTileEntity) mTemporaryTileEntity.get()).getDrops());
}
@@ -436,10 +430,8 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
public int getLightOpacity(IBlockAccess aWorld, int aX, int aY, int aZ) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
- return tTileEntity == null
- ? 0
- : (tTileEntity instanceof IGregTechTileEntity
- ? ((IGregTechTileEntity) tTileEntity).getLightOpacity()
+ return tTileEntity == null ? 0
+ : (tTileEntity instanceof IGregTechTileEntity ? ((IGregTechTileEntity) tTileEntity).getLightOpacity()
: (aWorld.getBlockMetadata(aX, aY, aZ) == 0 ? 255 : 0));
}
@@ -449,21 +441,12 @@ public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableB
}
public TileEntity createTileEntity(World aWorld, int aMeta) {
- return (TileEntity)
- (aMeta >= 4
- ? Meta_GT_Proxy.constructBaseMetaTileEntity()
- : Meta_GT_Proxy.constructBaseMetaTileEntityCustomPower());
- }
-
- public float getExplosionResistance(
- Entity par1Entity,
- World aWorld,
- int aX,
- int aY,
- int aZ,
- double explosionX,
- double explosionY,
- double explosionZ) {
+ return (TileEntity) (aMeta >= 4 ? Meta_GT_Proxy.constructBaseMetaTileEntity()
+ : Meta_GT_Proxy.constructBaseMetaTileEntityCustomPower());
+ }
+
+ public float getExplosionResistance(Entity par1Entity, World aWorld, int aX, int aY, int aZ, double explosionX,
+ double explosionY, double explosionZ) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
return tTileEntity instanceof IGregTechTileEntity
? ((IGregTechTileEntity) tTileEntity).getBlastResistance((byte) 6)
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java
index 9e732d2443..0a4c5bd4a4 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java
@@ -1,14 +1,7 @@
package gtPlusPlus.xmod.gregtech.common.blocks;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.GT_Values;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_ItsNotMyFaultException;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_Log;
-import gregtech.api.util.GT_Utility;
-import gtPlusPlus.api.objects.Logger;
import java.util.List;
+
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
@@ -17,7 +10,17 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.util.GT_ItsNotMyFaultException;
+import gregtech.api.util.GT_LanguageManager;
+import gregtech.api.util.GT_Log;
+import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
+
public class GTPP_Item_Machines extends ItemBlock {
+
public GTPP_Item_Machines(Block par1) {
super(par1);
this.setMaxDamage(0);
@@ -40,33 +43,12 @@ public class GTPP_Item_Machines extends ItemBlock {
final long tVoltage = aNBT.getInputVoltage();
byte tTier = (byte) ((byte) Math.max(1, GT_Utility.getTier(tVoltage)));
- /*if (aNBT.getDescription() != null) {
- int tAmount = 0;
- String[] arg7 = aNBT.getDescription();
- int arg8 = arg7.length-1;
-
- if (arg7 != null && arg7.length > 0) {
- for (String t : arg7) {
- aList.add(t);
- }
-
- }
- else {
- aList.add("ERROR");
- }
-
- for (int y = 0; y < arg8; y++) {
- String tDescription = arg7[y];
-
- if (tDescription != null) {
- aList.add(tDescription+"|"+arg8);
- continue;
- }
- else {
- continue;
- }
- }
- }*/
+ /*
+ * if (aNBT.getDescription() != null) { int tAmount = 0; String[] arg7 = aNBT.getDescription(); int arg8
+ * = arg7.length-1; if (arg7 != null && arg7.length > 0) { for (String t : arg7) { aList.add(t); } }
+ * else { aList.add("ERROR"); } for (int y = 0; y < arg8; y++) { String tDescription = arg7[y]; if
+ * (tDescription != null) { aList.add(tDescription+"|"+arg8); continue; } else { continue; } } }
+ */
if (aNBT.getEUCapacity() > 0L) {
@@ -76,26 +58,37 @@ public class GTPP_Item_Machines extends ItemBlock {
if ((e - 30400) <= 10) {
tTier -= 2;
aList.add(EnumChatFormatting.BOLD + "16" + " Fuse Slots" + EnumChatFormatting.GRAY);
- aList.add("Per each fuse, you may insert " + EnumChatFormatting.YELLOW
- + (GT_Values.V[tTier]) + EnumChatFormatting.GRAY + " EU/t");
- aList.add("However this " + EnumChatFormatting.ITALIC + EnumChatFormatting.RED + "MUST"
- + EnumChatFormatting.GRAY + " be in a single Amp");
- aList.add("This machine can accept upto a single amp of "
- + GT_Values.VN[Math.min(tTier + 2, 12)] + " as a result");
- aList.add(GT_LanguageManager.addStringLocalization(
+ aList.add(
+ "Per each fuse, you may insert " + EnumChatFormatting.YELLOW
+ + (GT_Values.V[tTier])
+ + EnumChatFormatting.GRAY
+ + " EU/t");
+ aList.add(
+ "However this " + EnumChatFormatting.ITALIC
+ + EnumChatFormatting.RED
+ + "MUST"
+ + EnumChatFormatting.GRAY
+ + " be in a single Amp");
+ aList.add(
+ "This machine can accept upto a single amp of "
+ + GT_Values.VN[Math.min(tTier + 2, 12)]
+ + " as a result");
+ aList.add(
+ GT_LanguageManager.addStringLocalization(
"TileEntity_Breaker_Loss",
- "Breaker Loss: " + EnumChatFormatting.RED + ""
+ "Breaker Loss: " + EnumChatFormatting.RED
+ + ""
+ (GT_Values.V[Math.max(tTier - 1, 0)] / 10)
- + EnumChatFormatting.GRAY + " EU/t",
- !GregTech_API.sPostloadFinished)
- + EnumChatFormatting.GRAY);
+ + EnumChatFormatting.GRAY
+ + " EU/t",
+ !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY);
}
- aList.add(GT_LanguageManager.addStringLocalization(
+ aList.add(
+ GT_LanguageManager.addStringLocalization(
"TileEntity_Special_Power_1",
EnumChatFormatting.RED + "Special Power Handling, please read manual",
- !GregTech_API.sPostloadFinished)
- + EnumChatFormatting.GRAY);
+ !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY);
// aList.add(GT_LanguageManager.addStringLocalization("TileEntity_BreakerBox_2",
// EnumChatFormatting.RED+"Special Power Handling, please read manual",
// !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY);
@@ -107,66 +100,93 @@ public class GTPP_Item_Machines extends ItemBlock {
if (aNBT.getInputVoltage() > 0L) {
String inA = "0";
if (aNBT.getInputAmperage() >= 1L) {
- inA = " at " + EnumChatFormatting.YELLOW + aNBT.getInputAmperage() + EnumChatFormatting.GRAY
+ inA = " at " + EnumChatFormatting.YELLOW
+ + aNBT.getInputAmperage()
+ + EnumChatFormatting.GRAY
+ " Amps";
} else {
- inA = " at " + EnumChatFormatting.WHITE + aNBT.getInputAmperage() + EnumChatFormatting.GRAY
+ inA = " at " + EnumChatFormatting.WHITE
+ + aNBT.getInputAmperage()
+ + EnumChatFormatting.GRAY
+ " Amps";
}
- String a1 = "Voltage IN: " + EnumChatFormatting.GREEN + aNBT.getInputVoltage()
- + " (" + GT_Values.VN[GT_Utility.getTier(aNBT.getInputVoltage())] + ")"
- + EnumChatFormatting.GRAY + inA;
+ String a1 = "Voltage IN: " + EnumChatFormatting.GREEN
+ + aNBT.getInputVoltage()
+ + " ("
+ + GT_Values.VN[GT_Utility.getTier(aNBT.getInputVoltage())]
+ + ")"
+ + EnumChatFormatting.GRAY
+ + inA;
aList.add(a1);
}
if (aNBT.getOutputVoltage() > 0L) {
String outA = "0";
if (aNBT.getOutputAmperage() >= 1L) {
- outA = " at " + EnumChatFormatting.YELLOW + aNBT.getOutputAmperage()
- + EnumChatFormatting.GRAY + " Amps";
+ outA = " at " + EnumChatFormatting.YELLOW
+ + aNBT.getOutputAmperage()
+ + EnumChatFormatting.GRAY
+ + " Amps";
} else {
- outA = " at " + EnumChatFormatting.WHITE + aNBT.getOutputAmperage()
- + EnumChatFormatting.GRAY + " Amps";
+ outA = " at " + EnumChatFormatting.WHITE
+ + aNBT.getOutputAmperage()
+ + EnumChatFormatting.GRAY
+ + " Amps";
}
- String a1 = "Voltage OUT: " + EnumChatFormatting.GREEN + aNBT.getOutputVoltage()
- + " (" + GT_Values.VN[GT_Utility.getTier(aNBT.getOutputVoltage())] + ")"
- + EnumChatFormatting.GRAY + outA;
+ String a1 = "Voltage OUT: " + EnumChatFormatting.GREEN
+ + aNBT.getOutputVoltage()
+ + " ("
+ + GT_Values.VN[GT_Utility.getTier(aNBT.getOutputVoltage())]
+ + ")"
+ + EnumChatFormatting.GRAY
+ + outA;
aList.add(a1);
}
- aList.add(GT_LanguageManager.addStringLocalization(
+ aList.add(
+ GT_LanguageManager.addStringLocalization(
"TileEntity_Lossess_EU",
"Transmission Loss: " + EnumChatFormatting.DARK_BLUE + "0",
- !GregTech_API.sPostloadFinished)
- + EnumChatFormatting.GRAY);
-
- aList.add(GT_LanguageManager.addStringLocalization(
- "TileEntity_EUp_STORE2", "Internal Capacity: ", !GregTech_API.sPostloadFinished)
- + EnumChatFormatting.BLUE + aNBT.getEUCapacity()
- + EnumChatFormatting.GRAY + " EU");
+ !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY);
+
+ aList.add(
+ GT_LanguageManager.addStringLocalization(
+ "TileEntity_EUp_STORE2",
+ "Internal Capacity: ",
+ !GregTech_API.sPostloadFinished) + EnumChatFormatting.BLUE
+ + aNBT.getEUCapacity()
+ + EnumChatFormatting.GRAY
+ + " EU");
}
}
NBTTagCompound arg16 = aStack.getTagCompound();
if (arg16 != null) {
if (arg16.getBoolean("mMuffler")) {
- aList.add(GT_LanguageManager.addStringLocalization(
- "GT_TileEntity_MUFFLER", "has Muffler Upgrade", !GregTech_API.sPostloadFinished));
+ aList.add(
+ GT_LanguageManager.addStringLocalization(
+ "GT_TileEntity_MUFFLER",
+ "has Muffler Upgrade",
+ !GregTech_API.sPostloadFinished));
}
if (arg16.getBoolean("mSteamConverter")) {
- aList.add(GT_LanguageManager.addStringLocalization(
- "GT_TileEntity_STEAMCONVERTER", "has Steam Upgrade", !GregTech_API.sPostloadFinished));
+ aList.add(
+ GT_LanguageManager.addStringLocalization(
+ "GT_TileEntity_STEAMCONVERTER",
+ "has Steam Upgrade",
+ !GregTech_API.sPostloadFinished));
}
boolean arg17 = false;
byte arg18;
if ((arg18 = arg16.getByte("mSteamTanks")) > 0) {
- aList.add(arg18 + " "
- + GT_LanguageManager.addStringLocalization(
- "GT_TileEntity_STEAMTANKS",
- "Steam Tank Upgrades",
- !GregTech_API.sPostloadFinished));
+ aList.add(
+ arg18 + " "
+ + GT_LanguageManager.addStringLocalization(
+ "GT_TileEntity_STEAMTANKS",
+ "Steam Tank Upgrades",
+ !GregTech_API.sPostloadFinished));
}
}
@@ -177,17 +197,8 @@ public class GTPP_Item_Machines extends ItemBlock {
}
}
- public boolean onItemUseFirst(
- ItemStack stack,
- EntityPlayer player,
- World world,
- int x,
- int y,
- int z,
- int side,
- float hitX,
- float hitY,
- float hitZ) {
+ public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side,
+ float hitX, float hitY, float hitZ) {
return false;
}
@@ -209,18 +220,8 @@ public class GTPP_Item_Machines extends ItemBlock {
}
}
- public boolean placeBlockAt(
- ItemStack aStack,
- EntityPlayer aPlayer,
- World aWorld,
- int aX,
- int aY,
- int aZ,
- int side,
- float hitX,
- float hitY,
- float hitZ,
- int aMeta) {
+ public boolean placeBlockAt(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int side,
+ float hitX, float hitY, float hitZ, int aMeta) {
short tDamage = (short) ((short) this.getDamage(aStack) + 30400); // Add Offset;
if (tDamage > 0) {
if (GregTech_API.METATILEENTITIES[tDamage] == null) {
@@ -229,8 +230,12 @@ public class GTPP_Item_Machines extends ItemBlock {
byte tMetaData = 32;
// byte tMetaData = GregTech_API.METATILEENTITIES[tDamage].getTileEntityBaseType();
- Logger.INFO("Using Meta: " + tMetaData + " for ID " + tDamage + " | "
- + GregTech_API.METATILEENTITIES[tDamage].getInventoryName());
+ Logger.INFO(
+ "Using Meta: " + tMetaData
+ + " for ID "
+ + tDamage
+ + " | "
+ + GregTech_API.METATILEENTITIES[tDamage].getInventoryName());
if (!aWorld.setBlock(aX, aY, aZ, this.field_150939_a, tMetaData, 3)) {
return false;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java
index 026d3d471f..533676f75b 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java
@@ -1,5 +1,9 @@
package gtPlusPlus.xmod.gregtech.common.blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.IBlockAccess;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.TAE;
@@ -8,9 +12,6 @@ import gregtech.common.blocks.GT_Material_Casings;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.api.objects.GTPP_CopiedBlockTexture;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
public class GregtechMetaCasingBlocks extends GregtechMetaCasingBlocksAbstract {
@@ -26,12 +27,11 @@ public class GregtechMetaCasingBlocks extends GregtechMetaCasingBlocksAbstract {
}
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Centrifuge Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Structural Coke Oven Casing");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".2.name", "Heat Resistant Coke Oven Casing");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".3.name", "Heat Proof Coke Oven Casing"); // 60
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".4.name", "Material Press Machine Casing");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".2.name", "Heat Resistant Coke Oven Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Heat Proof Coke Oven Casing"); // 60
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".4.name", "Material Press Machine Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Electrolyzer Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Wire Factory Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Maceration Stack Casing");
@@ -41,8 +41,8 @@ public class GregtechMetaCasingBlocks extends GregtechMetaCasingBlocksAbstract {
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Multitank Exterior Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Hastelloy-N Reactor Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Zeron-100 Reactor Shielding");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".14.name", "Blast Smelter Heat Containment Coil ");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".14.name", "Blast Smelter Heat Containment Coil ");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Blast Smelter Casing Block");
GregtechItemList.Casing_Centrifuge1.set(new ItemStack(this, 1, 0));
GregtechItemList.Casing_CokeOven.set(new ItemStack(this, 1, 1));
@@ -69,8 +69,8 @@ public class GregtechMetaCasingBlocks extends GregtechMetaCasingBlocksAbstract {
@Override
@SideOnly(Side.CLIENT)
- public IIcon getIcon(
- final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) {
+ public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
+ final int aSide) {
final GregtechMetaCasingBlocks i = this;
return CasingTextureHandler.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i);
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java
index 3c55d2fa95..320fefb583 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java
@@ -1,5 +1,12 @@
package gtPlusPlus.xmod.gregtech.common.blocks;
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+
import gregtech.api.enums.TAE;
import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Utility;
@@ -8,11 +15,6 @@ import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.api.objects.GTPP_CopiedBlockTexture;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler2;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.GregtechMetaTileEntity_PowerSubStationController;
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
public class GregtechMetaCasingBlocks2 extends GregtechMetaCasingBlocksAbstract {
@@ -47,13 +49,13 @@ public class GregtechMetaCasingBlocks2 extends GregtechMetaCasingBlocksAbstract
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Thermal Processing Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Hastelloy-N Sealant Block");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Hastelloy-X Structural Block");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".3.name", "Incoloy-DS Fluid Containment Block");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".3.name", "Incoloy-DS Fluid Containment Block");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Wash Plant Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Industrial Sieve Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Large Sieve Grate");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".7.name", "Vanadium Redox Power Cell (EV)");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".7.name", "Vanadium Redox Power Cell (EV)");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Sub-Station External Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Cyclotron Coil");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Cyclotron Outer Casing");
@@ -61,8 +63,9 @@ public class GregtechMetaCasingBlocks2 extends GregtechMetaCasingBlocksAbstract
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Bulk Production Frame");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Cutting Factory Frame");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".15.name", "Sterile Farm Casing"); // Tree Farmer Textures
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Sterile Farm Casing"); // Tree
+ // Farmer
+ // Textures
GregtechItemList.Casing_ThermalCentrifuge.set(new ItemStack(this, 1, 0));
GregtechItemList.Casing_Refinery_External.set(new ItemStack(this, 1, 1));
GregtechItemList.Casing_Refinery_Structural.set(new ItemStack(this, 1, 2));
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java
index 59bcfa5347..de7e6aa953 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java
@@ -1,5 +1,13 @@
package gtPlusPlus.xmod.gregtech.common.blocks;
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.IBlockAccess;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.TAE;
@@ -11,12 +19,6 @@ import gtPlusPlus.xmod.gregtech.api.objects.GTPP_CopiedBlockTexture;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler3;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.GregtechMetaTileEntity_PowerSubStationController;
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
public class GregtechMetaCasingBlocks3 extends GregtechMetaCasingBlocksAbstract {
@@ -54,25 +56,26 @@ public class GregtechMetaCasingBlocks3 extends GregtechMetaCasingBlocksAbstract
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Inconel Reinforced Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Multi-Use Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Trinium Plated Casing");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".4.name", "Vanadium Redox Power Cell (IV)");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".5.name", "Vanadium Redox Power Cell (LuV)");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".6.name", "Vanadium Redox Power Cell (ZPM)");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".7.name", "Vanadium Redox Power Cell (UV)");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".8.name", "Vanadium Redox Power Cell (MAX)");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".4.name", "Vanadium Redox Power Cell (IV)");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".5.name", "Vanadium Redox Power Cell (LuV)");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".6.name", "Vanadium Redox Power Cell (ZPM)");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".7.name", "Vanadium Redox Power Cell (UV)");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".8.name", "Vanadium Redox Power Cell (MAX)");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Supply Depot Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Advanced Cryogenic Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Volcanus Casing");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".12.name", "Fusion Machine Casing MK III");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".12.name", "Fusion Machine Casing MK III");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Advanced Fusion Coil");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".14.name",
- "Unnamed"); // Can Use, don't change texture (Used for Fusion MK4)
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", "Unnamed"); // Can Use, don't
+ // change texture
+ // (Used for Fusion
+ // MK4)
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Containment Casing");
GregtechItemList.Casing_FishPond.set(new ItemStack(this, 1, 0));
GregtechItemList.Casing_Extruder.set(new ItemStack(this, 1, 1));
@@ -98,8 +101,8 @@ public class GregtechMetaCasingBlocks3 extends GregtechMetaCasingBlocksAbstract
@SideOnly(Side.CLIENT)
@Override
- public IIcon getIcon(
- final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) {
+ public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
+ final int aSide) {
final Block thisBlock = aWorld.getBlock(xCoord, yCoord, zCoord);
final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
if ((tMeta != 12) || !GregtechMetaCasingBlocks3.mConnectedMachineTextures) {
@@ -108,19 +111,18 @@ public class GregtechMetaCasingBlocks3 extends GregtechMetaCasingBlocksAbstract
final int tStartIndex = 0;
if (tMeta == 12) {
final boolean[] tConnectedSides = {
- aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock
- && aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta,
- aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock
- && aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta,
- aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock
- && aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta,
- aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock
- && aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta,
- aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock
- && aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta,
- aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock
- && aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta
- };
+ aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock
+ && aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta,
+ aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock
+ && aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta,
+ aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock
+ && aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta,
+ aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock
+ && aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta,
+ aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock
+ && aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta,
+ aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock
+ && aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta };
switch (aSide) {
case 0: {
if (tConnectedSides[0]) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java
index 8256f1aa64..b637bd2113 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java
@@ -1,5 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+
import gregtech.api.enums.TAE;
import gregtech.api.enums.Textures;
import gregtech.api.util.GT_LanguageManager;
@@ -7,8 +10,6 @@ import gregtech.common.blocks.GT_Material_Casings;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.api.objects.GTPP_CopiedBlockTexture;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
public class GregtechMetaCasingBlocks4 extends GregtechMetaCasingBlocksAbstract {
@@ -24,8 +25,8 @@ public class GregtechMetaCasingBlocks4 extends GregtechMetaCasingBlocksAbstract
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Reactor Piping");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Naquadah Containment Chamber");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Tempered Arc Furnace Casing");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".4.name", "Quantum Force Transformer Coil Casings"); // Unused
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".4.name", "Quantum Force Transformer Coil Casings"); // Unused
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", ""); // Unused
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", ""); // Unused
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", ""); // Unused
@@ -48,12 +49,12 @@ public class GregtechMetaCasingBlocks4 extends GregtechMetaCasingBlocksAbstract
// private static final LargeTurbineTextureHandler mTurbineTextures = new LargeTurbineTextureHandler();
- /*@Override
- @SideOnly(Side.CLIENT)
- public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) {
- final GregtechMetaCasingBlocks4 i = this;
- return mTurbineTextures.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i);
- }*/
+ /*
+ * @Override
+ * @SideOnly(Side.CLIENT) public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final
+ * int zCoord, final int aSide) { final GregtechMetaCasingBlocks4 i = this; return
+ * mTurbineTextures.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i); }
+ */
@Override
public IIcon getIcon(final int aSide, final int aMeta) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java
index 68d8349ef3..700e14c711 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java
@@ -1,5 +1,9 @@
package gtPlusPlus.xmod.gregtech.common.blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.IBlockAccess;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.TAE;
@@ -10,9 +14,6 @@ import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.api.objects.GTPP_CopiedBlockTexture;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGrinderMultiblock;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
public class GregtechMetaCasingBlocks5 extends GregtechMetaCasingBlocksAbstract {
@@ -23,34 +24,34 @@ public class GregtechMetaCasingBlocks5 extends GregtechMetaCasingBlocksAbstract
public GregtechMetaCasingBlocks5() {
super(GregtechMetaCasingItems.class, "gtplusplus.blockcasings.5", GT_Material_Casings.INSTANCE);
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".0.name", "IsaMill Exterior Casing"); // IsaMill Casing
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "IsaMill Exterior Casing"); // IsaMill
+ // Casing
TAE.registerTexture(0, 2, new GTPP_CopiedBlockTexture(this, 6, 0));
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".1.name", "IsaMill Piping"); // IsaMill Pipe
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".2.name", "IsaMill Gearbox"); // IsaMill Gearbox
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".3.name", "Elemental Confinement Shell"); // Duplicator Casing
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "IsaMill Piping"); // IsaMill
+ // Pipe
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "IsaMill Gearbox"); // IsaMill
+ // Gearbox
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Elemental Confinement Shell"); // Duplicator
+ // Casing
TAE.registerTexture(0, 3, new GTPP_CopiedBlockTexture(this, 6, 3));
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".4.name", "Sparge Tower Exterior Casing"); // Sparge Tower Casing
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Sparge Tower Exterior Casing"); // Sparge
+ // Tower
+ // Casing
TAE.registerTexture(0, 4, new GTPP_CopiedBlockTexture(this, 6, 4));
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".5.name", "Sturdy Printer Casing"); // Unused
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Sturdy Printer Casing"); // Unused
TAE.registerTexture(1, 10, new GTPP_CopiedBlockTexture(this, 6, 5));
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".6.name", "Forge Casing"); // Forge Hammer Casing
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Forge Casing"); // Forge Hammer
+ // Casing
TAE.registerTexture(1, 11, new GTPP_CopiedBlockTexture(this, 6, 6));
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Neutron Pulse Manipulator");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Cosmic Fabric Manipulator");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Infinity Infused Manipulator");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "SpaceTime Continuum Ripper");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Neutron Shielding Core");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".12.name", "Cosmic Fabric Shielding Core");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".13.name", "Infinity Infused Shielding Core");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".12.name", "Cosmic Fabric Shielding Core");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".13.name", "Infinity Infused Shielding Core");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", "SpaceTime Bending Core");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Force Field Glass");
@@ -134,8 +135,8 @@ public class GregtechMetaCasingBlocks5 extends GregtechMetaCasingBlocksAbstract
@Override
@SideOnly(Side.CLIENT)
- public IIcon getIcon(
- final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) {
+ public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
+ final int aSide) {
final GregtechMetaCasingBlocks5 i = this;
return mGrinderOverlayHandler.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i);
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java
index 683159de98..2d4973aa9f 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java
@@ -1,13 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.blocks;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.GregTech_API;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.common.blocks.GT_Block_Casings_Abstract;
-import gtPlusPlus.core.creative.AddToCreativeTab;
import java.util.List;
import java.util.Random;
+
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -22,15 +17,23 @@ import net.minecraft.util.StatCollector;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.GregTech_API;
+import gregtech.api.util.GT_LanguageManager;
+import gregtech.common.blocks.GT_Block_Casings_Abstract;
+import gtPlusPlus.core.creative.AddToCreativeTab;
+
public abstract class GregtechMetaCasingBlocksAbstract extends GT_Block_Casings_Abstract {
- public GregtechMetaCasingBlocksAbstract(
- final Class<? extends ItemBlock> aItemClass, final String aName, final Material aMaterial) {
+
+ public GregtechMetaCasingBlocksAbstract(final Class<? extends ItemBlock> aItemClass, final String aName,
+ final Material aMaterial) {
super(aItemClass, aName, aMaterial);
this.setStepSound(soundTypeMetal);
this.setCreativeTab(AddToCreativeTab.tabMachines);
GregTech_API.registerMachineBlock(this, -1);
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + "." + 32767 + ".name", "Any Sub Block of this");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + "." + 32767 + ".name", "Any Sub Block of this");
}
@Override
@@ -101,16 +104,16 @@ public abstract class GregtechMetaCasingBlocksAbstract extends GT_Block_Casings_
}
@Override
- public void breakBlock(
- final World aWorld, final int aX, final int aY, final int aZ, final Block aBlock, final int aMetaData) {
+ public void breakBlock(final World aWorld, final int aX, final int aY, final int aZ, final Block aBlock,
+ final int aMetaData) {
if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) {
GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ);
}
}
@Override
- public boolean canCreatureSpawn(
- final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) {
+ public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y,
+ final int z) {
return false;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksPipeGearbox.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksPipeGearbox.java
index 22c1d87b4e..90fff051eb 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksPipeGearbox.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksPipeGearbox.java
@@ -1,5 +1,10 @@
package gtPlusPlus.xmod.gregtech.common.blocks;
+import java.util.HashMap;
+
+import net.minecraft.util.IIcon;
+import net.minecraft.world.IBlockAccess;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Textures;
@@ -7,9 +12,6 @@ import gregtech.api.util.GT_LanguageManager;
import gregtech.common.blocks.GT_Material_Casings;
import gtPlusPlus.core.material.ALLOY;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.HashMap;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
public class GregtechMetaCasingBlocksPipeGearbox extends GregtechMetaCasingBlocksAbstract {
@@ -19,8 +21,8 @@ public class GregtechMetaCasingBlocksPipeGearbox extends GregtechMetaCasingBlock
super(GregtechMetaCasingItems.class, "gtplusplus.blockcasings.pipesgears", GT_Material_Casings.INSTANCE);
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Eglin Steel Gear Box Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Inconel-792 Gear Box Casing");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".2.name", "Incoloy MA956 Gear Box Casing");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".2.name", "Incoloy MA956 Gear Box Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Nitinol-60 Gear Box Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Zeron-100 Gear Box Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Pikyonium Gear Box Casing");
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java
index 9927060164..f86c6af265 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java
@@ -3,6 +3,7 @@ package gtPlusPlus.xmod.gregtech.common.blocks;
import net.minecraft.block.Block;
public class GregtechMetaCasingItems extends GregtechMetaItemCasingsAbstract {
+
public GregtechMetaCasingItems(final Block par1) {
super(par1);
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java
index ba4929c011..13d58aac5f 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java
@@ -1,18 +1,20 @@
package gtPlusPlus.xmod.gregtech.common.blocks;
import java.util.List;
+
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public class GregtechMetaItemCasings1 extends GregtechMetaItemCasingsAbstract {
+
public GregtechMetaItemCasings1(final Block par1) {
super(par1);
}
@Override
- public void addInformation(
- final ItemStack aStack, final EntityPlayer aPlayer, final List aList, final boolean aF3_H) {
+ public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, final List aList,
+ final boolean aF3_H) {
super.addInformation(aStack, aPlayer, aList, aF3_H);
switch (this.getDamage(aStack)) {
case 0:
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java
index d9102f0994..d6ebda4199 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java
@@ -1,26 +1,28 @@
package gtPlusPlus.xmod.gregtech.common.blocks;
-import gregtech.api.util.GT_LanguageManager;
import java.util.List;
+
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
+import gregtech.api.util.GT_LanguageManager;
+
public abstract class GregtechMetaItemCasingsAbstract extends ItemBlock {
- protected final String mCasing_Centrifuge = GT_LanguageManager.addStringLocalization(
- "mu.centrifugecasing", "Warning! Standing in the Centrifuge not recommended");
- protected final String mCasing_CokeOven =
- GT_LanguageManager.addStringLocalization("mu.cokeoven", "Sturdy and Strong");
- protected final String mCasing_CokeCoil1 =
- GT_LanguageManager.addStringLocalization("mu.coil01tooltip", "Base Heating Capacity = 1350 Kelvin");
- protected final String mCasing_CokeCoil2 =
- GT_LanguageManager.addStringLocalization("mu.coil02tooltip", "Base Heating Capacity = 2275 Kelvin");
- protected final String mNoMobsToolTip =
- GT_LanguageManager.addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block");
- protected final String mNoTileEntityToolTip =
- GT_LanguageManager.addStringLocalization("gt.notileentityinthisblock", "This is NOT a TileEntity!");
+ protected final String mCasing_Centrifuge = GT_LanguageManager
+ .addStringLocalization("mu.centrifugecasing", "Warning! Standing in the Centrifuge not recommended");
+ protected final String mCasing_CokeOven = GT_LanguageManager
+ .addStringLocalization("mu.cokeoven", "Sturdy and Strong");
+ protected final String mCasing_CokeCoil1 = GT_LanguageManager
+ .addStringLocalization("mu.coil01tooltip", "Base Heating Capacity = 1350 Kelvin");
+ protected final String mCasing_CokeCoil2 = GT_LanguageManager
+ .addStringLocalization("mu.coil02tooltip", "Base Heating Capacity = 2275 Kelvin");
+ protected final String mNoMobsToolTip = GT_LanguageManager
+ .addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block");
+ protected final String mNoTileEntityToolTip = GT_LanguageManager
+ .addStringLocalization("gt.notileentityinthisblock", "This is NOT a TileEntity!");
public GregtechMetaItemCasingsAbstract(final Block par1) {
super(par1);
@@ -40,8 +42,8 @@ public abstract class GregtechMetaItemCasingsAbstract extends ItemBlock {
}
@Override
- public void addInformation(
- final ItemStack aStack, final EntityPlayer aPlayer, final List aList, final boolean aF3_H) {
+ public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, final List aList,
+ final boolean aF3_H) {
super.addInformation(aStack, aPlayer, aList, aF3_H);
switch (this.getDamage(aStack)) {
case 0:
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java
index f0a69e49d3..5c386fe59a 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java
@@ -1,5 +1,12 @@
package gtPlusPlus.xmod.gregtech.common.blocks;
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+
import gregtech.api.enums.TAE;
import gregtech.api.enums.Textures;
import gregtech.api.util.GT_LanguageManager;
@@ -7,11 +14,6 @@ import gregtech.common.blocks.GT_Material_Casings;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.api.objects.GTPP_CopiedBlockTexture;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
public class GregtechMetaSpecialMachineCasings extends GregtechMetaCasingBlocksAbstract {
@@ -38,13 +40,13 @@ public class GregtechMetaSpecialMachineCasings extends GregtechMetaCasingBlocksA
// Don't register these Textures, They already exist within vanilla GT. (May not exist in 5.08)
}
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Strong Bronze Machine Casing");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".1.name", "Sturdy Aluminium Machine Casing");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".2.name", "Vigorous Laurenium Machine Casing");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".1.name", "Sturdy Aluminium Machine Casing");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".2.name", "Vigorous Laurenium Machine Casing");
TAE.registerTexture(84, new GTPP_CopiedBlockTexture(this, 6, 2));
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".3.name", "Rugged Botmium Machine Casing");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".3.name", "Rugged Botmium Machine Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "");
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java
index 47b9d9b093..3d1aa88f6c 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java
@@ -1,5 +1,13 @@
package gtPlusPlus.xmod.gregtech.common.blocks;
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.IBlockAccess;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.TAE;
@@ -10,12 +18,6 @@ import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.api.objects.GTPP_CopiedBlockTexture;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.turbine.LargeTurbineTextureHandler;
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
public class GregtechMetaSpecialMultiCasings extends GregtechMetaCasingBlocksAbstract {
@@ -38,29 +40,29 @@ public class GregtechMetaSpecialMultiCasings extends GregtechMetaCasingBlocksAbs
public GregtechMetaSpecialMultiCasings() {
super(SpecialCasingItemBlock.class, "gtplusplus.blockspecialcasings.1", GT_Material_Casings.INSTANCE);
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Turbine Shaft");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".1.name", "Reinforced Steam Turbine Casing");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".2.name", "Reinforced HP Steam Turbine Casing");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".3.name", "Reinforced Gas Turbine Casing");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".4.name", "Reinforced Plasma Turbine Casing");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".1.name", "Reinforced Steam Turbine Casing");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".2.name", "Reinforced HP Steam Turbine Casing");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".3.name", "Reinforced Gas Turbine Casing");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".4.name", "Reinforced Plasma Turbine Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Tesla Containment Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Structural Solar Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Salt Containment Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Thermally Insulated Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Flotation Cell Casings");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Reinforced Engine Casing");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".11.name", "Molecular Containment Casing");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".12.name", "High Voltage Current Capacitor");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".11.name", "Molecular Containment Casing");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".12.name", "High Voltage Current Capacitor");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Particle Containment Casing");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".14.name", "Reinforced Heat Exchanger Casing");
- GT_LanguageManager.addStringLocalization(
- this.getUnlocalizedName() + ".15.name", "Reinforced SC Turbine Casing");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".14.name", "Reinforced Heat Exchanger Casing");
+ GT_LanguageManager
+ .addStringLocalization(this.getUnlocalizedName() + ".15.name", "Reinforced SC Turbine Casing");
TAE.registerTexture(1, 12, new GTPP_CopiedBlockTexture(this, 6, 14));
GregtechItemList.Casing_Turbine_Shaft.set(new ItemStack(this, 1, 0));
@@ -83,8 +85,8 @@ public class GregtechMetaSpecialMultiCasings extends GregtechMetaCasingBlocksAbs
@Override
@SideOnly(Side.CLIENT)
- public IIcon getIcon(
- final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) {
+ public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
+ final int aSide) {
return LargeTurbineTextureHandler.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, this);
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java
index 664f949b30..6237ce7a9e 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java
@@ -1,5 +1,13 @@
package gtPlusPlus.xmod.gregtech.common.blocks;
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.IBlockAccess;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Textures;
@@ -7,12 +15,6 @@ import gregtech.api.util.GT_LanguageManager;
import gregtech.common.blocks.GT_Material_Casings;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
public class GregtechMetaSpecialMultiCasings2 extends GregtechMetaCasingBlocksAbstract {
@@ -70,8 +72,8 @@ public class GregtechMetaSpecialMultiCasings2 extends GregtechMetaCasingBlocksAb
@Override
@SideOnly(Side.CLIENT)
- public IIcon getIcon(
- final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) {
+ public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
+ final int aSide) {
return getStaticIcon((byte) aSide, (byte) aWorld.getBlockMetadata(xCoord, yCoord, zCoord));
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java
index b511926137..39171a1c05 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java
@@ -1,16 +1,18 @@
package gtPlusPlus.xmod.gregtech.common.blocks;
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Textures;
import gregtech.api.util.GT_LanguageManager;
import gregtech.common.blocks.GT_Material_Casings;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
public class GregtechMetaTieredCasingBlocks1 extends GregtechMetaCasingBlocksAbstract {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java
index 7ffa95c081..f42768c451 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java
@@ -1,5 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.blocks.fluid;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidRegistry;
+
import gregtech.api.enums.OrePrefixes;
import gregtech.api.util.GT_OreDictUnificator;
import gtPlusPlus.api.objects.Logger;
@@ -8,8 +11,6 @@ import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.minecraft.FluidUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidRegistry;
public class GregtechFluidHandler {
@@ -21,20 +22,32 @@ public class GregtechFluidHandler {
private static void start() {
- /* Meta_GT_Proxy.addFluid("lubricant", "Lubricant", Materials.Lubricant, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Lubricant, 1L), ItemUtils.getEmptyCell(), 1000);
- Meta_GT_Proxy.addFluid("creosote", "Creosote Oil", Materials.Creosote, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Creosote, 1L), ItemUtils.getEmptyCell(), 1000);
- Meta_GT_Proxy.addFluid("seedoil", "Seed Oil", Materials.SeedOil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SeedOil, 1L), ItemUtils.getEmptyCell(), 1000);
- Meta_GT_Proxy.addFluid("fishoil", "Fish Oil", Materials.FishOil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.FishOil, 1L), ItemUtils.getEmptyCell(), 1000);
- Meta_GT_Proxy.addFluid("oil", "Oil", Materials.Oil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oil, 1L), ItemUtils.getEmptyCell(), 1000);
- Meta_GT_Proxy.addFluid("fuel", "Diesel", Materials.Fuel, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 1L), ItemUtils.getEmptyCell(), 1000);
- Meta_GT_Proxy.addFluid("for.honey", "Honey", Materials.Honey, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Honey, 1L), ItemUtils.getEmptyCell(), 1000);
- Meta_GT_Proxy.addFluid("biomass", "Biomass", Materials.Biomass, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Biomass, 1L), ItemUtils.getEmptyCell(), 1000);
- Meta_GT_Proxy.addFluid("bioethanol", "Bio Ethanol", Materials.Ethanol, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ethanol, 1L), ItemUtils.getEmptyCell(), 1000);
- Meta_GT_Proxy.addFluid("sulfuricacid", "Sulfuric Acid", Materials.SulfuricAcid, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricAcid, 1L), ItemUtils.getEmptyCell(), 1000);
- Meta_GT_Proxy.addFluid("milk", "Milk", Materials.Milk, 1, 290, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Milk, 1L), ItemUtils.getEmptyCell(), 1000);
- Meta_GT_Proxy.addFluid("mcguffium", "Mc Guffium 239", Materials.McGuffium239, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.McGuffium239, 1L), ItemUtils.getEmptyCell(), 1000);
- Meta_GT_Proxy.addFluid("glue", "Glue", Materials.Glue, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glue, 1L), ItemUtils.getEmptyCell(), 1000);
- */
+ /*
+ * Meta_GT_Proxy.addFluid("lubricant", "Lubricant", Materials.Lubricant, 1, 295,
+ * GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Lubricant, 1L), ItemUtils.getEmptyCell(), 1000);
+ * Meta_GT_Proxy.addFluid("creosote", "Creosote Oil", Materials.Creosote, 1, 295,
+ * GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Creosote, 1L), ItemUtils.getEmptyCell(), 1000);
+ * Meta_GT_Proxy.addFluid("seedoil", "Seed Oil", Materials.SeedOil, 1, 295,
+ * GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SeedOil, 1L), ItemUtils.getEmptyCell(), 1000);
+ * Meta_GT_Proxy.addFluid("fishoil", "Fish Oil", Materials.FishOil, 1, 295,
+ * GT_OreDictUnificator.get(OrePrefixes.cell, Materials.FishOil, 1L), ItemUtils.getEmptyCell(), 1000);
+ * Meta_GT_Proxy.addFluid("oil", "Oil", Materials.Oil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell,
+ * Materials.Oil, 1L), ItemUtils.getEmptyCell(), 1000); Meta_GT_Proxy.addFluid("fuel", "Diesel", Materials.Fuel,
+ * 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 1L), ItemUtils.getEmptyCell(), 1000);
+ * Meta_GT_Proxy.addFluid("for.honey", "Honey", Materials.Honey, 1, 295,
+ * GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Honey, 1L), ItemUtils.getEmptyCell(), 1000);
+ * Meta_GT_Proxy.addFluid("biomass", "Biomass", Materials.Biomass, 1, 295,
+ * GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Biomass, 1L), ItemUtils.getEmptyCell(), 1000);
+ * Meta_GT_Proxy.addFluid("bioethanol", "Bio Ethanol", Materials.Ethanol, 1, 295,
+ * GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ethanol, 1L), ItemUtils.getEmptyCell(), 1000);
+ * Meta_GT_Proxy.addFluid("sulfuricacid", "Sulfuric Acid", Materials.SulfuricAcid, 1, 295,
+ * GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricAcid, 1L), ItemUtils.getEmptyCell(), 1000);
+ * Meta_GT_Proxy.addFluid("milk", "Milk", Materials.Milk, 1, 290, GT_OreDictUnificator.get(OrePrefixes.cell,
+ * Materials.Milk, 1L), ItemUtils.getEmptyCell(), 1000); Meta_GT_Proxy.addFluid("mcguffium", "Mc Guffium 239",
+ * Materials.McGuffium239, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.McGuffium239, 1L),
+ * ItemUtils.getEmptyCell(), 1000); Meta_GT_Proxy.addFluid("glue", "Glue", Materials.Glue, 1, 295,
+ * GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glue, 1L), ItemUtils.getEmptyCell(), 1000);
+ */
if (!LoadedMods.ThermalFoundation) {
@@ -90,7 +103,10 @@ public class GregtechFluidHandler {
generateIC2FluidCell("HydrofluoricAcid");
FluidUtils.generateFluidNoPrefix(
- "SulfurDioxide", "High Quality Sulfur Dioxide", 263, GT_Materials.SulfurDioxide.mRGBa);
+ "SulfurDioxide",
+ "High Quality Sulfur Dioxide",
+ 263,
+ GT_Materials.SulfurDioxide.mRGBa);
FluidUtils.addGtFluid(
"sulfurousAcid",
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java
index 467602ce04..ef2d25cf3e 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java
@@ -1,10 +1,11 @@
package gtPlusPlus.xmod.gregtech.common.blocks.textures;
-import gregtech.api.enums.Textures;
-import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
+import gregtech.api.enums.Textures;
+import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks;
+
public class CasingTextureHandler {
// private static final TexturesGregtech59 gregtech59 = new TexturesGregtech59();
@@ -14,46 +15,46 @@ public class CasingTextureHandler {
public static IIcon getIcon(final int aSide, final int aMeta) { // Texture ID's. case 0 == ID[57]
if ((aMeta >= 0) && (aMeta < 16)) {
switch (aMeta) {
- // Centrifuge
+ // Centrifuge
case 0:
return TexturesGtBlock.Casing_Material_Centrifuge.getIcon();
- // Coke Oven Frame
+ // Coke Oven Frame
case 1:
return TexturesGtBlock.Casing_Material_Tantalloy61.getIcon();
- // Coke Oven Casing Tier 1
+ // Coke Oven Casing Tier 1
case 2:
return Textures.BlockIcons.MACHINE_CASING_FIREBOX_BRONZE.getIcon();
- // Coke Oven Casing Tier 2
+ // Coke Oven Casing Tier 2
case 3:
return Textures.BlockIcons.MACHINE_CASING_FIREBOX_STEEL.getIcon();
- // Material Press Casings
+ // Material Press Casings
case 4:
return Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon();
- // Electrolyzer Casings
+ // Electrolyzer Casings
case 5:
return TexturesGtBlock.Casing_Material_Potin.getIcon();
- // Broken Blue Fusion Casings
+ // Broken Blue Fusion Casings
case 6:
return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon();
- // Maceration Stack Casings
+ // Maceration Stack Casings
case 7:
return TexturesGtBlock.Casing_Material_Tumbaga.getIcon();
- // Broken Pink Fusion Casings
+ // Broken Pink Fusion Casings
case 8:
return TexturesGtBlock.TEXTURE_ORGANIC_PANEL_A_GLOWING.getIcon();
- // Matter Fabricator Casings
+ // Matter Fabricator Casings
case 9:
return TexturesGtBlock.TEXTURE_METAL_PANEL_F.getIcon();
- // Iron Blast Fuance Textures
+ // Iron Blast Fuance Textures
case 10:
return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon();
- // Multitank Exterior Casing
+ // Multitank Exterior Casing
case 11:
return TexturesGtBlock.Casing_Material_Grisium.getIcon();
- // Reactor Casing I
+ // Reactor Casing I
case 12:
return TexturesGtBlock.Casing_Material_Stellite.getIcon();
- // Reactor Casing II
+ // Reactor Casing II
case 13:
return TexturesGtBlock.Casing_Material_Zeron100.getIcon();
case 14:
@@ -68,17 +69,13 @@ public class CasingTextureHandler {
return Textures.BlockIcons.MACHINE_CASING_GEARBOX_TUNGSTENSTEEL.getIcon();
}
- public static IIcon handleCasingsGT(
- final IBlockAccess aWorld,
- final int xCoord,
- final int yCoord,
- final int zCoord,
- final int aSide,
- final GregtechMetaCasingBlocks thisBlock) {
- /*if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
- return gregtech59.handleCasingsGT59(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
- }
- return gregtech58.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);*/
+ public static IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
+ final int aSide, final GregtechMetaCasingBlocks thisBlock) {
+ /*
+ * if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ return gregtech59.handleCasingsGT59(aWorld, xCoord, yCoord,
+ * zCoord, aSide, thisBlock); } return gregtech58.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide,
+ * thisBlock);
+ */
return gregtechX.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java
index 20519c0bb1..1d0f5e0699 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java
@@ -1,8 +1,9 @@
package gtPlusPlus.xmod.gregtech.common.blocks.textures;
-import gregtech.api.enums.Textures;
import net.minecraft.util.IIcon;
+import gregtech.api.enums.Textures;
+
public class CasingTextureHandler2 {
public static IIcon getIcon(final int aSide, final int aMeta) { // Texture ID's. case 0 == ID[57]
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java
index da2a09c7d2..c3d2e90c12 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java
@@ -1,8 +1,9 @@
package gtPlusPlus.xmod.gregtech.common.blocks.textures;
-import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks3;
import net.minecraft.util.IIcon;
+import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks3;
+
public class CasingTextureHandler3 {
public static IIcon getIcon(final int aSide, final int aMeta) { // Texture ID's. case 0 == ID[57]
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java
index 2eef9d37f0..129dbd13cc 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java
@@ -1,13 +1,14 @@
package gtPlusPlus.xmod.gregtech.common.blocks.textures;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.IBlockAccess;
+
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialCentrifuge;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
public class TexturesCentrifugeMultiblock {
@@ -49,37 +50,15 @@ public class TexturesCentrifugeMultiblock {
private static CustomIcon frontFace_8 = (GT8_9);
private static CustomIcon frontFaceActive_8 = (GT8_9_Active);
- CustomIcon[] CENTRIFUGE = new CustomIcon[] {
- frontFace_0,
- frontFace_1,
- frontFace_2,
- frontFace_3,
- frontFace_4,
- frontFace_5,
- frontFace_6,
- frontFace_7,
- frontFace_8
- };
+ CustomIcon[] CENTRIFUGE = new CustomIcon[] { frontFace_0, frontFace_1, frontFace_2, frontFace_3, frontFace_4,
+ frontFace_5, frontFace_6, frontFace_7, frontFace_8 };
- CustomIcon[] CENTRIFUGE_ACTIVE = new CustomIcon[] {
- frontFaceActive_0,
- frontFaceActive_1,
- frontFaceActive_2,
- frontFaceActive_3,
- frontFaceActive_4,
- frontFaceActive_5,
- frontFaceActive_6,
- frontFaceActive_7,
- frontFaceActive_8
- };
+ CustomIcon[] CENTRIFUGE_ACTIVE = new CustomIcon[] { frontFaceActive_0, frontFaceActive_1, frontFaceActive_2,
+ frontFaceActive_3, frontFaceActive_4, frontFaceActive_5, frontFaceActive_6, frontFaceActive_7,
+ frontFaceActive_8 };
- public IIcon handleCasingsGT(
- final IBlockAccess aWorld,
- final int xCoord,
- final int yCoord,
- final int zCoord,
- final int aSide,
- final GregtechMetaCasingBlocks thisBlock) {
+ public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
+ final int aSide, final GregtechMetaCasingBlocks thisBlock) {
return this.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
}
@@ -88,17 +67,13 @@ public class TexturesCentrifugeMultiblock {
if (!(tTileEntity instanceof IGregTechTileEntity)) return 0;
IGregTechTileEntity tTile = (IGregTechTileEntity) tTileEntity;
if (tTile.getMetaTileEntity() instanceof GregtechMetaTileEntity_IndustrialCentrifuge
- && tTile.getFrontFacing() == aSide) return tTile.isActive() ? 1 : 2;
+ && tTile.getFrontFacing() == aSide)
+ return tTile.isActive() ? 1 : 2;
return 0;
}
- public IIcon handleCasingsGT58(
- final IBlockAccess aWorld,
- final int xCoord,
- final int yCoord,
- final int zCoord,
- final int aSide,
- final GregtechMetaCasingBlocks thisBlock) {
+ public IIcon handleCasingsGT58(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
+ final int aSide, final GregtechMetaCasingBlocks thisBlock) {
final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
if (tMeta != 0) {
return CasingTextureHandler.getIcon(aSide, tMeta);
@@ -110,9 +85,8 @@ public class TexturesCentrifugeMultiblock {
for (int j = -1; j < 2; j++) {
if (i == 0 && j == 0) continue;
if (isCentrifugeControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, aSide) != 0) {
- IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity)
- aWorld.getTileEntity(xCoord + j, yCoord, zCoord + i))
- .getMetaTileEntity();
+ IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld
+ .getTileEntity(xCoord + j, yCoord, zCoord + i)).getMetaTileEntity();
return getIconByIndex(tMetaTileEntity, 4 - i * 3 - j);
}
}
@@ -123,9 +97,8 @@ public class TexturesCentrifugeMultiblock {
for (int j = -1; j < 2; j++) {
if (i == 0 && j == 0) continue;
if (isCentrifugeControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, aSide) != 0) {
- IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity)
- aWorld.getTileEntity(xCoord + j, yCoord + i, zCoord))
- .getMetaTileEntity();
+ IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld
+ .getTileEntity(xCoord + j, yCoord + i, zCoord)).getMetaTileEntity();
return getIconByIndex(tMetaTileEntity, 4 + i * 3 - j * tInvertLeftRightMod);
}
}
@@ -136,9 +109,8 @@ public class TexturesCentrifugeMultiblock {
for (int j = -1; j < 2; j++) {
if (i == 0 && j == 0) continue;
if (isCentrifugeControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, aSide) != 0) {
- IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity)
- aWorld.getTileEntity(xCoord, yCoord + i, zCoord + j))
- .getMetaTileEntity();
+ IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld
+ .getTileEntity(xCoord, yCoord + i, zCoord + j)).getMetaTileEntity();
return getIconByIndex(tMetaTileEntity, 4 + i * 3 + j * tInvertLeftRightMod);
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java
index 2298e0731e..d8c84f1886 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java
@@ -1,42 +1,43 @@
package gtPlusPlus.xmod.gregtech.common.blocks.textures;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.IBlockAccess;
+
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialCentrifuge;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
public class TexturesGregtech58 {
- private static Textures.BlockIcons.CustomIcon GT8_1_Active =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE1");
+ private static Textures.BlockIcons.CustomIcon GT8_1_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ACTIVE1");
private static Textures.BlockIcons.CustomIcon GT8_1 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE1");
- private static Textures.BlockIcons.CustomIcon GT8_2_Active =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE2");
+ private static Textures.BlockIcons.CustomIcon GT8_2_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ACTIVE2");
private static Textures.BlockIcons.CustomIcon GT8_2 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE2");
- private static Textures.BlockIcons.CustomIcon GT8_3_Active =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE3");
+ private static Textures.BlockIcons.CustomIcon GT8_3_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ACTIVE3");
private static Textures.BlockIcons.CustomIcon GT8_3 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE3");
- private static Textures.BlockIcons.CustomIcon GT8_4_Active =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE4");
+ private static Textures.BlockIcons.CustomIcon GT8_4_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ACTIVE4");
private static Textures.BlockIcons.CustomIcon GT8_4 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE4");
- private static Textures.BlockIcons.CustomIcon GT8_5_Active =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE5");
+ private static Textures.BlockIcons.CustomIcon GT8_5_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ACTIVE5");
private static Textures.BlockIcons.CustomIcon GT8_5 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE5");
- private static Textures.BlockIcons.CustomIcon GT8_6_Active =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE6");
+ private static Textures.BlockIcons.CustomIcon GT8_6_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ACTIVE6");
private static Textures.BlockIcons.CustomIcon GT8_6 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE6");
- private static Textures.BlockIcons.CustomIcon GT8_7_Active =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE7");
+ private static Textures.BlockIcons.CustomIcon GT8_7_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ACTIVE7");
private static Textures.BlockIcons.CustomIcon GT8_7 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE7");
- private static Textures.BlockIcons.CustomIcon GT8_8_Active =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE8");
+ private static Textures.BlockIcons.CustomIcon GT8_8_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ACTIVE8");
private static Textures.BlockIcons.CustomIcon GT8_8 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE8");
- private static Textures.BlockIcons.CustomIcon GT8_9_Active =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE9");
+ private static Textures.BlockIcons.CustomIcon GT8_9_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ACTIVE9");
private static Textures.BlockIcons.CustomIcon GT8_9 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE9");
private static Textures.BlockIcons.CustomIcon frontFace_0 = (GT8_1);
@@ -58,47 +59,20 @@ public class TexturesGregtech58 {
private static Textures.BlockIcons.CustomIcon frontFace_8 = (GT8_9);
private static Textures.BlockIcons.CustomIcon frontFaceActive_8 = (GT8_9_Active);
- Textures.BlockIcons.CustomIcon[] TURBINE = new Textures.BlockIcons.CustomIcon[] {
- frontFace_0,
- frontFace_1,
- frontFace_2,
- frontFace_3,
- frontFace_4,
- frontFace_5,
- frontFace_6,
- frontFace_7,
- frontFace_8
- };
+ Textures.BlockIcons.CustomIcon[] TURBINE = new Textures.BlockIcons.CustomIcon[] { frontFace_0, frontFace_1,
+ frontFace_2, frontFace_3, frontFace_4, frontFace_5, frontFace_6, frontFace_7, frontFace_8 };
- Textures.BlockIcons.CustomIcon[] TURBINE_ACTIVE = new Textures.BlockIcons.CustomIcon[] {
- frontFaceActive_0,
- frontFaceActive_1,
- frontFaceActive_2,
- frontFaceActive_3,
- frontFaceActive_4,
- frontFaceActive_5,
- frontFaceActive_6,
- frontFaceActive_7,
- frontFaceActive_8
- };
+ Textures.BlockIcons.CustomIcon[] TURBINE_ACTIVE = new Textures.BlockIcons.CustomIcon[] { frontFaceActive_0,
+ frontFaceActive_1, frontFaceActive_2, frontFaceActive_3, frontFaceActive_4, frontFaceActive_5,
+ frontFaceActive_6, frontFaceActive_7, frontFaceActive_8 };
- public IIcon handleCasingsGT(
- final IBlockAccess aWorld,
- final int xCoord,
- final int yCoord,
- final int zCoord,
- final int aSide,
- final GregtechMetaCasingBlocks thisBlock) {
+ public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
+ final int aSide, final GregtechMetaCasingBlocks thisBlock) {
return this.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
}
- public IIcon handleCasingsGT58(
- final IBlockAccess aWorld,
- final int xCoord,
- final int yCoord,
- final int zCoord,
- final int aSide,
- final GregtechMetaCasingBlocks thisBlock) {
+ public IIcon handleCasingsGT58(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
+ final int aSide, final GregtechMetaCasingBlocks thisBlock) {
final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
if (((tMeta != 6) && (tMeta != 8) && (tMeta != 0))) {
return CasingTextureHandler.getIcon(aSide, tMeta);
@@ -275,19 +249,18 @@ public class TexturesGregtech58 {
return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon();
}
final boolean[] tConnectedSides = {
- (aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock)
- && (aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta),
- (aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock)
- && (aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta),
- (aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock)
- && (aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta),
- (aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock)
- && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta),
- (aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock)
- && (aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta),
- (aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock)
- && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta)
- };
+ (aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock)
+ && (aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta),
+ (aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock)
+ && (aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta),
+ (aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock)
+ && (aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta),
+ (aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock)
+ && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta),
+ (aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock)
+ && (aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta),
+ (aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock)
+ && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta) };
switch (aSide) {
case 0:
if (tConnectedSides[0]) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java
index 990db20285..45de7da05f 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java
@@ -1,52 +1,53 @@
package gtPlusPlus.xmod.gregtech.common.blocks.textures;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.IBlockAccess;
+
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialCentrifuge;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
public class TexturesGregtech59 {
- private static Textures.BlockIcons.CustomIcon GT8_1_Active =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE1");
- private static Textures.BlockIcons.CustomIcon GT8_1 =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST1");
- private static Textures.BlockIcons.CustomIcon GT8_2_Active =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE2");
- private static Textures.BlockIcons.CustomIcon GT8_2 =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST2");
- private static Textures.BlockIcons.CustomIcon GT8_3_Active =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE3");
- private static Textures.BlockIcons.CustomIcon GT8_3 =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST3");
- private static Textures.BlockIcons.CustomIcon GT8_4_Active =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE4");
- private static Textures.BlockIcons.CustomIcon GT8_4 =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST4");
- private static Textures.BlockIcons.CustomIcon GT8_5_Active =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE5");
- private static Textures.BlockIcons.CustomIcon GT8_5 =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST5");
- private static Textures.BlockIcons.CustomIcon GT8_6_Active =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE6");
- private static Textures.BlockIcons.CustomIcon GT8_6 =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST6");
- private static Textures.BlockIcons.CustomIcon GT8_7_Active =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE7");
- private static Textures.BlockIcons.CustomIcon GT8_7 =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST7");
- private static Textures.BlockIcons.CustomIcon GT8_8_Active =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE8");
- private static Textures.BlockIcons.CustomIcon GT8_8 =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST8");
- private static Textures.BlockIcons.CustomIcon GT8_9_Active =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE9");
- private static Textures.BlockIcons.CustomIcon GT8_9 =
- new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST9");
+ private static Textures.BlockIcons.CustomIcon GT8_1_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST_ACTIVE1");
+ private static Textures.BlockIcons.CustomIcon GT8_1 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST1");
+ private static Textures.BlockIcons.CustomIcon GT8_2_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST_ACTIVE2");
+ private static Textures.BlockIcons.CustomIcon GT8_2 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST2");
+ private static Textures.BlockIcons.CustomIcon GT8_3_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST_ACTIVE3");
+ private static Textures.BlockIcons.CustomIcon GT8_3 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST3");
+ private static Textures.BlockIcons.CustomIcon GT8_4_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST_ACTIVE4");
+ private static Textures.BlockIcons.CustomIcon GT8_4 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST4");
+ private static Textures.BlockIcons.CustomIcon GT8_5_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST_ACTIVE5");
+ private static Textures.BlockIcons.CustomIcon GT8_5 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST5");
+ private static Textures.BlockIcons.CustomIcon GT8_6_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST_ACTIVE6");
+ private static Textures.BlockIcons.CustomIcon GT8_6 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST6");
+ private static Textures.BlockIcons.CustomIcon GT8_7_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST_ACTIVE7");
+ private static Textures.BlockIcons.CustomIcon GT8_7 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST7");
+ private static Textures.BlockIcons.CustomIcon GT8_8_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST_ACTIVE8");
+ private static Textures.BlockIcons.CustomIcon GT8_8 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST8");
+ private static Textures.BlockIcons.CustomIcon GT8_9_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST_ACTIVE9");
+ private static Textures.BlockIcons.CustomIcon GT8_9 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST9");
private static Textures.BlockIcons.CustomIcon frontFace_0 = (GT8_1);
private static Textures.BlockIcons.CustomIcon frontFaceActive_0 = (GT8_1_Active);
@@ -67,47 +68,20 @@ public class TexturesGregtech59 {
private static Textures.BlockIcons.CustomIcon frontFace_8 = (GT8_9);
private static Textures.BlockIcons.CustomIcon frontFaceActive_8 = (GT8_9_Active);
- Textures.BlockIcons.CustomIcon[] TURBINE = new Textures.BlockIcons.CustomIcon[] {
- frontFace_0,
- frontFace_1,
- frontFace_2,
- frontFace_3,
- frontFace_4,
- frontFace_5,
- frontFace_6,
- frontFace_7,
- frontFace_8
- };
+ Textures.BlockIcons.CustomIcon[] TURBINE = new Textures.BlockIcons.CustomIcon[] { frontFace_0, frontFace_1,
+ frontFace_2, frontFace_3, frontFace_4, frontFace_5, frontFace_6, frontFace_7, frontFace_8 };
- Textures.BlockIcons.CustomIcon[] TURBINE_ACTIVE = new Textures.BlockIcons.CustomIcon[] {
- frontFaceActive_0,
- frontFaceActive_1,
- frontFaceActive_2,
- frontFaceActive_3,
- frontFaceActive_4,
- frontFaceActive_5,
- frontFaceActive_6,
- frontFaceActive_7,
- frontFaceActive_8
- };
+ Textures.BlockIcons.CustomIcon[] TURBINE_ACTIVE = new Textures.BlockIcons.CustomIcon[] { frontFaceActive_0,
+ frontFaceActive_1, frontFaceActive_2, frontFaceActive_3, frontFaceActive_4, frontFaceActive_5,
+ frontFaceActive_6, frontFaceActive_7, frontFaceActive_8 };
- public IIcon handleCasingsGT(
- final IBlockAccess aWorld,
- final int xCoord,
- final int yCoord,
- final int zCoord,
- final int aSide,
- final GregtechMetaCasingBlocks thisBlock) {
+ public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
+ final int aSide, final GregtechMetaCasingBlocks thisBlock) {
return this.handleCasingsGT59(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
}
- public IIcon handleCasingsGT59(
- final IBlockAccess aWorld,
- final int xCoord,
- final int yCoord,
- final int zCoord,
- final int aSide,
- final GregtechMetaCasingBlocks thisBlock) {
+ public IIcon handleCasingsGT59(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
+ final int aSide, final GregtechMetaCasingBlocks thisBlock) {
final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
if (((tMeta != 6) && (tMeta != 8) && (tMeta != 0))) {
return CasingTextureHandler.getIcon(aSide, tMeta);
@@ -284,19 +258,18 @@ public class TexturesGregtech59 {
return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon();
}
final boolean[] tConnectedSides = {
- (aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock)
- && (aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta),
- (aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock)
- && (aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta),
- (aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock)
- && (aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta),
- (aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock)
- && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta),
- (aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock)
- && (aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta),
- (aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock)
- && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta)
- };
+ (aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock)
+ && (aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta),
+ (aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock)
+ && (aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta),
+ (aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock)
+ && (aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta),
+ (aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock)
+ && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta),
+ (aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock)
+ && (aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta),
+ (aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock)
+ && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta) };
switch (aSide) {
case 0:
if (tConnectedSides[0]) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java
index e2d304572a..9e6c66fd93 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java
@@ -1,13 +1,14 @@
package gtPlusPlus.xmod.gregtech.common.blocks.textures;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.IBlockAccess;
+
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks5;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IsaMill;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
public class TexturesGrinderMultiblock {
@@ -49,29 +50,12 @@ public class TexturesGrinderMultiblock {
private static CustomIcon frontFace_8 = (GT8_9);
private static CustomIcon frontFaceActive_8 = (GT8_9_Active);
- CustomIcon[] GRINDER = new CustomIcon[] {
- frontFace_0,
- frontFace_1,
- frontFace_2,
- frontFace_3,
- frontFace_4,
- frontFace_5,
- frontFace_6,
- frontFace_7,
- frontFace_8
- };
+ CustomIcon[] GRINDER = new CustomIcon[] { frontFace_0, frontFace_1, frontFace_2, frontFace_3, frontFace_4,
+ frontFace_5, frontFace_6, frontFace_7, frontFace_8 };
- CustomIcon[] GRINDER_ACTIVE = new CustomIcon[] {
- frontFaceActive_0,
- frontFaceActive_1,
- frontFaceActive_2,
- frontFaceActive_3,
- frontFaceActive_4,
- frontFaceActive_5,
- frontFaceActive_6,
- frontFaceActive_7,
- frontFaceActive_8
- };
+ CustomIcon[] GRINDER_ACTIVE = new CustomIcon[] { frontFaceActive_0, frontFaceActive_1, frontFaceActive_2,
+ frontFaceActive_3, frontFaceActive_4, frontFaceActive_5, frontFaceActive_6, frontFaceActive_7,
+ frontFaceActive_8 };
private static int isIsaControllerWithSide(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
@@ -82,13 +66,8 @@ public class TexturesGrinderMultiblock {
return 0;
}
- public IIcon handleCasingsGT(
- final IBlockAccess aWorld,
- final int xCoord,
- final int yCoord,
- final int zCoord,
- final int aSide,
- final GregtechMetaCasingBlocks5 ii) {
+ public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
+ final int aSide, final GregtechMetaCasingBlocks5 ii) {
final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
if (tMeta != 1) {
return GregtechMetaCasingBlocks5.getStaticIcon(aSide, tMeta);
@@ -100,9 +79,8 @@ public class TexturesGrinderMultiblock {
for (int j = -1; j < 2; j++) {
if (i == 0 && j == 0) continue;
if (isIsaControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, aSide) != 0) {
- IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity)
- aWorld.getTileEntity(xCoord + j, yCoord, zCoord + i))
- .getMetaTileEntity();
+ IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld
+ .getTileEntity(xCoord + j, yCoord, zCoord + i)).getMetaTileEntity();
return getIconByIndex(tMetaTileEntity, 4 - i * 3 - j);
}
}
@@ -113,9 +91,8 @@ public class TexturesGrinderMultiblock {
for (int j = -1; j < 2; j++) {
if (i == 0 && j == 0) continue;
if (isIsaControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, aSide) != 0) {
- IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity)
- aWorld.getTileEntity(xCoord + j, yCoord + i, zCoord))
- .getMetaTileEntity();
+ IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld
+ .getTileEntity(xCoord + j, yCoord + i, zCoord)).getMetaTileEntity();
return getIconByIndex(tMetaTileEntity, 4 + i * 3 - j * tInvertLeftRightMod);
}
}
@@ -126,9 +103,8 @@ public class TexturesGrinderMultiblock {
for (int j = -1; j < 2; j++) {
if (i == 0 && j == 0) continue;
if (isIsaControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, aSide) != 0) {
- IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity)
- aWorld.getTileEntity(xCoord, yCoord + i, zCoord + j))
- .getMetaTileEntity();
+ IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld
+ .getTileEntity(xCoord, yCoord + i, zCoord + j)).getMetaTileEntity();
return getIconByIndex(tMetaTileEntity, 4 + i * 3 + j * tInvertLeftRightMod);
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
index 9ee32bcaa6..aede466688 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
@@ -1,5 +1,9 @@
package gtPlusPlus.xmod.gregtech.common.blocks.textures;
+import net.minecraft.client.renderer.texture.TextureMap;
+import net.minecraft.util.IIcon;
+import net.minecraft.util.ResourceLocation;
+
import gregtech.api.GregTech_API;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.ITexture;
@@ -7,9 +11,6 @@ import gregtech.api.objects.GT_RenderedTexture;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.api.objects.data.AutoMap;
import gtPlusPlus.core.lib.CORE;
-import net.minecraft.client.renderer.texture.TextureMap;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.ResourceLocation;
public class TexturesGtBlock {
@@ -17,8 +18,7 @@ public class TexturesGtBlock {
private static AutoMap<Runnable> mCustomiconMap = new AutoMap<Runnable>();
- static {
- }
+ static {}
// public static ITexture[] CASING_BLOCKS_GTPP = new ITexture[256];
@@ -27,6 +27,7 @@ public class TexturesGtBlock {
*/
public static class CustomIcon implements IIconContainer, Runnable {
+
protected IIcon mIcon;
protected String mIconName;
protected String mModID;
@@ -56,8 +57,7 @@ public class TexturesGtBlock {
@Override
public void run() {
this.mIcon = GregTech_API.sBlockIcons.registerIcon(this.mModID + ":" + this.mIconName);
- Logger.WARNING(
- "FIND ME _ Processing texture: " + this.getTextureFile().getResourcePath());
+ Logger.WARNING("FIND ME _ Processing texture: " + this.getTextureFile().getResourcePath());
}
@Override
@@ -67,6 +67,7 @@ public class TexturesGtBlock {
}
public static class VanillaIcon implements IIconContainer, Runnable {
+
protected IIcon mIcon;
protected String mIconName;
@@ -103,9 +104,8 @@ public class TexturesGtBlock {
}
/*
- * Add Some Custom Textures below.
- * I am not sure whether or not I need to declare them as such, but better to be safe than sorry.
- * Right?
+ * Add Some Custom Textures below. I am not sure whether or not I need to declare them as such, but better to be
+ * safe than sorry. Right?
*/
// Vanilla Textures
@@ -117,15 +117,15 @@ public class TexturesGtBlock {
// Energy overlays
public static final CustomIcon OVERLAY_ENERGY_OUT_BUFFER = new CustomIcon("iconsets/OVERLAY_ENERGY_OUT_BUFFER");
- public static final CustomIcon OVERLAY_ENERGY_OUT_MULTI_BUFFER =
- new CustomIcon("iconsets/OVERLAY_ENERGY_OUT_MULTI_BUFFER");
+ public static final CustomIcon OVERLAY_ENERGY_OUT_MULTI_BUFFER = new CustomIcon(
+ "iconsets/OVERLAY_ENERGY_OUT_MULTI_BUFFER");
// Wooden Shelf and Compartment Overlays
public static final CustomIcon OVERLAY_WOODEN_SHELF_FRONT = new CustomIcon("TileEntities/Compartment/wood_shelf");
- public static final CustomIcon OVERLAY_WOODEN_SHELF_CANS_FRONT =
- new CustomIcon("TileEntities/Compartment/wood_shelf_cans");
- public static final CustomIcon OVERLAY_WOODEN_SHELF_PAPER_FRONT =
- new CustomIcon("TileEntities/Compartment/wood_shelf_paper");
+ public static final CustomIcon OVERLAY_WOODEN_SHELF_CANS_FRONT = new CustomIcon(
+ "TileEntities/Compartment/wood_shelf_cans");
+ public static final CustomIcon OVERLAY_WOODEN_SHELF_PAPER_FRONT = new CustomIcon(
+ "TileEntities/Compartment/wood_shelf_paper");
public static final CustomIcon OVERLAY_CABINET_1 = new CustomIcon("TileEntities/Compartment/0");
public static final CustomIcon OVERLAY_CABINET_2 = new CustomIcon("TileEntities/Compartment/1");
public static final CustomIcon OVERLAY_CABINET_3 = new CustomIcon("TileEntities/Compartment/2");
@@ -160,19 +160,19 @@ public class TexturesGtBlock {
public static final CustomIcon OVERLAY_COMPARTMENT_16 = new CustomIcon("TileEntities/Compartment/31");
// Controllers
- private static final CustomIcon Internal_Casing_Fusion_Simple_Front =
- new CustomIcon("TileEntities/MACHINE_CASING_FUSION_FRONT");
+ private static final CustomIcon Internal_Casing_Fusion_Simple_Front = new CustomIcon(
+ "TileEntities/MACHINE_CASING_FUSION_FRONT");
public static final CustomIcon Casing_Fusion_Simple_Front = Internal_Casing_Fusion_Simple_Front;
- private static final CustomIcon Internal_Casing_Fusion_Simple_Front_Active =
- new CustomIcon("TileEntities/MACHINE_CASING_FUSION_FRONT_ACTIVE");
+ private static final CustomIcon Internal_Casing_Fusion_Simple_Front_Active = new CustomIcon(
+ "TileEntities/MACHINE_CASING_FUSION_FRONT_ACTIVE");
public static final CustomIcon Casing_Fusion_Simple_Front_Active = Internal_Casing_Fusion_Simple_Front_Active;
// Machine Casings
// Simple
private static final CustomIcon Internal_Casing_Machine_Simple_Top = new CustomIcon("TileEntities/machine_top");
public static final CustomIcon Casing_Machine_Simple_Top = Internal_Casing_Machine_Simple_Top;
- private static final CustomIcon Internal_Casing_Machine_Simple_Bottom =
- new CustomIcon("TileEntities/machine_bottom");
+ private static final CustomIcon Internal_Casing_Machine_Simple_Bottom = new CustomIcon(
+ "TileEntities/machine_bottom");
public static final CustomIcon Casing_Machine_Simple_Bottom = Internal_Casing_Machine_Simple_Bottom;
// Advanced and Ultra
private static final CustomIcon Internal_Casing_Machine_Advanced = new CustomIcon("TileEntities/high_adv_machine");
@@ -180,90 +180,90 @@ public class TexturesGtBlock {
private static final CustomIcon Internal_Casing_Machine_Ultra = new CustomIcon("TileEntities/adv_machine_lesu");
public static final CustomIcon Casing_Machine_Ultra = Internal_Casing_Machine_Ultra;
// Dimensional - Non Overlay
- private static final CustomIcon Internal_Casing_Machine_Dimensional =
- new CustomIcon("TileEntities/adv_machine_dimensional");
+ private static final CustomIcon Internal_Casing_Machine_Dimensional = new CustomIcon(
+ "TileEntities/adv_machine_dimensional");
public static final CustomIcon Casing_Machine_Dimensional = Internal_Casing_Machine_Dimensional;
- private static final CustomIcon Internal_Casing_Machine_Dimensional_Adv =
- new CustomIcon("TileEntities/high_adv_machine_dimensional");
+ private static final CustomIcon Internal_Casing_Machine_Dimensional_Adv = new CustomIcon(
+ "TileEntities/high_adv_machine_dimensional");
public static final CustomIcon Casing_Machine_Dimensional_Adv = Internal_Casing_Machine_Dimensional_Adv;
// Material Casings
- private static final CustomIcon Internal_Casing_Tantalloy61 =
- new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TANTALLOY61");
+ private static final CustomIcon Internal_Casing_Tantalloy61 = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_TANTALLOY61");
public static final CustomIcon Casing_Material_Tantalloy61 = Internal_Casing_Tantalloy61;
- private static final CustomIcon Internal_Casing_MaragingSteel =
- new CustomIcon("TileEntities/MACHINE_CASING_STABLE_MARAGINGSTEEL");
+ private static final CustomIcon Internal_Casing_MaragingSteel = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_MARAGINGSTEEL");
public static final CustomIcon Casing_Material_MaragingSteel = Internal_Casing_MaragingSteel;
- private static final CustomIcon Internal_Casing_Stellite =
- new CustomIcon("TileEntities/MACHINE_CASING_STABLE_STELLITE");
+ private static final CustomIcon Internal_Casing_Stellite = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_STELLITE");
public static final CustomIcon Casing_Material_Stellite = Internal_Casing_Stellite;
- private static final CustomIcon Internal_Casing_Talonite =
- new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TALONITE");
+ private static final CustomIcon Internal_Casing_Talonite = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_TALONITE");
public static final CustomIcon Casing_Material_Talonite = Internal_Casing_Talonite;
private static final CustomIcon Internal_Turbine_SC_Casing = new TexturesGtBlock.CustomIcon("iconsets/SC_TURBINE");
public static final CustomIcon Turbine_SC_Material_Casing = Internal_Turbine_SC_Casing;
- private static final CustomIcon Internal_Casing_Tumbaga =
- new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TUMBAGA");
+ private static final CustomIcon Internal_Casing_Tumbaga = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_TUMBAGA");
public static final CustomIcon Casing_Material_Tumbaga = Internal_Casing_Tumbaga;
- private static final CustomIcon Internal_Casing_Zeron100 =
- new CustomIcon("TileEntities/MACHINE_CASING_STABLE_ZERON100");
+ private static final CustomIcon Internal_Casing_Zeron100 = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_ZERON100");
public static final CustomIcon Casing_Material_Zeron100 = Internal_Casing_Zeron100;
private static final CustomIcon Internal_Casing_Potin = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_POTIN");
public static final CustomIcon Casing_Material_Potin = Internal_Casing_Potin;
- private static final CustomIcon Internal_Casing_Grisium =
- new CustomIcon("TileEntities/MACHINE_CASING_STABLE_GRISIUM");
+ private static final CustomIcon Internal_Casing_Grisium = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_GRISIUM");
public static final CustomIcon Casing_Material_Grisium = Internal_Casing_Grisium;
- private static final CustomIcon Internal_Casing_RedSteel =
- new CustomIcon("TileEntities/MACHINE_CASING_STABLE_RED_STEEL");
+ private static final CustomIcon Internal_Casing_RedSteel = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_RED_STEEL");
public static final CustomIcon Casing_Material_RedSteel = Internal_Casing_RedSteel;
- private static final CustomIcon Internal_Casing_Incoloy020 =
- new CustomIcon("TileEntities/MACHINE_CASING_STABLE_INCOLOY_020");
+ private static final CustomIcon Internal_Casing_Incoloy020 = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_INCOLOY_020");
public static final CustomIcon Casing_Material_Incoloy020 = Internal_Casing_Incoloy020;
- private static final CustomIcon Internal_Casing_IncoloyDS =
- new CustomIcon("TileEntities/MACHINE_CASING_STABLE_INCOLOY_DS");
+ private static final CustomIcon Internal_Casing_IncoloyDS = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_INCOLOY_DS");
public static final CustomIcon Casing_Material_IncoloyDS = Internal_Casing_IncoloyDS;
- private static final CustomIcon Internal_Casing_IncoloyMA956 =
- new CustomIcon("TileEntities/MACHINE_CASING_STABLE_INCOLOY_MA956");
+ private static final CustomIcon Internal_Casing_IncoloyMA956 = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_INCOLOY_MA956");
public static final CustomIcon Casing_Material_IncoloyMA956 = Internal_Casing_IncoloyMA956;
- private static final CustomIcon Internal_Casing_ZirconiumCarbide =
- new CustomIcon("TileEntities/MACHINE_CASING_STABLE_ZIRCONIUM_CARBIDE");
+ private static final CustomIcon Internal_Casing_ZirconiumCarbide = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_ZIRCONIUM_CARBIDE");
public static final CustomIcon Casing_Material_ZirconiumCarbide = Internal_Casing_ZirconiumCarbide;
- private static final CustomIcon Internal_Casing_HastelloyX =
- new CustomIcon("TileEntities/MACHINE_CASING_STABLE_HASTELLOY_X");
+ private static final CustomIcon Internal_Casing_HastelloyX = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_HASTELLOY_X");
public static final CustomIcon Casing_Material_HastelloyX = Internal_Casing_HastelloyX;
- private static final CustomIcon Internal_Casing_HastelloyN =
- new CustomIcon("TileEntities/MACHINE_CASING_STABLE_HASTELLOY_N");
+ private static final CustomIcon Internal_Casing_HastelloyN = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_HASTELLOY_N");
public static final CustomIcon Casing_Material_HastelloyN = Internal_Casing_HastelloyN;
- private static final CustomIcon Internal_Casing_Fluid_IncoloyDS =
- new CustomIcon("TileEntities/MACHINE_CASING_FLUID_INCOLOY_DS");
+ private static final CustomIcon Internal_Casing_Fluid_IncoloyDS = new CustomIcon(
+ "TileEntities/MACHINE_CASING_FLUID_INCOLOY_DS");
public static final CustomIcon Casing_Material_Fluid_IncoloyDS = Internal_Casing_Fluid_IncoloyDS;
private static final CustomIcon Internal_Casing_Laurenium = new CustomIcon("TileEntities/MACHINE_CASING_LAURENIUM");
public static final CustomIcon Casing_Material_Laurenium = Internal_Casing_Laurenium;
// Trinium Alloys
- public static final CustomIcon Casing_Trinium_Titanium =
- new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TRINIUM_TITANIUM");
- public static final CustomIcon Casing_Trinium_Naquadah =
- new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH");
- public static final CustomIcon Casing_Trinium_Naquadah_Vent =
- new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_VENT");
- public static final CustomIcon Casing_Trinium_Naquadah_Carbon =
- new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_CARBON");
+ public static final CustomIcon Casing_Trinium_Titanium = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_TRINIUM_TITANIUM");
+ public static final CustomIcon Casing_Trinium_Naquadah = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH");
+ public static final CustomIcon Casing_Trinium_Naquadah_Vent = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_VENT");
+ public static final CustomIcon Casing_Trinium_Naquadah_Carbon = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_CARBON");
// Material Machine/Firebox Casings
- private static final CustomIcon Internal_Casing_Staballoy_Firebox =
- new CustomIcon("TileEntities/MACHINE_CASING_FIREBOX_STABALLOY");
+ private static final CustomIcon Internal_Casing_Staballoy_Firebox = new CustomIcon(
+ "TileEntities/MACHINE_CASING_FIREBOX_STABALLOY");
public static final CustomIcon Casing_Staballoy_Firebox = Internal_Casing_Staballoy_Firebox;
// Misc Casings
- private static final CustomIcon Internal_Casing_Machine_Redstone_Off =
- new CustomIcon("TileEntities/cover_redstone_conductor");
+ private static final CustomIcon Internal_Casing_Machine_Redstone_Off = new CustomIcon(
+ "TileEntities/cover_redstone_conductor");
public static final CustomIcon Casing_Machine_Redstone_Off = Internal_Casing_Machine_Redstone_Off;
- private static final CustomIcon Internal_Casing_Machine_Redstone_On =
- new CustomIcon("TileEntities/cover_redstone_emitter");
+ private static final CustomIcon Internal_Casing_Machine_Redstone_On = new CustomIcon(
+ "TileEntities/cover_redstone_emitter");
public static final CustomIcon Casing_Machine_Redstone_On = Internal_Casing_Machine_Redstone_On;
// Redox Cells
@@ -287,8 +287,8 @@ public class TexturesGtBlock {
public static final CustomIcon Casing_Modulator_4 = new CustomIcon("special/block_8");
// Centrifuge Casing
- private static final CustomIcon Internal_Casing_Centrifuge =
- new CustomIcon("TileEntities/MACHINE_CASING_CENTRIFUGE");
+ private static final CustomIcon Internal_Casing_Centrifuge = new CustomIcon(
+ "TileEntities/MACHINE_CASING_CENTRIFUGE");
public static final CustomIcon Casing_Material_Centrifuge = Internal_Casing_Centrifuge;
// Quantum Force Transformer Casing
@@ -311,8 +311,8 @@ public class TexturesGtBlock {
// MACHINE_CASING_FARM_MANAGER_STRUCTURAL
// Farm Manager Casings
- private static final CustomIcon Internal_Casing_Machine_Farm_Manager =
- new CustomIcon("TileEntities/MACHINE_CASING_FARM_MANAGER_STRUCTURAL");
+ private static final CustomIcon Internal_Casing_Machine_Farm_Manager = new CustomIcon(
+ "TileEntities/MACHINE_CASING_FARM_MANAGER_STRUCTURAL");
public static final CustomIcon Casing_Machine_Farm_Manager = Internal_Casing_Machine_Farm_Manager;
// Acacia_Log
private static final CustomIcon Internal_Casing_Machine_Acacia_Log = new CustomIcon("TileEntities/log_acacia_top");
@@ -324,8 +324,8 @@ public class TexturesGtBlock {
// Structural Blocks
private static final CustomIcon Internal_Casing_Machine_Metal_Grate_A = new CustomIcon("chrono/MetalGrate");
public static final CustomIcon Casing_Machine_Metal_Grate_A = Internal_Casing_Machine_Metal_Grate_A;
- private static final CustomIcon Internal_Casing_Machine_Metal_Grate_A_Solid =
- new CustomIcon("chrono/MetalGrateA_Solid");
+ private static final CustomIcon Internal_Casing_Machine_Metal_Grate_A_Solid = new CustomIcon(
+ "chrono/MetalGrateA_Solid");
public static final CustomIcon Casing_Machine_Metal_Grate_A_Solid = Internal_Casing_Machine_Metal_Grate_A_Solid;
private static final CustomIcon Internal_Casing_Machine_Metal_Grate_B = new CustomIcon("chrono/MetalGrate2");
public static final CustomIcon Casing_Machine_Metal_Grate_B = Internal_Casing_Machine_Metal_Grate_B;
@@ -361,59 +361,59 @@ public class TexturesGtBlock {
public static final CustomIcon Overlay_Machine_Cyber_B = Internal_Overlay_Machine_Cyber_B;
public static final CustomIcon TEXTURE_CASING_AMAZON = new CustomIcon("TileEntities/CASING_AMAZON");
- public static final CustomIcon TEXTURE_CASING_ADVANCED_CRYOGENIC =
- new CustomIcon("TileEntities/MACHINE_CASING_ADVANCED_CRYOGENIC");
- public static final CustomIcon TEXTURE_CASING_ADVANCED_VOLCNUS =
- new CustomIcon("TileEntities/MACHINE_CASING_ADVANCED_VOLCANUS");
+ public static final CustomIcon TEXTURE_CASING_ADVANCED_CRYOGENIC = new CustomIcon(
+ "TileEntities/MACHINE_CASING_ADVANCED_CRYOGENIC");
+ public static final CustomIcon TEXTURE_CASING_ADVANCED_VOLCNUS = new CustomIcon(
+ "TileEntities/MACHINE_CASING_ADVANCED_VOLCANUS");
public static final CustomIcon TEXTURE_CASING_ROCKETDYNE = new CustomIcon("TileEntities/MACHINE_CASING_ROCKETDYNE");
- public static final CustomIcon TEXTURE_CASING_GRINDING_MILL =
- new CustomIcon("TileEntities/MACHINE_CASING_GRINDING_FACTORY");
+ public static final CustomIcon TEXTURE_CASING_GRINDING_MILL = new CustomIcon(
+ "TileEntities/MACHINE_CASING_GRINDING_FACTORY");
public static final CustomIcon TEXTURE_CASING_FLOTATION = new CustomIcon("TileEntities/MACHINE_CASING_FLOTATION");
// Custom Pipes
public static final CustomIcon TEXTURE_PIPE_GRINDING_MILL = new CustomIcon("TileEntities/MACHINE_CASING_PIPE_T1");
public static final CustomIcon TEXTURE_PIPE_GENERIC = new CustomIcon("iconsets/MACHINE_CASING_PIPE_GENERIC");
- public static final CustomIcon TEXTURE_PIPE_T1_BABBIT_ALLOY =
- new CustomIcon("iconsets/MACHINE_CASING_PIPE_BABBIT_ALLOY");
- public static final CustomIcon TEXTURE_PIPE_T2_INCONEL_690 =
- new CustomIcon("iconsets/MACHINE_CASING_PIPE_INCONEL_690");
+ public static final CustomIcon TEXTURE_PIPE_T1_BABBIT_ALLOY = new CustomIcon(
+ "iconsets/MACHINE_CASING_PIPE_BABBIT_ALLOY");
+ public static final CustomIcon TEXTURE_PIPE_T2_INCONEL_690 = new CustomIcon(
+ "iconsets/MACHINE_CASING_PIPE_INCONEL_690");
public static final CustomIcon TEXTURE_PIPE_T3_STELLITE = new CustomIcon("iconsets/MACHINE_CASING_PIPE_STELLITE");
- public static final CustomIcon TEXTURE_PIPE_T4_NITINOL_60 =
- new CustomIcon("iconsets/MACHINE_CASING_PIPE_NITINOL_60");
+ public static final CustomIcon TEXTURE_PIPE_T4_NITINOL_60 = new CustomIcon(
+ "iconsets/MACHINE_CASING_PIPE_NITINOL_60");
public static final CustomIcon TEXTURE_PIPE_T5_LAFIUM = new CustomIcon("iconsets/MACHINE_CASING_PIPE_LAFIUM");
public static final CustomIcon TEXTURE_PIPE_T6_CINOBITE = new CustomIcon("iconsets/MACHINE_CASING_PIPE_CINOBITE");
- public static final CustomIcon TEXTURE_PIPE_T7_TITANSTEEL =
- new CustomIcon("iconsets/MACHINE_CASING_PIPE_TITANSTEEL");
+ public static final CustomIcon TEXTURE_PIPE_T7_TITANSTEEL = new CustomIcon(
+ "iconsets/MACHINE_CASING_PIPE_TITANSTEEL");
public static final CustomIcon TEXTURE_PIPE_T8_ABYSSAL = new CustomIcon("iconsets/MACHINE_CASING_PIPE_ABYSSAL");
// Custom Gearboxes
- public static final CustomIcon TEXTURE_GEARBOX_GRINDING_MILL =
- new CustomIcon("TileEntities/MACHINE_CASING_GEARBOX_T1");
+ public static final CustomIcon TEXTURE_GEARBOX_GRINDING_MILL = new CustomIcon(
+ "TileEntities/MACHINE_CASING_GEARBOX_T1");
public static final CustomIcon TEXTURE_GEARBOX_GENERIC = new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_GENERIC");
- public static final CustomIcon TEXTURE_GEARBOX_T1_EGLIN_STEEL =
- new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_EGLIN_STEEL");
- public static final CustomIcon TEXTURE_GEARBOX_T2_INCONEL_792 =
- new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_INCONEL_792");
- public static final CustomIcon TEXTURE_GEARBOX_T3_INCOLOY_MA956 =
- new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_INCOLOY_MA956");
- public static final CustomIcon TEXTURE_GEARBOX_T4_NITINOL_60 =
- new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_NITINOL_60");
- public static final CustomIcon TEXTURE_GEARBOX_T5_ZERON_100 =
- new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_ZERON_100");
- public static final CustomIcon TEXTURE_GEARBOX_T6_PIKYONIUM =
- new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_PIKYONIUM");
- public static final CustomIcon TEXTURE_GEARBOX_T7_TITANSTEEL =
- new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_TITANSTEEL");
- public static final CustomIcon TEXTURE_GEARBOX_T8_ABYSSAL =
- new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_ABYSSAL");
+ public static final CustomIcon TEXTURE_GEARBOX_T1_EGLIN_STEEL = new CustomIcon(
+ "iconsets/MACHINE_CASING_GEARBOX_EGLIN_STEEL");
+ public static final CustomIcon TEXTURE_GEARBOX_T2_INCONEL_792 = new CustomIcon(
+ "iconsets/MACHINE_CASING_GEARBOX_INCONEL_792");
+ public static final CustomIcon TEXTURE_GEARBOX_T3_INCOLOY_MA956 = new CustomIcon(
+ "iconsets/MACHINE_CASING_GEARBOX_INCOLOY_MA956");
+ public static final CustomIcon TEXTURE_GEARBOX_T4_NITINOL_60 = new CustomIcon(
+ "iconsets/MACHINE_CASING_GEARBOX_NITINOL_60");
+ public static final CustomIcon TEXTURE_GEARBOX_T5_ZERON_100 = new CustomIcon(
+ "iconsets/MACHINE_CASING_GEARBOX_ZERON_100");
+ public static final CustomIcon TEXTURE_GEARBOX_T6_PIKYONIUM = new CustomIcon(
+ "iconsets/MACHINE_CASING_GEARBOX_PIKYONIUM");
+ public static final CustomIcon TEXTURE_GEARBOX_T7_TITANSTEEL = new CustomIcon(
+ "iconsets/MACHINE_CASING_GEARBOX_TITANSTEEL");
+ public static final CustomIcon TEXTURE_GEARBOX_T8_ABYSSAL = new CustomIcon(
+ "iconsets/MACHINE_CASING_GEARBOX_ABYSSAL");
public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II = new CustomIcon("iconsets/MACHINE_CASING_FUSION_3");
- public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_INNER =
- new CustomIcon("iconsets/MACHINE_CASING_FUSION_COIL_II");
- public static final CustomIcon TEXTURE_CASING_FUSION_CASING_ULTRA =
- new CustomIcon("iconsets/MACHINE_CASING_FUSION_GLASS_ULTRA");
+ public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_INNER = new CustomIcon(
+ "iconsets/MACHINE_CASING_FUSION_COIL_II");
+ public static final CustomIcon TEXTURE_CASING_FUSION_CASING_ULTRA = new CustomIcon(
+ "iconsets/MACHINE_CASING_FUSION_GLASS_ULTRA");
//
public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_1 = new CustomIcon("iconsets/FUSIONIII_1");
public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_2 = new CustomIcon("iconsets/FUSIONIII_2");
@@ -430,133 +430,129 @@ public class TexturesGtBlock {
// Overlays
// Fan Textures
- private static final CustomIcon Internal_Overlay_Machine_Vent =
- new CustomIcon("TileEntities/machine_top_vent_rotating");
+ private static final CustomIcon Internal_Overlay_Machine_Vent = new CustomIcon(
+ "TileEntities/machine_top_vent_rotating");
public static final CustomIcon Overlay_Machine_Vent = Internal_Overlay_Machine_Vent;
- private static final CustomIcon Internal_Overlay_Machine_Vent_Fast =
- new CustomIcon("TileEntities/machine_top_vent_rotating_fast");
+ private static final CustomIcon Internal_Overlay_Machine_Vent_Fast = new CustomIcon(
+ "TileEntities/machine_top_vent_rotating_fast");
public static final CustomIcon Overlay_Machine_Vent_Fast = Internal_Overlay_Machine_Vent_Fast;
- private static final CustomIcon Internal_Overlay_Machine_Vent_Adv =
- new CustomIcon("TileEntities/adv_machine_vent_rotating");
+ private static final CustomIcon Internal_Overlay_Machine_Vent_Adv = new CustomIcon(
+ "TileEntities/adv_machine_vent_rotating");
public static final CustomIcon Overlay_Machine_Vent_Adv = Internal_Overlay_Machine_Vent_Adv;
- private static final CustomIcon Internal_Overlay_Machine_Turbine_Active =
- new CustomIcon("TileEntities/STEAM_TURBINE_SIDE_ACTIVE");
+ private static final CustomIcon Internal_Overlay_Machine_Turbine_Active = new CustomIcon(
+ "TileEntities/STEAM_TURBINE_SIDE_ACTIVE");
public static final CustomIcon Overlay_Machine_Turbine_Active = Internal_Overlay_Machine_Turbine_Active;
// Grate Texture
public static final CustomIcon OVERLAY_GRATE_A = new CustomIcon("metro/OVERLAY_GRATE_A");
// Speaker Texture
private static final CustomIcon Internal_Overlay_Machine_Sound = new CustomIcon("TileEntities/audio_out");
public static final CustomIcon Overlay_Machine_Sound = Internal_Overlay_Machine_Sound;
- private static final CustomIcon Internal_Overlay_Machine_Sound_Active =
- new CustomIcon("TileEntities/audio_out_active");
+ private static final CustomIcon Internal_Overlay_Machine_Sound_Active = new CustomIcon(
+ "TileEntities/audio_out_active");
public static final CustomIcon Overlay_Machine_Sound_Active = Internal_Overlay_Machine_Sound_Active;
// Diesel Engines
- private static final CustomIcon Internal_Overlay_Machine_Diesel_Vertical =
- new CustomIcon("TileEntities/machine_top_dieselmotor");
+ private static final CustomIcon Internal_Overlay_Machine_Diesel_Vertical = new CustomIcon(
+ "TileEntities/machine_top_dieselmotor");
public static final CustomIcon Overlay_Machine_Diesel_Vertical = Internal_Overlay_Machine_Diesel_Vertical;
- private static final CustomIcon Internal_Overlay_Machine_Diesel_Horizontal =
- new CustomIcon("TileEntities/machine_top_dieselmotor2");
+ private static final CustomIcon Internal_Overlay_Machine_Diesel_Horizontal = new CustomIcon(
+ "TileEntities/machine_top_dieselmotor2");
public static final CustomIcon Overlay_Machine_Diesel_Horizontal = Internal_Overlay_Machine_Diesel_Horizontal;
- private static final CustomIcon Internal_Overlay_Machine_Diesel_Vertical_Active =
- new CustomIcon("TileEntities/machine_top_dieselmotor_active");
- public static final CustomIcon Overlay_Machine_Diesel_Vertical_Active =
- Internal_Overlay_Machine_Diesel_Vertical_Active;
- private static final CustomIcon Internal_Overlay_Machine_Diesel_Horizontal_Active =
- new CustomIcon("TileEntities/machine_top_dieselmotor2_active");
- public static final CustomIcon Overlay_Machine_Diesel_Horizontal_Active =
- Internal_Overlay_Machine_Diesel_Horizontal_Active;
+ private static final CustomIcon Internal_Overlay_Machine_Diesel_Vertical_Active = new CustomIcon(
+ "TileEntities/machine_top_dieselmotor_active");
+ public static final CustomIcon Overlay_Machine_Diesel_Vertical_Active = Internal_Overlay_Machine_Diesel_Vertical_Active;
+ private static final CustomIcon Internal_Overlay_Machine_Diesel_Horizontal_Active = new CustomIcon(
+ "TileEntities/machine_top_dieselmotor2_active");
+ public static final CustomIcon Overlay_Machine_Diesel_Horizontal_Active = Internal_Overlay_Machine_Diesel_Horizontal_Active;
// Computer Screens
- private static final CustomIcon Internal_Casing_Machine_Screen_1 =
- new CustomIcon("TileEntities/adv_machine_screen_random1");
+ private static final CustomIcon Internal_Casing_Machine_Screen_1 = new CustomIcon(
+ "TileEntities/adv_machine_screen_random1");
public static final CustomIcon Casing_Machine_Screen_1 = Internal_Casing_Machine_Screen_1;
- private static final CustomIcon Internal_Casing_Machine_Screen_2 =
- new CustomIcon("TileEntities/adv_machine_screen_random2");
+ private static final CustomIcon Internal_Casing_Machine_Screen_2 = new CustomIcon(
+ "TileEntities/adv_machine_screen_random2");
public static final CustomIcon Casing_Machine_Screen_2 = Internal_Casing_Machine_Screen_2;
- private static final CustomIcon Internal_Casing_Machine_Screen_3 =
- new CustomIcon("TileEntities/adv_machine_screen_random3");
+ private static final CustomIcon Internal_Casing_Machine_Screen_3 = new CustomIcon(
+ "TileEntities/adv_machine_screen_random3");
public static final CustomIcon Casing_Machine_Screen_3 = Internal_Casing_Machine_Screen_3;
- private static final CustomIcon Internal_Casing_Machine_Screen_Frequency =
- new CustomIcon("TileEntities/adv_machine_screen_frequency");
+ private static final CustomIcon Internal_Casing_Machine_Screen_Frequency = new CustomIcon(
+ "TileEntities/adv_machine_screen_frequency");
public static final CustomIcon Casing_Machine_Screen_Frequency = Internal_Casing_Machine_Screen_Frequency;
- private static final CustomIcon Internal_Overlay_Machine_Screen_Logo =
- new CustomIcon("TileEntities/adv_machine_screen_logo");
+ private static final CustomIcon Internal_Overlay_Machine_Screen_Logo = new CustomIcon(
+ "TileEntities/adv_machine_screen_logo");
public static final CustomIcon Overlay_Machine_Screen_Logo = Internal_Overlay_Machine_Screen_Logo;
private static final CustomIcon Internal_Overlay_Machine_Cyber_Interface = new CustomIcon("chrono/Overlay_Cyber");
public static final CustomIcon Overlay_Machine_Cyber_Interface = Internal_Overlay_Machine_Cyber_Interface;
// Machine Controller Overlays
- private static final CustomIcon Internal_Overlay_Machine_Controller_Default =
- new CustomIcon("iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED");
+ private static final CustomIcon Internal_Overlay_Machine_Controller_Default = new CustomIcon(
+ "iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED");
public static final CustomIcon Overlay_Machine_Controller_Default = Internal_Overlay_Machine_Controller_Default;
- private static final CustomIcon Internal_Overlay_Machine_Controller_Default_Active =
- new CustomIcon("iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE");
- public static final CustomIcon Overlay_Machine_Controller_Default_Active =
- Internal_Overlay_Machine_Controller_Default_Active;
+ private static final CustomIcon Internal_Overlay_Machine_Controller_Default_Active = new CustomIcon(
+ "iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE");
+ public static final CustomIcon Overlay_Machine_Controller_Default_Active = Internal_Overlay_Machine_Controller_Default_Active;
- private static final CustomIcon Internal_Overlay_Machine_Controller_Advanced =
- new CustomIcon("iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED");
+ private static final CustomIcon Internal_Overlay_Machine_Controller_Advanced = new CustomIcon(
+ "iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED");
public static final CustomIcon Overlay_Machine_Controller_Advanced = Internal_Overlay_Machine_Controller_Advanced;
- private static final CustomIcon Internal_Overlay_Machine_Controller_Advanced_Active =
- new CustomIcon("iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE");
- public static final CustomIcon Overlay_Machine_Controller_Advanced_Active =
- Internal_Overlay_Machine_Controller_Advanced_Active;
+ private static final CustomIcon Internal_Overlay_Machine_Controller_Advanced_Active = new CustomIcon(
+ "iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE");
+ public static final CustomIcon Overlay_Machine_Controller_Advanced_Active = Internal_Overlay_Machine_Controller_Advanced_Active;
// Fluid Reactor Overlays
- public static final CustomIcon Overlay_FluidReactor_Front =
- new CustomIcon("TileEntities/FluidReactor/OVERLAY_FRONT");
+ public static final CustomIcon Overlay_FluidReactor_Front = new CustomIcon(
+ "TileEntities/FluidReactor/OVERLAY_FRONT");
public static final CustomIcon Overlay_FluidReactor_Side = new CustomIcon("TileEntities/FluidReactor/OVERLAY_SIDE");
public static final CustomIcon Overlay_FluidReactor_Top = new CustomIcon("TileEntities/FluidReactor/OVERLAY_TOP");
- public static final CustomIcon Overlay_FluidReactor_Front_Active =
- new CustomIcon("TileEntities/FluidReactor/OVERLAY_FRONT_ACTIVE");
- public static final CustomIcon Overlay_FluidReactor_Side_Active =
- new CustomIcon("TileEntities/FluidReactor/OVERLAY_SIDE_ACTIVE");
- public static final CustomIcon Overlay_FluidReactor_Top_Active =
- new CustomIcon("TileEntities/FluidReactor/OVERLAY_TOP_ACTIVE");
+ public static final CustomIcon Overlay_FluidReactor_Front_Active = new CustomIcon(
+ "TileEntities/FluidReactor/OVERLAY_FRONT_ACTIVE");
+ public static final CustomIcon Overlay_FluidReactor_Side_Active = new CustomIcon(
+ "TileEntities/FluidReactor/OVERLAY_SIDE_ACTIVE");
+ public static final CustomIcon Overlay_FluidReactor_Top_Active = new CustomIcon(
+ "TileEntities/FluidReactor/OVERLAY_TOP_ACTIVE");
// Crafting Overlays
public static final CustomIcon Overlay_Crafting_Bronze = new CustomIcon("TileEntities/bronze_top_crafting");
public static final CustomIcon Overlay_Crafting_Steel = new CustomIcon("TileEntities/cover_crafting");
- public static final CustomIcon Casing_Workbench_Crafting_Overlay =
- new CustomIcon("TileEntities/gt4/bronze_top_crafting");
+ public static final CustomIcon Casing_Workbench_Crafting_Overlay = new CustomIcon(
+ "TileEntities/gt4/bronze_top_crafting");
public static final CustomIcon Casing_Workbench_Top = new CustomIcon("TileEntities/gt4/bronze_top");
public static final CustomIcon Casing_Workbench_Side = new CustomIcon("TileEntities/gt4/bronze_side");
public static final CustomIcon Casing_Workbench_Bottom = new CustomIcon("TileEntities/gt4/bronze_bottom");
- public static final CustomIcon Casing_Adv_Workbench_Crafting_Overlay =
- new CustomIcon("TileEntities/gt4/machine_top_crafting");
+ public static final CustomIcon Casing_Adv_Workbench_Crafting_Overlay = new CustomIcon(
+ "TileEntities/gt4/machine_top_crafting");
public static final CustomIcon Casing_Adv_Workbench_Top = new CustomIcon("TileEntities/gt4/machine_top");
public static final CustomIcon Casing_Adv_Workbench_Side = new CustomIcon("TileEntities/gt4/machine_side");
public static final CustomIcon Casing_Adv_Workbench_Bottom = new CustomIcon("TileEntities/gt4/machine_bottom");
- public static final CustomIcon Casing_Redstone_Top_Off =
- new CustomIcon("TileEntities/gt4/redstone/machine_top_redstone_off");
- public static final CustomIcon Casing_Redstone_Top_Main_Off =
- new CustomIcon("TileEntities/gt4/redstone/machine_top_redstone_main_off");
- public static final CustomIcon Casing_Redstone_Top_On =
- new CustomIcon("TileEntities/gt4/redstone/machine_top_redstone_on");
- public static final CustomIcon Casing_Redstone_Top_Main_On =
- new CustomIcon("TileEntities/gt4/redstone/machine_top_redstone_main_on");
-
- public static final CustomIcon Casing_Redstone_Side_Off =
- new CustomIcon("TileEntities/gt4/redstone/machine_side_redstone_off");
- public static final CustomIcon Casing_Redstone_Side_Main_Off =
- new CustomIcon("TileEntities/gt4/redstone/machine_side_redstone_main_off");
- public static final CustomIcon Casing_Redstone_Side_On =
- new CustomIcon("TileEntities/gt4/redstone/machine_side_redstone_on");
- public static final CustomIcon Casing_Redstone_Side_Main_On =
- new CustomIcon("TileEntities/gt4/redstone/machine_side_redstone_main_on");
-
- public static final CustomIcon Casing_Redstone_Bottom_Off =
- new CustomIcon("TileEntities/gt4/redstone/machine_bottom_redstone_off");
- public static final CustomIcon Casing_Redstone_Bottom_Main_Off =
- new CustomIcon("TileEntities/gt4/redstone/machine_bottom_redstone_main_off");
- public static final CustomIcon Casing_Redstone_Bottom_On =
- new CustomIcon("TileEntities/gt4/redstone/machine_bottom_redstone_on");
- public static final CustomIcon Casing_Redstone_Bottom_Main_On =
- new CustomIcon("TileEntities/gt4/redstone/machine_bottom_redstone_main_on");
-
- public static final CustomIcon Casing_Electric_Auto_Workbench_Side =
- new CustomIcon("TileEntities/gt4/OVERLAY_SIDE_CABINET");
+ public static final CustomIcon Casing_Redstone_Top_Off = new CustomIcon(
+ "TileEntities/gt4/redstone/machine_top_redstone_off");
+ public static final CustomIcon Casing_Redstone_Top_Main_Off = new CustomIcon(
+ "TileEntities/gt4/redstone/machine_top_redstone_main_off");
+ public static final CustomIcon Casing_Redstone_Top_On = new CustomIcon(
+ "TileEntities/gt4/redstone/machine_top_redstone_on");
+ public static final CustomIcon Casing_Redstone_Top_Main_On = new CustomIcon(
+ "TileEntities/gt4/redstone/machine_top_redstone_main_on");
+
+ public static final CustomIcon Casing_Redstone_Side_Off = new CustomIcon(
+ "TileEntities/gt4/redstone/machine_side_redstone_off");
+ public static final CustomIcon Casing_Redstone_Side_Main_Off = new CustomIcon(
+ "TileEntities/gt4/redstone/machine_side_redstone_main_off");
+ public static final CustomIcon Casing_Redstone_Side_On = new CustomIcon(
+ "TileEntities/gt4/redstone/machine_side_redstone_on");
+ public static final CustomIcon Casing_Redstone_Side_Main_On = new CustomIcon(
+ "TileEntities/gt4/redstone/machine_side_redstone_main_on");
+
+ public static final CustomIcon Casing_Redstone_Bottom_Off = new CustomIcon(
+ "TileEntities/gt4/redstone/machine_bottom_redstone_off");
+ public static final CustomIcon Casing_Redstone_Bottom_Main_Off = new CustomIcon(
+ "TileEntities/gt4/redstone/machine_bottom_redstone_main_off");
+ public static final CustomIcon Casing_Redstone_Bottom_On = new CustomIcon(
+ "TileEntities/gt4/redstone/machine_bottom_redstone_on");
+ public static final CustomIcon Casing_Redstone_Bottom_Main_On = new CustomIcon(
+ "TileEntities/gt4/redstone/machine_bottom_redstone_main_on");
+
+ public static final CustomIcon Casing_Electric_Auto_Workbench_Side = new CustomIcon(
+ "TileEntities/gt4/OVERLAY_SIDE_CABINET");
public static final CustomIcon Casing_Computer_Cube = new CustomIcon("TileEntities/gt4/computer");
public static final CustomIcon Casing_CropHarvester_Cutter = new CustomIcon("TileEntities/gt4/OVERLAY_CROP");
@@ -569,18 +565,18 @@ public class TexturesGtBlock {
public static final CustomIcon Casing_InventoryManagaer_Yellow = new CustomIcon("TileEntities/gt4/OVERLAY_YELLOW");
public static final CustomIcon Casing_InventoryManagaer_Blue = new CustomIcon("TileEntities/gt4/OVERLAY_BLUE");
- public static final CustomIcon Casing_InventoryManagaer_Cyan_Redstone =
- new CustomIcon("TileEntities/gt4/OVERLAY_CYAN_REDSTONE");
- public static final CustomIcon Casing_InventoryManagaer_Green_Redstone =
- new CustomIcon("TileEntities/gt4/OVERLAY_GREEN_REDSTONE");
- public static final CustomIcon Casing_InventoryManagaer_Purple_Redstone =
- new CustomIcon("TileEntities/gt4/OVERLAY_PURPLE_REDSTONE");
- public static final CustomIcon Casing_InventoryManagaer_Red_Redstone =
- new CustomIcon("TileEntities/gt4/OVERLAY_RED_REDSTONE");
- public static final CustomIcon Casing_InventoryManagaer_Yellow_Redstone =
- new CustomIcon("TileEntities/gt4/OVERLAY_YELLOW_REDSTONE");
- public static final CustomIcon Casing_InventoryManagaer_Blue_Redstone =
- new CustomIcon("TileEntities/gt4/OVERLAY_BLUE_REDSTONE");
+ public static final CustomIcon Casing_InventoryManagaer_Cyan_Redstone = new CustomIcon(
+ "TileEntities/gt4/OVERLAY_CYAN_REDSTONE");
+ public static final CustomIcon Casing_InventoryManagaer_Green_Redstone = new CustomIcon(
+ "TileEntities/gt4/OVERLAY_GREEN_REDSTONE");
+ public static final CustomIcon Casing_InventoryManagaer_Purple_Redstone = new CustomIcon(
+ "TileEntities/gt4/OVERLAY_PURPLE_REDSTONE");
+ public static final CustomIcon Casing_InventoryManagaer_Red_Redstone = new CustomIcon(
+ "TileEntities/gt4/OVERLAY_RED_REDSTONE");
+ public static final CustomIcon Casing_InventoryManagaer_Yellow_Redstone = new CustomIcon(
+ "TileEntities/gt4/OVERLAY_YELLOW_REDSTONE");
+ public static final CustomIcon Casing_InventoryManagaer_Blue_Redstone = new CustomIcon(
+ "TileEntities/gt4/OVERLAY_BLUE_REDSTONE");
private static final CustomIcon Casing_Test_1 = new CustomIcon("number/1");
private static final CustomIcon Casing_Test_2 = new CustomIcon("number/2");
@@ -599,12 +595,9 @@ public class TexturesGtBlock {
private static final CustomIcon Casing_Test_15 = new CustomIcon("number/15");
private static final CustomIcon Casing_Test_16 = new CustomIcon("number/16");
- public static final CustomIcon[] TEST_NUMBER = new CustomIcon[] {
- Casing_Test_1, Casing_Test_2, Casing_Test_3, Casing_Test_4,
- Casing_Test_5, Casing_Test_6, Casing_Test_7, Casing_Test_8,
- Casing_Test_9, Casing_Test_10, Casing_Test_11, Casing_Test_12,
- Casing_Test_13, Casing_Test_14, Casing_Test_15, Casing_Test_16
- };
+ public static final CustomIcon[] TEST_NUMBER = new CustomIcon[] { Casing_Test_1, Casing_Test_2, Casing_Test_3,
+ Casing_Test_4, Casing_Test_5, Casing_Test_6, Casing_Test_7, Casing_Test_8, Casing_Test_9, Casing_Test_10,
+ Casing_Test_11, Casing_Test_12, Casing_Test_13, Casing_Test_14, Casing_Test_15, Casing_Test_16 };
// Covers
private static final CustomIcon Internal_Overlay_Overflow_Valve = new CustomIcon("iconsets/OVERLAY_OVERFLOW_VALVE");
@@ -621,12 +614,12 @@ public class TexturesGtBlock {
private static final CustomIcon Internal_Overlay_Hatch_Muffler_Adv = new CustomIcon("iconsets/OVERLAY_MUFFLER_ADV");
public static final CustomIcon Overlay_Hatch_Muffler_Adv = Internal_Overlay_Hatch_Muffler_Adv;
// Control Core Bus
- private static final CustomIcon Internal_Overlay_Hatch_Control_Core =
- new CustomIcon("iconsets/OVERLAY_CONTROL_CORE_BUS");
+ private static final CustomIcon Internal_Overlay_Hatch_Control_Core = new CustomIcon(
+ "iconsets/OVERLAY_CONTROL_CORE_BUS");
public static final CustomIcon Overlay_Hatch_Control_Core = Internal_Overlay_Hatch_Control_Core;
// Milling Ball Bus
- private static final CustomIcon Internal_Overlay_Bus_Milling_Balls =
- new CustomIcon("iconsets/OVERLAY_MILLING_BALL_BUS");
+ private static final CustomIcon Internal_Overlay_Bus_Milling_Balls = new CustomIcon(
+ "iconsets/OVERLAY_MILLING_BALL_BUS");
public static final CustomIcon Overlay_Bus_Milling_Balls = Internal_Overlay_Bus_Milling_Balls;
// Catalyst Bus
private static final CustomIcon Internal_Overlay_Bus_Catalyst = new CustomIcon("iconsets/OVERLAY_CATALYSTS");
@@ -651,24 +644,24 @@ public class TexturesGtBlock {
public static final CustomIcon Overlay_Hatch_RTG_On = Internal_Overlay_Hatch_RTG_On;
// Dimensional
- private static final CustomIcon Internal_Overlay_Machine_Dimensional_Blue =
- new CustomIcon("TileEntities/adv_machine_dimensional_cover_blue");
+ private static final CustomIcon Internal_Overlay_Machine_Dimensional_Blue = new CustomIcon(
+ "TileEntities/adv_machine_dimensional_cover_blue");
public static final CustomIcon Overlay_Machine_Dimensional_Blue = Internal_Overlay_Machine_Dimensional_Blue;
- private static final CustomIcon Internal_Overlay_Machine_Dimensional_Orange =
- new CustomIcon("TileEntities/adv_machine_dimensional_cover_orange");
+ private static final CustomIcon Internal_Overlay_Machine_Dimensional_Orange = new CustomIcon(
+ "TileEntities/adv_machine_dimensional_cover_orange");
public static final CustomIcon Overlay_Machine_Dimensional_Orange = Internal_Overlay_Machine_Dimensional_Orange;
// Icons
private static final CustomIcon Internal_Overlay_MatterFab = new CustomIcon("TileEntities/adv_machine_matterfab");
public static final CustomIcon Overlay_MatterFab = Internal_Overlay_MatterFab;
- private static final CustomIcon Internal_Overlay_MatterFab_Active =
- new CustomIcon("TileEntities/adv_machine_matterfab_active");
+ private static final CustomIcon Internal_Overlay_MatterFab_Active = new CustomIcon(
+ "TileEntities/adv_machine_matterfab_active");
public static final CustomIcon Overlay_MatterFab_Active = Internal_Overlay_MatterFab_Active;
- private static final CustomIcon Internal_Overlay_MatterFab_Animated =
- new CustomIcon("TileEntities/adv_machine_matterfab_animated");
+ private static final CustomIcon Internal_Overlay_MatterFab_Animated = new CustomIcon(
+ "TileEntities/adv_machine_matterfab_animated");
public static final CustomIcon Overlay_MatterFab_Animated = Internal_Overlay_MatterFab_Animated;
- private static final CustomIcon Internal_Overlay_MatterFab_Active_Animated =
- new CustomIcon("TileEntities/adv_machine_matterfab_active_animated");
+ private static final CustomIcon Internal_Overlay_MatterFab_Active_Animated = new CustomIcon(
+ "TileEntities/adv_machine_matterfab_active_animated");
public static final CustomIcon Overlay_MatterFab_Active_Animated = Internal_Overlay_MatterFab_Active_Animated;
private static final CustomIcon Internal_Overlay_Oil = new CustomIcon("TileEntities/adv_machine_oil");
@@ -705,8 +698,8 @@ public class TexturesGtBlock {
public static final CustomIcon TEXTURE_MAGIC_PANEL_B = new CustomIcon("metro/TEXTURE_MAGIC_B");
public static final CustomIcon TEXTURE_ORGANIC_PANEL_A = new CustomIcon("metro/TEXTURE_ORGANIC_PANEL_A");
- public static final CustomIcon TEXTURE_ORGANIC_PANEL_A_GLOWING =
- new CustomIcon("metro/TEXTURE_ORGANIC_PANEL_A_GLOWING");
+ public static final CustomIcon TEXTURE_ORGANIC_PANEL_A_GLOWING = new CustomIcon(
+ "metro/TEXTURE_ORGANIC_PANEL_A_GLOWING");
public static final CustomIcon TEXTURE_STONE_BIRD_A = new CustomIcon("metro/TEXTURE_STONE_BIRD_A");
public static final CustomIcon TEXTURE_STONE_BIRD_A_LEFT = new CustomIcon("metro/TEXTURE_STONE_BIRD_A_LEFT");
@@ -751,122 +744,111 @@ public class TexturesGtBlock {
public static final CustomIcon TEXTURE_TECH_PANEL_H = new CustomIcon("metro/TEXTURE_TECH_PANEL_H");
public static final CustomIcon TEXTURE_TECH_PANEL_I = new CustomIcon("metro/TEXTURE_TECH_PANEL_I");
- public static final CustomIcon TEXTURE_TECH_PANEL_RADIOACTIVE =
- new CustomIcon("TileEntities/DecayablesChest_bottom");
- public static final CustomIcon TEXTURE_TECH_PANEL_RADIOACTIVE_ALT =
- new CustomIcon("TileEntities/DecayablesChest_top");
+ public static final CustomIcon TEXTURE_TECH_PANEL_RADIOACTIVE = new CustomIcon(
+ "TileEntities/DecayablesChest_bottom");
+ public static final CustomIcon TEXTURE_TECH_PANEL_RADIOACTIVE_ALT = new CustomIcon(
+ "TileEntities/DecayablesChest_top");
// LFTR Single blocks
- public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_FRONT =
- new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_FRONT");
- public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_FRONT_ACTIVE =
- new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_FRONT_ACTIVE");
- public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_SIDE =
- new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_SIDE");
- public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_SIDE_ACTIVE =
- new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_SIDE_ACTIVE");
- public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_TOP =
- new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_TOP");
- public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_TOP_ACTIVE =
- new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_TOP_ACTIVE");
-
- public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_FRONT =
- new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_FRONT");
- public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_FRONT_ACTIVE =
- new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE");
- public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_SIDE =
- new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_SIDE");
- public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_SIDE_ACTIVE =
- new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE");
- public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_TOP =
- new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_TOP");
- public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_TOP_ACTIVE =
- new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_TOP_ACTIVE");
+ public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_FRONT = new CustomIcon(
+ "TileEntities/ReactorColdTrap/OVERLAY_FRONT");
+ public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_FRONT_ACTIVE = new CustomIcon(
+ "TileEntities/ReactorColdTrap/OVERLAY_FRONT_ACTIVE");
+ public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_SIDE = new CustomIcon(
+ "TileEntities/ReactorColdTrap/OVERLAY_SIDE");
+ public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_SIDE_ACTIVE = new CustomIcon(
+ "TileEntities/ReactorColdTrap/OVERLAY_SIDE_ACTIVE");
+ public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_TOP = new CustomIcon(
+ "TileEntities/ReactorColdTrap/OVERLAY_TOP");
+ public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_TOP_ACTIVE = new CustomIcon(
+ "TileEntities/ReactorColdTrap/OVERLAY_TOP_ACTIVE");
+
+ public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_FRONT = new CustomIcon(
+ "TileEntities/ReactorProcessingUnit/OVERLAY_FRONT");
+ public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_FRONT_ACTIVE = new CustomIcon(
+ "TileEntities/ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE");
+ public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_SIDE = new CustomIcon(
+ "TileEntities/ReactorProcessingUnit/OVERLAY_SIDE");
+ public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_SIDE_ACTIVE = new CustomIcon(
+ "TileEntities/ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE");
+ public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_TOP = new CustomIcon(
+ "TileEntities/ReactorProcessingUnit/OVERLAY_TOP");
+ public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_TOP_ACTIVE = new CustomIcon(
+ "TileEntities/ReactorProcessingUnit/OVERLAY_TOP_ACTIVE");
// Overlay Arrays
public static ITexture[] OVERLAYS_ENERGY_OUT_BUFFER = new ITexture[] {
- new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, new short[] {220, 220, 220, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, new short[] {220, 220, 220, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, new short[] {255, 100, 0, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, new short[] {255, 255, 30, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, new short[] {128, 128, 128, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, new short[] {240, 240, 245, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, new short[] {240, 240, 245, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, new short[] {240, 240, 245, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, new short[] {240, 240, 245, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, new short[] {240, 240, 245, 0})
- };
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, new short[] { 220, 220, 220, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, new short[] { 220, 220, 220, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, new short[] { 255, 100, 0, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, new short[] { 255, 255, 30, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, new short[] { 128, 128, 128, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, new short[] { 240, 240, 245, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, new short[] { 240, 240, 245, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, new short[] { 240, 240, 245, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, new short[] { 240, 240, 245, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, new short[] { 240, 240, 245, 0 }) };
public static ITexture[] OVERLAYS_ENERGY_OUT_MULTI_BUFFER = new ITexture[] {
- new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] {220, 220, 220, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] {220, 220, 220, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] {255, 100, 0, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] {255, 255, 30, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] {128, 128, 128, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] {240, 240, 245, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] {240, 240, 245, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] {240, 240, 245, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] {240, 240, 245, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] {240, 240, 245, 0})
- };
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 220, 220, 220, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 220, 220, 220, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 255, 100, 0, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 255, 255, 30, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 128, 128, 128, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 240, 240, 245, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 240, 240, 245, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 240, 240, 245, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, new short[] { 240, 240, 245, 0 }),
+ new GT_RenderedTexture(
+ (IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER,
+ new short[] { 240, 240, 245, 0 }) };
public static ITexture[] OVERLAYS_CABINET_FRONT = new ITexture[] {
- new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_1, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_2, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_3, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_4, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_5, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_6, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_7, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_8, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_9, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_10, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_11, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_12, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_13, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_14, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_15, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_16, new short[] {255, 255, 255, 0}),
- };
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_1, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_2, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_3, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_4, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_5, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_6, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_7, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_8, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_9, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_10, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_11, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_12, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_13, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_14, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_15, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_16, new short[] { 255, 255, 255, 0 }), };
public static ITexture[] OVERLAYS_COMPARTMENT_FRONT = new ITexture[] {
- new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_1, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_2, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_3, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_4, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_5, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_6, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_7, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_8, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_9, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_10, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_11, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_12, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_13, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_14, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_15, new short[] {255, 255, 255, 0}),
- new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_16, new short[] {255, 255, 255, 0}),
- };
-
- public static IIconContainer[] CONNECTED_FUSION_HULLS = new IIconContainer[] {
- TEXTURE_CASING_FUSION_COIL_II_1, TEXTURE_CASING_FUSION_COIL_II_2, TEXTURE_CASING_FUSION_COIL_II_3,
- TEXTURE_CASING_FUSION_COIL_II_4, TEXTURE_CASING_FUSION_COIL_II_5, TEXTURE_CASING_FUSION_COIL_II_6,
- TEXTURE_CASING_FUSION_COIL_II_7, TEXTURE_CASING_FUSION_COIL_II_8, TEXTURE_CASING_FUSION_COIL_II_9,
- TEXTURE_CASING_FUSION_COIL_II_10, TEXTURE_CASING_FUSION_COIL_II_11, TEXTURE_CASING_FUSION_COIL_II_12
- };
-
- public static IIconContainer[] TIERED_MACHINE_HULLS = new IIconContainer[] {
- TEXTURE_CASING_TIERED_ULV,
- TEXTURE_CASING_TIERED_LV,
- TEXTURE_CASING_TIERED_MV,
- TEXTURE_CASING_TIERED_HV,
- TEXTURE_CASING_TIERED_EV,
- TEXTURE_CASING_TIERED_IV,
- TEXTURE_CASING_TIERED_LuV,
- TEXTURE_CASING_TIERED_ZPM,
- TEXTURE_CASING_TIERED_UV,
- TEXTURE_CASING_TIERED_MAX
- };
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_1, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_2, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_3, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_4, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_5, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_6, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_7, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_8, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_9, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_10, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_11, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_12, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_13, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_14, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_15, new short[] { 255, 255, 255, 0 }),
+ new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_16, new short[] { 255, 255, 255, 0 }), };
+
+ public static IIconContainer[] CONNECTED_FUSION_HULLS = new IIconContainer[] { TEXTURE_CASING_FUSION_COIL_II_1,
+ TEXTURE_CASING_FUSION_COIL_II_2, TEXTURE_CASING_FUSION_COIL_II_3, TEXTURE_CASING_FUSION_COIL_II_4,
+ TEXTURE_CASING_FUSION_COIL_II_5, TEXTURE_CASING_FUSION_COIL_II_6, TEXTURE_CASING_FUSION_COIL_II_7,
+ TEXTURE_CASING_FUSION_COIL_II_8, TEXTURE_CASING_FUSION_COIL_II_9, TEXTURE_CASING_FUSION_COIL_II_10,
+ TEXTURE_CASING_FUSION_COIL_II_11, TEXTURE_CASING_FUSION_COIL_II_12 };
+
+ public static IIconContainer[] TIERED_MACHINE_HULLS = new IIconContainer[] { TEXTURE_CASING_TIERED_ULV,
+ TEXTURE_CASING_TIERED_LV, TEXTURE_CASING_TIERED_MV, TEXTURE_CASING_TIERED_HV, TEXTURE_CASING_TIERED_EV,
+ TEXTURE_CASING_TIERED_IV, TEXTURE_CASING_TIERED_LuV, TEXTURE_CASING_TIERED_ZPM, TEXTURE_CASING_TIERED_UV,
+ TEXTURE_CASING_TIERED_MAX };
public static Object Casing_Material_Turbine;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java
index bb09531d10..03afcfaa27 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java
@@ -16,18 +16,21 @@ public class TexturesGtCutomCovers {
private static void generateZTones() {
// ZTONES
- String[] aZtoneCoverTextureNames = new String[] {"agon", "iszm", "korp", "jelt", "bitt"};
+ String[] aZtoneCoverTextureNames = new String[] { "agon", "iszm", "korp", "jelt", "bitt" };
int aArrayIndex = 0;
- CustomIcon[][] aArrays = new CustomIcon[][] {
- TEXTURE_ZTONES_AGON, TEXTURE_ZTONES_ISZM, TEXTURE_ZTONES_KORP, TEXTURE_ZTONES_JELT, TEXTURE_ZTONES_BITT
- };
+ CustomIcon[][] aArrays = new CustomIcon[][] { TEXTURE_ZTONES_AGON, TEXTURE_ZTONES_ISZM, TEXTURE_ZTONES_KORP,
+ TEXTURE_ZTONES_JELT, TEXTURE_ZTONES_BITT };
for (CustomIcon[] t : aArrays) {
for (int s = 0; s < 16; s++) {
t[s] = new CustomIcon(
"Ztones",
- "sets/" + aZtoneCoverTextureNames[aArrayIndex] + "/" + aZtoneCoverTextureNames[aArrayIndex]
- + "_ (" + s + ")");
+ "sets/" + aZtoneCoverTextureNames[aArrayIndex]
+ + "/"
+ + aZtoneCoverTextureNames[aArrayIndex]
+ + "_ ("
+ + s
+ + ")");
}
aArrayIndex++;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java
index b068d12d26..8f9f57110e 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java
@@ -1,12 +1,13 @@
package gtPlusPlus.xmod.gregtech.common.blocks.textures;
+import net.minecraft.client.renderer.texture.TextureMap;
+import net.minecraft.util.IIcon;
+import net.minecraft.util.ResourceLocation;
+
import gregtech.api.GregTech_API;
import gregtech.api.interfaces.IIconContainer;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import net.minecraft.client.renderer.texture.TextureMap;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.ResourceLocation;
public final class TexturesGtTools {
@@ -17,6 +18,7 @@ public final class TexturesGtTools {
public static final CustomIcon ELECTRIC_BUTCHER_KNIFE = new CustomIcon("iconsets/ELECTRIC_BUTCHER_KNIFE");
public static final class CustomIcon implements IIconContainer, Runnable {
+
protected IIcon mIcon, mOverlay;
protected final String mIconName;
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java
index b136ad496a..a56acd41c7 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java
@@ -74,155 +74,82 @@ import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_TU_ACTIVE8;
import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_TU_ACTIVE9;
import static gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.*;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.IBlockAccess;
+
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Turbine;
import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaSpecialMultiCasings;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
public class LargeTurbineTextureHandler {
/**
* LP Turbines
*/
- public static IIcon[] OVERLAY_LP_TURBINE = new IIcon[] {
- LARGETURBINE_ST1.getIcon(),
- LARGETURBINE_ST2.getIcon(),
- LARGETURBINE_ST3.getIcon(),
- LARGETURBINE_ST4.getIcon(),
- LARGETURBINE_ST5.getIcon(),
- LARGETURBINE_ST6.getIcon(),
- LARGETURBINE_ST7.getIcon(),
- LARGETURBINE_ST8.getIcon(),
- LARGETURBINE_ST9.getIcon(),
- };
+ public static IIcon[] OVERLAY_LP_TURBINE = new IIcon[] { LARGETURBINE_ST1.getIcon(), LARGETURBINE_ST2.getIcon(),
+ LARGETURBINE_ST3.getIcon(), LARGETURBINE_ST4.getIcon(), LARGETURBINE_ST5.getIcon(),
+ LARGETURBINE_ST6.getIcon(), LARGETURBINE_ST7.getIcon(), LARGETURBINE_ST8.getIcon(),
+ LARGETURBINE_ST9.getIcon(), };
- public static IIcon[] OVERLAY_LP_TURBINE_ACTIVE = new IIcon[] {
- LARGETURBINE_ST_ACTIVE1.getIcon(),
- LARGETURBINE_ST_ACTIVE2.getIcon(),
- LARGETURBINE_ST_ACTIVE3.getIcon(),
- LARGETURBINE_ST_ACTIVE4.getIcon(),
- LARGETURBINE_ST_ACTIVE5.getIcon(),
- LARGETURBINE_ST_ACTIVE6.getIcon(),
- LARGETURBINE_ST_ACTIVE7.getIcon(),
- LARGETURBINE_ST_ACTIVE8.getIcon(),
- LARGETURBINE_ST_ACTIVE9.getIcon(),
- };
+ public static IIcon[] OVERLAY_LP_TURBINE_ACTIVE = new IIcon[] { LARGETURBINE_ST_ACTIVE1.getIcon(),
+ LARGETURBINE_ST_ACTIVE2.getIcon(), LARGETURBINE_ST_ACTIVE3.getIcon(), LARGETURBINE_ST_ACTIVE4.getIcon(),
+ LARGETURBINE_ST_ACTIVE5.getIcon(), LARGETURBINE_ST_ACTIVE6.getIcon(), LARGETURBINE_ST_ACTIVE7.getIcon(),
+ LARGETURBINE_ST_ACTIVE8.getIcon(), LARGETURBINE_ST_ACTIVE9.getIcon(), };
/**
* HP Turbines
*/
- public static IIcon[] OVERLAY_HP_TURBINE = new IIcon[] {
- LARGETURBINE_TI1.getIcon(),
- LARGETURBINE_TI2.getIcon(),
- LARGETURBINE_TI3.getIcon(),
- LARGETURBINE_TI4.getIcon(),
- LARGETURBINE_TI5.getIcon(),
- LARGETURBINE_TI6.getIcon(),
- LARGETURBINE_TI7.getIcon(),
- LARGETURBINE_TI8.getIcon(),
- LARGETURBINE_TI9.getIcon(),
- };
+ public static IIcon[] OVERLAY_HP_TURBINE = new IIcon[] { LARGETURBINE_TI1.getIcon(), LARGETURBINE_TI2.getIcon(),
+ LARGETURBINE_TI3.getIcon(), LARGETURBINE_TI4.getIcon(), LARGETURBINE_TI5.getIcon(),
+ LARGETURBINE_TI6.getIcon(), LARGETURBINE_TI7.getIcon(), LARGETURBINE_TI8.getIcon(),
+ LARGETURBINE_TI9.getIcon(), };
- public static IIcon[] OVERLAY_HP_TURBINE_ACTIVE = new IIcon[] {
- LARGETURBINE_TI_ACTIVE1.getIcon(),
- LARGETURBINE_TI_ACTIVE2.getIcon(),
- LARGETURBINE_TI_ACTIVE3.getIcon(),
- LARGETURBINE_TI_ACTIVE4.getIcon(),
- LARGETURBINE_TI_ACTIVE5.getIcon(),
- LARGETURBINE_TI_ACTIVE6.getIcon(),
- LARGETURBINE_TI_ACTIVE7.getIcon(),
- LARGETURBINE_TI_ACTIVE8.getIcon(),
- LARGETURBINE_TI_ACTIVE9.getIcon(),
- };
+ public static IIcon[] OVERLAY_HP_TURBINE_ACTIVE = new IIcon[] { LARGETURBINE_TI_ACTIVE1.getIcon(),
+ LARGETURBINE_TI_ACTIVE2.getIcon(), LARGETURBINE_TI_ACTIVE3.getIcon(), LARGETURBINE_TI_ACTIVE4.getIcon(),
+ LARGETURBINE_TI_ACTIVE5.getIcon(), LARGETURBINE_TI_ACTIVE6.getIcon(), LARGETURBINE_TI_ACTIVE7.getIcon(),
+ LARGETURBINE_TI_ACTIVE8.getIcon(), LARGETURBINE_TI_ACTIVE9.getIcon(), };
/**
* Gas Turbines
*/
- public static IIcon[] OVERLAY_GAS_TURBINE = new IIcon[] {
- LARGETURBINE_SS1.getIcon(),
- LARGETURBINE_SS2.getIcon(),
- LARGETURBINE_SS3.getIcon(),
- LARGETURBINE_SS4.getIcon(),
- LARGETURBINE_SS5.getIcon(),
- LARGETURBINE_SS6.getIcon(),
- LARGETURBINE_SS7.getIcon(),
- LARGETURBINE_SS8.getIcon(),
- LARGETURBINE_SS9.getIcon(),
- };
+ public static IIcon[] OVERLAY_GAS_TURBINE = new IIcon[] { LARGETURBINE_SS1.getIcon(), LARGETURBINE_SS2.getIcon(),
+ LARGETURBINE_SS3.getIcon(), LARGETURBINE_SS4.getIcon(), LARGETURBINE_SS5.getIcon(),
+ LARGETURBINE_SS6.getIcon(), LARGETURBINE_SS7.getIcon(), LARGETURBINE_SS8.getIcon(),
+ LARGETURBINE_SS9.getIcon(), };
- public static IIcon[] OVERLAY_GAS_TURBINE_ACTIVE = new IIcon[] {
- LARGETURBINE_SS_ACTIVE1.getIcon(),
- LARGETURBINE_SS_ACTIVE2.getIcon(),
- LARGETURBINE_SS_ACTIVE3.getIcon(),
- LARGETURBINE_SS_ACTIVE4.getIcon(),
- LARGETURBINE_SS_ACTIVE5.getIcon(),
- LARGETURBINE_SS_ACTIVE6.getIcon(),
- LARGETURBINE_SS_ACTIVE7.getIcon(),
- LARGETURBINE_SS_ACTIVE8.getIcon(),
- LARGETURBINE_SS_ACTIVE9.getIcon(),
- };
+ public static IIcon[] OVERLAY_GAS_TURBINE_ACTIVE = new IIcon[] { LARGETURBINE_SS_ACTIVE1.getIcon(),
+ LARGETURBINE_SS_ACTIVE2.getIcon(), LARGETURBINE_SS_ACTIVE3.getIcon(), LARGETURBINE_SS_ACTIVE4.getIcon(),
+ LARGETURBINE_SS_ACTIVE5.getIcon(), LARGETURBINE_SS_ACTIVE6.getIcon(), LARGETURBINE_SS_ACTIVE7.getIcon(),
+ LARGETURBINE_SS_ACTIVE8.getIcon(), LARGETURBINE_SS_ACTIVE9.getIcon(), };
/**
* Plasma Turbines
*/
- public static IIcon[] OVERLAY_PLASMA_TURBINE = new IIcon[] {
- LARGETURBINE_TU1.getIcon(),
- LARGETURBINE_TU2.getIcon(),
- LARGETURBINE_TU3.getIcon(),
- LARGETURBINE_TU4.getIcon(),
- LARGETURBINE_TU5.getIcon(),
- LARGETURBINE_TU6.getIcon(),
- LARGETURBINE_TU7.getIcon(),
- LARGETURBINE_TU8.getIcon(),
- LARGETURBINE_TU9.getIcon(),
- };
+ public static IIcon[] OVERLAY_PLASMA_TURBINE = new IIcon[] { LARGETURBINE_TU1.getIcon(), LARGETURBINE_TU2.getIcon(),
+ LARGETURBINE_TU3.getIcon(), LARGETURBINE_TU4.getIcon(), LARGETURBINE_TU5.getIcon(),
+ LARGETURBINE_TU6.getIcon(), LARGETURBINE_TU7.getIcon(), LARGETURBINE_TU8.getIcon(),
+ LARGETURBINE_TU9.getIcon(), };
- public static IIcon[] OVERLAY_PLASMA_TURBINE_ACTIVE = new IIcon[] {
- LARGETURBINE_TU_ACTIVE1.getIcon(),
- LARGETURBINE_TU_ACTIVE2.getIcon(),
- LARGETURBINE_TU_ACTIVE3.getIcon(),
- LARGETURBINE_TU_ACTIVE4.getIcon(),
- LARGETURBINE_TU_ACTIVE5.getIcon(),
- LARGETURBINE_TU_ACTIVE6.getIcon(),
- LARGETURBINE_TU_ACTIVE7.getIcon(),
- LARGETURBINE_TU_ACTIVE8.getIcon(),
- LARGETURBINE_TU_ACTIVE9.getIcon(),
- };
+ public static IIcon[] OVERLAY_PLASMA_TURBINE_ACTIVE = new IIcon[] { LARGETURBINE_TU_ACTIVE1.getIcon(),
+ LARGETURBINE_TU_ACTIVE2.getIcon(), LARGETURBINE_TU_ACTIVE3.getIcon(), LARGETURBINE_TU_ACTIVE4.getIcon(),
+ LARGETURBINE_TU_ACTIVE5.getIcon(), LARGETURBINE_TU_ACTIVE6.getIcon(), LARGETURBINE_TU_ACTIVE7.getIcon(),
+ LARGETURBINE_TU_ACTIVE8.getIcon(), LARGETURBINE_TU_ACTIVE9.getIcon(), };
- public static IIcon[] OVERLAY_SC_TURBINE = new IIcon[] {
- OVERLAY_SC_TURBINE1.getIcon(),
- OVERLAY_SC_TURBINE2.getIcon(),
- OVERLAY_SC_TURBINE3.getIcon(),
- OVERLAY_SC_TURBINE4.getIcon(),
- OVERLAY_SC_TURBINE5.getIcon(),
- OVERLAY_SC_TURBINE6.getIcon(),
- OVERLAY_SC_TURBINE7.getIcon(),
- OVERLAY_SC_TURBINE8.getIcon(),
- OVERLAY_SC_TURBINE9.getIcon(),
- };
+ public static IIcon[] OVERLAY_SC_TURBINE = new IIcon[] { OVERLAY_SC_TURBINE1.getIcon(),
+ OVERLAY_SC_TURBINE2.getIcon(), OVERLAY_SC_TURBINE3.getIcon(), OVERLAY_SC_TURBINE4.getIcon(),
+ OVERLAY_SC_TURBINE5.getIcon(), OVERLAY_SC_TURBINE6.getIcon(), OVERLAY_SC_TURBINE7.getIcon(),
+ OVERLAY_SC_TURBINE8.getIcon(), OVERLAY_SC_TURBINE9.getIcon(), };
- public static IIcon[] OVERLAY_SC_TURBINE_ACTIVE = new IIcon[] {
- OVERLAY_SC_TURBINE1_ACTIVE.getIcon(),
- OVERLAY_SC_TURBINE2_ACTIVE.getIcon(),
- OVERLAY_SC_TURBINE3_ACTIVE.getIcon(),
- OVERLAY_SC_TURBINE4_ACTIVE.getIcon(),
- OVERLAY_SC_TURBINE5_ACTIVE.getIcon(),
- OVERLAY_SC_TURBINE6_ACTIVE.getIcon(),
- OVERLAY_SC_TURBINE7_ACTIVE.getIcon(),
- OVERLAY_SC_TURBINE8_ACTIVE.getIcon(),
- OVERLAY_SC_TURBINE9_ACTIVE.getIcon(),
- };
+ public static IIcon[] OVERLAY_SC_TURBINE_ACTIVE = new IIcon[] { OVERLAY_SC_TURBINE1_ACTIVE.getIcon(),
+ OVERLAY_SC_TURBINE2_ACTIVE.getIcon(), OVERLAY_SC_TURBINE3_ACTIVE.getIcon(),
+ OVERLAY_SC_TURBINE4_ACTIVE.getIcon(), OVERLAY_SC_TURBINE5_ACTIVE.getIcon(),
+ OVERLAY_SC_TURBINE6_ACTIVE.getIcon(), OVERLAY_SC_TURBINE7_ACTIVE.getIcon(),
+ OVERLAY_SC_TURBINE8_ACTIVE.getIcon(), OVERLAY_SC_TURBINE9_ACTIVE.getIcon(), };
- public static IIcon handleCasingsGT(
- final IBlockAccess aWorld,
- final int xCoord,
- final int yCoord,
- final int zCoord,
- final int aSide,
- final GregtechMetaSpecialMultiCasings i) {
+ public static IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
+ final int aSide, final GregtechMetaSpecialMultiCasings i) {
final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
// 0 shaft
@@ -436,9 +363,7 @@ public class LargeTurbineTextureHandler {
if (aTile != null) {
final IMetaTileEntity aMetaTileEntity = aTile.getMetaTileEntity();
if (aMetaTileEntity != null && aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine) {
- aVal = ((GT_MetaTileEntity_Hatch_Turbine) aMetaTileEntity)
- .getBaseMetaTileEntity()
- .isActive();
+ aVal = ((GT_MetaTileEntity_Hatch_Turbine) aMetaTileEntity).getBaseMetaTileEntity().isActive();
// Logger.INFO("Returning "+aVal+" as Rotor Assembly controller status");
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_ComputerCube_Setup.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_ComputerCube_Setup.java
index 4c6dee9c2f..a3cf7e8219 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_ComputerCube_Setup.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_ComputerCube_Setup.java
@@ -2,6 +2,10 @@ package gtPlusPlus.xmod.gregtech.common.computer;
import static gtPlusPlus.xmod.gregtech.common.tileentities.misc.GT_TileEntity_ComputerCube.sReactorList;
+import java.util.ArrayList;
+
+import net.minecraft.item.ItemStack;
+
import Ic2ExpReactorPlanner.ComponentFactory;
import gregtech.api.enums.ItemList;
import gregtech.api.objects.GT_ItemStack;
@@ -12,40 +16,25 @@ import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.bartworks.BW_Utils;
import gtPlusPlus.xmod.goodgenerator.GG_Utils;
-import java.util.ArrayList;
-import net.minecraft.item.ItemStack;
public class GT_ComputerCube_Setup {
public static void init() {
- Logger.INFO("[Reactor Simulator] Added " + ComponentFactory.getComponentCount()
- + " components to ComponentFactory.");
+ Logger.INFO(
+ "[Reactor Simulator] Added " + ComponentFactory.getComponentCount()
+ + " components to ComponentFactory.");
if (sReactorList == null) {
sReactorList = new ArrayList<GT_ItemStack>();
- String[] aIc2Items = new String[] {
- "reactorUraniumSimple",
- "reactorUraniumDual",
- "reactorUraniumQuad", /*"reactorIsotopeCell",*/
- "reactorReflector",
- "reactorReflectorThick",
- "reactorCoolantSimple",
- "reactorCoolantTriple",
- "reactorCoolantSix",
- "reactorCondensator",
- "reactorCondensatorLap",
- "reactorPlating",
- "reactorPlatingHeat",
- "reactorPlatingExplosive",
- "reactorVent",
- "reactorVentCore",
- "reactorVentGold",
- "reactorVentSpread",
- "reactorVentDiamond",
- "reactorHeatSwitch",
- "reactorHeatSwitchCore",
- "reactorHeatSwitchSpread",
- "reactorHeatSwitchDiamond", /*"reactorHeatpack",*/
+ String[] aIc2Items = new String[] { "reactorUraniumSimple", "reactorUraniumDual", "reactorUraniumQuad", /*
+ * "reactorIsotopeCell",
+ */
+ "reactorReflector", "reactorReflectorThick", "reactorCoolantSimple", "reactorCoolantTriple",
+ "reactorCoolantSix", "reactorCondensator", "reactorCondensatorLap", "reactorPlating",
+ "reactorPlatingHeat", "reactorPlatingExplosive", "reactorVent", "reactorVentCore",
+ "reactorVentGold", "reactorVentSpread", "reactorVentDiamond", "reactorHeatSwitch",
+ "reactorHeatSwitchCore", "reactorHeatSwitchSpread",
+ "reactorHeatSwitchDiamond", /* "reactorHeatpack", */
};
for (String aItem : aIc2Items) {
@@ -58,31 +47,14 @@ public class GT_ComputerCube_Setup {
}
}
- ItemList[] aGtItems = new ItemList[] {
- ItemList.Neutron_Reflector,
- ItemList.Moxcell_1,
- ItemList.Moxcell_2,
- ItemList.Moxcell_4, /*ItemList.Uraniumcell_1, ItemList.Uraniumcell_2, ItemList.Uraniumcell_4,*/
- ItemList.NaquadahCell_1,
- ItemList.NaquadahCell_2,
- ItemList.NaquadahCell_4,
- ItemList.ThoriumCell_1,
- ItemList.ThoriumCell_2,
- ItemList.ThoriumCell_4,
- ItemList.MNqCell_1,
- ItemList.MNqCell_2,
- ItemList.MNqCell_4,
- ItemList.Reactor_Coolant_He_1,
- ItemList.Reactor_Coolant_He_3,
- ItemList.Reactor_Coolant_He_6,
- ItemList.Reactor_Coolant_NaK_1,
- ItemList.Reactor_Coolant_NaK_3,
- ItemList.Reactor_Coolant_NaK_6,
- ItemList.Reactor_Coolant_Sp_1,
- ItemList.Reactor_Coolant_Sp_2,
- ItemList.Reactor_Coolant_Sp_3,
- ItemList.Reactor_Coolant_Sp_6
- };
+ ItemList[] aGtItems = new ItemList[] { ItemList.Neutron_Reflector, ItemList.Moxcell_1, ItemList.Moxcell_2,
+ ItemList.Moxcell_4, /* ItemList.Uraniumcell_1, ItemList.Uraniumcell_2, ItemList.Uraniumcell_4, */
+ ItemList.NaquadahCell_1, ItemList.NaquadahCell_2, ItemList.NaquadahCell_4, ItemList.ThoriumCell_1,
+ ItemList.ThoriumCell_2, ItemList.ThoriumCell_4, ItemList.MNqCell_1, ItemList.MNqCell_2,
+ ItemList.MNqCell_4, ItemList.Reactor_Coolant_He_1, ItemList.Reactor_Coolant_He_3,
+ ItemList.Reactor_Coolant_He_6, ItemList.Reactor_Coolant_NaK_1, ItemList.Reactor_Coolant_NaK_3,
+ ItemList.Reactor_Coolant_NaK_6, ItemList.Reactor_Coolant_Sp_1, ItemList.Reactor_Coolant_Sp_2,
+ ItemList.Reactor_Coolant_Sp_3, ItemList.Reactor_Coolant_Sp_6 };
for (ItemList aItem : aGtItems) {
sReactorList.add(new GT_ItemStack(aItem.get(1)));
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_Computercube_Description.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_Computercube_Description.java
index 18ae44ab79..2e7a7c7ffb 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_Computercube_Description.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_Computercube_Description.java
@@ -1,15 +1,18 @@
package gtPlusPlus.xmod.gregtech.common.computer;
+import java.util.ArrayList;
+
+import net.minecraft.item.ItemStack;
+
import gregtech.api.enums.ItemList;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.minecraft.FluidUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
-import java.util.ArrayList;
-import net.minecraft.item.ItemStack;
public class GT_Computercube_Description {
+
public static ArrayList<GT_Computercube_Description> sDescriptions = new ArrayList<GT_Computercube_Description>();
public String[] mDescription;
@@ -25,510 +28,267 @@ public class GT_Computercube_Description {
public static void addStandardDescriptions() {
Logger.INFO("Adding Default Description Set of the Computer Cube");
new GT_Computercube_Description(
- new String[] {
- "Lightning Rod",
- "Also known as the Bane of",
- "Alblaka. The Lightning Rod",
- "enables you to gain Energy",
- "from Lightning! To set it up",
- "you just need the Block",
- "itself, 4 HV-Transformers",
- "and a crapton of Ironfences,",
- "which you then place on top",
- "of it. After that you have to",
- "wait for a Thunderstorm and",
- "when you are lucky you get",
- "2.5 MFSU of Energy out of",
- "it. If a Rod is high enough",
- "then Rain is also enough to",
- "get stroke, but with less",
- "probability ofcourse."
- },
- new ItemStack[] {
- GT_ModHandler.getIC2Item("ironFence", 1),
- GT_ModHandler.getIC2Item("ironFence", 1),
- GT_ModHandler.getIC2Item("ironFence", 1),
- GT_ModHandler.getIC2Item("ironFence", 1),
- ItemList.Machine_IV_LightningRod.get(1),
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null
- });
+ new String[] { "Lightning Rod", "Also known as the Bane of", "Alblaka. The Lightning Rod",
+ "enables you to gain Energy", "from Lightning! To set it up", "you just need the Block",
+ "itself, 4 HV-Transformers", "and a crapton of Ironfences,", "which you then place on top",
+ "of it. After that you have to", "wait for a Thunderstorm and", "when you are lucky you get",
+ "2.5 MFSU of Energy out of", "it. If a Rod is high enough", "then Rain is also enough to",
+ "get stroke, but with less", "probability ofcourse." },
+ new ItemStack[] { GT_ModHandler.getIC2Item("ironFence", 1), GT_ModHandler.getIC2Item("ironFence", 1),
+ GT_ModHandler.getIC2Item("ironFence", 1), GT_ModHandler.getIC2Item("ironFence", 1),
+ ItemList.Machine_IV_LightningRod.get(1), null, null, null, null, null, null, null, null,
+ null });
new GT_Computercube_Description(
- new String[] {
- "Quantum Chest",
- "You want to store tons of",
- "Materials into your Chests",
- "but you hate the Item limit",
- "of them? Not anymore! The",
- "Quantum Chest is able to",
- "store an INFINITE* amount",
- "of one single Item type per",
- "Chest.",
- "This Chest stores your Items",
- "like Data and ever has a",
- "Stack of the Item ready for",
- "extraction. It is compatible",
- "with any Item that doesnt",
- "have a NBT-Tag. You ask what",
- "NBT is? I know it, thats enough.",
- "Up to 2147483391*"
- },
- new ItemStack[] {
- ItemList.Quantum_Chest_IV.get(1),
- ItemList.Quantum_Chest_EV.get(1),
- ItemList.Quantum_Chest_HV.get(1),
- ItemList.Quantum_Chest_MV.get(1),
- ItemList.Quantum_Chest_LV.get(1),
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null
- });
+ new String[] { "Quantum Chest", "You want to store tons of", "Materials into your Chests",
+ "but you hate the Item limit", "of them? Not anymore! The", "Quantum Chest is able to",
+ "store an INFINITE* amount", "of one single Item type per", "Chest.",
+ "This Chest stores your Items", "like Data and ever has a", "Stack of the Item ready for",
+ "extraction. It is compatible", "with any Item that doesnt", "have a NBT-Tag. You ask what",
+ "NBT is? I know it, thats enough.", "Up to 2147483391*" },
+ new ItemStack[] { ItemList.Quantum_Chest_IV.get(1), ItemList.Quantum_Chest_EV.get(1),
+ ItemList.Quantum_Chest_HV.get(1), ItemList.Quantum_Chest_MV.get(1),
+ ItemList.Quantum_Chest_LV.get(1), null, null, null, null, null, null, null, null, null });
new GT_Computercube_Description(
- new String[] {
- "Quantum Tank",
- "You want to store tons of",
- "Fluids into your Tanks",
- "but you hate the capacity",
- "of them? Not anymore! The",
- "Quantum Tank is able to",
- "store an INFINITE* amount",
- "of one single Fluid type per",
- "Tank.",
- "This Tank stores your Fluids",
- "like Data and ever has a",
- "Stack of the Fluid ready for",
- "extraction. It is compatible",
- "with any Fluid. ",
- "You ask what",
- "NBT is? I know it, thats enough.",
- "* = 2147483391"
- },
- new ItemStack[] {
- ItemList.Quantum_Tank_IV.get(1),
- ItemList.Quantum_Tank_EV.get(1),
- ItemList.Quantum_Tank_HV.get(1),
- ItemList.Quantum_Tank_MV.get(1),
- ItemList.Quantum_Tank_LV.get(1),
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null
- });
+ new String[] { "Quantum Tank", "You want to store tons of", "Fluids into your Tanks",
+ "but you hate the capacity", "of them? Not anymore! The", "Quantum Tank is able to",
+ "store an INFINITE* amount", "of one single Fluid type per", "Tank.",
+ "This Tank stores your Fluids", "like Data and ever has a", "Stack of the Fluid ready for",
+ "extraction. It is compatible", "with any Fluid. ", "You ask what",
+ "NBT is? I know it, thats enough.", "* = 2147483391" },
+ new ItemStack[] { ItemList.Quantum_Tank_IV.get(1), ItemList.Quantum_Tank_EV.get(1),
+ ItemList.Quantum_Tank_HV.get(1), ItemList.Quantum_Tank_MV.get(1),
+ ItemList.Quantum_Tank_LV.get(1), null, null, null, null, null, null, null, null, null });
new GT_Computercube_Description(
- new String[] {
- "Computer Cube",
- "The Device you are",
- "currently using. This Computer",
- "is running the G.L.A.D.-OS,",
- "which is containing many",
- "usefull Apps:",
- "- Reactor Planner",
- "- Seedbag Scanner",
- "- Recipelists for GT-Devices",
- "- ",
- "- ",
- "- ",
- "- ",
- "- ",
- "And the Description List you",
- "are currently reading.",
- "~This Device has private Access~"
- },
- new ItemStack[] {
- null,
- null,
- null,
- null,
- GregtechItemList.Gregtech_Computer_Cube_Machine.get(1),
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null
- });
- /* new GT_Computercube_Description(new String[] {
- "UUM-Assembler", "It's like an automatic", "Crafting Table just for UUM", "It can store 20 UUM-Recipes", "and produces those on demand", "It costs 512EU per used piece", "of Universal-Usable-Matter(TM).", "The integrated Quantum Chest", "allows it to store all your", "UUM inside it.",
- "Top and Bottom are for Input,", "while the Output is on the", "Sides. The Output is designed,", "to work with RP-Managers, so", "build it into your recursive", "Autocraftingsystem.", "" }, new ItemStack[] {
- null, null, null, GT_ModHandler.getIC2Item("matter", 1), new ItemStack(GregTech_API.sBlockList[1], 1, 5), null, null, null, null, null,
- null, null, null, null });
- new GT_Computercube_Description(new String[] {
- "Sonictron", "You like Music? Then the", "Sonictron 9001 is your best", "choice! You can compose Alarms,", "Doorbell Sounds or boring", "Elevator Music, with the 64 Slots", "inside it. Just leftclick them", "to switch the Sound, rightclick", "them to switch the modulation", "and shiftclick to remove it.",
- "Then apply Redstone to play", "With the mobile Version you can", "play sounds everywhere, after", "you copied them from a normal", "Sonictron via rightclicking", "Sneakrightclicking pastes", "Emits Redstone when finished." }, new ItemStack[] {
- null, null, null, GregTech_API.getGregTechItem(32, 1, 0), new ItemStack(GregTech_API.sBlockList[1], 1, 6), null, null, null, null, null,
- null, null, null, null });
- new GT_Computercube_Description(new String[] {
- "L.E.S.U.", "The unlaggiest Multiblock ever!", "One Controllerblock, and as many", "'stupid' Storageblocks as you want.", "To use it, place one Controller", "and then place the LESU-Storages", "adjacent to it or other placed", "LESU-Storages. The Tier (max EU/t)", "of it depends on the amount of", "adjacent Storages. The",
- "Storageblocks are NOT TileEntities,", "what means that they cause as much", "Lag as a random Dirtblock. And the", "Controller Block only checks ONCE", "for the Storages, so no", "Blockiterationlag, AT. ALL. Anyone,", "who says that they lag gets murdered!" }, new ItemStack[] {
- null, null, null, new ItemStack(GregTech_API.sBlockList[0], 1, 6), new ItemStack(GregTech_API.sBlockList[1], 1, 7), null, null, null, null, null,
- null, null, null, null });
- new GT_Computercube_Description(new String[] {
- "I.D.S.U.", "The Interdimensional Storage Unit", "is a Device, which is like a", "wireless, crossdimensional and", "enderchestlike EU-Storage Block", "", "Every Player has one Network of", "these. The ID is determined by", "the Hashcode of the Name from the", "first Player, who opens it's GUI",
- "", "It stores up to 1 Billion EU", "and emits EV. But you need at", "least two of them for Energy", "Transfer", "", "" }, new ItemStack[] {
- null, null, null, null, new ItemStack(GregTech_API.sBlockList[1], 1, 8), null, null, null, null, null,
- null, null, null, null });
- new GT_Computercube_Description(new String[] {
- "A.E.S.U.", "The Adjustable Energy Storage Unit", "is like 10 MFSU and has an", "adjustable Output between 0 and", "2048EU/t. You could use it as a", "Transformer. It is Tier-IV, so", "it's basically needed to charge", "Energy Orbs and Lapotron Packs", "", "Not much else to say about it.",
- "", "", "", "", "", "", "" }, new ItemStack[] {
- null, null, null, null, new ItemStack(GregTech_API.sBlockList[1], 1, 9), null, null, null, null, null,
- null, null, null, null });
- new GT_Computercube_Description(new String[] {
- "Charge-O-Mat", "An automatable Charging Bench", "It puts (de-)charged Tools into", "the right Outputslots, which are", "accessible on the Sides of it.", "", "The Energy Orb inside stores enough", "to charge your QSuit almost instantly", "", "This is a Tier-V Charging Station",
- "even when the Max-IN/OUT is only", "2048EU/t. It also charges your Armor", "when you are standing close to it.", "", "If you apply Redstone, then it", "decharges instead.", "" }, new ItemStack[] {
- null, null, null, null, new ItemStack(GregTech_API.sBlockList[1], 1, 10), null, null, null, null, null,
- null, null, null, null });
- new GT_Computercube_Description(new String[] {
- "Centrifuge", "This is a Machine to seperate", "Isotopes.", "", "It has a maximum Consumption Rate", "of 5EU/t, and its Maxinput is", "32EU/t. The time it needs depends", "on the Recipe you use.", "", "It needs Tin Cells for some Recipes,",
- "which you put in the Top Left Slot", "", "Top = Input", "Bottom = Tin Cells", "Side = Output", "", "You can pipe Lava into this Device" }, new ItemStack[] {
- null, null, null, null, new ItemStack(GregTech_API.sBlockList[1], 1, 11), null, null, null, null, null,
- null, null, null, null });
- new GT_Computercube_Description(new String[] {
- "Electrolyzer", "This is a Machine to seperate", "Molecules and electrolyze", "Watercells.", "", "It has a maximum Consumption Rate", "of 128EU/t, and its Maxinput is", "128EU/t. The time it needs depends", "on the Recipe you use.", "",
- "It needs Tin Cells for some Recipes,", "which you put in the Bottom Left Slot", "", "Top = Input", "Bottom = Tin Cells", "Side = Output", "" }, new ItemStack[] {
- null, null, null, null, new ItemStack(GregTech_API.sBlockList[1], 1, 25), null, null, null, null, null,
- null, null, null, null });
- new GT_Computercube_Description(new String[] {
- "Grinder", "This Machines purpose is to", "macerate and grind Ores.", "It can ONLY grind Ores, don't", "try regular Macerator Recipes.", "It has a fixed Consumption Rate", "of 128EU/t, and its Maxinput is", "128EU/t. The time it needs is", "5 seconds per Ore Block", "It needs Water for most Recipes,",
- "which you put in the Bottom Left Slot", "Top = Input", "Bottom = Water", "Side = Output", "Its a lagfree Multiblock Structure,", "so you need a special Machine Casing", "for this Device. (see GUI)" }, new ItemStack[] {
- null, new ItemStack(Block.field_71943_B, 1), new ItemStack(GregTech_API.sBlockList[0], 1, 14), new ItemStack(GregTech_API.sBlockList[0], 1, 13), new ItemStack(GregTech_API.sBlockList[1], 1, 28), null, null, null, null, null,
- null, null, null, null });*/
+ new String[] { "Computer Cube", "The Device you are", "currently using. This Computer",
+ "is running the G.L.A.D.-OS,", "which is containing many", "usefull Apps:", "- Reactor Planner",
+ "- Seedbag Scanner", "- Recipelists for GT-Devices", "- ", "- ", "- ", "- ", "- ",
+ "And the Description List you", "are currently reading.", "~This Device has private Access~" },
+ new ItemStack[] { null, null, null, null, GregtechItemList.Gregtech_Computer_Cube_Machine.get(1), null,
+ null, null, null, null, null, null, null, null });
+ /*
+ * new GT_Computercube_Description(new String[] { "UUM-Assembler", "It's like an automatic",
+ * "Crafting Table just for UUM", "It can store 20 UUM-Recipes", "and produces those on demand",
+ * "It costs 512EU per used piece", "of Universal-Usable-Matter(TM).", "The integrated Quantum Chest",
+ * "allows it to store all your", "UUM inside it.", "Top and Bottom are for Input,",
+ * "while the Output is on the", "Sides. The Output is designed,", "to work with RP-Managers, so",
+ * "build it into your recursive", "Autocraftingsystem.", "" }, new ItemStack[] { null, null, null,
+ * GT_ModHandler.getIC2Item("matter", 1), new ItemStack(GregTech_API.sBlockList[1], 1, 5), null, null, null,
+ * null, null, null, null, null, null }); new GT_Computercube_Description(new String[] { "Sonictron",
+ * "You like Music? Then the", "Sonictron 9001 is your best", "choice! You can compose Alarms,",
+ * "Doorbell Sounds or boring", "Elevator Music, with the 64 Slots", "inside it. Just leftclick them",
+ * "to switch the Sound, rightclick", "them to switch the modulation", "and shiftclick to remove it.",
+ * "Then apply Redstone to play", "With the mobile Version you can", "play sounds everywhere, after",
+ * "you copied them from a normal", "Sonictron via rightclicking", "Sneakrightclicking pastes",
+ * "Emits Redstone when finished." }, new ItemStack[] { null, null, null, GregTech_API.getGregTechItem(32, 1,
+ * 0), new ItemStack(GregTech_API.sBlockList[1], 1, 6), null, null, null, null, null, null, null, null, null });
+ * new GT_Computercube_Description(new String[] { "L.E.S.U.", "The unlaggiest Multiblock ever!",
+ * "One Controllerblock, and as many", "'stupid' Storageblocks as you want.", "To use it, place one Controller",
+ * "and then place the LESU-Storages", "adjacent to it or other placed", "LESU-Storages. The Tier (max EU/t)",
+ * "of it depends on the amount of", "adjacent Storages. The", "Storageblocks are NOT TileEntities,",
+ * "what means that they cause as much", "Lag as a random Dirtblock. And the",
+ * "Controller Block only checks ONCE", "for the Storages, so no", "Blockiterationlag, AT. ALL. Anyone,",
+ * "who says that they lag gets murdered!" }, new ItemStack[] { null, null, null, new
+ * ItemStack(GregTech_API.sBlockList[0], 1, 6), new ItemStack(GregTech_API.sBlockList[1], 1, 7), null, null,
+ * null, null, null, null, null, null, null }); new GT_Computercube_Description(new String[] { "I.D.S.U.",
+ * "The Interdimensional Storage Unit", "is a Device, which is like a", "wireless, crossdimensional and",
+ * "enderchestlike EU-Storage Block", "", "Every Player has one Network of", "these. The ID is determined by",
+ * "the Hashcode of the Name from the", "first Player, who opens it's GUI", "", "It stores up to 1 Billion EU",
+ * "and emits EV. But you need at", "least two of them for Energy", "Transfer", "", "" }, new ItemStack[] {
+ * null, null, null, null, new ItemStack(GregTech_API.sBlockList[1], 1, 8), null, null, null, null, null, null,
+ * null, null, null }); new GT_Computercube_Description(new String[] { "A.E.S.U.",
+ * "The Adjustable Energy Storage Unit", "is like 10 MFSU and has an", "adjustable Output between 0 and",
+ * "2048EU/t. You could use it as a", "Transformer. It is Tier-IV, so", "it's basically needed to charge",
+ * "Energy Orbs and Lapotron Packs", "", "Not much else to say about it.", "", "", "", "", "", "", "" }, new
+ * ItemStack[] { null, null, null, null, new ItemStack(GregTech_API.sBlockList[1], 1, 9), null, null, null,
+ * null, null, null, null, null, null }); new GT_Computercube_Description(new String[] { "Charge-O-Mat",
+ * "An automatable Charging Bench", "It puts (de-)charged Tools into", "the right Outputslots, which are",
+ * "accessible on the Sides of it.", "", "The Energy Orb inside stores enough",
+ * "to charge your QSuit almost instantly", "", "This is a Tier-V Charging Station",
+ * "even when the Max-IN/OUT is only", "2048EU/t. It also charges your Armor",
+ * "when you are standing close to it.", "", "If you apply Redstone, then it", "decharges instead.", "" }, new
+ * ItemStack[] { null, null, null, null, new ItemStack(GregTech_API.sBlockList[1], 1, 10), null, null, null,
+ * null, null, null, null, null, null }); new GT_Computercube_Description(new String[] { "Centrifuge",
+ * "This is a Machine to seperate", "Isotopes.", "", "It has a maximum Consumption Rate",
+ * "of 5EU/t, and its Maxinput is", "32EU/t. The time it needs depends", "on the Recipe you use.", "",
+ * "It needs Tin Cells for some Recipes,", "which you put in the Top Left Slot", "", "Top = Input",
+ * "Bottom = Tin Cells", "Side = Output", "", "You can pipe Lava into this Device" }, new ItemStack[] { null,
+ * null, null, null, new ItemStack(GregTech_API.sBlockList[1], 1, 11), null, null, null, null, null, null, null,
+ * null, null }); new GT_Computercube_Description(new String[] { "Electrolyzer",
+ * "This is a Machine to seperate", "Molecules and electrolyze", "Watercells.", "",
+ * "It has a maximum Consumption Rate", "of 128EU/t, and its Maxinput is", "128EU/t. The time it needs depends",
+ * "on the Recipe you use.", "", "It needs Tin Cells for some Recipes,",
+ * "which you put in the Bottom Left Slot", "", "Top = Input", "Bottom = Tin Cells", "Side = Output", "" }, new
+ * ItemStack[] { null, null, null, null, new ItemStack(GregTech_API.sBlockList[1], 1, 25), null, null, null,
+ * null, null, null, null, null, null }); new GT_Computercube_Description(new String[] { "Grinder",
+ * "This Machines purpose is to", "macerate and grind Ores.", "It can ONLY grind Ores, don't",
+ * "try regular Macerator Recipes.", "It has a fixed Consumption Rate", "of 128EU/t, and its Maxinput is",
+ * "128EU/t. The time it needs is", "5 seconds per Ore Block", "It needs Water for most Recipes,",
+ * "which you put in the Bottom Left Slot", "Top = Input", "Bottom = Water", "Side = Output",
+ * "Its a lagfree Multiblock Structure,", "so you need a special Machine Casing", "for this Device. (see GUI)"
+ * }, new ItemStack[] { null, new ItemStack(Block.field_71943_B, 1), new ItemStack(GregTech_API.sBlockList[0],
+ * 1, 14), new ItemStack(GregTech_API.sBlockList[0], 1, 13), new ItemStack(GregTech_API.sBlockList[1], 1, 28),
+ * null, null, null, null, null, null, null, null, null });
+ */
new GT_Computercube_Description(
- new String[] {
- "Electric Blast Furnace",
- "You may know the Blast Furnace",
- "of Railcraft. This one works",
- "similar, as it can also produce",
- "Steel out of Iron and Coal.",
- "",
- "Its heat Capacity depends on the",
- "used Machine Casings for building",
- "it. The better they are, the more",
- "Heat it can achieve.",
- "",
- "Top = Input 1",
- "Bottom = Input 2",
- "Side = Output",
- "Its a lagfree Multiblock Structure,",
- "so you need a special Machine Casing",
- "for this Device. (see GUI)"
- },
- new ItemStack[] {
- null,
- null,
- null,
- ItemList.Casing_HeatProof.get(1),
- ItemList.Machine_Multi_BlastFurnace.get(1),
- ItemList.Casing_Coil_Cupronickel.get(1),
- ItemList.Casing_Coil_Kanthal.get(1),
- ItemList.Casing_Coil_Nichrome.get(1),
- ItemList.Casing_Coil_TungstenSteel.get(1),
- ItemList.Casing_Coil_HSSG.get(1),
- ItemList.Casing_Coil_HSSS.get(1),
- ItemList.Casing_Coil_Naquadah.get(1),
- ItemList.Casing_Coil_NaquadahAlloy.get(1),
- null
- });
- /* new GT_Computercube_Description(new String[] {
- "Sawmill", "This Device turns your Logs", "into more Planks, than a normal", "Steve can produce with his Hands.", "", "Its byproduct, Wood Pulp, can be", "compressed into special Planks,", "which are burning like Charcoal.", "", "It needs Water for most Recipes,",
- "which you put in the Bottom Left Slot", "Top = Input", "Water Sides = Water", "Saw Side = Output", "Its a lagfree Multiblock Structure,", "so you need a special Machine Casing", "for this Device. (see GUI)" }, new ItemStack[] {
- null, null, GT_MetaItem_Material.instance.getStack(15, 1), GT_MetaItem_Dust.instance.getStack(15, 1), new ItemStack(GregTech_API.sBlockList[1], 1, 32), null, null, null, null, null,
- null, null, null, null });*/
+ new String[] { "Electric Blast Furnace", "You may know the Blast Furnace",
+ "of Railcraft. This one works", "similar, as it can also produce",
+ "Steel out of Iron and Coal.", "", "Its heat Capacity depends on the",
+ "used Machine Casings for building", "it. The better they are, the more",
+ "Heat it can achieve.", "", "Top = Input 1", "Bottom = Input 2", "Side = Output",
+ "Its a lagfree Multiblock Structure,", "so you need a special Machine Casing",
+ "for this Device. (see GUI)" },
+ new ItemStack[] { null, null, null, ItemList.Casing_HeatProof.get(1),
+ ItemList.Machine_Multi_BlastFurnace.get(1), ItemList.Casing_Coil_Cupronickel.get(1),
+ ItemList.Casing_Coil_Kanthal.get(1), ItemList.Casing_Coil_Nichrome.get(1),
+ ItemList.Casing_Coil_TungstenSteel.get(1), ItemList.Casing_Coil_HSSG.get(1),
+ ItemList.Casing_Coil_HSSS.get(1), ItemList.Casing_Coil_Naquadah.get(1),
+ ItemList.Casing_Coil_NaquadahAlloy.get(1), null });
+ /*
+ * new GT_Computercube_Description(new String[] { "Sawmill", "This Device turns your Logs",
+ * "into more Planks, than a normal", "Steve can produce with his Hands.", "",
+ * "Its byproduct, Wood Pulp, can be", "compressed into special Planks,", "which are burning like Charcoal.",
+ * "", "It needs Water for most Recipes,", "which you put in the Bottom Left Slot", "Top = Input",
+ * "Water Sides = Water", "Saw Side = Output", "Its a lagfree Multiblock Structure,",
+ * "so you need a special Machine Casing", "for this Device. (see GUI)" }, new ItemStack[] { null, null,
+ * GT_MetaItem_Material.instance.getStack(15, 1), GT_MetaItem_Dust.instance.getStack(15, 1), new
+ * ItemStack(GregTech_API.sBlockList[1], 1, 32), null, null, null, null, null, null, null, null, null });
+ */
new GT_Computercube_Description(
- new String[] {
- "Implosion Compressor",
- "You need to turn Dusts back",
- "into Gems? Or do you just want",
- "to make Iridium Plates?",
- "With a bit ITNT you can achieve",
- "that in this Device!",
- "",
- "We strongly recommend to use",
- "Flint Dust instead of Flints",
- "for making the ITNT.",
- "",
- "Top = Input",
- "Explosion Sides = Output",
- "ITNT Side = ITNT Input",
- "Its a lagfree Multiblock Structure,",
- "so you need a special Machine Casing",
- "for this Device. (see GUI)"
- },
- new ItemStack[] {
- null,
- null,
- null,
- GT_ModHandler.getIC2Item("industrialTnt", 1, new ItemStack(net.minecraft.init.Blocks.tnt, 1)),
- ItemList.Machine_Multi_ImplosionCompressor.get(1),
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null
- });
- /* new GT_Computercube_Description(new String[] {
- "Superconductor", "Expensive, but superconducting", "nearly infinite EU/p and it has", "no Cableloss!", "Do not confuse this with the", "Superconductor Item!", "", "Supercondensator", "This is a special kind of Transformer", "It allows you to convert anything down",
- "to 8192 EU/t, what is like a normal HVT.", "But if you apply Redstone to it then it", "outputs friggin 1000000EU/t!!!", "", "You also need it for the Fusion Reactor.", "Some Machines will require that high", "Voltage in a short period of time." }, new ItemStack[] {
- null, null, GregTech_API.getGregTechItem(3, 1, 2), new ItemStack(GregTech_API.sBlockList[1], 1, 12), new ItemStack(GregTech_API.sBlockList[1], 1, 15), null, null, null, null, null,
- null, null, null, null });
- new GT_Computercube_Description(new String[] {
- "Player Detector", "This nice little Device is able", "to detect Players in a Range of", "16-Spherical Meters and a", "EU-Consumption of 2.5EU/t.", "", "It can be switched to 3 Diffrent", "Modes, to detect YOURSELF, OTHERS", "and ALL Players by Rightclicking it.", "",
- "It doesnt detect regular Mobs.", "", "", "", "", "", "~This Device has private Access~" }, new ItemStack[] {
- null, null, null, null, new ItemStack(GregTech_API.sBlockList[1], 1, 13), null, null, null, null, null,
- null, null, null, null });*/
+ new String[] { "Implosion Compressor", "You need to turn Dusts back", "into Gems? Or do you just want",
+ "to make Iridium Plates?", "With a bit ITNT you can achieve", "that in this Device!", "",
+ "We strongly recommend to use", "Flint Dust instead of Flints", "for making the ITNT.", "",
+ "Top = Input", "Explosion Sides = Output", "ITNT Side = ITNT Input",
+ "Its a lagfree Multiblock Structure,", "so you need a special Machine Casing",
+ "for this Device. (see GUI)" },
+ new ItemStack[] { null, null, null,
+ GT_ModHandler.getIC2Item("industrialTnt", 1, new ItemStack(net.minecraft.init.Blocks.tnt, 1)),
+ ItemList.Machine_Multi_ImplosionCompressor.get(1), null, null, null, null, null, null, null,
+ null, null });
+ /*
+ * new GT_Computercube_Description(new String[] { "Superconductor", "Expensive, but superconducting",
+ * "nearly infinite EU/p and it has", "no Cableloss!", "Do not confuse this with the", "Superconductor Item!",
+ * "", "Supercondensator", "This is a special kind of Transformer", "It allows you to convert anything down",
+ * "to 8192 EU/t, what is like a normal HVT.", "But if you apply Redstone to it then it",
+ * "outputs friggin 1000000EU/t!!!", "", "You also need it for the Fusion Reactor.",
+ * "Some Machines will require that high", "Voltage in a short period of time." }, new ItemStack[] { null, null,
+ * GregTech_API.getGregTechItem(3, 1, 2), new ItemStack(GregTech_API.sBlockList[1], 1, 12), new
+ * ItemStack(GregTech_API.sBlockList[1], 1, 15), null, null, null, null, null, null, null, null, null }); new
+ * GT_Computercube_Description(new String[] { "Player Detector", "This nice little Device is able",
+ * "to detect Players in a Range of", "16-Spherical Meters and a", "EU-Consumption of 2.5EU/t.", "",
+ * "It can be switched to 3 Diffrent", "Modes, to detect YOURSELF, OTHERS",
+ * "and ALL Players by Rightclicking it.", "", "It doesnt detect regular Mobs.", "", "", "", "", "",
+ * "~This Device has private Access~" }, new ItemStack[] { null, null, null, null, new
+ * ItemStack(GregTech_API.sBlockList[1], 1, 13), null, null, null, null, null, null, null, null, null });
+ */
new GT_Computercube_Description(
- new String[] {
- "Matter Fabricator",
- "The Matter Fabricator is nothing",
- "else than a Mass Fabricator, which",
- "can ONLY run on Scrap and other",
- "Amplifiers.",
- "",
- "With the Default Config it is 100",
- "times more expensive than normal.",
- "Of course you can set the Config",
- "to 166666, to get your normal",
- "Massfabricationrate back, or you",
- "could make Mass Fabrication even",
- "cheaper, if you really want to",
- "make Mass Fabrication that easy",
- "",
- "",
- ""
- },
- new ItemStack[] {
- null,
- null,
- null,
- GT_Utility.getFluidDisplayStack(FluidUtils.getUUM(1), false),
- ItemList.Machine_LV_Massfab.get(1),
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null
- });
+ new String[] { "Matter Fabricator", "The Matter Fabricator is nothing",
+ "else than a Mass Fabricator, which", "can ONLY run on Scrap and other", "Amplifiers.", "",
+ "With the Default Config it is 100", "times more expensive than normal.",
+ "Of course you can set the Config", "to 166666, to get your normal",
+ "Massfabricationrate back, or you", "could make Mass Fabrication even",
+ "cheaper, if you really want to", "make Mass Fabrication that easy", "", "", "" },
+ new ItemStack[] { null, null, null, GT_Utility.getFluidDisplayStack(FluidUtils.getUUM(1), false),
+ ItemList.Machine_LV_Massfab.get(1), null, null, null, null, null, null, null, null, null });
new GT_Computercube_Description(
- new String[] {
- "Electric Autocrafting Tables",
- "These are Crafting Tables for the",
- "common need of autocrafting in",
- "Factories. One Craft needs 5000EU to",
- "be performed, so you have actually to",
- "lay Wires to it. This Table is",
- "unique as its also able, to give you",
- "the used Capsulecellcontainers, made",
- "by Industrial Corp, back.",
- "You may use that behaviour to",
- "craft anything releated to chemics,",
- "like the 2xKNO3-Recipe for Saltpeter.",
- "The 5 Modes are the following:",
- "1. Craft Recipe, 2. All 5 Modes",
- "3. Craft all as single Items",
- "4. 2x2-Grid and 5. a 3x3-Grid.",
- "It accepts only 32EU/p as Input."
- },
- new ItemStack[] {
- null,
- null,
- null,
- null,
- GregtechItemList.GT4_Electric_Auto_Workbench_LV.get(1),
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null
- });
- /* new GT_Computercube_Description(new String[] {
- "Automation with GregTech", "Translocators and Buffers are the", "newest Way to automate your Machines.", "Screw Buildcraft, these EU-wasting", "Devices are much more awesome.", "They output 32EU/t to their directed", "IN- and OUT-puts, making them usefull", "for things, like saving wires.", "Translocators are taking Stuff from", "the Block at their green Inputfacing",
- "and putting it into the Block at the", "red Outputfacing. Buffers do the same,", "but the grab Items from their own", "Inventory, what makes them usefull", "as Pipe-replacement.", "Buffers also have Redstone Intelligence,", "which you can configure in their GUI." }, new ItemStack[] {
- null, null, new ItemStack(GregTech_API.sBlockList[1], 1, 19), new ItemStack(GregTech_API.sBlockList[1], 1, 18), new ItemStack(GregTech_API.sBlockList[1], 1, 17), null, null, null, null, null,
- null, null, null, null });
- new GT_Computercube_Description(new String[] {
- "Silver Ore", "It's rarity is similar to Gold", "Silver can be used, to make", "Circuits cheaper, or you can use", "it for Redpowerstuff.", "", "", "", "", "",
- "", "", "", "", "", "", "" }, new ItemStack[] {
- null, null, GT_OreDictUnificator.get("dustSilver", 1), GregTech_API.getGregTechItem(0, 1, 17), new ItemStack(GregTech_API.sBlockList[2], 1, 1), null, null, null, null, null,
- null, null, null, null });
- new GT_Computercube_Description(new String[] {
- "Sapphires and Rubys", "These spawn exactly like Emeralds.", "But Rubies are found in Deserts,", "while Sapphires can be found in", "Oceans.", "", "They currently make only a cheaper", "Recipe for Energycrystals and", "Lapotroncrystals, but they are", "Redpower Compatible.",
- "", "They also sometimes drop random", "other Gems, like Garnet for Ruby", "or green Sapphire for Sapphire", "in addition.", "", "" }, new ItemStack[] {
- null, GregTech_API.getGregTechItem(0, 1, 32), new ItemStack(GregTech_API.sBlockList[2], 1, 3), GregTech_API.getGregTechItem(0, 1, 33), new ItemStack(GregTech_API.sBlockList[2], 1, 4), null, null, null, null, null,
- null, null, null, null });
- new GT_Computercube_Description(new String[] {
- "Bauxite Ore", "The Stuff out of which you can", "produce Aluminium and also", "Titanium.", "You find this Ore in Plains and", "Forests.", "", "If you think Aluminium is useless", "then note, that mobs NEVER spawn", "ontop of an Aluminium Block",
- "(Same applies also for Silver-,", "Gem- and Iridium Blocks)", "Production Chain:", "macerating Bauxite Ore", "electrolyzing 24 Bauxite Dust", "smelting Aluminium Dust in a", "Blast Furnace" }, new ItemStack[] {
- new ItemStack(GregTech_API.sBlockList[0], 1, 7), GregTech_API.getGregTechItem(0, 1, 18), GregTech_API.getGregTechItem(1, 1, 18), GregTech_API.getGregTechItem(1, 1, 17), new ItemStack(GregTech_API.sBlockList[2], 1, 5), null, null, null, null, null,
- null, null, null, null });
- new GT_Computercube_Description(new String[] {
- "Titanium", "Produced by centrifuging Bauxitedust", "as a byproduct, this Material can make", "anything much more resistant against", "damage, like Explosions.", "Blocks made of Titaniumingots have a", "large Blastresistance", "", "It can also be used to craft tons of", "mixed Metal Ingots",
- "", "", "", "", "", "", "" }, new ItemStack[] {
- new ItemStack(GregTech_API.sBlockList[0], 1, 8), GregTech_API.getGregTechItem(0, 1, 19), GregTech_API.getGregTechItem(1, 1, 19), GregTech_API.getGregTechItem(1, 1, 17), new ItemStack(GregTech_API.sBlockList[2], 1, 5), null, null, null, null, null,
- null, null, null, null });
- new GT_Computercube_Description(new String[] {
- "Iridium Ore", "You can find it only when you", "stripmine very large Areas with", "Quarries and such. There is only", "one in every 5th-10th Chunk.", "It's even more rare in Oceans!", "", "Some people disable the UUM-Recipe", "for Iridium, for making getting it", "an Achievement.",
- "", "However Iridium Ore contains traces", "of Platinum, so it's best to use the", "Industrial Grinder for this Ore.", "", "", "" }, new ItemStack[] {
- null, null, GT_OreDictUnificator.get("plateAlloyIridium", 1), GT_ModHandler.getIC2Item("iridiumOre", 1), new ItemStack(GregTech_API.sBlockList[2], 1, 2), null, null, null, null, null,
- null, null, null, null });
- new GT_Computercube_Description(new String[] {
- "Helium Coolant Cell", "These are just cheaper, than the", "Water based Coolant Cells, and can", "also hold six times more Heat.", "", "Helium Cells can also be used for", "making Luminators and Mininglasers", "", "", "",
- "", "", "", "", "", "", "" }, new ItemStack[] {
- GregTech_API.getGregTechItem(2, 1, 6), GregTech_API.getGregTechItem(2, 1, 3), GregTech_API.getGregTechItem(34, 1, 0), GregTech_API.getGregTechItem(35, 1, 0), GregTech_API.getGregTechItem(36, 1, 0), null, null, null, null, null,
- null, null, null, null });
- new GT_Computercube_Description(new String[] {
- "Destructopack", "Open its GUI via rightclick and", "dump all the useless Stuff from", "your Inventory into it, instead of", "littering Items into the World.", "", "", "", "", "",
- "", "", "", "", "", "", "" }, new ItemStack[] {
- null, null, null, null, GregTech_API.getGregTechItem(33, 1, 0), null, null, null, null, null,
- null, null, null, null });*/
+ new String[] { "Electric Autocrafting Tables", "These are Crafting Tables for the",
+ "common need of autocrafting in", "Factories. One Craft needs 5000EU to",
+ "be performed, so you have actually to", "lay Wires to it. This Table is",
+ "unique as its also able, to give you", "the used Capsulecellcontainers, made",
+ "by Industrial Corp, back.", "You may use that behaviour to",
+ "craft anything releated to chemics,", "like the 2xKNO3-Recipe for Saltpeter.",
+ "The 5 Modes are the following:", "1. Craft Recipe, 2. All 5 Modes",
+ "3. Craft all as single Items", "4. 2x2-Grid and 5. a 3x3-Grid.",
+ "It accepts only 32EU/p as Input." },
+ new ItemStack[] { null, null, null, null, GregtechItemList.GT4_Electric_Auto_Workbench_LV.get(1), null,
+ null, null, null, null, null, null, null, null });
+ /*
+ * new GT_Computercube_Description(new String[] { "Automation with GregTech",
+ * "Translocators and Buffers are the", "newest Way to automate your Machines.",
+ * "Screw Buildcraft, these EU-wasting", "Devices are much more awesome.",
+ * "They output 32EU/t to their directed", "IN- and OUT-puts, making them usefull",
+ * "for things, like saving wires.", "Translocators are taking Stuff from",
+ * "the Block at their green Inputfacing", "and putting it into the Block at the",
+ * "red Outputfacing. Buffers do the same,", "but the grab Items from their own",
+ * "Inventory, what makes them usefull", "as Pipe-replacement.", "Buffers also have Redstone Intelligence,",
+ * "which you can configure in their GUI." }, new ItemStack[] { null, null, new
+ * ItemStack(GregTech_API.sBlockList[1], 1, 19), new ItemStack(GregTech_API.sBlockList[1], 1, 18), new
+ * ItemStack(GregTech_API.sBlockList[1], 1, 17), null, null, null, null, null, null, null, null, null }); new
+ * GT_Computercube_Description(new String[] { "Silver Ore", "It's rarity is similar to Gold",
+ * "Silver can be used, to make", "Circuits cheaper, or you can use", "it for Redpowerstuff.", "", "", "", "",
+ * "", "", "", "", "", "", "", "" }, new ItemStack[] { null, null, GT_OreDictUnificator.get("dustSilver", 1),
+ * GregTech_API.getGregTechItem(0, 1, 17), new ItemStack(GregTech_API.sBlockList[2], 1, 1), null, null, null,
+ * null, null, null, null, null, null }); new GT_Computercube_Description(new String[] { "Sapphires and Rubys",
+ * "These spawn exactly like Emeralds.", "But Rubies are found in Deserts,", "while Sapphires can be found in",
+ * "Oceans.", "", "They currently make only a cheaper", "Recipe for Energycrystals and",
+ * "Lapotroncrystals, but they are", "Redpower Compatible.", "", "They also sometimes drop random",
+ * "other Gems, like Garnet for Ruby", "or green Sapphire for Sapphire", "in addition.", "", "" }, new
+ * ItemStack[] { null, GregTech_API.getGregTechItem(0, 1, 32), new ItemStack(GregTech_API.sBlockList[2], 1, 3),
+ * GregTech_API.getGregTechItem(0, 1, 33), new ItemStack(GregTech_API.sBlockList[2], 1, 4), null, null, null,
+ * null, null, null, null, null, null }); new GT_Computercube_Description(new String[] { "Bauxite Ore",
+ * "The Stuff out of which you can", "produce Aluminium and also", "Titanium.",
+ * "You find this Ore in Plains and", "Forests.", "", "If you think Aluminium is useless",
+ * "then note, that mobs NEVER spawn", "ontop of an Aluminium Block", "(Same applies also for Silver-,",
+ * "Gem- and Iridium Blocks)", "Production Chain:", "macerating Bauxite Ore", "electrolyzing 24 Bauxite Dust",
+ * "smelting Aluminium Dust in a", "Blast Furnace" }, new ItemStack[] { new
+ * ItemStack(GregTech_API.sBlockList[0], 1, 7), GregTech_API.getGregTechItem(0, 1, 18),
+ * GregTech_API.getGregTechItem(1, 1, 18), GregTech_API.getGregTechItem(1, 1, 17), new
+ * ItemStack(GregTech_API.sBlockList[2], 1, 5), null, null, null, null, null, null, null, null, null }); new
+ * GT_Computercube_Description(new String[] { "Titanium", "Produced by centrifuging Bauxitedust",
+ * "as a byproduct, this Material can make", "anything much more resistant against", "damage, like Explosions.",
+ * "Blocks made of Titaniumingots have a", "large Blastresistance", "", "It can also be used to craft tons of",
+ * "mixed Metal Ingots", "", "", "", "", "", "", "" }, new ItemStack[] { new
+ * ItemStack(GregTech_API.sBlockList[0], 1, 8), GregTech_API.getGregTechItem(0, 1, 19),
+ * GregTech_API.getGregTechItem(1, 1, 19), GregTech_API.getGregTechItem(1, 1, 17), new
+ * ItemStack(GregTech_API.sBlockList[2], 1, 5), null, null, null, null, null, null, null, null, null }); new
+ * GT_Computercube_Description(new String[] { "Iridium Ore", "You can find it only when you",
+ * "stripmine very large Areas with", "Quarries and such. There is only", "one in every 5th-10th Chunk.",
+ * "It's even more rare in Oceans!", "", "Some people disable the UUM-Recipe",
+ * "for Iridium, for making getting it", "an Achievement.", "", "However Iridium Ore contains traces",
+ * "of Platinum, so it's best to use the", "Industrial Grinder for this Ore.", "", "", "" }, new ItemStack[] {
+ * null, null, GT_OreDictUnificator.get("plateAlloyIridium", 1), GT_ModHandler.getIC2Item("iridiumOre", 1), new
+ * ItemStack(GregTech_API.sBlockList[2], 1, 2), null, null, null, null, null, null, null, null, null }); new
+ * GT_Computercube_Description(new String[] { "Helium Coolant Cell", "These are just cheaper, than the",
+ * "Water based Coolant Cells, and can", "also hold six times more Heat.", "",
+ * "Helium Cells can also be used for", "making Luminators and Mininglasers", "", "", "", "", "", "", "", "",
+ * "", "" }, new ItemStack[] { GregTech_API.getGregTechItem(2, 1, 6), GregTech_API.getGregTechItem(2, 1, 3),
+ * GregTech_API.getGregTechItem(34, 1, 0), GregTech_API.getGregTechItem(35, 1, 0),
+ * GregTech_API.getGregTechItem(36, 1, 0), null, null, null, null, null, null, null, null, null }); new
+ * GT_Computercube_Description(new String[] { "Destructopack", "Open its GUI via rightclick and",
+ * "dump all the useless Stuff from", "your Inventory into it, instead of", "littering Items into the World.",
+ * "", "", "", "", "", "", "", "", "", "", "", "" }, new ItemStack[] { null, null, null, null,
+ * GregTech_API.getGregTechItem(33, 1, 0), null, null, null, null, null, null, null, null, null });
+ */
new GT_Computercube_Description(
- new String[] {
- "Data Orbs",
- "They store Data.",
- "",
- "Rightclick on a Computer Cube, to",
- "extract a Reactorplan",
- "",
- "Sneak-Rightclick on it, to insert",
- "a Reactorplan",
- "",
- "Works also with Sonictrons",
- "",
- "",
- "",
- "",
- "",
- "",
- ""
- },
- new ItemStack[] {
- null,
- null,
- null,
- null,
- ItemList.Tool_DataOrb.get(1),
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null
- });
+ new String[] { "Data Orbs", "They store Data.", "", "Rightclick on a Computer Cube, to",
+ "extract a Reactorplan", "", "Sneak-Rightclick on it, to insert", "a Reactorplan", "",
+ "Works also with Sonictrons", "", "", "", "", "", "", "" },
+ new ItemStack[] { null, null, null, null, ItemList.Tool_DataOrb.get(1), null, null, null, null, null,
+ null, null, null, null });
new GT_Computercube_Description(
- new String[] {
- "Energy Orbs",
- "100 Million EU in one Orb!",
- "",
- "This is a Tier-IV-Energystorage",
- "So a MFSU is not enough for it!",
- "",
- "Use it to create a Lapotron Pack,",
- "which is like an ultimate Lap Pack!",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- ""
- },
- new ItemStack[] {
- null,
- null,
- null,
- null,
- ItemList.Energy_LapotronicOrb.get(1),
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null
- });
+ new String[] { "Energy Orbs", "100 Million EU in one Orb!", "", "This is a Tier-IV-Energystorage",
+ "So a MFSU is not enough for it!", "", "Use it to create a Lapotron Pack,",
+ "which is like an ultimate Lap Pack!", "", "", "", "", "", "", "", "", "" },
+ new ItemStack[] { null, null, null, null, ItemList.Energy_LapotronicOrb.get(1), null, null, null, null,
+ null, null, null, null, null });
new GT_Computercube_Description(
- new String[] {
- "Iridium Neutron Reflector",
- "It's used for Fusion Reactor Coils,",
- "and works like a normal one",
- "inside a Reactor, but it's also",
- "INDESTRUCTIBLE*.",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "* = for weardown"
- },
- new ItemStack[] {
- null,
- null,
- null,
- null,
- ItemList.Neutron_Reflector.get(1),
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null
- });
- /*new GT_Computercube_Description(new String[] {
- "Rock Cutter", "You want to get whole Blocks, but", "your Drill is not enchantable?", "The Rock Cutter has an awesome", "SilkTouch-III-Function!", "", "It works like a Drill, but you", "get the whole Block instead of", "'macerated' Ores!", "",
- "Put those Blocks into a Macerator", "and double your Diamond Income!", "", "Or better. Use the Industrial", "Grinder to get even more", "Resources!", "" }, new ItemStack[] {
- null, null, null, null, GregTech_API.getGregTechItem(46, 1, 0), null, null, null, null, null,
- null, null, null, null });
- new GT_Computercube_Description(new String[] {
- "Tesla Staff", "This completly untested PvP-Weapon", "destroys electric Armor in one hit", "", "The Energy Orb inside it must be", "fully charged to let this work.", "", "We are not responsible for any", "Electrocution Damage to yourself,", "while using it.",
- "", "We also dont even know, if this", "Weapon has any effect AT ALL.", "", "", "", "" }, new ItemStack[] {
- null, null, null, null, GregTech_API.getGregTechItem(47, 1, 0), null, null, null, null, null,
- null, null, null, null });*/
+ new String[] { "Iridium Neutron Reflector", "It's used for Fusion Reactor Coils,",
+ "and works like a normal one", "inside a Reactor, but it's also", "INDESTRUCTIBLE*.", "", "",
+ "", "", "", "", "", "", "", "", "", "* = for weardown" },
+ new ItemStack[] { null, null, null, null, ItemList.Neutron_Reflector.get(1), null, null, null, null,
+ null, null, null, null, null });
+ /*
+ * new GT_Computercube_Description(new String[] { "Rock Cutter", "You want to get whole Blocks, but",
+ * "your Drill is not enchantable?", "The Rock Cutter has an awesome", "SilkTouch-III-Function!", "",
+ * "It works like a Drill, but you", "get the whole Block instead of", "'macerated' Ores!", "",
+ * "Put those Blocks into a Macerator", "and double your Diamond Income!", "", "Or better. Use the Industrial",
+ * "Grinder to get even more", "Resources!", "" }, new ItemStack[] { null, null, null, null,
+ * GregTech_API.getGregTechItem(46, 1, 0), null, null, null, null, null, null, null, null, null }); new
+ * GT_Computercube_Description(new String[] { "Tesla Staff", "This completly untested PvP-Weapon",
+ * "destroys electric Armor in one hit", "", "The Energy Orb inside it must be",
+ * "fully charged to let this work.", "", "We are not responsible for any", "Electrocution Damage to yourself,",
+ * "while using it.", "", "We also dont even know, if this", "Weapon has any effect AT ALL.", "", "", "", "" },
+ * new ItemStack[] { null, null, null, null, GregTech_API.getGregTechItem(47, 1, 0), null, null, null, null,
+ * null, null, null, null, null });
+ */
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_Computercube_Simulator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_Computercube_Simulator.java
index fc57930dda..31f378066f 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_Computercube_Simulator.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_Computercube_Simulator.java
@@ -1,5 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.computer;
+import java.util.ArrayList;
+import java.util.HashMap;
+
import Ic2ExpReactorPlanner.AutomationSimulator;
import Ic2ExpReactorPlanner.Reactor;
import Ic2ExpReactorPlanner.SimulationData;
@@ -9,13 +12,10 @@ import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.api.objects.data.Pair;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.gregtech.common.tileentities.misc.GT_TileEntity_ComputerCube;
-import java.util.ArrayList;
-import java.util.HashMap;
public class GT_Computercube_Simulator {
- private static final HashMap<Integer, Pair<Integer, Integer>> sSlotPositions =
- new HashMap<Integer, Pair<Integer, Integer>>();
+ private static final HashMap<Integer, Pair<Integer, Integer>> sSlotPositions = new HashMap<Integer, Pair<Integer, Integer>>();
static {
int aSlot = 4;
@@ -48,14 +48,13 @@ public class GT_Computercube_Simulator {
public void slotClick(int aSlot, GT_ItemStack aStack) {
- /*if (selection != null) {
- componentToPlace = ComponentFactory.createComponent(selection.getActionCommand());
- if (componentToPlace != null) {
- componentToPlace.setInitialHeat(((Number)componentHeatSpinner.getValue()).intValue());
- componentToPlace.setAutomationThreshold(((Number)placingThresholdSpinner.getValue()).intValue());
- componentToPlace.setReactorPause(((Number)placingReactorPauseSpinner.getValue()).intValue());
- }
- }*/
+ /*
+ * if (selection != null) { componentToPlace = ComponentFactory.createComponent(selection.getActionCommand());
+ * if (componentToPlace != null) {
+ * componentToPlace.setInitialHeat(((Number)componentHeatSpinner.getValue()).intValue());
+ * componentToPlace.setAutomationThreshold(((Number)placingThresholdSpinner.getValue()).intValue());
+ * componentToPlace.setReactorPause(((Number)placingReactorPauseSpinner.getValue()).intValue()); } }
+ */
if (aSlot >= 4 && aSlot < 58) {
Pair<Integer, Integer> aSpot = sSlotPositions.get(aSlot);
ReactorItem aItem;
@@ -63,10 +62,14 @@ public class GT_Computercube_Simulator {
aItem = null;
} else {
- Logger.INFO("Using lookup key: " + ItemUtils.getModId(aStack.toStack()) + "."
- + aStack.mItem.getUnlocalizedName() + "." + aStack.mMetaData);
- aItem = ReactorItem.sComponentMap.get(ItemUtils.getModId(aStack.toStack()) + "."
- + aStack.mItem.getUnlocalizedName() + "." + aStack.mMetaData);
+ Logger.INFO(
+ "Using lookup key: " + ItemUtils.getModId(
+ aStack.toStack()) + "." + aStack.mItem.getUnlocalizedName() + "." + aStack.mMetaData);
+ aItem = ReactorItem.sComponentMap.get(
+ ItemUtils.getModId(aStack.toStack()) + "."
+ + aStack.mItem.getUnlocalizedName()
+ + "."
+ + aStack.mMetaData);
}
int aRow = aSpot.getKey();
int aColumn = aSpot.getValue();
@@ -86,9 +89,9 @@ public class GT_Computercube_Simulator {
}
public void simulate() {
- /*if (Utils.isClient()) {
- return;
- }*/
+ /*
+ * if (Utils.isClient()) { return; }
+ */
if (simulator != null && simulator.isRunning()) {
Logger.INFO("Simulator Running, Stopping.");
simulator.cancel();
@@ -129,22 +132,21 @@ public class GT_Computercube_Simulator {
private void clearGrid() {
reactor.clearGrid();
- /*for (int i = 0; i < reactorButtons.length; i++) {
- for (int j = 0; j < reactorButtons[i].length; j++) {
- reactorButtons[i][j].setIcon(null);
- reactorButtons[i][j].setToolTipText(null);
- reactorButtonPanels[i][j].setBackground(Color.LIGHT_GRAY);
- }
- }*/
+ /*
+ * for (int i = 0; i < reactorButtons.length; i++) { for (int j = 0; j < reactorButtons[i].length; j++) {
+ * reactorButtons[i][j].setIcon(null); reactorButtons[i][j].setToolTipText(null);
+ * reactorButtonPanels[i][j].setBackground(Color.LIGHT_GRAY); } }
+ */
output.clear();
- /*materialsArea.setText(reactor.getMaterials().toString());
- componentListArea.setText(reactor.getComponentList().toString());
- maxHeatLabel.setText(formatI18n("UI.MaxHeatSpecific", reactor.getMaxHeat()));
- heatSpinnerModel.setMaximum(reactor.getMaxHeat() - 1);
- heatSpinnerModel.setValue(Math.min(((Number) heatSpinnerModel.getValue()).intValue(), reactor.getMaxHeat() - 1));
- temperatureEffectsLabel.setText(formatI18n("UI.TemperatureEffectsSpecific", (int)(reactor.getMaxHeat() * 0.4), (int)(reactor.getMaxHeat() * 0.5), (int)(reactor.getMaxHeat() * 0.7), (int)(reactor.getMaxHeat() * 0.85), (int)(reactor.getMaxHeat() * 1.0)));
- lockCode = true;
- codeField.setText(null);
- lockCode = false;*/
+ /*
+ * materialsArea.setText(reactor.getMaterials().toString());
+ * componentListArea.setText(reactor.getComponentList().toString());
+ * maxHeatLabel.setText(formatI18n("UI.MaxHeatSpecific", reactor.getMaxHeat()));
+ * heatSpinnerModel.setMaximum(reactor.getMaxHeat() - 1); heatSpinnerModel.setValue(Math.min(((Number)
+ * heatSpinnerModel.getValue()).intValue(), reactor.getMaxHeat() - 1));
+ * temperatureEffectsLabel.setText(formatI18n("UI.TemperatureEffectsSpecific", (int)(reactor.getMaxHeat() *
+ * 0.4), (int)(reactor.getMaxHeat() * 0.5), (int)(reactor.getMaxHeat() * 0.7), (int)(reactor.getMaxHeat() *
+ * 0.85), (int)(reactor.getMaxHeat() * 1.0))); lockCode = true; codeField.setText(null); lockCode = false;
+ */
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java
index 9e507048ed..9a5cf5f64c 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java
@@ -34,113 +34,69 @@ public class CoverManager {
Cover_Gt_Machine_Casing = new MetaItemCoverCasings();
if (Loader.isModLoaded("Ztones")) {
- String[] aZtoneCoverTextureNames = new String[] {"agon", "iszm", "korp", "jelt", "bitt"};
- MetaCustomCoverItem[] aZtoneCoverItems =
- new MetaCustomCoverItem[] {Cover_Agon, Cover_Iszm, Cover_Korp, Cover_Jelt, Cover_Bitt};
- CustomIcon[][] aArrays = new CustomIcon[][] {
- TEXTURE_ZTONES_AGON, TEXTURE_ZTONES_ISZM, TEXTURE_ZTONES_KORP, TEXTURE_ZTONES_JELT, TEXTURE_ZTONES_BITT
- };
- short[][][] aRGB =
- new short[][][] {ZTONES.RGB_AGON, ZTONES.RGB_ISZM, ZTONES.RGB_KORP, ZTONES.RGB_JELT, ZTONES.RGB_BITT
- };
+ String[] aZtoneCoverTextureNames = new String[] { "agon", "iszm", "korp", "jelt", "bitt" };
+ MetaCustomCoverItem[] aZtoneCoverItems = new MetaCustomCoverItem[] { Cover_Agon, Cover_Iszm, Cover_Korp,
+ Cover_Jelt, Cover_Bitt };
+ CustomIcon[][] aArrays = new CustomIcon[][] { TEXTURE_ZTONES_AGON, TEXTURE_ZTONES_ISZM, TEXTURE_ZTONES_KORP,
+ TEXTURE_ZTONES_JELT, TEXTURE_ZTONES_BITT };
+ short[][][] aRGB = new short[][][] { ZTONES.RGB_AGON, ZTONES.RGB_ISZM, ZTONES.RGB_KORP, ZTONES.RGB_JELT,
+ ZTONES.RGB_BITT };
for (int y = 0; y < aZtoneCoverTextureNames.length; y++) {
- aZtoneCoverItems[y] =
- new MetaCustomCoverItem("Ztones", 16, aZtoneCoverTextureNames[y], aArrays[y], aRGB[y]);
+ aZtoneCoverItems[y] = new MetaCustomCoverItem(
+ "Ztones",
+ 16,
+ aZtoneCoverTextureNames[y],
+ aArrays[y],
+ aRGB[y]);
}
}
}
static final class ZTONES {
- private static final short[][] RGB_AGON = new short[][] {
- VanillaColours.DYE_WHITE.getAsShort(),
- VanillaColours.DYE_YELLOW.getAsShort(),
- VanillaColours.DYE_LIME.getAsShort(),
- VanillaColours.DYE_GREEN.getAsShort(),
- VanillaColours.DYE_CYAN.getAsShort(),
- VanillaColours.DYE_LIGHT_BLUE.getAsShort(),
- VanillaColours.DYE_DARK_BLUE.getAsShort(),
- VanillaColours.DYE_DARK_PURPLE.getAsShort(),
- VanillaColours.DYE_LIGHT_PURPLE.getAsShort(),
- VanillaColours.DYE_PINK.getAsShort(),
- VanillaColours.DYE_RED.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_BROWN.getAsShort(),
- VanillaColours.DYE_BLACK.getAsShort(),
- VanillaColours.DYE_DARK_GRAY.getAsShort(),
- VanillaColours.DYE_LIGHT_GRAY.getAsShort(),
- };
- private static final short[][] RGB_ISZM = new short[][] {
- VanillaColours.DYE_LIGHT_GRAY.getAsShort(),
- VanillaColours.DYE_WHITE.getAsShort(),
- VanillaColours.DYE_DARK_GRAY.getAsShort(),
- VanillaColours.DYE_DARK_BLUE.getAsShort(),
- VanillaColours.DYE_YELLOW.getAsShort(),
- VanillaColours.DYE_DARK_BLUE.getAsShort(),
- VanillaColours.DYE_RED.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_CYAN.getAsShort(),
- VanillaColours.DYE_YELLOW.getAsShort(),
- VanillaColours.DYE_RED.getAsShort(),
- VanillaColours.DYE_CYAN.getAsShort(),
- VanillaColours.DYE_GREEN.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_LIGHT_BLUE.getAsShort(),
- VanillaColours.DYE_DARK_PURPLE.getAsShort(),
- };
- private static final short[][] RGB_KORP = new short[][] {
- new short[] {125, 125, 125},
- VanillaColours.DYE_DARK_GRAY.getAsShort(),
- VanillaColours.DYE_DARK_GRAY.getAsShort(),
- VanillaColours.DYE_DARK_GRAY.getAsShort(),
- VanillaColours.DYE_DARK_GRAY.getAsShort(),
- VanillaColours.DYE_DARK_GRAY.getAsShort(),
- VanillaColours.DYE_DARK_GRAY.getAsShort(),
- VanillaColours.DYE_DARK_GRAY.getAsShort(),
- VanillaColours.DYE_DARK_GRAY.getAsShort(),
- VanillaColours.DYE_DARK_GRAY.getAsShort(),
- VanillaColours.DYE_DARK_GRAY.getAsShort(),
- VanillaColours.DYE_DARK_GRAY.getAsShort(),
- new short[] {22, 156, 156},
- new short[] {22, 156, 156},
- VanillaColours.DYE_DARK_GRAY.getAsShort(),
- VanillaColours.DYE_DARK_GRAY.getAsShort(),
- };
- private static final short[][] RGB_JELT = new short[][] {
- VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(),
- };
- private static final short[][] RGB_BITT = new short[][] {
- VanillaColours.DYE_BLACK.getAsShort(),
- VanillaColours.DYE_WHITE.getAsShort(),
- VanillaColours.DYE_YELLOW.getAsShort(),
- VanillaColours.DYE_LIME.getAsShort(),
- VanillaColours.DYE_GREEN.getAsShort(),
- VanillaColours.DYE_CYAN.getAsShort(),
- VanillaColours.DYE_LIGHT_BLUE.getAsShort(),
- VanillaColours.DYE_LIGHT_BLUE.getAsShort(),
- VanillaColours.DYE_DARK_BLUE.getAsShort(),
- VanillaColours.DYE_DARK_PURPLE.getAsShort(),
- VanillaColours.DYE_LIGHT_PURPLE.getAsShort(),
- VanillaColours.DYE_PINK.getAsShort(),
- VanillaColours.DYE_RED.getAsShort(),
- VanillaColours.DYE_RED.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_BROWN.getAsShort(),
- };
+ private static final short[][] RGB_AGON = new short[][] { VanillaColours.DYE_WHITE.getAsShort(),
+ VanillaColours.DYE_YELLOW.getAsShort(), VanillaColours.DYE_LIME.getAsShort(),
+ VanillaColours.DYE_GREEN.getAsShort(), VanillaColours.DYE_CYAN.getAsShort(),
+ VanillaColours.DYE_LIGHT_BLUE.getAsShort(), VanillaColours.DYE_DARK_BLUE.getAsShort(),
+ VanillaColours.DYE_DARK_PURPLE.getAsShort(), VanillaColours.DYE_LIGHT_PURPLE.getAsShort(),
+ VanillaColours.DYE_PINK.getAsShort(), VanillaColours.DYE_RED.getAsShort(),
+ VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_BROWN.getAsShort(),
+ VanillaColours.DYE_BLACK.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(),
+ VanillaColours.DYE_LIGHT_GRAY.getAsShort(), };
+ private static final short[][] RGB_ISZM = new short[][] { VanillaColours.DYE_LIGHT_GRAY.getAsShort(),
+ VanillaColours.DYE_WHITE.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(),
+ VanillaColours.DYE_DARK_BLUE.getAsShort(), VanillaColours.DYE_YELLOW.getAsShort(),
+ VanillaColours.DYE_DARK_BLUE.getAsShort(), VanillaColours.DYE_RED.getAsShort(),
+ VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_CYAN.getAsShort(),
+ VanillaColours.DYE_YELLOW.getAsShort(), VanillaColours.DYE_RED.getAsShort(),
+ VanillaColours.DYE_CYAN.getAsShort(), VanillaColours.DYE_GREEN.getAsShort(),
+ VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_LIGHT_BLUE.getAsShort(),
+ VanillaColours.DYE_DARK_PURPLE.getAsShort(), };
+ private static final short[][] RGB_KORP = new short[][] { new short[] { 125, 125, 125 },
+ VanillaColours.DYE_DARK_GRAY.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(),
+ VanillaColours.DYE_DARK_GRAY.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(),
+ VanillaColours.DYE_DARK_GRAY.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(),
+ VanillaColours.DYE_DARK_GRAY.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(),
+ VanillaColours.DYE_DARK_GRAY.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(),
+ VanillaColours.DYE_DARK_GRAY.getAsShort(), new short[] { 22, 156, 156 }, new short[] { 22, 156, 156 },
+ VanillaColours.DYE_DARK_GRAY.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(), };
+ private static final short[][] RGB_JELT = new short[][] { VanillaColours.DYE_ORANGE.getAsShort(),
+ VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(),
+ VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(),
+ VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(),
+ VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(),
+ VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(),
+ VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(),
+ VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(),
+ VanillaColours.DYE_ORANGE.getAsShort(), };
+ private static final short[][] RGB_BITT = new short[][] { VanillaColours.DYE_BLACK.getAsShort(),
+ VanillaColours.DYE_WHITE.getAsShort(), VanillaColours.DYE_YELLOW.getAsShort(),
+ VanillaColours.DYE_LIME.getAsShort(), VanillaColours.DYE_GREEN.getAsShort(),
+ VanillaColours.DYE_CYAN.getAsShort(), VanillaColours.DYE_LIGHT_BLUE.getAsShort(),
+ VanillaColours.DYE_LIGHT_BLUE.getAsShort(), VanillaColours.DYE_DARK_BLUE.getAsShort(),
+ VanillaColours.DYE_DARK_PURPLE.getAsShort(), VanillaColours.DYE_LIGHT_PURPLE.getAsShort(),
+ VanillaColours.DYE_PINK.getAsShort(), VanillaColours.DYE_RED.getAsShort(),
+ VanillaColours.DYE_RED.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(),
+ VanillaColours.DYE_BROWN.getAsShort(), };
}
}
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 4e2f758d61..fc7c2e83d8 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
@@ -1,10 +1,19 @@
package gtPlusPlus.xmod.gregtech.common.covers;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.fluids.IFluidHandler;
+
import com.gtnewhorizons.modularui.api.drawable.Text;
import com.gtnewhorizons.modularui.api.math.MathExpression;
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
import com.gtnewhorizons.modularui.common.widget.TextWidget;
import com.gtnewhorizons.modularui.common.widget.textfield.BaseTextFieldWidget;
+
import gregtech.api.gui.modularui.GT_CoverUIBuildContext;
import gregtech.api.interfaces.tileentity.ICoverable;
import gregtech.api.util.GT_CoverBehavior;
@@ -13,12 +22,6 @@ import gregtech.api.util.ISerializableObject;
import gregtech.common.gui.modularui.widget.CoverDataControllerWidget;
import gregtech.common.gui.modularui.widget.CoverDataFollower_TextFieldWidget;
import gtPlusPlus.core.util.minecraft.LangUtils;
-import java.util.concurrent.atomic.AtomicBoolean;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.IFluidHandler;
public class GTPP_Cover_Overflow extends GT_CoverBehavior {
@@ -32,8 +35,8 @@ public class GTPP_Cover_Overflow extends GT_CoverBehavior {
this.mMaxTransferRate = aTransferRate * 1000;
}
- public int doCoverThings(
- byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
+ public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity,
+ long aTimer) {
if (aCoverVariable == 0) {
return aCoverVariable;
}
@@ -68,15 +71,8 @@ public class GTPP_Cover_Overflow extends GT_CoverBehavior {
return aCoverVariable;
}
- public int onCoverScrewdriverclick(
- byte aSide,
- int aCoverID,
- int aCoverVariable,
- ICoverable aTileEntity,
- EntityPlayer aPlayer,
- float aX,
- float aY,
- float aZ) {
+ public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity,
+ EntityPlayer aPlayer, float aX, float aY, float aZ) {
if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) {
aCoverVariable += (mMaxTransferRate * (aPlayer.isSneaking() ? 0.1f : 0.01f));
} else {
@@ -89,19 +85,13 @@ public class GTPP_Cover_Overflow extends GT_CoverBehavior {
aCoverVariable = mMaxTransferRate;
}
GT_Utility.sendChatToPlayer(
- aPlayer, LangUtils.trans("322", "Overflow point: ") + aCoverVariable + trans("323", "L"));
+ aPlayer,
+ LangUtils.trans("322", "Overflow point: ") + aCoverVariable + trans("323", "L"));
return aCoverVariable;
}
- public boolean onCoverRightclick(
- byte aSide,
- int aCoverID,
- int aCoverVariable,
- ICoverable aTileEntity,
- EntityPlayer aPlayer,
- float aX,
- float aY,
- float aZ) {
+ public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity,
+ EntityPlayer aPlayer, float aX, float aY, float aZ) {
boolean aShift = aPlayer.isSneaking();
int aAmount = aShift ? 128 : 8;
if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) {
@@ -116,7 +106,8 @@ public class GTPP_Cover_Overflow extends GT_CoverBehavior {
aCoverVariable = mMaxTransferRate;
}
GT_Utility.sendChatToPlayer(
- aPlayer, LangUtils.trans("322", "Overflow point: ") + aCoverVariable + trans("323", "L"));
+ aPlayer,
+ LangUtils.trans("322", "Overflow point: ") + aCoverVariable + trans("323", "L"));
aTileEntity.setCoverDataAtSide(aSide, aCoverVariable);
return true;
}
@@ -194,40 +185,42 @@ public class GTPP_Cover_Overflow extends GT_CoverBehavior {
protected void addUIWidgets(ModularWindow.Builder builder) {
AtomicBoolean warn = new AtomicBoolean(false);
- builder.widget(new CoverDataControllerWidget<>(
- this::getCoverData, this::setCoverData, GTPP_Cover_Overflow.this)
+ builder.widget(
+ new CoverDataControllerWidget<>(this::getCoverData, this::setCoverData, GTPP_Cover_Overflow.this)
.addFollower(
new CoverDataFollower_TextFieldWidget<>(),
coverData -> String.valueOf(convert(coverData)),
(coverData, state) -> new ISerializableObject.LegacyCoverData(
(int) MathExpression.parseMathExpression(state)),
- widget -> widget.setOnScrollNumbersLong(1, 5, 50)
- .setNumbersLong(val -> {
- warn.set(false);
- if (val > mMaxTransferRate) {
- val = (long) mMaxTransferRate;
- warn.set(true);
- } else if (val < 0) {
- val = 0L;
- }
- return val;
- })
- .setPattern(BaseTextFieldWidget.NATURAL_NUMS)
- .setFocusOnGuiOpen(true)
+ widget -> widget.setOnScrollNumbersLong(1, 5, 50).setNumbersLong(val -> {
+ warn.set(false);
+ if (val > mMaxTransferRate) {
+ val = (long) mMaxTransferRate;
+ warn.set(true);
+ } else if (val < 0) {
+ val = 0L;
+ }
+ return val;
+ }).setPattern(BaseTextFieldWidget.NATURAL_NUMS).setFocusOnGuiOpen(true)
.setPos(startX + spaceX * 0, startY + spaceY * 0 + 8)
.setSize(spaceX * 4 - 3, 12)))
- .widget(new TextWidget(GT_Utility.trans("323", "L"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 4, 4 + startY + spaceY * 0 + 8))
- .widget(TextWidget.dynamicText(() -> new Text((warn.get()
- ? GT_Utility.trans("325", "Max")
- : GT_Utility.trans("324", "Now"))
- + ": " + convert(getCoverData())
- + "/" + mMaxTransferRate + " "
- + GT_Utility.trans("323", "L"))
- .color(warn.get() ? COLOR_TEXT_WARN.get() : COLOR_TEXT_GRAY.get()))
- .setSynced(false)
- .setPos(startX + spaceX * 0, 4 + startY + spaceY * 1 + 6));
+ .widget(
+ new TextWidget(GT_Utility.trans("323", "L")).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(startX + spaceX * 4, 4 + startY + spaceY * 0 + 8))
+ .widget(
+ TextWidget
+ .dynamicText(
+ () -> new Text(
+ (warn.get() ? GT_Utility.trans("325", "Max")
+ : GT_Utility.trans("324", "Now")) + ": "
+ + convert(getCoverData())
+ + "/"
+ + mMaxTransferRate
+ + " "
+ + GT_Utility.trans("323", "L")).color(
+ warn.get() ? COLOR_TEXT_WARN.get()
+ : COLOR_TEXT_GRAY.get()))
+ .setSynced(false).setPos(startX + spaceX * 0, 4 + startY + spaceY * 1 + 6));
}
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow_Item.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow_Item.java
index 46a6e9d600..27cd5be67e 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow_Item.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow_Item.java
@@ -1,5 +1,12 @@
package gtPlusPlus.xmod.gregtech.common.covers;
+import java.lang.reflect.Field;
+import java.util.HashMap;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.Fluid;
+
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.ICoverable;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -8,11 +15,6 @@ import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.LangUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
-import java.lang.reflect.Field;
-import java.util.HashMap;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.Fluid;
public class GTPP_Cover_Overflow_Item extends GT_CoverBehavior {
@@ -27,11 +29,11 @@ public class GTPP_Cover_Overflow_Item extends GT_CoverBehavior {
static {
sQuantumChest = ReflectionUtils.getClass("gregtech.common.tileentities.storage.GT_MetaTileEntity_QuantumChest");
- sSuperChestGTPP = ReflectionUtils.getClass(
- "gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredChest");
+ sSuperChestGTPP = ReflectionUtils
+ .getClass("gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredChest");
if (CORE.GTNH) {
- sSuperChestGTNH =
- ReflectionUtils.getClass("gregtech.common.tileentities.storage.GT_MetaTileEntity_SuperChest");
+ sSuperChestGTNH = ReflectionUtils
+ .getClass("gregtech.common.tileentities.storage.GT_MetaTileEntity_SuperChest");
} else {
sSuperChestGTNH = null;
}
@@ -54,15 +56,15 @@ public class GTPP_Cover_Overflow_Item extends GT_CoverBehavior {
this.mMaxItemCapacity = aCapacity * 1000;
}
- public int doCoverThings(
- byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
+ public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity,
+ long aTimer) {
if (aCoverVariable == 0) {
return aCoverVariable;
}
// Get the IGTTile
- IGregTechTileEntity aGtTileEntity = aTileEntity.getIGregTechTileEntity(
- aTileEntity.getXCoord(), aTileEntity.getYCoord(), aTileEntity.getZCoord());
+ IGregTechTileEntity aGtTileEntity = aTileEntity
+ .getIGregTechTileEntity(aTileEntity.getXCoord(), aTileEntity.getYCoord(), aTileEntity.getZCoord());
if (aGtTileEntity == null) {
return aCoverVariable;
}
@@ -101,15 +103,8 @@ public class GTPP_Cover_Overflow_Item extends GT_CoverBehavior {
return true;
}
- public int onCoverScrewdriverclick(
- byte aSide,
- int aCoverID,
- int aCoverVariable,
- ICoverable aTileEntity,
- EntityPlayer aPlayer,
- float aX,
- float aY,
- float aZ) {
+ public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity,
+ EntityPlayer aPlayer, float aX, float aY, float aZ) {
if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) {
aCoverVariable += (mMaxItemCapacity * (aPlayer.isSneaking() ? 0.1f : 0.01f));
} else {
@@ -122,19 +117,13 @@ public class GTPP_Cover_Overflow_Item extends GT_CoverBehavior {
aCoverVariable = mMaxItemCapacity;
}
GT_Utility.sendChatToPlayer(
- aPlayer, LangUtils.trans("322", "Overflow point: ") + aCoverVariable + trans("323", "L"));
+ aPlayer,
+ LangUtils.trans("322", "Overflow point: ") + aCoverVariable + trans("323", "L"));
return aCoverVariable;
}
- public boolean onCoverRightclick(
- byte aSide,
- int aCoverID,
- int aCoverVariable,
- ICoverable aTileEntity,
- EntityPlayer aPlayer,
- float aX,
- float aY,
- float aZ) {
+ public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity,
+ EntityPlayer aPlayer, float aX, float aY, float aZ) {
boolean aShift = aPlayer.isSneaking();
int aAmount = aShift ? 128 : 8;
if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) {
@@ -149,7 +138,8 @@ public class GTPP_Cover_Overflow_Item extends GT_CoverBehavior {
aCoverVariable = mMaxItemCapacity;
}
GT_Utility.sendChatToPlayer(
- aPlayer, LangUtils.trans("322", "Overflow point: ") + aCoverVariable + trans("323", "L"));
+ aPlayer,
+ LangUtils.trans("322", "Overflow point: ") + aCoverVariable + trans("323", "L"));
aTileEntity.setCoverDataAtSide(aSide, aCoverVariable);
return true;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java
index b8b130e987..eccbf78c8a 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java
@@ -1,5 +1,14 @@
package gtPlusPlus.xmod.gregtech.common.covers;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.Fluid;
+
import gregtech.api.interfaces.tileentity.ICoverable;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.util.GT_CoverBehavior;
@@ -8,13 +17,6 @@ import gtPlusPlus.api.objects.minecraft.BlockPos;
import gtPlusPlus.api.objects.random.XSTR;
import gtPlusPlus.core.util.minecraft.LangUtils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.Fluid;
public class GTPP_Cover_ToggleVisual extends GT_CoverBehavior {
@@ -30,35 +32,20 @@ public class GTPP_Cover_ToggleVisual extends GT_CoverBehavior {
ForgeDirection aDir = ForgeDirection.getOrientation(aSide);
String s = aEntity.getInventoryName() + "." + aPos.getUniqueIdentifier() + aDir.name();
return s;
- } catch (Throwable t) {
- }
+ } catch (Throwable t) {}
XSTR x = new XSTR();
return "ERROR." + x.getSeed() + x.hashCode() + x.nextDouble() + ".ID";
}
- public boolean onCoverRightclick(
- byte aSide,
- int aCoverID,
- int aCoverVariable,
- ICoverable aTileEntity,
- EntityPlayer aPlayer,
- float aX,
- float aY,
- float aZ) {
- PlayerUtils.messagePlayer(
- aPlayer, LangUtils.trans("756", "Connectable: ") + getConnectionState(aCoverVariable));
+ public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity,
+ EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ PlayerUtils
+ .messagePlayer(aPlayer, LangUtils.trans("756", "Connectable: ") + getConnectionState(aCoverVariable));
return super.onCoverRightclick(aSide, aCoverID, aCoverVariable, aTileEntity, aPlayer, aX, aY, aZ);
}
- public int onCoverScrewdriverclick(
- byte aSide,
- int aCoverID,
- int aCoverVariable,
- ICoverable aTileEntity,
- EntityPlayer aPlayer,
- float aX,
- float aY,
- float aZ) {
+ public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity,
+ EntityPlayer aPlayer, float aX, float aY, float aZ) {
return super.onCoverScrewdriverclick(aSide, aCoverID, aCoverVariable, aTileEntity, aPlayer, aX, aY, aZ);
}
@@ -95,8 +82,8 @@ public class GTPP_Cover_ToggleVisual extends GT_CoverBehavior {
}
@Override
- public int doCoverThings(
- byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
+ public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity,
+ long aTimer) {
try {
String aKey = generateUniqueKey(aSide, aTileEntity);
Integer b = sConnectionStateForEntityMap.get(aKey);
@@ -131,8 +118,8 @@ public class GTPP_Cover_ToggleVisual extends GT_CoverBehavior {
}
@Override
- public byte getRedstoneInput(
- byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
+ public byte getRedstoneInput(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable,
+ ICoverable aTileEntity) {
if (!getConnectionState(aCoverVariable)) {
return 0;
}
@@ -153,8 +140,8 @@ public class GTPP_Cover_ToggleVisual extends GT_CoverBehavior {
}
@Override
- public boolean onCoverRemoval(
- byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) {
+ public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity,
+ boolean aForced) {
String aKey = generateUniqueKey(aSide, aTileEntity);
sConnectionStateForEntityMap.remove(aKey);
// Logger.INFO("Unmapping key "+aKey+".");
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java
index a55cae39ea..ac30942a5f 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java
@@ -2,6 +2,15 @@ package gtPlusPlus.xmod.gregtech.common.helpers;
import static gregtech.api.GregTech_API.mEUtoRF;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
+
import cofh.api.energy.IEnergyContainerItem;
import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
@@ -21,20 +30,11 @@ import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaWirelessCharger;
import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
public class ChargingHelper {
- private static Map<String, Pair<GregtechMetaWirelessCharger, Byte>> mValidPlayers =
- new HashMap<String, Pair<GregtechMetaWirelessCharger, Byte>>();
- protected static Map<BlockPos, GregtechMetaWirelessCharger> mChargerMap =
- new HashMap<BlockPos, GregtechMetaWirelessCharger>();
+ private static Map<String, Pair<GregtechMetaWirelessCharger, Byte>> mValidPlayers = new HashMap<String, Pair<GregtechMetaWirelessCharger, Byte>>();
+ protected static Map<BlockPos, GregtechMetaWirelessCharger> mChargerMap = new HashMap<BlockPos, GregtechMetaWirelessCharger>();
private int mTickTimer = 0;
private final int mTickMultiplier = 20;
@@ -66,9 +66,8 @@ public class ChargingHelper {
for (GregtechMetaWirelessCharger mEntityTemp : mChargerMap.values()) {
if (mEntityTemp != null) {
if (mEntityTemp.getBaseMetaTileEntity() == null
- || !mEntityTemp
- .getBaseMetaTileEntity()
- .isAllowedToWork()) continue;
+ || !mEntityTemp.getBaseMetaTileEntity().isAllowedToWork())
+ continue;
if (mPlayerMan.getEntityWorld().provider.dimensionId
== mEntityTemp.getDimensionID()) {
mVoltage = mEntityTemp.maxEUInput();
@@ -85,32 +84,48 @@ public class ChargingHelper {
if (!LR.isEmpty()
&& LR.containsKey(mPlayerMan.getDisplayName())) {
mCurrentEu = chargeItems(
- mEntityTemp, mArmourContents, mPlayerMan);
+ mEntityTemp,
+ mArmourContents,
+ mPlayerMan);
mCurrentEu = chargeItems(
- mEntityTemp, mInventoryContents, mPlayerMan);
+ mEntityTemp,
+ mInventoryContents,
+ mPlayerMan);
}
} else if (mEntityTemp.getMode() == 1) {
if (!LO.isEmpty()
&& LO.containsKey(mPlayerMan.getDisplayName())) {
mCurrentEu = chargeItems(
- mEntityTemp, mArmourContents, mPlayerMan);
+ mEntityTemp,
+ mArmourContents,
+ mPlayerMan);
mCurrentEu = chargeItems(
- mEntityTemp, mInventoryContents, mPlayerMan);
+ mEntityTemp,
+ mInventoryContents,
+ mPlayerMan);
}
} else {
if (!LR.isEmpty()
&& LR.containsKey(mPlayerMan.getDisplayName())) {
mCurrentEu = chargeItems(
- mEntityTemp, mArmourContents, mPlayerMan);
+ mEntityTemp,
+ mArmourContents,
+ mPlayerMan);
mCurrentEu = chargeItems(
- mEntityTemp, mInventoryContents, mPlayerMan);
+ mEntityTemp,
+ mInventoryContents,
+ mPlayerMan);
}
if (!LO.isEmpty()
&& LO.containsKey(mPlayerMan.getDisplayName())) {
mCurrentEu = chargeItems(
- mEntityTemp, mArmourContents, mPlayerMan);
+ mEntityTemp,
+ mArmourContents,
+ mPlayerMan);
mCurrentEu = chargeItems(
- mEntityTemp, mInventoryContents, mPlayerMan);
+ mEntityTemp,
+ mInventoryContents,
+ mPlayerMan);
}
}
@@ -125,13 +140,14 @@ public class ChargingHelper {
mMaxDistance = (4 * GT_Values.V[mEntityTemp.getTier()] / 2);
}
double mDistance = calculateDistance(mEntityTemp, mPlayerMan);
- long mVoltageCost = MathUtils.findPercentageOfInt(
- mMaxDistance, (float) mDistance);
+ long mVoltageCost = MathUtils
+ .findPercentageOfInt(mMaxDistance, (float) mDistance);
if (mVoltageCost > 0) {
if (mVoltageCost > mEntityTemp.maxEUInput()) {
- mEntityTemp.setEUVar((mEntityTemp.getEUVar()
- - mEntityTemp.maxEUInput()));
+ mEntityTemp.setEUVar(
+ (mEntityTemp.getEUVar()
+ - mEntityTemp.maxEUInput()));
} else {
mEntityTemp.setEUVar(
(mEntityTemp.getEUVar() - mVoltageCost));
@@ -202,8 +218,9 @@ public class ChargingHelper {
return false;
} else {
Logger.WARNING("key not found, adding");
- Pair<GregtechMetaWirelessCharger, Byte> mEntry =
- new Pair<GregtechMetaWirelessCharger, Byte>(mEntity, (byte) mEntity.getMode());
+ Pair<GregtechMetaWirelessCharger, Byte> mEntry = new Pair<GregtechMetaWirelessCharger, Byte>(
+ mEntity,
+ (byte) mEntity.getMode());
if (mValidPlayers.put(mPlayer.getDisplayName(), mEntry) == null) {
Logger.WARNING("Added a Player to the Tick Map.");
return true;
@@ -221,8 +238,9 @@ public class ChargingHelper {
Logger.WARNING("trying to remove player from map");
if (mValidPlayers.containsKey(mPlayer.getDisplayName())) {
Logger.WARNING("key found, removing");
- Pair<GregtechMetaWirelessCharger, Byte> mEntry =
- new Pair<GregtechMetaWirelessCharger, Byte>(mEntity, (byte) mEntity.getMode());
+ Pair<GregtechMetaWirelessCharger, Byte> mEntry = new Pair<GregtechMetaWirelessCharger, Byte>(
+ mEntity,
+ (byte) mEntity.getMode());
if (mValidPlayers.remove(mPlayer, mEntry)) {
Logger.WARNING("Removed a Player to the Tick Map.");
return true;
@@ -241,7 +259,8 @@ public class ChargingHelper {
return 0;
}
return mEntityTemp.getDistanceBetweenTwoPositions(
- mEntityTemp.getTileEntityPosition(), mEntityTemp.getPositionOfEntity(mPlayerMan));
+ mEntityTemp.getTileEntityPosition(),
+ mEntityTemp.getPositionOfEntity(mPlayerMan));
}
public long chargeItems(GregtechMetaWirelessCharger mEntity, ItemStack[] mItems, EntityPlayer mPlayer) {
@@ -305,10 +324,7 @@ public class ChargingHelper {
|| mTemp.getItem() instanceof GT_MetaGenerated_Item_02
|| ReflectionUtils.getClass("gregtech.common.items.GT_MetaGenerated_Item_03")
.isInstance(mTemp.getItem())
- || mTemp.getItem()
- .getClass()
- .getName()
- .toLowerCase()
+ || mTemp.getItem().getClass().getName().toLowerCase()
.equals(("gregtech.common.items.GT_MetaGenerated_Tool_01").toLowerCase())) {
if (!NBTUtils.hasKey(mTemp, "GT.ItemCharge")) {
if (!mTemp.getDisplayName().toLowerCase().contains("battery")) {
@@ -341,13 +357,14 @@ public class ChargingHelper {
mMulti = 20;
} else if ((mitemCurrentCharge + (mVoltageIncrease * 10))
<= (mItemMaxCharge - (mVoltageIncrease * 10))) {
- mMulti = 10;
- } else if ((mitemCurrentCharge + (mVoltageIncrease * 5))
- <= (mItemMaxCharge - (mVoltageIncrease * 5))) {
- mMulti = 5;
- } else {
- mMulti = 1;
- }
+ mMulti = 10;
+ } else
+ if ((mitemCurrentCharge + (mVoltageIncrease * 5))
+ <= (mItemMaxCharge - (mVoltageIncrease * 5))) {
+ mMulti = 5;
+ } else {
+ mMulti = 1;
+ }
Logger.WARNING("5");
int mMultiVoltage = (int) (mMulti * mVoltageIncrease);
@@ -359,9 +376,8 @@ public class ChargingHelper {
> 0) {
Logger.WARNING("6.5 - " + g + " - " + mMulti);
for (int i = 0; i < mMulti; i++) {
- if (ElectricItem.manager.charge(
- mTemp, mVoltageIncrease, Integer.MAX_VALUE, false, false)
- > 0) {
+ if (ElectricItem.manager
+ .charge(mTemp, mVoltageIncrease, Integer.MAX_VALUE, false, false) > 0) {
continue;
}
}
@@ -370,11 +386,22 @@ public class ChargingHelper {
Logger.WARNING("7");
mEntity.setEUVar(mEuStored - (mVoltage * mMulti));
mEuStored = mEntity.getEUVar();
- Logger.WARNING("Charged " + mTemp.getDisplayName() + " | Slot: " + mItemSlot
- + " | EU Multiplier: " + mMulti + " | EU/t input: " + mVoltageIncrease
- + " | EU/t consumed by Tile: " + mVoltage + " | Item Max Charge: " + mItemMaxCharge
- + " | Item Start Charge: " + mitemCurrentCharge + " | Item New Charge"
- + ElectricItem.manager.getCharge(mTemp));
+ Logger.WARNING(
+ "Charged " + mTemp.getDisplayName()
+ + " | Slot: "
+ + mItemSlot
+ + " | EU Multiplier: "
+ + mMulti
+ + " | EU/t input: "
+ + mVoltageIncrease
+ + " | EU/t consumed by Tile: "
+ + mVoltage
+ + " | Item Max Charge: "
+ + mItemMaxCharge
+ + " | Item Start Charge: "
+ + mitemCurrentCharge
+ + " | Item New Charge"
+ + ElectricItem.manager.getCharge(mTemp));
mChargedItems++;
}
}
@@ -391,11 +418,22 @@ public class ChargingHelper {
Logger.WARNING("9");
mEntity.setEUVar(mEntity.getEUVar() - (xDif));
mEuStored = mEntity.getEUVar();
- Logger.WARNING("Charged " + mTemp.getDisplayName() + " | Slot: " + mItemSlot
- + " | EU Multiplier: " + mMulti + " | EU/t input: " + mVoltageIncrease
- + " | EU/t consumed by Tile: " + mVoltage + " | Item Max Charge: "
- + mItemMaxCharge + " | Item Start Charge: " + mitemCurrentCharge
- + " | Item New Charge" + ElectricItem.manager.getCharge(mTemp));
+ Logger.WARNING(
+ "Charged " + mTemp.getDisplayName()
+ + " | Slot: "
+ + mItemSlot
+ + " | EU Multiplier: "
+ + mMulti
+ + " | EU/t input: "
+ + mVoltageIncrease
+ + " | EU/t consumed by Tile: "
+ + mVoltage
+ + " | Item Max Charge: "
+ + mItemMaxCharge
+ + " | Item Start Charge: "
+ + mitemCurrentCharge
+ + " | Item New Charge"
+ + ElectricItem.manager.getCharge(mTemp));
mChargedItems++;
}
}
@@ -408,7 +446,9 @@ public class ChargingHelper {
rfItem.getMaxEnergyStored(mTemp) - rfItem.getEnergyStored(mTemp),
mEntity.getEUVar() * mEUtoRF / 100L);
chargedPower = rfItem.receiveEnergy(
- mTemp, chargedPower > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) chargedPower, false);
+ mTemp,
+ chargedPower > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) chargedPower,
+ false);
chargedPower = chargedPower * 100L / mEUtoRF;
mEntity.setEUVar(Math.max(mEntity.getEUVar() - chargedPower, 0));
mChargedItems++;
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/CraftingHelper.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/CraftingHelper.java
index bb81c349a0..0d85d6299f 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/CraftingHelper.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/CraftingHelper.java
@@ -1,12 +1,13 @@
package gtPlusPlus.xmod.gregtech.common.helpers;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.world.World;
+
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.common.helpers.autocrafter.AC_Helper_Container;
import gtPlusPlus.xmod.gregtech.common.helpers.autocrafter.AC_Helper_Utils;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_AutoCrafter;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.world.World;
public class CraftingHelper {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/FlotationRecipeHandler.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/FlotationRecipeHandler.java
index bb8dac49d7..58a4aba71c 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/FlotationRecipeHandler.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/FlotationRecipeHandler.java
@@ -1,13 +1,15 @@
package gtPlusPlus.xmod.gregtech.common.helpers;
+import java.util.HashMap;
+
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.oredict.OreDictionary;
+
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.util.sys.Log;
import gtPlusPlus.xmod.gregtech.api.enums.CustomOrePrefix;
-import java.util.HashMap;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.oredict.OreDictionary;
public class FlotationRecipeHandler {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/GT_MethodHelper.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/GT_MethodHelper.java
index 0b60e057f4..0c0baf4723 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/GT_MethodHelper.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/GT_MethodHelper.java
@@ -1,16 +1,18 @@
package gtPlusPlus.xmod.gregtech.common.helpers;
-import gregtech.api.enums.Textures.BlockIcons;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.metatileentity.BaseMetaTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+
import net.minecraft.block.Block;
import net.minecraft.tileentity.TileEntity;
+import gregtech.api.enums.Textures.BlockIcons;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.metatileentity.BaseMetaTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
+import gtPlusPlus.core.util.reflect.ReflectionUtils;
+
public class GT_MethodHelper {
private static final Method mGetTexture;
@@ -46,28 +48,25 @@ public class GT_MethodHelper {
Field aColor = ReflectionUtils.getField(BaseMetaTileEntity.class, "mColor");
Field aActive = ReflectionUtils.getField(BaseMetaTileEntity.class, "mActive");
Field aMetaTile = ReflectionUtils.getField(BaseMetaTileEntity.class, "mMetaTileEntity");
- Method aHasValidTile = ReflectionUtils.getMethod(
- BaseMetaTileEntity.class, "hasValidMetaTileEntity", new Class[] {});
+ Method aHasValidTile = ReflectionUtils
+ .getMethod(BaseMetaTileEntity.class, "hasValidMetaTileEntity", new Class[] {});
boolean hasValidTileObj = (boolean) aHasValidTile.invoke(aTile, new Object[] {});
boolean aActiveObj = aActive.getBoolean(aTile);
byte aFacingObj = aFacing.getByte(aTile);
- byte aColorObj = aColor.getByte(aTile);
- ;
+ byte aColorObj = aColor.getByte(aTile);;
MetaTileEntity aMetaTileObj = (MetaTileEntity) aMetaTile.get(aTile);
if (rIcon != null) {
- return new ITexture[] {rIcon};
+ return new ITexture[] { rIcon };
} else {
- return hasValidTileObj
- ? aMetaTileObj.getTexture(
- aTile,
- aSide,
- aFacingObj,
- (byte) (aColorObj - 1),
- aActiveObj,
- aTile.getOutputRedstoneSignal(aSide) > 0)
- : BlockIcons.ERROR_RENDERING;
+ return hasValidTileObj ? aMetaTileObj.getTexture(
+ aTile,
+ aSide,
+ aFacingObj,
+ (byte) (aColorObj - 1),
+ aActiveObj,
+ aTile.getOutputRedstoneSignal(aSide) > 0) : BlockIcons.ERROR_RENDERING;
}
} catch (Throwable t) {
t.printStackTrace();
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/MachineUpdateHandler.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/MachineUpdateHandler.java
index 8263243474..2710f5dc78 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/MachineUpdateHandler.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/MachineUpdateHandler.java
@@ -1,11 +1,13 @@
package gtPlusPlus.xmod.gregtech.common.helpers;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import gregtech.api.GregTech_API;
import java.util.HashMap;
+
import net.minecraft.block.Block;
import net.minecraftforge.event.world.BlockEvent;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import gregtech.api.GregTech_API;
+
public class MachineUpdateHandler {
private static final HashMap<String, Block> mBlockCache = new HashMap<String, Block>();
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java
index d054e5da3b..7ce06c7974 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java
@@ -2,7 +2,37 @@ package gtPlusPlus.xmod.gregtech.common.helpers;
import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableTreeFarmerParticles;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Queue;
+import java.util.Set;
+import java.util.Stack;
+import java.util.concurrent.ConcurrentHashMap;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockAir;
+import net.minecraft.block.IGrowable;
+import net.minecraft.block.material.Material;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.network.play.server.S23PacketBlockChange;
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.world.ChunkPosition;
+import net.minecraft.world.World;
+import net.minecraftforge.common.ForgeHooks;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.entity.player.BonemealEvent;
+import net.minecraftforge.event.world.BlockEvent;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.oredict.OreDictionary;
+
import com.google.common.collect.Lists;
+
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.common.eventhandler.Event.Result;
@@ -30,33 +60,6 @@ import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.particles.BlockBreakParticles;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechItems;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Queue;
-import java.util.Set;
-import java.util.Stack;
-import java.util.concurrent.ConcurrentHashMap;
-import net.minecraft.block.Block;
-import net.minecraft.block.BlockAir;
-import net.minecraft.block.IGrowable;
-import net.minecraft.block.material.Material;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.network.play.server.S23PacketBlockChange;
-import net.minecraft.server.MinecraftServer;
-import net.minecraft.world.ChunkPosition;
-import net.minecraft.world.World;
-import net.minecraftforge.common.ForgeHooks;
-import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.event.entity.player.BonemealEvent;
-import net.minecraftforge.event.world.BlockEvent;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.oredict.OreDictionary;
public class TreeFarmHelper {
@@ -83,23 +86,23 @@ public class TreeFarmHelper {
}
public static ITexture[] getFront(final byte aColor) {
- return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1]};
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1] };
}
public static ITexture[] getBack(final byte aColor) {
- return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1]};
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1] };
}
public static ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1]};
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1] };
}
public static ITexture[] getTop(final byte aColor) {
- return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1]};
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1] };
}
public static ITexture[] getSides(final byte aColor) {
- return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1]};
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1] };
}
public static ITexture[] getFrontActive(final byte aColor) {
@@ -122,13 +125,8 @@ public class TreeFarmHelper {
return getSides(aColor);
}
- public static boolean applyBonemeal(
- final EntityPlayer player,
- final World world,
- final int intX,
- final int intY,
- final int intZ,
- final short multiplier) {
+ public static boolean applyBonemeal(final EntityPlayer player, final World world, final int intX, final int intY,
+ final int intZ, final short multiplier) {
final Block block = world.getBlock(intX, intY, intZ);
int roll;
@@ -183,14 +181,10 @@ public class TreeFarmHelper {
public static boolean cleanUp(final IGregTechTileEntity aBaseMetaTileEntity) {
Logger.MACHINE_INFO("called cleanUp()");
int cleanedUp = 0;
- final int xDir =
- net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing())
- .offsetX
- * 11;
- final int zDir =
- net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing())
- .offsetZ
- * 11;
+ final int xDir = net.minecraftforge.common.util.ForgeDirection
+ .getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 11;
+ final int zDir = net.minecraftforge.common.util.ForgeDirection
+ .getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 11;
for (int h = 1; h < 175; h++) {
for (int i = -11; i <= 11; i++) {
@@ -198,12 +192,10 @@ public class TreeFarmHelper {
final Block testBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j);
- if ((((i == -8) || (i == 8))
- || ((i == -9) || (i == 9))
- || ((i == -10) || (i == 10))
- || ((i == -11) || (i == 11)))
- && (((j == -8) || (j == 8))
- || ((j == -9) || (j == 9))
+ if ((((i == -8) || (i == 8)) || ((i == -9) || (i == 9))
+ || ((i == -10) || (i == 10))
+ || ((i == -11) || (i == 11)))
+ && (((j == -8) || (j == 8)) || ((j == -9) || (j == 9))
|| ((j == -10) || (j == 10))
|| ((j == -11) || (j == 11)))) {
@@ -211,34 +203,54 @@ public class TreeFarmHelper {
|| !testBlock.getUnlocalizedName().toLowerCase().contains("pumpkin")) {
// Logger.WARNING("5:"+testBlock.getUnlocalizedName());
} else {
- aBaseMetaTileEntity
- .getWorld()
- .setBlock(
- aBaseMetaTileEntity.getXCoord() + xDir + i,
- aBaseMetaTileEntity.getYCoord() + h,
- aBaseMetaTileEntity.getZCoord() + zDir + j,
- Blocks.bookshelf);
+ aBaseMetaTileEntity.getWorld().setBlock(
+ aBaseMetaTileEntity.getXCoord() + xDir + i,
+ aBaseMetaTileEntity.getYCoord() + h,
+ aBaseMetaTileEntity.getZCoord() + zDir + j,
+ Blocks.bookshelf);
}
}
// If not in the middle - don't know how else to check this one without lots of !=
- if ((i != 7) && (i != -7) && (j != 7) && (j != -7) && (i != 6) && (i != -6) && (j != 6) && (j != -6)
- && (i != 5) && (i != -5) && (j != 5) && (j != -5) && (i != 4) && (i != -4) && (j != 4)
- && (j != -4) && (i != 3) && (i != -3) && (j != 3) && (j != -3) && (i != 2) && (i != -2)
- && (j != 2) && (j != -2) && (i != 1) && (i != -1) && (j != 1) && (j != -1) && (i != 0)
+ if ((i != 7) && (i != -7)
+ && (j != 7)
+ && (j != -7)
+ && (i != 6)
+ && (i != -6)
+ && (j != 6)
+ && (j != -6)
+ && (i != 5)
+ && (i != -5)
+ && (j != 5)
+ && (j != -5)
+ && (i != 4)
+ && (i != -4)
+ && (j != 4)
+ && (j != -4)
+ && (i != 3)
+ && (i != -3)
+ && (j != 3)
+ && (j != -3)
+ && (i != 2)
+ && (i != -2)
+ && (j != 2)
+ && (j != -2)
+ && (i != 1)
+ && (i != -1)
+ && (j != 1)
+ && (j != -1)
+ && (i != 0)
&& (j != 0)) {
if (!testBlock.getUnlocalizedName().toLowerCase().contains("air")
|| !testBlock.getUnlocalizedName().toLowerCase().contains("pumpkin")) {
// Logger.WARNING("0:"+testBlock.getUnlocalizedName());
} else {
- aBaseMetaTileEntity
- .getWorld()
- .setBlock(
- aBaseMetaTileEntity.getXCoord() + xDir + i,
- aBaseMetaTileEntity.getYCoord() + h,
- aBaseMetaTileEntity.getZCoord() + zDir + j,
- Blocks.melon_block);
+ aBaseMetaTileEntity.getWorld().setBlock(
+ aBaseMetaTileEntity.getXCoord() + xDir + i,
+ aBaseMetaTileEntity.getYCoord() + h,
+ aBaseMetaTileEntity.getZCoord() + zDir + j,
+ Blocks.melon_block);
}
if (isLeaves(testBlock) || isWoodLog(testBlock)) {
@@ -295,8 +307,7 @@ public class TreeFarmHelper {
if (aDmg >= 32120 && aDmg <= 32128) {
return ToolType.Unbreakable;
}
- Logger.INFO(
- "bad Tool in Slot 2 | " + aStack.getUnlocalizedName().toLowerCase() + " | " + aDmg);
+ Logger.INFO("bad Tool in Slot 2 | " + aStack.getUnlocalizedName().toLowerCase() + " | " + aDmg);
return null;
}
@@ -372,9 +383,8 @@ public class TreeFarmHelper {
}
return (OrePrefixes.log.contains(new ItemStack(log, 1)) && ((tTool != null) && (tTool.equals("axe"))))
- || (log.getMaterial() != Material.wood)
- ? false
- : (OrePrefixes.fence.contains(new ItemStack(log, 1)) ? false : true);
+ || (log.getMaterial() != Material.wood) ? false
+ : (OrePrefixes.fence.contains(new ItemStack(log, 1)) ? false : true);
}
public static boolean isLeaves(final Block log) {
@@ -390,8 +400,7 @@ public class TreeFarmHelper {
if (log.getLocalizedName().toLowerCase().contains("leaves")) {
return true;
}
- return OrePrefixes.leaves.contains(new ItemStack(log, 1))
- || log.getMaterial() == Material.leaves
+ return OrePrefixes.leaves.contains(new ItemStack(log, 1)) || log.getMaterial() == Material.leaves
|| OrePrefixes.treeLeaves.contains(new ItemStack(log, 1))
|| log.getMaterial() == Material.vine
|| OrePrefixes.mushroom.contains(new ItemStack(log, 1))
@@ -412,18 +421,14 @@ public class TreeFarmHelper {
}
public static boolean isDirtBlock(final Block dirt) {
- return (dirt == Blocks.dirt
- ? true
+ return (dirt == Blocks.dirt ? true
: (dirt == Blocks.grass ? true : (getHumus() == null ? false : (dirt == blockHumus ? true : false))));
}
public static boolean isFenceBlock(final Block fence) {
- return (fence == Blocks.fence
- ? true
- : (fence == Blocks.fence_gate
- ? true
- : (fence == Blocks.nether_brick_fence
- ? true
+ return (fence == Blocks.fence ? true
+ : (fence == Blocks.fence_gate ? true
+ : (fence == Blocks.nether_brick_fence ? true
: (OrePrefixes.fence.contains(new ItemStack(fence, 1)) ? true : false))));
}
@@ -438,19 +443,16 @@ public class TreeFarmHelper {
return (air == Blocks.air ? true : (air instanceof BlockAir ? true : false));
}
- /*public static boolean isSaplingBlock(Block sapling){
- return (sapling == Blocks.sapling ? true : (sapling == Blocks.))
- }*/
+ /*
+ * public static boolean isSaplingBlock(Block sapling){ return (sapling == Blocks.sapling ? true : (sapling ==
+ * Blocks.)) }
+ */
public static BlockPos checkForLogsInGrowArea(final IGregTechTileEntity aBaseMetaTileEntity) {
- final int xDir =
- net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing())
- .offsetX
- * 7;
- final int zDir =
- net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing())
- .offsetZ
- * 7;
+ final int xDir = net.minecraftforge.common.util.ForgeDirection
+ .getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 7;
+ final int zDir = net.minecraftforge.common.util.ForgeDirection
+ .getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 7;
for (int i = -7; i <= 7; i++) {
for (int j = -7; j <= 7; j++) {
for (int h = 0; h <= 1; h++) {
@@ -731,8 +733,8 @@ public class TreeFarmHelper {
final Block block = mWorld.getBlock(h.xPos, h.yPos, h.zPos);
if (block != null) {
final int dropMeta = mWorld.getBlockMetadata(h.xPos, h.yPos, h.zPos);
- final ArrayList<ItemStack> blockDrops =
- block.getDrops(mWorld, h.xPos, h.yPos, h.zPos, dropMeta, 0);
+ final ArrayList<ItemStack> blockDrops = block
+ .getDrops(mWorld, h.xPos, h.yPos, h.zPos, dropMeta, 0);
final ItemStack[] drops = ItemUtils.getBlockDrops(blockDrops);
mDrops.put(drops);
// Remove drop that was added to the bus.
@@ -804,13 +806,12 @@ public class TreeFarmHelper {
if (wood == null) {
return false;
}
- if (wood.isWood(world, x, y, z) || wood.getMaterial() == Material.sponge)
- if (detectTree(world, x, y, z)) {
- TreeChopTask chopper = new TreeChopTask(new ChunkPosition(x, y, z), checkFakePlayer(world), 128);
- FMLCommonHandler.instance().bus().register(chopper);
- // custom block breaking code, don't call vanilla code
- return true;
- }
+ if (wood.isWood(world, x, y, z) || wood.getMaterial() == Material.sponge) if (detectTree(world, x, y, z)) {
+ TreeChopTask chopper = new TreeChopTask(new ChunkPosition(x, y, z), checkFakePlayer(world), 128);
+ FMLCommonHandler.instance().bus().register(chopper);
+ // custom block breaking code, don't call vanilla code
+ return true;
+ }
// return onBlockStartBreak(stack, x, y, z, player);
return false;
}
@@ -852,8 +853,7 @@ public class TreeFarmHelper {
for (int offX = 0; offX < d; offX++) {
for (int offY = 0; offY < d; offY++) {
for (int offZ = 0; offZ < d; offZ++) {
- int xPos = pos.chunkPosX - 1 + offX,
- yPos = pos.chunkPosY - 1 + offY,
+ int xPos = pos.chunkPosX - 1 + offX, yPos = pos.chunkPosY - 1 + offY,
zPos = pos.chunkPosZ - 1 + offZ;
Block leaf = world.getBlock(xPos, yPos, zPos);
if (leaf != null && leaf.isLeaves(world, xPos, yPos, zPos)) {
@@ -912,7 +912,7 @@ public class TreeFarmHelper {
ChunkPosition pos;
while (left > 0) {
// completely done or can't do our job anymore?!
- if (blocks.isEmpty() /* || tags.getBoolean("Broken")*/) {
+ if (blocks.isEmpty() /* || tags.getBoolean("Broken") */) {
finish();
return;
}
@@ -956,8 +956,8 @@ public class TreeFarmHelper {
}
}
- public static void breakExtraBlock(
- World world, int x, int y, int z, int sidehit, EntityPlayer playerEntity, int refX, int refY, int refZ) {
+ public static void breakExtraBlock(World world, int x, int y, int z, int sidehit, EntityPlayer playerEntity,
+ int refX, int refY, int refZ) {
// prevent calling that stuff for air blocks, could lead to unexpected behaviour since it fires events
if (world.isAirBlock(x, y, z)) return;
@@ -981,8 +981,8 @@ public class TreeFarmHelper {
if (!ForgeHooks.canHarvestBlock(block, player, meta) || refStrength / strength > 10f) return;
// send the blockbreak event
- BlockEvent.BreakEvent event =
- ForgeHooks.onBlockBreakEvent(world, player.theItemInWorldManager.getGameType(), player, x, y, z);
+ BlockEvent.BreakEvent event = ForgeHooks
+ .onBlockBreakEvent(world, player.theItemInWorldManager.getGameType(), player, x, y, z);
if (event.isCanceled()) return;
if (player.capabilities.isCreativeMode) {
@@ -1007,8 +1007,8 @@ public class TreeFarmHelper {
// ItemInWorldManager.removeBlock
block.onBlockHarvested(world, x, y, z, meta, player);
- if (block.removedByPlayer(
- world, player, x, y, z, true)) // boolean is if block can be harvested, checked above
+ if (block.removedByPlayer(world, player, x, y, z, true)) // boolean is if block can be harvested, checked
+ // above
{
block.onBlockDestroyedByPlayer(world, x, y, z, meta);
block.harvestBlock(world, player, x, y, z, meta);
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/VolumetricFlaskHelper.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/VolumetricFlaskHelper.java
index 72d6111b8a..52aeb864dd 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/VolumetricFlaskHelper.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/VolumetricFlaskHelper.java
@@ -1,17 +1,19 @@
package gtPlusPlus.xmod.gregtech.common.helpers;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
-import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
-import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
+
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.fluids.FluidStack;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
+import gtPlusPlus.core.util.reflect.ReflectionUtils;
+import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
+import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy;
+
public class VolumetricFlaskHelper {
private static final Class sClassVolumetricFlask;
@@ -89,8 +91,8 @@ public class VolumetricFlaskHelper {
if (aStack != null && sMethodGetFlaskMaxCapacity != null) {
Item aItem = aStack.getItem();
if (sClassVolumetricFlask.isInstance(aItem)) {
- int aMaxCapacity =
- (int) ReflectionUtils.invokeNonBool(aItem, sMethodGetFlaskMaxCapacity, new Object[] {});
+ int aMaxCapacity = (int) ReflectionUtils
+ .invokeNonBool(aItem, sMethodGetFlaskMaxCapacity, new Object[] {});
return aMaxCapacity;
}
}
@@ -168,11 +170,11 @@ public class VolumetricFlaskHelper {
}
public static Item generateNewFlask(String unlocalized, String english, int maxCapacity) {
- Constructor aFlask = ReflectionUtils.getConstructor(
- sClassVolumetricFlask, new Class[] {String.class, String.class, int.class});
+ Constructor aFlask = ReflectionUtils
+ .getConstructor(sClassVolumetricFlask, new Class[] { String.class, String.class, int.class });
if (aFlask != null) {
- Object aInstance = ReflectionUtils.createNewInstanceFromConstructor(
- aFlask, new Object[] {unlocalized, english, maxCapacity});
+ Object aInstance = ReflectionUtils
+ .createNewInstanceFromConstructor(aFlask, new Object[] { unlocalized, english, maxCapacity });
if (aInstance != null && aInstance instanceof Item) {
Item aNewFlaskItem = (Item) aInstance;
return aNewFlaskItem;
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Container.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Container.java
index 165941b1d2..f31337228b 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Container.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Container.java
@@ -1,6 +1,5 @@
package gtPlusPlus.xmod.gregtech.common.helpers.autocrafter;
-import gtPlusPlus.api.objects.Logger;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.*;
@@ -8,7 +7,10 @@ import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.world.World;
+import gtPlusPlus.api.objects.Logger;
+
public class AC_Helper_Container extends Container {
+
/** The crafting matrix inventory (3x3). */
public InventoryCrafting craftMatrix = new InventoryCrafting(this, 3, 3);
@@ -62,7 +64,8 @@ public class AC_Helper_Container extends Container {
@Override
public void onCraftMatrixChanged(IInventory p_75130_1_) {
this.craftResult.setInventorySlotContents(
- 0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj));
+ 0,
+ CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj));
Logger.INFO("Crafted " + this.craftResult.getStackInSlot(0));
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java
index 6b8452eeed..6a2175f151 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java
@@ -1,15 +1,15 @@
package gtPlusPlus.xmod.gregtech.common.helpers.autocrafter;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_AutoCrafter;
import java.util.*;
import java.util.Map.Entry;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_AutoCrafter;
+
public class AC_Helper_Utils {
// AC maps
- public static final Map<Integer, GT4Entity_AutoCrafter> sAutocrafterMap =
- new HashMap<Integer, GT4Entity_AutoCrafter>();
+ public static final Map<Integer, GT4Entity_AutoCrafter> sAutocrafterMap = new HashMap<Integer, GT4Entity_AutoCrafter>();
// Add Crafter
public static final int addCrafter(GT4Entity_AutoCrafter AC) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/tesseract/TesseractHelper.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/tesseract/TesseractHelper.java
index f4eb274179..e490c3dd81 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/tesseract/TesseractHelper.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/tesseract/TesseractHelper.java
@@ -2,13 +2,15 @@ package gtPlusPlus.xmod.gregtech.common.helpers.tesseract;
import static gtPlusPlus.core.lib.CORE.*;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractGenerator;
-import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractTerminal;
import java.util.*;
import java.util.Map.Entry;
+
import net.minecraft.entity.player.EntityPlayer;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractGenerator;
+import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractTerminal;
+
public class TesseractHelper {
/**
@@ -19,8 +21,8 @@ public class TesseractHelper {
*/
// Checks if a Generator is owned by a player.
- public static final boolean isGeneratorOwnedByPlayer(
- EntityPlayer player, GT_MetaTileEntity_TesseractGenerator generator) {
+ public static final boolean isGeneratorOwnedByPlayer(EntityPlayer player,
+ GT_MetaTileEntity_TesseractGenerator generator) {
if (player == null) {
Logger.WARNING("Failed. [isGeneratorOwnedByPlayer]");
return false;
@@ -46,26 +48,25 @@ public class TesseractHelper {
}
// Saves A Generator to the Players UUID map along with the Freq.
- public static final boolean setGeneratorOwnershipByPlayer(
- EntityPlayer player, int freq, GT_MetaTileEntity_TesseractGenerator generator) {
+ public static final boolean setGeneratorOwnershipByPlayer(EntityPlayer player, int freq,
+ GT_MetaTileEntity_TesseractGenerator generator) {
if (player == null) {
return false;
}
UUID playerIdentifier = player.getUniqueID();
Logger.WARNING("Setting Generator on " + freq + " for " + player.getDisplayName() + ".");
if (playerIdentifier != null) {
- Map<Integer, GT_MetaTileEntity_TesseractGenerator> playerOwned =
- sTesseractGeneratorOwnershipMap.get(playerIdentifier);
+ Map<Integer, GT_MetaTileEntity_TesseractGenerator> playerOwned = sTesseractGeneratorOwnershipMap
+ .get(playerIdentifier);
if (playerOwned == null || playerOwned.isEmpty()) {
- Map<Integer, GT_MetaTileEntity_TesseractGenerator> newOwnershipMap =
- new HashMap<Integer, GT_MetaTileEntity_TesseractGenerator>();
+ Map<Integer, GT_MetaTileEntity_TesseractGenerator> newOwnershipMap = new HashMap<Integer, GT_MetaTileEntity_TesseractGenerator>();
newOwnershipMap.put(freq, generator);
sTesseractGeneratorOwnershipMap.put(playerIdentifier, newOwnershipMap);
Logger.WARNING("Success! [Empty Map]");
return true;
} else if (sTesseractGeneratorOwnershipMap.containsKey(playerIdentifier)) {
- Map<Integer, GT_MetaTileEntity_TesseractGenerator> ownershipMap =
- sTesseractGeneratorOwnershipMap.get(playerIdentifier);
+ Map<Integer, GT_MetaTileEntity_TesseractGenerator> ownershipMap = sTesseractGeneratorOwnershipMap
+ .get(playerIdentifier);
if (!ownershipMap.containsKey(freq)) {
ownershipMap.put(freq, generator);
}
@@ -127,8 +128,8 @@ public class TesseractHelper {
*/
// Checks if a Terminal is owned by a player.
- public static final boolean isTerminalOwnedByPlayer(
- EntityPlayer player, GT_MetaTileEntity_TesseractTerminal generator) {
+ public static final boolean isTerminalOwnedByPlayer(EntityPlayer player,
+ GT_MetaTileEntity_TesseractTerminal generator) {
if (player == null) {
return false;
}
@@ -148,26 +149,25 @@ public class TesseractHelper {
}
// Saves A Terminal to the Players UUID map along with the Freq.
- public static final boolean setTerminalOwnershipByPlayer(
- EntityPlayer player, int freq, GT_MetaTileEntity_TesseractTerminal generator) {
+ public static final boolean setTerminalOwnershipByPlayer(EntityPlayer player, int freq,
+ GT_MetaTileEntity_TesseractTerminal generator) {
if (player == null) {
return false;
}
UUID playerIdentifier = player.getUniqueID();
if (playerIdentifier != null) {
Logger.WARNING("Setting Terminal on " + freq + " for " + player.getDisplayName() + ".");
- Map<Integer, GT_MetaTileEntity_TesseractTerminal> playerOwned =
- sTesseractTerminalOwnershipMap.get(playerIdentifier);
+ Map<Integer, GT_MetaTileEntity_TesseractTerminal> playerOwned = sTesseractTerminalOwnershipMap
+ .get(playerIdentifier);
if (playerOwned == null || playerOwned.isEmpty()) {
- Map<Integer, GT_MetaTileEntity_TesseractTerminal> newOwnershipMap =
- new HashMap<Integer, GT_MetaTileEntity_TesseractTerminal>();
+ Map<Integer, GT_MetaTileEntity_TesseractTerminal> newOwnershipMap = new HashMap<Integer, GT_MetaTileEntity_TesseractTerminal>();
newOwnershipMap.put(freq, generator);
sTesseractTerminalOwnershipMap.put(playerIdentifier, newOwnershipMap);
Logger.WARNING("Success! [Empty Map]");
return true;
} else if (sTesseractTerminalOwnershipMap.containsKey(playerIdentifier)) {
- Map<Integer, GT_MetaTileEntity_TesseractTerminal> ownershipMap =
- sTesseractTerminalOwnershipMap.get(playerIdentifier);
+ Map<Integer, GT_MetaTileEntity_TesseractTerminal> ownershipMap = sTesseractTerminalOwnershipMap
+ .get(playerIdentifier);
if (!ownershipMap.containsKey(freq)) {
ownershipMap.put(freq, generator);
}
@@ -225,8 +225,8 @@ public class TesseractHelper {
EntityPlayer player) {
UUID playerIdentifier = player.getUniqueID();
if (!sTesseractGeneratorOwnershipMap.isEmpty() && playerIdentifier != null) {
- Set<Entry<UUID, Map<Integer, GT_MetaTileEntity_TesseractGenerator>>> players =
- sTesseractGeneratorOwnershipMap.entrySet();
+ Set<Entry<UUID, Map<Integer, GT_MetaTileEntity_TesseractGenerator>>> players = sTesseractGeneratorOwnershipMap
+ .entrySet();
Iterator<Entry<UUID, Map<Integer, GT_MetaTileEntity_TesseractGenerator>>> i = players.iterator();
while (i.hasNext()) {
Entry<UUID, Map<Integer, GT_MetaTileEntity_TesseractGenerator>> current = i.next();
@@ -242,8 +242,8 @@ public class TesseractHelper {
EntityPlayer player) {
UUID playerIdentifier = player.getUniqueID();
if (!sTesseractTerminalOwnershipMap.isEmpty() && playerIdentifier != null) {
- Set<Entry<UUID, Map<Integer, GT_MetaTileEntity_TesseractTerminal>>> players =
- sTesseractTerminalOwnershipMap.entrySet();
+ Set<Entry<UUID, Map<Integer, GT_MetaTileEntity_TesseractTerminal>>> players = sTesseractTerminalOwnershipMap
+ .entrySet();
Iterator<Entry<UUID, Map<Integer, GT_MetaTileEntity_TesseractTerminal>>> i = players.iterator();
while (i.hasNext()) {
Entry<UUID, Map<Integer, GT_MetaTileEntity_TesseractTerminal>> current = i.next();
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/treefarm/TreeGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/treefarm/TreeGenerator.java
index 1e45b7c60b..b9ba13fa3f 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/treefarm/TreeGenerator.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/helpers/treefarm/TreeGenerator.java
@@ -1,12 +1,7 @@
package gtPlusPlus.xmod.gregtech.common.helpers.treefarm;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.api.objects.data.AutoMap;
-import gtPlusPlus.api.objects.minecraft.FakeBlockPos;
-import gtPlusPlus.api.objects.minecraft.FakeWorld;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.math.MathUtils;
import java.util.Random;
+
import net.minecraft.block.Block;
import net.minecraft.block.BlockSapling;
import net.minecraft.block.material.Material;
@@ -17,6 +12,13 @@ import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
import net.minecraftforge.common.util.ForgeDirection;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.api.objects.data.AutoMap;
+import gtPlusPlus.api.objects.minecraft.FakeBlockPos;
+import gtPlusPlus.api.objects.minecraft.FakeWorld;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.math.MathUtils;
+
public class TreeGenerator {
private static final FakeTreeInFakeWorldGenerator mTreeData;
@@ -43,6 +45,7 @@ public class TreeGenerator {
}
public static class FakeTreeInFakeWorldGenerator extends WorldGenAbstractTree {
+
/** The minimum height of a generated tree. */
private final int minTreeHeight;
/** True if this tree should grow Vines. */
@@ -64,8 +67,8 @@ public class TreeGenerator {
this(4, 0, 0, false, 5000);
}
- public FakeTreeInFakeWorldGenerator(
- int aMinHeight, int aWoodMeta, int aLeafMeta, boolean aVines, int aTreeCount) {
+ public FakeTreeInFakeWorldGenerator(int aMinHeight, int aWoodMeta, int aLeafMeta, boolean aVines,
+ int aTreeCount) {
super(false);
this.minTreeHeight = aMinHeight;
this.metaWood = aWoodMeta;
@@ -93,8 +96,7 @@ public class TreeGenerator {
@Override
protected boolean func_150523_a(Block p_150523_1_) {
- return p_150523_1_.getMaterial() == Material.air
- || p_150523_1_.getMaterial() == Material.leaves
+ return p_150523_1_.getMaterial() == Material.air || p_150523_1_.getMaterial() == Material.leaves
|| p_150523_1_ == Blocks.grass
|| p_150523_1_ == Blocks.dirt
|| p_150523_1_ == Blocks.log
@@ -107,8 +109,7 @@ public class TreeGenerator {
protected boolean isReplaceable(World world, int x, int y, int z) {
FakeWorld aWorld = getWorld();
Block block = aWorld.getBlock(x, y, z);
- return block.isAir(null, x, y, z)
- || block.isLeaves(null, x, y, z)
+ return block.isAir(null, x, y, z) || block.isLeaves(null, x, y, z)
|| block.isWood(null, x, y, z)
|| func_150523_a(block);
}
@@ -201,12 +202,17 @@ public class TreeGenerator {
FakeBlockPos aBlockToGrowPlantOn = aWorld.getBlockAtCoords(aWorldX, aWorldY - 1, aWorldZ);
boolean isSoil = block2.canSustainPlant(
- aWorld, aWorldX, aWorldY - 1, aWorldZ, ForgeDirection.UP, (BlockSapling) Blocks.sapling);
+ aWorld,
+ aWorldX,
+ aWorldY - 1,
+ aWorldZ,
+ ForgeDirection.UP,
+ (BlockSapling) Blocks.sapling);
if (
- /*isSoil &&*/ aWorldY < 256 - l - 1) {
+ /* isSoil && */ aWorldY < 256 - l - 1) {
Logger.WARNING("Stepping through generateTree [4]");
- aBlockToGrowPlantOn.onPlantGrow(
- aWorld, aWorldX, aWorldY - 1, aWorldZ, aWorldX, aWorldY, aWorldZ);
+ aBlockToGrowPlantOn
+ .onPlantGrow(aWorld, aWorldX, aWorldY - 1, aWorldZ, aWorldX, aWorldY, aWorldZ);
b0 = 3;
byte b1 = 0;
int l1;
@@ -224,14 +230,18 @@ public class TreeGenerator {
for (int k2 = aWorldZ - l1; k2 <= aWorldZ + l1; ++k2) {
int l2 = k2 - aWorldZ;
- if (Math.abs(j2) != l1
- || Math.abs(l2) != l1
+ if (Math.abs(j2) != l1 || Math.abs(l2) != l1
|| CORE.RANDOM.nextInt(2) != 0 && i3 != 0) {
Block block1 = aWorld.getBlock(i2, k1, k2);
if (block1.isAir(null, i2, k1, k2) || block1.isLeaves(null, i2, k1, k2)) {
this.setBlockAndNotifyAdequately(
- aWorld, i2, k1, k2, Blocks.leaves, this.metaLeaves);
+ aWorld,
+ i2,
+ k1,
+ k2,
+ Blocks.leaves,
+ this.metaLeaves);
}
}
}
@@ -245,31 +255,56 @@ public class TreeGenerator {
if (block.isAir(null, aWorldX, aWorldY + k1, aWorldZ)
|| block.isLeaves(null, aWorldX, aWorldY + k1, aWorldZ)) {
this.setBlockAndNotifyAdequately(
- aWorld, aWorldX, aWorldY + k1, aWorldZ, Blocks.log, this.metaWood);
+ aWorld,
+ aWorldX,
+ aWorldY + k1,
+ aWorldZ,
+ Blocks.log,
+ this.metaWood);
if (this.vinesGrow && k1 > 0) {
if (CORE.RANDOM.nextInt(3) > 0
&& aWorld.isAirBlock(aWorldX - 1, aWorldY + k1, aWorldZ)) {
this.setBlockAndNotifyAdequately(
- aWorld, aWorldX - 1, aWorldY + k1, aWorldZ, Blocks.vine, 8);
+ aWorld,
+ aWorldX - 1,
+ aWorldY + k1,
+ aWorldZ,
+ Blocks.vine,
+ 8);
}
if (CORE.RANDOM.nextInt(3) > 0
&& aWorld.isAirBlock(aWorldX + 1, aWorldY + k1, aWorldZ)) {
this.setBlockAndNotifyAdequately(
- aWorld, aWorldX + 1, aWorldY + k1, aWorldZ, Blocks.vine, 2);
+ aWorld,
+ aWorldX + 1,
+ aWorldY + k1,
+ aWorldZ,
+ Blocks.vine,
+ 2);
}
if (CORE.RANDOM.nextInt(3) > 0
&& aWorld.isAirBlock(aWorldX, aWorldY + k1, aWorldZ - 1)) {
this.setBlockAndNotifyAdequately(
- aWorld, aWorldX, aWorldY + k1, aWorldZ - 1, Blocks.vine, 1);
+ aWorld,
+ aWorldX,
+ aWorldY + k1,
+ aWorldZ - 1,
+ Blocks.vine,
+ 1);
}
if (CORE.RANDOM.nextInt(3) > 0
&& aWorld.isAirBlock(aWorldX, aWorldY + k1, aWorldZ + 1)) {
this.setBlockAndNotifyAdequately(
- aWorld, aWorldX, aWorldY + k1, aWorldZ + 1, Blocks.vine, 4);
+ aWorld,
+ aWorldX,
+ aWorldY + k1,
+ aWorldZ + 1,
+ Blocks.vine,
+ 4);
}
}
}
@@ -286,26 +321,22 @@ public class TreeGenerator {
for (j2 = aWorldZ - l1; j2 <= aWorldZ + l1; ++j2) {
if (aWorld.getBlock(i2, k1, j2).isLeaves(null, i2, k1, j2)) {
if (CORE.RANDOM.nextInt(4) == 0
- && aWorld.getBlock(i2 - 1, k1, j2)
- .isAir(null, i2 - 1, k1, j2)) {
+ && aWorld.getBlock(i2 - 1, k1, j2).isAir(null, i2 - 1, k1, j2)) {
this.growVines(aWorld, i2 - 1, k1, j2, 8);
}
if (CORE.RANDOM.nextInt(4) == 0
- && aWorld.getBlock(i2 + 1, k1, j2)
- .isAir(null, i2 + 1, k1, j2)) {
+ && aWorld.getBlock(i2 + 1, k1, j2).isAir(null, i2 + 1, k1, j2)) {
this.growVines(aWorld, i2 + 1, k1, j2, 2);
}
if (CORE.RANDOM.nextInt(4) == 0
- && aWorld.getBlock(i2, k1, j2 - 1)
- .isAir(null, i2, k1, j2 - 1)) {
+ && aWorld.getBlock(i2, k1, j2 - 1).isAir(null, i2, k1, j2 - 1)) {
this.growVines(aWorld, i2, k1, j2 - 1, 1);
}
if (CORE.RANDOM.nextInt(4) == 0
- && aWorld.getBlock(i2, k1, j2 + 1)
- .isAir(null, i2, k1, j2 + 1)) {
+ && aWorld.getBlock(i2, k1, j2 + 1).isAir(null, i2, k1, j2 + 1)) {
this.growVines(aWorld, i2, k1, j2 + 1, 4);
}
}
@@ -361,8 +392,16 @@ public class TreeGenerator {
protected void setBlockAndNotifyAdequately(FakeWorld aWorld, int aX, int aY, int aZ, Block aBlock, int aMeta) {
if (aBlock != null && (aMeta >= 0 && aMeta <= Short.MAX_VALUE)) {
- Logger.WARNING("Setting block " + aX + ", " + aY + ", " + aZ + " | " + aBlock.getLocalizedName() + " | "
- + aMeta);
+ Logger.WARNING(
+ "Setting block " + aX
+ + ", "
+ + aY
+ + ", "
+ + aZ
+ + " | "
+ + aBlock.getLocalizedName()
+ + " | "
+ + aMeta);
aWorld.setBlockAtCoords(aX, aY, aZ, aBlock, aMeta);
// aOutputsFromGenerator.put(ItemUtils.simpleMetaStack(aBlock, aMeta, 1));
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java
index 7012f6d0f7..4fe1fda076 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java
@@ -1,5 +1,18 @@
package gtPlusPlus.xmod.gregtech.common.items;
+import java.util.List;
+
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.World;
+
+import org.apache.commons.lang3.StringUtils;
+
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
import gregtech.api.interfaces.IIconContainer;
@@ -13,16 +26,6 @@ import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.sys.KeyboardUtils;
import gtPlusPlus.xmod.gregtech.common.covers.GTPP_Cover_ToggleVisual;
-import java.util.List;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.World;
-import org.apache.commons.lang3.StringUtils;
public class MetaCustomCoverItem extends Item {
@@ -32,8 +35,8 @@ public class MetaCustomCoverItem extends Item {
protected final IIconContainer[] mTextures;
private final short[][] mRGB;
- public MetaCustomCoverItem(
- String aModId, int aTextureCount, String aTextureSetName, IIconContainer[] aTextures, short[][] aRGB) {
+ public MetaCustomCoverItem(String aModId, int aTextureCount, String aTextureSetName, IIconContainer[] aTextures,
+ short[][] aRGB) {
super();
icons = new IIcon[aTextureCount];
mModID = aModId;
@@ -48,8 +51,13 @@ public class MetaCustomCoverItem extends Item {
this.setMaxStackSize(1);
GameRegistry.registerItem(this, unlocalizedName);
registerCover();
- Logger.INFO("[Covers] Generated Custom covers for " + mModID + " using " + aTextureCount + " textures from "
- + mTextureSetName + ".");
+ Logger.INFO(
+ "[Covers] Generated Custom covers for " + mModID
+ + " using "
+ + aTextureCount
+ + " textures from "
+ + mTextureSetName
+ + ".");
}
public boolean hide() {
@@ -65,17 +73,15 @@ public class MetaCustomCoverItem extends Item {
}
GregTech_API.registerCover(
thisStack,
- new GT_MultiTexture(new ITexture[] {new GT_RenderedTexture(mTextures[i])}),
+ new GT_MultiTexture(new ITexture[] { new GT_RenderedTexture(mTextures[i]) }),
new GTPP_Cover_ToggleVisual());
}
}
/*
- * @Override public void registerIcons(IIconRegister reg) { for (int i = 0; i <
- * icons.length; i++) { this.icons[i] = mTextures[i].getIcon(); } }
- *
- * @Override public IIcon getIconFromDamage(int meta) { return this.icons[meta];
- * }
+ * @Override public void registerIcons(IIconRegister reg) { for (int i = 0; i < icons.length; i++) { this.icons[i] =
+ * mTextures[i].getIcon(); } }
+ * @Override public IIcon getIconFromDamage(int meta) { return this.icons[meta]; }
*/
@Override
@@ -92,8 +98,7 @@ public class MetaCustomCoverItem extends Item {
@Override
public String getItemStackDisplayName(final ItemStack tItem) {
- return StringUtils.capitalize(mTextureSetName) + " (" + tItem.getItemDamage()
- + ")"; // super.getItemStackDisplayName(tItem);
+ return StringUtils.capitalize(mTextureSetName) + " (" + tItem.getItemDamage() + ")"; // super.getItemStackDisplayName(tItem);
}
private static boolean createNBT(ItemStack rStack) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
index 9ff348ddcc..4ccec0bb93 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
@@ -2,6 +2,8 @@ package gtPlusPlus.xmod.gregtech.common.items;
import static gtPlusPlus.core.util.Utils.getTcAspectStack;
+import net.minecraft.item.EnumAction;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
@@ -35,7 +37,6 @@ import gtPlusPlus.xmod.gregtech.api.items.Gregtech_MetaItem_X32;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.covers.GTPP_Cover_Overflow;
import gtPlusPlus.xmod.gregtech.common.covers.GTPP_Cover_ToggleVisual;
-import net.minecraft.item.EnumAction;
public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
@@ -46,7 +47,7 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
}
public MetaGeneratedGregtechItems() {
- super("MU-metaitem.01", new OrePrefixes[] {null});
+ super("MU-metaitem.01", new OrePrefixes[] { null });
}
public void generateMetaItems() {
@@ -59,60 +60,60 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
Logger.INFO(
"Gregtech 5.09 not found, using fallback components. (I like how I have to add compat to something I added first and had stolen.)");
GregtechItemList.Electric_Pump_LuV.set(
- this.addItem(tLastID = 0, "Electric Pump (LuV)", "163920 L/sec (as Cover)", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
- getTcAspectStack(TC_Aspects.MACHINA, 1L),
- getTcAspectStack(TC_Aspects.ITER, 1L),
- getTcAspectStack(TC_Aspects.AQUA, 1L)
- }));
+ this.addItem(
+ tLastID = 0,
+ "Electric Pump (LuV)",
+ "163920 L/sec (as Cover)",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L),
+ getTcAspectStack(TC_Aspects.AQUA, 1L) }));
GregtechItemList.Electric_Pump_ZPM.set(
- this.addItem(tLastID = 1, "Electric Pump (ZPM)", "655680 L/sec (as Cover)", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
- getTcAspectStack(TC_Aspects.MACHINA, 2L),
- getTcAspectStack(TC_Aspects.ITER, 2L),
- getTcAspectStack(TC_Aspects.AQUA, 2L)
- }));
+ this.addItem(
+ tLastID = 1,
+ "Electric Pump (ZPM)",
+ "655680 L/sec (as Cover)",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
+ getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.ITER, 2L),
+ getTcAspectStack(TC_Aspects.AQUA, 2L) }));
GregtechItemList.Electric_Pump_UV.set(
- this.addItem(tLastID = 2, "Electric Pump (UV)", "2622720 L/sec (as Cover)", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 4L),
- getTcAspectStack(TC_Aspects.MACHINA, 4L),
- getTcAspectStack(TC_Aspects.ITER, 4L),
- getTcAspectStack(TC_Aspects.AQUA, 4L)
- }));
+ this.addItem(
+ tLastID = 2,
+ "Electric Pump (UV)",
+ "2622720 L/sec (as Cover)",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 4L),
+ getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.ITER, 4L),
+ getTcAspectStack(TC_Aspects.AQUA, 4L) }));
GregtechItemList.Electric_Pump_MAX.set(
- this.addItem(tLastID = 3, "Electric Pump (MAX)", "10490880 L/sec (as Cover)", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.MACHINA, 8L),
- getTcAspectStack(TC_Aspects.ITER, 8L),
- getTcAspectStack(TC_Aspects.AQUA, 8L)
- }));
+ this.addItem(
+ tLastID = 3,
+ "Electric Pump (MAX)",
+ "10490880 L/sec (as Cover)",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L),
+ getTcAspectStack(TC_Aspects.AQUA, 8L) }));
GregTech_API.registerCover(
GregtechItemList.Electric_Pump_LuV.get(1L),
- new GT_MultiTexture(new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[5][0],
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)
- }),
+ new GT_MultiTexture(
+ new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[5][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP) }),
new GT_Cover_Pump(8196));
GregTech_API.registerCover(
GregtechItemList.Electric_Pump_ZPM.get(1L),
- new GT_MultiTexture(new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[6][0],
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)
- }),
+ new GT_MultiTexture(
+ new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[6][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP) }),
new GT_Cover_Pump(32768));
GregTech_API.registerCover(
GregtechItemList.Electric_Pump_UV.get(1L),
- new GT_MultiTexture(new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[7][0],
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)
- }),
+ new GT_MultiTexture(
+ new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[7][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP) }),
new GT_Cover_Pump(131072));
GregTech_API.registerCover(
GregtechItemList.Electric_Pump_MAX.get(1L),
- new GT_MultiTexture(new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[8][0],
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)
- }),
+ new GT_MultiTexture(
+ new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[8][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP) }),
new GT_Cover_Pump(524288));
// GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_LuV.get(1L),
// //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
@@ -146,26 +147,38 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
// OrePrefixes.cableGt01.get(Materials.Aluminium), Character.valueOf('P'),
// OrePrefixes.pipeMedium.get(Materials.Titanium)});
tLastID = 4;
- GregtechItemList.Electric_Motor_LuV.set(this.addItem(tLastID = 4, "Electric Motor (LuV)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
- getTcAspectStack(TC_Aspects.MACHINA, 1L),
- getTcAspectStack(TC_Aspects.MOTUS, 1L)
- }));
- GregtechItemList.Electric_Motor_ZPM.set(this.addItem(tLastID = 5, "Electric Motor (ZPM)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
- getTcAspectStack(TC_Aspects.MACHINA, 2L),
- getTcAspectStack(TC_Aspects.MOTUS, 2L)
- }));
- GregtechItemList.Electric_Motor_UV.set(this.addItem(tLastID = 6, "Electric Motor (UV)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 4L),
- getTcAspectStack(TC_Aspects.MACHINA, 4L),
- getTcAspectStack(TC_Aspects.MOTUS, 4L)
- }));
- GregtechItemList.Electric_Motor_MAX.set(this.addItem(tLastID = 7, "Electric Motor (MAX)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.MACHINA, 8L),
- getTcAspectStack(TC_Aspects.MOTUS, 8L)
- }));
+ GregtechItemList.Electric_Motor_LuV.set(
+ this.addItem(
+ tLastID = 4,
+ "Electric Motor (LuV)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ getTcAspectStack(TC_Aspects.MACHINA, 1L),
+ getTcAspectStack(TC_Aspects.MOTUS, 1L) }));
+ GregtechItemList.Electric_Motor_ZPM.set(
+ this.addItem(
+ tLastID = 5,
+ "Electric Motor (ZPM)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
+ getTcAspectStack(TC_Aspects.MACHINA, 2L),
+ getTcAspectStack(TC_Aspects.MOTUS, 2L) }));
+ GregtechItemList.Electric_Motor_UV.set(
+ this.addItem(
+ tLastID = 6,
+ "Electric Motor (UV)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 4L),
+ getTcAspectStack(TC_Aspects.MACHINA, 4L),
+ getTcAspectStack(TC_Aspects.MOTUS, 4L) }));
+ GregtechItemList.Electric_Motor_MAX.set(
+ this.addItem(
+ tLastID = 7,
+ "Electric Motor (MAX)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ getTcAspectStack(TC_Aspects.MACHINA, 8L),
+ getTcAspectStack(TC_Aspects.MOTUS, 8L) }));
// GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_LuV.get(1L),
// //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
// //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", Character.valueOf('I'),
@@ -196,30 +209,34 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
// OrePrefixes.cableGt01.get(Materials.Nichrome)});
tLastID = 8;
- GregtechItemList.Conveyor_Module_LuV.set(this.addItem(
- tLastID = 8, "Conveyor Module (LuV)", "1 Stack every 20 secs (as Cover)", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
- getTcAspectStack(TC_Aspects.MACHINA, 1L),
- getTcAspectStack(TC_Aspects.ITER, 1L)
- }));
+ GregtechItemList.Conveyor_Module_LuV.set(
+ this.addItem(
+ tLastID = 8,
+ "Conveyor Module (LuV)",
+ "1 Stack every 20 secs (as Cover)",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L) }));
GregtechItemList.Conveyor_Module_ZPM.set(
- this.addItem(tLastID = 9, "Conveyor Module (ZPM)", "1 Stack every 5 secs (as Cover)", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
- getTcAspectStack(TC_Aspects.MACHINA, 2L),
- getTcAspectStack(TC_Aspects.ITER, 2L)
- }));
+ this.addItem(
+ tLastID = 9,
+ "Conveyor Module (ZPM)",
+ "1 Stack every 5 secs (as Cover)",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
+ getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.ITER, 2L) }));
GregtechItemList.Conveyor_Module_UV.set(
- this.addItem(tLastID = 10, "Conveyor Module (UV)", "1 Stack every 1 sec (as Cover)", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 4L),
- getTcAspectStack(TC_Aspects.MACHINA, 4L),
- getTcAspectStack(TC_Aspects.ITER, 4L)
- }));
- GregtechItemList.Conveyor_Module_MAX.set(this.addItem(
- tLastID = 11, "Conveyor Module (MAX)", "1 Stack every 1/5 sec (as Cover)", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.MACHINA, 8L),
- getTcAspectStack(TC_Aspects.ITER, 8L)
- }));
+ this.addItem(
+ tLastID = 10,
+ "Conveyor Module (UV)",
+ "1 Stack every 1 sec (as Cover)",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 4L),
+ getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.ITER, 4L) }));
+ GregtechItemList.Conveyor_Module_MAX.set(
+ this.addItem(
+ tLastID = 11,
+ "Conveyor Module (MAX)",
+ "1 Stack every 1/5 sec (as Cover)",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L) }));
// GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_LuV.get(1L),
// //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
// //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", Character.valueOf('M'),
@@ -244,57 +261,61 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
// OrePrefixes.plate.get(Materials.Rubber)});
GregTech_API.registerCover(
GregtechItemList.Conveyor_Module_LuV.get(1L),
- new GT_MultiTexture(new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[1][0],
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)
- }),
+ new GT_MultiTexture(
+ new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[1][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR) }),
new GT_Cover_Conveyor(400));
GregTech_API.registerCover(
GregtechItemList.Conveyor_Module_ZPM.get(1L),
- new GT_MultiTexture(new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[2][0],
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)
- }),
+ new GT_MultiTexture(
+ new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[2][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR) }),
new GT_Cover_Conveyor(100));
GregTech_API.registerCover(
GregtechItemList.Conveyor_Module_UV.get(1L),
- new GT_MultiTexture(new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[3][0],
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)
- }),
+ new GT_MultiTexture(
+ new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[3][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR) }),
new GT_Cover_Conveyor(20));
GregTech_API.registerCover(
GregtechItemList.Conveyor_Module_MAX.get(1L),
- new GT_MultiTexture(new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[4][0],
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)
- }),
+ new GT_MultiTexture(
+ new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[4][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR) }),
new GT_Cover_Conveyor(4));
tLastID = 12;
GregtechItemList.Electric_Piston_LuV.set(
- this.addItem(tLastID = 12, "Electric Piston (LuV)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
- getTcAspectStack(TC_Aspects.MACHINA, 2L),
- getTcAspectStack(TC_Aspects.MOTUS, 1L)
- }));
+ this.addItem(
+ tLastID = 12,
+ "Electric Piston (LuV)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ getTcAspectStack(TC_Aspects.MACHINA, 2L),
+ getTcAspectStack(TC_Aspects.MOTUS, 1L) }));
GregtechItemList.Electric_Piston_ZPM.set(
- this.addItem(tLastID = 13, "Electric Piston (ZPM)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
- getTcAspectStack(TC_Aspects.MACHINA, 4L),
- getTcAspectStack(TC_Aspects.MOTUS, 2L)
- }));
+ this.addItem(
+ tLastID = 13,
+ "Electric Piston (ZPM)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
+ getTcAspectStack(TC_Aspects.MACHINA, 4L),
+ getTcAspectStack(TC_Aspects.MOTUS, 2L) }));
GregtechItemList.Electric_Piston_UV.set(
- this.addItem(tLastID = 14, "Electric Piston (UV)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 4L),
- getTcAspectStack(TC_Aspects.MACHINA, 8L),
- getTcAspectStack(TC_Aspects.MOTUS, 4L)
- }));
+ this.addItem(
+ tLastID = 14,
+ "Electric Piston (UV)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 4L),
+ getTcAspectStack(TC_Aspects.MACHINA, 8L),
+ getTcAspectStack(TC_Aspects.MOTUS, 4L) }));
GregtechItemList.Electric_Piston_MAX.set(
- this.addItem(tLastID = 15, "Electric Piston (MAX)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.MACHINA, 16L),
- getTcAspectStack(TC_Aspects.MOTUS, 8L)
- }));
+ this.addItem(
+ tLastID = 15,
+ "Electric Piston (MAX)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ getTcAspectStack(TC_Aspects.MACHINA, 16L),
+ getTcAspectStack(TC_Aspects.MOTUS, 8L) }));
// GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_LuV.get(1L),
// //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
// //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", Character.valueOf('P'),
@@ -325,34 +346,38 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
// GregtechItemList.Electric_Motor_MAX, Character.valueOf('C'),
// OrePrefixes.cableGt01.get(Materials.Aluminium)});
tLastID = 16;
- GregtechItemList.Robot_Arm_LuV.set(this.addItem(
- tLastID = 16, "Robot Arm (LuV)", "Inserts into specific Slots (as Cover)", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
- getTcAspectStack(TC_Aspects.MACHINA, 2L),
- getTcAspectStack(TC_Aspects.MOTUS, 1L),
- Utils.getTcAspectStack("COGNITIO", 1L)
- }));
- GregtechItemList.Robot_Arm_ZPM.set(this.addItem(
- tLastID = 17, "Robot Arm (ZPM)", "Inserts into specific Slots (as Cover)", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
- getTcAspectStack(TC_Aspects.MACHINA, 4L),
- getTcAspectStack(TC_Aspects.MOTUS, 2L),
- getTcAspectStack("COGNITIO", 2L)
- }));
- GregtechItemList.Robot_Arm_UV.set(this.addItem(
- tLastID = 18, "Robot Arm (UV)", "Inserts into specific Slots (as Cover)", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 4L),
- getTcAspectStack(TC_Aspects.MACHINA, 8L),
- getTcAspectStack(TC_Aspects.MOTUS, 4L),
- getTcAspectStack("COGNITIO", 4L)
- }));
- GregtechItemList.Robot_Arm_MAX.set(this.addItem(
- tLastID = 19, "Robot Arm (MAX)", "Inserts into specific Slots (as Cover)", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.MACHINA, 16L),
- getTcAspectStack(TC_Aspects.MOTUS, 8L),
- getTcAspectStack("COGNITIO", 8L)
- }));
+ GregtechItemList.Robot_Arm_LuV.set(
+ this.addItem(
+ tLastID = 16,
+ "Robot Arm (LuV)",
+ "Inserts into specific Slots (as Cover)",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.MOTUS, 1L),
+ Utils.getTcAspectStack("COGNITIO", 1L) }));
+ GregtechItemList.Robot_Arm_ZPM.set(
+ this.addItem(
+ tLastID = 17,
+ "Robot Arm (ZPM)",
+ "Inserts into specific Slots (as Cover)",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
+ getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.MOTUS, 2L),
+ getTcAspectStack("COGNITIO", 2L) }));
+ GregtechItemList.Robot_Arm_UV.set(
+ this.addItem(
+ tLastID = 18,
+ "Robot Arm (UV)",
+ "Inserts into specific Slots (as Cover)",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 4L),
+ getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.MOTUS, 4L),
+ getTcAspectStack("COGNITIO", 4L) }));
+ GregtechItemList.Robot_Arm_MAX.set(
+ this.addItem(
+ tLastID = 19,
+ "Robot Arm (MAX)",
+ "Inserts into specific Slots (as Cover)",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L),
+ getTcAspectStack("COGNITIO", 8L) }));
// GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_LuV.get(1L),
// //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
// //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", Character.valueOf('S'),
@@ -383,57 +408,61 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
// OrePrefixes.cableGt01.get(Materials.Aluminium)});
GregTech_API.registerCover(
GregtechItemList.Robot_Arm_LuV.get(1L),
- new GT_MultiTexture(new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[1][0],
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)
- }),
+ new GT_MultiTexture(
+ new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[1][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM) }),
new GT_Cover_Arm(400));
GregTech_API.registerCover(
GregtechItemList.Robot_Arm_ZPM.get(1L),
- new GT_MultiTexture(new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[2][0],
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)
- }),
+ new GT_MultiTexture(
+ new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[2][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM) }),
new GT_Cover_Arm(100));
GregTech_API.registerCover(
GregtechItemList.Robot_Arm_UV.get(1L),
- new GT_MultiTexture(new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[3][0],
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)
- }),
+ new GT_MultiTexture(
+ new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[3][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM) }),
new GT_Cover_Arm(20));
GregTech_API.registerCover(
GregtechItemList.Robot_Arm_MAX.get(1L),
- new GT_MultiTexture(new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[4][0],
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)
- }),
+ new GT_MultiTexture(
+ new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[4][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM) }),
new GT_Cover_Arm(4));
tLastID = 20;
GregtechItemList.Field_Generator_LuV.set(
- this.addItem(tLastID = 20, "Field Generator (LuV)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
- getTcAspectStack(TC_Aspects.MACHINA, 1L),
- getTcAspectStack(TC_Aspects.TUTAMEN, 1L)
- }));
+ this.addItem(
+ tLastID = 20,
+ "Field Generator (LuV)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
+ getTcAspectStack(TC_Aspects.MACHINA, 1L),
+ getTcAspectStack(TC_Aspects.TUTAMEN, 1L) }));
GregtechItemList.Field_Generator_ZPM.set(
- this.addItem(tLastID = 21, "Field Generator (ZPM)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 4L),
- getTcAspectStack(TC_Aspects.MACHINA, 2L),
- getTcAspectStack(TC_Aspects.TUTAMEN, 2L)
- }));
+ this.addItem(
+ tLastID = 21,
+ "Field Generator (ZPM)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 4L),
+ getTcAspectStack(TC_Aspects.MACHINA, 2L),
+ getTcAspectStack(TC_Aspects.TUTAMEN, 2L) }));
GregtechItemList.Field_Generator_UV.set(
- this.addItem(tLastID = 22, "Field Generator (UV)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.MACHINA, 4L),
- getTcAspectStack(TC_Aspects.TUTAMEN, 4L)
- }));
+ this.addItem(
+ tLastID = 22,
+ "Field Generator (UV)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ getTcAspectStack(TC_Aspects.MACHINA, 4L),
+ getTcAspectStack(TC_Aspects.TUTAMEN, 4L) }));
GregtechItemList.Field_Generator_MAX.set(
- this.addItem(tLastID = 23, "Field Generator (MAX)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 16L),
- getTcAspectStack(TC_Aspects.MACHINA, 8L),
- getTcAspectStack(TC_Aspects.TUTAMEN, 8L)
- }));
+ this.addItem(
+ tLastID = 23,
+ "Field Generator (MAX)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 16L),
+ getTcAspectStack(TC_Aspects.MACHINA, 8L),
+ getTcAspectStack(TC_Aspects.TUTAMEN, 8L) }));
// GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_LuV.get(1L),
// //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
// //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", Character.valueOf('G'),
@@ -458,26 +487,34 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
// OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('W'),
// OrePrefixes.wireGt08.get(Materials.Osmium)});
tLastID = 24;
- GregtechItemList.Emitter_LuV.set(this.addItem(tLastID = 24, "Emitter (LuV)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
- getTcAspectStack(TC_Aspects.MACHINA, 1L),
- getTcAspectStack(TC_Aspects.LUX, 1L)
- }));
- GregtechItemList.Emitter_ZPM.set(this.addItem(tLastID = 25, "Emitter (ZPM)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
- getTcAspectStack(TC_Aspects.MACHINA, 2L),
- getTcAspectStack(TC_Aspects.LUX, 2L)
- }));
- GregtechItemList.Emitter_UV.set(this.addItem(tLastID = 26, "Emitter (UV)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 4L),
- getTcAspectStack(TC_Aspects.MACHINA, 4L),
- getTcAspectStack(TC_Aspects.LUX, 4L)
- }));
- GregtechItemList.Emitter_MAX.set(this.addItem(tLastID = 27, "Emitter (MAX)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.MACHINA, 8L),
- getTcAspectStack(TC_Aspects.LUX, 8L)
- }));
+ GregtechItemList.Emitter_LuV.set(
+ this.addItem(
+ tLastID = 24,
+ "Emitter (LuV)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.LUX, 1L) }));
+ GregtechItemList.Emitter_ZPM.set(
+ this.addItem(
+ tLastID = 25,
+ "Emitter (ZPM)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
+ getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.LUX, 2L) }));
+ GregtechItemList.Emitter_UV.set(
+ this.addItem(
+ tLastID = 26,
+ "Emitter (UV)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 4L),
+ getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.LUX, 4L) }));
+ GregtechItemList.Emitter_MAX.set(
+ this.addItem(
+ tLastID = 27,
+ "Emitter (MAX)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.LUX, 8L) }));
// GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_LuV.get(1L),
// //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
// //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", Character.valueOf('Q'),
@@ -505,26 +542,38 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
// OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('W'),
// OrePrefixes.cableGt01.get(Materials.Aluminium)});
tLastID = 28;
- GregtechItemList.Sensor_LuV.set(this.addItem(tLastID = 28, "Sensor (LuV)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
- getTcAspectStack(TC_Aspects.MACHINA, 1L),
- getTcAspectStack(TC_Aspects.SENSUS, 1L)
- }));
- GregtechItemList.Sensor_ZPM.set(this.addItem(tLastID = 29, "Sensor (ZPM)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
- getTcAspectStack(TC_Aspects.MACHINA, 2L),
- getTcAspectStack(TC_Aspects.SENSUS, 2L)
- }));
- GregtechItemList.Sensor_UV.set(this.addItem(tLastID = 30, "Sensor (UV)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 4L),
- getTcAspectStack(TC_Aspects.MACHINA, 4L),
- getTcAspectStack(TC_Aspects.SENSUS, 4L)
- }));
- GregtechItemList.Sensor_MAX.set(this.addItem(tLastID = 31, "Sensor (MAX)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.MACHINA, 8L),
- getTcAspectStack(TC_Aspects.SENSUS, 8L)
- }));
+ GregtechItemList.Sensor_LuV.set(
+ this.addItem(
+ tLastID = 28,
+ "Sensor (LuV)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ getTcAspectStack(TC_Aspects.MACHINA, 1L),
+ getTcAspectStack(TC_Aspects.SENSUS, 1L) }));
+ GregtechItemList.Sensor_ZPM.set(
+ this.addItem(
+ tLastID = 29,
+ "Sensor (ZPM)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
+ getTcAspectStack(TC_Aspects.MACHINA, 2L),
+ getTcAspectStack(TC_Aspects.SENSUS, 2L) }));
+ GregtechItemList.Sensor_UV.set(
+ this.addItem(
+ tLastID = 30,
+ "Sensor (UV)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 4L),
+ getTcAspectStack(TC_Aspects.MACHINA, 4L),
+ getTcAspectStack(TC_Aspects.SENSUS, 4L) }));
+ GregtechItemList.Sensor_MAX.set(
+ this.addItem(
+ tLastID = 31,
+ "Sensor (MAX)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ getTcAspectStack(TC_Aspects.MACHINA, 8L),
+ getTcAspectStack(TC_Aspects.SENSUS, 8L) }));
// GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_LuV.get(1L),
// //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
// //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", Character.valueOf('Q'),
@@ -562,96 +611,123 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
}
// Extruder Shape
- GregtechItemList.Shape_Extruder_WindmillShaft.set(
- this.addItem(tLastID = 40, "Extruder Shape (Shaft)", "Extruder Shape for making Windmill Shafts"));
+ GregtechItemList.Shape_Extruder_WindmillShaft
+ .set(this.addItem(tLastID = 40, "Extruder Shape (Shaft)", "Extruder Shape for making Windmill Shafts"));
// GTNH Already adds this.
if (!CORE.GTNH) {
- GregtechItemList.Shape_Extruder_SmallGear.set(
- this.addItem(221, "Extruder Shape (Small Gear)", "Extruder Shape for making small gears"));
+ GregtechItemList.Shape_Extruder_SmallGear
+ .set(this.addItem(221, "Extruder Shape (Small Gear)", "Extruder Shape for making small gears"));
}
// Batteries
GregtechItemList.Battery_RE_EV_Sodium.set(
- this.addItem(tLastID = 50, "Quad Cell Sodium Battery", "Reusable", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
- getTcAspectStack(TC_Aspects.METALLUM, 2L),
- getTcAspectStack(TC_Aspects.POTENTIA, 2L)
- }));
+ this.addItem(
+ tLastID = 50,
+ "Quad Cell Sodium Battery",
+ "Reusable",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
+ getTcAspectStack(TC_Aspects.METALLUM, 2L),
+ getTcAspectStack(TC_Aspects.POTENTIA, 2L) }));
this.setElectricStats(32000 + tLastID, 3200000L, GT_Values.V[4], 4L, -3L, true);
GregtechItemList.Battery_RE_EV_Cadmium.set(
- this.addItem(tLastID = 52, "Quad Cell Cadmium Battery", "Reusable", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
- getTcAspectStack(TC_Aspects.METALLUM, 1L),
- getTcAspectStack(TC_Aspects.POTENTIA, 1L)
- }));
+ this.addItem(
+ tLastID = 52,
+ "Quad Cell Cadmium Battery",
+ "Reusable",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ getTcAspectStack(TC_Aspects.METALLUM, 1L),
+ getTcAspectStack(TC_Aspects.POTENTIA, 1L) }));
this.setElectricStats(32000 + tLastID, 4800000L, GT_Values.V[4], 4L, -3L, true);
GregtechItemList.Battery_RE_EV_Lithium.set(
- this.addItem(tLastID = 54, "Quad Cell Lithium Battery", "Reusable", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 3L),
- getTcAspectStack(TC_Aspects.METALLUM, 3L),
- getTcAspectStack(TC_Aspects.POTENTIA, 3L)
- }));
+ this.addItem(
+ tLastID = 54,
+ "Quad Cell Lithium Battery",
+ "Reusable",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 3L),
+ getTcAspectStack(TC_Aspects.METALLUM, 3L),
+ getTcAspectStack(TC_Aspects.POTENTIA, 3L) }));
this.setElectricStats(32000 + tLastID, 6400000L, GT_Values.V[4], 4L, -3L, true);
/**
* Power Gems
*/
- GregtechItemList.Battery_Gem_1.set(this.addItem(tLastID = 66, "Proton Cell", "Reusable", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.METALLUM, 24L),
- getTcAspectStack(TC_Aspects.POTENTIA, 16L)
- }));
+ GregtechItemList.Battery_Gem_1.set(
+ this.addItem(
+ tLastID = 66,
+ "Proton Cell",
+ "Reusable",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ getTcAspectStack(TC_Aspects.METALLUM, 24L),
+ getTcAspectStack(TC_Aspects.POTENTIA, 16L) }));
this.setElectricStats(32000 + tLastID, GT_Values.V[6] * 20 * 300 / 4, GT_Values.V[6], 6L, -3L, false);
- GregtechItemList.Battery_Gem_2.set(this.addItem(tLastID = 68, "Electron Cell", "Reusable", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 16L),
- getTcAspectStack(TC_Aspects.METALLUM, 32L),
- getTcAspectStack(TC_Aspects.POTENTIA, 32L)
- }));
+ GregtechItemList.Battery_Gem_2.set(
+ this.addItem(
+ tLastID = 68,
+ "Electron Cell",
+ "Reusable",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 16L),
+ getTcAspectStack(TC_Aspects.METALLUM, 32L),
+ getTcAspectStack(TC_Aspects.POTENTIA, 32L) }));
this.setElectricStats(32000 + tLastID, GT_Values.V[7] * 20 * 300 / 4, GT_Values.V[7], 7L, -3L, false);
- GregtechItemList.Battery_Gem_3.set(this.addItem(tLastID = 70, "Quark Entanglement", "Reusable", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 32L),
- getTcAspectStack(TC_Aspects.METALLUM, 48L),
- getTcAspectStack(TC_Aspects.POTENTIA, 64L)
- }));
+ GregtechItemList.Battery_Gem_3.set(
+ this.addItem(
+ tLastID = 70,
+ "Quark Entanglement",
+ "Reusable",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 32L),
+ getTcAspectStack(TC_Aspects.METALLUM, 48L),
+ getTcAspectStack(TC_Aspects.POTENTIA, 64L) }));
this.setElectricStats(32000 + tLastID, GT_Values.V[8] * 20 * 300 / 4, GT_Values.V[8], 8L, -3L, false);
// ItemUtils.addItemToOreDictionary(GregtechItemList.Battery_Gem_1.get(1), "batteryFutureBasic");
// ItemUtils.addItemToOreDictionary(GregtechItemList.Battery_Gem_2.get(1), "batteryFutureGood");
// ItemUtils.addItemToOreDictionary(GregtechItemList.Battery_Gem_3.get(1), "batteryFutureAdvanced");
- /*GregtechItemList.Battery_RE_EV_Sodium.set(addItem(tLastID = 50, "Quad Cell Acid Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.METALLUM, 1L), getTcAspectStack(TC_Aspects.POTENTIA, 1L)}));
- setElectricStats(32000 + tLastID, 5000000L, GT_Values.V[2], 4L, -3L, true);
-
- GregtechItemList.Battery_RE_EV_Sodium.set(addItem(tLastID = 50, "Quad Cell Mercury Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.METALLUM, 1L), getTcAspectStack(TC_Aspects.POTENTIA, 1L)}));
- setElectricStats(32000 + tLastID, 5000000L, GT_Values.V[2], 4L, -3L, true);*/
+ /*
+ * GregtechItemList.Battery_RE_EV_Sodium.set(addItem(tLastID = 50, "Quad Cell Acid Battery", "Reusable", new
+ * Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.METALLUM, 1L),
+ * getTcAspectStack(TC_Aspects.POTENTIA, 1L)})); setElectricStats(32000 + tLastID, 5000000L, GT_Values.V[2], 4L,
+ * -3L, true); GregtechItemList.Battery_RE_EV_Sodium.set(addItem(tLastID = 50, "Quad Cell Mercury Battery",
+ * "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.METALLUM,
+ * 1L), getTcAspectStack(TC_Aspects.POTENTIA, 1L)})); setElectricStats(32000 + tLastID, 5000000L,
+ * GT_Values.V[2], 4L, -3L, true);
+ */
// RTG Pellet
GregtechItemList.Pellet_RTG_PU238.set(
- this.addItem(41, StringUtils.superscript("238") + "Pu Pellet", "", new Object[] {
- getTcAspectStack(TC_Aspects.RADIO, 4L),
- getTcAspectStack(TC_Aspects.POTENTIA, 2L),
- getTcAspectStack(TC_Aspects.METALLUM, 2L)
- }));
+ this.addItem(
+ 41,
+ StringUtils.superscript("238") + "Pu Pellet",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.RADIO, 4L),
+ getTcAspectStack(TC_Aspects.POTENTIA, 2L),
+ getTcAspectStack(TC_Aspects.METALLUM, 2L) }));
GregtechItemList.Pellet_RTG_SR90.set(
- this.addItem(42, StringUtils.superscript("90") + "Sr Pellet", "", new Object[] {
- getTcAspectStack(TC_Aspects.RADIO, 4L),
- getTcAspectStack(TC_Aspects.POTENTIA, 2L),
- getTcAspectStack(TC_Aspects.METALLUM, 2L)
- }));
+ this.addItem(
+ 42,
+ StringUtils.superscript("90") + "Sr Pellet",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.RADIO, 4L),
+ getTcAspectStack(TC_Aspects.POTENTIA, 2L),
+ getTcAspectStack(TC_Aspects.METALLUM, 2L) }));
GregtechItemList.Pellet_RTG_PO210.set(
- this.addItem(43, StringUtils.superscript("210") + "Po Pellet", "", new Object[] {
- getTcAspectStack(TC_Aspects.RADIO, 4L),
- getTcAspectStack(TC_Aspects.POTENTIA, 2L),
- getTcAspectStack(TC_Aspects.METALLUM, 2L)
- }));
+ this.addItem(
+ 43,
+ StringUtils.superscript("210") + "Po Pellet",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.RADIO, 4L),
+ getTcAspectStack(TC_Aspects.POTENTIA, 2L),
+ getTcAspectStack(TC_Aspects.METALLUM, 2L) }));
GregtechItemList.Pellet_RTG_AM241.set(
- this.addItem(44, StringUtils.superscript("241") + "Am Pellet", "", new Object[] {
- getTcAspectStack(TC_Aspects.RADIO, 4L),
- getTcAspectStack(TC_Aspects.POTENTIA, 2L),
- getTcAspectStack(TC_Aspects.METALLUM, 2L)
- }));
+ this.addItem(
+ 44,
+ StringUtils.superscript("241") + "Am Pellet",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.RADIO, 4L),
+ getTcAspectStack(TC_Aspects.POTENTIA, 2L),
+ getTcAspectStack(TC_Aspects.METALLUM, 2L) }));
CORE.RA.addFuelForRTG(GregtechItemList.Pellet_RTG_PU238.get(1), MathUtils.roundToClosestInt(87.7f), 64);
CORE.RA.addFuelForRTG(GregtechItemList.Pellet_RTG_SR90.get(1), MathUtils.roundToClosestInt(28.8f), 32);
@@ -661,193 +737,207 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
// Computer Cube
GregtechItemList.Gregtech_Computer_Cube.set(
- this.addItem(tLastID = 55, "Gregtech Computer Cube", "Reusable", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.METALLUM, 8L),
- getTcAspectStack(TC_Aspects.POTENTIA, 8L)
- }));
+ this.addItem(
+ tLastID = 55,
+ "Gregtech Computer Cube",
+ "Reusable",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ getTcAspectStack(TC_Aspects.METALLUM, 8L),
+ getTcAspectStack(TC_Aspects.POTENTIA, 8L) }));
this.setElectricStats(32000 + tLastID, GT_Values.V[6] * 10 * 60 * 20, GT_Values.V[5], 5L, -3L, true);
// FOOOOOOOOOOOOOOD
GregtechItemList.Food_Baked_Raisin_Bread.set(
- this.addItem(tLastID = 60, "Raisin Bread", "Extra Raisins, Just for ImQ009", new Object[] {
- new GT_FoodStat(5, 0.5F, EnumAction.eat, null, false, true, false, new int[0]),
- getTcAspectStack(TC_Aspects.CORPUS, 1L),
- getTcAspectStack(TC_Aspects.FAMES, 1L),
- getTcAspectStack(TC_Aspects.IGNIS, 1L)
- }));
+ this.addItem(
+ tLastID = 60,
+ "Raisin Bread",
+ "Extra Raisins, Just for ImQ009",
+ new Object[] { new GT_FoodStat(5, 0.5F, EnumAction.eat, null, false, true, false, new int[0]),
+ getTcAspectStack(TC_Aspects.CORPUS, 1L), getTcAspectStack(TC_Aspects.FAMES, 1L),
+ getTcAspectStack(TC_Aspects.IGNIS, 1L) }));
if (!CORE.GTNH) {
- GregtechItemList.Fluid_Cell_144L.set(this.addItem(
- tLastID = 61, "144L Invar Fluid Cell", "Holds exactly one dust worth of liquid.", new Object[] {
- new ItemData(
- Materials.Invar,
- (OrePrefixes.plate.mMaterialAmount * 8L) + (4L * OrePrefixes.ring.mMaterialAmount),
- new MaterialStack[0]),
- getTcAspectStack(TC_Aspects.VACUOS, 2L),
- getTcAspectStack(TC_Aspects.AQUA, 1L)
- }));
+ GregtechItemList.Fluid_Cell_144L.set(
+ this.addItem(
+ tLastID = 61,
+ "144L Invar Fluid Cell",
+ "Holds exactly one dust worth of liquid.",
+ new Object[] {
+ new ItemData(
+ Materials.Invar,
+ (OrePrefixes.plate.mMaterialAmount * 8L)
+ + (4L * OrePrefixes.ring.mMaterialAmount),
+ new MaterialStack[0]),
+ getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L) }));
this.setFluidContainerStats(32000 + tLastID, 144L, 64L);
- GregtechItemList.Fluid_Cell_36L.set(this.addItem(
- tLastID = 62,
- "36L Brass Fluid Cell",
- "Holds exactly one small dust worth of liquid.",
- new Object[] {
- new ItemData(
- Materials.Brass,
- (OrePrefixes.plate.mMaterialAmount * 8L) + (4L * OrePrefixes.ring.mMaterialAmount),
- new MaterialStack[0]),
- getTcAspectStack(TC_Aspects.VACUOS, 2L),
- getTcAspectStack(TC_Aspects.AQUA, 1L)
- }));
+ GregtechItemList.Fluid_Cell_36L.set(
+ this.addItem(
+ tLastID = 62,
+ "36L Brass Fluid Cell",
+ "Holds exactly one small dust worth of liquid.",
+ new Object[] {
+ new ItemData(
+ Materials.Brass,
+ (OrePrefixes.plate.mMaterialAmount * 8L)
+ + (4L * OrePrefixes.ring.mMaterialAmount),
+ new MaterialStack[0]),
+ getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L) }));
this.setFluidContainerStats(32000 + tLastID, 36L, 64L);
- GregtechItemList.Fluid_Cell_16L.set(this.addItem(
- tLastID = 63,
- "16L Bronze Fluid Cell",
- "Holds exactly one tiny dust / nugget worth of liquid.",
- new Object[] {
- new ItemData(
- Materials.Bronze,
- (OrePrefixes.plate.mMaterialAmount * 8L) + (4L * OrePrefixes.ring.mMaterialAmount),
- new MaterialStack[0]),
- getTcAspectStack(TC_Aspects.VACUOS, 2L),
- getTcAspectStack(TC_Aspects.AQUA, 1L)
- }));
+ GregtechItemList.Fluid_Cell_16L.set(
+ this.addItem(
+ tLastID = 63,
+ "16L Bronze Fluid Cell",
+ "Holds exactly one tiny dust / nugget worth of liquid.",
+ new Object[] {
+ new ItemData(
+ Materials.Bronze,
+ (OrePrefixes.plate.mMaterialAmount * 8L)
+ + (4L * OrePrefixes.ring.mMaterialAmount),
+ new MaterialStack[0]),
+ getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L) }));
this.setFluidContainerStats(32000 + tLastID, 16L, 64L);
- GregtechItemList.Fluid_Cell_1L.set(this.addItem(
- tLastID = 64,
- "1L Wrought Iron Fluid Cell",
- "Holds exactly one litre worth of liquid.",
- new Object[] {
- new ItemData(
- Materials.WroughtIron,
- (OrePrefixes.plate.mMaterialAmount * 8L) + (4L * OrePrefixes.ring.mMaterialAmount),
- new MaterialStack[0]),
- getTcAspectStack(TC_Aspects.VACUOS, 2L),
- getTcAspectStack(TC_Aspects.AQUA, 1L)
- }));
+ GregtechItemList.Fluid_Cell_1L.set(
+ this.addItem(
+ tLastID = 64,
+ "1L Wrought Iron Fluid Cell",
+ "Holds exactly one litre worth of liquid.",
+ new Object[] {
+ new ItemData(
+ Materials.WroughtIron,
+ (OrePrefixes.plate.mMaterialAmount * 8L)
+ + (4L * OrePrefixes.ring.mMaterialAmount),
+ new MaterialStack[0]),
+ getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L) }));
this.setFluidContainerStats(32000 + tLastID, 1L, 64L);
}
GregtechItemList.Cover_Overflow_ULV.set(
- this.addItem(71, "Overflow Valve (ULV)", "Maximum void amount: 8000", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
- getTcAspectStack(TC_Aspects.MACHINA, 1L),
- getTcAspectStack(TC_Aspects.ITER, 1L),
- getTcAspectStack(TC_Aspects.AQUA, 1L)
- }));
+ this.addItem(
+ 71,
+ "Overflow Valve (ULV)",
+ "Maximum void amount: 8000",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L),
+ getTcAspectStack(TC_Aspects.AQUA, 1L) }));
GregtechItemList.Cover_Overflow_LV.set(
- this.addItem(72, "Overflow Valve (LV)", "Maximum void amount: 64000", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
- getTcAspectStack(TC_Aspects.MACHINA, 1L),
- getTcAspectStack(TC_Aspects.ITER, 1L),
- getTcAspectStack(TC_Aspects.AQUA, 1L)
- }));
+ this.addItem(
+ 72,
+ "Overflow Valve (LV)",
+ "Maximum void amount: 64000",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L),
+ getTcAspectStack(TC_Aspects.AQUA, 1L) }));
GregtechItemList.Cover_Overflow_MV.set(
- this.addItem(73, "Overflow Valve (MV)", "Maximum void amount: 512000", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
- getTcAspectStack(TC_Aspects.MACHINA, 1L),
- getTcAspectStack(TC_Aspects.ITER, 1L),
- getTcAspectStack(TC_Aspects.AQUA, 1L)
- }));
+ this.addItem(
+ 73,
+ "Overflow Valve (MV)",
+ "Maximum void amount: 512000",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L),
+ getTcAspectStack(TC_Aspects.AQUA, 1L) }));
GregtechItemList.Cover_Overflow_HV.set(
- this.addItem(74, "Overflow Valve (HV)", "Maximum void amount: 4096000", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
- getTcAspectStack(TC_Aspects.MACHINA, 1L),
- getTcAspectStack(TC_Aspects.ITER, 1L),
- getTcAspectStack(TC_Aspects.AQUA, 1L)
- }));
+ this.addItem(
+ 74,
+ "Overflow Valve (HV)",
+ "Maximum void amount: 4096000",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L),
+ getTcAspectStack(TC_Aspects.AQUA, 1L) }));
GregtechItemList.Cover_Overflow_EV.set(
- this.addItem(75, "Overflow Valve (EV)", "Maximum void amount: 32768000", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
- getTcAspectStack(TC_Aspects.MACHINA, 1L),
- getTcAspectStack(TC_Aspects.ITER, 1L),
- getTcAspectStack(TC_Aspects.AQUA, 1L)
- }));
+ this.addItem(
+ 75,
+ "Overflow Valve (EV)",
+ "Maximum void amount: 32768000",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L),
+ getTcAspectStack(TC_Aspects.AQUA, 1L) }));
GregtechItemList.Cover_Overflow_IV.set(
- this.addItem(76, "Overflow Valve (IV)", "Maximum void amount: 262144000", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
- getTcAspectStack(TC_Aspects.MACHINA, 1L),
- getTcAspectStack(TC_Aspects.ITER, 1L),
- getTcAspectStack(TC_Aspects.AQUA, 1L)
- }));
+ this.addItem(
+ 76,
+ "Overflow Valve (IV)",
+ "Maximum void amount: 262144000",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L),
+ getTcAspectStack(TC_Aspects.AQUA, 1L) }));
GregTech_API.registerCover(
GregtechItemList.Cover_Overflow_ULV.get(1L),
- new GT_MultiTexture(new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[4][0],
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)
- }),
+ new GT_MultiTexture(
+ new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[4][0],
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve) }),
new GTPP_Cover_Overflow(8));
GregTech_API.registerCover(
GregtechItemList.Cover_Overflow_LV.get(1L),
- new GT_MultiTexture(new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[4][0],
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)
- }),
+ new GT_MultiTexture(
+ new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[4][0],
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve) }),
new GTPP_Cover_Overflow(64));
GregTech_API.registerCover(
GregtechItemList.Cover_Overflow_MV.get(1L),
- new GT_MultiTexture(new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[5][0],
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)
- }),
+ new GT_MultiTexture(
+ new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[5][0],
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve) }),
new GTPP_Cover_Overflow(512));
GregTech_API.registerCover(
GregtechItemList.Cover_Overflow_HV.get(1L),
- new GT_MultiTexture(new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[5][0],
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)
- }),
+ new GT_MultiTexture(
+ new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[5][0],
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve) }),
new GTPP_Cover_Overflow(4096));
GregTech_API.registerCover(
GregtechItemList.Cover_Overflow_EV.get(1L),
- new GT_MultiTexture(new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[8][0],
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)
- }),
+ new GT_MultiTexture(
+ new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[8][0],
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve) }),
new GTPP_Cover_Overflow(32768));
GregTech_API.registerCover(
GregtechItemList.Cover_Overflow_IV.get(1L),
- new GT_MultiTexture(new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[8][0],
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)
- }),
+ new GT_MultiTexture(
+ new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[8][0],
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve) }),
new GTPP_Cover_Overflow(262144));
// Fusion Reactor MK4 Singularity
- GregtechItemList.Compressed_Fusion_Reactor.set(this.addItem(
- 100, "Hypervisor Matrix (Fusion)", "A memory unit containing an RI (Restricted Intelligence)"));
+ GregtechItemList.Compressed_Fusion_Reactor.set(
+ this.addItem(
+ 100,
+ "Hypervisor Matrix (Fusion)",
+ "A memory unit containing an RI (Restricted Intelligence)"));
// NanoTubes
- GregtechItemList.NanoTube_Base_Substrate.set(
- this.addItem(101, "Silicon Base Substrate", "Used in the production of Carbon Nanotubes"));
+ GregtechItemList.NanoTube_Base_Substrate
+ .set(this.addItem(101, "Silicon Base Substrate", "Used in the production of Carbon Nanotubes"));
GregtechItemList.NanoTube_Finished.set(
this.addItem(102, "Carbon Nanotubes", "Multi-walled Zigzag nanotubes, possibly Carbon's final form"));
- GregtechItemList.Carbyne_Tube_Finished.set(this.addItem(
- 103,
- "Linear Acetylenic Carbon (LAC/Carbyne)",
- "LAC chains grown inside Multi-walled Carbon Nanotubes, highly stable"));
- GregtechItemList.Carbyne_Sheet_Finished.set(this.addItem(
- 104,
- "Carbyne Composite Panel",
- "Nanotubes which contain LAC, arranged side by side and compressed further"));
- GregtechItemList.Laser_Lens_Special.set(
- this.addItem(105, "Quantum Anomaly", "Probably should shoot it with lasers"));
+ GregtechItemList.Carbyne_Tube_Finished.set(
+ this.addItem(
+ 103,
+ "Linear Acetylenic Carbon (LAC/Carbyne)",
+ "LAC chains grown inside Multi-walled Carbon Nanotubes, highly stable"));
+ GregtechItemList.Carbyne_Sheet_Finished.set(
+ this.addItem(
+ 104,
+ "Carbyne Composite Panel",
+ "Nanotubes which contain LAC, arranged side by side and compressed further"));
+ GregtechItemList.Laser_Lens_Special
+ .set(this.addItem(105, "Quantum Anomaly", "Probably should shoot it with lasers"));
GregtechItemList.Battery_Casing_Gem_1.set(this.addItem(106, "Containment Unit I", "Used in crafting"));
GregtechItemList.Battery_Casing_Gem_2.set(this.addItem(107, "Containment Unit II", "Used in crafting"));
GregtechItemList.Battery_Casing_Gem_3.set(this.addItem(108, "Advanced Containment Unit", "Used in crafting"));
GregtechItemList.Battery_Casing_Gem_4.set(this.addItem(109, "Exotic Containment Unit", "Used in crafting"));
- GregtechItemList.Battery_Gem_4.set(this.addItem(tLastID = 110, "Graviton Anomaly", "Reusable", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 64L),
- getTcAspectStack(TC_Aspects.METALLUM, 64L),
- getTcAspectStack(TC_Aspects.POTENTIA, 64L)
- }));
+ GregtechItemList.Battery_Gem_4.set(
+ this.addItem(
+ tLastID = 110,
+ "Graviton Anomaly",
+ "Reusable",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 64L),
+ getTcAspectStack(TC_Aspects.METALLUM, 64L),
+ getTcAspectStack(TC_Aspects.POTENTIA, 64L) }));
this.setElectricStats(32000 + tLastID, (64000000000L * 16), GT_Values.V[9], 9L, -3L, false);
/*
@@ -855,8 +945,8 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
*/
GregtechItemList.Bomb_Cast.set(this.addItem(111, "Bomb Cast", "Used in the production of Bombs"));
GregtechItemList.Bomb_Cast_Molten.set(this.addItem(112, "Bomb Cast (Hot)", "Consider cooling this off"));
- GregtechItemList.Bomb_Cast_Set.set(
- this.addItem(113, "Bomb Cast (Set)", "Break it open for the goodies inside!"));
+ GregtechItemList.Bomb_Cast_Set
+ .set(this.addItem(113, "Bomb Cast (Set)", "Break it open for the goodies inside!"));
GregtechItemList.Bomb_Cast_Broken.set(this.addItem(114, "Bomb Cast (Broken)", "This is probably just junk"));
GregtechItemList.Bomb_Cast_Mold.set(this.addItem(115, "Mold (Bomb Cast)", "Used in the production of Bombs"));
@@ -864,255 +954,311 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
* High Tier 'Saws' for the tree Farm
*/
GregtechItemList.Farm_Processor_EV.set(
- this.addItem(tLastID = 120, "Farm Processor [EV]", "Reusable", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.METALLUM, 8L),
- getTcAspectStack(TC_Aspects.POTENTIA, 8L)
- }));
+ this.addItem(
+ tLastID = 120,
+ "Farm Processor [EV]",
+ "Reusable",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ getTcAspectStack(TC_Aspects.METALLUM, 8L),
+ getTcAspectStack(TC_Aspects.POTENTIA, 8L) }));
this.setElectricStats(32000 + tLastID, GT_Values.V[5] * 10 * 60 * 20, GT_Values.V[4], 4L, -3L, false);
GregtechItemList.Farm_Processor_IV.set(
- this.addItem(tLastID = 122, "Farm Processor [IV]", "Reusable", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.METALLUM, 8L),
- getTcAspectStack(TC_Aspects.POTENTIA, 8L)
- }));
+ this.addItem(
+ tLastID = 122,
+ "Farm Processor [IV]",
+ "Reusable",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ getTcAspectStack(TC_Aspects.METALLUM, 8L),
+ getTcAspectStack(TC_Aspects.POTENTIA, 8L) }));
this.setElectricStats(32000 + tLastID, GT_Values.V[6] * 10 * 60 * 20, GT_Values.V[5], 5L, -3L, false);
GregtechItemList.Farm_Processor_LuV.set(
- this.addItem(tLastID = 124, "Farm Processor [LuV]", "Reusable", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.METALLUM, 8L),
- getTcAspectStack(TC_Aspects.POTENTIA, 8L)
- }));
+ this.addItem(
+ tLastID = 124,
+ "Farm Processor [LuV]",
+ "Reusable",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ getTcAspectStack(TC_Aspects.METALLUM, 8L),
+ getTcAspectStack(TC_Aspects.POTENTIA, 8L) }));
this.setElectricStats(32000 + tLastID, GT_Values.V[7] * 10 * 60 * 20, GT_Values.V[6], 6L, -3L, false);
GregtechItemList.Farm_Processor_ZPM.set(
- this.addItem(tLastID = 126, "Farm Processor [ZPM]", "Reusable", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.METALLUM, 8L),
- getTcAspectStack(TC_Aspects.POTENTIA, 8L)
- }));
+ this.addItem(
+ tLastID = 126,
+ "Farm Processor [ZPM]",
+ "Reusable",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ getTcAspectStack(TC_Aspects.METALLUM, 8L),
+ getTcAspectStack(TC_Aspects.POTENTIA, 8L) }));
this.setElectricStats(32000 + tLastID, GT_Values.V[8] * 10 * 60 * 20, GT_Values.V[7], 7L, -3L, false);
GregtechItemList.Farm_Processor_UV.set(
- this.addItem(tLastID = 128, "Farm Processor [UV]", "Reusable", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.METALLUM, 8L),
- getTcAspectStack(TC_Aspects.POTENTIA, 8L)
- }));
+ this.addItem(
+ tLastID = 128,
+ "Farm Processor [UV]",
+ "Reusable",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ getTcAspectStack(TC_Aspects.METALLUM, 8L),
+ getTcAspectStack(TC_Aspects.POTENTIA, 8L) }));
this.setElectricStats(32000 + tLastID, GT_Values.V[9] * 10 * 60 * 20, GT_Values.V[8], 8L, -3L, false);
String aTierName;
int aFirstMachineCasingID = 130;
- GregtechItemList[] mMachineCasingCovers = new GregtechItemList[] {
- GregtechItemList.FakeMachineCasingPlate_ULV,
- GregtechItemList.FakeMachineCasingPlate_LV,
- GregtechItemList.FakeMachineCasingPlate_MV,
- GregtechItemList.FakeMachineCasingPlate_HV,
- GregtechItemList.FakeMachineCasingPlate_EV,
- GregtechItemList.FakeMachineCasingPlate_IV,
- GregtechItemList.FakeMachineCasingPlate_LuV,
- GregtechItemList.FakeMachineCasingPlate_ZPM,
- GregtechItemList.FakeMachineCasingPlate_UV,
- GregtechItemList.FakeMachineCasingPlate_MAX,
- };
+ GregtechItemList[] mMachineCasingCovers = new GregtechItemList[] { GregtechItemList.FakeMachineCasingPlate_ULV,
+ GregtechItemList.FakeMachineCasingPlate_LV, GregtechItemList.FakeMachineCasingPlate_MV,
+ GregtechItemList.FakeMachineCasingPlate_HV, GregtechItemList.FakeMachineCasingPlate_EV,
+ GregtechItemList.FakeMachineCasingPlate_IV, GregtechItemList.FakeMachineCasingPlate_LuV,
+ GregtechItemList.FakeMachineCasingPlate_ZPM, GregtechItemList.FakeMachineCasingPlate_UV,
+ GregtechItemList.FakeMachineCasingPlate_MAX, };
for (int i = 0; i < 10; i++) {
if (i == 10) {
break;
} else {
aTierName = GT_Values.VN[i];
- mMachineCasingCovers[i].set(this.addItem(
- aFirstMachineCasingID++,
- aTierName + " Machine Plate Cover",
- "Deprecated - Shapeless Craft to new version",
- new Object[] {}));
+ mMachineCasingCovers[i].set(
+ this.addItem(
+ aFirstMachineCasingID++,
+ aTierName + " Machine Plate Cover",
+ "Deprecated - Shapeless Craft to new version",
+ new Object[] {}));
GregTech_API.registerCover(
mMachineCasingCovers[i].get(1L),
- new GT_MultiTexture(new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[i][0]}),
+ new GT_MultiTexture(new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[i][0] }),
new GTPP_Cover_ToggleVisual());
}
}
- GregtechItemList.Laser_Lens_WoodsGlass.set(this.addItem(
- 140, "Wood's Glass Lens", "Allows UV & IF to pass through, blocks visible light spectrums"));
+ GregtechItemList.Laser_Lens_WoodsGlass.set(
+ this.addItem(
+ 140,
+ "Wood's Glass Lens",
+ "Allows UV & IF to pass through, blocks visible light spectrums"));
int aStartID = 141;
- GregtechItemList[] aTransParts = new GregtechItemList[] {
- GregtechItemList.TransmissionComponent_ULV,
- GregtechItemList.TransmissionComponent_LV,
- GregtechItemList.TransmissionComponent_MV,
- GregtechItemList.TransmissionComponent_HV,
- GregtechItemList.TransmissionComponent_EV,
- GregtechItemList.TransmissionComponent_IV,
- GregtechItemList.TransmissionComponent_LuV,
- GregtechItemList.TransmissionComponent_ZPM,
- GregtechItemList.TransmissionComponent_UV,
- GregtechItemList.TransmissionComponent_MAX,
- };
+ GregtechItemList[] aTransParts = new GregtechItemList[] { GregtechItemList.TransmissionComponent_ULV,
+ GregtechItemList.TransmissionComponent_LV, GregtechItemList.TransmissionComponent_MV,
+ GregtechItemList.TransmissionComponent_HV, GregtechItemList.TransmissionComponent_EV,
+ GregtechItemList.TransmissionComponent_IV, GregtechItemList.TransmissionComponent_LuV,
+ GregtechItemList.TransmissionComponent_ZPM, GregtechItemList.TransmissionComponent_UV,
+ GregtechItemList.TransmissionComponent_MAX, };
for (int aIndex = 0; aIndex < 10; aIndex++) {
aTransParts[aIndex].set(
- this.addItem(aStartID++, "Transmission Component (" + GT_Values.VN[aIndex] + ")", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, aIndex),
- getTcAspectStack(TC_Aspects.MACHINA, aIndex),
- getTcAspectStack(TC_Aspects.MAGNETO, aIndex)
- }));
+ this.addItem(
+ aStartID++,
+ "Transmission Component (" + GT_Values.VN[aIndex] + ")",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, aIndex),
+ getTcAspectStack(TC_Aspects.MACHINA, aIndex),
+ getTcAspectStack(TC_Aspects.MAGNETO, aIndex) }));
}
// Distillus Chip
- GregtechItemList.Distillus_Upgrade_Chip.set(
- this.addItem(151, "Upgrade Chip", "Used to upgrade Distillus to Tier 2"));
+ GregtechItemList.Distillus_Upgrade_Chip
+ .set(this.addItem(151, "Upgrade Chip", "Used to upgrade Distillus to Tier 2"));
- GregtechItemList.Chip_MultiNerf_NoOutputBonus.set(
- this.addItem(160, "No-Bonus Chip", "You won't like using this"));
- GregtechItemList.Chip_MultiNerf_NoSpeedBonus.set(
- this.addItem(161, "No-Bonus Chip", "You won't like using this"));
+ GregtechItemList.Chip_MultiNerf_NoOutputBonus
+ .set(this.addItem(160, "No-Bonus Chip", "You won't like using this"));
+ GregtechItemList.Chip_MultiNerf_NoSpeedBonus
+ .set(this.addItem(161, "No-Bonus Chip", "You won't like using this"));
GregtechItemList.Chip_MultiNerf_NoEuBonus.set(this.addItem(162, "No-Bonus Chip", "You won't like using this"));
/*
- GregtechItemList.Cover_Overflow_Item_ULV.set(this.addItem(165, "Item Overflow Valve (ULV)", "Maximum void amount: 8000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
- GregtechItemList.Cover_Overflow_Item_LV.set(this.addItem(166, "Item Overflow Valve (LV)", "Maximum void amount: 64000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
- GregtechItemList.Cover_Overflow_Item_MV.set(this.addItem(167, "Item Overflow Valve (MV)", "Maximum void amount: 512000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
- GregtechItemList.Cover_Overflow_Item_HV.set(this.addItem(168, "Item Overflow Valve (HV)", "Maximum void amount: 4096000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
- GregtechItemList.Cover_Overflow_Item_EV.set(this.addItem(169, "Item Overflow Valve (EV)", "Maximum void amount: 32768000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
- GregtechItemList.Cover_Overflow_Item_IV.set(this.addItem(170, "Item Overflow Valve (IV)", "Maximum void amount: 262144000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
-
- GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_ULV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow_Item(8));
- GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_LV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow_Item(64));
- GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_MV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow_Item(512));
- GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_HV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow_Item(4096));
- GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_EV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow_Item(32768));
- GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_IV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow_Item(262144));
- */
+ * GregtechItemList.Cover_Overflow_Item_ULV.set(this.addItem(165, "Item Overflow Valve (ULV)",
+ * "Maximum void amount: 8000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ * getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L),
+ * getTcAspectStack(TC_Aspects.AQUA, 1L)})); GregtechItemList.Cover_Overflow_Item_LV.set(this.addItem(166,
+ * "Item Overflow Valve (LV)", "Maximum void amount: 64000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM,
+ * 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L),
+ * getTcAspectStack(TC_Aspects.AQUA, 1L)})); GregtechItemList.Cover_Overflow_Item_MV.set(this.addItem(167,
+ * "Item Overflow Valve (MV)", "Maximum void amount: 512000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM,
+ * 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L),
+ * getTcAspectStack(TC_Aspects.AQUA, 1L)})); GregtechItemList.Cover_Overflow_Item_HV.set(this.addItem(168,
+ * "Item Overflow Valve (HV)", "Maximum void amount: 4096000", new
+ * Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L),
+ * getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
+ * GregtechItemList.Cover_Overflow_Item_EV.set(this.addItem(169, "Item Overflow Valve (EV)",
+ * "Maximum void amount: 32768000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ * getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L),
+ * getTcAspectStack(TC_Aspects.AQUA, 1L)})); GregtechItemList.Cover_Overflow_Item_IV.set(this.addItem(170,
+ * "Item Overflow Valve (IV)", "Maximum void amount: 262144000", new
+ * Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L),
+ * getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
+ * GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_ULV.get(1L), new GT_MultiTexture(new
+ * ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new
+ * GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow_Item(8));
+ * GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_LV.get(1L), new GT_MultiTexture(new
+ * ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new
+ * GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow_Item(64));
+ * GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_MV.get(1L), new GT_MultiTexture(new
+ * ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new
+ * GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow_Item(512));
+ * GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_HV.get(1L), new GT_MultiTexture(new
+ * ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new
+ * GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow_Item(4096));
+ * GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_EV.get(1L), new GT_MultiTexture(new
+ * ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new
+ * GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow_Item(32768));
+ * GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_IV.get(1L), new GT_MultiTexture(new
+ * ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new
+ * GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow_Item(262144));
+ */
}
private boolean registerComponents_ULV() {
GregtechItemList.Electric_Pump_ULV.set(
- this.addItem(32, "Electric Pump (ULV)", "160 L/sec (as Cover)", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
- getTcAspectStack(TC_Aspects.MACHINA, 1L),
- getTcAspectStack(TC_Aspects.ITER, 1L),
- getTcAspectStack(TC_Aspects.AQUA, 1L)
- }));
- GregtechItemList.Electric_Motor_ULV.set(this.addItem(33, "Electric Motor (ULV)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
- getTcAspectStack(TC_Aspects.MACHINA, 1L),
- getTcAspectStack(TC_Aspects.MOTUS, 1L)
- }));
+ this.addItem(
+ 32,
+ "Electric Pump (ULV)",
+ "160 L/sec (as Cover)",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L),
+ getTcAspectStack(TC_Aspects.AQUA, 1L) }));
+ GregtechItemList.Electric_Motor_ULV.set(
+ this.addItem(
+ 33,
+ "Electric Motor (ULV)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.MOTUS, 1L) }));
GregtechItemList.Conveyor_Module_ULV.set(
- this.addItem(34, "Conveyor Module (ULV)", "1 Stack every 80 secs (as Cover)", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
- getTcAspectStack(TC_Aspects.MACHINA, 1L),
- getTcAspectStack(TC_Aspects.ITER, 1L)
- }));
- GregtechItemList.Electric_Piston_ULV.set(this.addItem(35, "Electric Piston (ULV)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
- getTcAspectStack(TC_Aspects.MACHINA, 2L),
- getTcAspectStack(TC_Aspects.MOTUS, 1L)
- }));
+ this.addItem(
+ 34,
+ "Conveyor Module (ULV)",
+ "1 Stack every 80 secs (as Cover)",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L) }));
+ GregtechItemList.Electric_Piston_ULV.set(
+ this.addItem(
+ 35,
+ "Electric Piston (ULV)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.MOTUS, 1L) }));
GregtechItemList.Robot_Arm_ULV.set(
- this.addItem(36, "Robot Arm (ULV)", "Inserts into specific Slots (as Cover)", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
- getTcAspectStack(TC_Aspects.MACHINA, 2L),
- getTcAspectStack(TC_Aspects.MOTUS, 1L),
- Utils.getTcAspectStack("COGNITIO", 1L)
- }));
- GregtechItemList.Field_Generator_ULV.set(this.addItem(37, "Field Generator (ULV)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
- getTcAspectStack(TC_Aspects.MACHINA, 1L),
- getTcAspectStack(TC_Aspects.TUTAMEN, 1L)
- }));
- GregtechItemList.Emitter_ULV.set(this.addItem(38, "Emitter (ULV)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
- getTcAspectStack(TC_Aspects.MACHINA, 1L),
- getTcAspectStack(TC_Aspects.LUX, 1L)
- }));
- GregtechItemList.Sensor_ULV.set(this.addItem(39, "Sensor (ULV)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
- getTcAspectStack(TC_Aspects.MACHINA, 1L),
- getTcAspectStack(TC_Aspects.SENSUS, 1L)
- }));
+ this.addItem(
+ 36,
+ "Robot Arm (ULV)",
+ "Inserts into specific Slots (as Cover)",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.MOTUS, 1L),
+ Utils.getTcAspectStack("COGNITIO", 1L) }));
+ GregtechItemList.Field_Generator_ULV.set(
+ this.addItem(
+ 37,
+ "Field Generator (ULV)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
+ getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.TUTAMEN, 1L) }));
+ GregtechItemList.Emitter_ULV.set(
+ this.addItem(
+ 38,
+ "Emitter (ULV)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.LUX, 1L) }));
+ GregtechItemList.Sensor_ULV.set(
+ this.addItem(
+ 39,
+ "Sensor (ULV)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.SENSUS, 1L) }));
GregTech_API.registerCover(
GregtechItemList.Electric_Pump_ULV.get(1L),
- new GT_MultiTexture(new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)
- }),
+ new GT_MultiTexture(
+ new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[5][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP) }),
new GT_Cover_Pump(8));
GregTech_API.registerCover(
GregtechItemList.Conveyor_Module_ULV.get(1L),
- new GT_MultiTexture(new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[1][0],
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)
- }),
+ new GT_MultiTexture(
+ new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[1][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR) }),
new GT_Cover_Conveyor(1600));
GregTech_API.registerCover(
GregtechItemList.Robot_Arm_ULV.get(1L),
- new GT_MultiTexture(new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)
- }),
+ new GT_MultiTexture(
+ new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[1][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM) }),
new GT_Cover_Arm(1600));
return true;
}
private boolean registerComponents_MAX() {
- GregtechItemList.Electric_Pump_MAX.set(this.addItem(3, "Electric Pump (MAX)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.MACHINA, 8L),
- getTcAspectStack(TC_Aspects.ITER, 8L),
- getTcAspectStack(TC_Aspects.AQUA, 8L)
- }));
- GregtechItemList.Electric_Motor_MAX.set(this.addItem(7, "Electric Motor (MAX)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.MACHINA, 8L),
- getTcAspectStack(TC_Aspects.MOTUS, 8L)
- }));
- GregtechItemList.Conveyor_Module_MAX.set(this.addItem(11, "Conveyor Module (MAX)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.MACHINA, 8L),
- getTcAspectStack(TC_Aspects.ITER, 8L)
- }));
- GregtechItemList.Electric_Piston_MAX.set(this.addItem(15, "Electric Piston (MAX)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.MACHINA, 16L),
- getTcAspectStack(TC_Aspects.MOTUS, 8L)
- }));
- GregtechItemList.Robot_Arm_MAX.set(this.addItem(19, "Robot Arm (MAX)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.MACHINA, 16L),
- getTcAspectStack(TC_Aspects.MOTUS, 8L),
- getTcAspectStack("COGNITIO", 8L)
- }));
- GregtechItemList.Field_Generator_MAX.set(this.addItem(23, "Field Generator (MAX)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 16L),
- getTcAspectStack(TC_Aspects.MACHINA, 8L),
- getTcAspectStack(TC_Aspects.TUTAMEN, 8L)
- }));
- GregtechItemList.Emitter_MAX.set(this.addItem(27, "Emitter (MAX)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.MACHINA, 8L),
- getTcAspectStack(TC_Aspects.LUX, 8L)
- }));
- GregtechItemList.Sensor_MAX.set(this.addItem(31, "Sensor (MAX)", "", new Object[] {
- getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.MACHINA, 8L),
- getTcAspectStack(TC_Aspects.SENSUS, 8L)
- }));
+ GregtechItemList.Electric_Pump_MAX.set(
+ this.addItem(
+ 3,
+ "Electric Pump (MAX)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L),
+ getTcAspectStack(TC_Aspects.AQUA, 8L) }));
+ GregtechItemList.Electric_Motor_MAX.set(
+ this.addItem(
+ 7,
+ "Electric Motor (MAX)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.MOTUS, 8L) }));
+ GregtechItemList.Conveyor_Module_MAX.set(
+ this.addItem(
+ 11,
+ "Conveyor Module (MAX)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L) }));
+ GregtechItemList.Electric_Piston_MAX.set(
+ this.addItem(
+ 15,
+ "Electric Piston (MAX)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L) }));
+ GregtechItemList.Robot_Arm_MAX.set(
+ this.addItem(
+ 19,
+ "Robot Arm (MAX)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L),
+ getTcAspectStack("COGNITIO", 8L) }));
+ GregtechItemList.Field_Generator_MAX.set(
+ this.addItem(
+ 23,
+ "Field Generator (MAX)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 16L),
+ getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.TUTAMEN, 8L) }));
+ GregtechItemList.Emitter_MAX.set(
+ this.addItem(
+ 27,
+ "Emitter (MAX)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.LUX, 8L) }));
+ GregtechItemList.Sensor_MAX.set(
+ this.addItem(
+ 31,
+ "Sensor (MAX)",
+ "",
+ new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.SENSUS, 8L) }));
GregTech_API.registerCover(
GregtechItemList.Electric_Pump_MAX.get(1L),
- new GT_MultiTexture(new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)
- }),
+ new GT_MultiTexture(
+ new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[8][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP) }),
new GT_Cover_Pump(524288));
GregTech_API.registerCover(
GregtechItemList.Conveyor_Module_MAX.get(1L),
- new GT_MultiTexture(new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[4][0],
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)
- }),
+ new GT_MultiTexture(
+ new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[4][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR) }),
new GT_Cover_Conveyor(4));
GregTech_API.registerCover(
GregtechItemList.Robot_Arm_MAX.get(1L),
- new GT_MultiTexture(new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)
- }),
+ new GT_MultiTexture(
+ new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[4][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM) }),
new GT_Cover_Arm(4));
return true;
@@ -1122,69 +1268,93 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
// Enable Old Circuits
Logger.INFO("[Old Feature - Circuits] Enabling Pre-5.09.28 Circuits and Data Storage.");
- GregtechItemList.Old_Circuit_Primitive.set(this.addItem(
- 200, "NAND Chip", "A very simple Circuit", new Object[] {OrePrefixes.circuit.get(Materials.Primitive)
- }));
+ GregtechItemList.Old_Circuit_Primitive.set(
+ this.addItem(
+ 200,
+ "NAND Chip",
+ "A very simple Circuit",
+ new Object[] { OrePrefixes.circuit.get(Materials.Primitive) }));
GregtechItemList.Old_Circuit_Basic.set(
- this.addItem(201, "Basic Electronic Circuit", "A basic Circuit", new Object[] {
- OrePrefixes.circuit.get(Materials.Basic)
- }));
- GregtechItemList.Old_Circuit_Good.set(this.addItem(
- 202, "Good Electronic Circuit", "A good Circuit", new Object[] {OrePrefixes.circuit.get(Materials.Good)
- }));
+ this.addItem(
+ 201,
+ "Basic Electronic Circuit",
+ "A basic Circuit",
+ new Object[] { OrePrefixes.circuit.get(Materials.Basic) }));
+ GregtechItemList.Old_Circuit_Good.set(
+ this.addItem(
+ 202,
+ "Good Electronic Circuit",
+ "A good Circuit",
+ new Object[] { OrePrefixes.circuit.get(Materials.Good) }));
GregtechItemList.Old_Circuit_Advanced.set(
- this.addItem(203, "Advanced Circuit", "An advanced Circuit", new Object[] {
- OrePrefixes.circuit.get(Materials.Advanced)
- }));
+ this.addItem(
+ 203,
+ "Advanced Circuit",
+ "An advanced Circuit",
+ new Object[] { OrePrefixes.circuit.get(Materials.Advanced) }));
GregtechItemList.Old_Circuit_Data.set(
- this.addItem(204, "Data Storage Circuit", "A Data Storage Chip", new Object[] {
- OrePrefixes.circuit.get(Materials.Data)
- }));
- GregtechItemList.Old_Circuit_Elite.set(this.addItem(
- 205, "Data Control Circuit", "A Processor", new Object[] {OrePrefixes.circuit.get(Materials.Elite)}));
+ this.addItem(
+ 204,
+ "Data Storage Circuit",
+ "A Data Storage Chip",
+ new Object[] { OrePrefixes.circuit.get(Materials.Data) }));
+ GregtechItemList.Old_Circuit_Elite.set(
+ this.addItem(
+ 205,
+ "Data Control Circuit",
+ "A Processor",
+ new Object[] { OrePrefixes.circuit.get(Materials.Elite) }));
GregtechItemList.Old_Circuit_Master.set(
- this.addItem(206, "Energy Flow Circuit", "A High Voltage Processor", new Object[] {
- OrePrefixes.circuit.get(Materials.Master)
- }));
+ this.addItem(
+ 206,
+ "Energy Flow Circuit",
+ "A High Voltage Processor",
+ new Object[] { OrePrefixes.circuit.get(Materials.Master) }));
GregtechItemList.Old_Tool_DataOrb.set(
- this.addItem(207, "Data Orb [GT++]", "A High Capacity Data Storage", new Object[] {
- OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION, new Behaviour_DataOrb()
- }));
+ this.addItem(
+ 207,
+ "Data Orb [GT++]",
+ "A High Capacity Data Storage",
+ new Object[] { OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION,
+ new Behaviour_DataOrb() }));
GregtechItemList.Old_Circuit_Ultimate.set(GregtechItemList.Old_Tool_DataOrb.get(1L));
GT_ModHandler.addShapelessCraftingRecipe(
GregtechItemList.Old_Tool_DataOrb.get(1L),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
- new Object[] {GregtechItemList.Old_Tool_DataOrb.get(1L)});
+ new Object[] { GregtechItemList.Old_Tool_DataOrb.get(1L) });
GregtechItemList.Old_Tool_DataStick.set(
- this.addItem(208, "Data Stick [GT++]", "A Low Capacity Data Storage", new Object[] {
- OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION, new Behaviour_DataStick()
- }));
+ this.addItem(
+ 208,
+ "Data Stick [GT++]",
+ "A Low Capacity Data Storage",
+ new Object[] { OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION,
+ new Behaviour_DataStick() }));
GT_ModHandler.addShapelessCraftingRecipe(
GregtechItemList.Old_Tool_DataStick.get(1L),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
- new Object[] {GregtechItemList.Old_Tool_DataStick.get(1L)});
+ new Object[] { GregtechItemList.Old_Tool_DataStick.get(1L) });
GregtechItemList.Old_Circuit_Board_Basic.set(this.addItem(210, "Basic Circuit Board", "A basic Board"));
- GregtechItemList.Old_Circuit_Board_Advanced.set(
- this.addItem(211, "Advanced Circuit Board", "An advanced Board"));
+ GregtechItemList.Old_Circuit_Board_Advanced
+ .set(this.addItem(211, "Advanced Circuit Board", "An advanced Board"));
GregtechItemList.Old_Circuit_Board_Elite.set(this.addItem(212, "Processor Board", "A Processor Board"));
- GregtechItemList.Old_Circuit_Parts_Crystal_Chip_Elite.set(
- this.addItem(213, "Engraved Crystal Chip", "Needed for Circuits"));
- GregtechItemList.Old_Circuit_Parts_Crystal_Chip_Master.set(
- this.addItem(214, "Engraved Lapotron Chip", "Needed for Circuits"));
- GregtechItemList.Old_Circuit_Parts_Advanced.set(
- this.addItem(215, "Advanced Circuit Parts", "Advanced Circuit Parts"));
- GregtechItemList.Old_Circuit_Parts_Wiring_Basic.set(
- this.addItem(216, "Etched Medium Voltage Wiring", "Part of Circuit Boards"));
- GregtechItemList.Old_Circuit_Parts_Wiring_Advanced.set(
- this.addItem(217, "Etched High Voltage Wiring", "Part of Circuit Boards"));
- GregtechItemList.Old_Circuit_Parts_Wiring_Elite.set(
- this.addItem(218, "Etched Extreme Voltage Wiring", "Part of Circuit Boards"));
+ GregtechItemList.Old_Circuit_Parts_Crystal_Chip_Elite
+ .set(this.addItem(213, "Engraved Crystal Chip", "Needed for Circuits"));
+ GregtechItemList.Old_Circuit_Parts_Crystal_Chip_Master
+ .set(this.addItem(214, "Engraved Lapotron Chip", "Needed for Circuits"));
+ GregtechItemList.Old_Circuit_Parts_Advanced
+ .set(this.addItem(215, "Advanced Circuit Parts", "Advanced Circuit Parts"));
+ GregtechItemList.Old_Circuit_Parts_Wiring_Basic
+ .set(this.addItem(216, "Etched Medium Voltage Wiring", "Part of Circuit Boards"));
+ GregtechItemList.Old_Circuit_Parts_Wiring_Advanced
+ .set(this.addItem(217, "Etched High Voltage Wiring", "Part of Circuit Boards"));
+ GregtechItemList.Old_Circuit_Parts_Wiring_Elite
+ .set(this.addItem(218, "Etched Extreme Voltage Wiring", "Part of Circuit Boards"));
GregtechItemList.Old_Empty_Board_Basic.set(this.addItem(219, "Empty Circuit Board", "A Board Part"));
- GregtechItemList.Old_Empty_Board_Elite.set(
- this.addItem(220, "Empty Processor Board", "A Processor Board Part"));
+ GregtechItemList.Old_Empty_Board_Elite
+ .set(this.addItem(220, "Empty Processor Board", "A Processor Board Part"));
return true;
}
@@ -1192,39 +1362,45 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
public boolean registerCustomCircuits() {
if (CORE.ConfigSwitches.enableCustomCircuits) {
GregtechItemList.Circuit_IV.set(
- this.addItem(704, "Symbiotic Circuit (IV)", "A Symbiotic Data Processor", new Object[] {
- GregtechOrePrefixes.circuit.get(GT_Materials.Symbiotic)
- }));
+ this.addItem(
+ 704,
+ "Symbiotic Circuit (IV)",
+ "A Symbiotic Data Processor",
+ new Object[] { GregtechOrePrefixes.circuit.get(GT_Materials.Symbiotic) }));
GregtechItemList.Circuit_LuV.set(
- this.addItem(705, "Neutronic Circuit (LuV)", "A Neutron Particle Processor", new Object[] {
- GregtechOrePrefixes.circuit.get(GT_Materials.Neutronic)
- }));
+ this.addItem(
+ 705,
+ "Neutronic Circuit (LuV)",
+ "A Neutron Particle Processor",
+ new Object[] { GregtechOrePrefixes.circuit.get(GT_Materials.Neutronic) }));
GregtechItemList.Circuit_ZPM.set(
- this.addItem(706, "Quantum Circuit (ZPM)", "A Singlularity Processor", new Object[] {
- GregtechOrePrefixes.circuit.get(GT_Materials.Quantum)
- }));
- GregtechItemList.Circuit_Board_IV.set(
- this.addItem(710, "IV Circuit Board", "An IV Voltage Rated Circuit Board"));
- GregtechItemList.Circuit_Board_LuV.set(
- this.addItem(711, "LuV Circuit Board", "An LuV Voltage Rated Circuit Board"));
- GregtechItemList.Circuit_Board_ZPM.set(
- this.addItem(712, "ZPM Processor Board", "A ZPM Voltage Rated Processor Board"));
- GregtechItemList.Circuit_Parts_Crystal_Chip_IV.set(
- this.addItem(713, "(IV) Energized Crystal Chip", "Needed for Circuits"));
- GregtechItemList.Circuit_Parts_Crystal_Chip_LuV.set(
- this.addItem(714, "(LuV) Neutron based Microchip", "Needed for Circuits"));
- GregtechItemList.Circuit_Parts_Crystal_Chip_ZPM.set(
- this.addItem(715, "(ZPM) Quantum Chip", "Needed for Circuits"));
+ this.addItem(
+ 706,
+ "Quantum Circuit (ZPM)",
+ "A Singlularity Processor",
+ new Object[] { GregtechOrePrefixes.circuit.get(GT_Materials.Quantum) }));
+ GregtechItemList.Circuit_Board_IV
+ .set(this.addItem(710, "IV Circuit Board", "An IV Voltage Rated Circuit Board"));
+ GregtechItemList.Circuit_Board_LuV
+ .set(this.addItem(711, "LuV Circuit Board", "An LuV Voltage Rated Circuit Board"));
+ GregtechItemList.Circuit_Board_ZPM
+ .set(this.addItem(712, "ZPM Processor Board", "A ZPM Voltage Rated Processor Board"));
+ GregtechItemList.Circuit_Parts_Crystal_Chip_IV
+ .set(this.addItem(713, "(IV) Energized Crystal Chip", "Needed for Circuits"));
+ GregtechItemList.Circuit_Parts_Crystal_Chip_LuV
+ .set(this.addItem(714, "(LuV) Neutron based Microchip", "Needed for Circuits"));
+ GregtechItemList.Circuit_Parts_Crystal_Chip_ZPM
+ .set(this.addItem(715, "(ZPM) Quantum Chip", "Needed for Circuits"));
GregtechItemList.Circuit_Parts_IV.set(this.addItem(716, "(IV) Energized Circuit Parts", "Circuit Parts"));
- GregtechItemList.Circuit_Parts_LuV.set(
- this.addItem(717, "(LuV) Neutron-based Circuit Parts", "Circuit Parts"));
+ GregtechItemList.Circuit_Parts_LuV
+ .set(this.addItem(717, "(LuV) Neutron-based Circuit Parts", "Circuit Parts"));
GregtechItemList.Circuit_Parts_ZPM.set(this.addItem(718, "(ZPM) Quantum Circuit Parts", "Circuit Parts"));
- GregtechItemList.Circuit_Parts_Wiring_IV.set(
- this.addItem(719, "Etched IV Voltage Wiring", "Part of Circuit Boards"));
- GregtechItemList.Circuit_Parts_Wiring_LuV.set(
- this.addItem(720, "Etched LuV Voltage Wiring", "Part of Circuit Boards"));
- GregtechItemList.Circuit_Parts_Wiring_ZPM.set(
- this.addItem(721, "Etched ZPM Voltage Wiring", "Part of Circuit Boards"));
+ GregtechItemList.Circuit_Parts_Wiring_IV
+ .set(this.addItem(719, "Etched IV Voltage Wiring", "Part of Circuit Boards"));
+ GregtechItemList.Circuit_Parts_Wiring_LuV
+ .set(this.addItem(720, "Etched LuV Voltage Wiring", "Part of Circuit Boards"));
+ GregtechItemList.Circuit_Parts_Wiring_ZPM
+ .set(this.addItem(721, "Etched ZPM Voltage Wiring", "Part of Circuit Boards"));
ItemUtils.addItemToOreDictionary(GregtechItemList.Circuit_IV.get(1), "circuitSuperconductor");
ItemUtils.addItemToOreDictionary(GregtechItemList.Circuit_LuV.get(1), "circuitInfinite");
return true;
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java
index 0e937a9485..e59c71c5bd 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java
@@ -1,5 +1,7 @@
package gtPlusPlus.xmod.gregtech.common.items;
+import java.lang.reflect.Field;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.TC_Aspects;
import gregtech.api.enums.ToolDictNames;
@@ -13,7 +15,6 @@ import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_Choocher;
import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_ElectricButcherKnife;
import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_ElectricLighter;
import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_ElectricSnips;
-import java.lang.reflect.Field;
public class MetaGeneratedGregtechTools extends GT_MetaGenerated_Tool {
@@ -41,14 +42,11 @@ public class MetaGeneratedGregtechTools extends GT_MetaGenerated_Tool {
"Skookum Choocher",
"Can Really Chooch. Does a Skookum job at Hammering and Wrenching stuff.",
new TOOL_Gregtech_Choocher(),
- new Object[] {
- GregtechToolDictNames.craftingToolSkookumChoocher,
- ToolDictNames.craftingToolHardHammer,
- ToolDictNames.craftingToolWrench,
- new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)
- }),
+ new Object[] { GregtechToolDictNames.craftingToolSkookumChoocher,
+ ToolDictNames.craftingToolHardHammer, ToolDictNames.craftingToolWrench,
+ new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L) }),
GregTech_API.sWrenchList);
// Electric File
@@ -57,13 +55,10 @@ public class MetaGeneratedGregtechTools extends GT_MetaGenerated_Tool {
"Angle Grinder",
"Hand-held electric filing device",
new TOOL_Gregtech_AngleGrinder(),
- new Object[] {
- GregtechToolDictNames.craftingToolAngleGrinder,
- ToolDictNames.craftingToolFile,
- new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)
- });
+ new Object[] { GregtechToolDictNames.craftingToolAngleGrinder, ToolDictNames.craftingToolFile,
+ new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L) });
GT_HashSet<GT_ItemStack> aWireCutterList = new GT_HashSet<GT_ItemStack>();
// Does not exist prior to 5.09.32, use an empty field if we can't find the existing one.
@@ -89,23 +84,23 @@ public class MetaGeneratedGregtechTools extends GT_MetaGenerated_Tool {
"Automatic Snips",
"Hand-held electric wire cutter",
new TOOL_Gregtech_ElectricSnips(),
- new Object[] {
- GregtechToolDictNames.craftingToolElectricSnips,
- ToolDictNames.craftingToolWireCutter,
- new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 4L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 4L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 4L)
- }),
+ new Object[] { GregtechToolDictNames.craftingToolElectricSnips,
+ ToolDictNames.craftingToolWireCutter,
+ new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 4L),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 4L),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 4L) }),
aWireCutterList);
// Electric Lighter
this.addTool(
- ELECTRIC_LIGHTER, "Pyromatic 9k", "Electric Fire!", new TOOL_Gregtech_ElectricLighter(), new Object[] {
- GregtechToolDictNames.craftingToolElectricLighter,
- new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)
- });
+ ELECTRIC_LIGHTER,
+ "Pyromatic 9k",
+ "Electric Fire!",
+ new TOOL_Gregtech_ElectricLighter(),
+ new Object[] { GregtechToolDictNames.craftingToolElectricLighter,
+ new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L) });
// Electric Butcher Knife
this.addTool(
@@ -113,12 +108,9 @@ public class MetaGeneratedGregtechTools extends GT_MetaGenerated_Tool {
"Meat-o-matic",
"Electric butcher knife",
new TOOL_Gregtech_ElectricButcherKnife(),
- new Object[] {
- GregtechToolDictNames.craftingToolElectricButcherKnife,
- ToolDictNames.craftingToolKnife,
- new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)
- });
+ new Object[] { GregtechToolDictNames.craftingToolElectricButcherKnife, ToolDictNames.craftingToolKnife,
+ new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1L),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L) });
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java
index ef72c5edd4..9d27818686 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java
@@ -1,5 +1,11 @@
package gtPlusPlus.xmod.gregtech.common.items.behaviours;
+import java.util.List;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
import gregtech.api.items.GT_MetaBase_Item;
import gregtech.api.util.GT_LanguageManager;
import gregtech.common.items.behaviors.Behaviour_None;
@@ -7,39 +13,27 @@ import gregtech.common.items.behaviors.Behaviour_Wrench;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.minecraft.NBTUtils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
public class Behaviour_Choocher extends Behaviour_None {
+
private boolean isWrench = true;
private final Behaviour_Wrench wrench = new Behaviour_Wrench(150);
private final Behaviour_Prospecting_Ex prospecting = new Behaviour_Prospecting_Ex(10, 1250);
- private final String mTooltip1 =
- GT_LanguageManager.addStringLocalization("gt.behaviour.choochering1", "Current tool mode: ");
- private final String mTooltip2 = GT_LanguageManager.addStringLocalization(
- "gt.behaviour.choochering2", "Change tool mode using Shift+Rightclick.");
- private final String mTooltipH = GT_LanguageManager.addStringLocalization(
- "gt.behaviour.prospectingEx", "Usable for Prospecting large areas.");
- private final String mTooltipW =
- GT_LanguageManager.addStringLocalization("gt.behaviour.wrench", "Rotates Blocks on Rightclick.");
+ private final String mTooltip1 = GT_LanguageManager
+ .addStringLocalization("gt.behaviour.choochering1", "Current tool mode: ");
+ private final String mTooltip2 = GT_LanguageManager
+ .addStringLocalization("gt.behaviour.choochering2", "Change tool mode using Shift+Rightclick.");
+ private final String mTooltipH = GT_LanguageManager
+ .addStringLocalization("gt.behaviour.prospectingEx", "Usable for Prospecting large areas.");
+ private final String mTooltipW = GT_LanguageManager
+ .addStringLocalization("gt.behaviour.wrench", "Rotates Blocks on Rightclick.");
public Behaviour_Choocher() {}
@Override
- public boolean onItemUseFirst(
- final GT_MetaBase_Item aItem,
- final ItemStack aStack,
- final EntityPlayer aPlayer,
- final World aWorld,
- final int aX,
- final int aY,
- final int aZ,
- final int aSide,
- final float hitX,
- final float hitY,
- final float hitZ) {
+ public boolean onItemUseFirst(final GT_MetaBase_Item aItem, final ItemStack aStack, final EntityPlayer aPlayer,
+ final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX,
+ final float hitY, final float hitZ) {
if (aWorld.isRemote) {
return false;
}
@@ -59,18 +53,18 @@ public class Behaviour_Choocher extends Behaviour_None {
return true;
} else {
if (inWrenchMode) {
- return this.wrench.onItemUseFirst(
- aItem, aStack, aPlayer, aWorld, aSide, aSide, aSide, aSide, hitZ, hitZ, hitZ);
+ return this.wrench
+ .onItemUseFirst(aItem, aStack, aPlayer, aWorld, aSide, aSide, aSide, aSide, hitZ, hitZ, hitZ);
} else {
- return this.prospecting.onItemUseFirst(
- aItem, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ);
+ return this.prospecting
+ .onItemUseFirst(aItem, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ);
}
}
}
@Override
- public List<String> getAdditionalToolTips(
- final GT_MetaBase_Item aItem, final List<String> aList, final ItemStack aStack) {
+ public List<String> getAdditionalToolTips(final GT_MetaBase_Item aItem, final List<String> aList,
+ final ItemStack aStack) {
boolean inWrenchMode;
if (NBTUtils.hasKey(aStack, "aMode")) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java
index 922c09c1eb..ce393beccb 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java
@@ -1,5 +1,16 @@
package gtPlusPlus.xmod.gregtech.common.items.behaviours;
+import java.util.List;
+
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.monster.EntityCreeper;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.ForgeDirection;
+
import codechicken.lib.math.MathHelper;
import gregtech.api.GregTech_API;
import gregtech.api.items.GT_MetaBase_Item;
@@ -15,24 +26,15 @@ import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.common.helpers.ChargingHelper;
import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools;
import ic2.api.item.IElectricItemManager;
-import java.util.List;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.monster.EntityCreeper;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
public class Behaviour_Electric_Lighter extends Behaviour_None {
- private final String mTooltip =
- GT_LanguageManager.addStringLocalization("gt.behaviour.lighter.tooltip", "Can light things on Fire");
- private final String mTooltipUses =
- GT_LanguageManager.addStringLocalization("gt.behaviour.lighter.uses", "Remaining Uses:");
- private final String mTooltipUnstackable =
- GT_LanguageManager.addStringLocalization("gt.behaviour.unstackable", "Not usable when stacked!");
+ private final String mTooltip = GT_LanguageManager
+ .addStringLocalization("gt.behaviour.lighter.tooltip", "Can light things on Fire");
+ private final String mTooltipUses = GT_LanguageManager
+ .addStringLocalization("gt.behaviour.lighter.uses", "Remaining Uses:");
+ private final String mTooltipUnstackable = GT_LanguageManager
+ .addStringLocalization("gt.behaviour.unstackable", "Not usable when stacked!");
public Behaviour_Electric_Lighter() {}
@@ -59,18 +61,8 @@ public class Behaviour_Electric_Lighter extends Behaviour_None {
}
}
- public boolean onItemUse(
- GT_MetaBase_Item aItem,
- ItemStack aStack,
- EntityPlayer aPlayer,
- World aWorld,
- int aX,
- int aY,
- int aZ,
- int aSide,
- float hitX,
- float hitY,
- float hitZ) {
+ public boolean onItemUse(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX,
+ int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
if (!aWorld.isRemote && aStack != null && aStack.stackSize == 1) {
if (aPlayer.isSneaking()) {
Logger.INFO("Changing Mode");
@@ -88,7 +80,10 @@ public class Behaviour_Electric_Lighter extends Behaviour_None {
if (aCurrentMode) {
// Shoot Lightning Attack
aWorld.playSoundAtEntity(
- aPlayer, "random.bow", 0.5F, 0.4F / (CORE.RANDOM.nextFloat() * 0.4F + 0.8F));
+ aPlayer,
+ "random.bow",
+ 0.5F,
+ 0.4F / (CORE.RANDOM.nextFloat() * 0.4F + 0.8F));
if (!aWorld.isRemote) {
aWorld.spawnEntityInWorld(new EntityLightningAttack(aWorld, aPlayer, hitX, hitY, hitZ));
}
@@ -105,7 +100,13 @@ public class Behaviour_Electric_Lighter extends Behaviour_None {
if (this.prepare(aStack) || aPlayer.capabilities.isCreativeMode) {
Logger.WARNING("Preparing Lighter c");
GT_Utility.sendSoundToPlayers(
- aWorld, (String) GregTech_API.sSoundList.get(6), 1.0F, 1.0F, aX, aY, aZ);
+ aWorld,
+ (String) GregTech_API.sSoundList.get(6),
+ 1.0F,
+ 1.0F,
+ aX,
+ aY,
+ aZ);
aWorld.setBlock(aX, aY, aZ, Blocks.fire);
rOutput = true;
// ItemNBT.setLighterFuel(aStack, tFuelAmount);
@@ -119,18 +120,8 @@ public class Behaviour_Electric_Lighter extends Behaviour_None {
return false;
}
- public boolean onItemUseFirst(
- GT_MetaBase_Item aItem,
- ItemStack aStack,
- EntityPlayer aPlayer,
- World aWorld,
- int aX,
- int aY,
- int aZ,
- int aSide,
- float hitX,
- float hitY,
- float hitZ) {
+ public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX,
+ int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
if (!aWorld.isRemote && aStack != null && aStack.stackSize == 1) {
if (aPlayer.isSneaking()) {
Logger.INFO("Changing Mode");
@@ -148,7 +139,10 @@ public class Behaviour_Electric_Lighter extends Behaviour_None {
if (aCurrentMode) {
// Shoot Lightning Attack
aWorld.playSoundAtEntity(
- aPlayer, "random.bow", 0.5F, 0.4F / (CORE.RANDOM.nextFloat() * 0.4F + 0.8F));
+ aPlayer,
+ "random.bow",
+ 0.5F,
+ 0.4F / (CORE.RANDOM.nextFloat() * 0.4F + 0.8F));
if (!aWorld.isRemote) {
aWorld.spawnEntityInWorld(new EntityLightningAttack(aWorld, aPlayer, hitX, hitY, hitZ));
}
@@ -165,7 +159,13 @@ public class Behaviour_Electric_Lighter extends Behaviour_None {
if (this.prepare(aStack) || aPlayer.capabilities.isCreativeMode) {
Logger.WARNING("Preparing Lighter c");
GT_Utility.sendSoundToPlayers(
- aWorld, (String) GregTech_API.sSoundList.get(6), 1.0F, 1.0F, aX, aY, aZ);
+ aWorld,
+ (String) GregTech_API.sSoundList.get(6),
+ 1.0F,
+ 1.0F,
+ aX,
+ aY,
+ aZ);
aWorld.setBlock(aX, aY, aZ, Blocks.fire);
rOutput = true;
// ItemNBT.setLighterFuel(aStack, tFuelAmount);
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Grinder.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Grinder.java
index a2106fe679..cb892da129 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Grinder.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Grinder.java
@@ -1,9 +1,7 @@
package gtPlusPlus.xmod.gregtech.common.items.behaviours;
-import gregtech.api.enums.SubTag;
-import gregtech.api.interfaces.IItemBehaviour;
-import gregtech.api.items.GT_MetaBase_Item;
import java.util.List;
+
import net.minecraft.dispenser.IBlockSource;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@@ -12,6 +10,10 @@ import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
+import gregtech.api.enums.SubTag;
+import gregtech.api.interfaces.IItemBehaviour;
+import gregtech.api.items.GT_MetaBase_Item;
+
public class Behaviour_Grinder implements IItemBehaviour<GT_MetaBase_Item> {
@Override
@@ -21,35 +23,15 @@ public class Behaviour_Grinder implements IItemBehaviour<GT_MetaBase_Item> {
}
@Override
- public boolean onItemUse(
- GT_MetaBase_Item var1,
- ItemStack var2,
- EntityPlayer var3,
- World var4,
- int var5,
- int var6,
- int var7,
- int var8,
- float var9,
- float var10,
- float var11) {
+ public boolean onItemUse(GT_MetaBase_Item var1, ItemStack var2, EntityPlayer var3, World var4, int var5, int var6,
+ int var7, int var8, float var9, float var10, float var11) {
// TODO Auto-generated method stub
return false;
}
@Override
- public boolean onItemUseFirst(
- GT_MetaBase_Item var1,
- ItemStack var2,
- EntityPlayer var3,
- World var4,
- int var5,
- int var6,
- int var7,
- int var8,
- float var9,
- float var10,
- float var11) {
+ public boolean onItemUseFirst(GT_MetaBase_Item var1, ItemStack var2, EntityPlayer var3, World var4, int var5,
+ int var6, int var7, int var8, float var9, float var10, float var11) {
// TODO Auto-generated method stub
return false;
}
@@ -97,15 +79,15 @@ public class Behaviour_Grinder implements IItemBehaviour<GT_MetaBase_Item> {
}
@Override
- public EntityArrow getProjectile(
- GT_MetaBase_Item var1, SubTag var2, ItemStack var3, World var4, double var5, double var7, double var9) {
+ public EntityArrow getProjectile(GT_MetaBase_Item var1, SubTag var2, ItemStack var3, World var4, double var5,
+ double var7, double var9) {
// TODO Auto-generated method stub
return null;
}
@Override
- public EntityArrow getProjectile(
- GT_MetaBase_Item var1, SubTag var2, ItemStack var3, World var4, EntityLivingBase var5, float var6) {
+ public EntityArrow getProjectile(GT_MetaBase_Item var1, SubTag var2, ItemStack var3, World var4,
+ EntityLivingBase var5, float var6) {
// TODO Auto-generated method stub
return null;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java
index 514e1070ac..307cde3233 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java
@@ -1,5 +1,16 @@
package gtPlusPlus.xmod.gregtech.common.items.behaviours;
+import java.util.Random;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.IFluidBlock;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
import gregtech.api.items.GT_MetaBase_Item;
@@ -11,17 +22,9 @@ import gregtech.api.util.GT_Utility;
import gregtech.common.blocks.GT_Block_Ores;
import gregtech.common.blocks.GT_TileEntity_Ores;
import gregtech.common.items.behaviors.Behaviour_Prospecting;
-import java.util.Random;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.IFluidBlock;
public class Behaviour_Prospecting_Ex extends Behaviour_Prospecting {
+
private final int mVanillaCosts;
private final int mEUCosts;
@@ -32,18 +35,9 @@ public class Behaviour_Prospecting_Ex extends Behaviour_Prospecting {
}
@Override
- public boolean onItemUseFirst(
- final GT_MetaBase_Item aItem,
- final ItemStack aStack,
- final EntityPlayer aPlayer,
- final World aWorld,
- final int aX,
- final int aY,
- final int aZ,
- final int aSide,
- final float hitX,
- final float hitY,
- final float hitZ) {
+ public boolean onItemUseFirst(final GT_MetaBase_Item aItem, final ItemStack aStack, final EntityPlayer aPlayer,
+ final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX,
+ final float hitY, final float hitZ) {
if (aWorld.isRemote) {
return false;
}
@@ -56,9 +50,16 @@ public class Behaviour_Prospecting_Ex extends Behaviour_Prospecting {
ItemData tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(aBlock, 1, aMeta));
if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) {
GT_Utility.sendChatToPlayer(
- aPlayer, "This is " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore.");
+ aPlayer,
+ "This is " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore.");
GT_Utility.sendSoundToPlayers(
- aWorld, GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ);
+ aWorld,
+ GregTech_API.sSoundList.get(Integer.valueOf(1)),
+ 1.0F,
+ -1.0F,
+ aX,
+ aY,
+ aZ);
return true;
}
if ((aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone))
@@ -69,15 +70,20 @@ public class Behaviour_Prospecting_Ex extends Behaviour_Prospecting {
|| (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.grass))) {
if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) {
GT_Utility.sendSoundToPlayers(
- aWorld, GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ);
+ aWorld,
+ GregTech_API.sSoundList.get(Integer.valueOf(1)),
+ 1.0F,
+ -1.0F,
+ aX,
+ aY,
+ aZ);
int tX = aX;
int tY = aY;
int tZ = aZ;
int tMetaID = 0;
final int tQuality = ((aItem instanceof GT_MetaGenerated_Tool)
- ? ((GT_MetaGenerated_Tool) aItem).getHarvestLevel(aStack, "")
- : 0)
- * 3;
+ ? ((GT_MetaGenerated_Tool) aItem).getHarvestLevel(aStack, "")
+ : 0) * 3;
int i = 0;
for (final int j = 6 + tQuality; i < j; i++) {
@@ -90,8 +96,7 @@ public class Behaviour_Prospecting_Ex extends Behaviour_Prospecting {
GT_Utility.sendChatToPlayer(aPlayer, "There is Lava behind this Block.");
break;
}
- if ((tBlock == Blocks.water)
- || (tBlock == Blocks.flowing_water)
+ if ((tBlock == Blocks.water) || (tBlock == Blocks.flowing_water)
|| ((tBlock instanceof IFluidBlock))) {
GT_Utility.sendChatToPlayer(aPlayer, "There is a Liquid behind this Block.");
break;
@@ -118,19 +123,19 @@ public class Behaviour_Prospecting_Ex extends Behaviour_Prospecting {
if ((tBlock instanceof GT_Block_Ores)) {
final TileEntity tTileEntity = aWorld.getTileEntity(tX, tY, tZ);
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
- final Materials tMaterial = GregTech_API.sGeneratedMaterials[
- (((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000)];
+ final Materials tMaterial = GregTech_API.sGeneratedMaterials[(((GT_TileEntity_Ores) tTileEntity).mMetaData
+ % 1000)];
if ((tMaterial != null) && (tMaterial != Materials._NULL)) {
GT_Utility.sendChatToPlayer(
- aPlayer, "Found traces of " + tMaterial.mDefaultLocalName + " Ore.");
+ aPlayer,
+ "Found traces of " + tMaterial.mDefaultLocalName + " Ore.");
return true;
}
}
} else {
tMetaID = aWorld.getBlockMetadata(tX, tY, tZ);
tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(tBlock, 1, tMetaID));
- if ((tAssotiation != null)
- && (tAssotiation.mPrefix.toString().startsWith("ore"))) {
+ if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) {
GT_Utility.sendChatToPlayer(
aPlayer,
"Found traces of " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore.");
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/covers/MetaItemCoverCasings.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/covers/MetaItemCoverCasings.java
index b1f2309b69..e34ca2b77f 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/covers/MetaItemCoverCasings.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/covers/MetaItemCoverCasings.java
@@ -1,14 +1,15 @@
package gtPlusPlus.xmod.gregtech.common.items.covers;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.IIcon;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Textures;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.common.items.MetaCustomCoverItem;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
public class MetaItemCoverCasings extends MetaCustomCoverItem {
@@ -40,8 +41,8 @@ public class MetaItemCoverCasings extends MetaCustomCoverItem {
@Override
public String getItemStackDisplayName(final ItemStack tItem) {
return EnumChatFormatting.LIGHT_PURPLE
- + GT_Values.VOLTAGE_NAMES[
- MathUtils.balance(tItem.getItemDamage(), 0, GT_Values.VOLTAGE_NAMES.length - 1)]
+ + GT_Values.VOLTAGE_NAMES[MathUtils
+ .balance(tItem.getItemDamage(), 0, GT_Values.VOLTAGE_NAMES.length - 1)]
+ " Machine Plate Cover"; // super.getItemStackDisplayName(tItem);
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java
index 384e264dcb..b8eb41274a 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java
@@ -1,21 +1,11 @@
package gtPlusPlus.xmod.gregtech.common.render;
-import com.mojang.authlib.GameProfile;
-import gregtech.api.util.GT_Utility;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.api.objects.data.AutoMap;
-import gtPlusPlus.api.objects.data.Pair;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.lib.CORE.ConfigSwitches;
-import gtPlusPlus.core.proxy.ClientProxy;
-import gtPlusPlus.core.util.data.AES;
-import gtPlusPlus.core.util.data.FileUtils;
-import gtPlusPlus.core.util.math.MathUtils;
import java.io.*;
import java.net.URL;
import java.util.Date;
import java.util.List;
import java.util.UUID;
+
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.entity.RenderManager;
@@ -25,18 +15,30 @@ import net.minecraft.server.MinecraftServer;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.RenderPlayerEvent;
+
import org.apache.commons.io.IOUtils;
import org.lwjgl.opengl.GL11;
+import com.mojang.authlib.GameProfile;
+
+import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.api.objects.data.AutoMap;
+import gtPlusPlus.api.objects.data.Pair;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.lib.CORE.ConfigSwitches;
+import gtPlusPlus.core.proxy.ClientProxy;
+import gtPlusPlus.core.util.data.AES;
+import gtPlusPlus.core.util.data.FileUtils;
+import gtPlusPlus.core.util.math.MathUtils;
+
public class GTPP_CapeRenderer extends RenderPlayer {
- private static final ResourceLocation[] mCapes = {
- new ResourceLocation("miscutils:textures/OrangeHD.png"),
- new ResourceLocation("miscutils:textures/FancyCapeHD.png"),
- new ResourceLocation("miscutils:textures/TesterCapeHD.png"),
- new ResourceLocation("miscutils:textures/PatreonCapeHD.png"),
- new ResourceLocation("miscutils:textures/DevCapeHD.png"),
- };
+ private static final ResourceLocation[] mCapes = { new ResourceLocation("miscutils:textures/OrangeHD.png"),
+ new ResourceLocation("miscutils:textures/FancyCapeHD.png"),
+ new ResourceLocation("miscutils:textures/TesterCapeHD.png"),
+ new ResourceLocation("miscutils:textures/PatreonCapeHD.png"),
+ new ResourceLocation("miscutils:textures/DevCapeHD.png"), };
private final boolean mInit;
@@ -93,8 +95,7 @@ public class GTPP_CapeRenderer extends RenderPlayer {
if (!hasResourceChecked) {
// Get players UUID
- String aPlayerUUID =
- aPlayer != null ? aPlayer.getGameProfile().getId().toString() : "BAD";
+ String aPlayerUUID = aPlayer != null ? aPlayer.getGameProfile().getId().toString() : "BAD";
// If for whatever reason this fails, we just exit early.
if (aPlayerUUID.equals("BAD")) {
@@ -173,10 +174,8 @@ public class GTPP_CapeRenderer extends RenderPlayer {
}
// If player is invisible, don't render.
- if (GT_Utility.getFullInvisibility(aPlayer)
- || aPlayer.isInvisible()
- || GT_Utility.getPotion(
- aPlayer, Integer.valueOf(Potion.invisibility.id).intValue())) {
+ if (GT_Utility.getFullInvisibility(aPlayer) || aPlayer.isInvisible()
+ || GT_Utility.getPotion(aPlayer, Integer.valueOf(Potion.invisibility.id).intValue())) {
aEvent.setCanceled(true);
return false;
}
@@ -185,14 +184,11 @@ public class GTPP_CapeRenderer extends RenderPlayer {
bindTexture(tResource);
GL11.glPushMatrix();
GL11.glTranslatef(0.0F, 0.0F, 0.125F);
- double d0 = aPlayer.field_71091_bM
- + (aPlayer.field_71094_bP - aPlayer.field_71091_bM) * aPartialTicks
+ double d0 = aPlayer.field_71091_bM + (aPlayer.field_71094_bP - aPlayer.field_71091_bM) * aPartialTicks
- (aPlayer.prevPosX + (aPlayer.posX - aPlayer.prevPosX) * aPartialTicks);
- double d1 = aPlayer.field_71096_bN
- + (aPlayer.field_71095_bQ - aPlayer.field_71096_bN) * aPartialTicks
+ double d1 = aPlayer.field_71096_bN + (aPlayer.field_71095_bQ - aPlayer.field_71096_bN) * aPartialTicks
- (aPlayer.prevPosY + (aPlayer.posY - aPlayer.prevPosY) * aPartialTicks);
- double d2 = aPlayer.field_71097_bO
- + (aPlayer.field_71085_bR - aPlayer.field_71097_bO) * aPartialTicks
+ double d2 = aPlayer.field_71097_bO + (aPlayer.field_71085_bR - aPlayer.field_71097_bO) * aPartialTicks
- (aPlayer.prevPosZ + (aPlayer.posZ - aPlayer.prevPosZ) * aPartialTicks);
float f6 = aPlayer.prevRenderYawOffset
+ (aPlayer.renderYawOffset - aPlayer.prevRenderYawOffset) * aPartialTicks;
@@ -211,9 +207,9 @@ public class GTPP_CapeRenderer extends RenderPlayer {
f8 = 0.0F;
}
float f10 = aPlayer.prevCameraYaw + (aPlayer.cameraYaw - aPlayer.prevCameraYaw) * aPartialTicks;
- f7 += MathHelper.sin((aPlayer.prevDistanceWalkedModified
- + (aPlayer.distanceWalkedModified - aPlayer.prevDistanceWalkedModified)
- * aPartialTicks)
+ f7 += MathHelper.sin(
+ (aPlayer.prevDistanceWalkedModified
+ + (aPlayer.distanceWalkedModified - aPlayer.prevDistanceWalkedModified) * aPartialTicks)
* 6.0F)
* 32.0F
* f10;
@@ -238,6 +234,7 @@ public class GTPP_CapeRenderer extends RenderPlayer {
@Deprecated
/**
* Should be able to get the username from a UUID
+ *
* @param name - Players Name
* @param uuid - Players known UUID
* @return - The newest Player name
@@ -250,8 +247,7 @@ public class GTPP_CapeRenderer extends RenderPlayer {
UUID g = UUID.fromString(uuid);
if (g != null) {
Logger.WORLD("[Capes++] Mojang/Cache checking for " + name + ".");
- GameProfile profile =
- MinecraftServer.getServer().func_152358_ax().func_152652_a(g);
+ GameProfile profile = MinecraftServer.getServer().func_152358_ax().func_152652_a(g);
if (profile != null) {
Logger.WARNING("[Capes++] Found for UUID check: " + profile.getName() + ".");
return profile.getName();
@@ -260,8 +256,7 @@ public class GTPP_CapeRenderer extends RenderPlayer {
g = UUID.fromString(uuid.replace("-", ""));
if (g != null) {
Logger.WORLD("[Capes++] Mojang/Cache checking for " + name + ".");
- GameProfile profile =
- MinecraftServer.getServer().func_152358_ax().func_152652_a(g);
+ GameProfile profile = MinecraftServer.getServer().func_152358_ax().func_152652_a(g);
if (profile != null) {
Logger.WARNING("[Capes++] Found for UUID check 2: " + profile.getName() + ".");
return profile.getName();
@@ -273,8 +268,7 @@ public class GTPP_CapeRenderer extends RenderPlayer {
if (name != null) {
if (name.length() > 0) {
Logger.WORLD("[Capes++] Mojang/Cache checking for " + name + ".");
- GameProfile profile =
- MinecraftServer.getServer().func_152358_ax().func_152655_a(name);
+ GameProfile profile = MinecraftServer.getServer().func_152358_ax().func_152655_a(name);
if (profile != null) {
Logger.WARNING("[Capes++] Found for name check: " + profile.getName() + ".");
return profile.getName();
@@ -282,8 +276,7 @@ public class GTPP_CapeRenderer extends RenderPlayer {
}
}
Logger.WORLD("[Capes++] Failed UUID check for " + name + ".");
- } catch (Throwable t) {
- }
+ } catch (Throwable t) {}
return name;
}
@@ -356,8 +349,7 @@ public class GTPP_CapeRenderer extends RenderPlayer {
}
private static final boolean isDownloadedCapeListBigger(File aFile) {
- double aExistingFileSize =
- (doesCapeCacheExistLocally() ? getCapeCache().length() : 0);
+ double aExistingFileSize = (doesCapeCacheExistLocally() ? getCapeCache().length() : 0);
double aNewFileSize = aFile.length();
if (aNewFileSize > aExistingFileSize) {
return true;
@@ -405,8 +397,8 @@ public class GTPP_CapeRenderer extends RenderPlayer {
e.printStackTrace();
}
if (tempFile == null) {
- tempFile = FileUtils.createFile(
- "", "gtpp-" + MathUtils.randInt(Short.MAX_VALUE, (Integer.MAX_VALUE / 2)), "tmp");
+ tempFile = FileUtils
+ .createFile("", "gtpp-" + MathUtils.randInt(Short.MAX_VALUE, (Integer.MAX_VALUE / 2)), "tmp");
}
tempFile.deleteOnExit();
return tempFile;
@@ -439,36 +431,50 @@ public class GTPP_CapeRenderer extends RenderPlayer {
int aCapeTypeID = aCapeTypeID2;
Pair<String, String> aFinalString = new Pair<String, String>(
"UUID: " + aSplitData[1],
- "Username: "
- + (aSplitData[2] != null && aSplitData[0].length() > 0
- ? aSplitData[2]
- : "Not Specified"));
+ "Username: " + (aSplitData[2] != null && aSplitData[0].length() > 0
+ ? aSplitData[2]
+ : "Not Specified"));
Logger.INFO("Cape Type: " + aCapeTypeID);
switch (aCapeTypeID) {
case 0:
aCapeType1.add(aFinalString);
- Logger.INFO("Added user to map " + aCapeTypeID + ", map now holds "
- + aCapeType1.size() + " users.");
+ Logger.INFO(
+ "Added user to map " + aCapeTypeID
+ + ", map now holds "
+ + aCapeType1.size()
+ + " users.");
break;
case 1:
aCapeType2.add(aFinalString);
- Logger.INFO("Added user to map " + aCapeTypeID + ", map now holds "
- + aCapeType2.size() + " users.");
+ Logger.INFO(
+ "Added user to map " + aCapeTypeID
+ + ", map now holds "
+ + aCapeType2.size()
+ + " users.");
break;
case 2:
aCapeType3.add(aFinalString);
- Logger.INFO("Added user to map " + aCapeTypeID + ", map now holds "
- + aCapeType3.size() + " users.");
+ Logger.INFO(
+ "Added user to map " + aCapeTypeID
+ + ", map now holds "
+ + aCapeType3.size()
+ + " users.");
break;
case 3:
aCapeType4.add(aFinalString);
- Logger.INFO("Added user to map " + aCapeTypeID + ", map now holds "
- + aCapeType4.size() + " users.");
+ Logger.INFO(
+ "Added user to map " + aCapeTypeID
+ + ", map now holds "
+ + aCapeType4.size()
+ + " users.");
break;
case 4:
aCapeType5.add(aFinalString);
- Logger.INFO("Added user to map " + aCapeTypeID + ", map now holds "
- + aCapeType5.size() + " users.");
+ Logger.INFO(
+ "Added user to map " + aCapeTypeID
+ + ", map now holds "
+ + aCapeType5.size()
+ + " users.");
break;
default:
break;
@@ -477,8 +483,7 @@ public class GTPP_CapeRenderer extends RenderPlayer {
}
}
}
- if (!aCapeType1.isEmpty()
- || !aCapeType2.isEmpty()
+ if (!aCapeType1.isEmpty() || !aCapeType2.isEmpty()
|| !aCapeType3.isEmpty()
|| !aCapeType4.isEmpty()
|| !aCapeType5.isEmpty()) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_FlaskRenderer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_FlaskRenderer.java
index 1d4e367c4f..6267609aba 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_FlaskRenderer.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_FlaskRenderer.java
@@ -1,9 +1,5 @@
package gtPlusPlus.xmod.gregtech.common.render;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.common.items.GT_VolumetricFlask;
-import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
-import ic2.core.util.DrawUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.Tessellator;
@@ -13,8 +9,14 @@ import net.minecraft.util.IIcon;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.fluids.FluidStack;
+
import org.lwjgl.opengl.GL11;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.common.items.GT_VolumetricFlask;
+import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
+import ic2.core.util.DrawUtil;
+
@SideOnly(cpw.mods.fml.relauncher.Side.CLIENT)
public final class GTPP_FlaskRenderer implements net.minecraftforge.client.IItemRenderer {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_Render_MachineBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_Render_MachineBlock.java
index 1a5117ac2e..5d7209b203 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_Render_MachineBlock.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/render/GTPP_Render_MachineBlock.java
@@ -1,5 +1,13 @@
package gtPlusPlus.xmod.gregtech.common.render;
+import net.minecraft.block.Block;
+import net.minecraft.client.renderer.RenderBlocks;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.IBlockAccess;
+
+import org.lwjgl.opengl.GL11;
+
import cpw.mods.fml.client.registry.RenderingRegistry;
import gregtech.api.GregTech_API;
import gregtech.api.interfaces.ITexture;
@@ -11,12 +19,6 @@ import gregtech.common.blocks.GT_Block_Machines;
import gregtech.common.render.GT_Renderer_Block;
import gtPlusPlus.xmod.gregtech.common.blocks.GTPP_Block_Machines;
import gtPlusPlus.xmod.gregtech.common.helpers.GT_MethodHelper;
-import net.minecraft.block.Block;
-import net.minecraft.client.renderer.RenderBlocks;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import org.lwjgl.opengl.GL11;
public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
@@ -28,8 +30,8 @@ public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
RenderingRegistry.registerBlockHandler(this);
}
- private static ITexture[] getTexture(
- IMetaTileEntity arg0, int arg1, int arg2, int arg3, boolean arg4, boolean arg5) {
+ private static ITexture[] getTexture(IMetaTileEntity arg0, int arg1, int arg2, int arg3, boolean arg4,
+ boolean arg5) {
IGregTechTileEntity arg0b = arg0.getBaseMetaTileEntity();
return arg0.getTexture(arg0b, (byte) arg1, (byte) arg2, (byte) arg3, arg4, arg5);
}
@@ -43,8 +45,8 @@ public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
if (tMetaTileEntity.getBaseMetaTileEntity() instanceof IPipeRenderedTileEntity) {
- float tThickness =
- ((IPipeRenderedTileEntity) tMetaTileEntity.getBaseMetaTileEntity()).getThickNess();
+ float tThickness = ((IPipeRenderedTileEntity) tMetaTileEntity.getBaseMetaTileEntity())
+ .getThickNess();
float sp = (1.0F - tThickness) / 2.0F;
aBlock.setBlockBounds(0.0F, sp, sp, 1.0F, sp + tThickness, sp + tThickness);
aRenderer.setRenderBoundsFromBlock(aBlock);
@@ -202,24 +204,29 @@ public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
}
}
- public static boolean renderStandardBlock(
- IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer) {
+ public static boolean renderStandardBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock,
+ RenderBlocks aRenderer) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
return tTileEntity instanceof ITexturedTileEntity
- ? renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer, new ITexture[][] {
- GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 0),
- GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 1),
- GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 2),
- GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 3),
- GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 4),
- GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 5)
- })
+ ? renderStandardBlock(
+ aWorld,
+ aX,
+ aY,
+ aZ,
+ aBlock,
+ aRenderer,
+ new ITexture[][] { GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 0),
+ GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 1),
+ GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 2),
+ GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 3),
+ GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 4),
+ GT_MethodHelper.getTexture(tTileEntity, aBlock, (byte) 5) })
: false;
}
- public static boolean renderStandardBlock(
- IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer, ITexture[][] aTextures) {
+ public static boolean renderStandardBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock,
+ RenderBlocks aRenderer, ITexture[][] aTextures) {
aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
aRenderer.setRenderBoundsFromBlock(aBlock);
renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[0], true);
@@ -231,14 +238,8 @@ public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
return true;
}
- public static boolean renderPipeBlock(
- IBlockAccess aWorld,
- int aX,
- int aY,
- int aZ,
- Block aBlock,
- IPipeRenderedTileEntity aTileEntity,
- RenderBlocks aRenderer) {
+ public static boolean renderPipeBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock,
+ IPipeRenderedTileEntity aTileEntity, RenderBlocks aRenderer) {
byte aConnections = aTileEntity.getConnections();
if ((aConnections & 192) != 0) {
return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer);
@@ -564,22 +565,15 @@ public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
}
}
- public static void renderNegativeYFacing(
- IBlockAccess aWorld,
- RenderBlocks aRenderer,
- Block aBlock,
- int aX,
- int aY,
- int aZ,
- ITexture[] aIcon,
- boolean aFullBlock) {
+ public static void renderNegativeYFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY,
+ int aZ, ITexture[] aIcon, boolean aFullBlock) {
if (aWorld != null) {
if (aFullBlock && !aBlock.shouldSideBeRendered(aWorld, aX, aY - 1, aZ, 0)) {
return;
}
- Tessellator.instance.setBrightness(
- aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY - 1 : aY, aZ));
+ Tessellator.instance
+ .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY - 1 : aY, aZ));
}
if (aIcon != null) {
@@ -593,22 +587,15 @@ public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
aRenderer.flipTexture = false;
}
- public static void renderPositiveYFacing(
- IBlockAccess aWorld,
- RenderBlocks aRenderer,
- Block aBlock,
- int aX,
- int aY,
- int aZ,
- ITexture[] aIcon,
- boolean aFullBlock) {
+ public static void renderPositiveYFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY,
+ int aZ, ITexture[] aIcon, boolean aFullBlock) {
if (aWorld != null) {
if (aFullBlock && !aBlock.shouldSideBeRendered(aWorld, aX, aY + 1, aZ, 1)) {
return;
}
- Tessellator.instance.setBrightness(
- aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY + 1 : aY, aZ));
+ Tessellator.instance
+ .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY + 1 : aY, aZ));
}
if (aIcon != null) {
@@ -622,22 +609,15 @@ public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
aRenderer.flipTexture = false;
}
- public static void renderNegativeZFacing(
- IBlockAccess aWorld,
- RenderBlocks aRenderer,
- Block aBlock,
- int aX,
- int aY,
- int aZ,
- ITexture[] aIcon,
- boolean aFullBlock) {
+ public static void renderNegativeZFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY,
+ int aZ, ITexture[] aIcon, boolean aFullBlock) {
if (aWorld != null) {
if (aFullBlock && !aBlock.shouldSideBeRendered(aWorld, aX, aY, aZ - 1, 2)) {
return;
}
- Tessellator.instance.setBrightness(
- aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ - 1 : aZ));
+ Tessellator.instance
+ .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ - 1 : aZ));
}
aRenderer.flipTexture = !aFullBlock;
@@ -652,22 +632,15 @@ public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
aRenderer.flipTexture = false;
}
- public static void renderPositiveZFacing(
- IBlockAccess aWorld,
- RenderBlocks aRenderer,
- Block aBlock,
- int aX,
- int aY,
- int aZ,
- ITexture[] aIcon,
- boolean aFullBlock) {
+ public static void renderPositiveZFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY,
+ int aZ, ITexture[] aIcon, boolean aFullBlock) {
if (aWorld != null) {
if (aFullBlock && !aBlock.shouldSideBeRendered(aWorld, aX, aY, aZ + 1, 3)) {
return;
}
- Tessellator.instance.setBrightness(
- aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ + 1 : aZ));
+ Tessellator.instance
+ .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ + 1 : aZ));
}
if (aIcon != null) {
@@ -681,22 +654,15 @@ public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
aRenderer.flipTexture = false;
}
- public static void renderNegativeXFacing(
- IBlockAccess aWorld,
- RenderBlocks aRenderer,
- Block aBlock,
- int aX,
- int aY,
- int aZ,
- ITexture[] aIcon,
- boolean aFullBlock) {
+ public static void renderNegativeXFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY,
+ int aZ, ITexture[] aIcon, boolean aFullBlock) {
if (aWorld != null) {
if (aFullBlock && !aBlock.shouldSideBeRendered(aWorld, aX - 1, aY, aZ, 4)) {
return;
}
- Tessellator.instance.setBrightness(
- aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX - 1 : aX, aY, aZ));
+ Tessellator.instance
+ .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX - 1 : aX, aY, aZ));
}
if (aIcon != null) {
@@ -710,22 +676,15 @@ public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
aRenderer.flipTexture = false;
}
- public static void renderPositiveXFacing(
- IBlockAccess aWorld,
- RenderBlocks aRenderer,
- Block aBlock,
- int aX,
- int aY,
- int aZ,
- ITexture[] aIcon,
- boolean aFullBlock) {
+ public static void renderPositiveXFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY,
+ int aZ, ITexture[] aIcon, boolean aFullBlock) {
if (aWorld != null) {
if (aFullBlock && !aBlock.shouldSideBeRendered(aWorld, aX + 1, aY, aZ, 5)) {
return;
}
- Tessellator.instance.setBrightness(
- aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX + 1 : aX, aY, aZ));
+ Tessellator.instance
+ .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX + 1 : aX, aY, aZ));
}
aRenderer.flipTexture = !aFullBlock;
@@ -743,8 +702,7 @@ public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
public void renderInventoryBlock(Block aBlock, int aMeta, int aModelID, RenderBlocks aRenderer) {
aMeta += 30400;
if (aBlock instanceof GT_Block_Machines || aBlock instanceof GTPP_Block_Machines) {
- if (aMeta > 0
- && aMeta < GregTech_API.METATILEENTITIES.length
+ if (aMeta > 0 && aMeta < GregTech_API.METATILEENTITIES.length
&& GregTech_API.METATILEENTITIES[aMeta] != null
&& !GregTech_API.METATILEENTITIES[aMeta].renderInInventory(aBlock, aMeta, aRenderer)) {
renderNormalInventoryMetaTileEntity(aBlock, aMeta, aRenderer);
@@ -755,21 +713,25 @@ public class GTPP_Render_MachineBlock extends GT_Renderer_Block {
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
}
- public boolean renderWorldBlock(
- IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, int aModelID, RenderBlocks aRenderer) {
+ public boolean renderWorldBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, int aModelID,
+ RenderBlocks aRenderer) {
TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ);
- return aTileEntity == null
- ? false
+ return aTileEntity == null ? false
: (aTileEntity instanceof IGregTechTileEntity
- && ((IGregTechTileEntity) aTileEntity).getMetaTileEntity() != null
- && ((IGregTechTileEntity) aTileEntity)
- .getMetaTileEntity()
- .renderInWorld(aWorld, aX, aY, aZ, aBlock, aRenderer)
- ? true
- : (aTileEntity instanceof IPipeRenderedTileEntity
- ? renderPipeBlock(
- aWorld, aX, aY, aZ, aBlock, (IPipeRenderedTileEntity) aTileEntity, aRenderer)
- : renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer)));
+ && ((IGregTechTileEntity) aTileEntity).getMetaTileEntity() != null
+ && ((IGregTechTileEntity) aTileEntity).getMetaTileEntity()
+ .renderInWorld(aWorld, aX, aY, aZ, aBlock, aRenderer)
+ ? true
+ : (aTileEntity instanceof IPipeRenderedTileEntity
+ ? renderPipeBlock(
+ aWorld,
+ aX,
+ aY,
+ aZ,
+ aBlock,
+ (IPipeRenderedTileEntity) aTileEntity,
+ aRenderer)
+ : renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer)));
}
public boolean shouldRender3DInInventory(int aModel) {
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 bf56872d52..f02bf0193e 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
@@ -1,11 +1,19 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.automation;
+import java.util.ArrayList;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.oredict.OreDictionary;
+
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
import com.gtnewhorizons.modularui.common.widget.CycleButtonWidget;
import com.gtnewhorizons.modularui.common.widget.DrawableWidget;
import com.gtnewhorizons.modularui.common.widget.SlotGroup;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.Textures;
@@ -25,11 +33,6 @@ import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.gui.GTPP_UITextures;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.ArrayList;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.oredict.OreDictionary;
public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_BasicTank implements IAddGregtechLogo {
@@ -51,8 +54,8 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B
mLocalName = "Auto Workbench (" + GT_Values.VN[aTier] + ")";
}
- public GT_MetaTileEntity_ElectricAutoWorkbench(
- final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_ElectricAutoWorkbench(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures) {
super(aName, aTier, 30, aDescription, aTextures);
}
@@ -193,8 +196,7 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B
@Override
public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) {
- return aSide != getBaseMetaTileEntity().getFrontFacing()
- && aSide != getBaseMetaTileEntity().getBackFacing();
+ return aSide != getBaseMetaTileEntity().getFrontFacing() && aSide != getBaseMetaTileEntity().getBackFacing();
}
private void switchMode() {
@@ -204,15 +206,13 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B
@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
super.onPostTick(aBaseMetaTileEntity, aTick);
- if (getBaseMetaTileEntity().isAllowedToWork()
- && getBaseMetaTileEntity().isServerSide()
+ if (getBaseMetaTileEntity().isAllowedToWork() && getBaseMetaTileEntity().isServerSide()
&& getBaseMetaTileEntity().getUniversalEnergyStored() >= (mMode == 5 || mMode == 6 ? 128 : 2048)
&& (getBaseMetaTileEntity().hasWorkJustBeenEnabled() || --mTicksUntilNextUpdate < 1)) {
mTicksUntilNextUpdate = 32;
for (byte i = 19; i < 28; i++) {
- if (mInventory[i] != null
- && mInventory[i].isItemStackDamageable()
+ if (mInventory[i] != null && mInventory[i].isItemStackDamageable()
&& mInventory[i].getItem().hasContainerItem()) {
mInventory[i].setItemDamage(OreDictionary.WILDCARD_VALUE);
}
@@ -223,12 +223,10 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B
ItemStack tOutput = GT_Utility.fillFluidContainer(mFluid, mInventory[i], false, true);
if (tOutput != null) {
for (byte j = 0; j < 9; j++) {
- if (mInventory[j] == null
- || (GT_Utility.areStacksEqual(tOutput, mInventory[j])
- && mInventory[j].stackSize + tOutput.stackSize
- <= tOutput.getMaxStackSize())) {
- mFluid.amount -=
- GT_Utility.getFluidForFilledItem(tOutput, true).amount * tOutput.stackSize;
+ if (mInventory[j] == null || (GT_Utility.areStacksEqual(tOutput, mInventory[j])
+ && mInventory[j].stackSize + tOutput.stackSize <= tOutput.getMaxStackSize())) {
+ mFluid.amount -= GT_Utility.getFluidForFilledItem(tOutput, true).amount
+ * tOutput.stackSize;
getBaseMetaTileEntity().decrStackSize(i, 1);
if (mInventory[j] == null) {
mInventory[j] = tOutput;
@@ -287,25 +285,19 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B
tTempStack = GT_Utility.copy(mInventory[mCurrentSlot]);
tTempStack.stackSize = 1;
tRecipe[0] = tTempStack;
- if (GT_ModHandler.getAllRecipeOutput(
- getBaseMetaTileEntity().getWorld(), tRecipe)
- == null) {
+ if (GT_ModHandler.getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), tRecipe) == null) {
tRecipe[1] = tTempStack;
tRecipe[3] = tTempStack;
tRecipe[4] = tTempStack;
} else break;
- if (GT_ModHandler.getAllRecipeOutput(
- getBaseMetaTileEntity().getWorld(), tRecipe)
- == null) {
+ if (GT_ModHandler.getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), tRecipe) == null) {
tRecipe[2] = tTempStack;
tRecipe[5] = tTempStack;
tRecipe[6] = tTempStack;
tRecipe[7] = tTempStack;
tRecipe[8] = tTempStack;
} else break;
- if (GT_ModHandler.getAllRecipeOutput(
- getBaseMetaTileEntity().getWorld(), tRecipe)
- == null) {
+ if (GT_ModHandler.getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), tRecipe) == null) {
if (mInventory[18] == null) {
mInventory[18] = mInventory[mCurrentSlot];
mInventory[mCurrentSlot] = null;
@@ -326,9 +318,7 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B
tTempStack = GT_Utility.copy(mInventory[mCurrentSlot]);
tTempStack.stackSize = 1;
tRecipe[0] = tTempStack;
- if (GT_ModHandler.getAllRecipeOutput(
- getBaseMetaTileEntity().getWorld(), tRecipe)
- == null) {
+ if (GT_ModHandler.getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), tRecipe) == null) {
if (mInventory[18] == null) {
mInventory[18] = mInventory[mCurrentSlot];
mInventory[mCurrentSlot] = null;
@@ -352,9 +342,7 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B
tRecipe[1] = tTempStack;
tRecipe[3] = tTempStack;
tRecipe[4] = tTempStack;
- if (GT_ModHandler.getAllRecipeOutput(
- getBaseMetaTileEntity().getWorld(), tRecipe)
- == null) {
+ if (GT_ModHandler.getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), tRecipe) == null) {
if (mInventory[18] == null) {
mInventory[18] = mInventory[mCurrentSlot];
mInventory[mCurrentSlot] = null;
@@ -383,9 +371,7 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B
tRecipe[6] = tTempStack;
tRecipe[7] = tTempStack;
tRecipe[8] = tTempStack;
- if (GT_ModHandler.getAllRecipeOutput(
- getBaseMetaTileEntity().getWorld(), tRecipe)
- == null) {
+ if (GT_ModHandler.getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), tRecipe) == null) {
if (mInventory[18] == null) {
mInventory[18] = mInventory[mCurrentSlot];
mInventory[mCurrentSlot] = null;
@@ -435,8 +421,7 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B
tRecipe[1] = tTempStack;
tRecipe[3] = tTempStack;
tRecipe[4] = tTempStack;
- if (GT_ModHandler.getAllRecipeOutput(
- getBaseMetaTileEntity().getWorld(), tRecipe)
+ if (GT_ModHandler.getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), tRecipe)
== null) {
if (mInventory[18] == null) {
mInventory[18] = mInventory[mCurrentSlot];
@@ -457,8 +442,7 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B
tRecipe[6] = tTempStack;
tRecipe[7] = tTempStack;
tRecipe[8] = tTempStack;
- if (GT_ModHandler.getAllRecipeOutput(
- getBaseMetaTileEntity().getWorld(), tRecipe)
+ if (GT_ModHandler.getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), tRecipe)
== null) {
if (mInventory[18] == null) {
mInventory[18] = mInventory[mCurrentSlot];
@@ -497,9 +481,7 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B
tRecipe[6] = tTempStack;
tRecipe[7] = tTempStack;
tRecipe[8] = tTempStack;
- if (GT_ModHandler.getAllRecipeOutput(
- getBaseMetaTileEntity().getWorld(), tRecipe)
- == null) {
+ if (GT_ModHandler.getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), tRecipe) == null) {
if (mInventory[18] == null) {
mInventory[18] = mInventory[mCurrentSlot];
mInventory[mCurrentSlot] = null;
@@ -522,14 +504,12 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B
tTempStack = GT_Utility.copy(mInventory[mCurrentSlot]);
tTempStack.stackSize = 1;
for (int i = mCurrentSlot + 1; i < 18; i++) {
- if (mInventory[i] != null
- && mInventory[i].getItem() == tTempStack.getItem()
+ if (mInventory[i] != null && mInventory[i].getItem() == tTempStack.getItem()
&& mInventory[mCurrentSlot].getItemDamage() + mInventory[i].getItemDamage()
> tTempStack.getMaxDamage()) {
tRecipe[0] = tTempStack;
tRecipe[1] = GT_Utility.copy(mInventory[i]);
- if (GT_ModHandler.getAllRecipeOutput(
- getBaseMetaTileEntity().getWorld(), tRecipe)
+ if (GT_ModHandler.getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), tRecipe)
== null) {
if (mInventory[18] == null) {
mInventory[18] = mInventory[mCurrentSlot];
@@ -550,16 +530,10 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B
}
break;
}
- for (byte i = 0, j = 0;
- i < 18
- && j < 9
- && (j < 2
- || GT_ModHandler.getAllRecipeOutput(
- getBaseMetaTileEntity()
- .getWorld(),
- tRecipe)
- == null);
- i++) {
+ for (byte i = 0, j = 0; i < 18 && j < 9
+ && (j < 2 || GT_ModHandler
+ .getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), tRecipe)
+ == null); i++) {
tRecipe[j] = mInventory[(mCurrentSlot + i) % 18];
if (tRecipe[j] != null) {
tRecipe[j] = GT_Utility.copy(tRecipe[j]);
@@ -573,8 +547,7 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B
}
if (tOutput == null)
- tOutput = GT_ModHandler.getAllRecipeOutput(
- getBaseMetaTileEntity().getWorld(), tRecipe);
+ tOutput = GT_ModHandler.getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), tRecipe);
if (tOutput != null || mMode == 0) mInventory[28] = tOutput;
@@ -621,9 +594,9 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B
} else if (GT_Utility.areStacksEqual(mInventory[k], tStack)
&& mInventory[k].stackSize + tStack.stackSize
<= tStack.getMaxStackSize()) {
- mInventory[k].stackSize += tStack.stackSize;
- break;
- }
+ mInventory[k].stackSize += tStack.stackSize;
+ break;
+ }
}
}
} else {
@@ -636,9 +609,9 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B
}
mInventory[18] = GT_Utility.copy(tOutput);
- getBaseMetaTileEntity()
- .decreaseStoredEnergyUnits(
- mMode == 5 || mMode == 6 || mMode == 7 ? 128 : 2048, true);
+ getBaseMetaTileEntity().decreaseStoredEnergyUnits(
+ mMode == 5 || mMode == 6 || mMode == 7 ? 128 : 2048,
+ true);
mTicksUntilNextUpdate = 1;
} else {
mLastCraftSuccessful = false;
@@ -652,7 +625,7 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B
if (mInventory[18] == null && mThroughPut < 2) {
for (byte i = 0; i < 8; i++) {
- for (byte j = i; ++j < 9; ) {
+ for (byte j = i; ++j < 9;) {
if (GT_Utility.areStacksEqual(mInventory[i], mInventory[j])
&& mInventory[i].getMaxStackSize() > 8) {
mInventory[18] = mInventory[j];
@@ -670,19 +643,17 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B
getBaseMetaTileEntity()
.decreaseStoredEnergyUnits(
GT_Utility.moveOneItemStack(
- getBaseMetaTileEntity(),
- getBaseMetaTileEntity()
- .getIInventoryAtSide(getBaseMetaTileEntity()
- .getBackFacing()),
- getBaseMetaTileEntity().getBackFacing(),
- getBaseMetaTileEntity().getFrontFacing(),
- null,
- false,
- (byte) 64,
- (byte) 1,
- (byte) 64,
- (byte) 1)
- * 10,
+ getBaseMetaTileEntity(),
+ getBaseMetaTileEntity()
+ .getIInventoryAtSide(getBaseMetaTileEntity().getBackFacing()),
+ getBaseMetaTileEntity().getBackFacing(),
+ getBaseMetaTileEntity().getFrontFacing(),
+ null,
+ false,
+ (byte) 64,
+ (byte) 1,
+ (byte) 64,
+ (byte) 1) * 10,
true);
}
}
@@ -746,14 +717,10 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B
return mMode == 0 ? aIndex < 9 : aIndex < 18;
}
- /*@Override
- public int getTextureIndex(byte aSide, byte aFacing, boolean aActive, boolean aRedstone) {
- if (aSide == aFacing)
- return 112;
- if (GT_Utility.getOppositeSide(aSide) == aFacing)
- return 113;
- return 114;
- }*/
+ /*
+ * @Override public int getTextureIndex(byte aSide, byte aFacing, boolean aActive, boolean aRedstone) { if (aSide ==
+ * aFacing) return 112; if (GT_Utility.getOppositeSide(aSide) == aFacing) return 113; return 114; }
+ */
@Override
public int getCapacity() {
@@ -767,11 +734,9 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B
@Override
public String[] getDescription() {
- return new String[] {
- "Automatic Crafting Table Mk III",
- // this.mDescription,
- CORE.GT_Tooltip
- };
+ return new String[] { "Automatic Crafting Table Mk III",
+ // this.mDescription,
+ CORE.GT_Tooltip };
}
@Override
@@ -793,13 +758,8 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
if (aSide == aFacing) {
return this.mTextures[0][aColorIndex + 1];
} else if (GT_Utility.getOppositeSide(aSide) == aFacing) {
@@ -807,41 +767,34 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B
} else {
return this.mTextures[4][aColorIndex + 1];
}
- /*return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0
- : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1];*/
+ /*
+ * return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide ==
+ * GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1];
+ */
}
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Crafting_Overlay)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Crafting_Overlay) };
}
public ITexture[] getBack(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(BlockIcons.OVERLAY_PIPE)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(BlockIcons.OVERLAY_PIPE) };
}
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], };
}
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Crafting_Overlay)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Crafting_Overlay) };
}
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Crafting_Overlay)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Crafting_Overlay) };
}
@Override
@@ -851,78 +804,50 @@ public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_B
@Override
public void addGregTechLogo(ModularWindow.Builder builder) {
- builder.widget(new DrawableWidget()
- .setDrawable(getGUITextureSet().getGregTechLogo())
- .setSize(17, 17)
- .setPos(118, 22));
+ builder.widget(
+ new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17).setPos(118, 22));
}
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
- builder.widget(SlotGroup.ofItemHandler(inventoryHandler, 3)
- .endAtSlot(8)
- .build()
- .setPos(7, 4))
- .widget(SlotGroup.ofItemHandler(inventoryHandler, 9)
- .startFromSlot(9)
- .endAtSlot(17)
- .canInsert(false)
- .background(GT_UITextures.SLOT_DARK_GRAY)
- .applyForWidget(SlotWidget::disableShiftInsert)
- .build()
- .setPos(7, 59))
- .widget(new SlotWidget(inventoryHandler, 18)
- .setAccess(true, false)
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_OUT)
- .setPos(151, 40))
- .widget(new DrawableWidget()
- .setDrawable(GT_UITextures.PICTURE_SLOTS_HOLO_3BY3)
- .setPos(62, 4)
- .setSize(54, 54))
- .widget(SlotGroup.ofItemHandler(inventoryHandler, 3)
- .startFromSlot(19)
- .endAtSlot(27)
- .phantom(true)
- .background(GT_UITextures.TRANSPARENT)
- .build()
- .setPos(62, 4))
- .widget(SlotWidget.phantom(inventoryHandler, 28)
- .disableInteraction()
- .setBackground(getGUITextureSet().getItemSlot(), GTPP_UITextures.OVERLAY_SLOT_ARROW_4)
- .setPos(151, 4));
- builder.widget(new CycleButtonWidget()
- .setGetter(() -> mThroughPut)
- .setSetter(val -> mThroughPut = val)
- .setLength(MAX_THROUGHPUT)
- .setTextureGetter(i -> GTPP_UITextures.OVERLAY_BUTTON_THROUGHPUT[i])
- .setBackground(GT_UITextures.BUTTON_STANDARD)
- .setPos(120, 4)
- .setSize(18, 18));
- String[] mModeText = new String[] {
- "Normal Crafting Table", "???", "1x1", "2x2", "3x3", "Unifier", "Dust", "???", "Hammer?", "Circle"
- };
- CycleButtonWidget modeButton = new CycleButtonWidget()
- .setGetter(() -> mMode)
- .setSetter(val -> {
- mMode = val;
- switchMode();
- })
- .setLength(MAX_MODES)
- .setTextureGetter(i -> GTPP_UITextures.OVERLAY_BUTTON_MODE[i]);
+ builder.widget(SlotGroup.ofItemHandler(inventoryHandler, 3).endAtSlot(8).build().setPos(7, 4))
+ .widget(
+ SlotGroup.ofItemHandler(inventoryHandler, 9).startFromSlot(9).endAtSlot(17).canInsert(false)
+ .background(GT_UITextures.SLOT_DARK_GRAY).applyForWidget(SlotWidget::disableShiftInsert)
+ .build().setPos(7, 59))
+ .widget(
+ new SlotWidget(inventoryHandler, 18).setAccess(true, false)
+ .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_OUT)
+ .setPos(151, 40))
+ .widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SLOTS_HOLO_3BY3).setPos(62, 4)
+ .setSize(54, 54))
+ .widget(
+ SlotGroup.ofItemHandler(inventoryHandler, 3).startFromSlot(19).endAtSlot(27).phantom(true)
+ .background(GT_UITextures.TRANSPARENT).build().setPos(62, 4))
+ .widget(
+ SlotWidget.phantom(inventoryHandler, 28).disableInteraction()
+ .setBackground(getGUITextureSet().getItemSlot(), GTPP_UITextures.OVERLAY_SLOT_ARROW_4)
+ .setPos(151, 4));
+ builder.widget(
+ new CycleButtonWidget().setGetter(() -> mThroughPut).setSetter(val -> mThroughPut = val)
+ .setLength(MAX_THROUGHPUT).setTextureGetter(i -> GTPP_UITextures.OVERLAY_BUTTON_THROUGHPUT[i])
+ .setBackground(GT_UITextures.BUTTON_STANDARD).setPos(120, 4).setSize(18, 18));
+ String[] mModeText = new String[] { "Normal Crafting Table", "???", "1x1", "2x2", "3x3", "Unifier", "Dust",
+ "???", "Hammer?", "Circle" };
+ CycleButtonWidget modeButton = new CycleButtonWidget().setGetter(() -> mMode).setSetter(val -> {
+ mMode = val;
+ switchMode();
+ }).setLength(MAX_MODES).setTextureGetter(i -> GTPP_UITextures.OVERLAY_BUTTON_MODE[i]);
for (int i = 0; i < MAX_MODES; i++) {
modeButton.addTooltip(i, "Mode: " + mModeText[i]);
}
- builder.widget(modeButton
- .setBackground(GT_UITextures.BUTTON_STANDARD)
- .setPos(120, 40)
- .setSize(18, 18));
- builder.widget(new DrawableWidget()
- .setDrawable(GTPP_UITextures.PICTURE_WORKBENCH_CIRCLE)
- .setPos(136, 23)
+ builder.widget(modeButton.setBackground(GT_UITextures.BUTTON_STANDARD).setPos(120, 40).setSize(18, 18));
+ builder.widget(
+ new DrawableWidget().setDrawable(GTPP_UITextures.PICTURE_WORKBENCH_CIRCLE).setPos(136, 23)
.setSize(16, 16))
- .widget(new DrawableWidget()
- .setDrawable(GTPP_UITextures.PICTURE_ARROW_WHITE_DOWN)
- .setPos(155, 23)
- .setSize(10, 16));
+ .widget(
+ new DrawableWidget().setDrawable(GTPP_UITextures.PICTURE_ARROW_WHITE_DOWN).setPos(155, 23)
+ .setSize(10, 16));
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_ElectricInventoryManager.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_ElectricInventoryManager.java
index 1a15c563ef..b7ff49716b 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_ElectricInventoryManager.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_ElectricInventoryManager.java
@@ -1,5 +1,13 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.automation;
+import java.util.ArrayList;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.oredict.OreDictionary;
+
import com.gtnewhorizons.modularui.api.ModularUITextures;
import com.gtnewhorizons.modularui.api.drawable.IDrawable;
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
@@ -9,6 +17,7 @@ import com.gtnewhorizons.modularui.common.widget.ButtonWidget;
import com.gtnewhorizons.modularui.common.widget.DrawableWidget;
import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Textures;
import gregtech.api.gui.modularui.GT_UIInfos;
@@ -25,12 +34,6 @@ import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.gui.GTPP_UITextures;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.ArrayList;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.oredict.OreDictionary;
public class GT_MetaTileEntity_ElectricInventoryManager extends GT_MetaTileEntity_TieredMachineBlock
implements IAddGregtechLogo, IAddUIWidgets {
@@ -50,8 +53,8 @@ public class GT_MetaTileEntity_ElectricInventoryManager extends GT_MetaTileEntit
mLocalName = "Auto Workbench (" + GT_Values.VN[aTier] + ")";
}
- public GT_MetaTileEntity_ElectricInventoryManager(
- final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_ElectricInventoryManager(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures) {
super(aName, aTier, 16, aDescription, aTextures);
}
@@ -154,7 +157,10 @@ public class GT_MetaTileEntity_ElectricInventoryManager extends GT_MetaTileEntit
@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_ElectricInventoryManager(
- this.mName, this.mTier, this.mDescription, this.mTextures);
+ this.mName,
+ this.mTier,
+ this.mDescription,
+ this.mTextures);
}
@Override
@@ -240,25 +246,19 @@ public class GT_MetaTileEntity_ElectricInventoryManager extends GT_MetaTileEntit
@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
super.onPostTick(aBaseMetaTileEntity, aTick);
- if (getBaseMetaTileEntity().isAllowedToWork()
- && getBaseMetaTileEntity().isServerSide()
+ if (getBaseMetaTileEntity().isAllowedToWork() && getBaseMetaTileEntity().isServerSide()
&& getBaseMetaTileEntity().getUniversalEnergyStored() >= 5000
- && (getBaseMetaTileEntity().hasWorkJustBeenEnabled()
- || getBaseMetaTileEntity().getTimer() % 100 == 0
+ && (getBaseMetaTileEntity().hasWorkJustBeenEnabled() || getBaseMetaTileEntity().getTimer() % 100 == 0
|| mWorkedLastTick
|| getBaseMetaTileEntity().hasInventoryBeenModified())) {
mWorkedLastTick = false;
- IInventory[] tTileEntities = new IInventory[] {
- getBaseMetaTileEntity().getIInventoryAtSide((byte) 0),
- getBaseMetaTileEntity().getIInventoryAtSide((byte) 1),
- getBaseMetaTileEntity().getIInventoryAtSide((byte) 2),
- getBaseMetaTileEntity().getIInventoryAtSide((byte) 3),
- getBaseMetaTileEntity().getIInventoryAtSide((byte) 4),
- getBaseMetaTileEntity().getIInventoryAtSide((byte) 5),
- null,
- null
- };
+ IInventory[] tTileEntities = new IInventory[] { getBaseMetaTileEntity().getIInventoryAtSide((byte) 0),
+ getBaseMetaTileEntity().getIInventoryAtSide((byte) 1),
+ getBaseMetaTileEntity().getIInventoryAtSide((byte) 2),
+ getBaseMetaTileEntity().getIInventoryAtSide((byte) 3),
+ getBaseMetaTileEntity().getIInventoryAtSide((byte) 4),
+ getBaseMetaTileEntity().getIInventoryAtSide((byte) 5), null, null };
int tCost = 0;
@@ -270,176 +270,152 @@ public class GT_MetaTileEntity_ElectricInventoryManager extends GT_MetaTileEntit
tStack = mInventory[3 + i * 3 + 0];
if (tStack == null) {
- if (getSlot1InOut(i))
- tCost += 5
- * GT_Utility.moveOneItemStack(
- getBaseMetaTileEntity(),
- tTileEntities[getRangeDirection(i)],
- getSlot1Direction(i),
- getSlot1Direction(i),
- null,
- false,
- (byte) 64,
- (byte) 1,
- (byte) 64,
- (byte) 1);
- else
- tCost += 5
- * GT_Utility.moveOneItemStack(
- tTileEntities[getRangeDirection(i)],
- getBaseMetaTileEntity(),
- getSlot1Direction(i),
- getSlot1Direction(i),
- null,
- false,
- (byte) 64,
- (byte) 1,
- (byte) 64,
- (byte) 1);
+ if (getSlot1InOut(i)) tCost += 5 * GT_Utility.moveOneItemStack(
+ getBaseMetaTileEntity(),
+ tTileEntities[getRangeDirection(i)],
+ getSlot1Direction(i),
+ getSlot1Direction(i),
+ null,
+ false,
+ (byte) 64,
+ (byte) 1,
+ (byte) 64,
+ (byte) 1);
+ else tCost += 5 * GT_Utility.moveOneItemStack(
+ tTileEntities[getRangeDirection(i)],
+ getBaseMetaTileEntity(),
+ getSlot1Direction(i),
+ getSlot1Direction(i),
+ null,
+ false,
+ (byte) 64,
+ (byte) 1,
+ (byte) 64,
+ (byte) 1);
} else {
tList.set(0, tStack);
- if (getSlot1InOut(i))
- tCost += 5
- * GT_Utility.moveOneItemStack(
- getBaseMetaTileEntity(),
- tTileEntities[getRangeDirection(i)],
- getSlot1Direction(i),
- getSlot1Direction(i),
- tList,
- false,
- (byte) tStack.stackSize,
- (byte) 1,
- (byte) 64,
- (byte) 1);
- else
- tCost += 5
- * GT_Utility.moveOneItemStack(
- tTileEntities[getRangeDirection(i)],
- getBaseMetaTileEntity(),
- getSlot1Direction(i),
- getSlot1Direction(i),
- tList,
- false,
- (byte) tStack.stackSize,
- (byte) 1,
- (byte) 64,
- (byte) 1);
+ if (getSlot1InOut(i)) tCost += 5 * GT_Utility.moveOneItemStack(
+ getBaseMetaTileEntity(),
+ tTileEntities[getRangeDirection(i)],
+ getSlot1Direction(i),
+ getSlot1Direction(i),
+ tList,
+ false,
+ (byte) tStack.stackSize,
+ (byte) 1,
+ (byte) 64,
+ (byte) 1);
+ else tCost += 5 * GT_Utility.moveOneItemStack(
+ tTileEntities[getRangeDirection(i)],
+ getBaseMetaTileEntity(),
+ getSlot1Direction(i),
+ getSlot1Direction(i),
+ tList,
+ false,
+ (byte) tStack.stackSize,
+ (byte) 1,
+ (byte) 64,
+ (byte) 1);
}
tStack = mInventory[3 + i * 3 + 1];
if (tStack == null) {
- if (getSlot2InOut(i))
- tCost += 5
- * GT_Utility.moveOneItemStack(
- getBaseMetaTileEntity(),
- tTileEntities[getRangeDirection(i)],
- getSlot2Direction(i),
- getSlot2Direction(i),
- null,
- false,
- (byte) 64,
- (byte) 1,
- (byte) 64,
- (byte) 1);
- else
- tCost += 5
- * GT_Utility.moveOneItemStack(
- tTileEntities[getRangeDirection(i)],
- getBaseMetaTileEntity(),
- getSlot2Direction(i),
- getSlot2Direction(i),
- null,
- false,
- (byte) 64,
- (byte) 1,
- (byte) 64,
- (byte) 1);
+ if (getSlot2InOut(i)) tCost += 5 * GT_Utility.moveOneItemStack(
+ getBaseMetaTileEntity(),
+ tTileEntities[getRangeDirection(i)],
+ getSlot2Direction(i),
+ getSlot2Direction(i),
+ null,
+ false,
+ (byte) 64,
+ (byte) 1,
+ (byte) 64,
+ (byte) 1);
+ else tCost += 5 * GT_Utility.moveOneItemStack(
+ tTileEntities[getRangeDirection(i)],
+ getBaseMetaTileEntity(),
+ getSlot2Direction(i),
+ getSlot2Direction(i),
+ null,
+ false,
+ (byte) 64,
+ (byte) 1,
+ (byte) 64,
+ (byte) 1);
} else {
tList.set(0, tStack);
- if (getSlot2InOut(i))
- tCost += 5
- * GT_Utility.moveOneItemStack(
- getBaseMetaTileEntity(),
- tTileEntities[getRangeDirection(i)],
- getSlot2Direction(i),
- getSlot2Direction(i),
- tList,
- false,
- (byte) tStack.stackSize,
- (byte) 1,
- (byte) 64,
- (byte) 1);
- else
- tCost += 5
- * GT_Utility.moveOneItemStack(
- tTileEntities[getRangeDirection(i)],
- getBaseMetaTileEntity(),
- getSlot2Direction(i),
- getSlot2Direction(i),
- tList,
- false,
- (byte) tStack.stackSize,
- (byte) 1,
- (byte) 64,
- (byte) 1);
+ if (getSlot2InOut(i)) tCost += 5 * GT_Utility.moveOneItemStack(
+ getBaseMetaTileEntity(),
+ tTileEntities[getRangeDirection(i)],
+ getSlot2Direction(i),
+ getSlot2Direction(i),
+ tList,
+ false,
+ (byte) tStack.stackSize,
+ (byte) 1,
+ (byte) 64,
+ (byte) 1);
+ else tCost += 5 * GT_Utility.moveOneItemStack(
+ tTileEntities[getRangeDirection(i)],
+ getBaseMetaTileEntity(),
+ getSlot2Direction(i),
+ getSlot2Direction(i),
+ tList,
+ false,
+ (byte) tStack.stackSize,
+ (byte) 1,
+ (byte) 64,
+ (byte) 1);
}
tStack = mInventory[3 + i * 3 + 2];
if (tStack == null) {
- if (getSlot3InOut(i))
- tCost += 5
- * GT_Utility.moveOneItemStack(
- getBaseMetaTileEntity(),
- tTileEntities[getRangeDirection(i)],
- getSlot3Direction(i),
- getSlot3Direction(i),
- null,
- false,
- (byte) 64,
- (byte) 1,
- (byte) 64,
- (byte) 1);
- else
- tCost += 5
- * GT_Utility.moveOneItemStack(
- tTileEntities[getRangeDirection(i)],
- getBaseMetaTileEntity(),
- getSlot3Direction(i),
- getSlot3Direction(i),
- null,
- false,
- (byte) 64,
- (byte) 1,
- (byte) 64,
- (byte) 1);
+ if (getSlot3InOut(i)) tCost += 5 * GT_Utility.moveOneItemStack(
+ getBaseMetaTileEntity(),
+ tTileEntities[getRangeDirection(i)],
+ getSlot3Direction(i),
+ getSlot3Direction(i),
+ null,
+ false,
+ (byte) 64,
+ (byte) 1,
+ (byte) 64,
+ (byte) 1);
+ else tCost += 5 * GT_Utility.moveOneItemStack(
+ tTileEntities[getRangeDirection(i)],
+ getBaseMetaTileEntity(),
+ getSlot3Direction(i),
+ getSlot3Direction(i),
+ null,
+ false,
+ (byte) 64,
+ (byte) 1,
+ (byte) 64,
+ (byte) 1);
} else {
tList.set(0, tStack);
- if (getSlot3InOut(i))
- tCost += 5
- * GT_Utility.moveOneItemStack(
- getBaseMetaTileEntity(),
- tTileEntities[getRangeDirection(i)],
- getSlot3Direction(i),
- getSlot3Direction(i),
- tList,
- false,
- (byte) tStack.stackSize,
- (byte) 1,
- (byte) 64,
- (byte) 1);
- else
- tCost += 5
- * GT_Utility.moveOneItemStack(
- tTileEntities[getRangeDirection(i)],
- getBaseMetaTileEntity(),
- getSlot3Direction(i),
- getSlot3Direction(i),
- tList,
- false,
- (byte) tStack.stackSize,
- (byte) 1,
- (byte) 64,
- (byte) 1);
+ if (getSlot3InOut(i)) tCost += 5 * GT_Utility.moveOneItemStack(
+ getBaseMetaTileEntity(),
+ tTileEntities[getRangeDirection(i)],
+ getSlot3Direction(i),
+ getSlot3Direction(i),
+ tList,
+ false,
+ (byte) tStack.stackSize,
+ (byte) 1,
+ (byte) 64,
+ (byte) 1);
+ else tCost += 5 * GT_Utility.moveOneItemStack(
+ tTileEntities[getRangeDirection(i)],
+ getBaseMetaTileEntity(),
+ getSlot3Direction(i),
+ getSlot3Direction(i),
+ tList,
+ false,
+ (byte) tStack.stackSize,
+ (byte) 1,
+ (byte) 64,
+ (byte) 1);
}
}
}
@@ -453,21 +429,15 @@ public class GT_MetaTileEntity_ElectricInventoryManager extends GT_MetaTileEntit
@Override
public String[] getDescription() {
- return new String[] {"It's simpler than you think. I promise.", this.mDescription, CORE.GT_Tooltip};
- }
-
- /*@Override
- public int getTextureIndex(byte aSide, byte aFacing, boolean aActive, boolean aRedstone) {
- switch (aSide) {
- case 0: return 113 + (aRedstone?8:0);
- case 1: return 112 + (aRedstone?8:0);
- case 2: return 116 + (aRedstone?8:0);
- case 3: return 213 + (aRedstone?8:0);
- case 4: return 212 + (aRedstone?8:0);
- case 5: return 117 + (aRedstone?8:0);
- }
- return 0;
- }*/
+ return new String[] { "It's simpler than you think. I promise.", this.mDescription, CORE.GT_Tooltip };
+ }
+
+ /*
+ * @Override public int getTextureIndex(byte aSide, byte aFacing, boolean aActive, boolean aRedstone) { switch
+ * (aSide) { case 0: return 113 + (aRedstone?8:0); case 1: return 112 + (aRedstone?8:0); case 2: return 116 +
+ * (aRedstone?8:0); case 3: return 213 + (aRedstone?8:0); case 4: return 212 + (aRedstone?8:0); case 5: return 117 +
+ * (aRedstone?8:0); } return 0; }
+ */
@Override
public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) {
@@ -505,98 +475,69 @@ public class GT_MetaTileEntity_ElectricInventoryManager extends GT_MetaTileEntit
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
return this.mTextures[!aRedstone ? aSide : aSide + 6][aColorIndex < 0 ? 0 : aColorIndex];
}
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Red)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Red) };
}
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Green)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Green) };
}
public ITexture[] getNegativeZ(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Blue)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Blue) };
}
public ITexture[] getPositiveZ(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Cyan)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Cyan) };
}
public ITexture[] getNegativeX(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Purple)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Purple) };
}
public ITexture[] getPositiveX(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Yellow)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Yellow) };
}
public ITexture[] getBottomRedstone(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Red_Redstone)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Red_Redstone) };
}
public ITexture[] getTopRedstone(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Green_Redstone)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Green_Redstone) };
}
public ITexture[] getNegativeZRedstone(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Blue_Redstone)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Blue_Redstone) };
}
public ITexture[] getPositiveZRedstone(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Cyan_Redstone)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Cyan_Redstone) };
}
public ITexture[] getNegativeXRedstone(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Purple_Redstone)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Purple_Redstone) };
}
public ITexture[] getPositiveXRedstone(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Yellow_Redstone)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Yellow_Redstone) };
}
@Override
@@ -606,10 +547,8 @@ public class GT_MetaTileEntity_ElectricInventoryManager extends GT_MetaTileEntit
@Override
public void addGregTechLogo(ModularWindow.Builder builder) {
- builder.widget(new DrawableWidget()
- .setDrawable(getGUITextureSet().getGregTechLogo())
- .setSize(17, 17)
- .setPos(154, 59));
+ builder.widget(
+ new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17).setPos(154, 59));
}
// Internal copy of values stored in this tile. Client will use these to render stuff.
@@ -621,139 +560,116 @@ public class GT_MetaTileEntity_ElectricInventoryManager extends GT_MetaTileEntit
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
for (int i = 0; i < 3; i++) {
- builder.widget(new SlotWidget(inventoryHandler, i)
- .setBackground(getGUITextureSet().getItemSlot(), GTPP_UITextures.OVERLAY_SLOT_CHEST)
- .setPos(154, 4 + i * 18));
+ builder.widget(
+ new SlotWidget(inventoryHandler, i)
+ .setBackground(getGUITextureSet().getItemSlot(), GTPP_UITextures.OVERLAY_SLOT_CHEST)
+ .setPos(154, 4 + i * 18));
}
- int[] slotXPositions = new int[] {4, 60, 79, 135};
+ int[] slotXPositions = new int[] { 4, 60, 79, 135 };
for (int i = 0; i < 12; i++) {
final int index = i;
- builder.widget(
- new SlotWidget(new BaseSlot(inventoryHandler, i + 3, true)) {
- @Override
- protected void phantomClick(ClickData clickData, ItemStack cursorStack) {
- super.phantomClick(clickData, cursorStack);
- if (clickData.mouseButton != 0
- && cursorStack != null
- && getMcSlot().getHasStack()) {
- getMcSlot().getStack().setItemDamage(OreDictionary.WILDCARD_VALUE);
- }
- }
- }.setControlsAmount(true)
- .disableShiftInsert()
- .setBackground(() -> {
- if (index % 3 == 0) {
- return new IDrawable[] {
- GTPP_UITextures.SLOT_INVENTORY_MANAGER[mRangeDirections[index / 3]],
- GTPP_UITextures.OVERLAY_SLOT_INVENTORY_MANAGER_COLOR[
- mRangeDirections[index / 3]]
- };
- } else if (index % 3 == 1) {
- return new IDrawable[] {
- GTPP_UITextures.SLOT_INVENTORY_MANAGER[mRangeDirections[index / 3]],
- GTPP_UITextures.OVERLAY_SLOT_INVENTORY_MANAGER_ARROW[
- mRangeDirections[index / 3]]
- };
- } else {
- return new IDrawable[] {
- GTPP_UITextures.SLOT_INVENTORY_MANAGER[mRangeDirections[index / 3]]
- };
- }
- })
- .setPos(slotXPositions[i / 3], 4 + (i % 3) * 18));
+ builder.widget(new SlotWidget(new BaseSlot(inventoryHandler, i + 3, true)) {
+
+ @Override
+ protected void phantomClick(ClickData clickData, ItemStack cursorStack) {
+ super.phantomClick(clickData, cursorStack);
+ if (clickData.mouseButton != 0 && cursorStack != null && getMcSlot().getHasStack()) {
+ getMcSlot().getStack().setItemDamage(OreDictionary.WILDCARD_VALUE);
+ }
+ }
+ }.setControlsAmount(true).disableShiftInsert().setBackground(() -> {
+ if (index % 3 == 0) {
+ return new IDrawable[] { GTPP_UITextures.SLOT_INVENTORY_MANAGER[mRangeDirections[index / 3]],
+ GTPP_UITextures.OVERLAY_SLOT_INVENTORY_MANAGER_COLOR[mRangeDirections[index / 3]] };
+ } else if (index % 3 == 1) {
+ return new IDrawable[] { GTPP_UITextures.SLOT_INVENTORY_MANAGER[mRangeDirections[index / 3]],
+ GTPP_UITextures.OVERLAY_SLOT_INVENTORY_MANAGER_ARROW[mRangeDirections[index / 3]] };
+ } else {
+ return new IDrawable[] { GTPP_UITextures.SLOT_INVENTORY_MANAGER[mRangeDirections[index / 3]] };
+ }
+ }).setPos(slotXPositions[i / 3], 4 + (i % 3) * 18));
}
for (int i = 0; i < 4; i++) {
final int index = i;
- builder.widget(new ButtonWidget()
- .setOnClick((clickData, widget) -> switchRangeEnergy(index))
- .setBackground(() -> new IDrawable[] {
- mTargetEnergy[index] ? ModularUITextures.ITEM_SLOT : GT_UITextures.BUTTON_STANDARD,
- GT_UITextures.OVERLAY_BUTTON_EMIT_ENERGY
- })
- .setPos(slotXPositions[i], 59)
- .setSize(18, 18));
+ builder.widget(
+ new ButtonWidget().setOnClick((clickData, widget) -> switchRangeEnergy(index)).setBackground(
+ () -> new IDrawable[] {
+ mTargetEnergy[index] ? ModularUITextures.ITEM_SLOT : GT_UITextures.BUTTON_STANDARD,
+ GT_UITextures.OVERLAY_BUTTON_EMIT_ENERGY })
+ .setPos(slotXPositions[i], 59).setSize(18, 18));
}
- int[] buttonXPositions = new int[] {23, 41, 98, 116};
+ int[] buttonXPositions = new int[] { 23, 41, 98, 116 };
for (int i = 0; i < 12; i++) {
final int index = i;
- builder.widget(new ButtonWidget()
- .setOnClick((clickData, widget) -> {
- if (index % 3 == 0) {
- if (clickData.mouseButton != 0) {
- switchSlot1InOut(index / 3);
- } else {
- iterateSlot1Direction(index / 3);
- }
- } else if (index % 3 == 1) {
- if (clickData.mouseButton != 0) {
- switchSlot2InOut(index / 3);
- } else {
- iterateSlot2Direction(index / 3);
- }
- } else {
- if (clickData.mouseButton != 0) {
- switchSlot3InOut(index / 3);
- } else {
- iterateSlot3Direction(index / 3);
- }
- }
- })
- .setBackground(() -> new IDrawable[] {
- GT_UITextures.BUTTON_STANDARD,
- GTPP_UITextures.OVERLAY_BUTTON_DIRECTION[mTargetDirections[index]],
- mTargetInOut[index]
- ? GTPP_UITextures.OVERLAY_BUTTON_TIP_RED
- : GTPP_UITextures.OVERLAY_BUTTON_TIP_GREEN
- })
- .setPos(buttonXPositions[i / 3], 4 + (i % 3) * 18)
- .setSize(18, 18));
+ builder.widget(new ButtonWidget().setOnClick((clickData, widget) -> {
+ if (index % 3 == 0) {
+ if (clickData.mouseButton != 0) {
+ switchSlot1InOut(index / 3);
+ } else {
+ iterateSlot1Direction(index / 3);
+ }
+ } else if (index % 3 == 1) {
+ if (clickData.mouseButton != 0) {
+ switchSlot2InOut(index / 3);
+ } else {
+ iterateSlot2Direction(index / 3);
+ }
+ } else {
+ if (clickData.mouseButton != 0) {
+ switchSlot3InOut(index / 3);
+ } else {
+ iterateSlot3Direction(index / 3);
+ }
+ }
+ }).setBackground(
+ () -> new IDrawable[] { GT_UITextures.BUTTON_STANDARD,
+ GTPP_UITextures.OVERLAY_BUTTON_DIRECTION[mTargetDirections[index]],
+ mTargetInOut[index] ? GTPP_UITextures.OVERLAY_BUTTON_TIP_RED
+ : GTPP_UITextures.OVERLAY_BUTTON_TIP_GREEN })
+ .setPos(buttonXPositions[i / 3], 4 + (i % 3) * 18).setSize(18, 18));
}
for (int i = 0; i < 4; i++) {
final int index = i;
- builder.widget(new ButtonWidget()
- .setOnClick((clickData, widget) -> iterateRangeDirection(index))
- .setBackground(() -> new IDrawable[] {
- GT_UITextures.BUTTON_STANDARD,
- GTPP_UITextures.OVERLAY_BUTTON_DIRECTION_GRAY[mRangeDirections[index]]
- })
- .setPos(buttonXPositions[i], 59)
- .setSize(18, 18));
+ builder.widget(
+ new ButtonWidget().setOnClick((clickData, widget) -> iterateRangeDirection(index))
+ .setBackground(
+ () -> new IDrawable[] { GT_UITextures.BUTTON_STANDARD,
+ GTPP_UITextures.OVERLAY_BUTTON_DIRECTION_GRAY[mRangeDirections[index]] })
+ .setPos(buttonXPositions[i], 59).setSize(18, 18));
}
for (int i = 0; i < mTargetDirections.length; i++) {
final int index = i;
- builder.widget(new FakeSyncWidget.ByteSyncer(
- () -> {
- if (index % 3 == 0) {
- return getSlot1Direction(index / 3);
- } else if (index % 3 == 1) {
- return getSlot2Direction(index / 3);
- } else {
- return getSlot3Direction(index / 3);
- }
- },
- val -> mTargetDirections[index] = val));
+ builder.widget(new FakeSyncWidget.ByteSyncer(() -> {
+ if (index % 3 == 0) {
+ return getSlot1Direction(index / 3);
+ } else if (index % 3 == 1) {
+ return getSlot2Direction(index / 3);
+ } else {
+ return getSlot3Direction(index / 3);
+ }
+ }, val -> mTargetDirections[index] = val));
}
for (int i = 0; i < mRangeDirections.length; i++) {
final int index = i;
- builder.widget(new FakeSyncWidget.ByteSyncer(
- () -> getRangeDirection(index), val -> mRangeDirections[index] = val));
+ builder.widget(
+ new FakeSyncWidget.ByteSyncer(
+ () -> getRangeDirection(index),
+ val -> mRangeDirections[index] = val));
}
for (int i = 0; i < mTargetInOut.length; i++) {
final int index = i;
- builder.widget(new FakeSyncWidget.BooleanSyncer(
- () -> {
- if (index % 3 == 0) {
- return getSlot1InOut(index / 3);
- } else if (index % 3 == 1) {
- return getSlot2InOut(index / 3);
- } else {
- return getSlot3InOut(index / 3);
- }
- },
- val -> mTargetInOut[index] = val));
+ builder.widget(new FakeSyncWidget.BooleanSyncer(() -> {
+ if (index % 3 == 0) {
+ return getSlot1InOut(index / 3);
+ } else if (index % 3 == 1) {
+ return getSlot2InOut(index / 3);
+ } else {
+ return getSlot3InOut(index / 3);
+ }
+ }, val -> mTargetInOut[index] = val));
}
for (int i = 0; i < mTargetEnergy.length; i++) {
final int index = i;
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java
index b990e3c55e..f3c4bf0f18 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java
@@ -2,6 +2,19 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.automation;
import static gtPlusPlus.core.lib.CORE.*;
+import java.util.UUID;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.inventory.ISidedInventory;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.*;
+
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IDigitalChest;
@@ -17,17 +30,6 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.helpers.tesseract.TesseractHelper;
-import java.util.UUID;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.ISidedInventory;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.*;
public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_BasicTank {
@@ -39,13 +41,13 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
public int mFrequency = 0;
public UUID mOwner;
- public GT_MetaTileEntity_TesseractGenerator(
- final int aID, final String aName, final String aNameRegional, final int aTier) {
+ public GT_MetaTileEntity_TesseractGenerator(final int aID, final String aName, final String aNameRegional,
+ final int aTier) {
super(aID, aName, aNameRegional, aTier, 3, "");
}
- public GT_MetaTileEntity_TesseractGenerator(
- final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_TesseractGenerator(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures) {
super(aName, aTier, 3, aDescription, aTextures);
}
@@ -137,10 +139,7 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
@Override
public int getProgresstime() {
return (TesseractHelper.getGeneratorByFrequency(PlayerUtils.getPlayerOnServerFromUUID(mOwner), this.mFrequency)
- == this)
- && (this.isWorking >= 20)
- ? 999
- : 0;
+ == this) && (this.isWorking >= 20) ? 999 : 0;
}
@Override
@@ -186,23 +185,15 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
}
@Override
- public boolean onRightclick(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final EntityPlayer aPlayer,
- final byte aSide,
- final float aX,
- final float aY,
- final float aZ) {
+ public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer,
+ final byte aSide, final float aX, final float aY, final float aZ) {
if (this.mOwner == null) {
if (this.getBaseMetaTileEntity().getOwnerName() != null
&& !this.getBaseMetaTileEntity().getOwnerName().equals("")) {
- if (this.getBaseMetaTileEntity()
- .getOwnerName()
- .toLowerCase()
+ if (this.getBaseMetaTileEntity().getOwnerName().toLowerCase()
.equals(aPlayer.getDisplayName().toLowerCase())) {
- this.mOwner = PlayerUtils.getPlayersUUIDByName(
- this.getBaseMetaTileEntity().getOwnerName());
+ this.mOwner = PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName());
}
}
}
@@ -215,8 +206,7 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
Logger.WARNING("Freq. -1 | " + this.mFrequency);
try {
CORE.sTesseractGeneratorOwnershipMap.get(mOwner).remove(this.mFrequency);
- } catch (Throwable t) {
- }
+ } catch (Throwable t) {}
this.mFrequency -= 1;
break;
@@ -224,8 +214,7 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
Logger.WARNING("Freq. +1 | " + this.mFrequency);
try {
CORE.sTesseractGeneratorOwnershipMap.get(mOwner).remove(this.mFrequency);
- } catch (Throwable t) {
- }
+ } catch (Throwable t) {}
this.mFrequency += 1;
default:
// Utils.LOG_WARNING("Did not click the correct place.");
@@ -233,7 +222,8 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
}
if (getGeneratorEntity(this.mFrequency) != null && getGeneratorEntity(this.mFrequency) != this) {
GT_Utility.sendChatToPlayer(
- aPlayer, "Frequency: " + this.mFrequency + EnumChatFormatting.RED + " (Occupied)");
+ aPlayer,
+ "Frequency: " + this.mFrequency + EnumChatFormatting.RED + " (Occupied)");
} else {
GT_Utility.sendChatToPlayer(aPlayer, "Frequency: " + this.mFrequency);
}
@@ -246,8 +236,8 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
}
@Override
- public void onScrewdriverRightClick(
- final byte aSide, final EntityPlayer aPlayer, final float aX, final float aY, final float aZ) {
+ public void onScrewdriverRightClick(final byte aSide, final EntityPlayer aPlayer, final float aX, final float aY,
+ final float aZ) {
if (aPlayer.getUniqueID().compareTo(this.mOwner) == 0) {
if (aSide == this.getBaseMetaTileEntity().getFrontFacing()) {
final float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
@@ -255,34 +245,31 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
case 0:
try {
CORE.sTesseractGeneratorOwnershipMap.get(mOwner).remove(this.mFrequency);
- } catch (Throwable t) {
- }
+ } catch (Throwable t) {}
this.mFrequency -= 64;
break;
case 1:
try {
CORE.sTesseractGeneratorOwnershipMap.get(mOwner).remove(this.mFrequency);
- } catch (Throwable t) {
- }
+ } catch (Throwable t) {}
this.mFrequency += 64;
break;
case 2:
try {
CORE.sTesseractGeneratorOwnershipMap.get(mOwner).remove(this.mFrequency);
- } catch (Throwable t) {
- }
+ } catch (Throwable t) {}
this.mFrequency -= 512;
break;
case 3:
try {
CORE.sTesseractGeneratorOwnershipMap.get(mOwner).remove(this.mFrequency);
- } catch (Throwable t) {
- }
+ } catch (Throwable t) {}
this.mFrequency += 512;
}
if (getGeneratorEntity(this.mFrequency) != null && getGeneratorEntity(this.mFrequency) != this) {
GT_Utility.sendChatToPlayer(
- aPlayer, "Frequency: " + this.mFrequency + EnumChatFormatting.RED + " (Occupied)");
+ aPlayer,
+ "Frequency: " + this.mFrequency + EnumChatFormatting.RED + " (Occupied)");
} else {
GT_Utility.sendChatToPlayer(aPlayer, "Frequency: " + this.mFrequency);
}
@@ -300,18 +287,13 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
public String[] getInfoData() {
final TileEntity tTileEntity = this.getBaseMetaTileEntity()
.getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity != null)
- && (this.getBaseMetaTileEntity().isAllowedToWork())
+ if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork())
&& ((tTileEntity instanceof IGregTechDeviceInformation))
&& (((IGregTechDeviceInformation) tTileEntity).isGivingInformation())) {
return ((IGregTechDeviceInformation) tTileEntity).getInfoData();
}
- return new String[] {
- "Tesseract Generator",
- "Freqency:",
- "" + this.mFrequency,
- (getGeneratorEntity() == this) && (this.isWorking >= 20) ? "Active" : "Inactive"
- };
+ return new String[] { "Tesseract Generator", "Freqency:", "" + this.mFrequency,
+ (getGeneratorEntity() == this) && (this.isWorking >= 20) ? "Active" : "Inactive" };
}
@Override
@@ -322,8 +304,7 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
public boolean isSendingInformation() {
final TileEntity tTileEntity = this.getBaseMetaTileEntity()
.getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity != null)
- && (this.getBaseMetaTileEntity().isAllowedToWork())
+ if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork())
&& ((tTileEntity instanceof IGregTechDeviceInformation))) {
return ((IGregTechDeviceInformation) tTileEntity).isGivingInformation();
}
@@ -334,8 +315,7 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
public boolean isDigitalChest() {
final TileEntity tTileEntity = this.getBaseMetaTileEntity()
.getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity != null)
- && (this.getBaseMetaTileEntity().isAllowedToWork())
+ if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork())
&& ((tTileEntity instanceof IDigitalChest))) {
return ((IDigitalChest) tTileEntity).isDigitalChest();
}
@@ -346,8 +326,7 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
public ItemStack[] getStoredItemData() {
final TileEntity tTileEntity = this.getBaseMetaTileEntity()
.getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity != null)
- && (this.getBaseMetaTileEntity().isAllowedToWork())
+ if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork())
&& ((tTileEntity instanceof IDigitalChest))) {
return ((IDigitalChest) tTileEntity).getStoredItemData();
}
@@ -358,8 +337,7 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
public void setItemCount(final int aCount) {
final TileEntity tTileEntity = this.getBaseMetaTileEntity()
.getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity != null)
- && (this.getBaseMetaTileEntity().isAllowedToWork())
+ if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork())
&& ((tTileEntity instanceof IDigitalChest))) {
((IDigitalChest) tTileEntity).setItemCount(aCount);
}
@@ -369,8 +347,7 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
public int getMaxItemCount() {
final TileEntity tTileEntity = this.getBaseMetaTileEntity()
.getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity != null)
- && (this.getBaseMetaTileEntity().isAllowedToWork())
+ if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork())
&& ((tTileEntity instanceof IDigitalChest))) {
return ((IDigitalChest) tTileEntity).getMaxItemCount();
}
@@ -554,8 +531,7 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
if (!this.getBaseMetaTileEntity().isAllowedToWork()) {
return false;
}
- int J = (aTerminal.getBaseMetaTileEntity().getWorld()
- == this.getBaseMetaTileEntity().getWorld()
+ int J = (aTerminal.getBaseMetaTileEntity().getWorld() == this.getBaseMetaTileEntity().getWorld()
? TESSERACT_ENERGY_COST
: TESSERACT_ENERGY_COST_DIMENSIONAL);
@@ -569,11 +545,9 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
}
public boolean isValidTesseractGenerator(final String aOwnerName, final boolean aWorkIrrelevant) {
- return (this.getBaseMetaTileEntity() != null)
- && (!this.getBaseMetaTileEntity().isInvalidTileEntity())
+ return (this.getBaseMetaTileEntity() != null) && (!this.getBaseMetaTileEntity().isInvalidTileEntity())
&& (this.getBaseMetaTileEntity().isAllowedToWork())
- && ((aOwnerName == null)
- || (this.getBaseMetaTileEntity().getOwnerName().equals(aOwnerName)))
+ && ((aOwnerName == null) || (this.getBaseMetaTileEntity().getOwnerName().equals(aOwnerName)))
&& ((aWorkIrrelevant) || (this.isWorking >= 20));
}
@@ -592,8 +566,7 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
if (PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName()) != null) {
if (this.mOwner == null) {
Logger.WARNING("Setting Generators Owner. 1");
- this.mOwner = PlayerUtils.getPlayersUUIDByName(
- this.getBaseMetaTileEntity().getOwnerName());
+ this.mOwner = PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName());
}
}
@@ -617,7 +590,9 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
.isValidTesseractGenerator(null, true))) {
// Utils.LOG_WARNING("storing TE I think to mFreq map?");
TesseractHelper.setGeneratorOwnershipByPlayer(
- PlayerUtils.getPlayerOnServerFromUUID(mOwner), this.mFrequency, this);
+ PlayerUtils.getPlayerOnServerFromUUID(mOwner),
+ this.mFrequency,
+ this);
}
} else {
if (getGeneratorEntity(Integer.valueOf(this.mFrequency)) == this) {
@@ -646,25 +621,22 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
@Override
public String[] getDescription() {
- return new String[] {
- this.mDescription,
- "Generates a Tesseract for the attached Inventory",
- "Connect with pipes to insert items",
- "Consumes " + TESSERACT_ENERGY_COST + "EU/t for same dimension transfers",
- "Consumes " + TESSERACT_ENERGY_COST_DIMENSIONAL + "EU/t for cross dimensional transfers",
- CORE.GT_Tooltip
- };
+ return new String[] { this.mDescription, "Generates a Tesseract for the attached Inventory",
+ "Connect with pipes to insert items",
+ "Consumes " + TESSERACT_ENERGY_COST + "EU/t for same dimension transfers",
+ "Consumes " + TESSERACT_ENERGY_COST_DIMENSIONAL + "EU/t for cross dimensional transfers",
+ CORE.GT_Tooltip };
}
@Override
- public boolean allowPullStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return false;
}
@Override
- public boolean allowPutStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return false;
}
@@ -674,22 +646,13 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
return aSide == aFacing
- ? new ITexture[] {
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional),
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_Frequency)
- }
- : new ITexture[] {
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional),
- new GT_RenderedTexture(Textures.BlockIcons.VOID)
- };
+ ? new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional),
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_Frequency) }
+ : new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional),
+ new GT_RenderedTexture(Textures.BlockIcons.VOID) };
}
// To-Do?
@@ -724,8 +687,8 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
}
private GT_MetaTileEntity_TesseractGenerator getGeneratorEntity() {
- GT_MetaTileEntity_TesseractGenerator thisGenerator =
- TesseractHelper.getGeneratorByFrequency(PlayerUtils.getPlayerOnServerFromUUID(mOwner), this.mFrequency);
+ GT_MetaTileEntity_TesseractGenerator thisGenerator = TesseractHelper
+ .getGeneratorByFrequency(PlayerUtils.getPlayerOnServerFromUUID(mOwner), this.mFrequency);
if (thisGenerator != null) {
return thisGenerator;
}
@@ -733,8 +696,8 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
}
private GT_MetaTileEntity_TesseractGenerator getGeneratorEntity(int frequency) {
- GT_MetaTileEntity_TesseractGenerator thisGenerator =
- TesseractHelper.getGeneratorByFrequency(PlayerUtils.getPlayerOnServerFromUUID(mOwner), frequency);
+ GT_MetaTileEntity_TesseractGenerator thisGenerator = TesseractHelper
+ .getGeneratorByFrequency(PlayerUtils.getPlayerOnServerFromUUID(mOwner), frequency);
if (thisGenerator != null) {
return thisGenerator;
}
@@ -745,8 +708,7 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
public void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer) {
if (this.getBaseMetaTileEntity().getOwnerName() != null
&& !this.getBaseMetaTileEntity().getOwnerName().equals("")) {
- this.mOwner = PlayerUtils.getPlayersUUIDByName(
- this.getBaseMetaTileEntity().getOwnerName());
+ this.mOwner = PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName());
Logger.WARNING("Setting Generators Owner. 2");
}
super.onCreated(aStack, aWorld, aPlayer);
@@ -756,8 +718,7 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
public void onRemoval() {
try {
CORE.sTesseractGeneratorOwnershipMap.get(mOwner).remove(this.mFrequency);
- } catch (Throwable t) {
- }
+ } catch (Throwable t) {}
super.onRemoval();
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java
index 5d2a9ae009..cfcdc5f6f9 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java
@@ -1,5 +1,17 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.automation;
+import java.util.UUID;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.fluids.FluidTankInfo;
+
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -12,18 +24,9 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.helpers.tesseract.TesseractHelper;
-import java.util.UUID;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.FluidTankInfo;
public class GT_MetaTileEntity_TesseractTerminal extends GT_MetaTileEntity_BasicTank {
+
public int mFrequency = 0;
public UUID mOwner;
public boolean mDidWork = false;
@@ -31,13 +34,13 @@ public class GT_MetaTileEntity_TesseractTerminal extends GT_MetaTileEntity_Basic
private static int TESSERACT_ENERGY_COST = 128;
private static int TESSERACT_ENERGY_COST_DIMENSIONAL = 512;
- public GT_MetaTileEntity_TesseractTerminal(
- final int aID, final String aName, final String aNameRegional, final int aTier) {
+ public GT_MetaTileEntity_TesseractTerminal(final int aID, final String aName, final String aNameRegional,
+ final int aTier) {
super(aID, aName, aNameRegional, aTier, 3, "");
}
- public GT_MetaTileEntity_TesseractTerminal(
- final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_TesseractTerminal(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures) {
super(aName, aTier, 3, aDescription, aTextures);
}
@@ -141,23 +144,15 @@ public class GT_MetaTileEntity_TesseractTerminal extends GT_MetaTileEntity_Basic
}
@Override
- public boolean onRightclick(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final EntityPlayer aPlayer,
- final byte aSide,
- final float aX,
- final float aY,
- final float aZ) {
+ public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer,
+ final byte aSide, final float aX, final float aY, final float aZ) {
if (this.mOwner == null) {
if (this.getBaseMetaTileEntity().getOwnerName() != null
&& !this.getBaseMetaTileEntity().getOwnerName().equals("")) {
- if (this.getBaseMetaTileEntity()
- .getOwnerName()
- .toLowerCase()
+ if (this.getBaseMetaTileEntity().getOwnerName().toLowerCase()
.equals(aPlayer.getDisplayName().toLowerCase())) {
- this.mOwner = PlayerUtils.getPlayersUUIDByName(
- this.getBaseMetaTileEntity().getOwnerName());
+ this.mOwner = PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName());
}
}
}
@@ -170,33 +165,27 @@ public class GT_MetaTileEntity_TesseractTerminal extends GT_MetaTileEntity_Basic
// Utils.LOG_WARNING("Freq. -1 | " + this.mFrequency);
try {
CORE.sTesseractTerminalOwnershipMap.get(mOwner).remove(this.mFrequency);
- } catch (Throwable t) {
- }
+ } catch (Throwable t) {}
this.mFrequency -= 1;
break;
case 1:
// Utils.LOG_WARNING("Freq. +1 | " + this.mFrequency);
try {
CORE.sTesseractTerminalOwnershipMap.get(mOwner).remove(this.mFrequency);
- } catch (Throwable t) {
- }
+ } catch (Throwable t) {}
this.mFrequency += 1;
default:
// Utils.LOG_WARNING("Did not click the correct place.");
try {
CORE.sTesseractTerminalOwnershipMap.get(mOwner).remove(this.mFrequency);
- } catch (Throwable t) {
- }
+ } catch (Throwable t) {}
break;
}
PlayerUtils.messagePlayer(aPlayer, "Frequency: " + this.mFrequency);
if (this.getTesseract(this.mFrequency, false) != null) {
PlayerUtils.messagePlayer(
aPlayer,
- new StringBuilder()
- .append(EnumChatFormatting.GREEN)
- .append(" (Connected)")
- .toString());
+ new StringBuilder().append(EnumChatFormatting.GREEN).append(" (Connected)").toString());
}
}
} else if (aPlayer.getUniqueID().compareTo(this.mOwner) != 0) {
@@ -206,8 +195,8 @@ public class GT_MetaTileEntity_TesseractTerminal extends GT_MetaTileEntity_Basic
}
@Override
- public void onScrewdriverRightClick(
- final byte aSide, final EntityPlayer aPlayer, final float aX, final float aY, final float aZ) {
+ public void onScrewdriverRightClick(final byte aSide, final EntityPlayer aPlayer, final float aX, final float aY,
+ final float aZ) {
if (aPlayer.getUniqueID().compareTo(this.mOwner) == 0) {
if (aSide == this.getBaseMetaTileEntity().getFrontFacing()) {
final float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
@@ -215,39 +204,32 @@ public class GT_MetaTileEntity_TesseractTerminal extends GT_MetaTileEntity_Basic
case 0:
try {
CORE.sTesseractTerminalOwnershipMap.get(mOwner).remove(this.mFrequency);
- } catch (Throwable t) {
- }
+ } catch (Throwable t) {}
this.mFrequency -= 64;
break;
case 1:
try {
CORE.sTesseractTerminalOwnershipMap.get(mOwner).remove(this.mFrequency);
- } catch (Throwable t) {
- }
+ } catch (Throwable t) {}
this.mFrequency += 64;
break;
case 2:
try {
CORE.sTesseractTerminalOwnershipMap.get(mOwner).remove(this.mFrequency);
- } catch (Throwable t) {
- }
+ } catch (Throwable t) {}
this.mFrequency -= 512;
break;
case 3:
try {
CORE.sTesseractTerminalOwnershipMap.get(mOwner).remove(this.mFrequency);
- } catch (Throwable t) {
- }
+ } catch (Throwable t) {}
this.mFrequency += 512;
}
GT_Utility.sendChatToPlayer(
aPlayer,
"Frequency: " + this.mFrequency
- + (this.getTesseract(this.mFrequency, false) == null
- ? ""
- : new StringBuilder()
- .append(EnumChatFormatting.GREEN)
- .append(" (Connected)")
+ + (this.getTesseract(this.mFrequency, false) == null ? ""
+ : new StringBuilder().append(EnumChatFormatting.GREEN).append(" (Connected)")
.toString()));
}
} else if (aPlayer.getUniqueID().compareTo(this.mOwner) != 0) {
@@ -260,8 +242,8 @@ public class GT_MetaTileEntity_TesseractTerminal extends GT_MetaTileEntity_Basic
}
public GT_MetaTileEntity_TesseractGenerator getTesseract(final int aFrequency, final boolean aWorkIrrelevant) {
- final GT_MetaTileEntity_TesseractGenerator rTesseract =
- TesseractHelper.getGeneratorByFrequency(PlayerUtils.getPlayerOnServerFromUUID(mOwner), aFrequency);
+ final GT_MetaTileEntity_TesseractGenerator rTesseract = TesseractHelper
+ .getGeneratorByFrequency(PlayerUtils.getPlayerOnServerFromUUID(mOwner), aFrequency);
if (rTesseract == null) {
return null;
}
@@ -270,15 +252,16 @@ public class GT_MetaTileEntity_TesseractTerminal extends GT_MetaTileEntity_Basic
}
if (rTesseract.mFrequency != aFrequency) {
TesseractHelper.setTerminalOwnershipByPlayer(
- PlayerUtils.getPlayerOnServerFromUUID(mOwner), Integer.valueOf(aFrequency), null);
+ PlayerUtils.getPlayerOnServerFromUUID(mOwner),
+ Integer.valueOf(aFrequency),
+ null);
return null;
}
if (!rTesseract.isValidTesseractGenerator(this.getBaseMetaTileEntity().getOwnerName(), aWorkIrrelevant)) {
return null;
}
if ((!sInterDimensionalTesseractAllowed)
- && (rTesseract.getBaseMetaTileEntity().getWorld()
- != this.getBaseMetaTileEntity().getWorld())) {
+ && (rTesseract.getBaseMetaTileEntity().getWorld() != this.getBaseMetaTileEntity().getWorld())) {
return null;
}
return rTesseract;
@@ -287,17 +270,12 @@ public class GT_MetaTileEntity_TesseractTerminal extends GT_MetaTileEntity_Basic
@Override
public String[] getInfoData() {
final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
- if ((tTileEntity != null)
- && (this.getBaseMetaTileEntity().isAllowedToWork())
+ if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork())
&& (tTileEntity.isSendingInformation())) {
return tTileEntity.getInfoData();
}
- return new String[] {
- "Tesseract Generator",
- "Freqency:",
- "" + this.mFrequency,
- this.getTesseract(this.mFrequency, false) != null ? "Active" : "Inactive"
- };
+ return new String[] { "Tesseract Generator", "Freqency:", "" + this.mFrequency,
+ this.getTesseract(this.mFrequency, false) != null ? "Active" : "Inactive" };
}
@Override
@@ -487,13 +465,11 @@ public class GT_MetaTileEntity_TesseractTerminal extends GT_MetaTileEntity_Basic
@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- if ((this.getBaseMetaTileEntity().isServerSide())
- && (this.getBaseMetaTileEntity().isAllowedToWork())) {
+ if ((this.getBaseMetaTileEntity().isServerSide()) && (this.getBaseMetaTileEntity().isAllowedToWork())) {
// Set owner
if (PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName()) != null) {
if (this.mOwner == null) {
- this.mOwner = PlayerUtils.getPlayersUUIDByName(
- this.getBaseMetaTileEntity().getOwnerName());
+ this.mOwner = PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName());
}
}
final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, true);
@@ -513,26 +489,22 @@ public class GT_MetaTileEntity_TesseractTerminal extends GT_MetaTileEntity_Basic
@Override
public String[] getDescription() {
- return new String[] {
- this.mDescription,
- "Accesses Tesseract Generators remotely",
- "Connect with pipes to extract items or fluids",
- "Outputs from the back face",
- "Consumes " + TESSERACT_ENERGY_COST + "EU/t for same dimension transfers",
- "Consumes " + TESSERACT_ENERGY_COST_DIMENSIONAL + "EU/t for cross dimensional transfers",
- CORE.GT_Tooltip
- };
+ return new String[] { this.mDescription, "Accesses Tesseract Generators remotely",
+ "Connect with pipes to extract items or fluids", "Outputs from the back face",
+ "Consumes " + TESSERACT_ENERGY_COST + "EU/t for same dimension transfers",
+ "Consumes " + TESSERACT_ENERGY_COST_DIMENSIONAL + "EU/t for cross dimensional transfers",
+ CORE.GT_Tooltip };
}
@Override
- public boolean allowPullStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return false;
}
@Override
- public boolean allowPutStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return false;
}
@@ -542,22 +514,13 @@ public class GT_MetaTileEntity_TesseractTerminal extends GT_MetaTileEntity_Basic
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
return aSide == aFacing
- ? new ITexture[] {
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional),
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_Frequency)
- }
- : new ITexture[] {
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional),
- new GT_RenderedTexture(Textures.BlockIcons.VOID)
- };
+ ? new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional),
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_Frequency) }
+ : new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional),
+ new GT_RenderedTexture(Textures.BlockIcons.VOID) };
}
// To-Do?
@@ -595,8 +558,7 @@ public class GT_MetaTileEntity_TesseractTerminal extends GT_MetaTileEntity_Basic
public void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer) {
if (this.getBaseMetaTileEntity().getOwnerName() != null
&& !this.getBaseMetaTileEntity().getOwnerName().equals("")) {
- this.mOwner = PlayerUtils.getPlayersUUIDByName(
- this.getBaseMetaTileEntity().getOwnerName());
+ this.mOwner = PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName());
}
super.onCreated(aStack, aWorld, aPlayer);
}
@@ -605,8 +567,7 @@ public class GT_MetaTileEntity_TesseractTerminal extends GT_MetaTileEntity_Basic
public void onRemoval() {
try {
CORE.sTesseractTerminalOwnershipMap.get(mOwner).remove(this.mFrequency);
- } catch (Throwable t) {
- }
+ } catch (Throwable t) {}
super.onRemoval();
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java
index 277fc8d873..ed71bcabe7 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java
@@ -1,7 +1,13 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.generators;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntityFurnace;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidTankInfo;
+
import com.gtnewhorizons.modularui.api.drawable.IDrawable;
import com.gtnewhorizons.modularui.api.drawable.UITexture;
+
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
@@ -18,10 +24,6 @@ import gregtech.api.util.GT_Utility;
import gregtech.common.tileentities.boilers.GT_MetaTileEntity_Boiler;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.gui.GTPP_UITextures;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntityFurnace;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.FluidTankInfo;
public class GT_MetaTileEntity_Boiler_Base extends GT_MetaTileEntity_Boiler {
@@ -46,14 +48,10 @@ public class GT_MetaTileEntity_Boiler_Base extends GT_MetaTileEntity_Boiler {
@Override
public String[] getDescription() {
- return new String[] {
- this.mDescription,
- "Produces " + getPollution() + " pollution/sec",
- "Consumes fuel only when temperature is less than 100C",
- "Fuel with burn time greater than 500 is more efficient.",
- "Doesn't explode if there's no water",
- CORE.GT_Tooltip
- };
+ return new String[] { this.mDescription, "Produces " + getPollution() + " pollution/sec",
+ "Consumes fuel only when temperature is less than 100C",
+ "Fuel with burn time greater than 500 is more efficient.", "Doesn't explode if there's no water",
+ CORE.GT_Tooltip };
}
public ITexture getOverlayIcon() {
@@ -91,25 +89,15 @@ public class GT_MetaTileEntity_Boiler_Base extends GT_MetaTileEntity_Boiler {
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
- return this.mTextures[
- (aActive ? 5 : 0)
- + (aSide == aFacing
- ? 0
- : aSide == GT_Utility.getOppositeSide(aFacing)
- ? 1
- : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][
- aColorIndex + 1];
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0
+ : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex
+ + 1];
}
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[this.tier][aColor + 1], this.getCasingTexture()};
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.tier][aColor + 1], this.getCasingTexture() };
}
public ITexture[] getBack(final byte aColor) {
@@ -125,7 +113,7 @@ public class GT_MetaTileEntity_Boiler_Base extends GT_MetaTileEntity_Boiler {
}
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[this.tier][aColor + 1], this.getCasingTexture()};
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.tier][aColor + 1], this.getCasingTexture() };
}
public ITexture[] getFrontActive(final byte aColor) {
@@ -233,9 +221,8 @@ public class GT_MetaTileEntity_Boiler_Base extends GT_MetaTileEntity_Boiler {
// Since this type of machine can have different water and steam capacities, we need to override getTankInfo() to
// support returning those different capacities.
public FluidTankInfo[] getTankInfo(ForgeDirection aSide) {
- return new FluidTankInfo[] {
- new FluidTankInfo(this.mFluid, getCapacity()), new FluidTankInfo(this.mSteam, getSteamCapacity())
- };
+ return new FluidTankInfo[] { new FluidTankInfo(this.mFluid, getCapacity()),
+ new FluidTankInfo(this.mSteam, getSteamCapacity()) };
}
@Override
@@ -306,12 +293,12 @@ public class GT_MetaTileEntity_Boiler_Base extends GT_MetaTileEntity_Boiler {
@Override
protected IDrawable[] getFuelSlotBackground() {
- return new IDrawable[] {getGUITextureSet().getItemSlot(), GTPP_UITextures.OVERLAY_SLOT_COAL};
+ return new IDrawable[] { getGUITextureSet().getItemSlot(), GTPP_UITextures.OVERLAY_SLOT_COAL };
}
@Override
protected IDrawable[] getAshSlotBackground() {
- return new IDrawable[] {getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_DUST};
+ return new IDrawable[] { getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_DUST };
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_HV.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_HV.java
index 867623f692..d2a924009f 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_HV.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_HV.java
@@ -29,27 +29,20 @@ public class GT_MetaTileEntity_Boiler_HV extends GT_MetaTileEntity_Boiler_Base {
@Override
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {
- super.getFront(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT)
- };
+ return new ITexture[] { super.getFront(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT) };
}
@Override
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {
- super.getTop(aColor)[0],
- this.getCasingTexture(),
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Talonite)
- };
+ return new ITexture[] { super.getTop(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Talonite) };
}
@Override
public ITexture[] getFrontActive(final byte aColor) {
- return new ITexture[] {
- super.getFrontActive(aColor)[0],
- this.getCasingTexture(),
- new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT_ACTIVE)
- };
+ return new ITexture[] { super.getFrontActive(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT_ACTIVE) };
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_LV.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_LV.java
index 6aeedaa6f3..98dd73a13c 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_LV.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_LV.java
@@ -29,27 +29,20 @@ public class GT_MetaTileEntity_Boiler_LV extends GT_MetaTileEntity_Boiler_Base {
@Override
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {
- super.getFront(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT)
- };
+ return new ITexture[] { super.getFront(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT) };
}
@Override
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {
- super.getTop(aColor)[0],
- this.getCasingTexture(),
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Potin)
- };
+ return new ITexture[] { super.getTop(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Potin) };
}
@Override
public ITexture[] getFrontActive(final byte aColor) {
- return new ITexture[] {
- super.getFrontActive(aColor)[0],
- this.getCasingTexture(),
- new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT_ACTIVE)
- };
+ return new ITexture[] { super.getFrontActive(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT_ACTIVE) };
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_MV.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_MV.java
index 9f329f92da..cb2a5fbbd8 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_MV.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_MV.java
@@ -29,27 +29,20 @@ public class GT_MetaTileEntity_Boiler_MV extends GT_MetaTileEntity_Boiler_Base {
@Override
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {
- super.getFront(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT)
- };
+ return new ITexture[] { super.getFront(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT) };
}
@Override
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {
- super.getTop(aColor)[0],
- this.getCasingTexture(),
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Tumbaga)
- };
+ return new ITexture[] { super.getTop(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Tumbaga) };
}
@Override
public ITexture[] getFrontActive(final byte aColor) {
- return new ITexture[] {
- super.getFrontActive(aColor)[0],
- this.getCasingTexture(),
- new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT_ACTIVE)
- };
+ return new ITexture[] { super.getFrontActive(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT_ACTIVE) };
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java
index 888cb6a195..00ce747e4f 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java
@@ -1,5 +1,10 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.generators;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.fluids.IFluidHandler;
+
import gregtech.api.enums.Dyes;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
@@ -9,66 +14,55 @@ import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_ModHandler;
import gregtech.common.tileentities.boilers.GT_MetaTileEntity_Boiler;
import gtPlusPlus.core.lib.CORE;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.IFluidHandler;
public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler {
+
public GT_MetaTileEntity_Boiler_Solar(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional, "Steam Power by the Sun");
}
- public GT_MetaTileEntity_Boiler_Solar(
- final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_Boiler_Solar(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
}
@Override
public String[] getDescription() {
- return new String[] {
- this.mDescription, "Produces " + (this.getPollution() * 20) + " pollution/sec", CORE.GT_Tooltip
- };
+ return new String[] { this.mDescription, "Produces " + (this.getPollution() * 20) + " pollution/sec",
+ CORE.GT_Tooltip };
}
@Override
public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
final ITexture[][][] rTextures = new ITexture[4][17][];
for (byte i = -1; i < 16; i = (byte) (i + 1)) {
- final ITexture[] tmp0 = {
- new GT_RenderedTexture(
- Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))
- };
+ final ITexture[] tmp0 = { new GT_RenderedTexture(
+ Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
rTextures[0][(i + 1)] = tmp0;
final ITexture[] tmp1 = {
- new GT_RenderedTexture(
- Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)),
- new GT_RenderedTexture(Textures.BlockIcons.BOILER_SOLAR)
- };
+ new GT_RenderedTexture(
+ Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)),
+ new GT_RenderedTexture(Textures.BlockIcons.BOILER_SOLAR) };
rTextures[1][(i + 1)] = tmp1;
- final ITexture[] tmp2 = {
- new GT_RenderedTexture(
- Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))
- };
+ final ITexture[] tmp2 = { new GT_RenderedTexture(
+ Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
rTextures[2][(i + 1)] = tmp2;
final ITexture[] tmp3 = {
- new GT_RenderedTexture(
- Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)),
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE)
- };
+ new GT_RenderedTexture(
+ Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE) };
rTextures[3][(i + 1)] = tmp3;
}
return rTextures;
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
return this.mTextures[aSide >= 2 ? ((byte) (aSide != aFacing ? 2 : 3)) : aSide][aColorIndex + 1];
}
@@ -111,11 +105,11 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler {
final byte i = aBaseMetaTileEntity.getFrontFacing();
final IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(i);
if (tTileEntity != null) {
- final FluidStack tDrained = aBaseMetaTileEntity.drain(
- ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false);
+ final FluidStack tDrained = aBaseMetaTileEntity
+ .drain(ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false);
if (tDrained != null) {
- final int tFilledAmount = tTileEntity.fill(
- ForgeDirection.getOrientation(i).getOpposite(), tDrained, false);
+ final int tFilledAmount = tTileEntity
+ .fill(ForgeDirection.getOrientation(i).getOpposite(), tDrained, false);
if (tFilledAmount > 0) {
tTileEntity.fill(
ForgeDirection.getOrientation(i).getOpposite(),
@@ -156,16 +150,14 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler {
this.sendSound((byte) 1);
this.mSteam.amount = 12000;
}
- if ((this.mProcessingEnergy <= 0)
- && (aBaseMetaTileEntity.isAllowedToWork())
+ if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork())
&& ((aTick % 256L) == 0L)
&& (!aBaseMetaTileEntity.getWorld().isThundering())) {
- final boolean bRain =
- aBaseMetaTileEntity.getWorld().isRaining() && (aBaseMetaTileEntity.getBiome().rainfall > 0.0F);
+ final boolean bRain = aBaseMetaTileEntity.getWorld().isRaining()
+ && (aBaseMetaTileEntity.getBiome().rainfall > 0.0F);
this.mProcessingEnergy += (bRain && (aBaseMetaTileEntity.getWorld().skylightSubtracted >= 4))
- || !aBaseMetaTileEntity.getSkyAtSide((byte) 1)
- ? 0
- : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8 : 1;
+ || !aBaseMetaTileEntity.getSkyAtSide((byte) 1) ? 0
+ : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8 : 1;
}
if ((this.mTemperature < 500) && (this.mProcessingEnergy > 0) && ((aTick % 12L) == 0L)) {
this.mProcessingEnergy -= 1;
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_RfConvertor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_RfConvertor.java
index e077d5ef90..9b0548d95a 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_RfConvertor.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_RfConvertor.java
@@ -2,6 +2,13 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.generators;
import static gregtech.api.enums.GT_Values.V;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraftforge.common.util.ForgeDirection;
+
import cofh.api.energy.IEnergyProvider;
import cofh.api.energy.IEnergyReceiver;
import cofh.api.energy.IEnergyStorage;
@@ -22,48 +29,30 @@ import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GregtechMetaEnergyBuffer;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraftforge.common.util.ForgeDirection;
/**
* NEVER INCLUDE THIS FILE IN YOUR MOD!!!
*
- * This is the main construct for my Basic Machines such as the Automatic Extractor
- * Extend this class to make a simple Machine
+ * This is the main construct for my Basic Machines such as the Automatic Extractor Extend this class to make a simple
+ * Machine
*/
public class GT_MetaTileEntity_RfConvertor extends GregtechMetaEnergyBuffer implements IEnergyReceiver {
- public GT_MetaTileEntity_RfConvertor(
- final String aName,
- final int aTier,
- final String aDescription,
- final ITexture[][][] aTextures,
- final int aSlotCount) {
+ public GT_MetaTileEntity_RfConvertor(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures, final int aSlotCount) {
super(aName, aTier, aDescription, aTextures, aSlotCount);
}
- public GT_MetaTileEntity_RfConvertor(
- final int aID,
- final String aName,
- final String aNameRegional,
- final int aTier,
- final String aDescription,
- final int aSlotCount) {
+ public GT_MetaTileEntity_RfConvertor(final int aID, final String aName, final String aNameRegional, final int aTier,
+ final String aDescription, final int aSlotCount) {
super(aID, aName, aNameRegional, aTier, aDescription, aSlotCount);
}
@Override
public String[] getDescription() {
- return new String[] {
- "Use Screwdriver to change voltage",
- "Hold Shift while using Screwdriver to change amperage",
- EnumChatFormatting.DARK_AQUA + "Variable Output Voltage",
- CORE.GT_Tooltip
- };
+ return new String[] { "Use Screwdriver to change voltage",
+ "Hold Shift while using Screwdriver to change amperage",
+ EnumChatFormatting.DARK_AQUA + "Variable Output Voltage", CORE.GT_Tooltip };
}
@Override
@@ -71,37 +60,36 @@ public class GT_MetaTileEntity_RfConvertor extends GregtechMetaEnergyBuffer impl
ITexture[][][] rTextures = new ITexture[12][17][];
GT_RenderedTexture aTex = new GT_RenderedTexture(TexturesGtBlock.Casing_Material_ZirconiumCarbide);
for (byte i = -1; i < 16; i++) {
- rTextures[0][i + 1] = new ITexture[] {aTex, Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier]};
- rTextures[1][i + 1] = new ITexture[] {aTex, Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier]};
- rTextures[2][i + 1] = new ITexture[] {aTex, Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier]};
- rTextures[3][i + 1] = new ITexture[] {aTex, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier]};
- rTextures[4][i + 1] = new ITexture[] {aTex, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier]};
- rTextures[5][i + 1] = new ITexture[] {aTex, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier]};
- rTextures[6][i + 1] = new ITexture[] {aTex, Textures.BlockIcons.OVERLAYS_ENERGY_IN[mTier]};
- rTextures[7][i + 1] = new ITexture[] {aTex, Textures.BlockIcons.OVERLAYS_ENERGY_IN[mTier]};
- rTextures[8][i + 1] = new ITexture[] {aTex, Textures.BlockIcons.OVERLAYS_ENERGY_IN[mTier]};
- rTextures[9][i + 1] = new ITexture[] {aTex, Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier]};
- rTextures[10][i + 1] = new ITexture[] {aTex, Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier]};
- rTextures[11][i + 1] = new ITexture[] {aTex, Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier]};
+ rTextures[0][i + 1] = new ITexture[] { aTex, Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier] };
+ rTextures[1][i + 1] = new ITexture[] { aTex, Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier] };
+ rTextures[2][i + 1] = new ITexture[] { aTex, Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier] };
+ rTextures[3][i + 1] = new ITexture[] { aTex, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier] };
+ rTextures[4][i + 1] = new ITexture[] { aTex, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier] };
+ rTextures[5][i + 1] = new ITexture[] { aTex, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier] };
+ rTextures[6][i + 1] = new ITexture[] { aTex, Textures.BlockIcons.OVERLAYS_ENERGY_IN[mTier] };
+ rTextures[7][i + 1] = new ITexture[] { aTex, Textures.BlockIcons.OVERLAYS_ENERGY_IN[mTier] };
+ rTextures[8][i + 1] = new ITexture[] { aTex, Textures.BlockIcons.OVERLAYS_ENERGY_IN[mTier] };
+ rTextures[9][i + 1] = new ITexture[] { aTex, Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier] };
+ rTextures[10][i + 1] = new ITexture[] { aTex, Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier] };
+ rTextures[11][i + 1] = new ITexture[] { aTex, Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier] };
}
return rTextures;
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
return mTextures[Math.min(2, aSide) + (aSide == aFacing ? 3 : 0) + (aActive ? 0 : 6)][aColorIndex + 1];
}
@Override
public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_RfConvertor(
- this.mName, this.mTier, this.mDescription, this.mTextures, this.mInventory.length);
+ this.mName,
+ this.mTier,
+ this.mDescription,
+ this.mTextures,
+ this.mInventory.length);
}
@Override
@@ -161,9 +149,8 @@ public class GT_MetaTileEntity_RfConvertor extends GregtechMetaEnergyBuffer impl
aBaseMetaTileEntity.setActive(true);
}
if (this.getEUVar() < this.maxEUStore()) {
- for (byte i = 0;
- i < 6 && aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity();
- i++) {
+ for (byte i = 0; i < 6
+ && aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity(); i++) {
if (isInputFacing(i)) {
receiveEnergy(ForgeDirection.getOrientation(i), Integer.MAX_VALUE, false);
}
@@ -174,21 +161,21 @@ public class GT_MetaTileEntity_RfConvertor extends GregtechMetaEnergyBuffer impl
}
@Override
- public boolean allowPullStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return false;
}
@Override
- public boolean allowPutStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return false;
}
@Override
public String[] getInfoData() {
String[] infoData = super.getInfoData();
- return new String[] {infoData[0], "Converts RF -> GTEU | Tier: " + this.mTier, infoData[1], infoData[2]};
+ return new String[] { infoData[0], "Converts RF -> GTEU | Tier: " + this.mTier, infoData[1], infoData[2] };
}
@Override
@@ -248,8 +235,7 @@ public class GT_MetaTileEntity_RfConvertor extends GregtechMetaEnergyBuffer impl
return 0;
}
- Logger.WARNING("Someone is trying to inject RF from " + from + ". Type:"
- + tTileEntity.getClass().getName());
+ Logger.WARNING("Someone is trying to inject RF from " + from + ". Type:" + tTileEntity.getClass().getName());
// Calculate maximum RF we need to consume
int aInputRF = MathUtils.safeInt(this.maxEUOutput() * GregTech_API.mEUtoRF / 100);
@@ -272,57 +258,55 @@ public class GT_MetaTileEntity_RfConvertor extends GregtechMetaEnergyBuffer impl
long tEU = 0;
byte aSide = (byte) from.ordinal();
Logger.WARNING("Free: " + aRemainingSpace + "EU");
- if (tTileEntity instanceof IEnergyProvider
- && ((IEnergyProvider) tTileEntity)
- .extractEnergy(
- ForgeDirection.getOrientation(GT_Utility.getOppositeSide(aSide)),
- 1,
- true)
- == 1) {
- tEU = (long) ((IEnergyProvider) tTileEntity)
- .extractEnergy(
- ForgeDirection.getOrientation(GT_Utility.getOppositeSide(aSide)),
- (int) maxEUOutput() * 100 / GregTech_API.mRFtoEU,
- false);
+ if (tTileEntity instanceof IEnergyProvider && ((IEnergyProvider) tTileEntity)
+ .extractEnergy(ForgeDirection.getOrientation(GT_Utility.getOppositeSide(aSide)), 1, true)
+ == 1) {
+ tEU = (long) ((IEnergyProvider) tTileEntity).extractEnergy(
+ ForgeDirection.getOrientation(GT_Utility.getOppositeSide(aSide)),
+ (int) maxEUOutput() * 100 / GregTech_API.mRFtoEU,
+ false);
Logger.WARNING("Drained from IEnergyProvider Tile: " + (tEU * 100 / GregTech_API.mRFtoEU) + "");
tEU = tEU * GregTech_API.mRFtoEU / 100;
} else if (tTileEntity instanceof IEnergyStorage
&& ((IEnergyStorage) tTileEntity).extractEnergy(1, true) == 1) {
- tEU = (long) ((IEnergyStorage) tTileEntity)
- .extractEnergy((int) maxEUOutput() * 100 / GregTech_API.mRFtoEU, false);
- Logger.WARNING("Drained from IEnergyStorage Tile: " + (tEU * 100 / GregTech_API.mRFtoEU) + "");
- tEU = tEU * GregTech_API.mRFtoEU / 100;
- } else if (GregTech_API.meIOLoaded
- && tTileEntity instanceof IPowerContainer
- && ((IPowerContainer) tTileEntity).getEnergyStored() > 0) {
- int storedRF = ((IPowerContainer) tTileEntity).getEnergyStored();
- int extractRF = (int) maxEUOutput() * 100 / GregTech_API.mRFtoEU;
- tEU = 0;
- if (tTileEntity instanceof TileCapBank) {
- ICapBankNetwork network = ((TileCapBank) tTileEntity).getNetwork();
- if (network != null && network.getEnergyStoredL() > 0) {
- tEU = Math.min(
- (Math.min(
- Math.min(network.getEnergyStoredL(), storedRF - extractRF),
- network.getMaxOutput()))
- * GregTech_API.mRFtoEU
- / 100,
- maxEUOutput());
- Logger.WARNING("Drained from EIO CapBank Tile: " + (tEU * 100 / GregTech_API.mRFtoEU) + "");
- network.addEnergy((int) -(tEU * 100 / GregTech_API.mRFtoEU));
- }
- } else {
- if (storedRF > extractRF) {
- ((IPowerContainer) tTileEntity).setEnergyStored(storedRF - extractRF);
- tEU = maxEUOutput();
- Logger.WARNING("Drained from EIO Tile: " + (tEU * 100 / GregTech_API.mRFtoEU) + "");
- } else {
- ((IPowerContainer) tTileEntity).setEnergyStored(0);
- tEU = storedRF * GregTech_API.mRFtoEU / 100;
- Logger.WARNING("Drained from EIO Tile: " + (tEU * 100 / GregTech_API.mRFtoEU) + "");
- }
- }
- }
+ tEU = (long) ((IEnergyStorage) tTileEntity)
+ .extractEnergy((int) maxEUOutput() * 100 / GregTech_API.mRFtoEU, false);
+ Logger.WARNING(
+ "Drained from IEnergyStorage Tile: " + (tEU * 100 / GregTech_API.mRFtoEU) + "");
+ tEU = tEU * GregTech_API.mRFtoEU / 100;
+ } else
+ if (GregTech_API.meIOLoaded && tTileEntity instanceof IPowerContainer
+ && ((IPowerContainer) tTileEntity).getEnergyStored() > 0) {
+ int storedRF = ((IPowerContainer) tTileEntity).getEnergyStored();
+ int extractRF = (int) maxEUOutput() * 100 / GregTech_API.mRFtoEU;
+ tEU = 0;
+ if (tTileEntity instanceof TileCapBank) {
+ ICapBankNetwork network = ((TileCapBank) tTileEntity).getNetwork();
+ if (network != null && network.getEnergyStoredL() > 0) {
+ tEU = Math.min(
+ (Math.min(
+ Math.min(network.getEnergyStoredL(), storedRF - extractRF),
+ network.getMaxOutput())) * GregTech_API.mRFtoEU / 100,
+ maxEUOutput());
+ Logger.WARNING(
+ "Drained from EIO CapBank Tile: " + (tEU * 100 / GregTech_API.mRFtoEU)
+ + "");
+ network.addEnergy((int) -(tEU * 100 / GregTech_API.mRFtoEU));
+ }
+ } else {
+ if (storedRF > extractRF) {
+ ((IPowerContainer) tTileEntity).setEnergyStored(storedRF - extractRF);
+ tEU = maxEUOutput();
+ Logger.WARNING(
+ "Drained from EIO Tile: " + (tEU * 100 / GregTech_API.mRFtoEU) + "");
+ } else {
+ ((IPowerContainer) tTileEntity).setEnergyStored(0);
+ tEU = storedRF * GregTech_API.mRFtoEU / 100;
+ Logger.WARNING(
+ "Drained from EIO Tile: " + (tEU * 100 / GregTech_API.mRFtoEU) + "");
+ }
+ }
+ }
Logger.WARNING("EU to inject: " + tEU + "EU");
if (!simulate) {
aVal = this.getBaseMetaTileEntity().increaseStoredEnergyUnits(tEU, true);
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java
index 7d9ecebf2c..502cdd2d7e 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java
@@ -1,5 +1,7 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.generators;
+import net.minecraft.item.ItemStack;
+
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
@@ -17,24 +19,23 @@ import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import net.minecraft.item.ItemStack;
public class GT_MetaTileEntity_SemiFluidGenerator extends GT_MetaTileEntity_BasicGenerator {
public int mEfficiency;
- /*public GT_MetaTileEntity_SemiFluidGenerator(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier);
- onConfigLoad();
- }*/
+ /*
+ * public GT_MetaTileEntity_SemiFluidGenerator(int aID, String aName, String aNameRegional, int aTier) { super(aID,
+ * aName, aNameRegional, aTier); onConfigLoad(); }
+ */
public GT_MetaTileEntity_SemiFluidGenerator(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier, "Requires semi-fluid Fuel", new ITexture[0]);
onConfigLoad();
}
- public GT_MetaTileEntity_SemiFluidGenerator(
- String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_SemiFluidGenerator(String aName, int aTier, String aDescription,
+ ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
onConfigLoad();
}
@@ -69,12 +70,8 @@ public class GT_MetaTileEntity_SemiFluidGenerator extends GT_MetaTileEntity_Basi
@Override
public String[] getDescription() {
- return new String[] {
- this.mDescription,
- "Produces " + (this.getPollution()) + " pollution/sec",
- "Fuel Efficiency: " + this.getEfficiency() + "%",
- CORE.GT_Tooltip
- };
+ return new String[] { this.mDescription, "Produces " + (this.getPollution()) + " pollution/sec",
+ "Fuel Efficiency: " + this.getEfficiency() + "%", CORE.GT_Tooltip };
}
@Override
@@ -111,75 +108,63 @@ public class GT_MetaTileEntity_SemiFluidGenerator extends GT_MetaTileEntity_Basi
@Override
public ITexture[] getFront(byte aColor) {
- return new ITexture[] {
- super.getFront(aColor)[0],
- new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_FRONT),
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]
- };
+ return new ITexture[] { super.getFront(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_FRONT),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] };
}
@Override
public ITexture[] getBack(byte aColor) {
- return new ITexture[] {
- super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP)
- };
+ return new ITexture[] { super.getBack(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP) };
}
@Override
public ITexture[] getBottom(byte aColor) {
- return new ITexture[] {
- super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM)
- };
+ return new ITexture[] { super.getBottom(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM) };
}
@Override
public ITexture[] getTop(byte aColor) {
- return new ITexture[] {
- super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE)
- };
+ return new ITexture[] { super.getTop(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE) };
}
@Override
public ITexture[] getSides(byte aColor) {
- return new ITexture[] {
- super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP)
- };
+ return new ITexture[] { super.getSides(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP) };
}
@Override
public ITexture[] getFrontActive(byte aColor) {
- return new ITexture[] {
- super.getFrontActive(aColor)[0],
- new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_FRONT_ACTIVE),
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]
- };
+ return new ITexture[] { super.getFrontActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_FRONT_ACTIVE),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] };
}
@Override
public ITexture[] getBackActive(byte aColor) {
- return new ITexture[] {
- super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP_ACTIVE)
- };
+ return new ITexture[] { super.getBackActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP_ACTIVE) };
}
@Override
public ITexture[] getBottomActive(byte aColor) {
- return new ITexture[] {
- super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM_ACTIVE)
- };
+ return new ITexture[] { super.getBottomActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM_ACTIVE) };
}
@Override
public ITexture[] getTopActive(byte aColor) {
- return new ITexture[] {
- super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE)
- };
+ return new ITexture[] { super.getTopActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE) };
}
@Override
public ITexture[] getSidesActive(byte aColor) {
- return new ITexture[] {
- super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP_ACTIVE)
- };
+ return new ITexture[] { super.getSidesActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP_ACTIVE) };
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java
index 2897f621d6..cee2bbff15 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java
@@ -1,5 +1,7 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.generators;
+import net.minecraft.item.ItemStack;
+
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
@@ -14,14 +16,13 @@ import gregtech.api.util.GT_Recipe;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators.GregtechRocketFuelGeneratorBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.item.ItemStack;
public class GregtechMetaTileEntityDoubleFuelGeneratorBase extends GregtechRocketFuelGeneratorBase {
public int mEfficiency;
- public GregtechMetaTileEntityDoubleFuelGeneratorBase(
- final int aID, final String aName, final String aNameRegional, final int aTier) {
+ public GregtechMetaTileEntityDoubleFuelGeneratorBase(final int aID, final String aName, final String aNameRegional,
+ final int aTier) {
super(
aID,
aName,
@@ -32,20 +33,16 @@ public class GregtechMetaTileEntityDoubleFuelGeneratorBase extends GregtechRocke
this.onConfigLoad();
}
- public GregtechMetaTileEntityDoubleFuelGeneratorBase(
- final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
+ public GregtechMetaTileEntityDoubleFuelGeneratorBase(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
this.onConfigLoad();
}
@Override
public String[] getDescription() {
- return new String[] {
- this.mDescription,
- "Generates power at " + this.getEfficiency() + "% Efficiency per tick",
- "Output Voltage: " + this.getOutputTier() + " EU/t",
- CORE.GT_Tooltip
- };
+ return new String[] { this.mDescription, "Generates power at " + this.getEfficiency() + "% Efficiency per tick",
+ "Output Voltage: " + this.getOutputTier() + " EU/t", CORE.GT_Tooltip };
}
@Override
@@ -56,7 +53,10 @@ public class GregtechMetaTileEntityDoubleFuelGeneratorBase extends GregtechRocke
@Override
public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntityDoubleFuelGeneratorBase(
- this.mName, this.mTier, this.mDescription, this.mTextures);
+ this.mName,
+ this.mTier,
+ this.mDescription,
+ this.mTextures);
}
@Override
@@ -71,7 +71,9 @@ public class GregtechMetaTileEntityDoubleFuelGeneratorBase extends GregtechRocke
public void onConfigLoad() {
this.mEfficiency = GregTech_API.sMachineFile.get(
- ConfigCategories.machineconfig, "RocketEngine.efficiency.tier." + this.mTier, (100 - (this.mTier * 8)));
+ ConfigCategories.machineconfig,
+ "RocketEngine.efficiency.tier." + this.mTier,
+ (100 - (this.mTier * 8)));
}
@Override
@@ -98,89 +100,67 @@ public class GregtechMetaTileEntityDoubleFuelGeneratorBase extends GregtechRocke
return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Ultra);
}
- // return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top);
+ // return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top);
}
@Override
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {
- super.getFront(aColor)[0],
- this.getCasingTexture(),
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]
- };
+ return new ITexture[] { super.getFront(aColor)[0], this.getCasingTexture(),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] };
}
@Override
public ITexture[] getBack(final byte aColor) {
- return new ITexture[] {
- super.getBack(aColor)[0],
- this.getCasingTexture(),
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent)
- };
+ return new ITexture[] { super.getBack(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent) };
}
@Override
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {
- super.getBottom(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { super.getBottom(aColor)[0],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
@Override
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {
- super.getTop(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off)
- };
+ return new ITexture[] { super.getTop(aColor)[0],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off) };
}
@Override
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {
- super.getSides(aColor)[0],
- this.getCasingTexture(),
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal)
- };
+ return new ITexture[] { super.getSides(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal) };
}
@Override
public ITexture[] getFrontActive(final byte aColor) {
- return new ITexture[] {
- super.getFrontActive(aColor)[0],
- this.getCasingTexture(),
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]
- };
+ return new ITexture[] { super.getFrontActive(aColor)[0], this.getCasingTexture(),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] };
}
@Override
public ITexture[] getBackActive(final byte aColor) {
- return new ITexture[] {
- super.getBackActive(aColor)[0],
- this.getCasingTexture(),
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent_Fast)
- };
+ return new ITexture[] { super.getBackActive(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent_Fast) };
}
@Override
public ITexture[] getBottomActive(final byte aColor) {
- return new ITexture[] {
- super.getBottomActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { super.getBottomActive(aColor)[0],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
@Override
public ITexture[] getTopActive(final byte aColor) {
- return new ITexture[] {
- super.getTopActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On)
- };
+ return new ITexture[] { super.getTopActive(aColor)[0],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On) };
}
@Override
public ITexture[] getSidesActive(final byte aColor) {
- return new ITexture[] {
- super.getSidesActive(aColor)[0],
- this.getCasingTexture(),
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal_Active)
- };
+ return new ITexture[] { super.getSidesActive(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal_Active) };
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java
index 520f960ec9..e116379aef 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java
@@ -1,5 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.generators;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
@@ -15,21 +18,19 @@ import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
public class GregtechMetaTileEntityGeothermalGenerator extends GT_MetaTileEntity_BasicGenerator {
public int mEfficiency;
- public GregtechMetaTileEntityGeothermalGenerator(
- final int aID, final String aName, final String aNameRegional, final int aTier) {
+ public GregtechMetaTileEntityGeothermalGenerator(final int aID, final String aName, final String aNameRegional,
+ final int aTier) {
super(aID, aName, aNameRegional, aTier, "Requires Pahoehoe Lava or Normal Lava as Fuel", new ITexture[0]);
this.onConfigLoad();
}
- public GregtechMetaTileEntityGeothermalGenerator(
- final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
+ public GregtechMetaTileEntityGeothermalGenerator(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
this.onConfigLoad();
}
@@ -37,12 +38,8 @@ public class GregtechMetaTileEntityGeothermalGenerator extends GT_MetaTileEntity
@Override
public String[] getDescription() {
String aPollution = "Causes " + this.getPollution() + " Pollution per second";
- return new String[] {
- this.mDescription,
- "Generates power at " + this.getEfficiency() + "% Efficiency per tick",
- aPollution,
- CORE.GT_Tooltip
- };
+ return new String[] { this.mDescription, "Generates power at " + this.getEfficiency() + "% Efficiency per tick",
+ aPollution, CORE.GT_Tooltip };
}
@Override
@@ -90,83 +87,68 @@ public class GregtechMetaTileEntityGeothermalGenerator extends GT_MetaTileEntity
@Override
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {
- super.getFront(aColor)[0],
- new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE),
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]
- };
+ return new ITexture[] { super.getFront(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] };
}
@Override
public ITexture[] getBack(final byte aColor) {
- return new ITexture[] {
- super.getBack(aColor)[0],
- new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK),
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Vertical)
- };
+ return new ITexture[] { super.getBack(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Vertical) };
}
@Override
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {
- super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM)
- };
+ return new ITexture[] { super.getBottom(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM) };
}
@Override
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {
- super.getTop(aColor)[0],
- new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE),
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER)
- };
+ return new ITexture[] { super.getTop(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER) };
}
@Override
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.BOILER_LAVA_FRONT)
- };
+ return new ITexture[] { super.getSides(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.BOILER_LAVA_FRONT) };
}
@Override
public ITexture[] getFrontActive(final byte aColor) {
- return new ITexture[] {
- super.getFrontActive(aColor)[0],
- new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE),
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]
- };
+ return new ITexture[] { super.getFrontActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] };
}
@Override
public ITexture[] getBackActive(final byte aColor) {
- return new ITexture[] {
- super.getBackActive(aColor)[0],
- new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK_ACTIVE),
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Vertical_Active)
- };
+ return new ITexture[] { super.getBackActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK_ACTIVE),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Vertical_Active) };
}
@Override
public ITexture[] getBottomActive(final byte aColor) {
- return new ITexture[] {
- super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM_ACTIVE)
- };
+ return new ITexture[] { super.getBottomActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM_ACTIVE) };
}
@Override
public ITexture[] getTopActive(final byte aColor) {
- return new ITexture[] {
- super.getTopActive(aColor)[0],
- new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE),
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE)
- };
+ return new ITexture[] { super.getTopActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE) };
}
@Override
public ITexture[] getSidesActive(final byte aColor) {
- return new ITexture[] {
- super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.BOILER_LAVA_FRONT_ACTIVE)
- };
+ return new ITexture[] { super.getSidesActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.BOILER_LAVA_FRONT_ACTIVE) };
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java
index b6c2f27ce6..734f2a8919 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java
@@ -1,5 +1,7 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.generators;
+import net.minecraft.item.ItemStack;
+
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
@@ -14,20 +16,19 @@ import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Recipe;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators.GregtechRocketFuelGeneratorBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.item.ItemStack;
public class GregtechMetaTileEntityRocketFuelGenerator extends GregtechRocketFuelGeneratorBase {
public int mEfficiency;
- public GregtechMetaTileEntityRocketFuelGenerator(
- final int aID, final String aName, final String aNameRegional, final int aTier) {
+ public GregtechMetaTileEntityRocketFuelGenerator(final int aID, final String aName, final String aNameRegional,
+ final int aTier) {
super(aID, aName, aNameRegional, aTier, "Requires GT++ Rocket Fuels", new ITexture[0]);
this.onConfigLoad();
}
- public GregtechMetaTileEntityRocketFuelGenerator(
- final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
+ public GregtechMetaTileEntityRocketFuelGenerator(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
this.onConfigLoad();
}
@@ -85,88 +86,66 @@ public class GregtechMetaTileEntityRocketFuelGenerator extends GregtechRocketFue
return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Ultra);
}
- // return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top);
+ // return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top);
}
@Override
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {
- super.getFront(aColor)[0],
- this.getCasingTexture(),
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]
- };
+ return new ITexture[] { super.getFront(aColor)[0], this.getCasingTexture(),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] };
}
@Override
public ITexture[] getBack(final byte aColor) {
- return new ITexture[] {
- super.getBack(aColor)[0],
- this.getCasingTexture(),
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent)
- };
+ return new ITexture[] { super.getBack(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent) };
}
@Override
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {
- super.getBottom(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { super.getBottom(aColor)[0],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
@Override
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {
- super.getTop(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off)
- };
+ return new ITexture[] { super.getTop(aColor)[0],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off) };
}
@Override
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {
- super.getSides(aColor)[0],
- this.getCasingTexture(),
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal)
- };
+ return new ITexture[] { super.getSides(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal) };
}
@Override
public ITexture[] getFrontActive(final byte aColor) {
- return new ITexture[] {
- super.getFrontActive(aColor)[0],
- this.getCasingTexture(),
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]
- };
+ return new ITexture[] { super.getFrontActive(aColor)[0], this.getCasingTexture(),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] };
}
@Override
public ITexture[] getBackActive(final byte aColor) {
- return new ITexture[] {
- super.getBackActive(aColor)[0],
- this.getCasingTexture(),
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent_Fast)
- };
+ return new ITexture[] { super.getBackActive(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent_Fast) };
}
@Override
public ITexture[] getBottomActive(final byte aColor) {
- return new ITexture[] {
- super.getBottomActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { super.getBottomActive(aColor)[0],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
@Override
public ITexture[] getTopActive(final byte aColor) {
- return new ITexture[] {
- super.getTopActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On)
- };
+ return new ITexture[] { super.getTopActive(aColor)[0],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On) };
}
@Override
public ITexture[] getSidesActive(final byte aColor) {
- return new ITexture[] {
- super.getSidesActive(aColor)[0],
- this.getCasingTexture(),
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal_Active)
- };
+ return new ITexture[] { super.getSidesActive(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal_Active) };
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java
index 73c8f0adab..7471a0edcc 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java
@@ -5,6 +5,7 @@ import static gregtech.api.enums.GT_Values.V;
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
import com.gtnewhorizons.modularui.common.widget.ProgressBar;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
import gregtech.api.enums.SteamVariant;
@@ -21,26 +22,22 @@ import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generato
public class GregtechMetaTileEntitySolarGenerator extends GregtechMetaSolarGenerator {
- public GregtechMetaTileEntitySolarGenerator(
- final int aID, final String aName, final String aNameRegional, final int aTier) {
+ public GregtechMetaTileEntitySolarGenerator(final int aID, final String aName, final String aNameRegional,
+ final int aTier) {
super(aID, aName, aNameRegional, aTier, "Feasts on the power of the Sun!", new ITexture[0]);
this.onConfigLoad();
}
- public GregtechMetaTileEntitySolarGenerator(
- final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
+ public GregtechMetaTileEntitySolarGenerator(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
this.onConfigLoad();
}
@Override
public String[] getDescription() {
- return new String[] {
- this.mDescription,
- "Generates power at " + this.getEfficiency() + "% Efficiency per tick",
- "Output Voltage: " + this.getOutputTier() + " EU/t",
- CORE.GT_Tooltip
- };
+ return new String[] { this.mDescription, "Generates power at " + this.getEfficiency() + "% Efficiency per tick",
+ "Output Voltage: " + this.getOutputTier() + " EU/t", CORE.GT_Tooltip };
}
@Override
@@ -55,13 +52,14 @@ public class GregtechMetaTileEntitySolarGenerator extends GregtechMetaSolarGener
public void onConfigLoad() {
this.mEfficiency = GregTech_API.sMachineFile.get(
- ConfigCategories.machineconfig, "SunAbsorber.efficiency.tier." + this.mTier, 100 - (this.mTier * 10));
+ ConfigCategories.machineconfig,
+ "SunAbsorber.efficiency.tier." + this.mTier,
+ 100 - (this.mTier * 10));
}
@Override
public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
- if (aBaseMetaTileEntity.isServerSide()
- && aBaseMetaTileEntity.isAllowedToWork()
+ if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork()
&& (aBaseMetaTileEntity.getUniversalEnergyStored()
< (this.maxEUOutput() + aBaseMetaTileEntity.getEUCapacity()))) {
@@ -78,12 +76,12 @@ public class GregtechMetaTileEntitySolarGenerator extends GregtechMetaSolarGener
if ((aTick % 10L) == 0L) {
- Logger.WARNING("getUniversalEnergyStored: " + aBaseMetaTileEntity.getUniversalEnergyStored()
- + " maxEUOutput * 20 + getMinimumStoredEU: "
- + ((this.maxEUOutput() * 20) + this.getMinimumStoredEU()));
+ Logger.WARNING(
+ "getUniversalEnergyStored: " + aBaseMetaTileEntity.getUniversalEnergyStored()
+ + " maxEUOutput * 20 + getMinimumStoredEU: "
+ + ((this.maxEUOutput() * 20) + this.getMinimumStoredEU()));
- if ((this.mSolarCharge > 100)
- && (aBaseMetaTileEntity.isAllowedToWork())
+ if ((this.mSolarCharge > 100) && (aBaseMetaTileEntity.isAllowedToWork())
&& (!aBaseMetaTileEntity.getWorld().isThundering())
&& (aBaseMetaTileEntity.getUniversalEnergyStored()
< (this.maxEUStore() - this.getMinimumStoredEU()))) {
@@ -97,23 +95,21 @@ public class GregtechMetaTileEntitySolarGenerator extends GregtechMetaSolarGener
this.mSolarCharge += 1;
}
- if ((this.mProcessingEnergy <= 0)
- && (aBaseMetaTileEntity.isAllowedToWork())
+ if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork())
&& ((aTick % 64L) == 0L)
&& (!aBaseMetaTileEntity.getWorld().isThundering())) {
Logger.WARNING("Adding Processing Energy. Currently " + this.mProcessingEnergy);
- final boolean bRain =
- aBaseMetaTileEntity.getWorld().isRaining() && (aBaseMetaTileEntity.getBiome().rainfall > 0.0F);
+ final boolean bRain = aBaseMetaTileEntity.getWorld().isRaining()
+ && (aBaseMetaTileEntity.getBiome().rainfall > 0.0F);
this.mProcessingEnergy += (bRain && (aBaseMetaTileEntity.getWorld().skylightSubtracted >= 4))
- || !aBaseMetaTileEntity.getSkyAtSide((byte) 1)
- ? 0
- : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8 : 1;
+ || !aBaseMetaTileEntity.getSkyAtSide((byte) 1) ? 0
+ : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8 : 1;
}
if (aBaseMetaTileEntity.isServerSide()) {
// Utils.LOG_WARNING("6.");
- aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork()
- && (aBaseMetaTileEntity.getUniversalEnergyStored()
+ aBaseMetaTileEntity.setActive(
+ aBaseMetaTileEntity.isAllowedToWork() && (aBaseMetaTileEntity.getUniversalEnergyStored()
>= (this.maxEUOutput() + this.getMinimumStoredEU())));
}
}
@@ -132,87 +128,75 @@ public class GregtechMetaTileEntitySolarGenerator extends GregtechMetaSolarGener
return Math.max(this.getEUVar(), (V[this.mTier] * 16000) + this.getMinimumStoredEU());
}
- ITexture SolarArray[] = {
- new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_8V),
- new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LV),
- new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_MV),
- new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_HV),
- new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_EV),
- new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV),
- new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LuV),
- new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_ZPM),
- new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_UV),
- new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL)
- };
+ ITexture SolarArray[] = { new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_8V),
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LV),
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_MV),
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_HV),
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_EV),
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV),
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LuV),
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_ZPM),
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_UV),
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL) };
@Override
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {
- super.getFront(aColor)[0],
- new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT),
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]
- };
+ return new ITexture[] { super.getFront(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] };
}
@Override
public ITexture[] getBack(final byte aColor) {
- return new ITexture[] {
- super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)
- };
+ return new ITexture[] { super.getBack(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC) };
}
@Override
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {
- super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)
- };
+ return new ITexture[] { super.getBottom(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC) };
}
@Override
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL)};
+ return new ITexture[] { super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL) };
}
@Override
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {
- super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)
- };
+ return new ITexture[] { super.getSides(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC) };
}
@Override
public ITexture[] getFrontActive(final byte aColor) {
- return new ITexture[] {
- super.getFrontActive(aColor)[0],
- new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT_ACTIVE),
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]
- };
+ return new ITexture[] { super.getFrontActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT_ACTIVE),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] };
}
@Override
public ITexture[] getBackActive(final byte aColor) {
- return new ITexture[] {
- super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)
- };
+ return new ITexture[] { super.getBackActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE) };
}
@Override
public ITexture[] getBottomActive(final byte aColor) {
- return new ITexture[] {
- super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)
- };
+ return new ITexture[] { super.getBottomActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE) };
}
@Override
public ITexture[] getTopActive(final byte aColor) {
- return new ITexture[] {super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL)};
+ return new ITexture[] { super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL) };
}
@Override
public ITexture[] getSidesActive(final byte aColor) {
- return new ITexture[] {
- super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)
- };
+ return new ITexture[] { super.getSidesActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE) };
}
@Override
@@ -227,45 +211,36 @@ public class GregtechMetaTileEntitySolarGenerator extends GregtechMetaSolarGener
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
- builder.widget(new ProgressBar()
- .setProgress(() -> (float) mProcessingEnergy / 1000)
+ builder.widget(
+ new ProgressBar().setProgress(() -> (float) mProcessingEnergy / 1000)
.setTexture(
GT_UITextures.PROGRESSBAR_BOILER_EMPTY_STEAM.get(getSteamVariant()),
GT_UITextures.PROGRESSBAR_BOILER_STEAM,
10)
- .setDirection(ProgressBar.Direction.UP)
- .setPos(70, 25)
- .setSize(10, 54))
- .widget(new ProgressBar()
- .setProgress(() -> (float) getBaseMetaTileEntity().getStoredEU())
- .setTexture(
- GT_UITextures.PROGRESSBAR_BOILER_EMPTY_STEAM.get(getSteamVariant()),
- GT_UITextures.PROGRESSBAR_BOILER_WATER,
- 10)
- .setDirection(ProgressBar.Direction.UP)
- .setPos(83, 25)
- .setSize(10, 54))
- .widget(new ProgressBar()
- .setProgress(() -> (float) mSolarCharge / maxProgresstime())
- .setTexture(
- GT_UITextures.PROGRESSBAR_BOILER_EMPTY_STEAM.get(getSteamVariant()),
- GT_UITextures.PROGRESSBAR_BOILER_HEAT,
- 10)
- .setDirection(ProgressBar.Direction.UP)
- .setPos(96, 25)
- .setSize(10, 54))
- .widget(new ProgressBar()
- .setProgress(() -> (float) mProcessingEnergy / 1000)
- .setTexture(GT_UITextures.PROGRESSBAR_FUEL_STEAM.get(getSteamVariant()), 14)
- .setDirection(ProgressBar.Direction.UP)
- .setPos(116, 45)
- .setSize(14, 14));
+ .setDirection(ProgressBar.Direction.UP).setPos(70, 25).setSize(10, 54))
+ .widget(
+ new ProgressBar().setProgress(() -> (float) getBaseMetaTileEntity().getStoredEU())
+ .setTexture(
+ GT_UITextures.PROGRESSBAR_BOILER_EMPTY_STEAM.get(getSteamVariant()),
+ GT_UITextures.PROGRESSBAR_BOILER_WATER,
+ 10)
+ .setDirection(ProgressBar.Direction.UP).setPos(83, 25).setSize(10, 54))
+ .widget(
+ new ProgressBar().setProgress(() -> (float) mSolarCharge / maxProgresstime())
+ .setTexture(
+ GT_UITextures.PROGRESSBAR_BOILER_EMPTY_STEAM.get(getSteamVariant()),
+ GT_UITextures.PROGRESSBAR_BOILER_HEAT,
+ 10)
+ .setDirection(ProgressBar.Direction.UP).setPos(96, 25).setSize(10, 54))
+ .widget(
+ new ProgressBar().setProgress(() -> (float) mProcessingEnergy / 1000)
+ .setTexture(GT_UITextures.PROGRESSBAR_FUEL_STEAM.get(getSteamVariant()), 14)
+ .setDirection(ProgressBar.Direction.UP).setPos(116, 45).setSize(14, 14));
}
@Override
public GUITextureSet getGUITextureSet() {
- return new GUITextureSet()
- .setMainBackground(GT_UITextures.BACKGROUND_STEAM.get(getSteamVariant()))
+ return new GUITextureSet().setMainBackground(GT_UITextures.BACKGROUND_STEAM.get(getSteamVariant()))
.setItemSlot(GT_UITextures.SLOT_ITEM_STEAM.get(getSteamVariant()))
.setCoverTab(
GT_UITextures.TAB_COVER_STEAM_NORMAL.get(getSteamVariant()),
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java
index 5e8907073f..f32f9a8a76 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java
@@ -1,5 +1,11 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.generators;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTTagList;
+import net.minecraftforge.fluids.FluidStack;
+
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -15,13 +21,9 @@ import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
-import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntity_RTG extends GT_MetaTileEntity_BasicGenerator {
+
public int mEfficiency;
private int mDays;
private long mTicksToBurnFor;
@@ -96,9 +98,12 @@ public class GregtechMetaTileEntity_RTG extends GT_MetaTileEntity_BasicGenerator
final NBTTagCompound data = list.getCompoundTagAt(0);
ItemStack lastUsedFuel = ItemStack.loadItemStackFromNBT(data);
if (lastUsedFuel != null) {
- this.mCurrentRecipe = getRecipes()
- .findRecipe(
- getBaseMetaTileEntity(), false, 9223372036854775807L, null, new ItemStack[] {lastUsedFuel});
+ this.mCurrentRecipe = getRecipes().findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ 9223372036854775807L,
+ null,
+ new ItemStack[] { lastUsedFuel });
}
}
@@ -121,8 +126,9 @@ public class GregtechMetaTileEntity_RTG extends GT_MetaTileEntity_BasicGenerator
} else {
if (this.mInventory[getStackDisplaySlot()] == null)
this.mInventory[getStackDisplaySlot()] = new ItemStack(Blocks.fire, 1);
- this.mInventory[getStackDisplaySlot()].setStackDisplayName("Generating: "
- + (aBaseMetaTileEntity.getUniversalEnergyStored() - getMinimumStoredEU()) + " EU");
+ this.mInventory[getStackDisplaySlot()].setStackDisplayName(
+ "Generating: " + (aBaseMetaTileEntity.getUniversalEnergyStored() - getMinimumStoredEU())
+ + " EU");
}
} else {
int tFuelValue = getFuelValue(this.mFluid);
@@ -154,25 +160,22 @@ public class GregtechMetaTileEntity_RTG extends GT_MetaTileEntity_BasicGenerator
}
if ((tProducedEU > 0L) && (getPollution() > 0)) {
PollutionUtils.addPollution(
- aBaseMetaTileEntity, (int) (tProducedEU * getPollution() / 500 * this.mTier + 1L));
+ aBaseMetaTileEntity,
+ (int) (tProducedEU * getPollution() / 500 * this.mTier + 1L));
}
}
- if (aBaseMetaTileEntity.isServerSide())
- aBaseMetaTileEntity.setActive((aBaseMetaTileEntity.isAllowedToWork())
- && (aBaseMetaTileEntity.getUniversalEnergyStored() >= maxEUOutput() + getMinimumStoredEU()));
+ if (aBaseMetaTileEntity.isServerSide()) aBaseMetaTileEntity.setActive(
+ (aBaseMetaTileEntity.isAllowedToWork())
+ && (aBaseMetaTileEntity.getUniversalEnergyStored() >= maxEUOutput() + getMinimumStoredEU()));
}
@Override
public String[] getDescription() {
- return new String[] {
- this.mDescription,
- "Fuel is measured in minecraft days (Check with Scanner)",
- "RTG changes output voltage depending on fuel",
- "Generates power at " + this.getEfficiency() + "% Efficiency per tick",
- "Output Voltage: " + this.getOutputTier() + " EU/t",
- CORE.GT_Tooltip
- };
+ return new String[] { this.mDescription, "Fuel is measured in minecraft days (Check with Scanner)",
+ "RTG changes output voltage depending on fuel",
+ "Generates power at " + this.getEfficiency() + "% Efficiency per tick",
+ "Output Voltage: " + this.getOutputTier() + " EU/t", CORE.GT_Tooltip };
}
public GregtechMetaTileEntity_RTG(int aID, String aName, String aNameRegional, int aTier) {
@@ -199,8 +202,7 @@ public class GregtechMetaTileEntity_RTG extends GT_MetaTileEntity_BasicGenerator
@Override
public boolean isOutputFacing(byte aSide) {
- return ((aSide > 1)
- && (aSide != getBaseMetaTileEntity().getFrontFacing())
+ return ((aSide > 1) && (aSide != getBaseMetaTileEntity().getFrontFacing())
&& (aSide != getBaseMetaTileEntity().getBackFacing()));
}
@@ -226,86 +228,68 @@ public class GregtechMetaTileEntity_RTG extends GT_MetaTileEntity_BasicGenerator
@Override
public ITexture[] getFront(byte aColor) {
- return new ITexture[] {
- super.getFront(aColor)[0],
- new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP),
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_MASSFAB)
- };
+ return new ITexture[] { super.getFront(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_MASSFAB) };
}
@Override
public ITexture[] getBack(byte aColor) {
- return new ITexture[] {
- super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP)
- };
+ return new ITexture[] { super.getBack(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP) };
}
@Override
public ITexture[] getBottom(byte aColor) {
- return new ITexture[] {
- super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP)
- };
+ return new ITexture[] { super.getBottom(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP) };
}
@Override
public ITexture[] getTop(byte aColor) {
- return new ITexture[] {
- super.getTop(aColor)[0],
- new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP),
- new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE)
- };
+ return new ITexture[] { super.getTop(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP),
+ new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE) };
}
@Override
public ITexture[] getSides(byte aColor) {
- return new ITexture[] {
- gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS[this.mTier][(0)],
- new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE),
- gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[getTier()]
- };
+ return new ITexture[] { gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS[this.mTier][(0)],
+ new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE),
+ gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[getTier()] };
}
@Override
public ITexture[] getFrontActive(byte aColor) {
- return new ITexture[] {
- super.getFrontActive(aColor)[0],
- new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE),
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_MASSFAB_ACTIVE)
- };
+ return new ITexture[] { super.getFrontActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_MASSFAB_ACTIVE) };
}
@Override
public ITexture[] getBackActive(byte aColor) {
- return new ITexture[] {
- super.getBackActive(aColor)[0],
- new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE)
- };
+ return new ITexture[] { super.getBackActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE) };
}
@Override
public ITexture[] getBottomActive(byte aColor) {
- return new ITexture[] {
- super.getBottomActive(aColor)[0],
- new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE)
- };
+ return new ITexture[] { super.getBottomActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE) };
}
@Override
public ITexture[] getTopActive(byte aColor) {
- return new ITexture[] {
- super.getTopActive(aColor)[0],
- new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE),
- new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE_ACTIVE)
- };
+ return new ITexture[] { super.getTopActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE),
+ new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE_ACTIVE) };
}
@Override
public ITexture[] getSidesActive(byte aColor) {
- return new ITexture[] {
- gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS[this.mTier][(0)],
- new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE),
- gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[getTier()]
- };
+ return new ITexture[] { gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS[this.mTier][(0)],
+ new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE),
+ gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[getTier()] };
}
public int getPollution() {
@@ -316,7 +300,7 @@ public class GregtechMetaTileEntity_RTG extends GT_MetaTileEntity_BasicGenerator
public int getFuelValue(ItemStack aStack) {
if ((GT_Utility.isStackInvalid(aStack)) || (getRecipes() == null)) return 0;
GT_Recipe tFuel = getRecipes()
- .findRecipe(getBaseMetaTileEntity(), false, 9223372036854775807L, null, new ItemStack[] {aStack});
+ .findRecipe(getBaseMetaTileEntity(), false, 9223372036854775807L, null, new ItemStack[] { aStack });
if (tFuel != null) {
this.mCurrentRecipe = tFuel;
int voltage = tFuel.mEUt;
@@ -384,16 +368,13 @@ public class GregtechMetaTileEntity_RTG extends GT_MetaTileEntity_BasicGenerator
@Override
public String[] getInfoData() {
- return new String[] {
- "RTG - Running at tier " + this.mTier,
- "Active: " + this.getBaseMetaTileEntity().isActive(),
- "Current Output: " + this.mVoltage + " EU/t",
- "Days of Fuel remaining: " + (mTicksToBurnFor / 20 / 60 / 20),
- "Hours of Fuel remaining: " + (mTicksToBurnFor / 20 / 60 / 60),
- "Ticks of " + this.mVoltage + "v remaining: " + (mTicksToBurnFor),
- "Current Recipe input: " + this.mCurrentRecipe != null
- ? this.mCurrentRecipe.mInputs[0].getDisplayName() + " x1"
- : "NUll"
- };
+ return new String[] { "RTG - Running at tier " + this.mTier,
+ "Active: " + this.getBaseMetaTileEntity().isActive(), "Current Output: " + this.mVoltage + " EU/t",
+ "Days of Fuel remaining: " + (mTicksToBurnFor / 20 / 60 / 20),
+ "Hours of Fuel remaining: " + (mTicksToBurnFor / 20 / 60 / 60),
+ "Ticks of " + this.mVoltage + "v remaining: " + (mTicksToBurnFor),
+ "Current Recipe input: " + this.mCurrentRecipe != null
+ ? this.mCurrentRecipe.mInputs[0].getDisplayName() + " x1"
+ : "NUll" };
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_CombustionGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_CombustionGenerator.java
index 3398ad0fc6..70bf88ec77 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_CombustionGenerator.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_CombustionGenerator.java
@@ -11,23 +11,20 @@ import gregtech.common.tileentities.generators.GT_MetaTileEntity_DieselGenerator
import gtPlusPlus.core.lib.CORE;
public class GT_MetaTileEntity_ULV_CombustionGenerator extends GT_MetaTileEntity_DieselGenerator {
+
public GT_MetaTileEntity_ULV_CombustionGenerator(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier);
}
- public GT_MetaTileEntity_ULV_CombustionGenerator(
- String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_ULV_CombustionGenerator(String aName, int aTier, String aDescription,
+ ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
}
@Override
public String[] getDescription() {
- return new String[] {
- this.mDescription,
- "Produces " + (this.getPollution() * 20) + " pollution/sec",
- "Fuel Efficiency: " + this.getEfficiency() + "%",
- CORE.GT_Tooltip
- };
+ return new String[] { this.mDescription, "Produces " + (this.getPollution() * 20) + " pollution/sec",
+ "Fuel Efficiency: " + this.getEfficiency() + "%", CORE.GT_Tooltip };
}
@Override
@@ -47,7 +44,7 @@ public class GT_MetaTileEntity_ULV_CombustionGenerator extends GT_MetaTileEntity
@Override
public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile.get(
- ConfigCategories.machineconfig, "DieselGenerator.efficiency.tier." + this.mTier, 95);
+ this.mEfficiency = GregTech_API.sMachineFile
+ .get(ConfigCategories.machineconfig, "DieselGenerator.efficiency.tier." + this.mTier, 95);
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_GasTurbine.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_GasTurbine.java
index b8f8004dad..c4d3340ac0 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_GasTurbine.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_GasTurbine.java
@@ -14,6 +14,7 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
public class GT_MetaTileEntity_ULV_GasTurbine extends GT_MetaTileEntity_GasTurbine {
+
public GT_MetaTileEntity_ULV_GasTurbine(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier);
}
@@ -24,12 +25,8 @@ public class GT_MetaTileEntity_ULV_GasTurbine extends GT_MetaTileEntity_GasTurbi
@Override
public String[] getDescription() {
- return new String[] {
- this.mDescription,
- "Produces " + (this.getPollution() * 20) + " pollution/sec",
- "Fuel Efficiency: " + this.getEfficiency() + "%",
- CORE.GT_Tooltip
- };
+ return new String[] { this.mDescription, "Produces " + (this.getPollution() * 20) + " pollution/sec",
+ "Fuel Efficiency: " + this.getEfficiency() + "%", CORE.GT_Tooltip };
}
@Override
@@ -48,15 +45,13 @@ public class GT_MetaTileEntity_ULV_GasTurbine extends GT_MetaTileEntity_GasTurbi
@Override
public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile.get(
- ConfigCategories.machineconfig, "GasTurbine.efficiency.tier." + this.mTier, 95);
+ this.mEfficiency = GregTech_API.sMachineFile
+ .get(ConfigCategories.machineconfig, "GasTurbine.efficiency.tier." + this.mTier, 95);
}
@Override
public ITexture[] getSidesActive(final byte aColor) {
- return new ITexture[] {
- super.getSidesActive(aColor)[0],
- new GT_RenderedTexture((IIconContainer) TexturesGtBlock.Overlay_Machine_Turbine_Active)
- };
+ return new ITexture[] { super.getSidesActive(aColor)[0],
+ new GT_RenderedTexture((IIconContainer) TexturesGtBlock.Overlay_Machine_Turbine_Active) };
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_SteamTurbine.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_SteamTurbine.java
index 09e3e3201c..a07e69e00c 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_SteamTurbine.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_SteamTurbine.java
@@ -14,6 +14,7 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
public class GT_MetaTileEntity_ULV_SteamTurbine extends GT_MetaTileEntity_SteamTurbine {
+
public GT_MetaTileEntity_ULV_SteamTurbine(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier);
}
@@ -24,12 +25,8 @@ public class GT_MetaTileEntity_ULV_SteamTurbine extends GT_MetaTileEntity_SteamT
@Override
public String[] getDescription() {
- return new String[] {
- this.mDescription,
- "Produces " + (this.getPollution() * 20) + " pollution/sec",
- "Fuel Efficiency: " + this.getEfficiency() + "%",
- CORE.GT_Tooltip
- };
+ return new String[] { this.mDescription, "Produces " + (this.getPollution() * 20) + " pollution/sec",
+ "Fuel Efficiency: " + this.getEfficiency() + "%", CORE.GT_Tooltip };
}
@Override
@@ -48,15 +45,13 @@ public class GT_MetaTileEntity_ULV_SteamTurbine extends GT_MetaTileEntity_SteamT
@Override
public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile.get(
- ConfigCategories.machineconfig, "SteamTurbine.efficiency.tier." + this.mTier, 6 + 1);
+ this.mEfficiency = GregTech_API.sMachineFile
+ .get(ConfigCategories.machineconfig, "SteamTurbine.efficiency.tier." + this.mTier, 6 + 1);
}
@Override
public ITexture[] getSidesActive(final byte aColor) {
- return new ITexture[] {
- super.getSidesActive(aColor)[0],
- new GT_RenderedTexture((IIconContainer) TexturesGtBlock.Overlay_Machine_Turbine_Active)
- };
+ return new ITexture[] { super.getSidesActive(aColor)[0],
+ new GT_RenderedTexture((IIconContainer) TexturesGtBlock.Overlay_Machine_Turbine_Active) };
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java
index d99ff30b20..42fda63282 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java
@@ -2,7 +2,14 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.generators.creative;
import static gregtech.api.enums.GT_Values.V;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.world.World;
+
import com.gtnewhorizon.gtnhlib.reflect.Fields;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
@@ -18,51 +25,33 @@ import gtPlusPlus.core.util.sys.KeyboardUtils;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon;
import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GregtechMetaEnergyBuffer;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.World;
/**
* NEVER INCLUDE THIS FILE IN YOUR MOD!!!
*
- * This is the main construct for my Basic Machines such as the Automatic
- * Extractor Extend this class to make a simple Machine
+ * This is the main construct for my Basic Machines such as the Automatic Extractor Extend this class to make a simple
+ * Machine
*/
public class GregtechMetaCreativeEnergyBuffer extends GregtechMetaEnergyBuffer {
private int mVoltageTier = 3;
- public GregtechMetaCreativeEnergyBuffer(
- final String aName,
- final int aTier,
- final String aDescription,
- final ITexture[][][] aTextures,
- final int aSlotCount) {
+ public GregtechMetaCreativeEnergyBuffer(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures, final int aSlotCount) {
super(aName, aTier, aDescription, aTextures, aSlotCount);
// TODO Auto-generated constructor stub
}
- public GregtechMetaCreativeEnergyBuffer(
- final int aID,
- final String aName,
- final String aNameRegional,
- final int aTier,
- final String aDescription,
- final int aSlotCount) {
+ public GregtechMetaCreativeEnergyBuffer(final int aID, final String aName, final String aNameRegional,
+ final int aTier, final String aDescription, final int aSlotCount) {
super(aID, aName, aNameRegional, aTier, aDescription, aSlotCount);
}
@Override
public String[] getDescription() {
- return new String[] {
- this.mDescription,
- "Use Screwdriver to change voltage",
- "Hold Shift while using Screwdriver to change amperage",
- EnumChatFormatting.GREEN + "CREATIVE MACHINE",
- CORE.GT_Tooltip
- };
+ return new String[] { this.mDescription, "Use Screwdriver to change voltage",
+ "Hold Shift while using Screwdriver to change amperage", EnumChatFormatting.GREEN + "CREATIVE MACHINE",
+ CORE.GT_Tooltip };
}
/*
@@ -77,25 +66,17 @@ public class GregtechMetaCreativeEnergyBuffer extends GregtechMetaEnergyBuffer {
final ITexture[][][] rTextures = new ITexture[2][17][];
k = j ? g : h;
for (byte i = -1; i < 16; i++) {
- rTextures[0][i + 1] = new ITexture[] {new GT_RenderedTexture(k)};
- rTextures[1][i + 1] = new ITexture[] {
- new GT_RenderedTexture(k),
- this.mInventory.length > 4
- ? Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mVoltageTier]
- : Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mVoltageTier]
- };
+ rTextures[0][i + 1] = new ITexture[] { new GT_RenderedTexture(k) };
+ rTextures[1][i + 1] = new ITexture[] { new GT_RenderedTexture(k),
+ this.mInventory.length > 4 ? Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mVoltageTier]
+ : Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mVoltageTier] };
}
return rTextures;
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
return this.mTextures[aSide == aFacing ? 1 : 0][aColorIndex + 1];
}
@@ -106,15 +87,19 @@ public class GregtechMetaCreativeEnergyBuffer extends GregtechMetaEnergyBuffer {
final double roundOff = Math.round(c * 100.00) / 100.00;
PlayerUtils.messagePlayer(
playerIn,
- "Energy: " + GT_Utility.formatNumbers(tempStorage) + " EU at " + V[this.mVoltageTier] + "v (" + roundOff
- + "%)");
+ "Energy: " + GT_Utility
+ .formatNumbers(tempStorage) + " EU at " + V[this.mVoltageTier] + "v (" + roundOff + "%)");
PlayerUtils.messagePlayer(playerIn, "Amperage: " + GT_Utility.formatNumbers(maxAmperesOut()) + "A");
}
@Override
public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMetaCreativeEnergyBuffer(
- this.mName, this.mTier, this.mDescription, this.mTextures, this.mInventory.length);
+ this.mName,
+ this.mTier,
+ this.mDescription,
+ this.mTextures,
+ this.mInventory.length);
}
@Override
@@ -170,23 +155,22 @@ public class GregtechMetaCreativeEnergyBuffer extends GregtechMetaEnergyBuffer {
}
@Override
- public boolean allowPullStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return false;
}
@Override
- public boolean allowPutStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return false;
}
@Override
public String[] getInfoData() {
String[] infoData = super.getInfoData();
- return new String[] {
- infoData[0], "THIS IS A CREATIVE ITEM - FOR TESTING | Tier: " + this.mVoltageTier, infoData[1], infoData[2]
- };
+ return new String[] { infoData[0], "THIS IS A CREATIVE ITEM - FOR TESTING | Tier: " + this.mVoltageTier,
+ infoData[1], infoData[2] };
}
@Override
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 c65c7be917..c9d575cab1 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
@@ -1,5 +1,13 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic;
+import java.util.*;
+import java.util.Map.Entry;
+
+import net.minecraft.entity.player.*;
+import net.minecraft.item.*;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+
import com.gtnewhorizon.gtnhlib.util.map.ItemStackMap;
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
@@ -7,6 +15,7 @@ import com.gtnewhorizons.modularui.common.widget.CycleButtonWidget;
import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget;
import com.gtnewhorizons.modularui.common.widget.ProgressBar;
import com.gtnewhorizons.modularui.common.widget.SlotGroup;
+
import gregtech.api.enums.*;
import gregtech.api.gui.modularui.GT_UIInfos;
import gregtech.api.gui.modularui.GT_UITextures;
@@ -24,12 +33,6 @@ import gtPlusPlus.xmod.gregtech.api.gui.GTPP_UITextures;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import ic2.api.crops.*;
import ic2.core.item.DamageHandler;
-import java.util.*;
-import java.util.Map.Entry;
-import net.minecraft.entity.player.*;
-import net.minecraft.item.*;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
public class GT_MetaTileEntity_CropHarvestor extends GT_MetaTileEntity_BasicTank {
@@ -51,8 +54,8 @@ public class GT_MetaTileEntity_CropHarvestor extends GT_MetaTileEntity_BasicTank
aDescription);
}
- public GT_MetaTileEntity_CropHarvestor(
- final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_CropHarvestor(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures) {
super(aName, aTier, 21, aDescription, aTextures);
}
@@ -185,9 +188,9 @@ public class GT_MetaTileEntity_CropHarvestor extends GT_MetaTileEntity_BasicTank
@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
super.onPostTick(aBaseMetaTileEntity, aTick);
- if (!getBaseMetaTileEntity().isServerSide()
- || !getBaseMetaTileEntity().isAllowedToWork()
- || (!getBaseMetaTileEntity().hasWorkJustBeenEnabled() && aTick % 100 != 0)) return;
+ if (!getBaseMetaTileEntity().isServerSide() || !getBaseMetaTileEntity().isAllowedToWork()
+ || (!getBaseMetaTileEntity().hasWorkJustBeenEnabled() && aTick % 100 != 0))
+ return;
if (this.getBaseMetaTileEntity().getUniversalEnergyStored() < getMinimumStoredEU()) return;
@@ -328,8 +331,7 @@ public class GT_MetaTileEntity_CropHarvestor extends GT_MetaTileEntity_BasicTank
if (!this.mModeAlternative) {
return;
}
- if (hasFertilizer()
- && consumeFertilizer(true)
+ if (hasFertilizer() && consumeFertilizer(true)
&& this.getBaseMetaTileEntity().getUniversalEnergyStored() >= getMinimumStoredEU()
&& getBaseMetaTileEntity().decreaseStoredEnergyUnits(powerUsageSecondary(), true)
&& applyFertilizer(aCrop)) {
@@ -337,14 +339,12 @@ public class GT_MetaTileEntity_CropHarvestor extends GT_MetaTileEntity_BasicTank
// Logger.INFO("Consumed Fert.");
}
}
- if (this.getFluidAmount() > 0
- && this.getBaseMetaTileEntity().getUniversalEnergyStored() >= getMinimumStoredEU()
+ if (this.getFluidAmount() > 0 && this.getBaseMetaTileEntity().getUniversalEnergyStored() >= getMinimumStoredEU()
&& getBaseMetaTileEntity().decreaseStoredEnergyUnits(powerUsageSecondary(), true)
&& applyHydration(aCrop)) {
// Logger.INFO("Consumed Water.");
}
- if (hasWeedEX()
- && consumeWeedEX(true)
+ if (hasWeedEX() && consumeWeedEX(true)
&& this.getBaseMetaTileEntity().getUniversalEnergyStored() >= getMinimumStoredEU()
&& getBaseMetaTileEntity().decreaseStoredEnergyUnits(powerUsageSecondary(), true)
&& applyWeedEx(aCrop)) {
@@ -359,8 +359,7 @@ public class GT_MetaTileEntity_CropHarvestor extends GT_MetaTileEntity_BasicTank
aCrop.setWeedExStorage(aCrop.getWeedExStorage() + 50);
boolean triggerDecline;
triggerDecline = aCrop.getWorld().rand.nextInt(3) == 0;
- if (aCrop.getCrop() != null
- && aCrop.getCrop().isWeed(aCrop)
+ if (aCrop.getCrop() != null && aCrop.getCrop().isWeed(aCrop)
&& aCrop.getWeedExStorage() >= 75
&& triggerDecline) {
switch (aCrop.getWorld().rand.nextInt(5)) {
@@ -445,8 +444,7 @@ public class GT_MetaTileEntity_CropHarvestor extends GT_MetaTileEntity_BasicTank
int damageApplied = 0;
ItemStack stack = this.mInventory[aSlot];
Item item = stack.getItem();
- if (stack != null
- && item.isDamageable()
+ if (stack != null && item.isDamageable()
&& (ret == null || stack.getItem() == ret.getItem() && ItemStack.areItemStackTagsEqual(stack, ret))) {
if (simulate) {
stack = stack.copy();
@@ -500,17 +498,13 @@ public class GT_MetaTileEntity_CropHarvestor extends GT_MetaTileEntity_BasicTank
public String[] getDescription() {
int aRadius = 10 + getRange(this.mTier);
int aSide = (aRadius - 1) / 2;
- return new String[] {
- this.mDescription,
- "Secondary mode can Hydrate/Fertilize/Weed-EX",
- "Consumes " + powerUsage() + "eu per harvest",
- "Consumes " + powerUsageSecondary() + "eu per secondary operation",
- "Can harvest 2 blocks above and below",
- "Radius: " + aSide + " each side (" + aRadius + "x3x" + aRadius + ")",
- "Has " + (this.mTier * 5) + "% chance for extra drops",
- "Holds " + this.getCapacity() + "L of Water",
- CORE.GT_Tooltip
- };
+ return new String[] { this.mDescription, "Secondary mode can Hydrate/Fertilize/Weed-EX",
+ "Consumes " + powerUsage() + "eu per harvest",
+ "Consumes " + powerUsageSecondary() + "eu per secondary operation",
+ "Can harvest 2 blocks above and below",
+ "Radius: " + aSide + " each side (" + aRadius + "x3x" + aRadius + ")",
+ "Has " + (this.mTier * 5) + "% chance for extra drops", "Holds " + this.getCapacity() + "L of Water",
+ CORE.GT_Tooltip };
}
@Override
@@ -518,47 +512,17 @@ public class GT_MetaTileEntity_CropHarvestor extends GT_MetaTileEntity_BasicTank
return true;
}
- /*@Override
- public int getTextureIndex(byte aSide, byte aFacing, boolean aActive, boolean aRedstone) {
- if (aSide == aFacing)
- return 118+(aRedstone?8:0);
- if (GT_Utility.getOppositeSide(aSide) == aFacing)
- return 113+(aRedstone?8:0);
-
- int tIndex = 128+(aRedstone?8:0);
-
- switch (aFacing) {
- case 0:
- return tIndex+64;
- case 1:
- return tIndex+32;
- case 2: switch (aSide) {
- case 0: return tIndex+32;
- case 1: return tIndex+32;
- case 4: return tIndex+16;
- case 5: return tIndex+48;
- }
- case 3: switch (aSide) {
- case 0: return tIndex+64;
- case 1: return tIndex+64;
- case 4: return tIndex+48;
- case 5: return tIndex+16;
- }
- case 4: switch (aSide) {
- case 0: return tIndex+16;
- case 1: return tIndex+16;
- case 2: return tIndex+48;
- case 3: return tIndex+16;
- }
- case 5: switch (aSide) {
- case 0: return tIndex+48;
- case 1: return tIndex+48;
- case 2: return tIndex+16;
- case 3: return tIndex+48;
- }
- }
- return tIndex;
- } */
+ /*
+ * @Override public int getTextureIndex(byte aSide, byte aFacing, boolean aActive, boolean aRedstone) { if (aSide ==
+ * aFacing) return 118+(aRedstone?8:0); if (GT_Utility.getOppositeSide(aSide) == aFacing) return
+ * 113+(aRedstone?8:0); int tIndex = 128+(aRedstone?8:0); switch (aFacing) { case 0: return tIndex+64; case 1:
+ * return tIndex+32; case 2: switch (aSide) { case 0: return tIndex+32; case 1: return tIndex+32; case 4: return
+ * tIndex+16; case 5: return tIndex+48; } case 3: switch (aSide) { case 0: return tIndex+64; case 1: return
+ * tIndex+64; case 4: return tIndex+48; case 5: return tIndex+16; } case 4: switch (aSide) { case 0: return
+ * tIndex+16; case 1: return tIndex+16; case 2: return tIndex+48; case 3: return tIndex+16; } case 5: switch (aSide)
+ * { case 0: return tIndex+48; case 1: return tIndex+48; case 2: return tIndex+16; case 3: return tIndex+48; } }
+ * return tIndex; }
+ */
@Override
public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
@@ -579,56 +543,42 @@ public class GT_MetaTileEntity_CropHarvestor extends GT_MetaTileEntity_BasicTank
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
if (aSide == 0 || aSide == 1) {
return this.mTextures[3][aColorIndex + 1];
} else {
return this.mTextures[4][aColorIndex + 1];
}
- /*return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0
- : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex
- + 1];*/
+ /*
+ * return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide ==
+ * GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1];
+ */
}
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_CropHarvester_Cutter)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_CropHarvester_Cutter) };
}
public ITexture[] getBack(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_CropHarvester_Cutter)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_CropHarvester_Cutter) };
}
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_CropHarvester_Boxes)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_CropHarvester_Boxes) };
}
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_CropHarvester_Boxes)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_CropHarvester_Boxes) };
}
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_CropHarvester_Cutter)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_CropHarvester_Cutter) };
}
@Override
@@ -680,47 +630,52 @@ public class GT_MetaTileEntity_CropHarvestor extends GT_MetaTileEntity_BasicTank
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
- builder.widget(new CycleButtonWidget()
- .setToggle(() -> mModeAlternative, val -> mModeAlternative = val)
- .setTexture(GTPP_UITextures.OVERLAY_BUTTON_HARVESTER_MODE)
- .addTooltip(0, "Enable Hydration/Fertilizing/Weed-EX")
- .addTooltip(1, "Disable Hydration/Fertilizing/Weed-EX")
- .setBackground(GT_UITextures.BUTTON_STANDARD)
- .setPos(47, 63)
- .setSize(18, 18));
- builder.widget(SlotGroup.ofItemHandler(inventoryHandler, 2)
- .startFromSlot(SLOT_WEEDEX_1)
+ builder.widget(
+ new CycleButtonWidget().setToggle(() -> mModeAlternative, val -> mModeAlternative = val)
+ .setTexture(GTPP_UITextures.OVERLAY_BUTTON_HARVESTER_MODE)
+ .addTooltip(0, "Enable Hydration/Fertilizing/Weed-EX")
+ .addTooltip(1, "Disable Hydration/Fertilizing/Weed-EX")
+ .setBackground(GT_UITextures.BUTTON_STANDARD).setPos(47, 63).setSize(18, 18));
+ builder.widget(
+ SlotGroup
+ .ofItemHandler(inventoryHandler, 2).startFromSlot(
+ SLOT_WEEDEX_1)
.endAtSlot(SLOT_WEEDEX_2)
- .applyForWidget(widget -> widget.setFilter(stack -> stack != null
- && stack.getItem().getUnlocalizedName().equals("ic2.itemWeedEx"))
- .setBackground(getGUITextureSet().getItemSlot(), GTPP_UITextures.OVERLAY_SLOT_WEED_EX))
- .build()
- .setPos(7, 13))
- .widget(SlotGroup.ofItemHandler(inventoryHandler, 2)
- .startFromSlot(SLOT_FERT_1)
- .endAtSlot(SLOT_FERT_4)
- .applyForWidget(widget -> widget.setFilter(stack -> stack != null
- && stack.getItem().getUnlocalizedName().equals("ic2.itemFertilizer"))
- .setBackground(
- getGUITextureSet().getItemSlot(), GTPP_UITextures.OVERLAY_SLOT_FERTILIZER))
- .build()
- .setPos(7, 31))
- .widget(SlotGroup.ofItemHandler(inventoryHandler, 6)
- .startFromSlot(SLOT_OUTPUT_START)
- .endAtSlot(SLOT_OUTPUT_START + 6 * 3)
- .canInsert(false)
- .build()
- .setPos(61, 7));
- builder.widget(new ProgressBar()
+ .applyForWidget(
+ widget -> widget.setFilter(
+ stack -> stack != null
+ && stack.getItem().getUnlocalizedName().equals("ic2.itemWeedEx"))
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GTPP_UITextures.OVERLAY_SLOT_WEED_EX))
+ .build().setPos(7, 13))
+ .widget(
+ SlotGroup
+ .ofItemHandler(inventoryHandler, 2).startFromSlot(SLOT_FERT_1).endAtSlot(
+ SLOT_FERT_4)
+ .applyForWidget(
+ widget -> widget.setFilter(
+ stack -> stack != null && stack.getItem().getUnlocalizedName()
+ .equals("ic2.itemFertilizer"))
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GTPP_UITextures.OVERLAY_SLOT_FERTILIZER))
+ .build().setPos(7, 31))
+ .widget(
+ SlotGroup.ofItemHandler(inventoryHandler, 6).startFromSlot(SLOT_OUTPUT_START)
+ .endAtSlot(SLOT_OUTPUT_START + 6 * 3).canInsert(false).build().setPos(61, 7));
+ builder.widget(
+ new ProgressBar()
.setTexture(
- GTPP_UITextures.PROGRESSBAR_BOILER_EMPTY, GT_UITextures.PROGRESSBAR_BOILER_WATER, 54)
+ GTPP_UITextures.PROGRESSBAR_BOILER_EMPTY,
+ GT_UITextures.PROGRESSBAR_BOILER_WATER,
+ 54)
.setDirection(ProgressBar.Direction.UP)
- .setProgress(() -> (float) getFluidAmount() / getCapacity())
- .setSynced(false, false)
- .dynamicTooltip(() ->
- Collections.singletonList("Water: " + getFluidAmount() + "L / " + getCapacity() + "L"))
- .setPos(47, 7)
- .setSize(10, 54))
+ .setProgress(() -> (float) getFluidAmount() / getCapacity()).setSynced(false, false)
+ .dynamicTooltip(
+ () -> Collections
+ .singletonList("Water: " + getFluidAmount() + "L / " + getCapacity() + "L"))
+ .setPos(47, 7).setSize(10, 54))
.widget(new FakeSyncWidget.FluidStackSyncer(this::getDrainableStack, this::setDrainableStack));
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java
index 6ba1e373eb..4e5a6e352a 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java
@@ -2,20 +2,10 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic;
import static gregtech.api.enums.GT_Values.V;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.enums.Textures;
-import gregtech.api.enums.Textures.BlockIcons.CustomIcon;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock;
-import gregtech.api.objects.GT_RenderedTexture;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.util.minecraft.PlayerUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
+
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
@@ -25,6 +15,18 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.enums.Textures;
+import gregtech.api.enums.Textures.BlockIcons.CustomIcon;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock;
+import gregtech.api.objects.GT_RenderedTexture;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.util.minecraft.PlayerUtils;
+
public class GT_MetaTileEntity_WorldAccelerator extends GT_MetaTileEntity_TieredMachineBlock {
public static String[] BlacklistedTileEntiyClassNames;
@@ -35,7 +37,7 @@ public class GT_MetaTileEntity_WorldAccelerator extends GT_MetaTileEntity_Tiered
private static CustomIcon _mGTIco_Norm_Active;
private static CustomIcon _mGTIco_TE_Idle;
private static CustomIcon _mGTIco_TE_Active;
- private static int[] mAccelerateStatic = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 512, 512, 512, 512, 512, 512};
+ private static int[] mAccelerateStatic = { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 512, 512, 512, 512, 512, 512 };
@Override
public void registerIcons(IIconRegister aBlockIconRegister) {
@@ -64,18 +66,17 @@ public class GT_MetaTileEntity_WorldAccelerator extends GT_MetaTileEntity_Tiered
@Override
public String[] getDescription() {
return new String[] {
- String.format(
- "Accelerating things (Radius: %d EU/t: %d Speed Bonus: x%d)",
- mTier, getEnergyDemand(mTier, false), mAccelerateStatic[mTier]),
- "Use a screwdriver to change mode",
- "To accelerate TileEntities, this machine has to be adjacent to it",
- "This machine accepts up to 8 Amps",
- "Accelerating TileEntities doubles Energy-Demand"
- };
+ String.format(
+ "Accelerating things (Radius: %d EU/t: %d Speed Bonus: x%d)",
+ mTier,
+ getEnergyDemand(mTier, false),
+ mAccelerateStatic[mTier]),
+ "Use a screwdriver to change mode", "To accelerate TileEntities, this machine has to be adjacent to it",
+ "This machine accepts up to 8 Amps", "Accelerating TileEntities doubles Energy-Demand" };
}
- public GT_MetaTileEntity_WorldAccelerator(
- String pName, int pTier, int pInvSlotCount, String pDescription, ITexture[][][] pTextures) {
+ public GT_MetaTileEntity_WorldAccelerator(String pName, int pTier, int pInvSlotCount, String pDescription,
+ ITexture[][][] pTextures) {
super(pName, pTier, pInvSlotCount, pDescription, pTextures);
}
@@ -90,29 +91,13 @@ public class GT_MetaTileEntity_WorldAccelerator extends GT_MetaTileEntity_Tiered
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity pBaseMetaTileEntity,
- byte pSide,
- byte pFacing,
- byte pColorIndex,
- boolean pActive,
- boolean pRedstone) {
- if (mMode == 0)
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][pColorIndex + 1],
- (pSide < 2)
- ? null
- : pActive
- ? new GT_RenderedTexture(_mGTIco_Norm_Active)
- : new GT_RenderedTexture(_mGTIco_Norm_Idle)
- };
- else
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][pColorIndex + 1],
- (pSide < 2)
- ? null
- : pActive ? new GT_RenderedTexture(_mGTIco_TE_Active) : new GT_RenderedTexture(_mGTIco_TE_Idle)
- };
+ public ITexture[] getTexture(IGregTechTileEntity pBaseMetaTileEntity, byte pSide, byte pFacing, byte pColorIndex,
+ boolean pActive, boolean pRedstone) {
+ if (mMode == 0) return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][pColorIndex + 1], (pSide < 2)
+ ? null
+ : pActive ? new GT_RenderedTexture(_mGTIco_Norm_Active) : new GT_RenderedTexture(_mGTIco_Norm_Idle) };
+ else return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][pColorIndex + 1], (pSide < 2) ? null
+ : pActive ? new GT_RenderedTexture(_mGTIco_TE_Active) : new GT_RenderedTexture(_mGTIco_TE_Idle) };
}
@Override
@@ -189,7 +174,7 @@ public class GT_MetaTileEntity_WorldAccelerator extends GT_MetaTileEntity_Tiered
return 8;
}
- private static String[] mModeStr = {"Blocks", "TileEntities"};
+ private static String[] mModeStr = { "Blocks", "TileEntities" };
@Override
public void onScrewdriverRightClick(byte pSide, EntityPlayer pPlayer, float pX, float pY, float pZ) {
@@ -259,9 +244,9 @@ public class GT_MetaTileEntity_WorldAccelerator extends GT_MetaTileEntity_Tiered
String tSimpleClassName = pTile.getClass().getSimpleName().toLowerCase();
String tCanonicalName = pTile.getClass().getCanonicalName().toLowerCase();
- if (tSimpleClassName.contains("conduit")
- || tSimpleClassName.contains("wire")
- || tSimpleClassName.contains("cable")) return true;
+ if (tSimpleClassName.contains("conduit") || tSimpleClassName.contains("wire")
+ || tSimpleClassName.contains("cable"))
+ return true;
if (tCanonicalName.contains("appeng") || tCanonicalName.contains("gregtech"))
// Don't accelerate ANY Gregtech machines!
return true;
@@ -273,10 +258,9 @@ public class GT_MetaTileEntity_WorldAccelerator extends GT_MetaTileEntity_Tiered
}
/**
- * Accelerate normal blocks. Eats some power and adds randomTicks to every
- * block within its working area (Tier-Number = radius) This does only
- * affect blocks that implement the "RandomTick" method; Which is mostly
- * used for grass growth and plants.
+ * Accelerate normal blocks. Eats some power and adds randomTicks to every block within its working area
+ * (Tier-Number = radius) This does only affect blocks that implement the "RandomTick" method; Which is mostly used
+ * for grass growth and plants.
*
* @param pBaseMetaTileEntity
*/
@@ -295,9 +279,8 @@ public class GT_MetaTileEntity_WorldAccelerator extends GT_MetaTileEntity_Tiered
int tZ1 = tZ - mTier;
int tZ2 = tZ + mTier;
- for (int xi = tX1; xi <= tX2; xi++)
- for (int yi = tY1; yi <= tY2; yi++)
- for (int zi = tZ1; zi <= tZ2; zi++) tryTickBlock(pWorld, xi, yi, zi, rnd);
+ for (int xi = tX1; xi <= tX2; xi++) for (int yi = tY1; yi <= tY2; yi++)
+ for (int zi = tZ1; zi <= tZ2; zi++) tryTickBlock(pWorld, xi, yi, zi, rnd);
}
/**
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 19994896e8..2d734b5bf9 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
@@ -2,11 +2,23 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic;
import static gregtech.api.enums.GT_Values.V;
+import java.util.Collections;
+import java.util.HashMap;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+import net.minecraft.world.chunk.Chunk;
+
+import org.apache.commons.lang3.ArrayUtils;
+
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
import com.gtnewhorizons.modularui.common.widget.DrawableWidget;
import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
import gregtech.api.enums.Textures;
@@ -32,14 +44,6 @@ import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils;
import gtPlusPlus.xmod.gregtech.api.gui.GTPP_UITextures;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.Collections;
-import java.util.HashMap;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
-import net.minecraft.world.chunk.Chunk;
-import org.apache.commons.lang3.ArrayUtils;
public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_BasicMachine {
@@ -73,33 +77,38 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
0,
"Recycler.png",
"",
- new ITexture[] {
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_MASSFAB_ACTIVE),
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_MASSFAB),
- new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab_Active),
- new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab),
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent_Fast),
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent),
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB_ACTIVE),
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB)
- });
+ new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_MASSFAB_ACTIVE),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_MASSFAB),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab_Active),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent_Fast),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB_ACTIVE),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB) });
mPollutionEnabled = PollutionUtils.isPollutionEnabled();
}
- public GregtechMetaAtmosphericReconditioner(
- String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
+ public GregtechMetaAtmosphericReconditioner(String aName, int aTier, String aDescription, ITexture[][][] aTextures,
+ String aGUIName, String aNEIName) {
super(aName, aTier, 2, aDescription, aTextures, 2, 0, aGUIName, aNEIName);
mPollutionEnabled = PollutionUtils.isPollutionEnabled();
}
- /*public GregtechMetaAtmosphericReconditioner(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
- super(aName, aTier, 2, aDescription, aTextures, 2, 0, aGUIName, aNEIName);
- }*/
+ /*
+ * public GregtechMetaAtmosphericReconditioner(String aName, int aTier, String[] aDescription, ITexture[][][]
+ * aTextures, String aGUIName, String aNEIName) { super(aName, aTier, 2, aDescription, aTextures, 2, 0, aGUIName,
+ * aNEIName); }
+ */
@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GregtechMetaAtmosphericReconditioner(
- this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
+ this.mName,
+ this.mTier,
+ this.mDescription,
+ this.mTextures,
+ this.mGUIName,
+ this.mNEIName);
}
@Override
@@ -107,26 +116,21 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
boolean highTier = this.mTier >= 7;
- String[] A = new String[] {
- this.mDescription,
- highTier ? "Will attempt to remove 1/4 pollution from 8 surrounding chunks" : "",
- highTier ? "If these chunks are not loaded, they will be ignored" : "",
- "Requires a turbine rotor and an Air Filter [T1/T2] to run.",
- "The turbine rotor must be manually inserted/replaced",
- "Can be configured with a soldering iron to change modes",
- "Low Efficiency: Removes half pollution, Turbine takes 50% dmg",
- "High Efficiency: Removes full pollution, Turbine takes 100% dmg",
- "Turbine Rotor will not break in LE mode",
- "Insert an equal tier Conveyor Module to enable automation"
- };
+ String[] A = new String[] { this.mDescription,
+ highTier ? "Will attempt to remove 1/4 pollution from 8 surrounding chunks" : "",
+ highTier ? "If these chunks are not loaded, they will be ignored" : "",
+ "Requires a turbine rotor and an Air Filter [T1/T2] to run.",
+ "The turbine rotor must be manually inserted/replaced",
+ "Can be configured with a soldering iron to change modes",
+ "Low Efficiency: Removes half pollution, Turbine takes 50% dmg",
+ "High Efficiency: Removes full pollution, Turbine takes 100% dmg",
+ "Turbine Rotor will not break in LE mode",
+ "Insert an equal tier Conveyor Module to enable automation" };
if (!mPollutionEnabled) {
- String[] B = new String[] {
- "===============================================",
- "Pollution is disabled, scrubbers will now have a bonus use",
- "They are now able to remove ALL lingering pollution as GT ignores it",
- "and it will linger forever!",
- "===============================================",
- };
+ String[] B = new String[] { "===============================================",
+ "Pollution is disabled, scrubbers will now have a bonus use",
+ "They are now able to remove ALL lingering pollution as GT ignores it",
+ "and it will linger forever!", "===============================================", };
A = ArrayUtils.addAll(A, B);
}
return A;
@@ -233,18 +237,17 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
Logger.INFO("Set Active.");
aBaseMetaTileEntity.setActive(true);
}
- } else if (!this.mHasPollution
- || mCurrentPollution <= 0
+ } else if (!this.mHasPollution || mCurrentPollution <= 0
|| stackRotor == null
|| stackFilter == null
|| !hasRotor(stackRotor)
|| !hasAirFilter(stackFilter)) {
- if (!this.getBaseMetaTileEntity().isActive()) {
- Logger.INFO("Set Inactive.");
- aBaseMetaTileEntity.setActive(false);
- this.sendSound((byte) -122);
- }
- }
+ if (!this.getBaseMetaTileEntity().isActive()) {
+ Logger.INFO("Set Inactive.");
+ aBaseMetaTileEntity.setActive(false);
+ this.sendSound((byte) -122);
+ }
+ }
// If Active.
if (aBaseMetaTileEntity.isActive()) {
@@ -291,8 +294,9 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
// If no sides are free, how will you process the atmosphere?
if (mAirSides > 0) {
- reduction += (((Math.max((tTier - 2), 1) * 2) * 50)
- * mAirSides); // Was originally *100
+ reduction += (((Math.max((tTier - 2), 1) * 2) * 50) * mAirSides); // Was
+ // originally
+ // *100
Logger.INFO("mPollutionReduction[1]:" + reduction);
// I stole this code
@@ -344,26 +348,24 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
}
} // End of can work block.
else { // Disable Machine.
- // aBaseMetaTileEntity.setActive(false);
+ // aBaseMetaTileEntity.setActive(false);
}
} // End of 1/sec action block.
else {
- if (hasRotor(stackRotor)
- && hasAirFilter(stackFilter)
+ if (hasRotor(stackRotor) && hasAirFilter(stackFilter)
&& this.mHasPollution
&& !isIdle
&& aBaseMetaTileEntity.isAllowedToWork()) {
aBaseMetaTileEntity.setActive(true);
- } else if (isIdle
- || !this.mHasPollution
+ } else if (isIdle || !this.mHasPollution
|| mCurrentPollution <= 0
|| stackRotor == null
|| stackFilter == null
|| !hasRotor(stackRotor)
|| !hasAirFilter(stackFilter)) {
- aBaseMetaTileEntity.setActive(false);
- }
+ aBaseMetaTileEntity.setActive(false);
+ }
}
if (this.getBaseMetaTileEntity().isActive()) {
if (MathUtils.randInt(0, 5) <= 2) {
@@ -427,14 +429,13 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
if (rotorStack.getItem() instanceof ItemBasicScrubberTurbine) {
// Logger.INFO("Found Basic Turbine Rotor.");
return true;
- } else if (rotorStack.getItem() instanceof GT_MetaGenerated_Tool
- && rotorStack.getItemDamage() >= 170
+ } else if (rotorStack.getItem() instanceof GT_MetaGenerated_Tool && rotorStack.getItemDamage() >= 170
&& rotorStack.getItemDamage() <= 179) {
- // Logger.INFO("Found Turbine Rotor.");
- return true;
- } else {
- // Logger.INFO("Found: "+rotorStack.getDisplayName()+":"+rotorStack.getItemDamage());
- }
+ // Logger.INFO("Found Turbine Rotor.");
+ return true;
+ } else {
+ // Logger.INFO("Found: "+rotorStack.getDisplayName()+":"+rotorStack.getItemDamage());
+ }
}
// Logger.INFO("Found No Turbine Rotor.");
return false;
@@ -482,42 +483,44 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
}
if (mInventory[SLOT_ROTOR].getItem() instanceof GT_MetaGenerated_Tool_01
- && ((GT_MetaGenerated_Tool) mInventory[SLOT_ROTOR].getItem())
- .getToolStats(mInventory[SLOT_ROTOR])
- .getSpeedMultiplier()
- > 0
+ && ((GT_MetaGenerated_Tool) mInventory[SLOT_ROTOR].getItem()).getToolStats(mInventory[SLOT_ROTOR])
+ .getSpeedMultiplier() > 0
&& GT_MetaGenerated_Tool.getPrimaryMaterial(mInventory[SLOT_ROTOR]).mToolSpeed > 0) {
- long damageValue = (long)
- Math.floor(Math.abs(MathUtils.randFloat(1, 2) - MathUtils.randFloat(1, 3)) * (1 + 3 - 1) + 1);
+ long damageValue = (long) Math
+ .floor(Math.abs(MathUtils.randFloat(1, 2) - MathUtils.randFloat(1, 3)) * (1 + 3 - 1) + 1);
double fDam = Math.floor(
Math.abs(MathUtils.randFloat(1f, 2f) - MathUtils.randFloat(1f, 2f)) * (1f + 2f - 1f) + 1f);
damageValue -= fDam;
// Logger.INFO("Trying to do "+damageValue+" damage to the rotor. ["+fDam+"]");
- /*Materials M1 = GT_MetaGenerated_Tool.getPrimaryMaterial(this.mInventory[this.SLOT_ROTOR]);
- Materials M2 = GT_MetaGenerated_Tool.getSecondaryMaterial(this.mInventory[this.SLOT_ROTOR]);
-
- Logger.INFO("Trying to do "+damageValue+" damage to the rotor. [2]");*/
+ /*
+ * Materials M1 = GT_MetaGenerated_Tool.getPrimaryMaterial(this.mInventory[this.SLOT_ROTOR]); Materials
+ * M2 = GT_MetaGenerated_Tool.getSecondaryMaterial(this.mInventory[this.SLOT_ROTOR]);
+ * Logger.INFO("Trying to do "+damageValue+" damage to the rotor. [2]");
+ */
// Damage Rotor
// int rotorDurability = this.mInventory[this.SLOT_ROTOR].getItemDamage();
- long rotorDamage =
- creativeRotor ? 0 : GT_MetaGenerated_Tool.getToolDamage(this.mInventory[this.SLOT_ROTOR]);
- long rotorDurabilityMax = creativeRotor
- ? Integer.MAX_VALUE
+ long rotorDamage = creativeRotor ? 0
+ : GT_MetaGenerated_Tool.getToolDamage(this.mInventory[this.SLOT_ROTOR]);
+ long rotorDurabilityMax = creativeRotor ? Integer.MAX_VALUE
: GT_MetaGenerated_Tool.getToolMaxDamage(this.mInventory[this.SLOT_ROTOR]);
long rotorDurability = (rotorDurabilityMax - rotorDamage);
- Logger.INFO("Rotor Damage: " + rotorDamage + " | Max Durability: " + rotorDurabilityMax + " | "
- + " Remaining Durability: " + rotorDurability);
+ Logger.INFO(
+ "Rotor Damage: " + rotorDamage
+ + " | Max Durability: "
+ + rotorDurabilityMax
+ + " | "
+ + " Remaining Durability: "
+ + rotorDurability);
if (rotorDurability >= damageValue) {
if (!mSaveRotor) {
Logger.INFO("Damaging Rotor.");
- if (!creativeRotor)
- GT_ModHandler.damageOrDechargeItem(
- this.mInventory[this.SLOT_ROTOR], (int) damageValue, 0, null);
+ if (!creativeRotor) GT_ModHandler
+ .damageOrDechargeItem(this.mInventory[this.SLOT_ROTOR], (int) damageValue, 0, null);
long tempDur = GT_MetaGenerated_Tool.getToolDamage(this.mInventory[this.SLOT_ROTOR]);
if (tempDur < rotorDurabilityMax) {
@@ -528,9 +531,11 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
} else {
Logger.INFO("Damaging Rotor.");
if (rotorDurability > 1000) {
- if (!creativeRotor)
- GT_ModHandler.damageOrDechargeItem(
- this.mInventory[this.SLOT_ROTOR], (int) damageValue / 2, 0, null);
+ if (!creativeRotor) GT_ModHandler.damageOrDechargeItem(
+ this.mInventory[this.SLOT_ROTOR],
+ (int) damageValue / 2,
+ 0,
+ null);
long tempDur = GT_MetaGenerated_Tool.getToolDamage(this.mInventory[this.SLOT_ROTOR]);
if (tempDur < rotorDurabilityMax) {
return true;
@@ -586,9 +591,7 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
public boolean removePollution(int toRemove) {
- if (this == null
- || this.getBaseMetaTileEntity() == null
- || this.getBaseMetaTileEntity().getWorld() == null) {
+ if (this == null || this.getBaseMetaTileEntity() == null || this.getBaseMetaTileEntity().getWorld() == null) {
return false;
}
@@ -603,11 +606,9 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
int chunksWithRemoval = 0;
int totalRemoved = 0;
AutoMap<Chunk> aSurrounding = new AutoMap<Chunk>();
- Chunk aThisChunk = this.getBaseMetaTileEntity()
- .getWorld()
- .getChunkFromBlockCoords(
- this.getBaseMetaTileEntity().getXCoord(),
- this.getBaseMetaTileEntity().getZCoord());
+ Chunk aThisChunk = this.getBaseMetaTileEntity().getWorld().getChunkFromBlockCoords(
+ this.getBaseMetaTileEntity().getXCoord(),
+ this.getBaseMetaTileEntity().getZCoord());
int mainChunkX = aThisChunk.xPosition;
int mainChunkZ = aThisChunk.zPosition;
@@ -645,8 +646,12 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
continue;
}
- Logger.INFO("Trying to remove pollution from chunk " + r.xPosition + ", " + r.zPosition + " | "
- + startPollution);
+ Logger.INFO(
+ "Trying to remove pollution from chunk " + r.xPosition
+ + ", "
+ + r.zPosition
+ + " | "
+ + startPollution);
int after = 0;
boolean isMainChunk = r.isAtLocation(mainChunkX, mainChunkZ);
@@ -660,8 +665,14 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
if (startPollution - after > 0) {
totalRemoved += (startPollution - after);
}
- Logger.INFO("Removed " + (startPollution - after) + " pollution from chunk " + r.xPosition + ", "
- + r.zPosition + " | " + after);
+ Logger.INFO(
+ "Removed " + (startPollution - after)
+ + " pollution from chunk "
+ + r.xPosition
+ + ", "
+ + r.zPosition
+ + " | "
+ + after);
}
return totalRemoved > 0 && chunksWithRemoval > 0;
}
@@ -741,8 +752,7 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
if (aStack.getItem() instanceof ItemBasicScrubberTurbine) {
return true;
}
- if (aStack.getItem() instanceof GT_MetaGenerated_Tool
- && aStack.getItemDamage() >= 170
+ if (aStack.getItem() instanceof GT_MetaGenerated_Tool && aStack.getItemDamage() >= 170
&& aStack.getItemDamage() <= 179) {
return true;
}
@@ -757,8 +767,8 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ);
}
- public boolean onSolderingToolRightClick(
- byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY,
+ float aZ) {
this.mSaveRotor = Utils.invertBoolean(mSaveRotor);
if (mSaveRotor) {
PlayerUtils.messagePlayer(aPlayer, "Running in low efficiency mode, rotors will not break.");
@@ -781,9 +791,10 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
} else if (aIndex == -121 || aIndex == -122) {
// GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(108)), 0, 0.5F, aX, aY,
// aZ);
- } /*else if (aIndex == -122) {
- GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(6)), 100, 1.0F, aX, aY, aZ);
- }*/ else {
+ } /*
+ * else if (aIndex == -122) { GT_Utility.doSoundAtClient((String)
+ * GregTech_API.sSoundList.get(Integer.valueOf(6)), 100, 1.0F, aX, aY, aZ); }
+ */ else {
super.doSound((byte) 0, aX, aY, aZ);
}
}
@@ -807,8 +818,7 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
long tVoltage = maxEUInput();
byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
reduction += (((Math.max((tTier - 2), 1) * 2) * 50) * mAirSides);
- reduction = (MathUtils.safeInt((long) reduction * this.mBaseEff) / 100000)
- * mAirSides
+ reduction = (MathUtils.safeInt((long) reduction * this.mBaseEff) / 100000) * mAirSides
* Math.max((tTier - 2), 1);
reduction = MathUtils.safeInt(((long) reduction / 100) * this.mOptimalAirFlow);
@@ -857,17 +867,20 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
public static ItemStack getTieredTurbine(int aTier) {
if (sGregTurbines == null) {
sGregTurbines = new ItemStack[3];
- sGregTurbines[0] = GT_MetaGenerated_Tool.sInstances
- .get("gt.metatool.01")
+ sGregTurbines[0] = GT_MetaGenerated_Tool.sInstances.get("gt.metatool.01")
.getToolWithStats(GT_MetaGenerated_Tool_01.TURBINE_SMALL, 1, Materials.Iron, Materials.Iron, null);
- sGregTurbines[1] = GT_MetaGenerated_Tool.sInstances
- .get("gt.metatool.01")
- .getToolWithStats(
- GT_MetaGenerated_Tool_01.TURBINE_SMALL, 1, Materials.Bronze, Materials.Bronze, null);
- sGregTurbines[2] = GT_MetaGenerated_Tool.sInstances
- .get("gt.metatool.01")
- .getToolWithStats(
- GT_MetaGenerated_Tool_01.TURBINE_SMALL, 1, Materials.Steel, Materials.Steel, null);
+ sGregTurbines[1] = GT_MetaGenerated_Tool.sInstances.get("gt.metatool.01").getToolWithStats(
+ GT_MetaGenerated_Tool_01.TURBINE_SMALL,
+ 1,
+ Materials.Bronze,
+ Materials.Bronze,
+ null);
+ sGregTurbines[2] = GT_MetaGenerated_Tool.sInstances.get("gt.metatool.01").getToolWithStats(
+ GT_MetaGenerated_Tool_01.TURBINE_SMALL,
+ 1,
+ Materials.Steel,
+ Materials.Steel,
+ null);
} else {
return sGregTurbines[aTier];
}
@@ -879,9 +892,8 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
if (aStackRotor.getItem() instanceof ItemBasicScrubberTurbine) {
return getBaseEfficiency(getTieredTurbine(aStackRotor.getItemDamage()));
}
- return (int)
- ((50.0F + (10.0F * ((GT_MetaGenerated_Tool) aStackRotor.getItem()).getToolCombatDamage(aStackRotor)))
- * 100);
+ return (int) ((50.0F
+ + (10.0F * ((GT_MetaGenerated_Tool) aStackRotor.getItem()).getToolCombatDamage(aStackRotor))) * 100);
}
public int getOptimalAirFlow(ItemStack aStackRotor) {
@@ -890,9 +902,7 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
}
return (int) Math.max(
Float.MIN_NORMAL,
- ((GT_MetaGenerated_Tool) aStackRotor.getItem())
- .getToolStats(aStackRotor)
- .getSpeedMultiplier()
+ ((GT_MetaGenerated_Tool) aStackRotor.getItem()).getToolStats(aStackRotor).getSpeedMultiplier()
* GT_MetaGenerated_Tool.getPrimaryMaterial(aStackRotor).mToolSpeed
* 50);
}
@@ -904,32 +914,31 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
- builder.widget(new SlotWidget(inventoryHandler, SLOT_ROTOR)
- .setFilter(stack -> {
- if (stack.getItem() instanceof ItemBasicScrubberTurbine) {
- return true;
- }
- return stack.getItem() instanceof GT_MetaGenerated_Tool
- && stack.getItemDamage() >= 170
- && stack.getItemDamage() <= 179;
- })
- .setBackground(getGUITextureSet().getItemSlot(), GTPP_UITextures.OVERLAY_SLOT_TURBINE)
- .setPos(52, 24))
- .widget(new SlotWidget(inventoryHandler, SLOT_FILTER)
- .setFilter(stack -> stack.getItem() instanceof ItemAirFilter)
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_RECYCLE)
- .setPos(106, 24))
- .widget(new SlotWidget(inventoryHandler, 7)
- .setFilter(stack -> GT_Utility.areStacksEqual(stack, mConveyorMap.get(mTier), true))
- .setPos(124, 62));
- builder.widget(new DrawableWidget()
- .setDrawable(GT_UITextures.PICTURE_INFORMATION)
- .dynamicTooltip(() -> Collections.singletonList("Reduction: " + mPollutionReduction + "/s"))
- .attachSyncer(
- new FakeSyncWidget.IntegerSyncer(() -> mPollutionReduction, val -> mPollutionReduction = val),
- builder,
- (widget, val) -> widget.notifyTooltipChange())
- .setPos(163, 5)
- .setSize(7, 18));
+ builder.widget(new SlotWidget(inventoryHandler, SLOT_ROTOR).setFilter(stack -> {
+ if (stack.getItem() instanceof ItemBasicScrubberTurbine) {
+ return true;
+ }
+ return stack.getItem() instanceof GT_MetaGenerated_Tool && stack.getItemDamage() >= 170
+ && stack.getItemDamage() <= 179;
+ }).setBackground(getGUITextureSet().getItemSlot(), GTPP_UITextures.OVERLAY_SLOT_TURBINE).setPos(52, 24))
+ .widget(
+ new SlotWidget(inventoryHandler, SLOT_FILTER)
+ .setFilter(stack -> stack.getItem() instanceof ItemAirFilter)
+ .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_RECYCLE)
+ .setPos(106, 24))
+ .widget(
+ new SlotWidget(inventoryHandler, 7)
+ .setFilter(stack -> GT_Utility.areStacksEqual(stack, mConveyorMap.get(mTier), true))
+ .setPos(124, 62));
+ builder.widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_INFORMATION)
+ .dynamicTooltip(() -> Collections.singletonList("Reduction: " + mPollutionReduction + "/s"))
+ .attachSyncer(
+ new FakeSyncWidget.IntegerSyncer(
+ () -> mPollutionReduction,
+ val -> mPollutionReduction = val),
+ builder,
+ (widget, val) -> widget.notifyTooltipChange())
+ .setPos(163, 5).setSize(7, 18));
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaCondensor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaCondensor.java
index 17edfd0d4d..c69ae51436 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaCondensor.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaCondensor.java
@@ -1,10 +1,15 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.fluids.IFluidHandler;
+
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
import com.gtnewhorizons.modularui.common.widget.DrawableWidget;
import com.gtnewhorizons.modularui.common.widget.ProgressBar;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
+
import gregtech.api.enums.Dyes;
import gregtech.api.enums.Textures;
import gregtech.api.gui.modularui.GT_UITextures;
@@ -19,9 +24,6 @@ import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.api.gui.GTPP_UITextures;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators.GregtechMetaBoilerBase;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.IFluidHandler;
public class GregtechMetaCondensor extends GregtechMetaBoilerBase implements IAddGregtechLogo {
@@ -29,49 +31,44 @@ public class GregtechMetaCondensor extends GregtechMetaBoilerBase implements IAd
super(aID, aName, aNameRegional, "A Steam condenser - [IC2->Steam]", new ITexture[0]);
}
- public GregtechMetaCondensor(
- final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
+ public GregtechMetaCondensor(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
}
@Override
public String[] getDescription() {
- return new String[] {
- this.mDescription,
- "IC2 Steam + Water = Normal Steam.",
- "Requires no power to run, although it's not very fast.",
- CORE.GT_Tooltip
- };
+ return new String[] { this.mDescription, "IC2 Steam + Water = Normal Steam.",
+ "Requires no power to run, although it's not very fast.", CORE.GT_Tooltip };
}
@Override
public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
final ITexture[][][] rTextures = new ITexture[5][17][];
for (byte i = -1; i < 16; i++) {
- rTextures[0][(i + 1)] = new ITexture[] {
- new GT_RenderedTexture(
- Textures.BlockIcons.MACHINE_CASING_VENT, Dyes.getModulation(i, Dyes.MACHINE_METAL.mRGBa))
- };
+ rTextures[0][(i + 1)] = new ITexture[] { new GT_RenderedTexture(
+ Textures.BlockIcons.MACHINE_CASING_VENT,
+ Dyes.getModulation(i, Dyes.MACHINE_METAL.mRGBa)) };
rTextures[1][(i + 1)] = new ITexture[] {
- new GT_RenderedTexture(
- Textures.BlockIcons.MACHINE_CASING_VENT, Dyes.getModulation(i, Dyes.MACHINE_METAL.mRGBa)),
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE)
- };
+ new GT_RenderedTexture(
+ Textures.BlockIcons.MACHINE_CASING_VENT,
+ Dyes.getModulation(i, Dyes.MACHINE_METAL.mRGBa)),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE) };
rTextures[2][(i + 1)] = new ITexture[] {
- new GT_RenderedTexture(
- Textures.BlockIcons.MACHINE_CASING_VENT, Dyes.getModulation(i, Dyes.MACHINE_METAL.mRGBa)),
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE)
- };
+ new GT_RenderedTexture(
+ Textures.BlockIcons.MACHINE_CASING_VENT,
+ Dyes.getModulation(i, Dyes.MACHINE_METAL.mRGBa)),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE) };
rTextures[3][(i + 1)] = new ITexture[] {
- new GT_RenderedTexture(
- Textures.BlockIcons.MACHINE_CASING_VENT, Dyes.getModulation(i, Dyes.MACHINE_METAL.mRGBa)),
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER)
- };
+ new GT_RenderedTexture(
+ Textures.BlockIcons.MACHINE_CASING_VENT,
+ Dyes.getModulation(i, Dyes.MACHINE_METAL.mRGBa)),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER) };
rTextures[4][(i + 1)] = new ITexture[] {
- new GT_RenderedTexture(
- Textures.BlockIcons.MACHINE_CASING_VENT, Dyes.getModulation(i, Dyes.MACHINE_METAL.mRGBa)),
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER_ACTIVE)
- };
+ new GT_RenderedTexture(
+ Textures.BlockIcons.MACHINE_CASING_VENT,
+ Dyes.getModulation(i, Dyes.MACHINE_METAL.mRGBa)),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER_ACTIVE) };
}
return rTextures;
}
@@ -102,16 +99,16 @@ public class GregtechMetaCondensor extends GregtechMetaBoilerBase implements IAd
if (i != aBaseMetaTileEntity.getFrontFacing()) {
final IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(i);
if (tTileEntity != null) {
- final FluidStack tDrained = aBaseMetaTileEntity.drain(
- ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false);
+ final FluidStack tDrained = aBaseMetaTileEntity
+ .drain(ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false);
if (tDrained != null) {
- final int tFilledAmount = tTileEntity.fill(
- ForgeDirection.getOrientation(i).getOpposite(), tDrained, false);
+ final int tFilledAmount = tTileEntity
+ .fill(ForgeDirection.getOrientation(i).getOpposite(), tDrained, false);
if (tFilledAmount > 0) {
tTileEntity.fill(
ForgeDirection.getOrientation(i).getOpposite(),
- aBaseMetaTileEntity.drain(
- ForgeDirection.getOrientation(i), tFilledAmount, true),
+ aBaseMetaTileEntity
+ .drain(ForgeDirection.getOrientation(i), tFilledAmount, true),
true);
}
}
@@ -144,13 +141,13 @@ public class GregtechMetaCondensor extends GregtechMetaBoilerBase implements IAd
this.sendSound((byte) 1);
this.mSteam.amount = getSteamCapacity() * 3 / 4;
}
- /*if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) &&
- (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.bucket.get(IC2.getItemFromBlock(p_150898_0_)))))
- {
- this.mProcessingEnergy += 1000;
- aBaseMetaTileEntity.decrStackSize(2, 1);
- aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Empty, 1L));
- }*/
+ /*
+ * if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) &&
+ * (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2],
+ * OrePrefixes.bucket.get(IC2.getItemFromBlock(p_150898_0_))))) { this.mProcessingEnergy += 1000;
+ * aBaseMetaTileEntity.decrStackSize(2, 1); aBaseMetaTileEntity.addStackToSlot(3,
+ * GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Empty, 1L)); }
+ */
if ((this.mTemperature < 1000) && (this.mProcessingEnergy > 0) && ((aTick % this.RI) == 0L)) {
this.mProcessingEnergy -= 40;
this.mTemperature += 2;
@@ -181,49 +178,49 @@ public class GregtechMetaCondensor extends GregtechMetaBoilerBase implements IAd
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
- builder.widget(new SlotWidget(inventoryHandler, 0)
- .setPos(43, 25)
+ builder.widget(
+ new SlotWidget(inventoryHandler, 0).setPos(43, 25)
.setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_IN))
- .widget(new SlotWidget(inventoryHandler, 1)
- .setPos(43, 61)
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_OUT))
- .widget(new SlotWidget(inventoryHandler, 2)
- .setPos(115, 61)
- .setBackground(getGUITextureSet().getItemSlot(), GTPP_UITextures.OVERLAY_SLOT_COAL))
- .widget(new SlotWidget(inventoryHandler, 3)
- .setPos(115, 25)
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_DUST))
- .widget(new ProgressBar()
- .setProgress(() -> mSteam == null ? 0 : (float) mSteam.amount / getCapacity())
- .setTexture(
- GTPP_UITextures.PROGRESSBAR_BOILER_EMPTY, GT_UITextures.PROGRESSBAR_BOILER_STEAM, 10)
- .setDirection(ProgressBar.Direction.UP)
- .setPos(70, 25)
- .setSize(10, 54))
- .widget(new ProgressBar()
- .setProgress(() -> mFluid == null ? 0 : (float) mFluid.amount / getCapacity())
- .setTexture(
- GTPP_UITextures.PROGRESSBAR_BOILER_EMPTY, GT_UITextures.PROGRESSBAR_BOILER_WATER, 10)
- .setDirection(ProgressBar.Direction.UP)
- .setPos(83, 25)
- .setSize(10, 54))
- .widget(new ProgressBar()
- .setProgress(() -> (float) mTemperature / maxProgresstime())
- .setTexture(GTPP_UITextures.PROGRESSBAR_BOILER_EMPTY, GT_UITextures.PROGRESSBAR_BOILER_HEAT, 10)
- .setDirection(ProgressBar.Direction.UP)
- .setPos(96, 25)
- .setSize(10, 54))
- .widget(new ProgressBar()
- // cap minimum so that one can easily see there's fuel remaining
- .setProgress(
- () -> mProcessingEnergy > 0 ? Math.max((float) mProcessingEnergy / 1000, 1f / 5) : 0)
- .setTexture(GTPP_UITextures.PROGRESSBAR_FUEL, 14)
- .setDirection(ProgressBar.Direction.UP)
- .setPos(116, 45)
- .setSize(14, 14))
- .widget(new DrawableWidget()
- .setDrawable(GTPP_UITextures.OVERLAY_SLOT_CANISTER_DARK)
- .setPos(43, 43)
- .setSize(18, 18));
+ .widget(
+ new SlotWidget(inventoryHandler, 1).setPos(43, 61)
+ .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_OUT))
+ .widget(
+ new SlotWidget(inventoryHandler, 2).setPos(115, 61)
+ .setBackground(getGUITextureSet().getItemSlot(), GTPP_UITextures.OVERLAY_SLOT_COAL))
+ .widget(
+ new SlotWidget(inventoryHandler, 3).setPos(115, 25)
+ .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_DUST))
+ .widget(
+ new ProgressBar().setProgress(() -> mSteam == null ? 0 : (float) mSteam.amount / getCapacity())
+ .setTexture(
+ GTPP_UITextures.PROGRESSBAR_BOILER_EMPTY,
+ GT_UITextures.PROGRESSBAR_BOILER_STEAM,
+ 10)
+ .setDirection(ProgressBar.Direction.UP).setPos(70, 25).setSize(10, 54))
+ .widget(
+ new ProgressBar().setProgress(() -> mFluid == null ? 0 : (float) mFluid.amount / getCapacity())
+ .setTexture(
+ GTPP_UITextures.PROGRESSBAR_BOILER_EMPTY,
+ GT_UITextures.PROGRESSBAR_BOILER_WATER,
+ 10)
+ .setDirection(ProgressBar.Direction.UP).setPos(83, 25).setSize(10, 54))
+ .widget(
+ new ProgressBar().setProgress(() -> (float) mTemperature / maxProgresstime())
+ .setTexture(
+ GTPP_UITextures.PROGRESSBAR_BOILER_EMPTY,
+ GT_UITextures.PROGRESSBAR_BOILER_HEAT,
+ 10)
+ .setDirection(ProgressBar.Direction.UP).setPos(96, 25).setSize(10, 54))
+ .widget(
+ new ProgressBar()
+ // cap minimum so that one can easily see there's fuel remaining
+ .setProgress(
+ () -> mProcessingEnergy > 0 ? Math.max((float) mProcessingEnergy / 1000, 1f / 5)
+ : 0)
+ .setTexture(GTPP_UITextures.PROGRESSBAR_FUEL, 14).setDirection(ProgressBar.Direction.UP)
+ .setPos(116, 45).setSize(14, 14))
+ .widget(
+ new DrawableWidget().setDrawable(GTPP_UITextures.OVERLAY_SLOT_CANISTER_DARK).setPos(43, 43)
+ .setSize(18, 18));
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java
index f1e0cc7161..ec20c9c088 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java
@@ -1,5 +1,10 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -11,10 +16,6 @@ import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
public class GregtechMetaGarbageCollector extends GregtechMetaTileEntity {
@@ -32,14 +33,9 @@ public class GregtechMetaGarbageCollector extends GregtechMetaTileEntity {
@Override
public String[] getDescription() {
- return new String[] {
- this.mDescription,
- "Can request the JVM to perform garbage collection",
- "Configurable to run once every 5 minute interval (5-180)",
- "This Machine has no recipe",
- "Admin Tool, Limit one per world if possible",
- CORE.GT_Tooltip
- };
+ return new String[] { this.mDescription, "Can request the JVM to perform garbage collection",
+ "Configurable to run once every 5 minute interval (5-180)", "This Machine has no recipe",
+ "Admin Tool, Limit one per world if possible", CORE.GT_Tooltip };
}
@Override
@@ -61,91 +57,61 @@ public class GregtechMetaGarbageCollector extends GregtechMetaTileEntity {
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
- return this.mTextures[
- (aActive ? 5 : 0)
- + (aSide == aFacing
- ? 0
- : aSide == GT_Utility.getOppositeSide(aFacing)
- ? 1
- : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][
- aColorIndex + 1];
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0
+ : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex
+ + 1];
}
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel) };
}
public ITexture[] getBack(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel) };
}
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium) };
}
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium) };
}
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Redox_3)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Redox_3) };
}
public ITexture[] getFrontActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel) };
}
public ITexture[] getBackActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel) };
}
public ITexture[] getBottomActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium) };
}
public ITexture[] getTopActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium) };
}
public ITexture[] getSidesActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Redox_3)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Redox_3) };
}
@Override
@@ -291,27 +257,26 @@ public class GregtechMetaGarbageCollector extends GregtechMetaTileEntity {
private void showPollution(final World worldIn, final EntityPlayer playerIn) {
PlayerUtils.messagePlayer(
playerIn,
- "Running every " + mFrequency + " minutes. Owner: "
- + this.getBaseMetaTileEntity().getOwnerName());
+ "Running every " + mFrequency + " minutes. Owner: " + this.getBaseMetaTileEntity().getOwnerName());
long aDiff = mLocalTickVar - this.mLastCleanup;
PlayerUtils.messagePlayer(playerIn, "Last run: " + Utils.getSecondsFromMillis(aDiff) + " seconds ago.");
}
@Override
- public boolean allowPullStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return false;
}
@Override
- public boolean allowPutStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return false;
}
@Override
public String[] getInfoData() {
- return new String[] {this.getLocalName()};
+ return new String[] { this.getLocalName() };
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java
index ce04d50fab..cde8d8ca4b 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java
@@ -1,5 +1,10 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -11,10 +16,6 @@ import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
public class GregtechMetaPollutionCreator extends GregtechMetaTileEntity {
@@ -25,28 +26,19 @@ public class GregtechMetaPollutionCreator extends GregtechMetaTileEntity {
private int mTickTimer = 0;
private int mSecondTimer = 0;
- public GregtechMetaPollutionCreator(
- final int aID,
- final String aName,
- final String aNameRegional,
- final int aTier,
- final String aDescription,
- final int aSlotCount) {
+ public GregtechMetaPollutionCreator(final int aID, final String aName, final String aNameRegional, final int aTier,
+ final String aDescription, final int aSlotCount) {
super(aID, aName, aNameRegional, aTier, aSlotCount, aDescription);
}
- public GregtechMetaPollutionCreator(
- final String aName,
- final int aTier,
- final String aDescription,
- final ITexture[][][] aTextures,
- final int aSlotCount) {
+ public GregtechMetaPollutionCreator(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures, final int aSlotCount) {
super(aName, aTier, aSlotCount, aDescription, aTextures);
}
@Override
public String[] getDescription() {
- return new String[] {this.mDescription, "A useful debug machine to create pollution.", CORE.GT_Tooltip};
+ return new String[] { this.mDescription, "A useful debug machine to create pollution.", CORE.GT_Tooltip };
}
@Override
@@ -68,91 +60,61 @@ public class GregtechMetaPollutionCreator extends GregtechMetaTileEntity {
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
- return this.mTextures[
- (aActive ? 5 : 0)
- + (aSide == aFacing
- ? 0
- : aSide == GT_Utility.getOppositeSide(aFacing)
- ? 1
- : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][
- aColorIndex + 1];
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0
+ : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex
+ + 1];
}
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2) };
}
public ITexture[] getBack(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
public ITexture[] getFrontActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2) };
}
public ITexture[] getBackActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
public ITexture[] getBottomActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
public ITexture[] getTopActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
public ITexture[] getSidesActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
@Override
@@ -169,7 +131,11 @@ public class GregtechMetaPollutionCreator extends GregtechMetaTileEntity {
@Override
public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMetaPollutionCreator(
- this.mName, this.mTier, this.mDescription, this.mTextures, this.mInventory.length);
+ this.mName,
+ this.mTier,
+ this.mDescription,
+ this.mTextures,
+ this.mInventory.length);
}
@Override
@@ -303,8 +269,8 @@ public class GregtechMetaPollutionCreator extends GregtechMetaTileEntity {
PlayerUtils.messagePlayer(playerIn, "This block is useless, Pollution is disabled.");
} else {
addPollution();
- PlayerUtils.messagePlayer(
- playerIn, "This chunk now contains " + getCurrentChunkPollution() + " pollution.");
+ PlayerUtils
+ .messagePlayer(playerIn, "This chunk now contains " + getCurrentChunkPollution() + " pollution.");
// PlayerUtils.messagePlayer(playerIn, "Average over last ten minutes: "+getAveragePollutionOverLastTen()+"
// pollution.");
}
@@ -316,14 +282,14 @@ public class GregtechMetaPollutionCreator extends GregtechMetaTileEntity {
}
@Override
- public boolean allowPullStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return false;
}
@Override
- public boolean allowPutStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return false;
}
@@ -337,11 +303,8 @@ public class GregtechMetaPollutionCreator extends GregtechMetaTileEntity {
@Override
public String[] getInfoData() {
- return new String[] {
- this.getLocalName(),
- "Current Pollution: " + this.mCurrentPollution,
- "Average/10 minutes:" + getAveragePollutionOverLastTen()
- };
+ return new String[] { this.getLocalName(), "Current Pollution: " + this.mCurrentPollution,
+ "Average/10 minutes:" + getAveragePollutionOverLastTen() };
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java
index 9ba3db911a..32e45dde15 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java
@@ -1,5 +1,10 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -12,10 +17,6 @@ import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
public class GregtechMetaPollutionDetector extends GregtechMetaTileEntity {
@@ -27,53 +28,30 @@ public class GregtechMetaPollutionDetector extends GregtechMetaTileEntity {
private int mSecondTimer = 0;
private long mRedstoneLevel = 0;
- public GregtechMetaPollutionDetector(
- final int aID,
- final String aName,
- final String aNameRegional,
- final int aTier,
- final String aDescription,
- final int aSlotCount) {
+ public GregtechMetaPollutionDetector(final int aID, final String aName, final String aNameRegional, final int aTier,
+ final String aDescription, final int aSlotCount) {
super(aID, aName, aNameRegional, aTier, aSlotCount, aDescription);
}
- public GregtechMetaPollutionDetector(
- final String aName,
- final int aTier,
- final String aDescription,
- final ITexture[][][] aTextures,
- final int aSlotCount) {
+ public GregtechMetaPollutionDetector(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures, final int aSlotCount) {
super(aName, aTier, aSlotCount, aDescription, aTextures);
}
@Override
public String[] getDescription() {
- return new String[] {
- this.mDescription,
- "Right click to check pollution levels.",
- "Configure with screwdriver to set redstone output amount.",
- "Does not use power.",
- CORE.GT_Tooltip
- };
- }
-
- @Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
+ return new String[] { this.mDescription, "Right click to check pollution levels.",
+ "Configure with screwdriver to set redstone output amount.", "Does not use power.", CORE.GT_Tooltip };
+ }
+
+ @Override
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
return aSide == aFacing
- ? new ITexture[] {
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional),
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_Frequency)
- }
- : new ITexture[] {
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional),
- new GT_RenderedTexture(Textures.BlockIcons.VOID)
- };
+ ? new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional),
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_Frequency) }
+ : new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional),
+ new GT_RenderedTexture(Textures.BlockIcons.VOID) };
}
@Override
@@ -94,85 +72,71 @@ public class GregtechMetaPollutionDetector extends GregtechMetaTileEntity {
return rTextures;
}
- /*@Override
- public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
- return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1];
- }*/
+ /*
+ * @Override public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final
+ * byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { return
+ * this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 :
+ * aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; }
+ */
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2) };
}
public ITexture[] getBack(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
public ITexture[] getFrontActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2) };
}
public ITexture[] getBackActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
public ITexture[] getBottomActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
public ITexture[] getTopActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
public ITexture[] getSidesActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
@Override
public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMetaPollutionDetector(
- this.mName, this.mTier, this.mDescription, this.mTextures, this.mInventory.length);
+ this.mName,
+ this.mTier,
+ this.mDescription,
+ this.mTextures,
+ this.mInventory.length);
}
@Override
@@ -309,14 +273,14 @@ public class GregtechMetaPollutionDetector extends GregtechMetaTileEntity {
}
@Override
- public boolean allowPullStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return false;
}
@Override
- public boolean allowPutStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return false;
}
@@ -330,12 +294,9 @@ public class GregtechMetaPollutionDetector extends GregtechMetaTileEntity {
@Override
public String[] getInfoData() {
- return new String[] {
- this.getLocalName(),
- "Current Pollution: " + this.mCurrentPollution,
- "Average/10 Sec: " + this.mAveragePollution,
- "Emit Redstone at pollution level: " + this.mRedstoneLevel
- };
+ return new String[] { this.getLocalName(), "Current Pollution: " + this.mCurrentPollution,
+ "Average/10 Sec: " + this.mAveragePollution,
+ "Emit Redstone at pollution level: " + this.mRedstoneLevel };
}
@Override
@@ -521,8 +482,8 @@ public class GregtechMetaPollutionDetector extends GregtechMetaTileEntity {
}
@Override
- public boolean onRightclick(
- IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) {
+ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX,
+ float aY, float aZ) {
return super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ);
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java
index 4e851b3d6a..92eebb96e7 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java
@@ -3,7 +3,20 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic;
import static gregtech.api.enums.GT_Values.V;
import static net.minecraftforge.common.ForgeChunkManager.getMaxChunkDepthFor;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.ChunkCoordIntPair;
+import net.minecraftforge.common.ForgeChunkManager;
+import net.minecraftforge.common.ForgeChunkManager.Ticket;
+
import com.google.common.collect.MapMaker;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
@@ -16,16 +29,6 @@ import gtPlusPlus.GTplusplus;
import gtPlusPlus.core.chunkloading.GTPP_ChunkManager;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.ChunkCoordIntPair;
-import net.minecraftforge.common.ForgeChunkManager;
-import net.minecraftforge.common.ForgeChunkManager.Ticket;
public class GregtechMetaTileEntityChunkLoader extends GT_MetaTileEntity_BasicMachine {
@@ -44,8 +47,8 @@ public class GregtechMetaTileEntityChunkLoader extends GT_MetaTileEntity_BasicMa
new ITexture[] {});
}
- public GregtechMetaTileEntityChunkLoader(
- String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
+ public GregtechMetaTileEntityChunkLoader(String aName, int aTier, String aDescription, ITexture[][][] aTextures,
+ String aGUIName, String aNEIName) {
super(aName, aTier, 4, aDescription, aTextures, 0, 0, aGUIName, aNEIName);
}
@@ -84,12 +87,8 @@ public class GregtechMetaTileEntityChunkLoader extends GT_MetaTileEntity_BasicMa
@Override
public String[] getDescription() {
- return new String[] {
- "Loads " + getMaxChunksToLoadForTier(this.mTier) + " chunks when powered",
- "Consumes 2A",
- "Behaves Identically to a Railcraft World Anchor",
- CORE.GT_Tooltip
- };
+ return new String[] { "Loads " + getMaxChunksToLoadForTier(this.mTier) + " chunks when powered", "Consumes 2A",
+ "Behaves Identically to a Railcraft World Anchor", CORE.GT_Tooltip };
}
@Override
@@ -111,101 +110,71 @@ public class GregtechMetaTileEntityChunkLoader extends GT_MetaTileEntity_BasicMa
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
- return this.mTextures[
- (aActive ? 5 : 0)
- + (aSide == aFacing
- ? 0
- : aSide == GT_Utility.getOppositeSide(aFacing)
- ? 1
- : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][
- aColorIndex + 1];
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0
+ : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex
+ + 1];
}
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel),
- new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier])
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel),
+ new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier]) };
}
public ITexture[] getBack(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel),
- new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier])
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel),
+ new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier]) };
}
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel),
- new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier])
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel),
+ new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier]) };
}
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel),
- new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier])
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel),
+ new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier]) };
}
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel),
- new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier])
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel),
+ new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier]) };
}
public ITexture[] getFrontActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel),
- new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier + 1])
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel),
+ new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier + 1]) };
}
public ITexture[] getBackActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel),
- new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier + 1])
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel),
+ new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier + 1]) };
}
public ITexture[] getBottomActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel),
- new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier + 1])
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel),
+ new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier + 1]) };
}
public ITexture[] getTopActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel),
- new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier + 1])
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel),
+ new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier + 1]) };
}
public ITexture[] getSidesActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel),
- new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier + 1])
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel),
+ new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier + 1]) };
}
@Override
@@ -216,18 +185,23 @@ public class GregtechMetaTileEntityChunkLoader extends GT_MetaTileEntity_BasicMa
@Override
public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntityChunkLoader(
- this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
+ this.mName,
+ this.mTier,
+ this.mDescription,
+ this.mTextures,
+ this.mGUIName,
+ this.mNEIName);
}
@Override
- public boolean allowPullStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return false;
}
@Override
- public boolean allowPutStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return false;
}
@@ -266,8 +240,7 @@ public class GregtechMetaTileEntityChunkLoader extends GT_MetaTileEntity_BasicMa
super.onPostTick(aBaseMetaTileEntity, aTick);
if (aBaseMetaTileEntity.isServerSide()) {
- if (aBaseMetaTileEntity.getXCoord() != prevX
- || aBaseMetaTileEntity.getYCoord() != prevY
+ if (aBaseMetaTileEntity.getXCoord() != prevX || aBaseMetaTileEntity.getYCoord() != prevY
|| aBaseMetaTileEntity.getZCoord() != prevZ) {
releaseTicket();
prevX = aBaseMetaTileEntity.getXCoord();
@@ -275,10 +248,8 @@ public class GregtechMetaTileEntityChunkLoader extends GT_MetaTileEntity_BasicMa
prevZ = aBaseMetaTileEntity.getZCoord();
}
- if (hasActiveTicket()
- && (getTicket().world != aBaseMetaTileEntity.getWorld()
- || refreshTicket
- || !aBaseMetaTileEntity.isAllowedToWork())) {
+ if (hasActiveTicket() && (getTicket().world != aBaseMetaTileEntity.getWorld() || refreshTicket
+ || !aBaseMetaTileEntity.isAllowedToWork())) {
releaseTicket();
}
@@ -409,8 +380,8 @@ public class GregtechMetaTileEntityChunkLoader extends GT_MetaTileEntity_BasicMa
}
protected Ticket getTicketFromForge() {
- return ForgeChunkManager.requestTicket(
- GTplusplus.instance, getBaseMetaTileEntity().getWorld(), ForgeChunkManager.Type.NORMAL);
+ return ForgeChunkManager
+ .requestTicket(GTplusplus.instance, getBaseMetaTileEntity().getWorld(), ForgeChunkManager.Type.NORMAL);
}
public boolean hasActiveTicket() {
@@ -434,15 +405,9 @@ public class GregtechMetaTileEntityChunkLoader extends GT_MetaTileEntity_BasicMa
protected void setTicketData(Ticket chunkTicket) {
if (chunkTicket != null) {
- chunkTicket
- .getModData()
- .setInteger("xCoord", getBaseMetaTileEntity().getXCoord());
- chunkTicket
- .getModData()
- .setInteger("yCoord", getBaseMetaTileEntity().getYCoord());
- chunkTicket
- .getModData()
- .setInteger("zCoord", getBaseMetaTileEntity().getZCoord());
+ chunkTicket.getModData().setInteger("xCoord", getBaseMetaTileEntity().getXCoord());
+ chunkTicket.getModData().setInteger("yCoord", getBaseMetaTileEntity().getYCoord());
+ chunkTicket.getModData().setInteger("zCoord", getBaseMetaTileEntity().getZCoord());
chunkTicket.setChunkListDepth(getMaxChunksToLoadForTier(mTier));
}
}
@@ -453,9 +418,7 @@ public class GregtechMetaTileEntityChunkLoader extends GT_MetaTileEntity_BasicMa
if (ticket != null) {
if (ticket.world == getBaseMetaTileEntity().getWorld()) {
for (ChunkCoordIntPair chunk : ticket.getChunkList()) {
- if (ForgeChunkManager.getPersistentChunksFor(
- getBaseMetaTileEntity().getWorld())
- .keys()
+ if (ForgeChunkManager.getPersistentChunksFor(getBaseMetaTileEntity().getWorld()).keys()
.contains(chunk)) {
ForgeChunkManager.unforceChunk(ticket, chunk);
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityThaumcraftResearcher.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityThaumcraftResearcher.java
index ea2f47ab8e..21dbbe25f4 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityThaumcraftResearcher.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityThaumcraftResearcher.java
@@ -1,5 +1,9 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -7,34 +11,22 @@ import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
public class GregtechMetaTileEntityThaumcraftResearcher extends GregtechMetaTileEntity {
- public GregtechMetaTileEntityThaumcraftResearcher(
- final int aID,
- final String aName,
- final String aNameRegional,
- final int aTier,
- final String aDescription,
- final int aSlotCount) {
+ public GregtechMetaTileEntityThaumcraftResearcher(final int aID, final String aName, final String aNameRegional,
+ final int aTier, final String aDescription, final int aSlotCount) {
super(aID, aName, aNameRegional, aTier, aSlotCount, aDescription);
}
- public GregtechMetaTileEntityThaumcraftResearcher(
- final String aName,
- final int aTier,
- final String aDescription,
- final ITexture[][][] aTextures,
- final int aSlotCount) {
+ public GregtechMetaTileEntityThaumcraftResearcher(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures, final int aSlotCount) {
super(aName, aTier, aSlotCount, aDescription, aTextures);
}
@Override
public String[] getDescription() {
- return new String[] {this.mDescription, "Generates Thaumcraft research notes, because it's magic."};
+ return new String[] { this.mDescription, "Generates Thaumcraft research notes, because it's magic." };
}
@Override
@@ -56,45 +48,34 @@ public class GregtechMetaTileEntityThaumcraftResearcher extends GregtechMetaTile
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
- return this.mTextures[
- (aActive ? 5 : 0)
- + (aSide == aFacing
- ? 0
- : aSide == GT_Utility.getOppositeSide(aFacing)
- ? 1
- : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][
- aColorIndex + 1];
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0
+ : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex
+ + 1];
}
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {getSides(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Metal_Grate_A)
- };
+ return new ITexture[] { getSides(aColor)[0],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Metal_Grate_A) };
}
public ITexture[] getBack(final byte aColor) {
- return new ITexture[] {getSides(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Metal_Grate_B)
- };
+ return new ITexture[] { getSides(aColor)[0],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Metal_Grate_B) };
}
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {getSides(aColor)[0]};
+ return new ITexture[] { getSides(aColor)[0] };
}
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {
- getSides(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Blue)
- };
+ return new ITexture[] { getSides(aColor)[0],
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Blue) };
}
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)};
+ return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel) };
}
public ITexture[] getFrontActive(final byte aColor) {
@@ -110,9 +91,8 @@ public class GregtechMetaTileEntityThaumcraftResearcher extends GregtechMetaTile
}
public ITexture[] getTopActive(final byte aColor) {
- return new ITexture[] {
- getSides(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange)
- };
+ return new ITexture[] { getSides(aColor)[0],
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) };
}
public ITexture[] getSidesActive(final byte aColor) {
@@ -127,7 +107,11 @@ public class GregtechMetaTileEntityThaumcraftResearcher extends GregtechMetaTile
@Override
public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntityThaumcraftResearcher(
- this.mName, this.mTier, this.mDescription, this.mTextures, this.mInventory.length);
+ this.mName,
+ this.mTier,
+ this.mDescription,
+ this.mTextures,
+ this.mInventory.length);
}
@Override
@@ -224,22 +208,20 @@ public class GregtechMetaTileEntityThaumcraftResearcher extends GregtechMetaTile
}
@Override
- public boolean allowPullStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return aSide == this.getBaseMetaTileEntity().getBackFacing();
}
@Override
- public boolean allowPutStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return true;
}
@Override
public String[] getInfoData() {
- return new String[] {
- this.getLocalName(),
- };
+ return new String[] { this.getLocalName(), };
}
@Override
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 ea9b161d4e..5952f1f220 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
@@ -1,5 +1,11 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic;
+import java.util.List;
+
+import net.minecraft.item.ItemStack;
+
+import team.chisel.carving.Carving;
+
import com.gtnewhorizons.modularui.api.drawable.IDrawable;
import com.gtnewhorizons.modularui.api.math.Pos2d;
import com.gtnewhorizons.modularui.api.math.Size;
@@ -7,6 +13,7 @@ import com.gtnewhorizons.modularui.api.screen.ModularWindow;
import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
import com.gtnewhorizons.modularui.common.widget.ProgressBar;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
+
import gregtech.api.enums.Textures.BlockIcons;
import gregtech.api.gui.modularui.GT_UITextures;
import gregtech.api.interfaces.ITexture;
@@ -18,9 +25,6 @@ import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.List;
-import net.minecraft.item.ItemStack;
-import team.chisel.carving.Carving;
public class GregtechMetaTileEntity_AutoChisel extends GT_MetaTileEntity_BasicMachine {
@@ -39,37 +43,37 @@ public class GregtechMetaTileEntity_AutoChisel extends GT_MetaTileEntity_BasicMa
1,
"Compressor.png",
"",
- new ITexture[] {
- new GT_RenderedTexture(BlockIcons.OVERLAY_SIDE_MASSFAB_ACTIVE),
- new GT_RenderedTexture(BlockIcons.OVERLAY_SIDE_MASSFAB),
- new GT_RenderedTexture(BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE),
- new GT_RenderedTexture(BlockIcons.OVERLAY_FRONT_MULTI_SMELTER),
- new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab_Active),
- new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab),
- new GT_RenderedTexture(BlockIcons.OVERLAY_BOTTOM_MASSFAB_ACTIVE),
- new GT_RenderedTexture(BlockIcons.OVERLAY_BOTTOM_MASSFAB)
- });
- }
-
- public GregtechMetaTileEntity_AutoChisel(
- String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
+ new ITexture[] { new GT_RenderedTexture(BlockIcons.OVERLAY_SIDE_MASSFAB_ACTIVE),
+ new GT_RenderedTexture(BlockIcons.OVERLAY_SIDE_MASSFAB),
+ new GT_RenderedTexture(BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE),
+ new GT_RenderedTexture(BlockIcons.OVERLAY_FRONT_MULTI_SMELTER),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab_Active),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab),
+ new GT_RenderedTexture(BlockIcons.OVERLAY_BOTTOM_MASSFAB_ACTIVE),
+ new GT_RenderedTexture(BlockIcons.OVERLAY_BOTTOM_MASSFAB) });
+ }
+
+ public GregtechMetaTileEntity_AutoChisel(String aName, int aTier, String aDescription, ITexture[][][] aTextures,
+ String aGUIName, String aNEIName) {
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
}
@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntity_AutoChisel(
- this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
+ this.mName,
+ this.mTier,
+ this.mDescription,
+ this.mTextures,
+ this.mGUIName,
+ this.mNEIName);
}
@Override
public String[] getDescription() {
- String[] A = new String[] {
- this.mDescription,
- "What you want to chisel goes in slot 1",
- "What you want to get goes in the special slot (bottom right)",
- "If special slot is empty, first chisel result is used"
- };
+ String[] A = new String[] { this.mDescription, "What you want to chisel goes in slot 1",
+ "What you want to get goes in the special slot (bottom right)",
+ "If special slot is empty, first chisel result is used" };
return A;
}
@@ -99,10 +103,9 @@ public class GregtechMetaTileEntity_AutoChisel extends GT_MetaTileEntity_BasicMa
}
@Override
- protected boolean allowPutStackValidated(
- IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return hasValidCache(aStack, this.getSpecialSlot(), false)
- ? true
+ protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide,
+ ItemStack aStack) {
+ return hasValidCache(aStack, this.getSpecialSlot(), false) ? true
: super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) && hasChiselResults(aStack);
}
@@ -180,12 +183,13 @@ public class GregtechMetaTileEntity_AutoChisel extends GT_MetaTileEntity_BasicMa
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
super.addUIWidgets(builder, buildContext);
- builder.widget(createProgressBar(
- GT_UITextures.PROGRESSBAR_COMPRESS,
- 20,
- ProgressBar.Direction.RIGHT,
- new Pos2d(78, 24),
- new Size(20, 18)));
+ builder.widget(
+ createProgressBar(
+ GT_UITextures.PROGRESSBAR_COMPRESS,
+ 20,
+ ProgressBar.Direction.RIGHT,
+ new Pos2d(78, 24),
+ new Size(20, 18)));
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_BasicWasher.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_BasicWasher.java
index 268863ffd2..e25db682b3 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_BasicWasher.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_BasicWasher.java
@@ -1,5 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -9,8 +12,6 @@ import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GTPP_Recipe;
import gregtech.api.util.GT_Recipe;
import gtPlusPlus.core.lib.CORE;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntity_BasicWasher extends GT_MetaTileEntity_BasicMachine {
@@ -26,36 +27,41 @@ public class GregtechMetaTileEntity_BasicWasher extends GT_MetaTileEntity_BasicM
1,
"PotionBrewer.png",
"",
- new ITexture[] {
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER_ACTIVE),
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER),
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER_ACTIVE),
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER),
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_ACTIVE),
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER),
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE),
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER)
- });
+ new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER_ACTIVE),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER_ACTIVE),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_ACTIVE),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER) });
}
- public GregtechMetaTileEntity_BasicWasher(
- String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
+ public GregtechMetaTileEntity_BasicWasher(String aName, int aTier, String aDescription, ITexture[][][] aTextures,
+ String aGUIName, String aNEIName) {
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
}
- /*public GregtechMetaTileEntity_BasicWasher(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
- super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
- }*/
+ /*
+ * public GregtechMetaTileEntity_BasicWasher(String aName, int aTier, String[] aDescription, ITexture[][][]
+ * aTextures, String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName,
+ * aNEIName); }
+ */
@Override
public String[] getDescription() {
- return new String[] {this.mDescription, "Grants no byproducts, but it is fast.", CORE.GT_Tooltip};
+ return new String[] { this.mDescription, "Grants no byproducts, but it is fast.", CORE.GT_Tooltip };
}
@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntity_BasicWasher(
- this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
+ this.mName,
+ this.mTier,
+ this.mDescription,
+ this.mTextures,
+ this.mGUIName,
+ this.mNEIName);
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ChemicalReactor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ChemicalReactor.java
index b8df5ae9ff..26de52f7f4 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ChemicalReactor.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ChemicalReactor.java
@@ -1,5 +1,16 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic;
+import java.util.List;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.fluids.FluidTankInfo;
+import net.minecraftforge.fluids.IFluidHandler;
+
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
@@ -11,15 +22,6 @@ import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.slots.SlotChemicalPlantInput;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.List;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.FluidTankInfo;
-import net.minecraftforge.fluids.IFluidHandler;
public class GregtechMetaTileEntity_ChemicalReactor extends GT_MetaTileEntity_BasicMachine {
@@ -41,37 +43,42 @@ public class GregtechMetaTileEntity_ChemicalReactor extends GT_MetaTileEntity_Ba
4,
"ChemicalReactor.png",
"",
- new ITexture[] {
- new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Side_Active),
- new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Side),
- new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Front_Active),
- new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Front),
- new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Top_Active),
- new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Top),
- new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Top_Active),
- new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Top)
- });
- }
-
- public GregtechMetaTileEntity_ChemicalReactor(
- String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
+ new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Side_Active),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Side),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Front_Active),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Front),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Top_Active),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Top),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Top_Active),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_FluidReactor_Top) });
+ }
+
+ public GregtechMetaTileEntity_ChemicalReactor(String aName, int aTier, String aDescription,
+ ITexture[][][] aTextures, String aGUIName, String aNEIName) {
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
}
- /*public GregtechMetaTileEntity_BasicWasher(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
- super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
- }*/
+ /*
+ * public GregtechMetaTileEntity_BasicWasher(String aName, int aTier, String[] aDescription, ITexture[][][]
+ * aTextures, String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName,
+ * aNEIName); }
+ */
@Override
public String[] getDescription() {
- return new String[] {this.mDescription, "Because why not?", CORE.GT_Tooltip};
+ return new String[] { this.mDescription, "Because why not?", CORE.GT_Tooltip };
}
@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
try {
GregtechMetaTileEntity_ChemicalReactor y = new GregtechMetaTileEntity_ChemicalReactor(
- this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
+ this.mName,
+ this.mTier,
+ this.mDescription,
+ this.mTextures,
+ this.mGUIName,
+ this.mNEIName);
return y;
} catch (Throwable t) {
t.printStackTrace();
@@ -225,12 +232,9 @@ public class GregtechMetaTileEntity_ChemicalReactor extends GT_MetaTileEntity_Ba
} else {
if (++this.mProgresstime >= this.mMaxProgresstime) {
for (i = 0; i < this.mOutputItems.length; ++i) {
- for (i = 0;
- i < this.mOutputItems.length
- && !aBaseMetaTileEntity.addStackToSlot(
- this.getOutputSlot() + (i + i) % this.mOutputItems.length,
- this.mOutputItems[i]);
- ++i) {
+ for (i = 0; i < this.mOutputItems.length && !aBaseMetaTileEntity.addStackToSlot(
+ this.getOutputSlot() + (i + i) % this.mOutputItems.length,
+ this.mOutputItems[i]); ++i) {
;
}
}
@@ -266,8 +270,7 @@ public class GregtechMetaTileEntity_ChemicalReactor extends GT_MetaTileEntity_Ba
}
boolean tRemovedOutputFluid = false;
- if (this.doesAutoOutputFluids()
- && this.getDrainableStack() != null
+ if (this.doesAutoOutputFluids() && this.getDrainableStack() != null
&& aBaseMetaTileEntity.getFrontFacing() != this.mMainFacing
&& (tSucceeded || aTick % 20L == 0L)) {
IFluidHandler tTank = aBaseMetaTileEntity.getITankContainerAtSide(aBaseMetaTileEntity.getFrontFacing());
@@ -275,7 +278,9 @@ public class GregtechMetaTileEntity_ChemicalReactor extends GT_MetaTileEntity_Ba
FluidStack tDrained = this.drain(1000, false);
if (tDrained != null) {
int tFilledAmount = tTank.fill(
- ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), tDrained, false);
+ ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()),
+ tDrained,
+ false);
if (tFilledAmount > 0) {
tTank.fill(
ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()),
@@ -291,19 +296,16 @@ public class GregtechMetaTileEntity_ChemicalReactor extends GT_MetaTileEntity_Ba
}
int j;
- if (this.doesAutoOutput()
- && !this.isOutputEmpty()
+ if (this.doesAutoOutput() && !this.isOutputEmpty()
&& aBaseMetaTileEntity.getFrontFacing() != this.mMainFacing
- && (tSucceeded
- || this.mOutputBlocked % 300 == 1
+ && (tSucceeded || this.mOutputBlocked % 300 == 1
|| aBaseMetaTileEntity.hasInventoryBeenModified()
|| aTick % 600L == 0L)) {
TileEntity tTileEntity2 = aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getFrontFacing());
j = 0;
- for (byte tCosts = 1;
- j < this.mOutputItems.length && tCosts > 0 && aBaseMetaTileEntity.isUniversalEnergyStored(128L);
- ++j) {
+ for (byte tCosts = 1; j < this.mOutputItems.length && tCosts > 0
+ && aBaseMetaTileEntity.isUniversalEnergyStored(128L); ++j) {
tCosts = GT_Utility.moveOneItemStack(
aBaseMetaTileEntity,
tTileEntity2,
@@ -330,10 +332,8 @@ public class GregtechMetaTileEntity_ChemicalReactor extends GT_MetaTileEntity_Ba
}
if (this.allowToCheckRecipe()) {
- if (this.mMaxProgresstime <= 0
- && aBaseMetaTileEntity.isAllowedToWork()
- && (tRemovedOutputFluid
- || tSucceeded
+ if (this.mMaxProgresstime <= 0 && aBaseMetaTileEntity.isAllowedToWork()
+ && (tRemovedOutputFluid || tSucceeded
|| aBaseMetaTileEntity.hasInventoryBeenModified()
|| aTick % 600L == 0L
|| aBaseMetaTileEntity.hasWorkJustBeenEnabled())
@@ -352,7 +352,7 @@ public class GregtechMetaTileEntity_ChemicalReactor extends GT_MetaTileEntity_Ba
}
for (i = 0; i < this.mOutputItems.length; ++i) {
- this.mOutputItems[i] = GT_Utility.copy(new Object[] {this.mOutputItems[i]});
+ this.mOutputItems[i] = GT_Utility.copy(new Object[] { this.mOutputItems[i] });
if (this.mOutputItems[i] != null && this.mOutputItems[i].stackSize > 64) {
this.mOutputItems[i].stackSize = 64;
}
@@ -472,80 +472,20 @@ public class GregtechMetaTileEntity_ChemicalReactor extends GT_MetaTileEntity_Ba
public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
super.onPreTick(aBaseMetaTileEntity, aTick);
- /* if (aBaseMetaTileEntity != null) {
- if (!aBaseMetaTileEntity.getWorld().isRemote) {
- itemslots : for (int i=3;i<7;i++) {
- ItemStack aStack = aBaseMetaTileEntity.getStackInSlot(i);
- if (aStack != null) {
- if (FluidContainerRegistry.isContainer(aStack)) {
- if (this.isItemValidForSlot(i, aStack)) {
- // Add Fluid
- FluidStack aContainerFluid = FluidContainerRegistry.getFluidForFilledItem(aStack);
- if (aContainerFluid != null) {
- fluidslots : for (FluidStack u : mInputFluids) {
- if (u != null && u.isFluidEqual(aContainerFluid)) {
- if (u.amount <= (this.getCapacity() - aContainerFluid.amount)) {
-
- // Matching, not full, let's fill, then continue
- u.amount += aContainerFluid.amount;
-
- // Update stack size
- if (aStack.stackSize > 1) {
- aStack.stackSize--;
- }
- else {
- aStack = null;
- }
-
- // Add Output container
- // TODO
-
- continue itemslots;
- }
- else {
- // Too full
- break fluidslots;
- }
- }
- else {
- if (u == null ) {
-
- // Empty, let's fill, then continue
- u = aContainerFluid.copy();
-
- // Update stack size
- if (aStack.stackSize > 1) {
- aStack.stackSize--;
- }
- else {
- aStack = null;
- }
-
- // Add Output container
- // TODO
-
- continue itemslots;
-
- }
- else {
- // Not empty, doesn't match, check next slot.
- continue fluidslots;
- }
- }
- }
-
-
-
- }
- // Eat Input
-
- // Add Container to Output
- }
- }
- }
- }
- }
- }*/
+ /*
+ * if (aBaseMetaTileEntity != null) { if (!aBaseMetaTileEntity.getWorld().isRemote) { itemslots : for (int
+ * i=3;i<7;i++) { ItemStack aStack = aBaseMetaTileEntity.getStackInSlot(i); if (aStack != null) { if
+ * (FluidContainerRegistry.isContainer(aStack)) { if (this.isItemValidForSlot(i, aStack)) { // Add Fluid
+ * FluidStack aContainerFluid = FluidContainerRegistry.getFluidForFilledItem(aStack); if (aContainerFluid !=
+ * null) { fluidslots : for (FluidStack u : mInputFluids) { if (u != null && u.isFluidEqual(aContainerFluid)) {
+ * if (u.amount <= (this.getCapacity() - aContainerFluid.amount)) { // Matching, not full, let's fill, then
+ * continue u.amount += aContainerFluid.amount; // Update stack size if (aStack.stackSize > 1) {
+ * aStack.stackSize--; } else { aStack = null; } // Add Output container // TODO continue itemslots; } else { //
+ * Too full break fluidslots; } } else { if (u == null ) { // Empty, let's fill, then continue u =
+ * aContainerFluid.copy(); // Update stack size if (aStack.stackSize > 1) { aStack.stackSize--; } else { aStack
+ * = null; } // Add Output container // TODO continue itemslots; } else { // Not empty, doesn't match, check
+ * next slot. continue fluidslots; } } } } // Eat Input // Add Container to Output } } } } } }
+ */
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java
index 39c6bb53dd..5de366dfa4 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java
@@ -1,5 +1,15 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic;
+import java.util.ArrayList;
+import java.util.Random;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidStack;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Textures;
@@ -14,14 +24,6 @@ import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_DeluxeMachine;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.ArrayList;
-import java.util.Random;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEntity_DeluxeMachine {
@@ -41,27 +43,27 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti
super(aID, aName, aNameRegional, aTier, 1, "It's like a midget Ra.", 1, 1, "PotionBrewer.png", "");
}
- public GregtechMetaTileEntity_CompactFusionReactor(
- String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
+ public GregtechMetaTileEntity_CompactFusionReactor(String aName, int aTier, String aDescription,
+ ITexture[][][] aTextures, String aGUIName, String aNEIName) {
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
}
@Override
public String[] getDescription() {
- return new String[] {
- this.mDescription,
- "Not Very Fast, but not very big either.",
- "Each side pair in/out puts to different slots.",
- "Top & Bottom Sides are Outputs.",
- "Front & Back are Input Plasma 1.",
- "Sides are Input Plasma 2."
- };
+ return new String[] { this.mDescription, "Not Very Fast, but not very big either.",
+ "Each side pair in/out puts to different slots.", "Top & Bottom Sides are Outputs.",
+ "Front & Back are Input Plasma 1.", "Sides are Input Plasma 2." };
}
@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntity_CompactFusionReactor(
- this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
+ this.mName,
+ this.mTier,
+ this.mDescription,
+ this.mTextures,
+ this.mGUIName,
+ this.mNEIName);
}
public int tier() {
@@ -95,21 +97,11 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
- return this.mTextures[
- (aActive ? 5 : 0)
- + (aSide == aFacing
- ? 0
- : aSide == GT_Utility.getOppositeSide(aFacing)
- ? 1
- : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][
- aColorIndex + 1];
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0
+ : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex
+ + 1];
}
@Override
@@ -149,8 +141,10 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti
this.mCharging = true;
this.mCanProcessRecipe = false;
if (this.getBaseMetaTileEntity().decreaseStoredEnergyUnits((mFusionPoint / 100), false)) {
- Logger.MACHINE_INFO("Recipe Tick 1.3 - Charging Internal storage. " + (mFusionPoint / 100) + "/"
- + mFusionPoint);
+ Logger.MACHINE_INFO(
+ "Recipe Tick 1.3 - Charging Internal storage. " + (mFusionPoint / 100)
+ + "/"
+ + mFusionPoint);
mChargeConsumed += (mFusionPoint / 100);
}
} else {
@@ -195,14 +189,13 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti
}
if (tFluidList.size() > 1) {
FluidStack[] tFluids = tFluidList.toArray(new FluidStack[tFluidList.size()]);
- GT_Recipe tRecipe = getRecipeList()
- .findRecipe(
- this.getBaseMetaTileEntity(),
- this.mLastRecipe,
- false,
- GT_Values.V[8],
- tFluids,
- new ItemStack[] {});
+ GT_Recipe tRecipe = getRecipeList().findRecipe(
+ this.getBaseMetaTileEntity(),
+ this.mLastRecipe,
+ false,
+ GT_Values.V[8],
+ tFluids,
+ new ItemStack[] {});
if (tRecipe == null) {
return false;
}
@@ -275,43 +268,36 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti
public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
super.onPreTick(aBaseMetaTileEntity, aTick);
onRunningTickMulti();
- if ((aBaseMetaTileEntity.isClientSide())
- && (aBaseMetaTileEntity.isActive())
+ if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive())
&& (aBaseMetaTileEntity.getFrontFacing() != 1)
&& (aBaseMetaTileEntity.getCoverIDAtSide((byte) 1) == 0)
&& (!aBaseMetaTileEntity.getOpacityAtSide((byte) 1))) {
if (MathUtils.randInt(0, 4) == 4) {
final Random tRandom = aBaseMetaTileEntity.getWorld().rand;
- aBaseMetaTileEntity
- .getWorld()
- .spawnParticle(
- "magicCrit",
- (aBaseMetaTileEntity.getXCoord() + 0.8F) - (tRandom.nextFloat() * 0.6F),
- aBaseMetaTileEntity.getYCoord() + 0.3f + (tRandom.nextFloat() * 0.2F),
- (aBaseMetaTileEntity.getZCoord() + 1.2F) - (tRandom.nextFloat() * 1.6F),
- 0.0D,
- 0.0D,
- 0.0D);
- aBaseMetaTileEntity
- .getWorld()
- .spawnParticle(
- "magicCrit",
- (aBaseMetaTileEntity.getXCoord() + 0.4F) - (tRandom.nextFloat() * 0.3F),
- aBaseMetaTileEntity.getYCoord() + 0.2f + (tRandom.nextFloat() * 0.1F),
- (aBaseMetaTileEntity.getZCoord() + 0.8F) - (tRandom.nextFloat() * 0.6F),
- 0.0D,
- 0.0D,
- 0.0D);
- aBaseMetaTileEntity
- .getWorld()
- .spawnParticle(
- "magicCrit",
- (aBaseMetaTileEntity.getXCoord() + 0.6F) - (tRandom.nextFloat() * 0.9F),
- aBaseMetaTileEntity.getYCoord() + 0.4f + (tRandom.nextFloat() * 0.3F),
- (aBaseMetaTileEntity.getZCoord() + 1.8F) - (tRandom.nextFloat() * 2.6F),
- 0.0D,
- 0.0D,
- 0.0D);
+ aBaseMetaTileEntity.getWorld().spawnParticle(
+ "magicCrit",
+ (aBaseMetaTileEntity.getXCoord() + 0.8F) - (tRandom.nextFloat() * 0.6F),
+ aBaseMetaTileEntity.getYCoord() + 0.3f + (tRandom.nextFloat() * 0.2F),
+ (aBaseMetaTileEntity.getZCoord() + 1.2F) - (tRandom.nextFloat() * 1.6F),
+ 0.0D,
+ 0.0D,
+ 0.0D);
+ aBaseMetaTileEntity.getWorld().spawnParticle(
+ "magicCrit",
+ (aBaseMetaTileEntity.getXCoord() + 0.4F) - (tRandom.nextFloat() * 0.3F),
+ aBaseMetaTileEntity.getYCoord() + 0.2f + (tRandom.nextFloat() * 0.1F),
+ (aBaseMetaTileEntity.getZCoord() + 0.8F) - (tRandom.nextFloat() * 0.6F),
+ 0.0D,
+ 0.0D,
+ 0.0D);
+ aBaseMetaTileEntity.getWorld().spawnParticle(
+ "magicCrit",
+ (aBaseMetaTileEntity.getXCoord() + 0.6F) - (tRandom.nextFloat() * 0.9F),
+ aBaseMetaTileEntity.getYCoord() + 0.4f + (tRandom.nextFloat() * 0.3F),
+ (aBaseMetaTileEntity.getZCoord() + 1.8F) - (tRandom.nextFloat() * 2.6F),
+ 0.0D,
+ 0.0D,
+ 0.0D);
}
}
}
@@ -366,13 +352,9 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti
}
}
- return new String[] {
- "Fusion Reactor MK " + tier,
- "EU Required: " + powerRequired + "EU/t",
- "Stored EU: " + this.getEUVar() + " / " + maxEUStore(),
- "Plasma Output: " + plasmaOut + "L/t",
- "Current Recipe: " + fusionName
- };
+ return new String[] { "Fusion Reactor MK " + tier, "EU Required: " + powerRequired + "EU/t",
+ "Stored EU: " + this.getEUVar() + " / " + maxEUStore(), "Plasma Output: " + plasmaOut + "L/t",
+ "Current Recipe: " + fusionName };
}
@Override
@@ -381,48 +363,46 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti
}
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab)};
+ return new ITexture[] { this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab) };
}
public ITexture[] getBack(final byte aColor) {
- return new ITexture[] {this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
+ return new ITexture[] { this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) };
}
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS)};
+ return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS) };
}
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS)};
+ return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS) };
}
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {
- this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange)
- };
+ return new ITexture[] { this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) };
}
public ITexture[] getFrontActive(final byte aColor) {
- return new ITexture[] {this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab_Active)
- };
+ return new ITexture[] { this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab_Active) };
}
public ITexture[] getBackActive(final byte aColor) {
- return new ITexture[] {this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
+ return new ITexture[] { this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) };
}
public ITexture[] getBottomActive(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW)};
+ return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW) };
}
public ITexture[] getTopActive(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW)};
+ return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW) };
}
public ITexture[] getSidesActive(final byte aColor) {
- return new ITexture[] {
- this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Blue)
- };
+ return new ITexture[] { this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Blue) };
}
@Override
@@ -480,8 +460,7 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti
} else {
// Logger.MACHINE_INFO("8");
this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU();
- if (aTick % 100 == 0
- || aBaseMetaTileEntity.hasWorkJustBeenEnabled()
+ if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled()
|| aBaseMetaTileEntity.hasInventoryBeenModified()) {
Logger.MACHINE_INFO("9");
// turnCasingActive(mMaxProgresstime > 0);
@@ -673,8 +652,8 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti
}
@Override
- public boolean onRightclick(
- IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) {
+ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX,
+ float aY, float aZ) {
// TODO Auto-generated method stub
return super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ);
}
@@ -704,8 +683,8 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti
public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
super.startSoundLoop(aIndex, aX, aY, aZ);
if (aIndex == 1) {
- GT_Utility.doSoundAtClient(
- (String) GregTech_API.sSoundList.get(Integer.valueOf(212)), 10, 1.0F, aX, aY, aZ);
+ GT_Utility
+ .doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(212)), 10, 1.0F, aX, aY, aZ);
}
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java
index 6ac99404ed..51f24f6c5e 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java
@@ -1,5 +1,15 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic;
+import java.util.ArrayList;
+import java.util.Random;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidStack;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Textures;
@@ -15,14 +25,6 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_DeluxeMachine;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.ArrayList;
-import java.util.Random;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_DeluxeMachine {
@@ -42,28 +44,27 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux
super(aID, aName, aNameRegional, aTier, 1, "It's like a midget Ra.", 1, 1, "PotionBrewer.png", "");
}
- public GregtechMetaTileEntity_PocketFusion(
- String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
+ public GregtechMetaTileEntity_PocketFusion(String aName, int aTier, String aDescription, ITexture[][][] aTextures,
+ String aGUIName, String aNEIName) {
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
}
@Override
public String[] getDescription() {
- return new String[] {
- this.mDescription,
- "Not Very Fast, but not very big either.",
- "Each side pair in/out puts to different slots.",
- "Top & Bottom Sides are Outputs.",
- "Front & Back are Input Plasma 1.",
- "Sides are Input Plasma 2.",
- CORE.GT_Tooltip
- };
+ return new String[] { this.mDescription, "Not Very Fast, but not very big either.",
+ "Each side pair in/out puts to different slots.", "Top & Bottom Sides are Outputs.",
+ "Front & Back are Input Plasma 1.", "Sides are Input Plasma 2.", CORE.GT_Tooltip };
}
@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntity_PocketFusion(
- this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
+ this.mName,
+ this.mTier,
+ this.mDescription,
+ this.mTextures,
+ this.mGUIName,
+ this.mNEIName);
}
public int tier() {
@@ -97,21 +98,11 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
- return this.mTextures[
- (aActive ? 5 : 0)
- + (aSide == aFacing
- ? 0
- : aSide == GT_Utility.getOppositeSide(aFacing)
- ? 1
- : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][
- aColorIndex + 1];
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0
+ : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex
+ + 1];
}
@Override
@@ -151,8 +142,10 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux
this.mCharging = true;
this.mCanProcessRecipe = false;
if (this.getBaseMetaTileEntity().decreaseStoredEnergyUnits((mFusionPoint / 100), false)) {
- Logger.MACHINE_INFO("Recipe Tick 1.3 - Charging Internal storage. " + (mFusionPoint / 100) + "/"
- + mFusionPoint);
+ Logger.MACHINE_INFO(
+ "Recipe Tick 1.3 - Charging Internal storage. " + (mFusionPoint / 100)
+ + "/"
+ + mFusionPoint);
mChargeConsumed += (mFusionPoint / 100);
}
} else {
@@ -197,14 +190,13 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux
}
if (tFluidList.size() > 1) {
FluidStack[] tFluids = tFluidList.toArray(new FluidStack[tFluidList.size()]);
- GT_Recipe tRecipe = getRecipeList()
- .findRecipe(
- this.getBaseMetaTileEntity(),
- this.mLastRecipe,
- false,
- GT_Values.V[8],
- tFluids,
- new ItemStack[] {});
+ GT_Recipe tRecipe = getRecipeList().findRecipe(
+ this.getBaseMetaTileEntity(),
+ this.mLastRecipe,
+ false,
+ GT_Values.V[8],
+ tFluids,
+ new ItemStack[] {});
if (tRecipe == null) {
return false;
@@ -279,43 +271,36 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux
public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
super.onPreTick(aBaseMetaTileEntity, aTick);
onRunningTickMulti();
- if ((aBaseMetaTileEntity.isClientSide())
- && (aBaseMetaTileEntity.isActive())
+ if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive())
&& (aBaseMetaTileEntity.getFrontFacing() != 1)
&& (aBaseMetaTileEntity.getCoverIDAtSide((byte) 1) == 0)
&& (!aBaseMetaTileEntity.getOpacityAtSide((byte) 1))) {
if (MathUtils.randInt(0, 4) == 4) {
final Random tRandom = aBaseMetaTileEntity.getWorld().rand;
- aBaseMetaTileEntity
- .getWorld()
- .spawnParticle(
- "magicCrit",
- (aBaseMetaTileEntity.getXCoord() + 0.8F) - (tRandom.nextFloat() * 0.6F),
- aBaseMetaTileEntity.getYCoord() + 0.3f + (tRandom.nextFloat() * 0.2F),
- (aBaseMetaTileEntity.getZCoord() + 1.2F) - (tRandom.nextFloat() * 1.6F),
- 0.0D,
- 0.0D,
- 0.0D);
- aBaseMetaTileEntity
- .getWorld()
- .spawnParticle(
- "magicCrit",
- (aBaseMetaTileEntity.getXCoord() + 0.4F) - (tRandom.nextFloat() * 0.3F),
- aBaseMetaTileEntity.getYCoord() + 0.2f + (tRandom.nextFloat() * 0.1F),
- (aBaseMetaTileEntity.getZCoord() + 0.8F) - (tRandom.nextFloat() * 0.6F),
- 0.0D,
- 0.0D,
- 0.0D);
- aBaseMetaTileEntity
- .getWorld()
- .spawnParticle(
- "magicCrit",
- (aBaseMetaTileEntity.getXCoord() + 0.6F) - (tRandom.nextFloat() * 0.9F),
- aBaseMetaTileEntity.getYCoord() + 0.4f + (tRandom.nextFloat() * 0.3F),
- (aBaseMetaTileEntity.getZCoord() + 1.8F) - (tRandom.nextFloat() * 2.6F),
- 0.0D,
- 0.0D,
- 0.0D);
+ aBaseMetaTileEntity.getWorld().spawnParticle(
+ "magicCrit",
+ (aBaseMetaTileEntity.getXCoord() + 0.8F) - (tRandom.nextFloat() * 0.6F),
+ aBaseMetaTileEntity.getYCoord() + 0.3f + (tRandom.nextFloat() * 0.2F),
+ (aBaseMetaTileEntity.getZCoord() + 1.2F) - (tRandom.nextFloat() * 1.6F),
+ 0.0D,
+ 0.0D,
+ 0.0D);
+ aBaseMetaTileEntity.getWorld().spawnParticle(
+ "magicCrit",
+ (aBaseMetaTileEntity.getXCoord() + 0.4F) - (tRandom.nextFloat() * 0.3F),
+ aBaseMetaTileEntity.getYCoord() + 0.2f + (tRandom.nextFloat() * 0.1F),
+ (aBaseMetaTileEntity.getZCoord() + 0.8F) - (tRandom.nextFloat() * 0.6F),
+ 0.0D,
+ 0.0D,
+ 0.0D);
+ aBaseMetaTileEntity.getWorld().spawnParticle(
+ "magicCrit",
+ (aBaseMetaTileEntity.getXCoord() + 0.6F) - (tRandom.nextFloat() * 0.9F),
+ aBaseMetaTileEntity.getYCoord() + 0.4f + (tRandom.nextFloat() * 0.3F),
+ (aBaseMetaTileEntity.getZCoord() + 1.8F) - (tRandom.nextFloat() * 2.6F),
+ 0.0D,
+ 0.0D,
+ 0.0D);
}
}
}
@@ -370,13 +355,9 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux
}
}
- return new String[] {
- "Fusion Reactor MK " + tier,
- "EU Required: " + powerRequired + "EU/t",
- "Stored EU: " + this.getEUVar() + " / " + maxEUStore(),
- "Plasma Output: " + plasmaOut + "L/t",
- "Current Recipe: " + fusionName
- };
+ return new String[] { "Fusion Reactor MK " + tier, "EU Required: " + powerRequired + "EU/t",
+ "Stored EU: " + this.getEUVar() + " / " + maxEUStore(), "Plasma Output: " + plasmaOut + "L/t",
+ "Current Recipe: " + fusionName };
}
@Override
@@ -385,48 +366,46 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux
}
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab)};
+ return new ITexture[] { this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab) };
}
public ITexture[] getBack(final byte aColor) {
- return new ITexture[] {this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
+ return new ITexture[] { this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) };
}
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS)};
+ return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS) };
}
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS)};
+ return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS) };
}
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {
- this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange)
- };
+ return new ITexture[] { this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) };
}
public ITexture[] getFrontActive(final byte aColor) {
- return new ITexture[] {this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab_Active)
- };
+ return new ITexture[] { this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab_Active) };
}
public ITexture[] getBackActive(final byte aColor) {
- return new ITexture[] {this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
+ return new ITexture[] { this.getCasingTexture(), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) };
}
public ITexture[] getBottomActive(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW)};
+ return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW) };
}
public ITexture[] getTopActive(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW)};
+ return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW) };
}
public ITexture[] getSidesActive(final byte aColor) {
- return new ITexture[] {
- this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Blue)
- };
+ return new ITexture[] { this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Blue) };
}
@Override
@@ -484,8 +463,7 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux
} else {
// Logger.MACHINE_INFO("8");
this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU();
- if (aTick % 100 == 0
- || aBaseMetaTileEntity.hasWorkJustBeenEnabled()
+ if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled()
|| aBaseMetaTileEntity.hasInventoryBeenModified()) {
Logger.MACHINE_INFO("9");
// turnCasingActive(mMaxProgresstime > 0);
@@ -677,8 +655,8 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux
}
@Override
- public boolean onRightclick(
- IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) {
+ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX,
+ float aY, float aZ) {
// TODO Auto-generated method stub
return super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ);
}
@@ -708,8 +686,8 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux
public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
super.startSoundLoop(aIndex, aX, aY, aZ);
if (aIndex == 1) {
- GT_Utility.doSoundAtClient(
- (String) GregTech_API.sSoundList.get(Integer.valueOf(212)), 10, 1.0F, aX, aY, aZ);
+ GT_Utility
+ .doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(212)), 10, 1.0F, aX, aY, aZ);
}
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorColdTrap.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorColdTrap.java
index f9ecc4be18..96f780c36d 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorColdTrap.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorColdTrap.java
@@ -1,5 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
@@ -9,38 +12,50 @@ import gregtech.api.util.GTPP_Recipe;
import gregtech.api.util.GT_Recipe;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntity_ReactorColdTrap extends GT_MetaTileEntity_BasicMachine {
public GregtechMetaTileEntity_ReactorColdTrap(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 1, "Just like the Arctic", 2, 9, "Dehydrator.png", "", new ITexture[] {
- new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_SIDE_ACTIVE),
- new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_SIDE),
- new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_FRONT_ACTIVE),
- new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_FRONT),
- new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_TOP_ACTIVE),
- new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_TOP),
- new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_TOP_ACTIVE),
- new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_TOP)
- });
+ super(
+ aID,
+ aName,
+ aNameRegional,
+ aTier,
+ 1,
+ "Just like the Arctic",
+ 2,
+ 9,
+ "Dehydrator.png",
+ "",
+ new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_SIDE_ACTIVE),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_SIDE),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_FRONT_ACTIVE),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_FRONT),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_TOP_ACTIVE),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_TOP),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_TOP_ACTIVE),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_TOP) });
}
- public GregtechMetaTileEntity_ReactorColdTrap(
- String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
+ public GregtechMetaTileEntity_ReactorColdTrap(String aName, int aTier, String aDescription,
+ ITexture[][][] aTextures, String aGUIName, String aNEIName) {
super(aName, aTier, 1, aDescription, aTextures, 2, 9, aGUIName, aNEIName);
}
@Override
public String[] getDescription() {
- return new String[] {this.mDescription, "Does not require ice cubes", CORE.GT_Tooltip};
+ return new String[] { this.mDescription, "Does not require ice cubes", CORE.GT_Tooltip };
}
@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntity_ReactorColdTrap(
- this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
+ this.mName,
+ this.mTier,
+ this.mDescription,
+ this.mTextures,
+ this.mGUIName,
+ this.mNEIName);
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorProcessingUnit.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorProcessingUnit.java
index 8f8711a7fe..034cebc41c 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorProcessingUnit.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorProcessingUnit.java
@@ -1,5 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
@@ -9,8 +12,6 @@ import gregtech.api.util.GTPP_Recipe;
import gregtech.api.util.GT_Recipe;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntity_ReactorProcessingUnit extends GT_MetaTileEntity_BasicMachine {
@@ -26,32 +27,35 @@ public class GregtechMetaTileEntity_ReactorProcessingUnit extends GT_MetaTileEnt
9,
"Dehydrator.png",
"",
- new ITexture[] {
- new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_SIDE_ACTIVE),
- new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_SIDE),
- new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_FRONT_ACTIVE),
- new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_FRONT),
- new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_TOP_ACTIVE),
- new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_TOP),
- new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_TOP_ACTIVE),
- new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_TOP)
- });
+ new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_SIDE_ACTIVE),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_SIDE),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_FRONT_ACTIVE),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_FRONT),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_TOP_ACTIVE),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_TOP),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_TOP_ACTIVE),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_TOP) });
}
- public GregtechMetaTileEntity_ReactorProcessingUnit(
- String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
+ public GregtechMetaTileEntity_ReactorProcessingUnit(String aName, int aTier, String aDescription,
+ ITexture[][][] aTextures, String aGUIName, String aNEIName) {
super(aName, aTier, 1, aDescription, aTextures, 2, 9, aGUIName, aNEIName);
}
@Override
public String[] getDescription() {
- return new String[] {this.mDescription, CORE.GT_Tooltip};
+ return new String[] { this.mDescription, CORE.GT_Tooltip };
}
@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntity_ReactorProcessingUnit(
- this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
+ this.mName,
+ this.mTier,
+ this.mDescription,
+ this.mTextures,
+ this.mGUIName,
+ this.mNEIName);
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java
index db74a46f1b..5d4f755408 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java
@@ -1,5 +1,13 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic;
+import java.util.*;
+
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
@@ -15,12 +23,6 @@ import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.helpers.ChargingHelper;
-import java.util.*;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity {
@@ -29,40 +31,26 @@ public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity {
public int mMode = 0;
public boolean mLocked = true;
- public GregtechMetaWirelessCharger(
- final int aID,
- final String aName,
- final String aNameRegional,
- final int aTier,
- final String aDescription,
- final int aSlotCount) {
+ public GregtechMetaWirelessCharger(final int aID, final String aName, final String aNameRegional, final int aTier,
+ final String aDescription, final int aSlotCount) {
super(aID, aName, aNameRegional, aTier, aSlotCount, aDescription);
}
- public GregtechMetaWirelessCharger(
- final String aName,
- final int aTier,
- final String aDescription,
- final ITexture[][][] aTextures,
- final int aSlotCount) {
+ public GregtechMetaWirelessCharger(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures, final int aSlotCount) {
super(aName, aTier, aSlotCount, aDescription, aTextures);
}
@Override
public String[] getDescription() {
- return new String[] {
- this.mDescription,
- "Can be locked to the owner by sneaking with a screwdriver",
- "Can also be locked with a lock upgrade",
- "",
- "3 Modes, Long-Range, Local and Mixed.",
- "Long-Range: Can supply 2A of power to a single player up to " + (GT_Values.V[this.mTier] * 4) + "m away.",
- "Local: Can supply several Amps to each player within " + this.mTier * 20 + "m.",
- "Mixed: Provides both 2A of long range and 1A per player locally.",
- "Mixed mode is more conservative of power and as a result only",
- "Gets half the distances each singular mode gets.",
- CORE.GT_Tooltip
- };
+ return new String[] { this.mDescription, "Can be locked to the owner by sneaking with a screwdriver",
+ "Can also be locked with a lock upgrade", "", "3 Modes, Long-Range, Local and Mixed.",
+ "Long-Range: Can supply 2A of power to a single player up to " + (GT_Values.V[this.mTier] * 4)
+ + "m away.",
+ "Local: Can supply several Amps to each player within " + this.mTier * 20 + "m.",
+ "Mixed: Provides both 2A of long range and 1A per player locally.",
+ "Mixed mode is more conservative of power and as a result only",
+ "Gets half the distances each singular mode gets.", CORE.GT_Tooltip };
}
public int getTier() {
@@ -104,91 +92,61 @@ public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity {
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
- return this.mTextures[
- (aActive ? 5 : 0)
- + (aSide == aFacing
- ? 0
- : aSide == GT_Utility.getOppositeSide(aFacing)
- ? 1
- : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][
- aColorIndex + 1];
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0
+ : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex
+ + 1];
}
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2) };
}
public ITexture[] getBack(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
public ITexture[] getFrontActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2) };
}
public ITexture[] getBackActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
public ITexture[] getBottomActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
public ITexture[] getTopActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
public ITexture[] getSidesActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
@Override
@@ -229,7 +187,11 @@ public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity {
@Override
public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMetaWirelessCharger(
- this.mName, this.mTier, this.mDescription, this.mTextures, this.mInventory.length);
+ this.mName,
+ this.mTier,
+ this.mDescription,
+ this.mTextures,
+ this.mInventory.length);
}
@Override
@@ -362,20 +324,20 @@ public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity {
}
@Override
- public boolean allowPullStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return false;
}
@Override
- public boolean allowPutStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return false;
}
@Override
public String[] getInfoData() {
- return new String[] {this.getLocalName()};
+ return new String[] { this.getLocalName() };
}
@Override
@@ -537,8 +499,8 @@ public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity {
}
}
if (this.mMode == 0 || this.mMode == 2) {
- int tempRange = (int)
- (this.mMode == 0 ? 4 * GT_Values.V[this.mTier] : 2 * GT_Values.V[this.mTier]);
+ int tempRange = (int) (this.mMode == 0 ? 4 * GT_Values.V[this.mTier]
+ : 2 * GT_Values.V[this.mTier]);
if (getDistanceBetweenTwoPositions(getTileEntityPosition(), getPositionOfEntity(mTemp))
<= tempRange) {
if (!mWirelessChargingMap.containsKey(mTemp.getDisplayName())) {
@@ -562,24 +524,19 @@ public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity {
}
}
}
- /*if (this.mMode == 0 || this.mMode == 2){
- int tempRange = (int) (this.mMode == 0 ? 4*GT_Values.V[this.mTier] : 2*GT_Values.V[this.mTier]);
- if (getDistanceBetweenTwoPositions(getTileEntityPosition(), getPositionOfEntity(mTemp)) < tempRange){
- if (!mWirelessChargingMap.containsKey(mTemp)){
- mWirelessChargingMap.put(mTemp, mTemp.getPersistentID());
- PlayerUtils.messagePlayer(mTemp, "You have entered charging range. ["+tempRange+"m].");
- ChargingHelper.addValidPlayer(mTemp, this);
- }
- }
- else {
- if (mWirelessChargingMap.containsKey(mTemp)){
- if (mWirelessChargingMap.remove(mTemp) != null){
- PlayerUtils.messagePlayer(mTemp, "You have left charging range. ["+tempRange+"m].");
- ChargingHelper.removeValidPlayer(mTemp, this);
- }
- }
- }
- } */
+ /*
+ * if (this.mMode == 0 || this.mMode == 2){ int tempRange = (int) (this.mMode == 0 ?
+ * 4*GT_Values.V[this.mTier] : 2*GT_Values.V[this.mTier]); if
+ * (getDistanceBetweenTwoPositions(getTileEntityPosition(), getPositionOfEntity(mTemp)) <
+ * tempRange){ if (!mWirelessChargingMap.containsKey(mTemp)){
+ * mWirelessChargingMap.put(mTemp, mTemp.getPersistentID());
+ * PlayerUtils.messagePlayer(mTemp, "You have entered charging range. ["+tempRange+"m].");
+ * ChargingHelper.addValidPlayer(mTemp, this); } } else { if
+ * (mWirelessChargingMap.containsKey(mTemp)){ if (mWirelessChargingMap.remove(mTemp) !=
+ * null){ PlayerUtils.messagePlayer(mTemp,
+ * "You have left charging range. ["+tempRange+"m].");
+ * ChargingHelper.removeValidPlayer(mTemp, this); } } } }
+ */
}
}
@@ -607,12 +564,13 @@ public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity {
if (objectA == null || objectB == null) {
return 0f;
}
- int[] objectArray1 = new int[] {objectA.xPos, objectA.yPos, objectA.zPos};
- int[] objectArray2 = new int[] {objectB.xPos, objectB.yPos, objectB.zPos};
+ int[] objectArray1 = new int[] { objectA.xPos, objectA.yPos, objectA.zPos };
+ int[] objectArray2 = new int[] { objectB.xPos, objectB.yPos, objectB.zPos };
- final double distance = Math.sqrt((objectArray2[0] - objectArray1[0]) * (objectArray2[0] - objectArray1[0])
- + (objectArray2[1] - objectArray1[1]) * (objectArray2[1] - objectArray1[1])
- + (objectArray2[2] - objectArray1[2]) * (objectArray2[2] - objectArray1[2]));
+ final double distance = Math.sqrt(
+ (objectArray2[0] - objectArray1[0]) * (objectArray2[0] - objectArray1[0])
+ + (objectArray2[1] - objectArray1[1]) * (objectArray2[1] - objectArray1[1])
+ + (objectArray2[2] - objectArray1[2]) * (objectArray2[2] - objectArray1[2]));
return distance;
}
@@ -636,8 +594,8 @@ public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity {
}
@Override
- public boolean onRightclick(
- IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) {
+ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX,
+ float aY, float aZ) {
int tempRange;
@@ -648,8 +606,8 @@ public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity {
}
if (this.mMode == 2) {
- PlayerUtils.messagePlayer(
- aPlayer, "Mixed Mode | Local: " + this.mTier * 10 + "m | Long: " + tempRange + "m");
+ PlayerUtils
+ .messagePlayer(aPlayer, "Mixed Mode | Local: " + this.mTier * 10 + "m | Long: " + tempRange + "m");
PlayerUtils.messagePlayer(aPlayer, "Players with access:");
for (String name : this.getLocalMap().keySet()) {
PlayerUtils.messagePlayer(aPlayer, "Local: " + name);
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java
index bf9e9f3d94..a27509b284 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java
@@ -6,10 +6,16 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.util.ArrayList;
+
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.TAE;
@@ -27,9 +33,6 @@ import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.ArrayList;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase<GMTE_AmazonPackager>
implements ISurvivalConstructable {
@@ -62,18 +65,16 @@ public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase<GMTE_Amazon
public IStructureDefinition<GMTE_AmazonPackager> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GMTE_AmazonPackager>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC"},
- {"C~C", "C-C", "CCC"},
- {"CCC", "CCC", "CCC"},
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC" }, { "C~C", "C-C", "CCC" },
+ { "CCC", "CCC", "CCC" }, }))
.addElement(
'C',
buildHatchAdder(GMTE_AmazonPackager.class)
.atLeast(InputBus, OutputBus, Maintenance, Energy, Muffler)
- .casingIndex(TAE.getIndexFromPage(2, 9))
- .dot(1)
- .buildAndChain(
+ .casingIndex(TAE.getIndexFromPage(2, 9)).dot(1).buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings3Misc, 9))))
.build();
}
@@ -83,26 +84,17 @@ public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase<GMTE_Amazon
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Amazon Warehouse")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Amazon Warehouse")
.addInfo("This Multiblock is used for EXTREME packaging requirements")
.addInfo("Dust Schematics are inserted into the input busses")
.addInfo("If inserted into the controller, it is shared across all busses")
.addInfo("1x, 2x, 3x & Other Schematics are to be placed into the controller GUI slot")
.addInfo("500% faster than using single block machines of the same voltage")
- .addInfo("Only uses 75% of the EU/t normally required")
- .addInfo("Processes 16 items per voltage tier")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 3, 3, true)
- .addController("Front center")
- .addCasingInfo("Supply Depot Casings", 10)
- .addInputBus("Any casing", 1)
- .addOutputBus("Any casing", 1)
- .addEnergyHatch("Any casing", 1)
- .addMaintenanceHatch("Any casing", 1)
- .addMufflerHatch("Any casing", 1)
- .toolTipFinisher("GT++");
+ .addInfo("Only uses 75% of the EU/t normally required").addInfo("Processes 16 items per voltage tier")
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 3, true)
+ .addController("Front center").addCasingInfo("Supply Depot Casings", 10).addInputBus("Any casing", 1)
+ .addOutputBus("Any casing", 1).addEnergyHatch("Any casing", 1).addMaintenanceHatch("Any casing", 1)
+ .addMufflerHatch("Any casing", 1).toolTipFinisher("GT++");
return tt;
}
@@ -177,12 +169,11 @@ public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase<GMTE_Amazon
}
public boolean checkRecipe(ItemStack inputStack, ItemStack schematicStack) {
- if (GT_Utility.isStackValid((Object) inputStack)
- && GT_Utility.isStackValid((Object) schematicStack)
+ if (GT_Utility.isStackValid((Object) inputStack) && GT_Utility.isStackValid((Object) schematicStack)
&& GT_Utility.getContainerItem(inputStack, true) == null) {
ItemStack tOutputStack;
if (ItemList.Schematic_1by1.isStackEqual((Object) schematicStack) && inputStack.stackSize >= 1) {
- tOutputStack = GT_ModHandler.getRecipeOutput(new ItemStack[] {inputStack});
+ tOutputStack = GT_ModHandler.getRecipeOutput(new ItemStack[] { inputStack });
if (tOutputStack != null && this.allowPutStack(tOutputStack, schematicStack)) {
final ItemStack input = inputStack;
--input.stackSize;
@@ -195,8 +186,8 @@ public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase<GMTE_Amazon
}
return false;
} else if (ItemList.Schematic_2by2.isStackEqual((Object) schematicStack) && inputStack.stackSize >= 4) {
- tOutputStack = GT_ModHandler.getRecipeOutput(
- new ItemStack[] {inputStack, inputStack, null, inputStack, inputStack});
+ tOutputStack = GT_ModHandler
+ .getRecipeOutput(new ItemStack[] { inputStack, inputStack, null, inputStack, inputStack });
if (tOutputStack != null && this.allowPutStack(tOutputStack, schematicStack)) {
final ItemStack input2 = inputStack;
input2.stackSize -= 4;
@@ -209,17 +200,9 @@ public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase<GMTE_Amazon
}
return false;
} else if (ItemList.Schematic_3by3.isStackEqual((Object) schematicStack) && inputStack.stackSize >= 9) {
- tOutputStack = GT_ModHandler.getRecipeOutput(new ItemStack[] {
- inputStack,
- inputStack,
- inputStack,
- inputStack,
- inputStack,
- inputStack,
- inputStack,
- inputStack,
- inputStack
- });
+ tOutputStack = GT_ModHandler.getRecipeOutput(
+ new ItemStack[] { inputStack, inputStack, inputStack, inputStack, inputStack, inputStack,
+ inputStack, inputStack, inputStack });
if (tOutputStack != null && this.allowPutStack(tOutputStack, schematicStack)) {
final ItemStack input3 = inputStack;
input3.stackSize -= 9;
@@ -245,30 +228,26 @@ public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase<GMTE_Amazon
}
// Something
if (GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.findRecipe(
- (IHasWorldObjectAndCoords) this.getBaseMetaTileEntity(),
- true,
- GT_Values.V[this.mTier],
- (FluidStack[]) null,
- new ItemStack[] {GT_Utility.copyAmount(64L, new Object[] {aStack}), schematicStack})
- != null) {
+ (IHasWorldObjectAndCoords) this.getBaseMetaTileEntity(),
+ true,
+ GT_Values.V[this.mTier],
+ (FluidStack[]) null,
+ new ItemStack[] { GT_Utility.copyAmount(64L, new Object[] { aStack }), schematicStack }) != null) {
return true;
}
// 1x1
if (ItemList.Schematic_1by1.isStackEqual((Object) schematicStack)
- && GT_ModHandler.getRecipeOutput(new ItemStack[] {aStack}) != null) {
+ && GT_ModHandler.getRecipeOutput(new ItemStack[] { aStack }) != null) {
return true;
}
// 2x2
if (ItemList.Schematic_2by2.isStackEqual((Object) schematicStack)
- && GT_ModHandler.getRecipeOutput(new ItemStack[] {aStack, aStack, null, aStack, aStack}) != null) {
+ && GT_ModHandler.getRecipeOutput(new ItemStack[] { aStack, aStack, null, aStack, aStack }) != null) {
return true;
}
// 3x3
- if (ItemList.Schematic_3by3.isStackEqual((Object) schematicStack)
- && GT_ModHandler.getRecipeOutput(
- new ItemStack[] {aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack
- })
- != null) {
+ if (ItemList.Schematic_3by3.isStackEqual((Object) schematicStack) && GT_ModHandler.getRecipeOutput(
+ new ItemStack[] { aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack }) != null) {
return true;
}
return false;
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GregtechMTE_TeslaTower.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GregtechMTE_TeslaTower.java
index 1805c3dba4..a5dd84c92d 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GregtechMTE_TeslaTower.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GregtechMTE_TeslaTower.java
@@ -2,7 +2,23 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.misc;
import static gregtech.api.enums.GT_Values.W;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.ForgeDirection;
+
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.TAE;
import gregtech.api.interfaces.IIconContainer;
@@ -21,19 +37,6 @@ import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-import net.minecraft.block.Block;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
public class GregtechMTE_TeslaTower extends GregtechMeta_MultiBlockBase<GregtechMTE_TeslaTower> {
@@ -49,9 +52,7 @@ public class GregtechMTE_TeslaTower extends GregtechMeta_MultiBlockBase<Gregtech
protected int mRange;
/**
- * Machine Mode,
- * {@value false} Attacks all entities,
- * {@value true} Only attacks players.
+ * Machine Mode, {@value false} Attacks all entities, {@value true} Only attacks players.
*/
protected volatile boolean mMode = false;
@@ -75,40 +76,28 @@ public class GregtechMTE_TeslaTower extends GregtechMeta_MultiBlockBase<Gregtech
return "Weaponized Lighting Rod";
}
- /*@Override
- public String[] getTooltip() {
- String casings = getCasingBlockItem().get(0).getDisplayName();
- return new String[]{
- "Controller Block for the Tesla Defence Tower Mk3200",
- "Enemies within "+this.mRange+"m are blasted with a high energy plasma.",
- "This uses 5,000,000EU per blast.",
- "Can screwdriver to toggle mode between Players and all Entities.",
- "Size(WxHxD): 3x7x3", "Controller (Front middle at bottom)",
- "3x1x3 Base of " + casings,
- "1x3x1 " + casings + " pillar (Center of base)",
- "1x3x1 " + MaterialUtils.getMaterialName(getFrameMaterial()) + " Frame Boxes (Each pillar side and on top)",
- "1x Maintenance Hatch (One of base casings)",
- "1x " + VN[getMinTier()] + "+ Energy Hatch (Any bottom layer casing)"};
- }*/
+ /*
+ * @Override public String[] getTooltip() { String casings = getCasingBlockItem().get(0).getDisplayName(); return
+ * new String[]{ "Controller Block for the Tesla Defence Tower Mk3200",
+ * "Enemies within "+this.mRange+"m are blasted with a high energy plasma.", "This uses 5,000,000EU per blast.",
+ * "Can screwdriver to toggle mode between Players and all Entities.", "Size(WxHxD): 3x7x3",
+ * "Controller (Front middle at bottom)", "3x1x3 Base of " + casings, "1x3x1 " + casings +
+ * " pillar (Center of base)", "1x3x1 " + MaterialUtils.getMaterialName(getFrameMaterial()) +
+ * " Frame Boxes (Each pillar side and on top)", "1x Maintenance Hatch (One of base casings)", "1x " +
+ * VN[getMinTier()] + "+ Energy Hatch (Any bottom layer casing)"}; }
+ */
@Override
protected final GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Tesla Defence Tower Mk3200")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Tesla Defence Tower Mk3200")
.addInfo("Enemies within " + this.mRange + "m are blasted with a high energy plasma.")
.addInfo("This uses 5,000,000EU per blast.")
- .addInfo("Can screwdriver to toggle mode between Players and all Entities.")
- .addSeparator()
- .beginStructureBlock(1, 7, 1, false)
- .addController("Top Middle")
- .addCasingInfo("Casing", 360)
- .addOtherStructurePart("Rotor Assembly", "Any 1 dot hint", 1)
- .addInputBus("Any 4 dot hint (min 1)", 4)
- .addInputHatch("Any 4 dot hint(min 1)", 4)
- .addOutputHatch("Any 4 dot hint(min 1)", 4)
- .addEnergyHatch("Any 4 dot hint(min 1)", 4)
- .addMaintenanceHatch("Any 4 dot hint(min 1)", 4)
+ .addInfo("Can screwdriver to toggle mode between Players and all Entities.").addSeparator()
+ .beginStructureBlock(1, 7, 1, false).addController("Top Middle").addCasingInfo("Casing", 360)
+ .addOtherStructurePart("Rotor Assembly", "Any 1 dot hint", 1).addInputBus("Any 4 dot hint (min 1)", 4)
+ .addInputHatch("Any 4 dot hint(min 1)", 4).addOutputHatch("Any 4 dot hint(min 1)", 4)
+ .addEnergyHatch("Any 4 dot hint(min 1)", 4).addMaintenanceHatch("Any 4 dot hint(min 1)", 4)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -181,8 +170,7 @@ public class GregtechMTE_TeslaTower extends GregtechMeta_MultiBlockBase<Gregtech
if (xOff == 0 && zOff == 0) continue;
IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xOff, 0, zOff);
- if (!checkCasingBlock(xOff, 0, zOff)
- && !addMaintenanceToMachineList(tTileEntity, casingTextureIndex)
+ if (!checkCasingBlock(xOff, 0, zOff) && !addMaintenanceToMachineList(tTileEntity, casingTextureIndex)
&& !addEnergyInputToMachineList(tTileEntity, casingTextureIndex)) {
Logger.INFO("bad block");
return false;
@@ -226,6 +214,7 @@ public class GregtechMTE_TeslaTower extends GregtechMeta_MultiBlockBase<Gregtech
Logger.INFO("Looking For Casing.");
return checkBlockAndMetaOffset(xOff, yOff, zOff, casingBlock, casingMeta);
}
+
// meta of frame is getTileEntityBaseType; frame should be checked using its drops (possible a high weight
// operation)
protected boolean checkFrameBlock(int xOff, int yOff, int zOff) {
@@ -238,8 +227,10 @@ public class GregtechMTE_TeslaTower extends GregtechMeta_MultiBlockBase<Gregtech
}
private boolean checkBlockAndMeta(int x, int y, int z, Block block, int meta) {
- Logger.INFO("Found: " + getBaseMetaTileEntity().getBlock(x, y, z).getLocalizedName() + " | Meta: "
- + getBaseMetaTileEntity().getMetaID(x, y, z));
+ Logger.INFO(
+ "Found: " + getBaseMetaTileEntity().getBlock(x, y, z).getLocalizedName()
+ + " | Meta: "
+ + getBaseMetaTileEntity().getMetaID(x, y, z));
Logger.INFO("Expected: " + block.getLocalizedName() + " | Meta: " + meta);
return (meta == W || getBaseMetaTileEntity().getMetaID(x, y, z) == meta)
&& getBaseMetaTileEntity().getBlock(x, y, z) == block;
@@ -352,22 +343,17 @@ public class GregtechMTE_TeslaTower extends GregtechMeta_MultiBlockBase<Gregtech
if (!this.mMode) {
mInRange.put(
new Pair<Long, Long>(
- ((Entity) r)
- .getUniqueID()
- .getMostSignificantBits(),
- ((Entity) r)
- .getUniqueID()
+ ((Entity) r).getUniqueID().getMostSignificantBits(),
+ ((Entity) r).getUniqueID()
.getLeastSignificantBits()),
(Entity) r);
} else {
if (r instanceof EntityPlayer) {
mInRange.put(
new Pair<Long, Long>(
- ((Entity) r)
- .getUniqueID()
+ ((Entity) r).getUniqueID()
.getMostSignificantBits(),
- ((Entity) r)
- .getUniqueID()
+ ((Entity) r).getUniqueID()
.getLeastSignificantBits()),
(Entity) r);
}
@@ -415,13 +401,19 @@ public class GregtechMTE_TeslaTower extends GregtechMeta_MultiBlockBase<Gregtech
// if (world.canLightningStrikeAt(j1, l1+1, k1)){
// if (isEnergyEnough() && world.addWeatherEffect(new
// EntityTeslaTowerLightning(world, (double)j1, (double)l1, (double)k1))){
- if (isEnergyEnough()
- && world.addWeatherEffect(new EntityTeslaTowerLightning(
- world, (double) j1, (double) l1, (double) k1, f, getOwner()))) {
+ if (isEnergyEnough() && world.addWeatherEffect(
+ new EntityTeslaTowerLightning(
+ world,
+ (double) j1,
+ (double) l1,
+ (double) k1,
+ f,
+ getOwner()))) {
if (f == null || f.isDead || !f.isEntityAlive()) {
- this.mInRange.remove(new Pair<Long, Long>(
- f.getUniqueID().getMostSignificantBits(),
- f.getUniqueID().getLeastSignificantBits()));
+ this.mInRange.remove(
+ new Pair<Long, Long>(
+ f.getUniqueID().getMostSignificantBits(),
+ f.getUniqueID().getLeastSignificantBits()));
}
this.setEUVar(this.getEUVar() - 5000000);
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java
index 0dc2303a0e..4f09cdcba0 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java
@@ -7,10 +7,16 @@ import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
import static gregtech.api.util.GT_StructureUtility.ofCoil;
+import java.util.ArrayList;
+
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.enums.HeatingCoilLevel;
import gregtech.api.enums.TAE;
import gregtech.api.enums.Textures;
@@ -27,13 +33,9 @@ import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
-import java.util.ArrayList;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
-public class GregtechMetaTileEntity_IndustrialAlloySmelter
- extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialAlloySmelter>
- implements ISurvivalConstructable {
+public class GregtechMetaTileEntity_IndustrialAlloySmelter extends
+ GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialAlloySmelter> implements ISurvivalConstructable {
public static int CASING_TEXTURE_ID;
private HeatingCoilLevel mHeatingCapacity;
@@ -102,25 +104,16 @@ public class GregtechMetaTileEntity_IndustrialAlloySmelter
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Industrial Alloy Smelter")
- .addInfo("Gains one parallel per voltage tier")
- .addInfo("Gains one multiplier per coil tier")
- .addInfo("Parallel = Tier * Coil Tier")
- .addInfo("Gains 5% speed bonus per coil tier")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 5, 3, true)
- .addController("Bottom center")
- .addCasingInfo("Inconel Reinforced Casings", 8)
- .addCasingInfo("Integral Encasement V", 8)
- .addCasingInfo("Heating Coils", 16)
- .addInputBus("Any Inconel Reinforced Casing", 1)
- .addOutputBus("Any Inconel Reinforced Casing", 1)
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Industrial Alloy Smelter")
+ .addInfo("Gains one parallel per voltage tier").addInfo("Gains one multiplier per coil tier")
+ .addInfo("Parallel = Tier * Coil Tier").addInfo("Gains 5% speed bonus per coil tier")
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 5, 3, true)
+ .addController("Bottom center").addCasingInfo("Inconel Reinforced Casings", 8)
+ .addCasingInfo("Integral Encasement V", 8).addCasingInfo("Heating Coils", 16)
+ .addInputBus("Any Inconel Reinforced Casing", 1).addOutputBus("Any Inconel Reinforced Casing", 1)
.addEnergyHatch("Any Inconel Reinforced Casing", 1)
.addMaintenanceHatch("Any Inconel Reinforced Casing", 1)
- .addMufflerHatch("Any Inconel Reinforced Casing", 1)
- .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ .addMufflerHatch("Any Inconel Reinforced Casing", 1).toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -128,28 +121,24 @@ public class GregtechMetaTileEntity_IndustrialAlloySmelter
public IStructureDefinition<GregtechMetaTileEntity_IndustrialAlloySmelter> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialAlloySmelter>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC"},
- {"HHH", "H-H", "HHH"},
- {"VVV", "V-V", "VVV"},
- {"HHH", "H-H", "HHH"},
- {"C~C", "CCC", "CCC"},
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC" }, { "HHH", "H-H", "HHH" },
+ { "VVV", "V-V", "VVV" }, { "HHH", "H-H", "HHH" },
+ { "C~C", "CCC", "CCC" }, }))
.addElement(
'C',
buildHatchAdder(GregtechMetaTileEntity_IndustrialAlloySmelter.class)
.atLeast(InputBus, OutputBus, Maintenance, Energy, Muffler)
- .casingIndex(CASING_TEXTURE_ID)
- .dot(1)
- .buildAndChain(
+ .casingIndex(CASING_TEXTURE_ID).dot(1).buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings3Misc, 1))))
.addElement(
'H',
ofCoil(
GregtechMetaTileEntity_IndustrialAlloySmelter::setCoilLevel,
GregtechMetaTileEntity_IndustrialAlloySmelter::getCoilLevel))
- .addElement('V', ofBlock(ModBlocks.blockCasingsTieredGTPP, 4))
- .build();
+ .addElement('V', ofBlock(ModBlocks.blockCasingsTieredGTPP, 4)).build();
}
return STRUCTURE_DEFINITION;
}
@@ -170,8 +159,7 @@ public class GregtechMetaTileEntity_IndustrialAlloySmelter
mCasing = 0;
mLevel = 0;
setCoilLevel(HeatingCoilLevel.None);
- return checkPiece(mName, 1, 4, 0)
- && mCasing >= 8
+ return checkPiece(mName, 1, 4, 0) && mCasing >= 8
&& getCoilLevel() != HeatingCoilLevel.None
&& (mLevel = getCoilLevel().getTier() + 1) > 0
&& checkHatch();
@@ -210,13 +198,8 @@ public class GregtechMetaTileEntity_IndustrialAlloySmelter
}
@Override
- public boolean checkRecipeGeneric(
- ItemStack[] aItemInputs,
- FluidStack[] aFluidInputs,
- int aMaxParallelRecipes,
- long aEUPercent,
- int aSpeedBonusPercent,
- int aOutputChanceRoll) {
+ public boolean checkRecipeGeneric(ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes,
+ long aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll) {
// Based on the Processing Array. A bit overkill, but very flexible.
// Reset outputs and progress stats
@@ -229,14 +212,13 @@ public class GregtechMetaTileEntity_IndustrialAlloySmelter
byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
long tEnergy = getMaxInputEnergy();
- GT_Recipe tRecipe = this.getRecipeMap()
- .findRecipe(
- getBaseMetaTileEntity(),
- mLastRecipe,
- false,
- gregtech.api.enums.GT_Values.V[tTier],
- aFluidInputs,
- aItemInputs);
+ GT_Recipe tRecipe = this.getRecipeMap().findRecipe(
+ getBaseMetaTileEntity(),
+ mLastRecipe,
+ false,
+ gregtech.api.enums.GT_Values.V[tTier],
+ aFluidInputs,
+ aItemInputs);
// Remember last recipe - an optimization for findRecipe()
this.mLastRecipe = tRecipe;
@@ -246,14 +228,9 @@ public class GregtechMetaTileEntity_IndustrialAlloySmelter
return false;
}
- GT_ParallelHelper helper = new GT_ParallelHelper()
- .setRecipe(tRecipe)
- .setItemInputs(aItemInputs)
- .setFluidInputs(aFluidInputs)
- .setAvailableEUt(tEnergy)
- .setMaxParallel(aMaxParallelRecipes)
- .enableConsumption()
- .enableOutputCalculation();
+ GT_ParallelHelper helper = new GT_ParallelHelper().setRecipe(tRecipe).setItemInputs(aItemInputs)
+ .setFluidInputs(aFluidInputs).setAvailableEUt(tEnergy).setMaxParallel(aMaxParallelRecipes)
+ .enableConsumption().enableOutputCalculation();
if (!mVoidExcess) {
helper.enableVoidProtection(this);
}
@@ -271,19 +248,13 @@ public class GregtechMetaTileEntity_IndustrialAlloySmelter
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
- GT_OverclockCalculator calculator = new GT_OverclockCalculator()
- .setRecipeEUt(tRecipe.mEUt)
- .setEUt(tEnergy)
- .setDuration(tRecipe.mDuration)
- .setEUtDiscount(aEUPercent / 100.0f)
+ GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(tRecipe.mEUt).setEUt(tEnergy)
+ .setDuration(tRecipe.mDuration).setEUtDiscount(aEUPercent / 100.0f)
.setSpeedBoost(100.0f / (100.0f + aSpeedBonusPercent))
- .setParallel(Math.min(aMaxParallelRecipes, helper.getCurrentParallel()))
- .enableHeatOC()
- .setRecipeHeat(0)
+ .setParallel(Math.min(aMaxParallelRecipes, helper.getCurrentParallel())).enableHeatOC().setRecipeHeat(0)
// Need to multiple by 2 because heat OC is done only once every 1800 and this one does it once every
// 900
- .setMultiHeat((int) getCoilLevel().getHeat() * 2)
- .calculate();
+ .setMultiHeat((int) getCoilLevel().getHeat() * 2).calculate();
lEUt = -calculator.getConsumption();
mMaxProgresstime = (int) Math.ceil(calculator.getDuration() * helper.getDurationMultiplier());
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java
index 2d9574a315..1fd7beb384 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java
@@ -5,10 +5,17 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElement
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.EnumChatFormatting;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.TAE;
import gregtech.api.interfaces.IIconContainer;
@@ -23,15 +30,9 @@ import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumChatFormatting;
-public class GregtechMetaTileEntity_IndustrialArcFurnace
- extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialArcFurnace>
- implements ISurvivalConstructable {
+public class GregtechMetaTileEntity_IndustrialArcFurnace extends
+ GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialArcFurnace> implements ISurvivalConstructable {
// 862
private static final int mCasingTextureID = TAE.getIndexFromPage(3, 3);
@@ -62,24 +63,14 @@ public class GregtechMetaTileEntity_IndustrialArcFurnace
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for Industrial Arc Furnace")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for Industrial Arc Furnace")
.addInfo("250% faster than using single block machines of the same voltage")
.addInfo("Processes 8 items per voltage tier * W/L")
- .addInfo("Max Size required to process Plasma recipes")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .addController("Top center")
- .addStructureInfo("Size: nx3xn [WxHxL] (Hollow)")
- .addStructureInfo("n can be 3, 5 or 7")
- .addCasingInfo(mCasingName, 10)
- .addInputBus("Any Casing", 1)
- .addOutputBus("Any Casing", 1)
- .addInputHatch("Any Casing", 1)
- .addOutputHatch("Any Casing", 1)
- .addEnergyHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
- .addMufflerHatch("Any Casing", 1)
+ .addInfo("Max Size required to process Plasma recipes").addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator().addController("Top center").addStructureInfo("Size: nx3xn [WxHxL] (Hollow)")
+ .addStructureInfo("n can be 3, 5 or 7").addCasingInfo(mCasingName, 10).addInputBus("Any Casing", 1)
+ .addOutputBus("Any Casing", 1).addInputHatch("Any Casing", 1).addOutputHatch("Any Casing", 1)
+ .addEnergyHatch("Any Casing", 1).addMaintenanceHatch("Any Casing", 1).addMufflerHatch("Any Casing", 1)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -87,29 +78,25 @@ public class GregtechMetaTileEntity_IndustrialArcFurnace
@Override
public IStructureDefinition<GregtechMetaTileEntity_IndustrialArcFurnace> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
- STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialArcFurnace>builder()
- .addShape(mName + "3", new String[][] {
- {"CCC", "C~C", "CCC"},
- {"CCC", "C-C", "CCC"},
- {"CCC", "CCC", "CCC"},
- })
- .addShape(mName + "5", new String[][] {
- {"CCCCC", "CCCCC", "CC~CC", "CCCCC", "CCCCC"},
- {"CCCCC", "C---C", "C---C", "C---C", "CCCCC"},
- {"CCCCC", "CCCCC", "CCCCC", "CCCCC", "CCCCC"},
- })
- .addShape(mName + "7", new String[][] {
- {"CCCCCCC", "CCCCCCC", "CCCCCCC", "CCC~CCC", "CCCCCCC", "CCCCCCC", "CCCCCCC"},
- {"CCCCCCC", "C-----C", "C-----C", "C-----C", "C-----C", "C-----C", "CCCCCCC"},
- {"CCCCCCC", "CCCCCCC", "CCCCCCC", "CCCCCCC", "CCCCCCC", "CCCCCCC", "CCCCCCC"},
- })
+ STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialArcFurnace>builder().addShape(
+ mName + "3",
+ new String[][] { { "CCC", "C~C", "CCC" }, { "CCC", "C-C", "CCC" }, { "CCC", "CCC", "CCC" }, })
+ .addShape(
+ mName + "5",
+ new String[][] { { "CCCCC", "CCCCC", "CC~CC", "CCCCC", "CCCCC" },
+ { "CCCCC", "C---C", "C---C", "C---C", "CCCCC" },
+ { "CCCCC", "CCCCC", "CCCCC", "CCCCC", "CCCCC" }, })
+ .addShape(
+ mName + "7",
+ new String[][] {
+ { "CCCCCCC", "CCCCCCC", "CCCCCCC", "CCC~CCC", "CCCCCCC", "CCCCCCC", "CCCCCCC" },
+ { "CCCCCCC", "C-----C", "C-----C", "C-----C", "C-----C", "C-----C", "CCCCCCC" },
+ { "CCCCCCC", "CCCCCCC", "CCCCCCC", "CCCCCCC", "CCCCCCC", "CCCCCCC", "CCCCCCC" }, })
.addElement(
'C',
buildHatchAdder(GregtechMetaTileEntity_IndustrialArcFurnace.class)
.atLeast(InputBus, InputHatch, OutputBus, OutputHatch, Maintenance, Energy, Muffler)
- .casingIndex(getCasingTextureIndex())
- .dot(1)
- .buildAndChain(
+ .casingIndex(getCasingTextureIndex()).dot(1).buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings4Misc, 3))))
.build();
}
@@ -148,7 +135,15 @@ public class GregtechMetaTileEntity_IndustrialArcFurnace
if (mMachine) return -1;
int size = getSizeFromHint(stackSize);
return survivialBuildPiece(
- mName + size, stackSize, (size - 1) / 2, (size - 1) / 2, 0, elementBudget, env, false, true);
+ mName + size,
+ stackSize,
+ (size - 1) / 2,
+ (size - 1) / 2,
+ 0,
+ elementBudget,
+ env,
+ false,
+ true);
}
@Override
@@ -196,8 +191,7 @@ public class GregtechMetaTileEntity_IndustrialArcFurnace
@Override
public GT_Recipe.GT_Recipe_Map getRecipeMap() {
- return mPlasmaMode
- ? GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes
+ return mPlasmaMode ? GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes
: GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes;
}
@@ -268,19 +262,34 @@ public class GregtechMetaTileEntity_IndustrialArcFurnace
if (mPlasmaMode) {
PlayerUtils.messagePlayer(
aPlayer,
- "[" + EnumChatFormatting.RED + "MODE" + EnumChatFormatting.RESET + "] "
- + EnumChatFormatting.LIGHT_PURPLE + "Plasma" + EnumChatFormatting.RESET);
+ "[" + EnumChatFormatting.RED
+ + "MODE"
+ + EnumChatFormatting.RESET
+ + "] "
+ + EnumChatFormatting.LIGHT_PURPLE
+ + "Plasma"
+ + EnumChatFormatting.RESET);
} else {
PlayerUtils.messagePlayer(
aPlayer,
- "[" + EnumChatFormatting.RED + "MODE" + EnumChatFormatting.RESET + "] "
- + EnumChatFormatting.YELLOW + "Electric" + EnumChatFormatting.RESET);
+ "[" + EnumChatFormatting.RED
+ + "MODE"
+ + EnumChatFormatting.RESET
+ + "] "
+ + EnumChatFormatting.YELLOW
+ + "Electric"
+ + EnumChatFormatting.RESET);
}
} else {
PlayerUtils.messagePlayer(
aPlayer,
- "[" + EnumChatFormatting.RED + "MODE" + EnumChatFormatting.RESET + "] " + EnumChatFormatting.GRAY
- + "Cannot change mode, structure not large enough." + EnumChatFormatting.RESET);
+ "[" + EnumChatFormatting.RED
+ + "MODE"
+ + EnumChatFormatting.RESET
+ + "] "
+ + EnumChatFormatting.GRAY
+ + "Cannot change mode, structure not large enough."
+ + EnumChatFormatting.RESET);
}
mLastRecipe = null;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java
index cf41c87018..b9c7983706 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java
@@ -6,10 +6,16 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.enums.TAE;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -24,14 +30,9 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-public class GregtechMetaTileEntity_IndustrialCentrifuge
- extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialCentrifuge>
- implements ISurvivalConstructable {
+public class GregtechMetaTileEntity_IndustrialCentrifuge extends
+ GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialCentrifuge> implements ISurvivalConstructable {
private boolean mIsAnimated;
private static final CustomIcon frontFaceActive = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE5");
@@ -63,24 +64,15 @@ public class GregtechMetaTileEntity_IndustrialCentrifuge
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Industrial Centrifuge")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Industrial Centrifuge")
.addInfo("125% faster than using single block machines of the same voltage")
- .addInfo("Disable animations with a screwdriver")
- .addInfo("Only uses 90% of the EU/t normally required")
- .addInfo("Processes six items per voltage tier")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 3, 3, true)
- .addController("Front Center")
- .addCasingInfo("Centrifuge Casings", 10)
- .addInputBus("Any Casing except front", 1)
- .addOutputBus("Any Casing except front", 1)
- .addInputHatch("Any Casing except front", 1)
- .addOutputHatch("Any Casing except front", 1)
- .addEnergyHatch("Any Casing except front", 1)
- .addMaintenanceHatch("Any Casing except front", 1)
- .addMufflerHatch("Any Casing except front", 1)
+ .addInfo("Disable animations with a screwdriver").addInfo("Only uses 90% of the EU/t normally required")
+ .addInfo("Processes six items per voltage tier").addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator().beginStructureBlock(3, 3, 3, true).addController("Front Center")
+ .addCasingInfo("Centrifuge Casings", 10).addInputBus("Any Casing except front", 1)
+ .addOutputBus("Any Casing except front", 1).addInputHatch("Any Casing except front", 1)
+ .addOutputHatch("Any Casing except front", 1).addEnergyHatch("Any Casing except front", 1)
+ .addMaintenanceHatch("Any Casing except front", 1).addMufflerHatch("Any Casing except front", 1)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -89,18 +81,16 @@ public class GregtechMetaTileEntity_IndustrialCentrifuge
public IStructureDefinition<GregtechMetaTileEntity_IndustrialCentrifuge> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialCentrifuge>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC"},
- {"C~C", "C-C", "CCC"},
- {"CCC", "CCC", "CCC"},
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC" }, { "C~C", "C-C", "CCC" },
+ { "CCC", "CCC", "CCC" }, }))
.addElement(
'C',
buildHatchAdder(GregtechMetaTileEntity_IndustrialCentrifuge.class)
.atLeast(InputBus, OutputBus, Maintenance, Energy, Muffler, InputHatch, OutputHatch)
- .casingIndex(getCasingTextureIndex())
- .dot(1)
- .buildAndChain(
+ .casingIndex(getCasingTextureIndex()).dot(1).buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasingsMisc, 0))))
.build();
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialChisel.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialChisel.java
index 4316cf936d..1f9b43873d 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialChisel.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialChisel.java
@@ -6,10 +6,20 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.util.ArrayList;
+import java.util.List;
+
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
+import team.chisel.carving.Carving;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -24,12 +34,6 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.ArrayList;
-import java.util.List;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
-import team.chisel.carving.Carving;
public class GregtechMetaTileEntity_IndustrialChisel
extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialChisel> implements ISurvivalConstructable {
@@ -60,22 +64,13 @@ public class GregtechMetaTileEntity_IndustrialChisel
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Factory Grade Auto Chisel")
- .addInfo("Target block goes in GUI slot")
- .addInfo("If no target provided, firdt chisel result is used")
+ tt.addMachineType(getMachineType()).addInfo("Factory Grade Auto Chisel")
+ .addInfo("Target block goes in GUI slot").addInfo("If no target provided, firdt chisel result is used")
.addInfo("Speed: +200% | EU Usage: 75% | Parallel: Tier x 16")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 3, 3, true)
- .addController("Front center")
- .addCasingInfo("Sturdy Printer Casing", 10)
- .addInputBus("Any casing", 1)
- .addOutputBus("Any casing", 1)
- .addEnergyHatch("Any casing", 1)
- .addMaintenanceHatch("Any casing", 1)
- .addMufflerHatch("Any casing", 1)
- .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 3, true)
+ .addController("Front center").addCasingInfo("Sturdy Printer Casing", 10).addInputBus("Any casing", 1)
+ .addOutputBus("Any casing", 1).addEnergyHatch("Any casing", 1).addMaintenanceHatch("Any casing", 1)
+ .addMufflerHatch("Any casing", 1).toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -83,17 +78,15 @@ public class GregtechMetaTileEntity_IndustrialChisel
public IStructureDefinition<GregtechMetaTileEntity_IndustrialChisel> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialChisel>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC"},
- {"C~C", "C-C", "CCC"},
- {"CCC", "CCC", "CCC"},
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC" }, { "C~C", "C-C", "CCC" },
+ { "CCC", "CCC", "CCC" }, }))
.addElement(
'C',
buildHatchAdder(GregtechMetaTileEntity_IndustrialChisel.class)
- .atLeast(InputBus, OutputBus, Maintenance, Energy, Muffler)
- .casingIndex(90)
- .dot(1)
+ .atLeast(InputBus, OutputBus, Maintenance, Energy, Muffler).casingIndex(90).dot(1)
.buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings5Misc, 5))))
.build();
@@ -201,18 +194,17 @@ public class GregtechMetaTileEntity_IndustrialChisel
if (tIsCached || aInput != null && hasChiselResults(aInput)) {
ItemStack tOutput = tIsCached ? mOutputCache.copy() : getChiselOutput(aInput, aTarget);
if (tOutput != null) {
- if (mCachedRecipe != null
- && GT_Utility.areStacksEqual(aInput, mInputCache)
+ if (mCachedRecipe != null && GT_Utility.areStacksEqual(aInput, mInputCache)
&& GT_Utility.areStacksEqual(tOutput, mOutputCache)) {
return mCachedRecipe;
}
// We can chisel this
GTPP_Recipe aRecipe = new GTPP_Recipe(
false,
- new ItemStack[] {ItemUtils.getSimpleStack(aInput, 1)},
- new ItemStack[] {ItemUtils.getSimpleStack(tOutput, 1)},
+ new ItemStack[] { ItemUtils.getSimpleStack(aInput, 1) },
+ new ItemStack[] { ItemUtils.getSimpleStack(tOutput, 1) },
null,
- new int[] {10000},
+ new int[] { 10000 },
new FluidStack[] {},
new FluidStack[] {},
20,
@@ -256,14 +248,9 @@ public class GregtechMetaTileEntity_IndustrialChisel
int aEUPercent = getEuDiscountForParallelism();
int aSpeedBonusPercent = 200;
- GT_ParallelHelper helper = new GT_ParallelHelper()
- .setRecipe(tRecipe)
- .setItemInputs(aItemInputs)
- .setFluidInputs(aFluidInputs)
- .setAvailableEUt(tEnergy)
- .setMaxParallel(aMaxParallelRecipes)
- .enableConsumption()
- .enableOutputCalculation();
+ GT_ParallelHelper helper = new GT_ParallelHelper().setRecipe(tRecipe).setItemInputs(aItemInputs)
+ .setFluidInputs(aFluidInputs).setAvailableEUt(tEnergy).setMaxParallel(aMaxParallelRecipes)
+ .enableConsumption().enableOutputCalculation();
if (!mVoidExcess) {
helper.enableVoidProtection(this);
}
@@ -281,14 +268,10 @@ public class GregtechMetaTileEntity_IndustrialChisel
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
- GT_OverclockCalculator calculator = new GT_OverclockCalculator()
- .setRecipeEUt(tRecipe.mEUt)
- .setEUt(tEnergy)
- .setDuration(tRecipe.mDuration)
- .setEUtDiscount(aEUPercent / 100.0f)
+ GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(tRecipe.mEUt).setEUt(tEnergy)
+ .setDuration(tRecipe.mDuration).setEUtDiscount(aEUPercent / 100.0f)
.setSpeedBoost(100.0f / (100.0f + aSpeedBonusPercent))
- .setParallel(Math.min(aMaxParallelRecipes, helper.getCurrentParallel()))
- .calculate();
+ .setParallel(Math.min(aMaxParallelRecipes, helper.getCurrentParallel())).calculate();
lEUt = -calculator.getConsumption();
mMaxProgresstime = (int) Math.ceil(calculator.getDuration() * helper.getDurationMultiplier());
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCokeOven.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCokeOven.java
index 95a0024284..922e5f8904 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCokeOven.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCokeOven.java
@@ -7,10 +7,13 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import net.minecraft.item.ItemStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.TAE;
import gregtech.api.interfaces.IIconContainer;
@@ -24,11 +27,9 @@ import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.item.ItemStack;
-public class GregtechMetaTileEntity_IndustrialCokeOven
- extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialCokeOven>
- implements ISurvivalConstructable {
+public class GregtechMetaTileEntity_IndustrialCokeOven extends
+ GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialCokeOven> implements ISurvivalConstructable {
private int mLevel = 0;
private int mCasing;
@@ -57,25 +58,16 @@ public class GregtechMetaTileEntity_IndustrialCokeOven
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Processes Logs and Coal into Charcoal and Coal Coke.")
+ tt.addMachineType(getMachineType()).addInfo("Processes Logs and Coal into Charcoal and Coal Coke.")
.addInfo("Controller Block for the Industrial Coke Oven")
.addInfo("Gain 4% energy discount per voltage tier")
.addInfo("Process 12x materials with Heat Resistant Casings")
- .addInfo("Or 24x materials with Heat Proof Casings")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 3, 3, true)
- .addController("Front middle at bottom")
+ .addInfo("Or 24x materials with Heat Proof Casings").addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator().beginStructureBlock(3, 3, 3, true).addController("Front middle at bottom")
.addCasingInfo("Structural Coke Oven Casings", 8)
- .addCasingInfo("Heat Resistant/Proof Coke Oven Casings", 8)
- .addInputBus("Any Casing", 1)
- .addOutputBus("Any Casing", 1)
- .addInputHatch("Any Casing", 1)
- .addOutputHatch("Any Casing", 1)
- .addEnergyHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
- .addMufflerHatch("Any Casing", 1)
+ .addCasingInfo("Heat Resistant/Proof Coke Oven Casings", 8).addInputBus("Any Casing", 1)
+ .addOutputBus("Any Casing", 1).addInputHatch("Any Casing", 1).addOutputHatch("Any Casing", 1)
+ .addEnergyHatch("Any Casing", 1).addMaintenanceHatch("Any Casing", 1).addMufflerHatch("Any Casing", 1)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -84,28 +76,26 @@ public class GregtechMetaTileEntity_IndustrialCokeOven
public IStructureDefinition<GregtechMetaTileEntity_IndustrialCokeOven> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialCokeOven>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC"},
- {"HHH", "H-H", "HHH"},
- {"C~C", "CCC", "CCC"},
- }))
- .addShape(mName + "1", transpose(new String[][] {
- {"CCC", "CCC", "CCC"},
- {"aaa", "a-a", "aaa"},
- {"C~C", "CCC", "CCC"},
- }))
- .addShape(mName + "2", transpose(new String[][] {
- {"CCC", "CCC", "CCC"},
- {"bbb", "b-b", "bbb"},
- {"C~C", "CCC", "CCC"},
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC" }, { "HHH", "H-H", "HHH" },
+ { "C~C", "CCC", "CCC" }, }))
+ .addShape(
+ mName + "1",
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC" }, { "aaa", "a-a", "aaa" },
+ { "C~C", "CCC", "CCC" }, }))
+ .addShape(
+ mName + "2",
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC" }, { "bbb", "b-b", "bbb" },
+ { "C~C", "CCC", "CCC" }, }))
.addElement(
'C',
buildHatchAdder(GregtechMetaTileEntity_IndustrialCokeOven.class)
.atLeast(InputBus, OutputBus, InputHatch, OutputHatch, Maintenance, Energy, Muffler)
- .casingIndex(TAE.GTPP_INDEX(1))
- .dot(1)
- .buildAndChain(
+ .casingIndex(TAE.GTPP_INDEX(1)).dot(1).buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasingsMisc, 1))))
.addElement(
'H',
@@ -113,8 +103,7 @@ public class GregtechMetaTileEntity_IndustrialCokeOven
onElementPass(x -> ++x.mCasing1, ofBlock(ModBlocks.blockCasingsMisc, 2)),
onElementPass(x -> ++x.mCasing2, ofBlock(ModBlocks.blockCasingsMisc, 3))))
.addElement('a', ofBlock(ModBlocks.blockCasingsMisc, 2))
- .addElement('b', ofBlock(ModBlocks.blockCasingsMisc, 3))
- .build();
+ .addElement('b', ofBlock(ModBlocks.blockCasingsMisc, 3)).build();
}
return STRUCTURE_DEFINITION;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java
index 9f1ba02076..ec2d7d647a 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java
@@ -6,10 +6,16 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.enums.TAE;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -23,21 +29,16 @@ import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-public class GregtechMetaTileEntity_IndustrialCuttingMachine
- extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialCuttingMachine>
- implements ISurvivalConstructable {
+public class GregtechMetaTileEntity_IndustrialCuttingMachine extends
+ GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialCuttingMachine> implements ISurvivalConstructable {
private boolean mCuttingMode = true;
private int mCasing;
private static IStructureDefinition<GregtechMetaTileEntity_IndustrialCuttingMachine> STRUCTURE_DEFINITION = null;
- public GregtechMetaTileEntity_IndustrialCuttingMachine(
- final int aID, final String aName, final String aNameRegional) {
+ public GregtechMetaTileEntity_IndustrialCuttingMachine(final int aID, final String aName,
+ final String aNameRegional) {
super(aID, aName, aNameRegional);
}
@@ -58,22 +59,13 @@ public class GregtechMetaTileEntity_IndustrialCuttingMachine
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Industrial Cutting Factory")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Industrial Cutting Factory")
.addInfo("200% faster than using single block machines of the same voltage")
- .addInfo("Only uses 75% of the EU/t normally required")
- .addInfo("Processes four items per voltage tier")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 3, 5, true)
- .addController("Front Center")
- .addCasingInfo("Cutting Factory Frames", 26)
- .addInputBus("Any Casing", 1)
- .addOutputBus("Any Casing", 1)
- .addInputHatch("Any Casing", 1)
- .addEnergyHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
- .addMufflerHatch("Any Casing", 1)
+ .addInfo("Only uses 75% of the EU/t normally required").addInfo("Processes four items per voltage tier")
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 5, true)
+ .addController("Front Center").addCasingInfo("Cutting Factory Frames", 26).addInputBus("Any Casing", 1)
+ .addOutputBus("Any Casing", 1).addInputHatch("Any Casing", 1).addEnergyHatch("Any Casing", 1)
+ .addMaintenanceHatch("Any Casing", 1).addMufflerHatch("Any Casing", 1)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -82,18 +74,17 @@ public class GregtechMetaTileEntity_IndustrialCuttingMachine
public IStructureDefinition<GregtechMetaTileEntity_IndustrialCuttingMachine> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialCuttingMachine>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC", "CCC", "CCC"},
- {"C~C", "C-C", "C-C", "C-C", "CCC"},
- {"CCC", "CCC", "CCC", "CCC", "CCC"},
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC", "CCC", "CCC" },
+ { "C~C", "C-C", "C-C", "C-C", "CCC" },
+ { "CCC", "CCC", "CCC", "CCC", "CCC" }, }))
.addElement(
'C',
buildHatchAdder(GregtechMetaTileEntity_IndustrialCuttingMachine.class)
.atLeast(InputBus, InputHatch, OutputBus, Maintenance, Energy, Muffler)
- .casingIndex(getCasingTextureIndex())
- .dot(1)
- .buildAndChain(
+ .casingIndex(getCasingTextureIndex()).dot(1).buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings2Misc, 13))))
.build();
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java
index 3fd71a56d2..2bfe9ad75f 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java
@@ -7,10 +7,16 @@ import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
import static gregtech.api.util.GT_StructureUtility.ofCoil;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.enums.HeatingCoilLevel;
import gregtech.api.enums.TAE;
import gregtech.api.interfaces.IIconContainer;
@@ -28,14 +34,9 @@ import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.fluids.FluidStack;
-public class GregtechMetaTileEntity_IndustrialDehydrator
- extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialDehydrator>
- implements ISurvivalConstructable {
+public class GregtechMetaTileEntity_IndustrialDehydrator extends
+ GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialDehydrator> implements ISurvivalConstructable {
private static int CASING_TEXTURE_ID;
private static String mCasingName = "Vacuum Casing";
@@ -61,26 +62,17 @@ public class GregtechMetaTileEntity_IndustrialDehydrator
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Factory Grade Vacuum Furnace")
+ tt.addMachineType(getMachineType()).addInfo("Factory Grade Vacuum Furnace")
.addInfo("Can toggle the operation temperature with a Screwdriver")
.addInfo("All Dehydrator recipes are Low Temp recipes")
.addInfo("Speed: +120% | EU Usage: 50% | Parallel: 4")
.addInfo("Each 900K over the min. Heat Capacity grants 5% speedup (multiplicatively)")
.addInfo("Each 1800K over the min. Heat Capacity allows for one upgraded overclock")
.addInfo("Upgraded overclocks reduce recipe time to 25% and increase EU/t to 400%")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 5, 3, true)
- .addController("Bottom Center")
- .addCasingInfo(mCasingName, 5)
- .addInputBus("Any Casing", 1)
- .addOutputBus("Any Casing", 1)
- .addInputHatch("Any Casing", 1)
- .addOutputHatch("Any Casing", 1)
- .addEnergyHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
- .addMufflerHatch("Any Casing", 1)
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 5, 3, true)
+ .addController("Bottom Center").addCasingInfo(mCasingName, 5).addInputBus("Any Casing", 1)
+ .addOutputBus("Any Casing", 1).addInputHatch("Any Casing", 1).addOutputHatch("Any Casing", 1)
+ .addEnergyHatch("Any Casing", 1).addMaintenanceHatch("Any Casing", 1).addMufflerHatch("Any Casing", 1)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -88,21 +80,16 @@ public class GregtechMetaTileEntity_IndustrialDehydrator
@Override
public IStructureDefinition<GregtechMetaTileEntity_IndustrialDehydrator> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
- STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialDehydrator>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC"},
- {"HHH", "H-H", "HHH"},
- {"HHH", "H-H", "HHH"},
- {"HHH", "H-H", "HHH"},
- {"C~C", "CCC", "CCC"},
- }))
+ STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialDehydrator>builder().addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC" }, { "HHH", "H-H", "HHH" }, { "HHH", "H-H", "HHH" },
+ { "HHH", "H-H", "HHH" }, { "C~C", "CCC", "CCC" }, }))
.addElement(
'C',
buildHatchAdder(GregtechMetaTileEntity_IndustrialDehydrator.class)
.atLeast(InputBus, OutputBus, Maintenance, Energy, Muffler, InputHatch, OutputHatch)
- .casingIndex(CASING_TEXTURE_ID)
- .dot(1)
- .buildAndChain(
+ .casingIndex(CASING_TEXTURE_ID).dot(1).buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings4Misc, 10))))
.addElement(
'H',
@@ -148,8 +135,7 @@ public class GregtechMetaTileEntity_IndustrialDehydrator
}
public GT_Recipe.GT_Recipe_Map getRecipeMap() {
- return mDehydratorMode
- ? GTPP_Recipe.GTPP_Recipe_Map.sMultiblockChemicalDehydratorRecipes
+ return mDehydratorMode ? GTPP_Recipe.GTPP_Recipe_Map.sMultiblockChemicalDehydratorRecipes
: GTPP_Recipe.GTPP_Recipe_Map.sVacuumFurnaceRecipes;
}
@@ -185,13 +171,8 @@ public class GregtechMetaTileEntity_IndustrialDehydrator
}
@Override
- public boolean checkRecipeGeneric(
- ItemStack[] aItemInputs,
- FluidStack[] aFluidInputs,
- int aMaxParallelRecipes,
- long aEUPercent,
- int aSpeedBonusPercent,
- int aOutputChanceRoll) {
+ public boolean checkRecipeGeneric(ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes,
+ long aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll) {
// Based on the Processing Array. A bit overkill, but very flexible.
// Reset outputs and progress stats
@@ -204,14 +185,13 @@ public class GregtechMetaTileEntity_IndustrialDehydrator
byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
long tEnergy = getMaxInputEnergy();
- GT_Recipe tRecipe = this.getRecipeMap()
- .findRecipe(
- getBaseMetaTileEntity(),
- mLastRecipe,
- false,
- gregtech.api.enums.GT_Values.V[tTier],
- aFluidInputs,
- aItemInputs);
+ GT_Recipe tRecipe = this.getRecipeMap().findRecipe(
+ getBaseMetaTileEntity(),
+ mLastRecipe,
+ false,
+ gregtech.api.enums.GT_Values.V[tTier],
+ aFluidInputs,
+ aItemInputs);
// Remember last recipe - an optimization for findRecipe()
this.mLastRecipe = tRecipe;
@@ -220,14 +200,9 @@ public class GregtechMetaTileEntity_IndustrialDehydrator
return false;
}
- GT_ParallelHelper helper = new GT_ParallelHelper()
- .setRecipe(tRecipe)
- .setItemInputs(aItemInputs)
- .setFluidInputs(aFluidInputs)
- .setAvailableEUt(tEnergy)
- .setMaxParallel(aMaxParallelRecipes)
- .enableConsumption()
- .enableOutputCalculation();
+ GT_ParallelHelper helper = new GT_ParallelHelper().setRecipe(tRecipe).setItemInputs(aItemInputs)
+ .setFluidInputs(aFluidInputs).setAvailableEUt(tEnergy).setMaxParallel(aMaxParallelRecipes)
+ .enableConsumption().enableOutputCalculation();
if (!mVoidExcess) {
helper.enableVoidProtection(this);
}
@@ -245,17 +220,11 @@ public class GregtechMetaTileEntity_IndustrialDehydrator
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
- GT_OverclockCalculator calculator = new GT_OverclockCalculator()
- .setRecipeEUt(tRecipe.mEUt)
- .setEUt(tEnergy)
- .setDuration(tRecipe.mDuration)
- .setEUtDiscount(aEUPercent / 100.0f)
+ GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(tRecipe.mEUt).setEUt(tEnergy)
+ .setDuration(tRecipe.mDuration).setEUtDiscount(aEUPercent / 100.0f)
.setSpeedBoost(100.0f / (100.0f + aSpeedBonusPercent))
- .setParallel(Math.min(aMaxParallelRecipes, helper.getCurrentParallel()))
- .enableHeatOC()
- .enableHeatDiscount()
- .setRecipeHeat(tRecipe.mSpecialValue)
- .setMultiHeat((int) getCoilLevel().getHeat())
+ .setParallel(Math.min(aMaxParallelRecipes, helper.getCurrentParallel())).enableHeatOC()
+ .enableHeatDiscount().setRecipeHeat(tRecipe.mSpecialValue).setMultiHeat((int) getCoilLevel().getHeat())
.calculate();
lEUt = -calculator.getConsumption();
mMaxProgresstime = (int) Math.ceil(calculator.getDuration() * helper.getDurationMultiplier());
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialElectrolyzer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialElectrolyzer.java
index 00cb08ec32..52ad795a3c 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialElectrolyzer.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialElectrolyzer.java
@@ -6,10 +6,13 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import net.minecraft.item.ItemStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.enums.TAE;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -21,17 +24,15 @@ import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.item.ItemStack;
-public class GregtechMetaTileEntity_IndustrialElectrolyzer
- extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialElectrolyzer>
- implements ISurvivalConstructable {
+public class GregtechMetaTileEntity_IndustrialElectrolyzer extends
+ GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialElectrolyzer> implements ISurvivalConstructable {
private int mCasing;
private static IStructureDefinition<GregtechMetaTileEntity_IndustrialElectrolyzer> STRUCTURE_DEFINITION = null;
- public GregtechMetaTileEntity_IndustrialElectrolyzer(
- final int aID, final String aName, final String aNameRegional) {
+ public GregtechMetaTileEntity_IndustrialElectrolyzer(final int aID, final String aName,
+ final String aNameRegional) {
super(aID, aName, aNameRegional);
}
@@ -52,23 +53,13 @@ public class GregtechMetaTileEntity_IndustrialElectrolyzer
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Industrial Electrolyzer")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Industrial Electrolyzer")
.addInfo("180% faster than using single block machines of the same voltage")
- .addInfo("Only uses 90% of the EU/t normally required")
- .addInfo("Processes two items per voltage tier")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 3, 3, true)
- .addController("Front Center")
- .addCasingInfo("Electrolyzer Casings", 10)
- .addInputBus("Any Casing", 1)
- .addOutputBus("Any Casing", 1)
- .addInputHatch("Any Casing", 1)
- .addOutputHatch("Any Casing", 1)
- .addEnergyHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
- .addMufflerHatch("Any Casing", 1)
+ .addInfo("Only uses 90% of the EU/t normally required").addInfo("Processes two items per voltage tier")
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 3, true)
+ .addController("Front Center").addCasingInfo("Electrolyzer Casings", 10).addInputBus("Any Casing", 1)
+ .addOutputBus("Any Casing", 1).addInputHatch("Any Casing", 1).addOutputHatch("Any Casing", 1)
+ .addEnergyHatch("Any Casing", 1).addMaintenanceHatch("Any Casing", 1).addMufflerHatch("Any Casing", 1)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -77,18 +68,16 @@ public class GregtechMetaTileEntity_IndustrialElectrolyzer
public IStructureDefinition<GregtechMetaTileEntity_IndustrialElectrolyzer> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialElectrolyzer>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC"},
- {"C~C", "C-C", "CCC"},
- {"CCC", "CCC", "CCC"},
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC" }, { "C~C", "C-C", "CCC" },
+ { "CCC", "CCC", "CCC" }, }))
.addElement(
'C',
buildHatchAdder(GregtechMetaTileEntity_IndustrialElectrolyzer.class)
.atLeast(InputBus, OutputBus, Maintenance, Energy, Muffler, InputHatch, OutputHatch)
- .casingIndex(TAE.GTPP_INDEX(5))
- .dot(1)
- .buildAndChain(
+ .casingIndex(TAE.GTPP_INDEX(5)).dot(1).buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasingsMisc, 5))))
.build();
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java
index 8a14401d20..bdbf4a4aec 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java
@@ -6,10 +6,17 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.util.ArrayList;
+
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.TAE;
import gregtech.api.interfaces.IIconContainer;
@@ -23,14 +30,9 @@ import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.ArrayList;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
-public class GregtechMetaTileEntity_IndustrialExtruder
- extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialExtruder>
- implements ISurvivalConstructable {
+public class GregtechMetaTileEntity_IndustrialExtruder extends
+ GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialExtruder> implements ISurvivalConstructable {
private int mCasing;
private static IStructureDefinition<GregtechMetaTileEntity_IndustrialExtruder> STRUCTURE_DEFINITION = null;
@@ -56,23 +58,16 @@ public class GregtechMetaTileEntity_IndustrialExtruder
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Material Extruder")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Material Extruder")
.addInfo("250% faster than using single block machines of the same voltage")
.addInfo("Processes four items per voltage tier")
.addInfo("Extrusion Shape for recipe goes in the Input Bus")
.addInfo("Each Input Bus can have a different shape!")
.addInfo("You can use several input buses per multiblock")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 3, 5, true)
- .addController("Front Center")
- .addCasingInfo("Inconel Reinforced Casings", 14)
- .addInputBus("Any Casing", 1)
- .addOutputBus("Any Casing", 1)
- .addEnergyHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
- .addMufflerHatch("Back Center", 2)
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 5, true)
+ .addController("Front Center").addCasingInfo("Inconel Reinforced Casings", 14)
+ .addInputBus("Any Casing", 1).addOutputBus("Any Casing", 1).addEnergyHatch("Any Casing", 1)
+ .addMaintenanceHatch("Any Casing", 1).addMufflerHatch("Back Center", 2)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -80,20 +75,19 @@ public class GregtechMetaTileEntity_IndustrialExtruder
@Override
public IStructureDefinition<GregtechMetaTileEntity_IndustrialExtruder> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
- STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialExtruder>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC", "CCC", "CCC"},
- {"C~C", "C-C", "C-C", "C-C", "CCC"},
- {"CCC", "CCC", "CCC", "CCC", "CCC"},
- }))
+ STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialExtruder>builder().addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC", "CCC", "CCC" },
+ { "C~C", "C-C", "C-C", "C-C", "CCC" }, { "CCC", "CCC", "CCC", "CCC", "CCC" }, }))
.addElement(
'C',
buildHatchAdder(GregtechMetaTileEntity_IndustrialExtruder.class)
.atLeast(InputBus, OutputBus, Maintenance, Energy, Muffler)
- .casingIndex(getCasingTextureIndex())
- .dot(1)
- .buildAndChain(onElementPass(
- x -> ++x.mCasing, ofBlock(getCasingBlock(), getCasingMeta()))))
+ .casingIndex(getCasingTextureIndex()).dot(1).buildAndChain(
+ onElementPass(
+ x -> ++x.mCasing,
+ ofBlock(getCasingBlock(), getCasingMeta()))))
.build();
}
return STRUCTURE_DEFINITION;
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialFluidHeater.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialFluidHeater.java
index a4e5b15b61..09acde8bcb 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialFluidHeater.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialFluidHeater.java
@@ -6,10 +6,14 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.enums.TAE;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -21,12 +25,9 @@ import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
-public class GregtechMetaTileEntity_IndustrialFluidHeater
- extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialFluidHeater>
- implements ISurvivalConstructable {
+public class GregtechMetaTileEntity_IndustrialFluidHeater extends
+ GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialFluidHeater> implements ISurvivalConstructable {
private int mCasing1;
private static IStructureDefinition<GregtechMetaTileEntity_IndustrialFluidHeater> STRUCTURE_DEFINITION = null;
@@ -52,25 +53,17 @@ public class GregtechMetaTileEntity_IndustrialFluidHeater
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Industrial Fluid Heater")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Industrial Fluid Heater")
.addInfo("120% faster than using single block machines of the same voltage")
.addInfo("Only uses 90% of the EU/t normally required")
- .addInfo("Processes eight items per voltage tier")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(5, 6, 5, true)
- .addController("Front Center")
+ .addInfo("Processes eight items per voltage tier").addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator().beginStructureBlock(5, 6, 5, true).addController("Front Center")
.addCasingInfo("Top/Bottom layer: Multi-use Casings", 34)
.addCasingInfo("Middle layers: Thermal Containment Casing", 47)
- .addInputBus("Bottom Layer (optional)", 1)
- .addInputHatch("Bottom Layer", 1)
- .addOutputBus("Top Layer (optional)", 1)
- .addOutputHatch("Top Layer", 1)
- .addEnergyHatch("Any Multi-use Casing", 1)
- .addMaintenanceHatch("Any Multi-use Casing", 1)
- .addMufflerHatch("Any Multi-use Casing", 1)
- .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ .addInputBus("Bottom Layer (optional)", 1).addInputHatch("Bottom Layer", 1)
+ .addOutputBus("Top Layer (optional)", 1).addOutputHatch("Top Layer", 1)
+ .addEnergyHatch("Any Multi-use Casing", 1).addMaintenanceHatch("Any Multi-use Casing", 1)
+ .addMufflerHatch("Any Multi-use Casing", 1).toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -78,31 +71,32 @@ public class GregtechMetaTileEntity_IndustrialFluidHeater
public IStructureDefinition<GregtechMetaTileEntity_IndustrialFluidHeater> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialFluidHeater>builder()
- .addShape(mName, transpose(new String[][] {
- {" TTT ", "TTTTT", "TTTTT", "TTTTT", " TTT "},
- {" XXX ", "X---X", "X---X", "X---X", " XXX "},
- {" XXX ", "X---X", "X---X", "X---X", " XXX "},
- {" XXX ", "X---X", "X---X", "X---X", " XXX "},
- {" X~X ", "X---X", "X---X", "X---X", " XXX "},
- {" BBB ", "BBBBB", "BBBBB", "BBBBB", " BBB "},
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { " TTT ", "TTTTT", "TTTTT", "TTTTT", " TTT " },
+ { " XXX ", "X---X", "X---X", "X---X", " XXX " },
+ { " XXX ", "X---X", "X---X", "X---X", " XXX " },
+ { " XXX ", "X---X", "X---X", "X---X", " XXX " },
+ { " X~X ", "X---X", "X---X", "X---X", " XXX " },
+ { " BBB ", "BBBBB", "BBBBB", "BBBBB", " BBB " }, }))
.addElement(
'B',
buildHatchAdder(GregtechMetaTileEntity_IndustrialFluidHeater.class)
.atLeast(InputBus, InputHatch, Maintenance, Energy, Muffler)
- .casingIndex(getCasingTextureIndex())
- .dot(1)
- .buildAndChain(onElementPass(
- x -> ++x.mCasing1, ofBlock(getCasingBlock2(), getCasingMeta2()))))
+ .casingIndex(getCasingTextureIndex()).dot(1).buildAndChain(
+ onElementPass(
+ x -> ++x.mCasing1,
+ ofBlock(getCasingBlock2(), getCasingMeta2()))))
.addElement('X', ofBlock(getCasingBlock1(), getCasingMeta1()))
.addElement(
'T',
buildHatchAdder(GregtechMetaTileEntity_IndustrialFluidHeater.class)
.atLeast(OutputBus, OutputHatch, Maintenance, Energy, Muffler)
- .casingIndex(getCasingTextureIndex())
- .dot(1)
- .buildAndChain(onElementPass(
- x -> ++x.mCasing1, ofBlock(getCasingBlock2(), getCasingMeta2()))))
+ .casingIndex(getCasingTextureIndex()).dot(1).buildAndChain(
+ onElementPass(
+ x -> ++x.mCasing1,
+ ofBlock(getCasingBlock2(), getCasingMeta2()))))
.build();
}
return STRUCTURE_DEFINITION;
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialForgeHammer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialForgeHammer.java
index ea3402efb6..476036fc7c 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialForgeHammer.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialForgeHammer.java
@@ -7,10 +7,20 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
import gregtech.api.enums.TAE;
@@ -26,17 +36,9 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
-public class GregtechMetaTileEntity_IndustrialForgeHammer
- extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialForgeHammer>
- implements ISurvivalConstructable {
+public class GregtechMetaTileEntity_IndustrialForgeHammer extends
+ GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialForgeHammer> implements ISurvivalConstructable {
private int mCasing;
private int mAnvil;
@@ -64,11 +66,9 @@ public class GregtechMetaTileEntity_IndustrialForgeHammer
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Industrial Forge Hammer")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Industrial Forge Hammer")
.addInfo("Speed: +100% | EU Usage: 100% | Parallel: Tier x Anvil Tier x 8")
- .addInfo("T1 - Vanilla Anvil")
- .addInfo("Anvil goes in Middle 3x3x3 Structure");
+ .addInfo("T1 - Vanilla Anvil").addInfo("Anvil goes in Middle 3x3x3 Structure");
if (LoadedMods.Railcraft) {
tt.addInfo("T2 - Steel Anvil");
}
@@ -79,17 +79,10 @@ public class GregtechMetaTileEntity_IndustrialForgeHammer
tt.addInfo("T3 - Thaumic Anvil");
tt.addInfo("T4 - Void Anvil");
}
- tt.addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 3, 3, true)
- .addController("Front Center")
- .addCasingInfo("Forge Casing", 10)
- .addInputBus("Any Casing", 1)
- .addOutputBus("Any Casing", 1)
- .addEnergyHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
- .addMufflerHatch("Any Casing", 1)
- .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ tt.addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 3, true)
+ .addController("Front Center").addCasingInfo("Forge Casing", 10).addInputBus("Any Casing", 1)
+ .addOutputBus("Any Casing", 1).addEnergyHatch("Any Casing", 1).addMaintenanceHatch("Any Casing", 1)
+ .addMufflerHatch("Any Casing", 1).toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -109,21 +102,18 @@ public class GregtechMetaTileEntity_IndustrialForgeHammer
aBlockMap.put(sVoidAnvil, 0);
}
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialForgeHammer>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC"},
- {"C~C", "CAC", "CCC"},
- {"CCC", "CCC", "CCC"},
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC" }, { "C~C", "CAC", "CCC" },
+ { "CCC", "CCC", "CCC" }, }))
.addElement(
'C',
buildHatchAdder(GregtechMetaTileEntity_IndustrialForgeHammer.class)
.atLeast(InputBus, OutputBus, Maintenance, Energy, Muffler)
- .casingIndex(TAE.getIndexFromPage(1, 11))
- .dot(1)
- .buildAndChain(
+ .casingIndex(TAE.getIndexFromPage(1, 11)).dot(1).buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings5Misc, 6))))
- .addElement('A', onElementPass(x -> ++x.mAnvil, ofBlocksFlat(aBlockMap, sAnvil, 0)))
- .build();
+ .addElement('A', onElementPass(x -> ++x.mAnvil, ofBlocksFlat(aBlockMap, sAnvil, 0))).build();
}
return STRUCTURE_DEFINITION;
}
@@ -174,8 +164,7 @@ public class GregtechMetaTileEntity_IndustrialForgeHammer
@Override
public boolean checkRecipe(final ItemStack aStack) {
- Block aAnvil = this.getBaseMetaTileEntity()
- .getBlockAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ Block aAnvil = this.getBaseMetaTileEntity().getBlockAtSide(this.getBaseMetaTileEntity().getBackFacing());
if (aAnvil != null) {
int aAnvilTier = getAnvilTier(aAnvil);
if (aAnvilTier > 0) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMacerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMacerator.java
index 5aa487344a..c7637a6431 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMacerator.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMacerator.java
@@ -7,10 +7,16 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.util.Random;
+
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.common.util.ForgeDirection;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.TAE;
import gregtech.api.interfaces.IIconContainer;
@@ -23,13 +29,9 @@ import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.Random;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.common.util.ForgeDirection;
-public class GregtechMetaTileEntity_IndustrialMacerator
- extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialMacerator>
- implements ISurvivalConstructable {
+public class GregtechMetaTileEntity_IndustrialMacerator extends
+ GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialMacerator> implements ISurvivalConstructable {
private int mCasing;
private int mPerLayer;
@@ -56,22 +58,14 @@ public class GregtechMetaTileEntity_IndustrialMacerator
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Industrial Maceration Stack")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Industrial Maceration Stack")
.addInfo("60% faster than using single block machines of the same voltage")
- .addInfo("Processes 8*tier materials at a time")
- .addInfo("ULV = Tier 0, LV = Tier 1, etc.")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 6, 3, true)
- .addController("Bottom Center")
- .addCasingInfo("Maceration Stack Casings", 26)
- .addInputBus("Bottom Casing", 1)
- .addEnergyHatch("Bottom Casing", 1)
- .addMaintenanceHatch("Bottom Casing", 1)
- .addOutputBus("One per layer except bottom layer", 2)
- .addMufflerHatch("Any Casing", 2)
- .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ .addInfo("Processes 8*tier materials at a time").addInfo("ULV = Tier 0, LV = Tier 1, etc.")
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 6, 3, true)
+ .addController("Bottom Center").addCasingInfo("Maceration Stack Casings", 26)
+ .addInputBus("Bottom Casing", 1).addEnergyHatch("Bottom Casing", 1)
+ .addMaintenanceHatch("Bottom Casing", 1).addOutputBus("One per layer except bottom layer", 2)
+ .addMufflerHatch("Any Casing", 2).toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -79,41 +73,29 @@ public class GregtechMetaTileEntity_IndustrialMacerator
public IStructureDefinition<GregtechMetaTileEntity_IndustrialMacerator> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialMacerator>builder()
- .addShape(mName + "top", transpose(new String[][] {
- {"CCC", "CCC", "CCC"},
- }))
- .addShape(mName + "mid", transpose(new String[][] {
- {"CCC", "C-C", "CCC"},
- }))
- .addShape(mName + "bottom", transpose(new String[][] {
- {"B~B", "BBB", "BBB"},
- }))
+ .addShape(mName + "top", transpose(new String[][] { { "CCC", "CCC", "CCC" }, }))
+ .addShape(
+ mName + "mid",
+ transpose(new String[][] { { "CCC", "C-C", "CCC" }, }))
+ .addShape(mName + "bottom", transpose(new String[][] { { "B~B", "BBB", "BBB" }, }))
.addElement(
'C',
ofChain(
- buildHatchAdder(GregtechMetaTileEntity_IndustrialMacerator.class)
- .atLeast(OutputBus)
+ buildHatchAdder(GregtechMetaTileEntity_IndustrialMacerator.class).atLeast(OutputBus)
.shouldReject(t -> t.mPerLayer + 1 == t.mOutputBusses.size())
.disallowOnly(ForgeDirection.UP, ForgeDirection.DOWN)
- .casingIndex(TAE.GTPP_INDEX(7))
- .dot(2)
- .build(),
+ .casingIndex(TAE.GTPP_INDEX(7)).dot(2).build(),
buildHatchAdder(GregtechMetaTileEntity_IndustrialMacerator.class)
.atLeast(Energy, Maintenance, Muffler)
.disallowOnly(ForgeDirection.UP, ForgeDirection.DOWN)
- .casingIndex(TAE.GTPP_INDEX(7))
- .dot(2)
- .build(),
+ .casingIndex(TAE.GTPP_INDEX(7)).dot(2).build(),
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasingsMisc, 7))))
.addElement(
'B',
ofChain(
buildHatchAdder(GregtechMetaTileEntity_IndustrialMacerator.class)
- .atLeast(Energy, Maintenance, InputBus)
- .disallowOnly(ForgeDirection.UP)
- .casingIndex(TAE.GTPP_INDEX(7))
- .dot(2)
- .build(),
+ .atLeast(Energy, Maintenance, InputBus).disallowOnly(ForgeDirection.UP)
+ .casingIndex(TAE.GTPP_INDEX(7)).dot(2).build(),
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasingsMisc, 7))))
.build();
}
@@ -194,22 +176,19 @@ public class GregtechMetaTileEntity_IndustrialMacerator
@Override
public void onPreTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
super.onPreTick(aBaseMetaTileEntity, aTick);
- if ((aBaseMetaTileEntity.isClientSide())
- && (aBaseMetaTileEntity.isActive())
+ if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive())
&& (aBaseMetaTileEntity.getFrontFacing() != 1)
&& (aBaseMetaTileEntity.getCoverIDAtSide((byte) 1) == 0)
&& (!aBaseMetaTileEntity.getOpacityAtSide((byte) 1))) {
final Random tRandom = aBaseMetaTileEntity.getWorld().rand;
- aBaseMetaTileEntity
- .getWorld()
- .spawnParticle(
- "smoke",
- (aBaseMetaTileEntity.getXCoord() + 0.8F) - (tRandom.nextFloat() * 0.6F),
- aBaseMetaTileEntity.getYCoord() + 0.3f + (tRandom.nextFloat() * 0.2F),
- (aBaseMetaTileEntity.getZCoord() + 1.2F) - (tRandom.nextFloat() * 1.6F),
- 0.0D,
- 0.0D,
- 0.0D);
+ aBaseMetaTileEntity.getWorld().spawnParticle(
+ "smoke",
+ (aBaseMetaTileEntity.getXCoord() + 0.8F) - (tRandom.nextFloat() * 0.6F),
+ aBaseMetaTileEntity.getYCoord() + 0.3f + (tRandom.nextFloat() * 0.2F),
+ (aBaseMetaTileEntity.getZCoord() + 1.2F) - (tRandom.nextFloat() * 1.6F),
+ 0.0D,
+ 0.0D,
+ 0.0D);
}
}
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 cef60fec54..7730ed73cd 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
@@ -6,10 +6,19 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.util.ArrayList;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.StatCollector;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.TAE;
import gregtech.api.interfaces.IIconContainer;
@@ -23,12 +32,6 @@ import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.ArrayList;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.StatCollector;
-import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntity_IndustrialMixer
extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialMixer> implements ISurvivalConstructable {
@@ -81,23 +84,13 @@ public class GregtechMetaTileEntity_IndustrialMixer
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Industrial Mixer")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Industrial Mixer")
.addInfo("250% faster than using single block machines of the same voltage")
- .addInfo("Processes eight recipes per voltage tier")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 4, 3, false)
- .addController("Second Layer Center")
- .addCasingInfo(mCasingName, 6)
- .addCasingInfo(mCasingName2, 2)
- .addInputBus("Any Casing", 1)
- .addOutputBus("Any Casing", 1)
- .addInputHatch("Any Casing", 1)
- .addOutputHatch("Any Casing", 1)
- .addEnergyHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
- .addMufflerHatch("Any Casing", 1)
+ .addInfo("Processes eight recipes per voltage tier").addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator().beginStructureBlock(3, 4, 3, false).addController("Second Layer Center")
+ .addCasingInfo(mCasingName, 6).addCasingInfo(mCasingName2, 2).addInputBus("Any Casing", 1)
+ .addOutputBus("Any Casing", 1).addInputHatch("Any Casing", 1).addOutputHatch("Any Casing", 1)
+ .addEnergyHatch("Any Casing", 1).addMaintenanceHatch("Any Casing", 1).addMufflerHatch("Any Casing", 1)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -106,22 +99,18 @@ public class GregtechMetaTileEntity_IndustrialMixer
public IStructureDefinition<GregtechMetaTileEntity_IndustrialMixer> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialMixer>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC"},
- {"CCC", "CMC", "CCC"},
- {"C~C", "CMC", "CCC"},
- {"CCC", "CCC", "CCC"},
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC" }, { "CCC", "CMC", "CCC" },
+ { "C~C", "CMC", "CCC" }, { "CCC", "CCC", "CCC" }, }))
.addElement(
'C',
buildHatchAdder(GregtechMetaTileEntity_IndustrialMixer.class)
.atLeast(InputBus, OutputBus, Maintenance, Energy, Muffler, InputHatch, OutputHatch)
- .casingIndex(CASING_TEXTURE_ID)
- .dot(1)
- .buildAndChain(
+ .casingIndex(CASING_TEXTURE_ID).dot(1).buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings3Misc, 2))))
- .addElement('M', ofBlock(GregTech_API.sBlockCasings4, 11))
- .build();
+ .addElement('M', ofBlock(GregTech_API.sBlockCasings4, 11)).build();
}
return STRUCTURE_DEFINITION;
}
@@ -236,7 +225,8 @@ public class GregtechMetaTileEntity_IndustrialMixer
public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
isBussesSeparate = !isBussesSeparate;
GT_Utility.sendChatToPlayer(
- aPlayer, StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + isBussesSeparate);
+ aPlayer,
+ StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + isBussesSeparate);
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMolecularTransformer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMolecularTransformer.java
index 29650598e7..7d9f9274c6 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMolecularTransformer.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMolecularTransformer.java
@@ -5,11 +5,16 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElement
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.common.util.ForgeDirection;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -21,9 +26,6 @@ import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.common.util.ForgeDirection;
public class GregtechMetaTileEntity_IndustrialMolecularTransformer
extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialMolecularTransformer>
@@ -32,8 +34,8 @@ public class GregtechMetaTileEntity_IndustrialMolecularTransformer
private static final int CASING_TEXTURE_ID = 48;
private int mCasing = 0;
- public GregtechMetaTileEntity_IndustrialMolecularTransformer(
- final int aID, final String aName, final String aNameRegional) {
+ public GregtechMetaTileEntity_IndustrialMolecularTransformer(final int aID, final String aName,
+ final String aNameRegional) {
super(aID, aName, aNameRegional);
}
@@ -54,61 +56,51 @@ public class GregtechMetaTileEntity_IndustrialMolecularTransformer
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Changes the structure of items to produce new ones")
- .addInfo("Maximum 1x of each bus/hatch.")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(7, 7, 7, false)
- .addController("Top Center")
- .addCasingInfo("Robust Tungstensteel Machine Casing", 40)
- .addCasingInfo("Tungstensteel Coils", 16)
- .addCasingInfo("Molecular Containment Casing", 52)
- .addCasingInfo("High Voltage Current Capacitor", 32)
- .addCasingInfo("Particle Containment Casing", 4)
- .addCasingInfo("Resonance Chamber I", 5)
- .addCasingInfo("Modulator I", 4)
- .addInputBus("Any Robust Tungstensteel Machine Casing", 1)
+ tt.addMachineType(getMachineType()).addInfo("Changes the structure of items to produce new ones")
+ .addInfo("Maximum 1x of each bus/hatch.").addPollutionAmount(getPollutionPerSecond(null)).addSeparator()
+ .beginStructureBlock(7, 7, 7, false).addController("Top Center")
+ .addCasingInfo("Robust Tungstensteel Machine Casing", 40).addCasingInfo("Tungstensteel Coils", 16)
+ .addCasingInfo("Molecular Containment Casing", 52).addCasingInfo("High Voltage Current Capacitor", 32)
+ .addCasingInfo("Particle Containment Casing", 4).addCasingInfo("Resonance Chamber I", 5)
+ .addCasingInfo("Modulator I", 4).addInputBus("Any Robust Tungstensteel Machine Casing", 1)
.addOutputBus("Any Robust Tungstensteel Machine Casing", 1)
.addEnergyHatch("Any Robust Tungstensteel Machine Casing", 1)
.addMaintenanceHatch("Any Robust Tungstensteel Machine Casing", 1)
- .addMufflerHatch("Any Robust Tungstensteel Machine Casing", 1)
- .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ .addMufflerHatch("Any Robust Tungstensteel Machine Casing", 1).toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static IStructureDefinition<GregtechMetaTileEntity_IndustrialMolecularTransformer> STRUCTURE_DEFINITION =
- null;
+ private static IStructureDefinition<GregtechMetaTileEntity_IndustrialMolecularTransformer> STRUCTURE_DEFINITION = null;
@Override
public IStructureDefinition<GregtechMetaTileEntity_IndustrialMolecularTransformer> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialMolecularTransformer>builder()
- .addShape(STRUCTURE_PIECE_MAIN, (new String[][] {
- {" ", " ", " xxx ", " x~x ", " xxx ", " ", " "},
- {" ", " xxx ", " xyyyx ", " xyzyx ", " xyyyx ", " xxx ", " "},
- {" ", " xxx ", " xyyyx ", " xyzyx ", " xyyyx ", " xxx ", " "},
- {" ", " xxx ", " xyyyx ", " xyzyx ", " xyyyx ", " xxx ", " "},
- {" t ", " ttxtt ", " tyyyt ", "txyzyxt", " tyyyt ", " ttxtt ", " t "},
- {" c ", " ccecc ", " cxfxc ", "cefefec", " cxfxc ", " ccecc ", " c "},
- {" h ", " hhhhh ", " hhhhh ", "hhhhhhh", " hhhhh ", " hhhhh ", " h "},
- }))
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ (new String[][] {
+ { " ", " ", " xxx ", " x~x ", " xxx ", " ", " " },
+ { " ", " xxx ", " xyyyx ", " xyzyx ", " xyyyx ", " xxx ", " " },
+ { " ", " xxx ", " xyyyx ", " xyzyx ", " xyyyx ", " xxx ", " " },
+ { " ", " xxx ", " xyyyx ", " xyzyx ", " xyyyx ", " xxx ", " " },
+ { " t ", " ttxtt ", " tyyyt ", "txyzyxt", " tyyyt ", " ttxtt ", " t " },
+ { " c ", " ccecc ", " cxfxc ", "cefefec", " cxfxc ", " ccecc ", " c " },
+ { " h ", " hhhhh ", " hhhhh ", "hhhhhhh", " hhhhh ", " hhhhh ", " h " }, }))
.addElement('x', ofBlock(getCasingBlock(), getCasingMeta()))
.addElement('y', ofBlock(getCasingBlock(), getCasingMeta2()))
.addElement('z', ofBlock(getCasingBlock(), getCasingMeta3()))
- .addElement('e', ofBlock(getCasingBlock2(), 0))
- .addElement('f', ofBlock(getCasingBlock2(), 4))
+ .addElement('e', ofBlock(getCasingBlock2(), 0)).addElement('f', ofBlock(getCasingBlock2(), 4))
.addElement('c', ofBlock(getCoilBlock(), 3))
.addElement('t', ofBlock(getCasingBlock3(), getTungstenCasingMeta()))
.addElement(
'h',
buildHatchAdder(GregtechMetaTileEntity_IndustrialMolecularTransformer.class)
.atLeast(InputBus, OutputBus, Maintenance, Energy, Muffler)
- .casingIndex(getCasingTextureIndex())
- .dot(1)
- .buildAndChain(onElementPass(
- x -> ++x.mCasing, ofBlock(getCasingBlock3(), getTungstenCasingMeta()))))
+ .casingIndex(getCasingTextureIndex()).dot(1).buildAndChain(
+ onElementPass(
+ x -> ++x.mCasing,
+ ofBlock(getCasingBlock3(), getTungstenCasingMeta()))))
.build();
}
return STRUCTURE_DEFINITION;
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java
index 8e25769c9c..872c828f05 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java
@@ -6,10 +6,21 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.StatCollector;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.enums.TAE;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -24,18 +35,9 @@ import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.ArrayList;
-import java.util.Arrays;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.StatCollector;
-import net.minecraftforge.fluids.FluidStack;
-public class GregtechMetaTileEntity_IndustrialMultiMachine
- extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialMultiMachine>
- implements ISurvivalConstructable {
+public class GregtechMetaTileEntity_IndustrialMultiMachine extends
+ GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialMultiMachine> implements ISurvivalConstructable {
protected int mInternalMode = 0;
protected GT_Recipe[] mLastRecipeExtended = new GT_Recipe[9];
@@ -48,7 +50,7 @@ public class GregtechMetaTileEntity_IndustrialMultiMachine
private static final int MODE_LASER = 6;
private static final int MODE_AUTOCLAVE = 7;
private static final int MODE_FLUIDSOLIDIFY = 8;
- private static final int[][] MODE_MAP = new int[][] {{0, 1, 2}, {3, 4, 5}, {6, 7, 8}};
+ private static final int[][] MODE_MAP = new int[][] { { 0, 1, 2 }, { 3, 4, 5 }, { 6, 7, 8 } };
public static final String[] aToolTipNames = new String[9];
private int mCasing;
private static IStructureDefinition<GregtechMetaTileEntity_IndustrialMultiMachine> STRUCTURE_DEFINITION = null;
@@ -63,8 +65,8 @@ public class GregtechMetaTileEntity_IndustrialMultiMachine
}
}
- public GregtechMetaTileEntity_IndustrialMultiMachine(
- final int aID, final String aName, final String aNameRegional) {
+ public GregtechMetaTileEntity_IndustrialMultiMachine(final int aID, final String aName,
+ final String aNameRegional) {
super(aID, aName, aNameRegional);
}
@@ -90,30 +92,26 @@ public class GregtechMetaTileEntity_IndustrialMultiMachine
aBuiltStrings[2] = aToolTipNames[6] + ", " + aToolTipNames[7] + ", " + aToolTipNames[8];
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Industrial Multi-Machine")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Industrial Multi-Machine")
.addInfo("250% faster than using single block machines of the same voltage")
- .addInfo("Only uses 80% of the EU/t normally required")
- .addInfo("Processes two items per voltage tier")
- .addInfo("Machine Type: [A] - " + EnumChatFormatting.YELLOW + aBuiltStrings[0]
- + EnumChatFormatting.RESET)
- .addInfo("Machine Type: [B] - " + EnumChatFormatting.YELLOW + aBuiltStrings[1]
- + EnumChatFormatting.RESET)
- .addInfo("Machine Type: [C] - " + EnumChatFormatting.YELLOW + aBuiltStrings[2]
- + EnumChatFormatting.RESET)
+ .addInfo("Only uses 80% of the EU/t normally required").addInfo("Processes two items per voltage tier")
+ .addInfo(
+ "Machine Type: [A] - " + EnumChatFormatting.YELLOW
+ + aBuiltStrings[0]
+ + EnumChatFormatting.RESET)
+ .addInfo(
+ "Machine Type: [B] - " + EnumChatFormatting.YELLOW
+ + aBuiltStrings[1]
+ + EnumChatFormatting.RESET)
+ .addInfo(
+ "Machine Type: [C] - " + EnumChatFormatting.YELLOW
+ + aBuiltStrings[2]
+ + EnumChatFormatting.RESET)
.addInfo("Read Multi-Machine Manual for extra information")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 3, 3, true)
- .addController("Front Center")
- .addCasingInfo("Multi-Use Casings", 6)
- .addInputBus("Any Casing", 1)
- .addOutputBus("Any Casing", 1)
- .addInputHatch("Any Casing", 1)
- .addOutputHatch("Any Casing", 1)
- .addEnergyHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
- .addMufflerHatch("Any Casing", 1)
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 3, true)
+ .addController("Front Center").addCasingInfo("Multi-Use Casings", 6).addInputBus("Any Casing", 1)
+ .addOutputBus("Any Casing", 1).addInputHatch("Any Casing", 1).addOutputHatch("Any Casing", 1)
+ .addEnergyHatch("Any Casing", 1).addMaintenanceHatch("Any Casing", 1).addMufflerHatch("Any Casing", 1)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -122,18 +120,16 @@ public class GregtechMetaTileEntity_IndustrialMultiMachine
public IStructureDefinition<GregtechMetaTileEntity_IndustrialMultiMachine> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialMultiMachine>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC"},
- {"C~C", "C-C", "CCC"},
- {"CCC", "CCC", "CCC"},
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC" }, { "C~C", "C-C", "CCC" },
+ { "CCC", "CCC", "CCC" }, }))
.addElement(
'C',
buildHatchAdder(GregtechMetaTileEntity_IndustrialMultiMachine.class)
.atLeast(InputBus, OutputBus, Maintenance, Energy, Muffler, InputHatch, OutputHatch)
- .casingIndex(getTextureIndex())
- .dot(1)
- .buildAndChain(
+ .casingIndex(getTextureIndex()).dot(1).buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings3Misc, 2))))
.build();
}
@@ -200,8 +196,8 @@ public class GregtechMetaTileEntity_IndustrialMultiMachine
Object[] tempArray = tFluids.toArray(new FluidStack[] {});
FluidStack[] properArray;
- properArray =
- ((tempArray != null && tempArray.length > 0) ? (FluidStack[]) tempArray : new FluidStack[] {});
+ properArray = ((tempArray != null && tempArray.length > 0) ? (FluidStack[]) tempArray
+ : new FluidStack[] {});
// Logger.MACHINE_INFO("4");
if (checkRecipeGeneric(
@@ -210,7 +206,8 @@ public class GregtechMetaTileEntity_IndustrialMultiMachine
(2 * GT_Utility.getTier(this.getMaxInputVoltage())),
80,
250,
- 10000)) return true;
+ 10000))
+ return true;
}
return false;
@@ -308,13 +305,8 @@ public class GregtechMetaTileEntity_IndustrialMultiMachine
}
@Override
- public boolean checkRecipeGeneric(
- ItemStack[] aItemInputs,
- FluidStack[] aFluidInputs,
- int aMaxParallelRecipes,
- long aEUPercent,
- int aSpeedBonusPercent,
- int aOutputChanceRoll) {
+ public boolean checkRecipeGeneric(ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes,
+ long aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll) {
// Based on the Processing Array. A bit overkill, but very flexible.
@@ -353,14 +345,9 @@ public class GregtechMetaTileEntity_IndustrialMultiMachine
return false;
}
- GT_ParallelHelper helper = new GT_ParallelHelper()
- .setRecipe(tRecipe)
- .setItemInputs(aItemInputs)
- .setFluidInputs(aFluidInputs)
- .setAvailableEUt(tEnergy)
- .setMaxParallel(aMaxParallelRecipes)
- .enableConsumption()
- .enableOutputCalculation();
+ GT_ParallelHelper helper = new GT_ParallelHelper().setRecipe(tRecipe).setItemInputs(aItemInputs)
+ .setFluidInputs(aFluidInputs).setAvailableEUt(tEnergy).setMaxParallel(aMaxParallelRecipes)
+ .enableConsumption().enableOutputCalculation();
if (!mVoidExcess) {
helper.enableVoidProtection(this);
}
@@ -378,14 +365,10 @@ public class GregtechMetaTileEntity_IndustrialMultiMachine
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
- GT_OverclockCalculator calculator = new GT_OverclockCalculator()
- .setRecipeEUt(tRecipe.mEUt)
- .setEUt(tEnergy)
- .setDuration(tRecipe.mDuration)
- .setEUtDiscount(aEUPercent / 100.0f)
+ GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(tRecipe.mEUt).setEUt(tEnergy)
+ .setDuration(tRecipe.mDuration).setEUtDiscount(aEUPercent / 100.0f)
.setSpeedBoost(100.0f / (100.0f + aSpeedBonusPercent))
- .setParallel(Math.min(aMaxParallelRecipes, helper.getCurrentParallel()))
- .calculate();
+ .setParallel(Math.min(aMaxParallelRecipes, helper.getCurrentParallel())).calculate();
lEUt = -calculator.getConsumption();
mMaxProgresstime = (int) Math.ceil(calculator.getDuration() * helper.getDurationMultiplier());
@@ -405,8 +388,8 @@ public class GregtechMetaTileEntity_IndustrialMultiMachine
} else {
mInternalMode = 0;
}
- String mModeString =
- (mInternalMode == 0 ? "Metal" : mInternalMode == 1 ? "Fluid" : mInternalMode == 2 ? "Misc." : "null");
+ String mModeString = (mInternalMode == 0 ? "Metal"
+ : mInternalMode == 1 ? "Fluid" : mInternalMode == 2 ? "Misc." : "null");
PlayerUtils.messagePlayer(aPlayer, "Multi-Machine is now in " + mModeString + " mode.");
mLastRecipe = null;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java
index 86a9c517a0..6c63b25833 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java
@@ -6,10 +6,18 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.util.ArrayList;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -24,15 +32,9 @@ import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.ArrayList;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.fluids.FluidStack;
-public class GregtechMetaTileEntity_IndustrialPlatePress
- extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialPlatePress>
- implements ISurvivalConstructable {
+public class GregtechMetaTileEntity_IndustrialPlatePress extends
+ GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialPlatePress> implements ISurvivalConstructable {
private boolean mFormingMode = false;
private int mCasing;
@@ -59,22 +61,14 @@ public class GregtechMetaTileEntity_IndustrialPlatePress
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for Advanced Bending & Forming")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for Advanced Bending & Forming")
.addInfo("500% faster than using single block machines of the same voltage")
- .addInfo("Processes four items per voltage tier")
- .addInfo("Circuit for recipe goes in the Input Bus")
+ .addInfo("Processes four items per voltage tier").addInfo("Circuit for recipe goes in the Input Bus")
.addInfo("Each Input Bus can have a different Circuit/Shape!")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 3, 3, true)
- .addController("Front Center")
- .addCasingInfo("Material Press Machine Casings", 10)
- .addInputBus("Any Casing", 1)
- .addOutputBus("Any Casing", 1)
- .addEnergyHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
- .addMufflerHatch("Any Casing", 1)
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 3, true)
+ .addController("Front Center").addCasingInfo("Material Press Machine Casings", 10)
+ .addInputBus("Any Casing", 1).addOutputBus("Any Casing", 1).addEnergyHatch("Any Casing", 1)
+ .addMaintenanceHatch("Any Casing", 1).addMufflerHatch("Any Casing", 1)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -83,17 +77,15 @@ public class GregtechMetaTileEntity_IndustrialPlatePress
public IStructureDefinition<GregtechMetaTileEntity_IndustrialPlatePress> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialPlatePress>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC"},
- {"C~C", "C-C", "CCC"},
- {"CCC", "CCC", "CCC"},
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC" }, { "C~C", "C-C", "CCC" },
+ { "CCC", "CCC", "CCC" }, }))
.addElement(
'C',
buildHatchAdder(GregtechMetaTileEntity_IndustrialPlatePress.class)
- .atLeast(InputBus, OutputBus, Maintenance, Energy, Muffler)
- .casingIndex(50)
- .dot(1)
+ .atLeast(InputBus, OutputBus, Maintenance, Energy, Muffler).casingIndex(50).dot(1)
.buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasingsMisc, 4))))
.build();
@@ -161,7 +153,8 @@ public class GregtechMetaTileEntity_IndustrialPlatePress
(4 * GT_Utility.getTier(this.getMaxInputVoltage())),
100,
500,
- 10000)) return true;
+ 10000))
+ return true;
}
return false;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSifter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSifter.java
index 3a7fc25f11..672ac578f7 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSifter.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSifter.java
@@ -6,10 +6,16 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.util.Random;
+
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.common.util.ForgeDirection;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.enums.TAE;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -21,9 +27,6 @@ import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.Random;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.common.util.ForgeDirection;
public class GregtechMetaTileEntity_IndustrialSifter
extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialSifter> implements ISurvivalConstructable {
@@ -52,25 +55,14 @@ public class GregtechMetaTileEntity_IndustrialSifter
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Industrial Sifter")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Industrial Sifter")
.addInfo("400% faster than single-block machines of the same voltage")
- .addInfo("Only uses 75% of the EU/t normally required")
- .addInfo("Processes four items per voltage tier")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(5, 3, 5, false)
- .addController("Bottom Center")
- .addCasingInfo("Sieve Grate", 18)
- .addCasingInfo("Sieve Casings", 35)
- .addInputBus("Any Casing", 1)
- .addOutputBus("Any Casing (x4)", 1)
- .addInputHatch("Any Casing", 1)
- .addOutputHatch("Any Casing", 1)
- .addEnergyHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
- .addMufflerHatch("Any Casing", 1)
- .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ .addInfo("Only uses 75% of the EU/t normally required").addInfo("Processes four items per voltage tier")
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(5, 3, 5, false)
+ .addController("Bottom Center").addCasingInfo("Sieve Grate", 18).addCasingInfo("Sieve Casings", 35)
+ .addInputBus("Any Casing", 1).addOutputBus("Any Casing (x4)", 1).addInputHatch("Any Casing", 1)
+ .addOutputHatch("Any Casing", 1).addEnergyHatch("Any Casing", 1).addMaintenanceHatch("Any Casing", 1)
+ .addMufflerHatch("Any Casing", 1).toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -78,21 +70,19 @@ public class GregtechMetaTileEntity_IndustrialSifter
public IStructureDefinition<GregtechMetaTileEntity_IndustrialSifter> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialSifter>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCCCC", "CMMMC", "CMMMC", "CMMMC", "CCCCC"},
- {"CCCCC", "CMMMC", "CMMMC", "CMMMC", "CCCCC"},
- {"CC~CC", "CCCCC", "CCCCC", "CCCCC", "CCCCC"},
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCCCC", "CMMMC", "CMMMC", "CMMMC", "CCCCC" },
+ { "CCCCC", "CMMMC", "CMMMC", "CMMMC", "CCCCC" },
+ { "CC~CC", "CCCCC", "CCCCC", "CCCCC", "CCCCC" }, }))
.addElement(
'C',
buildHatchAdder(GregtechMetaTileEntity_IndustrialSifter.class)
.atLeast(InputBus, OutputBus, Maintenance, Energy, Muffler, InputHatch, OutputHatch)
- .casingIndex(TAE.GTPP_INDEX(21))
- .dot(1)
- .buildAndChain(
+ .casingIndex(TAE.GTPP_INDEX(21)).dot(1).buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings2Misc, 5))))
- .addElement('M', ofBlock(ModBlocks.blockCasings2Misc, 6))
- .build();
+ .addElement('M', ofBlock(ModBlocks.blockCasings2Misc, 6)).build();
}
return STRUCTURE_DEFINITION;
}
@@ -137,8 +127,7 @@ public class GregtechMetaTileEntity_IndustrialSifter
@Override
public void onPreTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
super.onPreTick(aBaseMetaTileEntity, aTick);
- if ((aBaseMetaTileEntity.isClientSide())
- && (aBaseMetaTileEntity.isActive())
+ if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive())
&& (aBaseMetaTileEntity.getFrontFacing() != 1)
&& (aBaseMetaTileEntity.getCoverIDAtSide((byte) 1) == 0)
&& (!aBaseMetaTileEntity.getOpacityAtSide((byte) 1))) {
@@ -148,16 +137,14 @@ public class GregtechMetaTileEntity_IndustrialSifter
final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 2;
final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 2;
- aBaseMetaTileEntity
- .getWorld()
- .spawnParticle(
- "smoke",
- (aBaseMetaTileEntity.getXCoord() + xDir + 2.1F) - (tRandom.nextFloat() * 3.2F),
- aBaseMetaTileEntity.getYCoord() + 2.5f + (tRandom.nextFloat() * 1.2F),
- (aBaseMetaTileEntity.getZCoord() + zDir + 2.1F) - (tRandom.nextFloat() * 3.2F),
- 0.0,
- 0.0,
- 0.0);
+ aBaseMetaTileEntity.getWorld().spawnParticle(
+ "smoke",
+ (aBaseMetaTileEntity.getXCoord() + xDir + 2.1F) - (tRandom.nextFloat() * 3.2F),
+ aBaseMetaTileEntity.getYCoord() + 2.5f + (tRandom.nextFloat() * 1.2F),
+ (aBaseMetaTileEntity.getZCoord() + zDir + 2.1F) - (tRandom.nextFloat() * 3.2F),
+ 0.0,
+ 0.0,
+ 0.0);
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSinter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSinter.java
index 95672d5e48..5ff238a1f8 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSinter.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSinter.java
@@ -1,239 +1,92 @@
/*
-package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing;
-
-
-public class GregtechMetaTileEntity_IndustrialSinter
-extends GT_MetaTileEntity_MultiBlockBase {
-
-
- RenderBlocks asdasd = RenderBlocks.getInstance();
-
- public GregtechMetaTileEntity_IndustrialSinter(final int aID, final String aName, final String aNameRegional) {
- super(aID, aName, aNameRegional);
- }
-
- public GregtechMetaTileEntity_IndustrialSinter(final String aName) {
- super(aName);
- }
-
- @Override
- public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntity_IndustrialSinter(this.mName);
- }
-
- @Override
- public String[] getDescription() {
- return new String[]{
- "Controller Block for the Industrial Sinter Furnace",
- "Size: 3x5x3 [WxLxH] (Hollow)", "Controller (front centered)",
- "2x Input Bus (side centered)",
- "2x Output Bus (side centered)",
- "1x Energy Hatch (top or bottom centered)",
- "1x Maintenance Hatch (back centered)",
- "Sinter Furnace Casings for the rest (32 at least!)",
- "Causes " + 20 * this.getPollutionPerTick(null) + " Pollution per second",
- CORE.GT_Tooltip
- };
- }
-
- @Override
- public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
- if (aSide == aFacing) {
- return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(7)), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)};
- }
- return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(7))};
- }
-
- @Override
- public GT_Recipe.GT_Recipe_Map getRecipeMap() {
- return GT_Recipe.GT_Recipe_Map.sWiremillRecipes;
- }
-
- @Override
- public boolean isCorrectMachinePart(final ItemStack aStack) {
- return true;
- }
-
- @Override
- public boolean isFacingValid(final byte aFacing) {
- return aFacing > 1;
- }
-
- @Override
- public boolean checkRecipe(final ItemStack aStack) {
- final ArrayList<ItemStack> tInputList = this.getStoredInputs();
- for (final ItemStack tInput : tInputList) {
- final long tVoltage = this.getMaxInputVoltage();
- final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
-
- final GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sWiremillRecipes.findRecipe(this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], null, new ItemStack[]{tInput});
- if (tRecipe != null) {
- if (tRecipe.isRecipeInputEqual(true, null, new ItemStack[]{tInput})) {
- this.mEfficiency = (10000 - ((this.getIdealStatus() - this.getRepairStatus()) * 1000));
- this.mEfficiencyIncrease = 10000;
- if (tRecipe.mEUt <= 16) {
- this.mEUt = (tRecipe.mEUt * (1 << (tTier - 1)) * (1 << (tTier - 1)));
- this.mMaxProgresstime = (tRecipe.mDuration / (1 << (tTier - 1)));
- } else {
- this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = tRecipe.mDuration;
- while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
- this.mEUt *= 4;
- this.mMaxProgresstime /= 2;
- }
- }
- if (this.mEUt > 0) {
- this.mEUt = (-this.mEUt);
- }
- this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
- this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)};
- this.updateSlots();
- return true;
- }
- }
- }
- return false;
- }
-
- @Override
- public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
- final int controllerX = aBaseMetaTileEntity.getXCoord();
- final int controllerY = aBaseMetaTileEntity.getYCoord();
- final int controllerZ = aBaseMetaTileEntity.getZCoord();
-
- final byte tSide = this.getBaseMetaTileEntity().getBackFacing();
- if ((this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 1)) && (this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 2) && (this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 3)))) {
- int tAirCount = 0;
- for (byte i = -1; i < 2; i = (byte) (i + 1)) {
- for (byte j = -1; j < 2; j = (byte) (j + 1)) {
- for (byte k = -1; k < 2; k = (byte) (k + 1)) {
- if (this.getBaseMetaTileEntity().getAirOffset(i, j, k)) {
- Logger.INFO("Found Air at: "+(controllerX+i)+" "+(controllerY+k)+" "+(controllerZ+k));
- //if (aBaseMetaTileEntity.getWorld().isRemote){
- //asdasd.renderStandardBlock(ModBlocks.MatterFabricatorEffectBlock, (controllerX+i), (controllerY+k), (controllerZ+k));
- //UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY+k), (controllerZ+k), Color.YELLOW_GREEN);
- //}
- tAirCount++;
- }
- }
- }
- }
- if (tAirCount != 10) {
- Logger.INFO("False. Air != 10. Air == "+tAirCount);
- //return false;
- }
- for (byte i = 2; i < 6; i = (byte) (i + 1)) {
- //UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY), (controllerZ), Color.LIME_GREEN);
- IGregTechTileEntity tTileEntity;
- if ((null != (tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(i, 2))) &&
- (tTileEntity.getFrontFacing() == this.getBaseMetaTileEntity().getFrontFacing()) && (tTileEntity.getMetaTileEntity() != null) &&
- ((tTileEntity.getMetaTileEntity() instanceof GregtechMetaTileEntity_IndustrialSinter))) {
- //Utils.LOG_INFO("False 1");
- return false;
- }
- }
- final int tX = this.getBaseMetaTileEntity().getXCoord();
- final int tY = this.getBaseMetaTileEntity().getYCoord();
- final int tZ = this.getBaseMetaTileEntity().getZCoord();
- for (byte i = -1; i < 2; i = (byte) (i + 1)) {
- for (byte j = -1; j < 2; j = (byte) (j + 1)) {
- if ((i != 0) || (j != 0)) {
- for (byte k = 0; k < 5; k = (byte) (k + 1)) {
- //UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY+k), (controllerZ+k), Color.ORANGE);
- if (((i == 0) || (j == 0)) && ((k == 1) || (k == 2) || (k == 3))) {
- //UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY+k), (controllerZ+k), Color.TOMATO);
- if ((this.getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingBlock()) && (this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingMeta())) {
- }
- else if (!this.addToMachineList(this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))) && (!this.addEnergyInputToMachineList(this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))))) {
- Logger.INFO("False 2");
- return false;
- }
- }
- else if ((this.getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingBlock()) && (this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingMeta())) {
- }
- else {
- Logger.INFO("False 3");
- return false;
- }
- }
- }
- }
- }
- if ((this.mOutputHatches.size() != 0) || (this.mInputHatches.size() != 0)) {
- Logger.INFO("Use Busses, Not Hatches for Input/Output.");
- return false;
- }
- if ((this.mInputBusses.size() != 2) || (this.mOutputBusses.size() != 2)) {
- Logger.INFO("Incorrect amount of Input & Output busses.");
- return false;
- }
- this.mMaintenanceHatches.clear();
- final IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4);
- if ((tTileEntity != null) && (tTileEntity.getMetaTileEntity() != null)) {
- if ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Maintenance)) {
- this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) tTileEntity.getMetaTileEntity());
- ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock = this.getCasingTextureIndex();
- } else {
- Logger.INFO("Maintenance hatch must be in the middle block on the back.");
- return false;
- }
- }
- if ((this.mMaintenanceHatches.size() != 1) || (this.mEnergyHatches.size() != 1)) {
- Logger.INFO("Incorrect amount of Maintenance or Energy hatches.");
- return false;
- }
- } else {
- Logger.INFO("False 5");
- return false;
- }
- Logger.INFO("True");
- return true;
- }
-
- @Override
- public int getMaxEfficiency(final ItemStack aStack) {
- return 10000;
- }
-
- @Override
- public int getPollutionPerTick(final ItemStack aStack) {
- return 0;
- }
-
- @Override
- public int getDamageToComponent(final ItemStack aStack) {
- return 0;
- }
-
- public int getAmountOfOutputs() {
- return 1;
- }
-
- @Override
- public boolean explodesOnComponentBreak(final ItemStack aStack) {
- return false;
- }
-
- public Block getCasingBlock() {
- return ModBlocks.blockCasingsMisc;
- }
-
-
- public byte getCasingMeta() {
- return 6;
- }
-
-
- public byte getCasingTextureIndex() {
- return 1; //TODO
- }
-
- private boolean addToMachineList(final IGregTechTileEntity tTileEntity) {
- return ((this.addMaintenanceToMachineList(tTileEntity, this.getCasingTextureIndex())) || (this.addInputToMachineList(tTileEntity, this.getCasingTextureIndex())) || (this.addOutputToMachineList(tTileEntity, this.getCasingTextureIndex())) || (this.addMufflerToMachineList(tTileEntity, this.getCasingTextureIndex())));
- }
-
- private boolean addEnergyInputToMachineList(final IGregTechTileEntity tTileEntity) {
- return ((this.addEnergyInputToMachineList(tTileEntity, this.getCasingTextureIndex())));
- }
-}
-*/
+ * package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; public class
+ * GregtechMetaTileEntity_IndustrialSinter extends GT_MetaTileEntity_MultiBlockBase { RenderBlocks asdasd =
+ * RenderBlocks.getInstance(); public GregtechMetaTileEntity_IndustrialSinter(final int aID, final String aName, final
+ * String aNameRegional) { super(aID, aName, aNameRegional); } public GregtechMetaTileEntity_IndustrialSinter(final
+ * String aName) { super(aName); }
+ * @Override public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { return new
+ * GregtechMetaTileEntity_IndustrialSinter(this.mName); }
+ * @Override public String[] getDescription() { return new String[]{
+ * "Controller Block for the Industrial Sinter Furnace", "Size: 3x5x3 [WxLxH] (Hollow)", "Controller (front centered)",
+ * "2x Input Bus (side centered)", "2x Output Bus (side centered)", "1x Energy Hatch (top or bottom centered)",
+ * "1x Maintenance Hatch (back centered)", "Sinter Furnace Casings for the rest (32 at least!)", "Causes " + 20 *
+ * this.getPollutionPerTick(null) + " Pollution per second", CORE.GT_Tooltip }; }
+ * @Override public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte
+ * aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { if (aSide == aFacing) { return new
+ * ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(7)), new GT_RenderedTexture(aActive ?
+ * TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)}; }
+ * return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(7))}; }
+ * @Override public GT_Recipe.GT_Recipe_Map getRecipeMap() { return GT_Recipe.GT_Recipe_Map.sWiremillRecipes; }
+ * @Override public boolean isCorrectMachinePart(final ItemStack aStack) { return true; }
+ * @Override public boolean isFacingValid(final byte aFacing) { return aFacing > 1; }
+ * @Override public boolean checkRecipe(final ItemStack aStack) { final ArrayList<ItemStack> tInputList =
+ * this.getStoredInputs(); for (final ItemStack tInput : tInputList) { final long tVoltage = this.getMaxInputVoltage();
+ * final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); final GT_Recipe tRecipe =
+ * GT_Recipe.GT_Recipe_Map.sWiremillRecipes.findRecipe(this.getBaseMetaTileEntity(), false,
+ * gregtech.api.enums.GT_Values.V[tTier], null, new ItemStack[]{tInput}); if (tRecipe != null) { if
+ * (tRecipe.isRecipeInputEqual(true, null, new ItemStack[]{tInput})) { this.mEfficiency = (10000 -
+ * ((this.getIdealStatus() - this.getRepairStatus()) * 1000)); this.mEfficiencyIncrease = 10000; if (tRecipe.mEUt <= 16)
+ * { this.mEUt = (tRecipe.mEUt * (1 << (tTier - 1)) * (1 << (tTier - 1))); this.mMaxProgresstime = (tRecipe.mDuration /
+ * (1 << (tTier - 1))); } else { this.mEUt = tRecipe.mEUt; this.mMaxProgresstime = tRecipe.mDuration; while (this.mEUt
+ * <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { this.mEUt *= 4; this.mMaxProgresstime /= 2; } } if (this.mEUt > 0)
+ * { this.mEUt = (-this.mEUt); } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); this.mOutputItems = new
+ * ItemStack[]{tRecipe.getOutput(0)}; this.updateSlots(); return true; } } } return false; }
+ * @Override public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { final
+ * int controllerX = aBaseMetaTileEntity.getXCoord(); final int controllerY = aBaseMetaTileEntity.getYCoord(); final int
+ * controllerZ = aBaseMetaTileEntity.getZCoord(); final byte tSide = this.getBaseMetaTileEntity().getBackFacing(); if
+ * ((this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 1)) &&
+ * (this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 2) &&
+ * (this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 3)))) { int
+ * tAirCount = 0; for (byte i = -1; i < 2; i = (byte) (i + 1)) { for (byte j = -1; j < 2; j = (byte) (j + 1)) { for
+ * (byte k = -1; k < 2; k = (byte) (k + 1)) { if (this.getBaseMetaTileEntity().getAirOffset(i, j, k)) {
+ * Logger.INFO("Found Air at: "+(controllerX+i)+" "+(controllerY+k)+" "+(controllerZ+k)); //if
+ * (aBaseMetaTileEntity.getWorld().isRemote){ //asdasd.renderStandardBlock(ModBlocks.MatterFabricatorEffectBlock,
+ * (controllerX+i), (controllerY+k), (controllerZ+k)); //UtilsRendering.drawBlockInWorld((controllerX+i),
+ * (controllerY+k), (controllerZ+k), Color.YELLOW_GREEN); //} tAirCount++; } } } } if (tAirCount != 10) {
+ * Logger.INFO("False. Air != 10. Air == "+tAirCount); //return false; } for (byte i = 2; i < 6; i = (byte) (i + 1)) {
+ * //UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY), (controllerZ), Color.LIME_GREEN);
+ * IGregTechTileEntity tTileEntity; if ((null != (tTileEntity =
+ * this.getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(i, 2))) && (tTileEntity.getFrontFacing() ==
+ * this.getBaseMetaTileEntity().getFrontFacing()) && (tTileEntity.getMetaTileEntity() != null) &&
+ * ((tTileEntity.getMetaTileEntity() instanceof GregtechMetaTileEntity_IndustrialSinter))) {
+ * //Utils.LOG_INFO("False 1"); return false; } } final int tX = this.getBaseMetaTileEntity().getXCoord(); final int tY
+ * = this.getBaseMetaTileEntity().getYCoord(); final int tZ = this.getBaseMetaTileEntity().getZCoord(); for (byte i =
+ * -1; i < 2; i = (byte) (i + 1)) { for (byte j = -1; j < 2; j = (byte) (j + 1)) { if ((i != 0) || (j != 0)) { for (byte
+ * k = 0; k < 5; k = (byte) (k + 1)) { //UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY+k),
+ * (controllerZ+k), Color.ORANGE); if (((i == 0) || (j == 0)) && ((k == 1) || (k == 2) || (k == 3))) {
+ * //UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY+k), (controllerZ+k), Color.TOMATO); if
+ * ((this.getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k :
+ * tSide == 3 ? k : i)) == this.getCasingBlock()) && (this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k :
+ * tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingMeta())) { } else if
+ * (!this.addToMachineList(this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k :
+ * i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))) &&
+ * (!this.addEnergyInputToMachineList(this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide
+ * == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))))) { Logger.INFO("False 2"); return false; } }
+ * else if ((this.getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2
+ * ? -k : tSide == 3 ? k : i)) == this.getCasingBlock()) && (this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k
+ * : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingMeta())) { } else {
+ * Logger.INFO("False 3"); return false; } } } } } if ((this.mOutputHatches.size() != 0) || (this.mInputHatches.size()
+ * != 0)) { Logger.INFO("Use Busses, Not Hatches for Input/Output."); return false; } if ((this.mInputBusses.size() !=
+ * 2) || (this.mOutputBusses.size() != 2)) { Logger.INFO("Incorrect amount of Input & Output busses."); return false; }
+ * this.mMaintenanceHatches.clear(); final IGregTechTileEntity tTileEntity =
+ * this.getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(),
+ * 4); if ((tTileEntity != null) && (tTileEntity.getMetaTileEntity() != null)) { if ((tTileEntity.getMetaTileEntity()
+ * instanceof GT_MetaTileEntity_Hatch_Maintenance)) { this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)
+ * tTileEntity.getMetaTileEntity()); ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock =
+ * this.getCasingTextureIndex(); } else { Logger.INFO("Maintenance hatch must be in the middle block on the back.");
+ * return false; } } if ((this.mMaintenanceHatches.size() != 1) || (this.mEnergyHatches.size() != 1)) {
+ * Logger.INFO("Incorrect amount of Maintenance or Energy hatches."); return false; } } else { Logger.INFO("False 5");
+ * return false; } Logger.INFO("True"); return true; }
+ * @Override public int getMaxEfficiency(final ItemStack aStack) { return 10000; }
+ * @Override public int getPollutionPerTick(final ItemStack aStack) { return 0; }
+ * @Override public int getDamageToComponent(final ItemStack aStack) { return 0; } public int getAmountOfOutputs() {
+ * return 1; }
+ * @Override public boolean explodesOnComponentBreak(final ItemStack aStack) { return false; } public Block
+ * getCasingBlock() { return ModBlocks.blockCasingsMisc; } public byte getCasingMeta() { return 6; } public byte
+ * getCasingTextureIndex() { return 1; //TODO } private boolean addToMachineList(final IGregTechTileEntity tTileEntity)
+ * { return ((this.addMaintenanceToMachineList(tTileEntity, this.getCasingTextureIndex())) ||
+ * (this.addInputToMachineList(tTileEntity, this.getCasingTextureIndex())) || (this.addOutputToMachineList(tTileEntity,
+ * this.getCasingTextureIndex())) || (this.addMufflerToMachineList(tTileEntity, this.getCasingTextureIndex()))); }
+ * private boolean addEnergyInputToMachineList(final IGregTechTileEntity tTileEntity) { return
+ * ((this.addEnergyInputToMachineList(tTileEntity, this.getCasingTextureIndex()))); } }
+ */
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java
index 6359679149..35116fbb13 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java
@@ -7,10 +7,14 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.TAE;
import gregtech.api.interfaces.IIconContainer;
@@ -23,8 +27,6 @@ import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
public class GregtechMetaTileEntity_IndustrialThermalCentrifuge
extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialThermalCentrifuge>
@@ -33,8 +35,8 @@ public class GregtechMetaTileEntity_IndustrialThermalCentrifuge
private int mCasing;
private static IStructureDefinition<GregtechMetaTileEntity_IndustrialThermalCentrifuge> STRUCTURE_DEFINITION = null;
- public GregtechMetaTileEntity_IndustrialThermalCentrifuge(
- final int aID, final String aName, final String aNameRegional) {
+ public GregtechMetaTileEntity_IndustrialThermalCentrifuge(final int aID, final String aName,
+ final String aNameRegional) {
super(aID, aName, aNameRegional);
}
@@ -55,21 +57,14 @@ public class GregtechMetaTileEntity_IndustrialThermalCentrifuge
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Industrial Thermal Centrifuge")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Industrial Thermal Centrifuge")
.addInfo("150% faster than using single block machines of the same voltage")
.addInfo("Only uses 80% of the EU/t normally required")
- .addInfo("Processes eight items per voltage tier")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 2, 3, false)
- .addController("Front Center")
- .addCasingInfo("Thermal Processing Casings/Noise Hazard Sign Blocks", 8)
- .addInputBus("Bottom Casing", 1)
- .addOutputBus("Bottom Casing", 1)
- .addEnergyHatch("Bottom Casing", 1)
- .addMaintenanceHatch("Bottom Casing", 1)
- .addMufflerHatch("Bottom Casing", 1)
+ .addInfo("Processes eight items per voltage tier").addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator().beginStructureBlock(3, 2, 3, false).addController("Front Center")
+ .addCasingInfo("Thermal Processing Casings/Noise Hazard Sign Blocks", 8).addInputBus("Bottom Casing", 1)
+ .addOutputBus("Bottom Casing", 1).addEnergyHatch("Bottom Casing", 1)
+ .addMaintenanceHatch("Bottom Casing", 1).addMufflerHatch("Bottom Casing", 1)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -78,18 +73,13 @@ public class GregtechMetaTileEntity_IndustrialThermalCentrifuge
public IStructureDefinition<GregtechMetaTileEntity_IndustrialThermalCentrifuge> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialThermalCentrifuge>builder()
- .addShape(mName, transpose(new String[][] {
- {"X~X", "XXX", "XXX"},
- {"CCC", "CCC", "CCC"},
- }))
+ .addShape(mName, transpose(new String[][] { { "X~X", "XXX", "XXX" }, { "CCC", "CCC", "CCC" }, }))
.addElement(
'C',
ofChain(
buildHatchAdder(GregtechMetaTileEntity_IndustrialThermalCentrifuge.class)
.atLeast(InputBus, OutputBus, Maintenance, Energy, Muffler)
- .casingIndex(getCasingTextureIndex())
- .dot(1)
- .build(),
+ .casingIndex(getCasingTextureIndex()).dot(1).build(),
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings2Misc, 0)),
onElementPass(x -> ++x.mCasing, ofBlock(GregTech_API.sBlockCasings3, 9))))
.addElement(
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java
index ecd1f2403c..c123d449e2 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java
@@ -7,10 +7,16 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.util.ArrayList;
+
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.enums.TAE;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -24,13 +30,9 @@ import gtPlusPlus.core.util.minecraft.FluidUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GT_MetaTileEntity_Hatch_CustomFluidBase;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.ArrayList;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
-public class GregtechMetaTileEntity_IndustrialVacuumFreezer
- extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialVacuumFreezer>
- implements ISurvivalConstructable {
+public class GregtechMetaTileEntity_IndustrialVacuumFreezer extends
+ GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialVacuumFreezer> implements ISurvivalConstructable {
public static int CASING_TEXTURE_ID;
public static String mCryoFuelName = "Gelid Cryotheum";
@@ -42,8 +44,8 @@ public class GregtechMetaTileEntity_IndustrialVacuumFreezer
private final ArrayList<GT_MetaTileEntity_Hatch_CustomFluidBase> mCryotheumHatches = new ArrayList<>();
- public GregtechMetaTileEntity_IndustrialVacuumFreezer(
- final int aID, final String aName, final String aNameRegional) {
+ public GregtechMetaTileEntity_IndustrialVacuumFreezer(final int aID, final String aName,
+ final String aNameRegional) {
super(aID, aName, aNameRegional);
mFuelStack = FluidUtils.getFluidStack("cryotheum", 1);
CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 10);
@@ -67,25 +69,15 @@ public class GregtechMetaTileEntity_IndustrialVacuumFreezer
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Factory Grade Advanced Vacuum Freezer")
+ tt.addMachineType(getMachineType()).addInfo("Factory Grade Advanced Vacuum Freezer")
.addInfo("Speed: +100% | EU Usage: 100% | Parallel: 4")
.addInfo("Consumes 1L of " + mCryoFuelName + "/t during operation")
.addInfo("Constructed exactly the same as a normal Vacuum Freezer")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 3, 3, true)
- .addController("Front Center")
- .addCasingInfo(mCasingName, 10)
- .addStructureHint(mHatchName, 1)
- .addInputBus("Any Casing", 1)
- .addOutputBus("Any Casing", 1)
- .addInputHatch("Any Casing", 1)
- .addOutputHatch("Any Casing", 1)
- .addEnergyHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
- .addMufflerHatch("Any Casing", 1)
- .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 3, true)
+ .addController("Front Center").addCasingInfo(mCasingName, 10).addStructureHint(mHatchName, 1)
+ .addInputBus("Any Casing", 1).addOutputBus("Any Casing", 1).addInputHatch("Any Casing", 1)
+ .addOutputHatch("Any Casing", 1).addEnergyHatch("Any Casing", 1).addMaintenanceHatch("Any Casing", 1)
+ .addMufflerHatch("Any Casing", 1).toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -93,33 +85,26 @@ public class GregtechMetaTileEntity_IndustrialVacuumFreezer
public IStructureDefinition<GregtechMetaTileEntity_IndustrialVacuumFreezer> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialVacuumFreezer>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC"},
- {"C~C", "C-C", "CCC"},
- {"CCC", "CCC", "CCC"},
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC" }, { "C~C", "C-C", "CCC" },
+ { "CCC", "CCC", "CCC" }, }))
.addElement(
'C',
ofChain(
buildHatchAdder(GregtechMetaTileEntity_IndustrialVacuumFreezer.class)
.adder(GregtechMetaTileEntity_IndustrialVacuumFreezer::addCryotheumHatch)
- .hatchId(967)
- .shouldReject(t -> !t.mCryotheumHatches.isEmpty())
- .casingIndex(CASING_TEXTURE_ID)
- .dot(1)
- .build(),
- buildHatchAdder(GregtechMetaTileEntity_IndustrialVacuumFreezer.class)
- .atLeast(
- InputBus,
- OutputBus,
- Maintenance,
- Energy,
- Muffler,
- InputHatch,
- OutputHatch)
- .casingIndex(CASING_TEXTURE_ID)
- .dot(1)
- .build(),
+ .hatchId(967).shouldReject(t -> !t.mCryotheumHatches.isEmpty())
+ .casingIndex(CASING_TEXTURE_ID).dot(1).build(),
+ buildHatchAdder(GregtechMetaTileEntity_IndustrialVacuumFreezer.class).atLeast(
+ InputBus,
+ OutputBus,
+ Maintenance,
+ Energy,
+ Muffler,
+ InputHatch,
+ OutputHatch).casingIndex(CASING_TEXTURE_ID).dot(1).build(),
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings3Misc, 10))))
.build();
}
@@ -226,11 +211,10 @@ public class GregtechMetaTileEntity_IndustrialVacuumFreezer
@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- /*if (this.getBaseMetaTileEntity().isActive()) {
- if (!this.depleteInput(mFuelStack.copy())) {
- this.getBaseMetaTileEntity().setActive(false);
- }
- } */
+ /*
+ * if (this.getBaseMetaTileEntity().isActive()) { if (!this.depleteInput(mFuelStack.copy())) {
+ * this.getBaseMetaTileEntity().setActive(false); } }
+ */
super.onPostTick(aBaseMetaTileEntity, aTick);
if (this.mStartUpCheck < 0) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java
index f8094e6086..4192515346 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java
@@ -4,11 +4,20 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits;
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.enums.TAE;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -26,17 +35,9 @@ import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.Gregtech
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import ic2.core.init.BlocksItems;
import ic2.core.init.InternalName;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.FluidStack;
-public class GregtechMetaTileEntity_IndustrialWashPlant
- extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialWashPlant>
- implements ISurvivalConstructable {
+public class GregtechMetaTileEntity_IndustrialWashPlant extends
+ GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialWashPlant> implements ISurvivalConstructable {
private int mMode = 0;
private int mCasing;
@@ -63,26 +64,16 @@ public class GregtechMetaTileEntity_IndustrialWashPlant
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Industrial Wash Plant")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Industrial Wash Plant")
.addInfo("Can be configured with a screwdriver to also do Simple Washer and process Chemical Bathing")
.addInfo("400% faster than using single block machines of the same voltage")
.addInfo("Processes four item per voltage tier")
.addInfo("Always requires an Input Hatch full of water to refill structure")
- .addInfo("Need to be filled with water.")
- .addInfo("Will automatically fill water from input hatch.")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(5, 3, 7, true)
- .addController("Front Center")
- .addCasingInfo("Wash Plant Casings", 40)
- .addInputBus("Any Casing", 1)
- .addOutputBus("Any Casing", 1)
- .addInputHatch("Any Casing", 1)
- .addOutputHatch("Any Casing", 1)
- .addEnergyHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
- .addMufflerHatch("Any Casing", 1)
+ .addInfo("Need to be filled with water.").addInfo("Will automatically fill water from input hatch.")
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(5, 3, 7, true)
+ .addController("Front Center").addCasingInfo("Wash Plant Casings", 40).addInputBus("Any Casing", 1)
+ .addOutputBus("Any Casing", 1).addInputHatch("Any Casing", 1).addOutputHatch("Any Casing", 1)
+ .addEnergyHatch("Any Casing", 1).addMaintenanceHatch("Any Casing", 1).addMufflerHatch("Any Casing", 1)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -91,21 +82,23 @@ public class GregtechMetaTileEntity_IndustrialWashPlant
public IStructureDefinition<GregtechMetaTileEntity_IndustrialWashPlant> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialWashPlant>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCCCC", "CwwwC", "CwwwC", "CwwwC", "CwwwC", "CwwwC", "CCCCC"},
- {"CC~CC", "CwwwC", "CwwwC", "CwwwC", "CwwwC", "CwwwC", "CCCCC"},
- {"CCCCC", "CCCCC", "CCCCC", "CCCCC", "CCCCC", "CCCCC", "CCCCC"},
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCCCC", "CwwwC", "CwwwC", "CwwwC", "CwwwC", "CwwwC", "CCCCC" },
+ { "CC~CC", "CwwwC", "CwwwC", "CwwwC", "CwwwC", "CwwwC", "CCCCC" },
+ { "CCCCC", "CCCCC", "CCCCC", "CCCCC", "CCCCC", "CCCCC", "CCCCC" }, }))
.addElement(
'C',
buildHatchAdder(GregtechMetaTileEntity_IndustrialWashPlant.class)
.atLeast(InputBus, InputHatch, OutputHatch, OutputBus, Maintenance, Energy, Muffler)
- .casingIndex(getCasingTextureIndex())
- .dot(1)
- .buildAndChain(onElementPass(
- x -> ++x.mCasing, ofBlock(getCasingBlock(), getCasingMeta()))))
+ .casingIndex(getCasingTextureIndex()).dot(1).buildAndChain(
+ onElementPass(
+ x -> ++x.mCasing,
+ ofBlock(getCasingBlock(), getCasingMeta()))))
.addElement(
- 'w', ofChain(isAir(), ofBlockAnyMeta(Blocks.water), ofBlockAnyMeta(Blocks.flowing_water)))
+ 'w',
+ ofChain(isAir(), ofBlockAnyMeta(Blocks.water), ofBlockAnyMeta(Blocks.flowing_water)))
.build();
}
return STRUCTURE_DEFINITION;
@@ -151,8 +144,7 @@ public class GregtechMetaTileEntity_IndustrialWashPlant
@Override
public GT_Recipe.GT_Recipe_Map getRecipeMap() {
- return mMode == 0
- ? GT_Recipe.GT_Recipe_Map.sOreWasherRecipes
+ return mMode == 0 ? GT_Recipe.GT_Recipe_Map.sOreWasherRecipes
: mMode == 1 ? GTPP_Recipe_Map.sSimpleWasherRecipes : GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes;
}
@@ -237,10 +229,10 @@ public class GregtechMetaTileEntity_IndustrialWashPlant
// if (aBaseMetaTileEntity.fac)
- final int xDir =
- ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * mCurrentDirectionX;
- final int zDir =
- ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * mCurrentDirectionZ;
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX
+ * mCurrentDirectionX;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ
+ * mCurrentDirectionZ;
int tAmount = 0;
for (int i = mOffsetX_Lower + 1; i <= mOffsetX_Upper - 1; ++i) {
@@ -262,13 +254,11 @@ public class GregtechMetaTileEntity_IndustrialWashPlant
if (tBlock == Blocks.water) {
fluidUsed = BlocksItems.getFluidBlock(InternalName.fluidDistilledWater);
}
- aBaseMetaTileEntity
- .getWorld()
- .setBlock(
- aBaseMetaTileEntity.getXCoord() + xDir + i,
- aBaseMetaTileEntity.getYCoord() + h,
- aBaseMetaTileEntity.getZCoord() + zDir + j,
- fluidUsed);
+ aBaseMetaTileEntity.getWorld().setBlock(
+ aBaseMetaTileEntity.getXCoord() + xDir + i,
+ aBaseMetaTileEntity.getYCoord() + h,
+ aBaseMetaTileEntity.getZCoord() + zDir + j,
+ fluidUsed);
}
}
}
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 044cdfc963..89bfff5367 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
@@ -6,10 +6,21 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.util.ArrayList;
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ChatComponentTranslation;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.TAE;
import gregtech.api.interfaces.IIconContainer;
@@ -23,18 +34,9 @@ import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.ArrayList;
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ChatComponentTranslation;
-import net.minecraftforge.fluids.FluidStack;
-public class GregtechMetaTileEntity_IndustrialWireMill
- extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialWireMill>
- implements ISurvivalConstructable {
+public class GregtechMetaTileEntity_IndustrialWireMill extends
+ GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialWireMill> implements ISurvivalConstructable {
private int mCasing;
private static IStructureDefinition<GregtechMetaTileEntity_IndustrialWireMill> STRUCTURE_DEFINITION = null;
@@ -61,42 +63,32 @@ public class GregtechMetaTileEntity_IndustrialWireMill
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Industrial Wire Factory")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Industrial Wire Factory")
.addInfo("200% faster than using single block machines of the same voltage")
- .addInfo("Only uses 75% of the EU/t normally required")
- .addInfo("Processes four items per voltage tier")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 3, 5, true)
- .addController("Front Center")
- .addCasingInfo("Wire Factory Casings", 20)
- .addInputBus("Any Casing", 1)
- .addOutputBus("Any Casing", 1)
- .addEnergyHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
- .addMufflerHatch("Any Casing", 1)
- .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ .addInfo("Only uses 75% of the EU/t normally required").addInfo("Processes four items per voltage tier")
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 5, true)
+ .addController("Front Center").addCasingInfo("Wire Factory Casings", 20).addInputBus("Any Casing", 1)
+ .addOutputBus("Any Casing", 1).addEnergyHatch("Any Casing", 1).addMaintenanceHatch("Any Casing", 1)
+ .addMufflerHatch("Any Casing", 1).toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@Override
public IStructureDefinition<GregtechMetaTileEntity_IndustrialWireMill> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
- STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialWireMill>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC", "CCC", "CCC"},
- {"C~C", "C-C", "C-C", "C-C", "CCC"},
- {"CCC", "CCC", "CCC", "CCC", "CCC"},
- }))
+ STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialWireMill>builder().addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC", "CCC", "CCC" },
+ { "C~C", "C-C", "C-C", "C-C", "CCC" }, { "CCC", "CCC", "CCC", "CCC", "CCC" }, }))
.addElement(
'C',
buildHatchAdder(GregtechMetaTileEntity_IndustrialWireMill.class)
.atLeast(InputBus, OutputBus, Maintenance, Energy, Muffler)
- .casingIndex(getCasingTextureIndex())
- .dot(1)
- .buildAndChain(onElementPass(
- x -> ++x.mCasing, ofBlock(getCasingBlock(), getCasingMeta()))))
+ .casingIndex(getCasingTextureIndex()).dot(1).buildAndChain(
+ onElementPass(
+ x -> ++x.mCasing,
+ ofBlock(getCasingBlock(), getCasingMeta()))))
.build();
}
return STRUCTURE_DEFINITION;
@@ -150,8 +142,8 @@ public class GregtechMetaTileEntity_IndustrialWireMill
}
@Override
- public boolean checkRecipeGeneric(
- int aMaxParallelRecipes, long aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll) {
+ public boolean checkRecipeGeneric(int aMaxParallelRecipes, long aEUPercent, int aSpeedBonusPercent,
+ int aOutputChanceRoll) {
if (!isBussesSeparate)
return super.checkRecipeGeneric(aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll);
List<ItemStack> buffer = new ArrayList<>(16);
@@ -163,7 +155,12 @@ public class GregtechMetaTileEntity_IndustrialWireMill
}
ItemStack[] tItemInputs = buffer.toArray(new ItemStack[0]);
if (checkRecipeGeneric(
- tItemInputs, tFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll))
+ tItemInputs,
+ tFluidInputs,
+ aMaxParallelRecipes,
+ aEUPercent,
+ aSpeedBonusPercent,
+ aOutputChanceRoll))
return true;
buffer.clear();
}
@@ -173,8 +170,10 @@ public class GregtechMetaTileEntity_IndustrialWireMill
@Override
public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
isBussesSeparate = !isBussesSeparate;
- aPlayer.addChatMessage(new ChatComponentTranslation(
- isBussesSeparate ? "interaction.separateBusses.enabled" : "interaction.separateBusses.disabled"));
+ aPlayer.addChatMessage(
+ new ChatComponentTranslation(
+ isBussesSeparate ? "interaction.separateBusses.enabled"
+ : "interaction.separateBusses.disabled"));
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IronBlastFurnace.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IronBlastFurnace.java
index 03c6f813fc..fc6dfb6482 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IronBlastFurnace.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IronBlastFurnace.java
@@ -1,9 +1,17 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.common.util.ForgeDirection;
+
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
import com.gtnewhorizons.modularui.common.widget.ProgressBar;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
+
import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
@@ -22,19 +30,14 @@ import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.gui.GTPP_UITextures;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.common.util.ForgeDirection;
public class GregtechMetaTileEntity_IronBlastFurnace extends MetaTileEntity implements IAddUIWidgets {
- private static final ITexture[] FACING_SIDE = {new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top)};
- private static final ITexture[] FACING_FRONT = {new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off)
- };
- private static final ITexture[] FACING_ACTIVE = {new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On)
- };
+
+ private static final ITexture[] FACING_SIDE = { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top) };
+ private static final ITexture[] FACING_FRONT = {
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off) };
+ private static final ITexture[] FACING_ACTIVE = {
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On) };
public int mMaxProgresstime = 0;
public int mUpdate = 30;
public int mProgresstime = 0;
@@ -53,37 +56,22 @@ public class GregtechMetaTileEntity_IronBlastFurnace extends MetaTileEntity impl
@Override
public String[] getDescription() {
if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) {
- return new String[] {
- "Iron is a much better furnace material!",
- "Can be Automated",
- "Multiblock: 3x3x5 hollow with opening on top",
- "Same shape as Bronze/Bricked blast furnace, except one ring of 8 taller.",
- "40 Iron Plated Bricks required",
- };
+ return new String[] { "Iron is a much better furnace material!", "Can be Automated",
+ "Multiblock: 3x3x5 hollow with opening on top",
+ "Same shape as Bronze/Bricked blast furnace, except one ring of 8 taller.",
+ "40 Iron Plated Bricks required", };
} else {
- return new String[] {
- "Sloooowly, Skip the Bronze age, Get some Steel!",
- "Multiblock: 3x3x5 hollow with opening on top",
- "40 Iron Plated Bricks required",
- "----",
- "Even though Iron melts hotter than bronze,",
- "this machine is to help players skip looking",
- "for tin and copper, which are not as common",
- "as Iron is. This machine takes 5x longer than the bronze",
- "blast furnace as a result.",
- "----",
- };
+ return new String[] { "Sloooowly, Skip the Bronze age, Get some Steel!",
+ "Multiblock: 3x3x5 hollow with opening on top", "40 Iron Plated Bricks required", "----",
+ "Even though Iron melts hotter than bronze,", "this machine is to help players skip looking",
+ "for tin and copper, which are not as common",
+ "as Iron is. This machine takes 5x longer than the bronze", "blast furnace as a result.", "----", };
}
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
if (aSide == aFacing) {
return aActive ? FACING_ACTIVE : FACING_FRONT;
}
@@ -199,26 +187,24 @@ public class GregtechMetaTileEntity_IronBlastFurnace extends MetaTileEntity impl
}
private boolean checkMachine() {
- final int xDir =
- ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetX;
- final int zDir =
- ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetZ;
+ final int xDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetX;
+ final int zDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetZ;
for (int i = -1; i < 2; i++) {
for (int j = -1; j < 4; j++) { // This is height
for (int k = -1; k < 2; k++) {
if (((xDir + i) != 0) || (j != 0) || ((zDir + k) != 0)) {
if ((i != 0) || (j == -1) || (k != 0)) {
if ((this.getBaseMetaTileEntity().getBlockOffset(xDir + i, j, zDir + k)
- != ModBlocks.blockCasingsMisc)
+ != ModBlocks.blockCasingsMisc)
|| (this.getBaseMetaTileEntity().getMetaIDOffset(xDir + i, j, zDir + k) != 10)) {
return false;
}
} else if ((!GT_Utility.arrayContains(
- this.getBaseMetaTileEntity().getBlockOffset(xDir + i, j, zDir + k),
- new Object[] {Blocks.lava, Blocks.flowing_lava, null}))
+ this.getBaseMetaTileEntity().getBlockOffset(xDir + i, j, zDir + k),
+ new Object[] { Blocks.lava, Blocks.flowing_lava, null }))
&& (!this.getBaseMetaTileEntity().getAirOffset(xDir + i, j, zDir + k))) {
- return false;
- }
+ return false;
+ }
}
}
}
@@ -234,16 +220,14 @@ public class GregtechMetaTileEntity_IronBlastFurnace extends MetaTileEntity impl
@Override
public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTimer) {
if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive())) {
- aBaseMetaTileEntity
- .getWorld()
- .spawnParticle(
- "cloud",
- aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1) + Math.random(),
- aBaseMetaTileEntity.getOffsetY(aBaseMetaTileEntity.getBackFacing(), 1),
- aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1) + Math.random(),
- 0.0D,
- 0.3D,
- 0.0D);
+ aBaseMetaTileEntity.getWorld().spawnParticle(
+ "cloud",
+ aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1) + Math.random(),
+ aBaseMetaTileEntity.getOffsetY(aBaseMetaTileEntity.getBackFacing(), 1),
+ aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1) + Math.random(),
+ 0.0D,
+ 0.3D,
+ 0.0D);
}
if (aBaseMetaTileEntity.isServerSide()) {
if (this.mUpdate-- == 0) {
@@ -259,12 +243,10 @@ public class GregtechMetaTileEntity_IronBlastFurnace extends MetaTileEntity impl
this.mMaxProgresstime = 0;
try {
GT_Mod.instance.achievements.issueAchievement(
- aBaseMetaTileEntity
- .getWorld()
+ aBaseMetaTileEntity.getWorld()
.getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()),
"steel");
- } catch (final Exception e) {
- }
+ } catch (final Exception e) {}
}
} else if (aBaseMetaTileEntity.isAllowedToWork()) {
this.checkRecipe();
@@ -276,63 +258,53 @@ public class GregtechMetaTileEntity_IronBlastFurnace extends MetaTileEntity impl
aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1),
aBaseMetaTileEntity.getYCoord(),
aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1))) {
- aBaseMetaTileEntity
- .getWorld()
- .setBlock(
- aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1),
- aBaseMetaTileEntity.getYCoord(),
- aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1),
- Blocks.lava,
- 1,
- 2);
+ aBaseMetaTileEntity.getWorld().setBlock(
+ aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1),
+ aBaseMetaTileEntity.getYCoord(),
+ aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1),
+ Blocks.lava,
+ 1,
+ 2);
this.mUpdate = 1;
}
if (aBaseMetaTileEntity.getAir(
aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1),
aBaseMetaTileEntity.getYCoord() + 1,
aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1))) {
- aBaseMetaTileEntity
- .getWorld()
- .setBlock(
- aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1),
- aBaseMetaTileEntity.getYCoord() + 1,
- aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1),
- Blocks.lava,
- 1,
- 2);
+ aBaseMetaTileEntity.getWorld().setBlock(
+ aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1),
+ aBaseMetaTileEntity.getYCoord() + 1,
+ aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1),
+ Blocks.lava,
+ 1,
+ 2);
this.mUpdate = 1;
}
} else {
if (aBaseMetaTileEntity.getBlock(
- aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1),
- aBaseMetaTileEntity.getYCoord(),
- aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1))
- == Blocks.lava) {
- aBaseMetaTileEntity
- .getWorld()
- .setBlock(
- aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1),
- aBaseMetaTileEntity.getYCoord(),
- aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1),
- Blocks.air,
- 0,
- 2);
+ aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1),
+ aBaseMetaTileEntity.getYCoord(),
+ aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1)) == Blocks.lava) {
+ aBaseMetaTileEntity.getWorld().setBlock(
+ aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1),
+ aBaseMetaTileEntity.getYCoord(),
+ aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1),
+ Blocks.air,
+ 0,
+ 2);
this.mUpdate = 1;
}
if (aBaseMetaTileEntity.getBlock(
- aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1),
- aBaseMetaTileEntity.getYCoord() + 1,
- aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1))
- == Blocks.lava) {
- aBaseMetaTileEntity
- .getWorld()
- .setBlock(
- aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1),
- aBaseMetaTileEntity.getYCoord() + 1,
- aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1),
- Blocks.air,
- 0,
- 2);
+ aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1),
+ aBaseMetaTileEntity.getYCoord() + 1,
+ aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1)) == Blocks.lava) {
+ aBaseMetaTileEntity.getWorld().setBlock(
+ aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1),
+ aBaseMetaTileEntity.getYCoord() + 1,
+ aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1),
+ Blocks.air,
+ 0,
+ 2);
this.mUpdate = 1;
}
}
@@ -342,7 +314,7 @@ public class GregtechMetaTileEntity_IronBlastFurnace extends MetaTileEntity impl
private void addOutputProducts() {
if (this.mOutputItem1 != null) {
if (this.mInventory[2] == null) {
- this.mInventory[2] = GT_Utility.copy(new Object[] {this.mOutputItem1});
+ this.mInventory[2] = GT_Utility.copy(new Object[] { this.mOutputItem1 });
} else if (GT_Utility.areStacksEqual(this.mInventory[2], this.mOutputItem1)) {
this.mInventory[2].stackSize = Math.min(
this.mOutputItem1.getMaxStackSize(),
@@ -351,7 +323,7 @@ public class GregtechMetaTileEntity_IronBlastFurnace extends MetaTileEntity impl
}
if (this.mOutputItem2 != null) {
if (this.mInventory[3] == null) {
- this.mInventory[3] = GT_Utility.copy(new Object[] {this.mOutputItem2});
+ this.mInventory[3] = GT_Utility.copy(new Object[] { this.mOutputItem2 });
} else if (GT_Utility.areStacksEqual(this.mInventory[3], this.mOutputItem2)) {
this.mInventory[3].stackSize = Math.min(
this.mOutputItem2.getMaxStackSize(),
@@ -361,12 +333,10 @@ public class GregtechMetaTileEntity_IronBlastFurnace extends MetaTileEntity impl
}
private boolean spaceForOutput(final ItemStack aStack1, final ItemStack aStack2) {
- if (((this.mInventory[2] == null)
- || (aStack1 == null)
- || (((this.mInventory[2].stackSize + aStack1.stackSize) <= this.mInventory[2].getMaxStackSize())
- && (GT_Utility.areStacksEqual(this.mInventory[2], aStack1))))
- && ((this.mInventory[3] == null)
- || (aStack2 == null)
+ if (((this.mInventory[2] == null) || (aStack1 == null)
+ || (((this.mInventory[2].stackSize + aStack1.stackSize) <= this.mInventory[2].getMaxStackSize())
+ && (GT_Utility.areStacksEqual(this.mInventory[2], aStack1))))
+ && ((this.mInventory[3] == null) || (aStack2 == null)
|| (((this.mInventory[3].stackSize + aStack2.stackSize) <= this.mInventory[3].getMaxStackSize())
&& (GT_Utility.areStacksEqual(this.mInventory[3], aStack2))))) {
return true;
@@ -390,12 +360,11 @@ public class GregtechMetaTileEntity_IronBlastFurnace extends MetaTileEntity impl
if ((this.mInventory[0] != null) && (this.mInventory[1] != null) && (this.mInventory[0].stackSize >= 1)) {
if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "dustIron"))
|| (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "ingotIron"))) {
- if ((this.mInventory[1].getItem() == Items.coal)
- && (this.mInventory[1].stackSize >= 4)
+ if ((this.mInventory[1].getItem() == Items.coal) && (this.mInventory[1].stackSize >= 4)
&& (this.spaceForOutput(
this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L),
- this.mOutputItem2 =
- GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 4L)))) {
+ this.mOutputItem2 = GT_OreDictUnificator
+ .get(OrePrefixes.dustTiny, Materials.DarkAsh, 4L)))) {
this.getBaseMetaTileEntity().decrStackSize(0, 1);
this.getBaseMetaTileEntity().decrStackSize(1, 4 * 3);
this.mMaxProgresstime = getProperTime(36000);
@@ -405,8 +374,8 @@ public class GregtechMetaTileEntity_IronBlastFurnace extends MetaTileEntity impl
&& (this.mInventory[1].stackSize >= 2)
&& (this.spaceForOutput(
this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L),
- this.mOutputItem2 =
- GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 4L)))) {
+ this.mOutputItem2 = GT_OreDictUnificator
+ .get(OrePrefixes.dustTiny, Materials.Ash, 4L)))) {
this.getBaseMetaTileEntity().decrStackSize(0, 1);
this.getBaseMetaTileEntity().decrStackSize(1, 2 * 3);
this.mMaxProgresstime = getProperTime(4800);
@@ -418,20 +387,19 @@ public class GregtechMetaTileEntity_IronBlastFurnace extends MetaTileEntity impl
&& (this.mInventory[1].stackSize >= 4)
&& (this.spaceForOutput(
this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L),
- this.mOutputItem2 =
- GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 4L)))) {
+ this.mOutputItem2 = GT_OreDictUnificator
+ .get(OrePrefixes.dust, Materials.DarkAsh, 4L)))) {
this.getBaseMetaTileEntity().decrStackSize(0, 9);
this.getBaseMetaTileEntity().decrStackSize(1, 4 * 3);
this.mMaxProgresstime = getProperTime(64800);
return true;
}
} else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "dustSteel")) {
- if ((this.mInventory[1].getItem() == Items.coal)
- && (this.mInventory[1].stackSize >= 2)
+ if ((this.mInventory[1].getItem() == Items.coal) && (this.mInventory[1].stackSize >= 2)
&& (this.spaceForOutput(
this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L),
- this.mOutputItem2 =
- GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 2L)))) {
+ this.mOutputItem2 = GT_OreDictUnificator
+ .get(OrePrefixes.dustTiny, Materials.DarkAsh, 2L)))) {
this.getBaseMetaTileEntity().decrStackSize(0, 1);
this.getBaseMetaTileEntity().decrStackSize(1, 2 * 3);
this.mMaxProgresstime = getProperTime(3600);
@@ -441,8 +409,8 @@ public class GregtechMetaTileEntity_IronBlastFurnace extends MetaTileEntity impl
&& (this.mInventory[1].stackSize >= 1)
&& (this.spaceForOutput(
this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L),
- this.mOutputItem2 =
- GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 2L)))) {
+ this.mOutputItem2 = GT_OreDictUnificator
+ .get(OrePrefixes.dustTiny, Materials.Ash, 2L)))) {
this.getBaseMetaTileEntity().decrStackSize(0, 1);
this.getBaseMetaTileEntity().decrStackSize(1, 1 * 3);
this.mMaxProgresstime = getProperTime(2400);
@@ -454,20 +422,19 @@ public class GregtechMetaTileEntity_IronBlastFurnace extends MetaTileEntity impl
&& (this.mInventory[1].stackSize >= 2)
&& (this.spaceForOutput(
this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L),
- this.mOutputItem2 =
- GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 2L)))) {
+ this.mOutputItem2 = GT_OreDictUnificator
+ .get(OrePrefixes.dust, Materials.DarkAsh, 2L)))) {
this.getBaseMetaTileEntity().decrStackSize(0, 9);
this.getBaseMetaTileEntity().decrStackSize(1, 2 * 3);
this.mMaxProgresstime = getProperTime(32400);
return true;
}
} else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "blockIron")) {
- if ((this.mInventory[1].getItem() == Items.coal)
- && (this.mInventory[1].stackSize >= 36)
+ if ((this.mInventory[1].getItem() == Items.coal) && (this.mInventory[1].stackSize >= 36)
&& (this.spaceForOutput(
this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L),
- this.mOutputItem2 =
- GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 4L)))) {
+ this.mOutputItem2 = GT_OreDictUnificator
+ .get(OrePrefixes.dust, Materials.DarkAsh, 4L)))) {
this.getBaseMetaTileEntity().decrStackSize(0, 1);
this.getBaseMetaTileEntity().decrStackSize(1, 64);
this.mMaxProgresstime = getProperTime(64800);
@@ -484,12 +451,12 @@ public class GregtechMetaTileEntity_IronBlastFurnace extends MetaTileEntity impl
return true;
}
if (((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCoal"))
- || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCharcoal")))
+ || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCharcoal")))
&& (this.mInventory[1].stackSize >= 4)
&& (this.spaceForOutput(
this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L),
- this.mOutputItem2 =
- GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 4L)))) {
+ this.mOutputItem2 = GT_OreDictUnificator
+ .get(OrePrefixes.dust, Materials.DarkAsh, 4L)))) {
this.getBaseMetaTileEntity().decrStackSize(0, 1);
this.getBaseMetaTileEntity().decrStackSize(1, 4 * 3);
this.mMaxProgresstime = getProperTime(64800);
@@ -508,14 +475,14 @@ public class GregtechMetaTileEntity_IronBlastFurnace extends MetaTileEntity impl
}
@Override
- public boolean allowPullStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return aIndex > 1;
}
@Override
- public boolean allowPutStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
if (aIndex < 2) {}
return !GT_Utility.areStacksEqual(aStack, this.mInventory[0]);
}
@@ -532,24 +499,25 @@ public class GregtechMetaTileEntity_IronBlastFurnace extends MetaTileEntity impl
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
- builder.widget(new SlotWidget(inventoryHandler, 0)
+ builder.widget(
+ new SlotWidget(inventoryHandler, 0)
.setBackground(getGUITextureSet().getItemSlot(), GTPP_UITextures.OVERLAY_SLOT_INGOT)
.setPos(33, 15))
- .widget(new SlotWidget(inventoryHandler, 1)
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_FURNACE)
- .setPos(33, 33))
- .widget(new SlotWidget(inventoryHandler, 2)
- .setAccess(true, false)
- .setBackground(getGUITextureSet().getItemSlot(), GTPP_UITextures.OVERLAY_SLOT_INGOT)
- .setPos(85, 24))
- .widget(new SlotWidget(inventoryHandler, 3)
- .setAccess(true, false)
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_DUST)
- .setPos(103, 24))
- .widget(new ProgressBar()
- .setTexture(GTPP_UITextures.PROGRESSBAR_ARROW_2, 20)
- .setProgress(() -> (float) mProgresstime / mMaxProgresstime)
- .setPos(58, 24)
- .setSize(20, 18));
+ .widget(
+ new SlotWidget(inventoryHandler, 1)
+ .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_FURNACE)
+ .setPos(33, 33))
+ .widget(
+ new SlotWidget(inventoryHandler, 2).setAccess(true, false)
+ .setBackground(getGUITextureSet().getItemSlot(), GTPP_UITextures.OVERLAY_SLOT_INGOT)
+ .setPos(85, 24))
+ .widget(
+ new SlotWidget(inventoryHandler, 3).setAccess(true, false)
+ .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_DUST)
+ .setPos(103, 24))
+ .widget(
+ new ProgressBar().setTexture(GTPP_UITextures.PROGRESSBAR_ARROW_2, 20)
+ .setProgress(() -> (float) mProgresstime / mMaxProgresstime).setPos(58, 24)
+ .setSize(20, 18));
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java
index 21a8333b03..fae3ab5970 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java
@@ -7,10 +7,25 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.DamageSource;
+import net.minecraft.world.World;
+import net.minecraft.world.chunk.Chunk;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.enums.TAE;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -32,18 +47,6 @@ import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.nbthandlers.GT_MetaTileEntity_Hatch_MillingBalls;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.DamageSource;
-import net.minecraft.world.World;
-import net.minecraft.world.chunk.Chunk;
-import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntity_IsaMill extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IsaMill>
implements ISurvivalConstructable {
@@ -55,8 +58,7 @@ public class GregtechMetaTileEntity_IsaMill extends GregtechMeta_MultiBlockBase<
private static final IIconContainer frontFaceActive = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE5");
private static final IIconContainer frontFace = new CustomIcon("iconsets/Grinder/GRINDER5");
- private final ArrayList<GT_MetaTileEntity_Hatch_MillingBalls> mMillingBallBuses =
- new ArrayList<GT_MetaTileEntity_Hatch_MillingBalls>();
+ private final ArrayList<GT_MetaTileEntity_Hatch_MillingBalls> mMillingBallBuses = new ArrayList<GT_MetaTileEntity_Hatch_MillingBalls>();
private static final DamageSource mIsaMillDamageSource = new DamageSource("gtpp.grinder").setDamageBypassesArmor();
public GregtechMetaTileEntity_IsaMill(int aID, String aName, String aNameRegional) {
@@ -70,36 +72,28 @@ public class GregtechMetaTileEntity_IsaMill extends GregtechMeta_MultiBlockBase<
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Large Grinding Machine")
- .addInfo("Grind ores.")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 3, 7, false)
- .addController("Front Center")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Large Grinding Machine")
+ .addInfo("Grind ores.").addPollutionAmount(getPollutionPerSecond(null)).addSeparator()
+ .beginStructureBlock(3, 3, 7, false).addController("Front Center")
.addCasingInfo("IsaMill Exterior Casing", 40)
.addOtherStructurePart("IsaMill Gearbox", "5x, Inner Blocks")
.addOtherStructurePart("IsaMill Piping", "8x, ring around controller")
.addStructureInfo("IsaMill Pipings must not be obstructed in front (only air blocks)")
- .addOtherStructurePart("Milling Ball Hatch", "Any Casing")
- .addInputBus("Any Casing", 1)
- .addOutputBus("Any Casing", 1)
- .addEnergyHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
- .addMufflerHatch("Any Casing", 1)
- .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ .addOtherStructurePart("Milling Ball Hatch", "Any Casing").addInputBus("Any Casing", 1)
+ .addOutputBus("Any Casing", 1).addEnergyHatch("Any Casing", 1).addMaintenanceHatch("Any Casing", 1)
+ .addMufflerHatch("Any Casing", 1).toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@Override
public IStructureDefinition<GregtechMetaTileEntity_IsaMill> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
- STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IsaMill>builder()
- .addShape(mName, transpose(new String[][] {
- {"DDD", "CCC", "CCC", "CCC", "CCC", "CCC", "CCC"},
- {"D~D", "CGC", "CGC", "CGC", "CGC", "CGC", "CCC"},
- {"DDD", "CCC", "CCC", "CCC", "CCC", "CCC", "CCC"},
- }))
+ STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IsaMill>builder().addShape(
+ mName,
+ transpose(
+ new String[][] { { "DDD", "CCC", "CCC", "CCC", "CCC", "CCC", "CCC" },
+ { "D~D", "CGC", "CGC", "CGC", "CGC", "CGC", "CCC" },
+ { "DDD", "CCC", "CCC", "CCC", "CCC", "CCC", "CCC" }, }))
.addElement(
'C',
ofChain(
@@ -107,25 +101,18 @@ public class GregtechMetaTileEntity_IsaMill extends GregtechMeta_MultiBlockBase<
.adder(GregtechMetaTileEntity_IsaMill::addMillingBallsHatch)
.hatchClass(GT_MetaTileEntity_Hatch_MillingBalls.class)
.shouldReject(t -> !t.mMillingBallBuses.isEmpty())
- .casingIndex(getCasingTextureIndex())
- .dot(1)
- .build(),
- buildHatchAdder(GregtechMetaTileEntity_IsaMill.class)
- .atLeast(
- InputBus,
- OutputBus,
- InputHatch,
- OutputHatch,
- Maintenance,
- Energy,
- Muffler)
- .casingIndex(getCasingTextureIndex())
- .dot(1)
- .build(),
+ .casingIndex(getCasingTextureIndex()).dot(1).build(),
+ buildHatchAdder(GregtechMetaTileEntity_IsaMill.class).atLeast(
+ InputBus,
+ OutputBus,
+ InputHatch,
+ OutputHatch,
+ Maintenance,
+ Energy,
+ Muffler).casingIndex(getCasingTextureIndex()).dot(1).build(),
onElementPass(x -> ++x.mCasing, ofBlock(getCasingBlock(), getCasingMeta()))))
.addElement('D', ofBlock(getIntakeBlock(), getIntakeMeta()))
- .addElement('G', ofBlock(getGearboxBlock(), getGearboxMeta()))
- .build();
+ .addElement('G', ofBlock(getGearboxBlock(), getGearboxMeta())).build();
}
return STRUCTURE_DEFINITION;
}
@@ -261,7 +248,9 @@ public class GregtechMetaTileEntity_IsaMill extends GregtechMeta_MultiBlockBase<
}
} else if (aFoundEntity.getHealth() > 0) {
EntityUtils.doDamage(
- aFoundEntity, mIsaMillDamageSource, Math.max(1, (int) (aFoundEntity.getMaxHealth() / 3)));
+ aFoundEntity,
+ mIsaMillDamageSource,
+ Math.max(1, (int) (aFoundEntity.getMaxHealth() / 3)));
if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive())) {
generateParticles(aFoundEntity);
}
@@ -269,6 +258,7 @@ public class GregtechMetaTileEntity_IsaMill extends GregtechMeta_MultiBlockBase<
}
}
}
+
// 20 armor points add 80% damage reduction, more points add more damage reduction
private int getPlayerDamageValue(EntityPlayer player, int damage) {
int armorValue = player.getTotalArmorValue();
@@ -406,11 +396,8 @@ public class GregtechMetaTileEntity_IsaMill extends GregtechMeta_MultiBlockBase<
@Override
public String[] getExtraInfoData() {
- return new String[] {
- "IsaMill Grinding Machine",
- "Current Efficiency: " + (mEfficiency / 100) + "%",
- getIdealStatus() == getRepairStatus() ? "No Maintainance issues" : "Needs Maintainance"
- };
+ return new String[] { "IsaMill Grinding Machine", "Current Efficiency: " + (mEfficiency / 100) + "%",
+ getIdealStatus() == getRepairStatus() ? "No Maintainance issues" : "Needs Maintainance" };
}
@Override
@@ -434,7 +421,7 @@ public class GregtechMetaTileEntity_IsaMill extends GregtechMeta_MultiBlockBase<
}
/*
- * Milling Ball Handling
+ * Milling Ball Handling
*/
@Override
@@ -501,14 +488,8 @@ public class GregtechMetaTileEntity_IsaMill extends GregtechMeta_MultiBlockBase<
}
@Override
- public boolean checkRecipeGeneric(
- ItemStack[] aItemInputs,
- FluidStack[] aFluidInputs,
- int aMaxParallelRecipes,
- long aEUPercent,
- int aSpeedBonusPercent,
- int aOutputChanceRoll,
- GT_Recipe aRecipe) {
+ public boolean checkRecipeGeneric(ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes,
+ long aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe) {
// Based on the Processing Array. A bit overkill, but very flexible.
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java
index 1934a8e610..9136ac4aae 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java
@@ -5,11 +5,20 @@ import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+import java.util.ArrayList;
+import java.util.List;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits;
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.interfaces.IHatchElement;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -24,12 +33,6 @@ import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.ArrayList;
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntity_SpargeTower extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_SpargeTower>
implements ISurvivalConstructable {
@@ -41,35 +44,28 @@ public class GregtechMetaTileEntity_SpargeTower extends GregtechMeta_MultiBlockB
private static final IStructureDefinition<GregtechMetaTileEntity_SpargeTower> STRUCTURE_DEFINITION;
static {
- IHatchElement<GregtechMetaTileEntity_SpargeTower> layeredOutputHatch = OutputHatch.withCount(
- GregtechMetaTileEntity_SpargeTower::getCurrentLayerOutputHatchCount)
+ IHatchElement<GregtechMetaTileEntity_SpargeTower> layeredOutputHatch = OutputHatch
+ .withCount(GregtechMetaTileEntity_SpargeTower::getCurrentLayerOutputHatchCount)
.withAdder(GregtechMetaTileEntity_SpargeTower::addLayerOutputHatch);
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_SpargeTower>builder()
- .addShape(STRUCTURE_PIECE_BASE, transpose(new String[][] {
- {"b~b", "bbb", "bbb"},
- }))
- .addShape(STRUCTURE_PIECE_LAYER, transpose(new String[][] {{"lll", "lcl", "lll"}}))
- .addShape(STRUCTURE_PIECE_LAYER_HINT, transpose(new String[][] {{"lll", "l-l", "lll"}}))
- .addShape(STRUCTURE_PIECE_TOP_HINT, transpose(new String[][] {{"lll", "lll", "lll"}}))
+ .addShape(STRUCTURE_PIECE_BASE, transpose(new String[][] { { "b~b", "bbb", "bbb" }, }))
+ .addShape(STRUCTURE_PIECE_LAYER, transpose(new String[][] { { "lll", "lcl", "lll" } }))
+ .addShape(STRUCTURE_PIECE_LAYER_HINT, transpose(new String[][] { { "lll", "l-l", "lll" } }))
+ .addShape(STRUCTURE_PIECE_TOP_HINT, transpose(new String[][] { { "lll", "lll", "lll" } }))
.addElement(
'b',
buildHatchAdder(GregtechMetaTileEntity_SpargeTower.class)
- .atLeast(Energy, InputHatch, InputBus, Maintenance)
- .disallowOnly(ForgeDirection.UP)
- .casingIndex(getCasingIndex())
- .dot(1)
- .buildAndChain(onElementPass(
- GregtechMetaTileEntity_SpargeTower::onCasingFound,
- ofBlock(ModBlocks.blockCasings5Misc, 4))))
+ .atLeast(Energy, InputHatch, InputBus, Maintenance).disallowOnly(ForgeDirection.UP)
+ .casingIndex(getCasingIndex()).dot(1).buildAndChain(
+ onElementPass(
+ GregtechMetaTileEntity_SpargeTower::onCasingFound,
+ ofBlock(ModBlocks.blockCasings5Misc, 4))))
.addElement(
'l',
ofChain(
- buildHatchAdder(GregtechMetaTileEntity_SpargeTower.class)
- .atLeast(layeredOutputHatch)
+ buildHatchAdder(GregtechMetaTileEntity_SpargeTower.class).atLeast(layeredOutputHatch)
.disallowOnly(ForgeDirection.UP, ForgeDirection.DOWN)
- .casingIndex(getCasingIndex())
- .dot(2)
- .build(),
+ .casingIndex(getCasingIndex()).dot(2).build(),
ofHatchAdder(
GregtechMetaTileEntity_SpargeTower::addEnergyInputToMachineList,
getCasingIndex(),
@@ -126,16 +122,12 @@ public class GregtechMetaTileEntity_SpargeTower extends GregtechMeta_MultiBlockB
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Gas Sparge Tower")
- .addInfo("Controller block for the Sparging Tower")
+ tt.addMachineType("Gas Sparge Tower").addInfo("Controller block for the Sparging Tower")
.addInfo("Fluids are only put out at the correct height")
- .addInfo("The correct height equals the slot number in the NEI recipe")
- .addSeparator()
- .beginStructureBlock(3, 8, 3, true)
- .addController("Front bottom")
+ .addInfo("The correct height equals the slot number in the NEI recipe").addSeparator()
+ .beginStructureBlock(3, 8, 3, true).addController("Front bottom")
.addOtherStructurePart("Sparge Tower Exterior Casing", "45 (minimum)")
- .addEnergyHatch("Any casing", 1, 2)
- .addMaintenanceHatch("Any casing", 1, 2, 3)
+ .addEnergyHatch("Any casing", 1, 2).addMaintenanceHatch("Any casing", 1, 2, 3)
.addInputHatch("2x Input Hatches (Any bottom layer casing)", 1)
.addOutputHatch("6x Output Hatches (At least one per layer except bottom layer)", 2, 3)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
@@ -198,8 +190,11 @@ public class GregtechMetaTileEntity_SpargeTower extends GregtechMeta_MultiBlockB
byte tTier = (byte) Math.max(0, GT_Utility.getTier(tVoltage));
FluidStack[] tFluids = tFluidList.toArray(new FluidStack[0]);
if (tFluids.length > 0) {
- Logger.INFO("Found " + tFluids.length + " input fluids. Searching "
- + GTPP_Recipe_Map.sSpargeTowerRecipes.mRecipeList.size() + " recipes.");
+ Logger.INFO(
+ "Found " + tFluids.length
+ + " input fluids. Searching "
+ + GTPP_Recipe_Map.sSpargeTowerRecipes.mRecipeList.size()
+ + " recipes.");
GT_Recipe tRecipe = getRecipeMap()
.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids);
if (tRecipe != null) {
@@ -221,8 +216,9 @@ public class GregtechMetaTileEntity_SpargeTower extends GregtechMeta_MultiBlockB
int aDevProgress = this.mMaxProgresstime / 10;
this.mMaxProgresstime = Math.max(1, aDevProgress);
this.mOutputItems = new ItemStack[] {};
- ArrayList<FluidStack> aFluidOutputs =
- getByproductsOfSparge(tRecipe.mFluidInputs[0], tRecipe.mFluidInputs[1]);
+ ArrayList<FluidStack> aFluidOutputs = getByproductsOfSparge(
+ tRecipe.mFluidInputs[0],
+ tRecipe.mFluidInputs[1]);
this.mOutputFluids = (FluidStack[]) aFluidOutputs.toArray(new FluidStack[0]);
updateSlots();
Logger.INFO("Done!");
@@ -238,8 +234,8 @@ public class GregtechMetaTileEntity_SpargeTower extends GregtechMeta_MultiBlockB
return false;
}
- private static ArrayList<FluidStack> getByproductsOfSparge(
- final FluidStack aSpargeGas, final FluidStack aSpentFuel) {
+ private static ArrayList<FluidStack> getByproductsOfSparge(final FluidStack aSpargeGas,
+ final FluidStack aSpentFuel) {
GasSpargingRecipe aSpargeRecipe = GasSpargingRecipeMap.findRecipe(aSpargeGas, aSpentFuel);
ArrayList<FluidStack> aOutputGases = new ArrayList<FluidStack>();
if (aSpargeRecipe == null) {
@@ -283,14 +279,12 @@ public class GregtechMetaTileEntity_SpargeTower extends GregtechMeta_MultiBlockB
}
protected int getCurrentLayerOutputHatchCount() {
- return mOutputHatchesByLayer.size() < mHeight || mHeight <= 0
- ? 0
+ return mOutputHatchesByLayer.size() < mHeight || mHeight <= 0 ? 0
: mOutputHatchesByLayer.get(mHeight - 1).size();
}
protected boolean addLayerOutputHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (aTileEntity == null
- || aTileEntity.isDead()
+ if (aTileEntity == null || aTileEntity.isDead()
|| !(aTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Output)) {
Logger.INFO("Bad Output Hatch");
return false;
@@ -402,12 +396,28 @@ public class GregtechMetaTileEntity_SpargeTower extends GregtechMeta_MultiBlockB
for (int i = 1; i < tTotalHeight - 1; i++) {
mHeight = i;
built = survivialBuildPiece(
- STRUCTURE_PIECE_LAYER_HINT, stackSize, 1, i, 0, elementBudget, env, false, true);
+ STRUCTURE_PIECE_LAYER_HINT,
+ stackSize,
+ 1,
+ i,
+ 0,
+ elementBudget,
+ env,
+ false,
+ true);
if (built >= 0) return built;
}
mHeight = tTotalHeight - 1;
return survivialBuildPiece(
- STRUCTURE_PIECE_TOP_HINT, stackSize, 1, tTotalHeight - 1, 0, elementBudget, env, false, true);
+ STRUCTURE_PIECE_TOP_HINT,
+ stackSize,
+ 1,
+ tTotalHeight - 1,
+ 0,
+ elementBudget,
+ env,
+ false,
+ true);
}
@Override
@@ -429,15 +439,22 @@ public class GregtechMetaTileEntity_SpargeTower extends GregtechMeta_MultiBlockB
public boolean onPlungerRightClick(EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) {
int aLayerIndex = 0;
PlayerUtils.messagePlayer(
- aPlayer, "Trying to clear " + mOutputHatchesByLayer.size() + " layers of output hatches.");
+ aPlayer,
+ "Trying to clear " + mOutputHatchesByLayer.size() + " layers of output hatches.");
for (List<GT_MetaTileEntity_Hatch_Output> layer : this.mOutputHatchesByLayer) {
int aHatchIndex = 0;
for (GT_MetaTileEntity_Hatch_Output hatch : layer) {
if (hatch.mFluid != null) {
PlayerUtils.messagePlayer(
aPlayer,
- "Clearing " + hatch.mFluid.amount + "L of " + hatch.mFluid.getLocalizedName()
- + " from hatch " + aHatchIndex + " on layer " + aLayerIndex + ".");
+ "Clearing " + hatch.mFluid.amount
+ + "L of "
+ + hatch.mFluid.getLocalizedName()
+ + " from hatch "
+ + aHatchIndex
+ + " on layer "
+ + aLayerIndex
+ + ".");
hatch.mFluid = null;
}
aHatchIndex++;
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_AssemblyLine.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_AssemblyLine.java
index ff9c20b08d..0aa94b2bbe 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_AssemblyLine.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_AssemblyLine.java
@@ -1,6 +1,16 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced;
+import java.util.ArrayList;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
@@ -19,19 +29,11 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.LangUtils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
-import java.util.ArrayList;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntity_Adv_AssemblyLine
extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_Adv_AssemblyLine> {
- public ArrayList<GT_MetaTileEntity_Hatch_DataAccess> mDataAccessHatches =
- new ArrayList<GT_MetaTileEntity_Hatch_DataAccess>();
+ public ArrayList<GT_MetaTileEntity_Hatch_DataAccess> mDataAccessHatches = new ArrayList<GT_MetaTileEntity_Hatch_DataAccess>();
public static String[] mCasingName = new String[5];
private final int CASING_TEXTURE_ID = TAE.getIndexFromPage(0, 13);
@@ -59,26 +61,17 @@ public class GregtechMetaTileEntity_Adv_AssemblyLine
return new GregtechMetaTileEntity_Adv_AssemblyLine(this.mName);
}
- /* public String[] getTooltip() {
- if (mCasingName[0].toLowerCase().contains(".name")) {
- mCasingName[0] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 0);
- }
- if (mCasingName[1].toLowerCase().contains(".name")) {
- mCasingName[1] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 1);
- }
- if (mCasingName[2].toLowerCase().contains(".name")) {
- mCasingName[2] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 2);
- }
- if (mCasingName[3].toLowerCase().contains(".name")) {
- mCasingName[3] = LangUtils.getLocalizedNameOfBlock(getCasing(3), 15);
- }
- if (mCasingName[4].toLowerCase().contains(".name")) {
- mCasingName[4] = LangUtils.getLocalizedNameOfBlock(getCasing(1), 13);
- }
- return new String[]{
- "Advanced Integrated Assembly Line"
- };
- }*/
+ /*
+ * public String[] getTooltip() { if (mCasingName[0].toLowerCase().contains(".name")) { mCasingName[0] =
+ * LangUtils.getLocalizedNameOfBlock(getCasing(4), 0); } if (mCasingName[1].toLowerCase().contains(".name")) {
+ * mCasingName[1] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 1); } if
+ * (mCasingName[2].toLowerCase().contains(".name")) { mCasingName[2] =
+ * LangUtils.getLocalizedNameOfBlock(getCasing(4), 2); } if (mCasingName[3].toLowerCase().contains(".name")) {
+ * mCasingName[3] = LangUtils.getLocalizedNameOfBlock(getCasing(3), 15); } if
+ * (mCasingName[4].toLowerCase().contains(".name")) { mCasingName[4] =
+ * LangUtils.getLocalizedNameOfBlock(getCasing(1), 13); } return new String[]{ "Advanced Integrated Assembly Line"
+ * }; }
+ */
@Override
protected final GT_Multiblock_Tooltip_Builder createTooltip() {
@@ -133,8 +126,7 @@ public class GregtechMetaTileEntity_Adv_AssemblyLine
ItemStack tStack[] = new ItemStack[15];
FluidStack[] tFluids = new FluidStack[4];
boolean findRecipe = false;
- nextDS:
- for (ItemStack tDataStick : tDataStickList) {
+ nextDS: for (ItemStack tDataStick : tDataStickList) {
NBTTagCompound tTag = tDataStick.getTagCompound();
if (tTag == null) continue;
for (int i = 0; i < 15; i++) {
@@ -144,8 +136,7 @@ public class GregtechMetaTileEntity_Adv_AssemblyLine
continue nextDS;
}
- ItemStack stackInSlot =
- mInputBusses.get(i).getBaseMetaTileEntity().getStackInSlot(0);
+ ItemStack stackInSlot = mInputBusses.get(i).getBaseMetaTileEntity().getStackInSlot(0);
boolean flag = true;
if (count > 0) {
for (int j = 0; j < count; j++) {
@@ -185,8 +176,7 @@ public class GregtechMetaTileEntity_Adv_AssemblyLine
continue nextDS;
}
FluidStack fluidInHatch = mInputHatches.get(i).mFluid;
- if (fluidInHatch == null
- || !GT_Utility.areFluidsEqual(fluidInHatch, tFluids[i], true)
+ if (fluidInHatch == null || !GT_Utility.areFluidsEqual(fluidInHatch, tFluids[i], true)
|| fluidInHatch.amount < tFluids[i].amount) {
if (GT_Values.D1) System.out.println(i + " not accepted");
continue nextDS;
@@ -196,7 +186,7 @@ public class GregtechMetaTileEntity_Adv_AssemblyLine
if (GT_Values.D1) System.out.println("Input accepted, check other values");
if (!tTag.hasKey("output")) continue;
- mOutputItems = new ItemStack[] {GT_Utility.loadItem(tTag, "output")};
+ mOutputItems = new ItemStack[] { GT_Utility.loadItem(tTag, "output") };
if (mOutputItems[0] == null || !GT_Utility.isStackValid(mOutputItems[0])) continue;
if (!tTag.hasKey("time")) continue;
@@ -274,10 +264,20 @@ public class GregtechMetaTileEntity_Adv_AssemblyLine
// Layer 1
aShieldingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(1), this.META_Shielding, -6, xDir, zDir);
- aIntegralCasingCount +=
- checkIntegralRing(aBaseMetaTileEntity, getCasing(0), this.META_IntegralCasing, -6, xDir, zDir);
+ aIntegralCasingCount += checkIntegralRing(
+ aBaseMetaTileEntity,
+ getCasing(0),
+ this.META_IntegralCasing,
+ -6,
+ xDir,
+ zDir);
aContainmentChamberCount += checkContainmentRing(
- aBaseMetaTileEntity, getCasing(4), this.META_ContainmentChamberCasing, -6, xDir, zDir);
+ aBaseMetaTileEntity,
+ getCasing(4),
+ this.META_ContainmentChamberCasing,
+ -6,
+ xDir,
+ zDir);
log("Layer 1 is Valid. Moving to Layer 2.");
// Layer 2
@@ -286,14 +286,24 @@ public class GregtechMetaTileEntity_Adv_AssemblyLine
log("Layer 2 is Valid. Moving to Layer 3.");
// Layer 3
- aContainmentCasingCount +=
- checkOuterRing(aBaseMetaTileEntity, getCasing(3), this.META_ContainmentCasing, -4, xDir, zDir);
+ aContainmentCasingCount += checkOuterRing(
+ aBaseMetaTileEntity,
+ getCasing(3),
+ this.META_ContainmentCasing,
+ -4,
+ xDir,
+ zDir);
aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4), this.META_PipeCasing, -4, xDir, zDir);
log("Layer 3 is Valid. Moving to Layer 4.");
// Layer 4
- aContainmentCasingCount +=
- checkOuterRing(aBaseMetaTileEntity, getCasing(3), this.META_ContainmentCasing, -3, xDir, zDir);
+ aContainmentCasingCount += checkOuterRing(
+ aBaseMetaTileEntity,
+ getCasing(3),
+ this.META_ContainmentCasing,
+ -3,
+ xDir,
+ zDir);
aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4), this.META_PipeCasing, -3, xDir, zDir);
log("Layer 4 is Valid. Moving to Layer 5.");
@@ -304,10 +314,20 @@ public class GregtechMetaTileEntity_Adv_AssemblyLine
// Layer 6
aShieldingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(1), this.META_Shielding, -1, xDir, zDir);
- aIntegralCasingCount +=
- checkIntegralRing(aBaseMetaTileEntity, getCasing(0), this.META_IntegralCasing, -1, xDir, zDir);
+ aIntegralCasingCount += checkIntegralRing(
+ aBaseMetaTileEntity,
+ getCasing(0),
+ this.META_IntegralCasing,
+ -1,
+ xDir,
+ zDir);
aContainmentChamberCount += checkContainmentRing(
- aBaseMetaTileEntity, getCasing(4), this.META_ContainmentChamberCasing, -1, xDir, zDir);
+ aBaseMetaTileEntity,
+ getCasing(4),
+ this.META_ContainmentChamberCasing,
+ -1,
+ xDir,
+ zDir);
log("Layer 6 is Valid. Moving to Top Layer.");
// Top Layer
@@ -366,7 +386,8 @@ public class GregtechMetaTileEntity_Adv_AssemblyLine
log("Not enough " + LangUtils.getLocalizedNameOfBlock(getCasing(0), 6) + "s, require 48.");
if (aOwner != null) {
PlayerUtils.messagePlayer(
- aOwner, "Not enough " + LangUtils.getLocalizedNameOfBlock(getCasing(0), 6) + "s, require 48.");
+ aOwner,
+ "Not enough " + LangUtils.getLocalizedNameOfBlock(getCasing(0), 6) + "s, require 48.");
}
return false;
}
@@ -392,8 +413,8 @@ public class GregtechMetaTileEntity_Adv_AssemblyLine
return false;
}
- public int checkEntireLayer(
- IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) {
+ public int checkEntireLayer(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir,
+ int zDir) {
int aCasingCount = 0;
for (int x = -4; x < 5; x++) {
for (int z = -4; z < 5; z++) {
@@ -414,10 +435,16 @@ public class GregtechMetaTileEntity_Adv_AssemblyLine
if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) {
aCasingCount++;
}
- final IGregTechTileEntity tTileEntity =
- aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z);
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity
+ .getIGregTechTileEntityOffset(xDir + x, aY, zDir + z);
if (!isValidBlockForStructure(
- tTileEntity, CASING_TEXTURE_ID, true, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) {
+ tTileEntity,
+ CASING_TEXTURE_ID,
+ true,
+ aCurrentBlock,
+ aCurrentMeta,
+ aBlock,
+ aMeta)) {
log("Layer has error. Height: " + aY);
// this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3);
return 0;
@@ -427,8 +454,8 @@ public class GregtechMetaTileEntity_Adv_AssemblyLine
return aCasingCount;
}
- public int checkOuterRing(
- IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) {
+ public int checkOuterRing(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir,
+ int zDir) {
int aCasingCount = 0;
for (int x = -4; x < 5; x++) {
for (int z = -4; z < 5; z++) {
@@ -455,10 +482,16 @@ public class GregtechMetaTileEntity_Adv_AssemblyLine
if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) {
aCasingCount++;
}
- final IGregTechTileEntity tTileEntity =
- aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z);
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity
+ .getIGregTechTileEntityOffset(xDir + x, aY, zDir + z);
if (!isValidBlockForStructure(
- tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) {
+ tTileEntity,
+ CASING_TEXTURE_ID,
+ false,
+ aCurrentBlock,
+ aCurrentMeta,
+ aBlock,
+ aMeta)) {
log("Layer has error. Height: " + aY);
// this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3);
return 0;
@@ -468,8 +501,8 @@ public class GregtechMetaTileEntity_Adv_AssemblyLine
return aCasingCount;
}
- public int checkIntegralRing(
- IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) {
+ public int checkIntegralRing(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir,
+ int zDir) {
int aCasingCount = 0;
for (int x = -3; x < 4; x++) {
for (int z = -3; z < 4; z++) {
@@ -496,10 +529,16 @@ public class GregtechMetaTileEntity_Adv_AssemblyLine
if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) {
aCasingCount++;
}
- final IGregTechTileEntity tTileEntity =
- aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z);
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity
+ .getIGregTechTileEntityOffset(xDir + x, aY, zDir + z);
if (!isValidBlockForStructure(
- tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) {
+ tTileEntity,
+ CASING_TEXTURE_ID,
+ false,
+ aCurrentBlock,
+ aCurrentMeta,
+ aBlock,
+ aMeta)) {
log("Layer has error. Height: " + aY);
// this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3);
return 0;
@@ -509,8 +548,8 @@ public class GregtechMetaTileEntity_Adv_AssemblyLine
return aCasingCount;
}
- public int checkPipes(
- IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) {
+ public int checkPipes(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir,
+ int zDir) {
int aCasingCount = 0;
for (int x = -1; x < 2; x++) {
for (int z = -1; z < 2; z++) {
@@ -518,8 +557,7 @@ public class GregtechMetaTileEntity_Adv_AssemblyLine
int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY;
int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z;
// Skip the corners
- if ((x == 1 && z == 1)
- || (x == -1 && z == -1)
+ if ((x == 1 && z == 1) || (x == -1 && z == -1)
|| (x == 1 && z == -1)
|| (x == -1 && z == 1)
|| (x == 0 && z == 0)) {
@@ -528,24 +566,29 @@ public class GregtechMetaTileEntity_Adv_AssemblyLine
if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) {
aCasingCount++;
}
- final IGregTechTileEntity tTileEntity =
- aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z);
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity
+ .getIGregTechTileEntityOffset(xDir + x, aY, zDir + z);
if (!isValidBlockForStructure(
- tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) {
+ tTileEntity,
+ CASING_TEXTURE_ID,
+ false,
+ aCurrentBlock,
+ aCurrentMeta,
+ aBlock,
+ aMeta)) {
log("Pipe has error. Height: " + aY);
// this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta,
// 3);
return 0;
- }
- ;
+ } ;
}
}
}
return aCasingCount;
}
- public int checkContainmentRing(
- IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) {
+ public int checkContainmentRing(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir,
+ int zDir) {
int aCasingCount = 0;
for (int x = -2; x < 3; x++) {
for (int z = -2; z < 3; z++) {
@@ -562,10 +605,16 @@ public class GregtechMetaTileEntity_Adv_AssemblyLine
if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) {
aCasingCount++;
}
- final IGregTechTileEntity tTileEntity =
- aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z);
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity
+ .getIGregTechTileEntityOffset(xDir + x, aY, zDir + z);
if (!isValidBlockForStructure(
- tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) {
+ tTileEntity,
+ CASING_TEXTURE_ID,
+ false,
+ aCurrentBlock,
+ aCurrentMeta,
+ aBlock,
+ aMeta)) {
log("Layer has error. Height: " + aY);
// this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3);
return 0;
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java
index 66a72aec86..11c9fa94ae 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java
@@ -5,11 +5,21 @@ import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+import java.util.ArrayList;
+import java.util.List;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits;
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.IHatchElement;
@@ -27,17 +37,9 @@ import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
-import java.util.ArrayList;
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.FluidStack;
-public class GregtechMetaTileEntity_Adv_DistillationTower
- extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_Adv_DistillationTower>
- implements ISurvivalConstructable {
+public class GregtechMetaTileEntity_Adv_DistillationTower extends
+ GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_Adv_DistillationTower> implements ISurvivalConstructable {
private Mode mMode = Mode.DistillationTower;
private boolean mUpgraded = false;
@@ -69,30 +71,20 @@ public class GregtechMetaTileEntity_Adv_DistillationTower
@Override
public IStructureDefinition<GregtechMetaTileEntity_Adv_DistillationTower> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
- IHatchElement<GregtechMetaTileEntity_Adv_DistillationTower> layeredOutputHatch = OutputHatch.withCount(
- GregtechMetaTileEntity_Adv_DistillationTower::getCurrentLayerOutputHatchCount)
+ IHatchElement<GregtechMetaTileEntity_Adv_DistillationTower> layeredOutputHatch = OutputHatch
+ .withCount(GregtechMetaTileEntity_Adv_DistillationTower::getCurrentLayerOutputHatchCount)
.withAdder(GregtechMetaTileEntity_Adv_DistillationTower::addLayerOutputHatch);
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_Adv_DistillationTower>builder()
- .addShape(STRUCTURE_PIECE_BASE, transpose(new String[][] {
- {"b~b", "bbb", "bbb"},
- }))
- .addShape(STRUCTURE_PIECE_LAYER, transpose(new String[][] {
- {"lll", "lcl", "lll"},
- }))
- .addShape(STRUCTURE_PIECE_LAYER_HINT, transpose(new String[][] {
- {"lll", "l-l", "lll"},
- }))
- .addShape(STRUCTURE_PIECE_TOP_HINT, transpose(new String[][] {
- {"ttt", "ttt", "ttt"},
- }))
+ .addShape(STRUCTURE_PIECE_BASE, transpose(new String[][] { { "b~b", "bbb", "bbb" }, }))
+ .addShape(STRUCTURE_PIECE_LAYER, transpose(new String[][] { { "lll", "lcl", "lll" }, }))
+ .addShape(STRUCTURE_PIECE_LAYER_HINT, transpose(new String[][] { { "lll", "l-l", "lll" }, }))
+ .addShape(STRUCTURE_PIECE_TOP_HINT, transpose(new String[][] { { "ttt", "ttt", "ttt" }, }))
.addElement(
'b',
ofChain(
buildHatchAdder(GregtechMetaTileEntity_Adv_DistillationTower.class)
.atLeast(Energy, OutputBus, InputHatch, InputBus, Maintenance)
- .disallowOnly(ForgeDirection.UP)
- .casingIndex(getCasingTextureId())
- .dot(1)
+ .disallowOnly(ForgeDirection.UP).casingIndex(getCasingTextureId()).dot(1)
.build(),
ofBlock(GregTech_API.sBlockCasings4, 1)))
.addElement(
@@ -101,14 +93,11 @@ public class GregtechMetaTileEntity_Adv_DistillationTower
buildHatchAdder(GregtechMetaTileEntity_Adv_DistillationTower.class)
.atLeast(layeredOutputHatch, Energy, Maintenance)
.disallowOnly(ForgeDirection.UP, ForgeDirection.DOWN)
- .casingIndex(getCasingTextureId())
- .dot(2)
- .build(),
+ .casingIndex(getCasingTextureId()).dot(2).build(),
onElementPass(
GregtechMetaTileEntity_Adv_DistillationTower::onTopLayerFound,
ofHatchAdder(
- GregtechMetaTileEntity_Adv_DistillationTower
- ::addMufflerToMachineList,
+ GregtechMetaTileEntity_Adv_DistillationTower::addMufflerToMachineList,
getCasingTextureId(),
3)),
ofBlock(GregTech_API.sBlockCasings4, 1)))
@@ -118,22 +107,19 @@ public class GregtechMetaTileEntity_Adv_DistillationTower
onElementPass(
GregtechMetaTileEntity_Adv_DistillationTower::onTopLayerFound,
ofHatchAdder(
- GregtechMetaTileEntity_Adv_DistillationTower
- ::addMufflerToMachineList,
+ GregtechMetaTileEntity_Adv_DistillationTower::addMufflerToMachineList,
getCasingTextureId(),
3)),
onElementPass(
GregtechMetaTileEntity_Adv_DistillationTower::onTopLayerFound,
ofHatchAdder(
- GregtechMetaTileEntity_Adv_DistillationTower
- ::addOutputToMachineList,
+ GregtechMetaTileEntity_Adv_DistillationTower::addOutputToMachineList,
getCasingTextureId(),
3)),
onElementPass(
GregtechMetaTileEntity_Adv_DistillationTower::onTopLayerFound,
ofHatchAdder(
- GregtechMetaTileEntity_Adv_DistillationTower
- ::addMaintenanceToMachineList,
+ GregtechMetaTileEntity_Adv_DistillationTower::addMaintenanceToMachineList,
getCasingTextureId(),
3)),
onElementPass(
@@ -143,10 +129,8 @@ public class GregtechMetaTileEntity_Adv_DistillationTower
.addElement(
't',
buildHatchAdder(GregtechMetaTileEntity_Adv_DistillationTower.class)
- .atLeast(layeredOutputHatch, Muffler)
- .disallowOnly(ForgeDirection.DOWN)
- .casingIndex(getCasingTextureId())
- .dot(2)
+ .atLeast(layeredOutputHatch, Muffler).disallowOnly(ForgeDirection.DOWN)
+ .casingIndex(getCasingTextureId()).dot(2)
.buildAndChain(GregTech_API.sBlockCasings4, 1))
.build();
}
@@ -154,15 +138,14 @@ public class GregtechMetaTileEntity_Adv_DistillationTower
}
protected int getCurrentLayerOutputHatchCount() {
- return mOutputHatchesByLayer.size() < mHeight || mHeight <= 0
- ? 0
+ return mOutputHatchesByLayer.size() < mHeight || mHeight <= 0 ? 0
: mOutputHatchesByLayer.get(mHeight - 1).size();
}
protected boolean addLayerOutputHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (aTileEntity == null
- || aTileEntity.isDead()
- || !(aTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Output)) return false;
+ if (aTileEntity == null || aTileEntity.isDead()
+ || !(aTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Output))
+ return false;
while (mOutputHatchesByLayer.size() < mHeight) mOutputHatchesByLayer.add(new ArrayList<>());
GT_MetaTileEntity_Hatch_Output tHatch = (GT_MetaTileEntity_Hatch_Output) aTileEntity.getMetaTileEntity();
tHatch.updateTexture(aBaseCasingIndex);
@@ -176,25 +159,16 @@ public class GregtechMetaTileEntity_Adv_DistillationTower
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Advanced Distillation Tower")
- .addInfo("Use 85% less energy in distillery mode")
- .addInfo("250%/100% faster in DT/distillery mode")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Advanced Distillation Tower")
+ .addInfo("Use 85% less energy in distillery mode").addInfo("250%/100% faster in DT/distillery mode")
.addInfo("Right click the controller with screwdriver to change mode.")
- .addInfo("Max parallel dictated by tower tier and mode")
- .addInfo("DTower Mode: T1=4, T2=12")
+ .addInfo("Max parallel dictated by tower tier and mode").addInfo("DTower Mode: T1=4, T2=12")
.addInfo("Distilery Mode: Tower Tier * (4*InputTier)")
- .addInfo("Distilery Mode require a full height tower")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .addCasingInfo("Clean Stainless Steel Machine Casing", 7)
- .addInputBus("Bottom Casing", 1)
- .addOutputBus("Bottom Casing", 1)
- .addInputHatch("Bottom Casing", 1)
- .addMaintenanceHatch("Bottom Casing", 1)
- .addEnergyHatch("Bottom Casing", 1)
- .addOutputHatch("One per layer except bottom", 2)
- .addMufflerHatch("Top Casing", 3)
+ .addInfo("Distilery Mode require a full height tower").addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator().addCasingInfo("Clean Stainless Steel Machine Casing", 7).addInputBus("Bottom Casing", 1)
+ .addOutputBus("Bottom Casing", 1).addInputHatch("Bottom Casing", 1)
+ .addMaintenanceHatch("Bottom Casing", 1).addEnergyHatch("Bottom Casing", 1)
+ .addOutputHatch("One per layer except bottom", 2).addMufflerHatch("Top Casing", 3)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -218,12 +192,28 @@ public class GregtechMetaTileEntity_Adv_DistillationTower
for (int i = 1; i < tTotalHeight - 1; i++) {
mHeight = i;
built = survivialBuildPiece(
- STRUCTURE_PIECE_LAYER_HINT, stackSize, 1, i, 0, elementBudget, env, false, true);
+ STRUCTURE_PIECE_LAYER_HINT,
+ stackSize,
+ 1,
+ i,
+ 0,
+ elementBudget,
+ env,
+ false,
+ true);
if (built >= 0) return built;
}
mHeight = tTotalHeight - 1;
return survivialBuildPiece(
- STRUCTURE_PIECE_TOP_HINT, stackSize, 1, tTotalHeight - 1, 0, elementBudget, env, false, true);
+ STRUCTURE_PIECE_TOP_HINT,
+ stackSize,
+ 1,
+ tTotalHeight - 1,
+ 0,
+ elementBudget,
+ env,
+ false,
+ true);
}
@Override
@@ -241,8 +231,7 @@ public class GregtechMetaTileEntity_Adv_DistillationTower
if (!checkPiece(STRUCTURE_PIECE_LAYER, 1, mHeight, 0)) {
return false;
}
- if (mOutputHatchesByLayer.size() < mHeight
- || mOutputHatchesByLayer.get(mHeight - 1).isEmpty())
+ if (mOutputHatchesByLayer.size() < mHeight || mOutputHatchesByLayer.get(mHeight - 1).isEmpty())
// layer without output hatch
return false;
if (mTopLayerFound || !mMufflerHatches.isEmpty()) {
@@ -364,7 +353,12 @@ public class GregtechMetaTileEntity_Adv_DistillationTower
FluidStack tFluid = hatch.getFluid();
if (tFluid != null) {
if (checkRecipeGeneric(
- inputs, new FluidStack[] {tFluid}, getMaxParallelRecipes(), 100, 250, 10000)) {
+ inputs,
+ new FluidStack[] { tFluid },
+ getMaxParallelRecipes(),
+ 100,
+ 250,
+ 10000)) {
return true;
}
}
@@ -430,9 +424,10 @@ public class GregtechMetaTileEntity_Adv_DistillationTower
}
private enum Mode {
+
DistillationTower(GT_Recipe_Map.sDistillationRecipes),
- Distillery(GT_Recipe_Map.sDistilleryRecipes),
- ;
+ Distillery(GT_Recipe_Map.sDistilleryRecipes),;
+
static final Mode[] VALUES = values();
private final GT_Recipe_Map recipeMap;
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java
index 5d17b2a922..9a2c679b37 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java
@@ -8,10 +8,19 @@ import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
import static gregtech.api.util.GT_StructureUtility.ofCoil;
+import java.util.ArrayList;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ChatComponentTranslation;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.enums.HeatingCoilLevel;
import gregtech.api.enums.TAE;
import gregtech.api.interfaces.IIconContainer;
@@ -28,12 +37,6 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GT_MetaTileEntity_Hatch_CustomFluidBase;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.ArrayList;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ChatComponentTranslation;
-import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_Adv_EBF>
implements ISurvivalConstructable {
@@ -71,23 +74,14 @@ public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase<
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Factory Grade Advanced Blast Furnace")
+ tt.addMachineType(getMachineType()).addInfo("Factory Grade Advanced Blast Furnace")
.addInfo("Speed: +120% | EU Usage: 90% | Parallel: 8")
.addInfo("Consumes 10L of " + mHotFuelName + " per second during operation")
- .addInfo("Constructed exactly the same as a normal EBF")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .addController("Bottom center")
- .addCasingInfo(mCasingName, 8)
- .addInputHatch("Any Casing", 1)
- .addInputBus("Any Casing", 1)
- .addOutputBus("Any Casing", 1)
- .addOutputHatch("Any Casing", 1)
- .addStructureHint(mHatchName, 1)
- .addEnergyHatch("Any Casing", 1)
- .addMufflerHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
+ .addInfo("Constructed exactly the same as a normal EBF").addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator().addController("Bottom center").addCasingInfo(mCasingName, 8)
+ .addInputHatch("Any Casing", 1).addInputBus("Any Casing", 1).addOutputBus("Any Casing", 1)
+ .addOutputHatch("Any Casing", 1).addStructureHint(mHatchName, 1).addEnergyHatch("Any Casing", 1)
+ .addMufflerHatch("Any Casing", 1).addMaintenanceHatch("Any Casing", 1)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -95,34 +89,25 @@ public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase<
@Override
public IStructureDefinition<GregtechMetaTileEntity_Adv_EBF> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
- STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_Adv_EBF>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC"},
- {"HHH", "H-H", "HHH"},
- {"HHH", "H-H", "HHH"},
- {"C~C", "CCC", "CCC"},
- }))
+ STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_Adv_EBF>builder().addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC" }, { "HHH", "H-H", "HHH" }, { "HHH", "H-H", "HHH" },
+ { "C~C", "CCC", "CCC" }, }))
.addElement(
'C',
ofChain(
buildHatchAdder(GregtechMetaTileEntity_Adv_EBF.class)
- .adder(GregtechMetaTileEntity_Adv_EBF::addPyrotheumHatch)
- .hatchId(968)
- .casingIndex(CASING_TEXTURE_ID)
- .dot(1)
- .build(),
- buildHatchAdder(GregtechMetaTileEntity_Adv_EBF.class)
- .atLeast(
- InputBus,
- OutputBus,
- Maintenance,
- Energy,
- Muffler,
- InputHatch,
- OutputHatch)
- .casingIndex(CASING_TEXTURE_ID)
- .dot(1)
- .build(),
+ .adder(GregtechMetaTileEntity_Adv_EBF::addPyrotheumHatch).hatchId(968)
+ .casingIndex(CASING_TEXTURE_ID).dot(1).build(),
+ buildHatchAdder(GregtechMetaTileEntity_Adv_EBF.class).atLeast(
+ InputBus,
+ OutputBus,
+ Maintenance,
+ Energy,
+ Muffler,
+ InputHatch,
+ OutputHatch).casingIndex(CASING_TEXTURE_ID).dot(1).build(),
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings3Misc, 11))))
.addElement(
'H',
@@ -260,13 +245,8 @@ public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase<
}
@Override
- public boolean checkRecipeGeneric(
- ItemStack[] aItemInputs,
- FluidStack[] aFluidInputs,
- int aMaxParallelRecipes,
- long aEUPercent,
- int aSpeedBonusPercent,
- int aOutputChanceRoll) {
+ public boolean checkRecipeGeneric(ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes,
+ long aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll) {
// Based on the Processing Array. A bit overkill, but very flexible.
// Reset outputs and progress stats
@@ -279,14 +259,13 @@ public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase<
byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
long tEnergy = getMaxInputEnergy();
- GT_Recipe tRecipe = this.getRecipeMap()
- .findRecipe(
- getBaseMetaTileEntity(),
- mLastRecipe,
- false,
- gregtech.api.enums.GT_Values.V[tTier],
- aFluidInputs,
- aItemInputs);
+ GT_Recipe tRecipe = this.getRecipeMap().findRecipe(
+ getBaseMetaTileEntity(),
+ mLastRecipe,
+ false,
+ gregtech.api.enums.GT_Values.V[tTier],
+ aFluidInputs,
+ aItemInputs);
// Remember last recipe - an optimization for findRecipe()
this.mLastRecipe = tRecipe;
@@ -294,14 +273,9 @@ public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase<
return false;
}
- GT_ParallelHelper helper = new GT_ParallelHelper()
- .setRecipe(tRecipe)
- .setItemInputs(aItemInputs)
- .setFluidInputs(aFluidInputs)
- .setAvailableEUt(tEnergy)
- .setMaxParallel(aMaxParallelRecipes)
- .enableConsumption()
- .enableOutputCalculation();
+ GT_ParallelHelper helper = new GT_ParallelHelper().setRecipe(tRecipe).setItemInputs(aItemInputs)
+ .setFluidInputs(aFluidInputs).setAvailableEUt(tEnergy).setMaxParallel(aMaxParallelRecipes)
+ .enableConsumption().enableOutputCalculation();
if (!mVoidExcess) {
helper.enableVoidProtection(this);
}
@@ -319,17 +293,11 @@ public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase<
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
- GT_OverclockCalculator calculator = new GT_OverclockCalculator()
- .setRecipeEUt(tRecipe.mEUt)
- .setEUt(tEnergy)
- .setDuration(tRecipe.mDuration)
- .setEUtDiscount(aEUPercent / 100.0f)
+ GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(tRecipe.mEUt).setEUt(tEnergy)
+ .setDuration(tRecipe.mDuration).setEUtDiscount(aEUPercent / 100.0f)
.setSpeedBoost(100.0f / (100.0f + aSpeedBonusPercent))
- .setParallel(Math.min(aMaxParallelRecipes, helper.getCurrentParallel()))
- .enableHeatOC()
- .enableHeatDiscount()
- .setRecipeHeat(tRecipe.mSpecialValue)
- .setMultiHeat((int) getCoilLevel().getHeat())
+ .setParallel(Math.min(aMaxParallelRecipes, helper.getCurrentParallel())).enableHeatOC()
+ .enableHeatDiscount().setRecipeHeat(tRecipe.mSpecialValue).setMultiHeat((int) getCoilLevel().getHeat())
.calculate();
lEUt = -calculator.getConsumption();
mMaxProgresstime = (int) Math.ceil(calculator.getDuration() * helper.getDurationMultiplier());
@@ -378,8 +346,10 @@ public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase<
@Override
public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
isBussesSeparate = !isBussesSeparate;
- aPlayer.addChatMessage(new ChatComponentTranslation(
- isBussesSeparate ? "interaction.separateBusses.enabled" : "interaction.separateBusses.disabled"));
+ aPlayer.addChatMessage(
+ new ChatComponentTranslation(
+ isBussesSeparate ? "interaction.separateBusses.enabled"
+ : "interaction.separateBusses.disabled"));
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java
index 8df07d8990..da6b43f82a 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java
@@ -1,5 +1,9 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced;
+import java.lang.reflect.Method;
+
+import net.minecraft.block.Block;
+
import gregtech.api.enums.Dyes;
import gregtech.api.enums.TAE;
import gregtech.api.enums.Textures;
@@ -19,8 +23,6 @@ import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.lang.reflect.Method;
-import net.minecraft.block.Block;
public class GregtechMetaTileEntity_Adv_Fusion_MK4 extends GT_MetaTileEntity_FusionComputer {
@@ -41,18 +43,12 @@ public class GregtechMetaTileEntity_Adv_Fusion_MK4 extends GT_MetaTileEntity_Fus
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Fusion Reactor")
- .addInfo("HARNESSING THE POWER OF A NEUTRON STAR")
- .addSeparator()
- .beginStructureBlock(15, 3, 15, false)
- .addController("See diagram when placed")
- .addCasingInfo("Fusion Machine Casings MK III", 79)
- .addStructureInfo("Cover the coils with casing")
+ tt.addMachineType("Fusion Reactor").addInfo("HARNESSING THE POWER OF A NEUTRON STAR").addSeparator()
+ .beginStructureBlock(15, 3, 15, false).addController("See diagram when placed")
+ .addCasingInfo("Fusion Machine Casings MK III", 79).addStructureInfo("Cover the coils with casing")
.addOtherStructurePart("Advanced Fusion Coils", "Center part of the ring")
- .addEnergyHatch("1-16, Specified casings", 2)
- .addInputHatch("2-16, Specified casings", 1)
- .addOutputHatch("1-16, Specified casings", 3)
- .addStructureInfo("ALL Hatches must be UHV or better")
+ .addEnergyHatch("1-16, Specified casings", 2).addInputHatch("2-16, Specified casings", 1)
+ .addOutputHatch("1-16, Specified casings", 3).addStructureInfo("ALL Hatches must be UHV or better")
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -103,46 +99,34 @@ public class GregtechMetaTileEntity_Adv_Fusion_MK4 extends GT_MetaTileEntity_Fus
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
if (aSide == aFacing) {
return new ITexture[] {
- new GT_RenderedTexture(
- Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, Dyes.getModulation(-1, Dyes._NULL.mRGBa)),
- TextureFactory.builder()
- .addIcon(this.getIconOverlay())
- .extFacing()
- .build()
- };
+ new GT_RenderedTexture(
+ Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS,
+ Dyes.getModulation(-1, Dyes._NULL.mRGBa)),
+ TextureFactory.builder().addIcon(this.getIconOverlay()).extFacing().build() };
} else if (!aActive) {
- return new ITexture[] {
- new GT_RenderedTexture(
- Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, Dyes.getModulation(-1, Dyes._NULL.mRGBa))
- };
+ return new ITexture[] { new GT_RenderedTexture(
+ Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS,
+ Dyes.getModulation(-1, Dyes._NULL.mRGBa)) };
} else {
- return new ITexture[] {
- new GT_RenderedTexture(
- TexturesGtBlock.TEXTURE_CASING_FUSION_CASING_ULTRA, Dyes.getModulation(-1, Dyes._NULL.mRGBa))
- };
+ return new ITexture[] { new GT_RenderedTexture(
+ TexturesGtBlock.TEXTURE_CASING_FUSION_CASING_ULTRA,
+ Dyes.getModulation(-1, Dyes._NULL.mRGBa)) };
}
}
@Override
public ITexture getTextureOverlay() {
return new GT_RenderedTexture(
- this.mMaxProgresstime > 0
- ? TexturesGtBlock.Casing_Machine_Screen_3
+ this.mMaxProgresstime > 0 ? TexturesGtBlock.Casing_Machine_Screen_3
: TexturesGtBlock.Casing_Machine_Screen_1);
}
public IIconContainer getIconOverlay() {
- return this.mMaxProgresstime > 0
- ? TexturesGtBlock.Casing_Machine_Screen_3
+ return this.mMaxProgresstime > 0 ? TexturesGtBlock.Casing_Machine_Screen_3
: TexturesGtBlock.Casing_Machine_Screen_1;
}
@@ -181,11 +165,7 @@ public class GregtechMetaTileEntity_Adv_Fusion_MK4 extends GT_MetaTileEntity_Fus
}
}
- return new String[] {
- "Fusion Reactor MK " + tier,
- "EU Required: " + powerRequired + "EU/t",
- "Stored EU: " + mEUStore + " / " + maxEUStore(),
- "Plasma Output: " + plasmaOut + "L/t"
- };
+ return new String[] { "Fusion Reactor MK " + tier, "EU Required: " + powerRequired + "EU/t",
+ "Stored EU: " + mEUStore + " / " + maxEUStore(), "Plasma Output: " + plasmaOut + "L/t" };
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_HeatExchanger.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_HeatExchanger.java
index 00cd8e9c1f..31742df05f 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_HeatExchanger.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_HeatExchanger.java
@@ -3,9 +3,18 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.a
import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.StatCollector;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.TAE;
import gregtech.api.interfaces.IIconContainer;
@@ -20,13 +29,6 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.material.ALLOY;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.StatCollector;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntity_Adv_HeatExchanger
extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_Adv_HeatExchanger> {
@@ -34,65 +36,66 @@ public class GregtechMetaTileEntity_Adv_HeatExchanger
private static final int CASING_INDEX = TAE.getIndexFromPage(1, 12);
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GregtechMetaTileEntity_Adv_HeatExchanger> STRUCTURE_DEFINITION =
- StructureDefinition.<GregtechMetaTileEntity_Adv_HeatExchanger>builder()
- .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] {
- {" ccc ", "cCCCc", "cCCCc", "cCCCc", " ccc "},
- {" ccc ", "cPPPc", "cPPPc", "cPPPc", " ccc "},
- {" ccc ", "cPPPc", "cPPPc", "cPPPc", " ccc "},
- {" ccc ", "cPPPc", "cPPPc", "cPPPc", " ccc "},
- {" ccc ", "cPPPc", "cPPPc", "cPPPc", " ccc "},
- {" c~c ", "cPPPc", "cPPPc", "cPPPc", " ccc "},
- {" hhh ", "hHHHh", "hHHHh", "hHHHh", " hhh "},
- {" f f ", "f f", " ", "f f", " f f "},
- {" f f ", "f f", " ", "f f", " f f "},
- }))
- .addElement('P', ofBlock(GregTech_API.sBlockCasings2, 15))
- .addElement('f', ofBlock(getFrame(), 0))
- .addElement(
- 'C',
- ofChain(
- ofHatchAdder(
- GregtechMetaTileEntity_Adv_HeatExchanger::addColdFluidOutputToMachineList,
- CASING_INDEX,
- 2),
- onElementPass(
- GregtechMetaTileEntity_Adv_HeatExchanger::onCasingAdded,
- ofBlock(ModBlocks.blockSpecialMultiCasings, 14))))
- .addElement(
- 'H',
- ofChain(
- ofHatchAdder(
- GregtechMetaTileEntity_Adv_HeatExchanger::addHotFluidInputToMachineList,
- CASING_INDEX,
- 3),
- onElementPass(
- GregtechMetaTileEntity_Adv_HeatExchanger::onCasingAdded,
- ofBlock(ModBlocks.blockSpecialMultiCasings, 14))))
- .addElement(
- 'h',
- ofChain(
- ofHatchAdder(
- GregtechMetaTileEntity_Adv_HeatExchanger::addInputToMachineList,
- CASING_INDEX,
- 1),
- ofHatchAdder(
- GregtechMetaTileEntity_Adv_HeatExchanger::addOutputToMachineList,
- CASING_INDEX,
- 1),
- ofHatchAdder(
- GregtechMetaTileEntity_Adv_HeatExchanger::addMaintenanceToMachineList,
- CASING_INDEX,
- 1),
- onElementPass(
- GregtechMetaTileEntity_Adv_HeatExchanger::onCasingAdded,
- ofBlock(ModBlocks.blockSpecialMultiCasings, 14))))
- .addElement(
- 'c',
- ofChain(onElementPass(
+ private static final IStructureDefinition<GregtechMetaTileEntity_Adv_HeatExchanger> STRUCTURE_DEFINITION = StructureDefinition
+ .<GregtechMetaTileEntity_Adv_HeatExchanger>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] { { " ccc ", "cCCCc", "cCCCc", "cCCCc", " ccc " },
+ { " ccc ", "cPPPc", "cPPPc", "cPPPc", " ccc " },
+ { " ccc ", "cPPPc", "cPPPc", "cPPPc", " ccc " },
+ { " ccc ", "cPPPc", "cPPPc", "cPPPc", " ccc " },
+ { " ccc ", "cPPPc", "cPPPc", "cPPPc", " ccc " },
+ { " c~c ", "cPPPc", "cPPPc", "cPPPc", " ccc " },
+ { " hhh ", "hHHHh", "hHHHh", "hHHHh", " hhh " },
+ { " f f ", "f f", " ", "f f", " f f " },
+ { " f f ", "f f", " ", "f f", " f f " }, }))
+ .addElement('P', ofBlock(GregTech_API.sBlockCasings2, 15)).addElement('f', ofBlock(getFrame(), 0))
+ .addElement(
+ 'C',
+ ofChain(
+ ofHatchAdder(
+ GregtechMetaTileEntity_Adv_HeatExchanger::addColdFluidOutputToMachineList,
+ CASING_INDEX,
+ 2),
+ onElementPass(
+ GregtechMetaTileEntity_Adv_HeatExchanger::onCasingAdded,
+ ofBlock(ModBlocks.blockSpecialMultiCasings, 14))))
+ .addElement(
+ 'H',
+ ofChain(
+ ofHatchAdder(
+ GregtechMetaTileEntity_Adv_HeatExchanger::addHotFluidInputToMachineList,
+ CASING_INDEX,
+ 3),
+ onElementPass(
+ GregtechMetaTileEntity_Adv_HeatExchanger::onCasingAdded,
+ ofBlock(ModBlocks.blockSpecialMultiCasings, 14))))
+ .addElement(
+ 'h',
+ ofChain(
+ ofHatchAdder(
+ GregtechMetaTileEntity_Adv_HeatExchanger::addInputToMachineList,
+ CASING_INDEX,
+ 1),
+ ofHatchAdder(
+ GregtechMetaTileEntity_Adv_HeatExchanger::addOutputToMachineList,
+ CASING_INDEX,
+ 1),
+ ofHatchAdder(
+ GregtechMetaTileEntity_Adv_HeatExchanger::addMaintenanceToMachineList,
+ CASING_INDEX,
+ 1),
+ onElementPass(
+ GregtechMetaTileEntity_Adv_HeatExchanger::onCasingAdded,
+ ofBlock(ModBlocks.blockSpecialMultiCasings, 14))))
+ .addElement(
+ 'c',
+ ofChain(
+ onElementPass(
GregtechMetaTileEntity_Adv_HeatExchanger::onCasingAdded,
ofBlock(ModBlocks.blockSpecialMultiCasings, 14))))
- .build();
+ .build();
public static float penalty_per_config = 0.015f; // penalize 1.5% efficiency per circuitry level (1-25)
private GT_MetaTileEntity_Hatch_Input mInputHotFluidHatch;
@@ -113,30 +116,23 @@ public class GregtechMetaTileEntity_Adv_HeatExchanger
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the XL Heat Exchanger")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the XL Heat Exchanger")
.addInfo("More complicated than a Fusion Reactor. Seriously")
- .addInfo("But you know this by now, right?")
- .addInfo("Works as fast as 16 Large Heat Exchangers")
- .addSeparator()
- .addInfo("Inputs are Hot Coolant or Lava")
+ .addInfo("But you know this by now, right?").addInfo("Works as fast as 16 Large Heat Exchangers")
+ .addSeparator().addInfo("Inputs are Hot Coolant or Lava")
.addInfo("Outputs Coolant or Pahoehoe Lava and SH Steam/Steam")
.addInfo("Outputs SH Steam if input flow is equal to or above a certain value:")
.addInfo("Hot Coolant: 12,800 L/s, maximum 25,600 EU/t, max output 6,400,000 SH Steam/s")
.addInfo("Lava: 16,000 L/s, maximum 32,000 EU/t, max output 2,560,000 SH Steam/s")
.addInfo("A circuit in the controller lowers the SH Steam threshold and efficiency")
- .addInfo("2400 L/s reduction and 1.5% efficiency loss per circuit config over 1")
- .addSeparator()
- .beginStructureBlock(5, 9, 5, false)
- .addController("Front bottom")
+ .addInfo("2400 L/s reduction and 1.5% efficiency loss per circuit config over 1").addSeparator()
+ .beginStructureBlock(5, 9, 5, false).addController("Front bottom")
.addCasingInfo("Reinforced Heat Exchanger Casing", 90)
.addOtherStructurePart("Tungstensteel Pipe Casing", "Center 3x5x3 (45 blocks)")
- .addMaintenanceHatch("Any casing", 1)
- .addInputHatch("Hot fluid, bottom center", 2)
+ .addMaintenanceHatch("Any casing", 1).addInputHatch("Hot fluid, bottom center", 2)
.addInputHatch("Distilled water, any bottom layer casing", 1)
.addOutputHatch("Cold fluid, top center", 3)
- .addOutputHatch("Steam/SH Steam, any bottom layer casing", 1)
- .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ .addOutputHatch("Steam/SH Steam, any bottom layer casing", 1).toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -217,12 +213,12 @@ public class GregtechMetaTileEntity_Adv_HeatExchanger
return false;
}
- superheated = fluidAmountToConsume
- >= superheated_threshold; // set the internal superheated flag if we have enough hot fluid. Used in the
+ superheated = fluidAmountToConsume >= superheated_threshold; // set the internal superheated flag if we have
+ // enough hot fluid. Used in the
// onRunningTick method.
- fluidAmountToConsume = Math.min(
- fluidAmountToConsume,
- superheated_threshold * 2); // Don't consume too much hot fluid per second, maximum is 2x SH threshold.
+ fluidAmountToConsume = Math.min(fluidAmountToConsume, superheated_threshold * 2); // Don't consume too much hot
+ // fluid per second, maximum
+ // is 2x SH threshold.
mInputHotFluidHatch.drain(fluidAmountToConsume, true);
this.mMaxProgresstime = 20;
this.lEUt = (long) (fluidAmountToConsume * steam_output_multiplier * efficiency);
@@ -245,8 +241,8 @@ public class GregtechMetaTileEntity_Adv_HeatExchanger
@Override
public boolean onRunningTick(ItemStack aStack) {
if (this.lEUt > 0) {
- int tGeneratedEU =
- (int) (this.lEUt * 2L * this.mEfficiency / 10000L); // APPROXIMATELY how much steam to generate.
+ int tGeneratedEU = (int) (this.lEUt * 2L * this.mEfficiency / 10000L); // APPROXIMATELY how much steam to
+ // generate.
if (tGeneratedEU > 0) {
if (superheated) tGeneratedEU /= 2; // We produce half as much superheated steam if necessary
@@ -259,8 +255,9 @@ public class GregtechMetaTileEntity_Adv_HeatExchanger
if (depleteInput(distilledStack)) // Consume the distilled water
{
if (superheated) {
- addOutput(FluidRegistry.getFluidStack(
- "ic2superheatedsteam", tGeneratedEU)); // Generate superheated steam
+ addOutput(FluidRegistry.getFluidStack("ic2superheatedsteam", tGeneratedEU)); // Generate
+ // superheated
+ // steam
} else {
addOutput(GT_ModHandler.getSteam(tGeneratedEU)); // Generate regular steam
}
@@ -344,26 +341,43 @@ public class GregtechMetaTileEntity_Adv_HeatExchanger
@Override
public String[] getExtraInfoData() {
return new String[] {
- StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + EnumChatFormatting.GREEN
- + GT_Utility.formatNumbers(mProgresstime / 20) + EnumChatFormatting.RESET + " s / "
- + EnumChatFormatting.YELLOW
- + GT_Utility.formatNumbers(mMaxProgresstime / 20) + EnumChatFormatting.RESET + " s",
- StatCollector.translateToLocal("GT5U.multiblock.usage") + " "
- + StatCollector.translateToLocal("GT5U.LHE.steam") + ": "
- + (superheated ? EnumChatFormatting.RED : EnumChatFormatting.YELLOW)
- + GT_Utility.formatNumbers(superheated ? -2 * lEUt : -lEUt) + EnumChatFormatting.RESET + " EU/t",
- StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " + EnumChatFormatting.RED
- + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + " "
- + StatCollector.translateToLocal("GT5U.multiblock.efficiency")
- + ": " + EnumChatFormatting.YELLOW
- + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %",
- StatCollector.translateToLocal("GT5U.LHE.superheated") + ": "
- + (superheated ? EnumChatFormatting.RED : EnumChatFormatting.BLUE) + superheated
- + EnumChatFormatting.RESET,
- StatCollector.translateToLocal("GT5U.LHE.superheated") + " "
- + StatCollector.translateToLocal("GT5U.LHE.threshold") + ": " + EnumChatFormatting.GREEN
- + GT_Utility.formatNumbers(superheated_threshold) + EnumChatFormatting.RESET
- };
+ StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": "
+ + EnumChatFormatting.GREEN
+ + GT_Utility.formatNumbers(mProgresstime / 20)
+ + EnumChatFormatting.RESET
+ + " s / "
+ + EnumChatFormatting.YELLOW
+ + GT_Utility.formatNumbers(mMaxProgresstime / 20)
+ + EnumChatFormatting.RESET
+ + " s",
+ StatCollector.translateToLocal("GT5U.multiblock.usage") + " "
+ + StatCollector.translateToLocal("GT5U.LHE.steam")
+ + ": "
+ + (superheated ? EnumChatFormatting.RED : EnumChatFormatting.YELLOW)
+ + GT_Utility.formatNumbers(superheated ? -2 * lEUt : -lEUt)
+ + EnumChatFormatting.RESET
+ + " EU/t",
+ StatCollector.translateToLocal("GT5U.multiblock.problems") + ": "
+ + EnumChatFormatting.RED
+ + (getIdealStatus() - getRepairStatus())
+ + EnumChatFormatting.RESET
+ + " "
+ + StatCollector.translateToLocal("GT5U.multiblock.efficiency")
+ + ": "
+ + EnumChatFormatting.YELLOW
+ + mEfficiency / 100.0F
+ + EnumChatFormatting.RESET
+ + " %",
+ StatCollector.translateToLocal("GT5U.LHE.superheated") + ": "
+ + (superheated ? EnumChatFormatting.RED : EnumChatFormatting.BLUE)
+ + superheated
+ + EnumChatFormatting.RESET,
+ StatCollector.translateToLocal("GT5U.LHE.superheated") + " "
+ + StatCollector.translateToLocal("GT5U.LHE.threshold")
+ + ": "
+ + EnumChatFormatting.GREEN
+ + GT_Utility.formatNumbers(superheated_threshold)
+ + EnumChatFormatting.RESET };
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java
index 5f4f0466c1..72d7e010c7 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java
@@ -4,8 +4,11 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
import static gregtech.api.GregTech_API.sBlockCasings4;
import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+import net.minecraft.item.ItemStack;
+
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -15,7 +18,6 @@ import gregtech.api.util.*;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.item.ItemStack;
public class GregtechMetaTileEntity_Adv_Implosion
extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_Adv_Implosion> {
@@ -43,20 +45,13 @@ public class GregtechMetaTileEntity_Adv_Implosion
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Factory Grade Advanced Implosion Compressor")
+ tt.addMachineType(getMachineType()).addInfo("Factory Grade Advanced Implosion Compressor")
.addInfo("Speed: +100% | EU Usage: 100% | Parallel: ((Tier/2)+1)")
.addInfo("Constructed exactly the same as a normal Implosion Compressor")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 3, 3, true)
- .addController("Front center")
- .addCasingInfo("Robust TungstenSteel Casing", 10)
- .addInputBus("Any casing", 1)
- .addOutputBus("Any casing", 1)
- .addEnergyHatch("Any casing", 1)
- .addMaintenanceHatch("Any casing", 1)
- .addMufflerHatch("Any casing", 1)
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 3, true)
+ .addController("Front center").addCasingInfo("Robust TungstenSteel Casing", 10)
+ .addInputBus("Any casing", 1).addOutputBus("Any casing", 1).addEnergyHatch("Any casing", 1)
+ .addMaintenanceHatch("Any casing", 1).addMufflerHatch("Any casing", 1)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -65,11 +60,11 @@ public class GregtechMetaTileEntity_Adv_Implosion
public IStructureDefinition<GregtechMetaTileEntity_Adv_Implosion> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_Adv_Implosion>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC"},
- {"C~C", "C-C", "CCC"},
- {"CCC", "CCC", "CCC"},
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC" }, { "C~C", "C-C", "CCC" },
+ { "CCC", "CCC", "CCC" }, }))
.addElement(
'C',
ofChain(
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java
index f3c4e4abdf..04e36e7675 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java
@@ -7,10 +7,13 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose
import static gregtech.api.GregTech_API.sBlockCasings1;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import net.minecraft.item.ItemStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -19,7 +22,6 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_SteamMultiBase;
-import net.minecraft.item.ItemStack;
public class GregtechMetaTileEntity_SteamCompressor
extends GregtechMeta_SteamMultiBase<GregtechMetaTileEntity_SteamCompressor> implements ISurvivalConstructable {
@@ -59,42 +61,31 @@ public class GregtechMetaTileEntity_SteamCompressor
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Steam Compressor")
- .addInfo("Compresses " + getMaxParallelRecipes() + " things at a time")
- .addSeparator()
- .beginStructureBlock(3, 3, 4, true)
- .addController("Front center")
- .addCasingInfo(mCasingName, 28)
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Steam Compressor")
+ .addInfo("Compresses " + getMaxParallelRecipes() + " things at a time").addSeparator()
+ .beginStructureBlock(3, 3, 4, true).addController("Front center").addCasingInfo(mCasingName, 28)
.addOtherStructurePart(TT_steaminputbus, "Any casing", 1)
.addOtherStructurePart(TT_steamoutputbus, "Any casing", 1)
- .addOtherStructurePart(TT_steamhatch, "Any casing", 1)
- .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ .addOtherStructurePart(TT_steamhatch, "Any casing", 1).toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@Override
public IStructureDefinition<GregtechMetaTileEntity_SteamCompressor> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
- STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_SteamCompressor>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC", "CCC"},
- {"C~C", "C-C", "C-C", "CCC"},
- {"CCC", "CCC", "CCC", "CCC"},
- }))
+ STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_SteamCompressor>builder().addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC", "CCC" }, { "C~C", "C-C", "C-C", "CCC" },
+ { "CCC", "CCC", "CCC", "CCC" }, }))
.addElement(
'C',
ofChain(
- buildSteamInput(GregtechMetaTileEntity_SteamCompressor.class)
- .casingIndex(10)
- .dot(1)
- .build(),
- buildHatchAdder(GregtechMetaTileEntity_SteamCompressor.class)
- .atLeast(
- SteamHatchElement.InputBus_Steam, SteamHatchElement.OutputBus_Steam)
- .casingIndex(10)
- .dot(1)
+ buildSteamInput(GregtechMetaTileEntity_SteamCompressor.class).casingIndex(10).dot(1)
.build(),
+ buildHatchAdder(GregtechMetaTileEntity_SteamCompressor.class).atLeast(
+ SteamHatchElement.InputBus_Steam,
+ SteamHatchElement.OutputBus_Steam).casingIndex(10).dot(1).build(),
onElementPass(x -> ++x.mCasing, ofBlock(sBlockCasings1, 10))))
.build();
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java
index 1df761097a..710ff3495b 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java
@@ -5,10 +5,13 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
import static gregtech.api.GregTech_API.sBlockCasings1;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import net.minecraft.item.ItemStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -19,7 +22,6 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_SteamMultiBase;
-import net.minecraft.item.ItemStack;
public class GregtechMetaTileEntity_SteamMacerator
extends GregtechMeta_SteamMultiBase<GregtechMetaTileEntity_SteamMacerator> implements ISurvivalConstructable {
@@ -62,42 +64,31 @@ public class GregtechMetaTileEntity_SteamMacerator
mCasingName = ItemList.Casing_BronzePlatedBricks.get(1).getDisplayName();
}
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Steam Macerator")
- .addInfo("Macerates " + getMaxParallelRecipes() + " ores at a time")
- .addSeparator()
- .beginStructureBlock(3, 3, 3, true)
- .addController("Front center")
- .addCasingInfo(mCasingName, 14)
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Steam Macerator")
+ .addInfo("Macerates " + getMaxParallelRecipes() + " ores at a time").addSeparator()
+ .beginStructureBlock(3, 3, 3, true).addController("Front center").addCasingInfo(mCasingName, 14)
.addOtherStructurePart(TT_steaminputbus, "Any casing", 1)
.addOtherStructurePart(TT_steamoutputbus, "Any casing", 1)
- .addOtherStructurePart(TT_steamhatch, "Any casing", 1)
- .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ .addOtherStructurePart(TT_steamhatch, "Any casing", 1).toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@Override
public IStructureDefinition<GregtechMetaTileEntity_SteamMacerator> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
- STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_SteamMacerator>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC"},
- {"C~C", "C-C", "CCC"},
- {"CCC", "CCC", "CCC"},
- }))
+ STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_SteamMacerator>builder().addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC" }, { "C~C", "C-C", "CCC" },
+ { "CCC", "CCC", "CCC" }, }))
.addElement(
'C',
ofChain(
- buildSteamInput(GregtechMetaTileEntity_SteamMacerator.class)
- .casingIndex(10)
- .dot(1)
- .build(),
- buildHatchAdder(GregtechMetaTileEntity_SteamMacerator.class)
- .atLeast(
- SteamHatchElement.InputBus_Steam, SteamHatchElement.OutputBus_Steam)
- .casingIndex(10)
- .dot(1)
+ buildSteamInput(GregtechMetaTileEntity_SteamMacerator.class).casingIndex(10).dot(1)
.build(),
+ buildHatchAdder(GregtechMetaTileEntity_SteamMacerator.class).atLeast(
+ SteamHatchElement.InputBus_Steam,
+ SteamHatchElement.OutputBus_Steam).casingIndex(10).dot(1).build(),
onElementPass(x -> ++x.mCasing, ofBlock(sBlockCasings1, 10))))
.build();
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java
index cf69ce12cd..ae51703c00 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java
@@ -6,10 +6,20 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.enums.TAE;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.IIconContainer;
@@ -29,13 +39,6 @@ import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.helpers.CraftingHelper;
import gtPlusPlus.xmod.gregtech.common.helpers.autocrafter.AC_Helper_Utils;
-import java.lang.reflect.Field;
-import java.util.ArrayList;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraftforge.fluids.FluidStack;
public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase<GT4Entity_AutoCrafter>
implements ISurvivalConstructable {
@@ -50,6 +53,7 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase<GT4Entity
public CraftingHelper mInventoryCrafter;
public static enum MODE {
+
CRAFTING("CIRCUIT", "ASSEMBLY"),
ASSEMBLY("CRAFTING", "DISASSEMBLY"),
DISASSEMBLY("ASSEMBLY", "CIRCUIT"),
@@ -132,23 +136,14 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase<GT4Entity
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Highly Advanced Autocrafter")
+ tt.addMachineType(getMachineType()).addInfo("Highly Advanced Autocrafter")
.addInfo("Right Click with a Screwdriver to change mode")
.addInfo("200% faster than using single block machines of the same voltage")
- .addInfo("Processes two items per voltage tier")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 3, 3, true)
- .addController("Front Center")
- .addCasingInfo("Bulk Production Frame", 10)
- .addInputBus("Any Casing", 1)
- .addOutputBus("Any Casing", 1)
- .addInputHatch("Any Casing", 1)
- .addEnergyHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
- .addMufflerHatch("Any Casing", 1)
- .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ .addInfo("Processes two items per voltage tier").addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator().beginStructureBlock(3, 3, 3, true).addController("Front Center")
+ .addCasingInfo("Bulk Production Frame", 10).addInputBus("Any Casing", 1).addOutputBus("Any Casing", 1)
+ .addInputHatch("Any Casing", 1).addEnergyHatch("Any Casing", 1).addMaintenanceHatch("Any Casing", 1)
+ .addMufflerHatch("Any Casing", 1).toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -171,18 +166,16 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase<GT4Entity
public IStructureDefinition<GT4Entity_AutoCrafter> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GT4Entity_AutoCrafter>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC"},
- {"C~C", "C-C", "CCC"},
- {"CCC", "CCC", "CCC"},
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC" }, { "C~C", "C-C", "CCC" },
+ { "CCC", "CCC", "CCC" }, }))
.addElement(
'C',
buildHatchAdder(GT4Entity_AutoCrafter.class)
.atLeast(InputBus, OutputBus, InputHatch, Maintenance, Energy, Muffler)
- .casingIndex(TAE.getIndexFromPage(0, 10))
- .dot(1)
- .buildAndChain(
+ .casingIndex(TAE.getIndexFromPage(0, 10)).dot(1).buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings2Misc, 12))))
.build();
}
@@ -229,8 +222,7 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase<GT4Entity
return r;
}
}
- } catch (IllegalArgumentException | IllegalAccessException e) {
- }
+ } catch (IllegalArgumentException | IllegalAccessException e) {}
} else if (this.mMachineMode == MODE.DISASSEMBLY || this.mMachineMode == MODE.CRAFTING) {
return null;
}
@@ -249,16 +241,20 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase<GT4Entity
mMachineMode = mMachineMode.nextMode();
if (mMachineMode == MODE.CRAFTING) {
PlayerUtils.messagePlayer(
- aPlayer, "Running the Auto-Crafter in mode: " + EnumChatFormatting.AQUA + "AutoCrafting");
+ aPlayer,
+ "Running the Auto-Crafter in mode: " + EnumChatFormatting.AQUA + "AutoCrafting");
} else if (mMachineMode == MODE.ASSEMBLY) {
PlayerUtils.messagePlayer(
- aPlayer, "Running the Auto-Crafter in mode: " + EnumChatFormatting.GREEN + "Assembly");
+ aPlayer,
+ "Running the Auto-Crafter in mode: " + EnumChatFormatting.GREEN + "Assembly");
} else if (mMachineMode == MODE.DISASSEMBLY) {
PlayerUtils.messagePlayer(
- aPlayer, "Running the Auto-Crafter in mode: " + EnumChatFormatting.RED + "Disassembly");
+ aPlayer,
+ "Running the Auto-Crafter in mode: " + EnumChatFormatting.RED + "Disassembly");
} else {
PlayerUtils.messagePlayer(
- aPlayer, "Running the Auto-Crafter in mode: " + EnumChatFormatting.YELLOW + "Circuit Assembly");
+ aPlayer,
+ "Running the Auto-Crafter in mode: " + EnumChatFormatting.YELLOW + "Circuit Assembly");
}
}
// 5.08 support
@@ -287,20 +283,20 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase<GT4Entity
}
}
- // @Override
- // public boolean checkRecipe(final ItemStack aStack) {
+ // @Override
+ // public boolean checkRecipe(final ItemStack aStack) {
//
- // final long tVoltage = this.getMaxInputVoltage();
- // final byte tTier = this.mTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+ // final long tVoltage = this.getMaxInputVoltage();
+ // final byte tTier = this.mTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
//
- // if (mMachineMode == MODE.DISASSEMBLY) {
- // return doDisassembly();
- // } else if (mMachineMode == MODE.CRAFTING) {
- // return doCrafting(aStack);
- // } else {
- // return super.checkRecipeGeneric(getMaxParallelRecipes(), 100, 200);
- // }
- // }
+ // if (mMachineMode == MODE.DISASSEMBLY) {
+ // return doDisassembly();
+ // } else if (mMachineMode == MODE.CRAFTING) {
+ // return doCrafting(aStack);
+ // } else {
+ // return super.checkRecipeGeneric(getMaxParallelRecipes(), 100, 200);
+ // }
+ // }
private void setTier() {
long tVoltage = getMaxInputVoltage();
@@ -329,12 +325,17 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase<GT4Entity
Object[] tempArray = tFluids.toArray(new FluidStack[] {});
FluidStack[] properArray;
- properArray =
- ((tempArray != null && tempArray.length > 0) ? (FluidStack[]) tempArray : new FluidStack[] {});
+ properArray = ((tempArray != null && tempArray.length > 0) ? (FluidStack[]) tempArray
+ : new FluidStack[] {});
// Logger.MACHINE_INFO("4");
if (checkRecipeGeneric(
- tBusItems.toArray(new ItemStack[] {}), properArray, getMaxParallelRecipes(), 100, 200, 10000))
+ tBusItems.toArray(new ItemStack[] {}),
+ properArray,
+ getMaxParallelRecipes(),
+ 100,
+ 200,
+ 10000))
return true;
}
return false;
@@ -441,136 +442,43 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase<GT4Entity
this.mMaxProgresstime = 0;
return false; // do nothing
/*
- try {
- // Set Crafting input hatch
- if (!doesCrafterHave9SlotInput()) {
- return false;
- }
-
- // Read stored data from encrypted data stick.
- ItemStack storedData_Output[] = NBTUtils.readItemsFromNBT(aStack, "Output");
- ItemStack storedData_Input[] = NBTUtils.readItemsFromNBT(aStack);
- if (storedData_Output != null && storedData_Input != null) {
- ItemStack loadedData[] = new ItemStack[9];
- if (storedData_Input.length >= 1) {
- int number = 0;
- for (ItemStack a : storedData_Input) {
- if (a.getItem() == ModItems.ZZZ_Empty) {
- // Utils.LOG_WARNING("Allocating free memory into crafting manager slot
- // "+number+".");
- loadedData[number] = null;
- } else {
- // Utils.LOG_WARNING("Downloading "+a.getDisplayName()+" into crafting manager
- // slot "+number+".");
- loadedData[number] = a;
- }
- number++;
- }
- }
-
- // Remove inputs here
- ArrayList<ItemStack> mInputArray = new ArrayList<ItemStack>();
- ItemStack allInputs[];
-
- for (GT_MetaTileEntity_Hatch_InputBus x : this.mInputBusses) {
- if (x.mInventory.length > 0) {
- for (ItemStack r : x.mInventory) {
- if (r != null) {
- mInputArray.add(r);
- }
- }
- }
- }
-
- if (mInputArray.isEmpty()) {
- return false;
- } else {
- List<ItemStack> list = mInputArray;
- allInputs = list.toArray(new ItemStack[list.size()]);
-
- if (allInputs != null && allInputs.length > 0) {
-
- this.mEUt = 8 * (1 << this.mTier - 1) * (1 << this.mTier - 1);
- this.mMaxProgresstime = MathUtils.roundToClosestInt((50 - (5
- * MathUtils.randDouble(((this.mTier - 2) <= 0 ? 1 : (this.mTier - 2)), this.mTier))));
-
- Logger.WARNING("MPT: " + mMaxProgresstime + " | " + mEUt);
- this.getBaseMetaTileEntity().setActive(true);
-
- // Setup some vars
- int counter = 0;
-
- ItemStack toUse[] = new ItemStack[9];
-
- outerloop: for (ItemStack inputItem : loadedData) {
- if (inputItem == null) {
- toUse[counter] = null;
- continue outerloop;
- }
- for (ItemStack r : allInputs) {
- if (r != null) {
- // Utils.LOG_WARNING("Input Bus Inventory Iteration - Found:"
- // +r.getDisplayName()+" | "+allInputs.length);
- if (GT_Utility.areStacksEqual(r, inputItem)) {
- if (this.getBaseMetaTileEntity().isServerSide()) {
- toUse[counter] = inputItem;
- counter++;
- continue outerloop;
- }
-
- }
- }
- }
- counter++;
- }
-
- int mCorrectInputs = 0;
- for (ItemStack isValid : toUse) {
- if (isValid == null || this.depleteInput(isValid)) {
- mCorrectInputs++;
- } else {
- Logger.WARNING("Input in Slot " + mCorrectInputs + " was not valid.");
- }
- }
-
- if (this.mTier > 5) {
- this.mMaxProgresstime >>= this.mTier - 5;
- }
- if (this.mEUt > 0)
- this.mEUt = (-this.mEUt);
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
- this.mEfficiencyIncrease = 10000;
-
- if (mCorrectInputs == 9) {
- ItemStack mOutputItem = storedData_Output[0];
- NBTUtils.writeItemsToGtCraftingComponents(mOutputItem, loadedData, true);
- this.addOutput(mOutputItem);
- this.updateSlots();
- return true;
- } else {
- return false;
- }
-
- }
- }
- }
- }
- // End Debug
- catch (Throwable t) {
- t.printStackTrace();
- this.mMaxProgresstime = 0;
- }
-
- this.mMaxProgresstime = 0;
- return false;
- */
+ * try { // Set Crafting input hatch if (!doesCrafterHave9SlotInput()) { return false; } // Read stored data
+ * from encrypted data stick. ItemStack storedData_Output[] = NBTUtils.readItemsFromNBT(aStack, "Output");
+ * ItemStack storedData_Input[] = NBTUtils.readItemsFromNBT(aStack); if (storedData_Output != null &&
+ * storedData_Input != null) { ItemStack loadedData[] = new ItemStack[9]; if (storedData_Input.length >= 1) {
+ * int number = 0; for (ItemStack a : storedData_Input) { if (a.getItem() == ModItems.ZZZ_Empty) { //
+ * Utils.LOG_WARNING("Allocating free memory into crafting manager slot // "+number+"."); loadedData[number] =
+ * null; } else { // Utils.LOG_WARNING("Downloading "+a.getDisplayName()+" into crafting manager // slot
+ * "+number+"."); loadedData[number] = a; } number++; } } // Remove inputs here ArrayList<ItemStack> mInputArray
+ * = new ArrayList<ItemStack>(); ItemStack allInputs[]; for (GT_MetaTileEntity_Hatch_InputBus x :
+ * this.mInputBusses) { if (x.mInventory.length > 0) { for (ItemStack r : x.mInventory) { if (r != null) {
+ * mInputArray.add(r); } } } } if (mInputArray.isEmpty()) { return false; } else { List<ItemStack> list =
+ * mInputArray; allInputs = list.toArray(new ItemStack[list.size()]); if (allInputs != null && allInputs.length
+ * > 0) { this.mEUt = 8 * (1 << this.mTier - 1) * (1 << this.mTier - 1); this.mMaxProgresstime =
+ * MathUtils.roundToClosestInt((50 - (5 MathUtils.randDouble(((this.mTier - 2) <= 0 ? 1 : (this.mTier - 2)),
+ * this.mTier)))); Logger.WARNING("MPT: " + mMaxProgresstime + " | " + mEUt);
+ * this.getBaseMetaTileEntity().setActive(true); // Setup some vars int counter = 0; ItemStack toUse[] = new
+ * ItemStack[9]; outerloop: for (ItemStack inputItem : loadedData) { if (inputItem == null) { toUse[counter] =
+ * null; continue outerloop; } for (ItemStack r : allInputs) { if (r != null) { //
+ * Utils.LOG_WARNING("Input Bus Inventory Iteration - Found:" // +r.getDisplayName()+" | "+allInputs.length); if
+ * (GT_Utility.areStacksEqual(r, inputItem)) { if (this.getBaseMetaTileEntity().isServerSide()) { toUse[counter]
+ * = inputItem; counter++; continue outerloop; } } } } counter++; } int mCorrectInputs = 0; for (ItemStack
+ * isValid : toUse) { if (isValid == null || this.depleteInput(isValid)) { mCorrectInputs++; } else {
+ * Logger.WARNING("Input in Slot " + mCorrectInputs + " was not valid."); } } if (this.mTier > 5) {
+ * this.mMaxProgresstime >>= this.mTier - 5; } if (this.mEUt > 0) this.mEUt = (-this.mEUt); this.mEfficiency =
+ * (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; if (mCorrectInputs
+ * == 9) { ItemStack mOutputItem = storedData_Output[0]; NBTUtils.writeItemsToGtCraftingComponents(mOutputItem,
+ * loadedData, true); this.addOutput(mOutputItem); this.updateSlots(); return true; } else { return false; } } }
+ * } } // End Debug catch (Throwable t) { t.printStackTrace(); this.mMaxProgresstime = 0; }
+ * this.mMaxProgresstime = 0; return false;
+ */
}
@Override
public String[] getExtraInfoData() {
final String tRunning = (this.mMaxProgresstime > 0 ? "Auto-Crafter running" : "Auto-Crafter stopped");
- final String tMaintainance =
- (this.getIdealStatus() == this.getRepairStatus() ? "No Maintainance issues" : "Needs Maintainance");
+ final String tMaintainance = (this.getIdealStatus() == this.getRepairStatus() ? "No Maintainance issues"
+ : "Needs Maintainance");
String tSpecialText = "" + (60 + 12 * this.mTier) + "% chance to recover disassembled parts.";
String tMode;
if (mMachineMode == MODE.DISASSEMBLY) {
@@ -588,9 +496,8 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase<GT4Entity
tSpecialText = "Does Auto-Crafter have 9-slot input bus? " + doesCrafterHave9SlotInput();
}
- return new String[] {
- "Large Scale Auto-Asesembler v1.01c", tRunning, tMaintainance, "Mode: " + tMode, tSpecialText
- };
+ return new String[] { "Large Scale Auto-Asesembler v1.01c", tRunning, tMaintainance, "Mode: " + tMode,
+ tSpecialText };
}
private String getMode() {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java
index 4ba92f8f7e..b9e709e68c 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java
@@ -6,10 +6,17 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.enums.TAE;
@@ -25,11 +32,6 @@ import gtPlusPlus.core.material.MISC_MATERIALS;
import gtPlusPlus.core.util.minecraft.FluidUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
public class GT4Entity_ThermalBoiler extends GregtechMeta_MultiBlockBase<GT4Entity_ThermalBoiler>
implements ISurvivalConstructable {
@@ -113,32 +115,32 @@ public class GT4Entity_ThermalBoiler extends GregtechMeta_MultiBlockBase<GT4Enti
if ((tRecipe.getOutput(0) != null)
&& (getBaseMetaTileEntity().getRandomNumber(loot_MAXCHANCE)
< tRecipe.getOutputChance(0))) {
- this.mOutputItems = new ItemStack[] {GT_Utility.copy(tRecipe.getOutput(0))};
+ this.mOutputItems = new ItemStack[] { GT_Utility.copy(tRecipe.getOutput(0)) };
}
if ((tRecipe.getOutput(1) != null)
&& (getBaseMetaTileEntity().getRandomNumber(loot_MAXCHANCE)
< tRecipe.getOutputChance(1))) {
- this.mOutputItems = new ItemStack[] {GT_Utility.copy(tRecipe.getOutput(1))};
+ this.mOutputItems = new ItemStack[] { GT_Utility.copy(tRecipe.getOutput(1)) };
}
if ((tRecipe.getOutput(2) != null)
&& (getBaseMetaTileEntity().getRandomNumber(loot_MAXCHANCE)
< tRecipe.getOutputChance(2))) {
- this.mOutputItems = new ItemStack[] {GT_Utility.copy(tRecipe.getOutput(2))};
+ this.mOutputItems = new ItemStack[] { GT_Utility.copy(tRecipe.getOutput(2)) };
}
if ((tRecipe.getOutput(3) != null)
&& (getBaseMetaTileEntity().getRandomNumber(loot_MAXCHANCE)
< tRecipe.getOutputChance(3))) {
- this.mOutputItems = new ItemStack[] {GT_Utility.copy(tRecipe.getOutput(3))};
+ this.mOutputItems = new ItemStack[] { GT_Utility.copy(tRecipe.getOutput(3)) };
}
if ((tRecipe.getOutput(4) != null)
&& (getBaseMetaTileEntity().getRandomNumber(loot_MAXCHANCE)
< tRecipe.getOutputChance(4))) {
- this.mOutputItems = new ItemStack[] {GT_Utility.copy(tRecipe.getOutput(4))};
+ this.mOutputItems = new ItemStack[] { GT_Utility.copy(tRecipe.getOutput(4)) };
}
if ((tRecipe.getOutput(5) != null)
&& (getBaseMetaTileEntity().getRandomNumber(loot_MAXCHANCE)
< tRecipe.getOutputChance(5))) {
- this.mOutputItems = new ItemStack[] {GT_Utility.copy(tRecipe.getOutput(5))};
+ this.mOutputItems = new ItemStack[] { GT_Utility.copy(tRecipe.getOutput(5)) };
}
}
// Give Obsidian without Lava Filter
@@ -146,7 +148,7 @@ public class GT4Entity_ThermalBoiler extends GregtechMeta_MultiBlockBase<GT4Enti
if ((tRecipe.getOutput(6) != null)
&& (getBaseMetaTileEntity().getRandomNumber(loot_MAXCHANCE)
< tRecipe.getOutputChance(6))) {
- this.mOutputItems = new ItemStack[] {GT_Utility.copy(tRecipe.getOutput(6))};
+ this.mOutputItems = new ItemStack[] { GT_Utility.copy(tRecipe.getOutput(6)) };
}
}
return true;
@@ -234,22 +236,13 @@ public class GT4Entity_ThermalBoiler extends GregtechMeta_MultiBlockBase<GT4Enti
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Thermal Boiler Controller")
- .addInfo("Converts Water & Heat into Steam")
- .addInfo("Explodes if water is not supplied")
- .addInfo("Consult user manual for more information")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 3, 3, true)
- .addController("Front Center")
- .addCasingInfo("Thermal Containment Casings", 10)
- .addInputBus("Any Casing", 1)
- .addOutputBus("Any Casing", 1)
- .addInputHatch("Any Casing", 1)
- .addOutputHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
- .addMufflerHatch("Any Casing", 1)
+ tt.addMachineType(getMachineType()).addInfo("Thermal Boiler Controller")
+ .addInfo("Converts Water & Heat into Steam").addInfo("Explodes if water is not supplied")
+ .addInfo("Consult user manual for more information").addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator().beginStructureBlock(3, 3, 3, true).addController("Front Center")
+ .addCasingInfo("Thermal Containment Casings", 10).addInputBus("Any Casing", 1)
+ .addOutputBus("Any Casing", 1).addInputHatch("Any Casing", 1).addOutputHatch("Any Casing", 1)
+ .addMaintenanceHatch("Any Casing", 1).addMufflerHatch("Any Casing", 1)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -273,18 +266,16 @@ public class GT4Entity_ThermalBoiler extends GregtechMeta_MultiBlockBase<GT4Enti
public IStructureDefinition<GT4Entity_ThermalBoiler> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GT4Entity_ThermalBoiler>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC"},
- {"C~C", "C-C", "CCC"},
- {"CCC", "CCC", "CCC"},
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC" }, { "C~C", "C-C", "CCC" },
+ { "CCC", "CCC", "CCC" }, }))
.addElement(
'C',
buildHatchAdder(GT4Entity_ThermalBoiler.class)
.atLeast(InputBus, OutputBus, InputHatch, OutputHatch, Maintenance, Energy, Muffler)
- .casingIndex(TAE.getIndexFromPage(0, 1))
- .dot(1)
- .buildAndChain(
+ .casingIndex(TAE.getIndexFromPage(0, 1)).dot(1).buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings2Misc, 11))))
.build();
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java
index cab78ffef4..4b58683a16 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java
@@ -7,8 +7,17 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElement
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.Element;
import gregtech.api.enums.Materials;
@@ -30,17 +39,10 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_ElementalDataOrbHolder;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase<GregtechMTE_ElementalDuplicator> {
- private final ArrayList<GT_MetaTileEntity_Hatch_ElementalDataOrbHolder> mReplicatorDataOrbHatches =
- new ArrayList<GT_MetaTileEntity_Hatch_ElementalDataOrbHolder>();
+ private final ArrayList<GT_MetaTileEntity_Hatch_ElementalDataOrbHolder> mReplicatorDataOrbHatches = new ArrayList<GT_MetaTileEntity_Hatch_ElementalDataOrbHolder>();
private static final int CASING_TEXTURE_ID = TAE.getIndexFromPage(0, 3);
private int mCasing = 0;
@@ -65,29 +67,17 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Produces Elemental Material from UU Matter")
- .addInfo("Speed: +100% | EU Usage: 100% | Parallel: 8 * Tier")
- .addInfo("Maximum 1x of each bus/hatch.")
- .addInfo("Does not require both Output Hatch & Bus")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(9, 6, 9, true)
- .addController("Top Center")
- .addCasingInfo("Elemental Confinement Shell", 138)
- .addCasingInfo("Matter Fabricator Casing", 24)
- .addCasingInfo("Particle Containment Casing", 24)
- .addCasingInfo("Matter Generation Coil", 24)
- .addCasingInfo("High Voltage Current Capacitor", 20)
- .addCasingInfo("Resonance Chamber III", 24)
- .addCasingInfo("Modulator III", 16)
- .addOtherStructurePart("Data Orb Repository", "1x", 1)
- .addInputHatch("Any 1 dot hint", 1)
- .addOutputBus("Any 1 dot hint", 1)
- .addOutputHatch("Any 1 dot hint", 1)
- .addEnergyHatch("Any 1 dot hint", 1)
- .addMaintenanceHatch("Any 1 dot hint", 1)
- .addMufflerHatch("Any 1 dot hint", 1)
+ tt.addMachineType(getMachineType()).addInfo("Produces Elemental Material from UU Matter")
+ .addInfo("Speed: +100% | EU Usage: 100% | Parallel: 8 * Tier").addInfo("Maximum 1x of each bus/hatch.")
+ .addInfo("Does not require both Output Hatch & Bus").addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator().beginStructureBlock(9, 6, 9, true).addController("Top Center")
+ .addCasingInfo("Elemental Confinement Shell", 138).addCasingInfo("Matter Fabricator Casing", 24)
+ .addCasingInfo("Particle Containment Casing", 24).addCasingInfo("Matter Generation Coil", 24)
+ .addCasingInfo("High Voltage Current Capacitor", 20).addCasingInfo("Resonance Chamber III", 24)
+ .addCasingInfo("Modulator III", 16).addOtherStructurePart("Data Orb Repository", "1x", 1)
+ .addInputHatch("Any 1 dot hint", 1).addOutputBus("Any 1 dot hint", 1)
+ .addOutputHatch("Any 1 dot hint", 1).addEnergyHatch("Any 1 dot hint", 1)
+ .addMaintenanceHatch("Any 1 dot hint", 1).addMufflerHatch("Any 1 dot hint", 1)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -112,74 +102,21 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase
// f = Resonance III
// g = Modulator III
- .addShape(STRUCTURE_PIECE_MAIN, (new String[][] {
- {
- " ccc ",
- " ccccc ",
- " ccccccc ",
- "ccchhhccc",
- "ccch~hccc",
- "ccchhhccc",
- " ccccccc ",
- " ccccc ",
- " ccc "
- },
- {
- " cac ",
- " abfba ",
- " abfgfba ",
- "cbfgdgfbc",
- "afgdddgfa",
- "cbfgdgfbc",
- " abfgfba ",
- " abfba ",
- " cac "
- },
- {
- " cec ",
- " e e ",
- " e e ",
- "c d c",
- "e ddd e",
- "c d c",
- " e e ",
- " e e ",
- " cec "
- },
- {
- " cec ",
- " e e ",
- " e e ",
- "c d c",
- "e ddd e",
- "c d c",
- " e e ",
- " e e ",
- " cec "
- },
- {
- " cac ",
- " abfba ",
- " abfgfba ",
- "cbfgdgfbc",
- "afgdddgfa",
- "cbfgdgfbc",
- " abfgfba ",
- " abfba ",
- " cac "
- },
- {
- " ccc ",
- " ccccc ",
- " ccccccc ",
- "ccchhhccc",
- "ccchhhccc",
- "ccchhhccc",
- " ccccccc ",
- " ccccc ",
- " ccc "
- },
- }))
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ (new String[][] {
+ { " ccc ", " ccccc ", " ccccccc ", "ccchhhccc", "ccch~hccc", "ccchhhccc",
+ " ccccccc ", " ccccc ", " ccc " },
+ { " cac ", " abfba ", " abfgfba ", "cbfgdgfbc", "afgdddgfa", "cbfgdgfbc",
+ " abfgfba ", " abfba ", " cac " },
+ { " cec ", " e e ", " e e ", "c d c", "e ddd e", "c d c",
+ " e e ", " e e ", " cec " },
+ { " cec ", " e e ", " e e ", "c d c", "e ddd e", "c d c",
+ " e e ", " e e ", " cec " },
+ { " cac ", " abfba ", " abfgfba ", "cbfgdgfbc", "afgdddgfa", "cbfgdgfbc",
+ " abfgfba ", " abfba ", " cac " },
+ { " ccc ", " ccccc ", " ccccccc ", "ccchhhccc", "ccchhhccc", "ccchhhccc",
+ " ccccccc ", " ccccc ", " ccc " }, }))
.addElement('a', ofBlock(getCasingBlock4(), getCasingMeta6()))
.addElement('b', ofBlock(getCasingBlock4(), getCasingMeta7()))
.addElement('d', ofBlock(getCasingBlock2(), getCasingMeta2()))
@@ -187,22 +124,26 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase
.addElement('f', ofBlock(getCasingBlock3(), getCasingMeta4()))
.addElement('g', ofBlock(getCasingBlock3(), getCasingMeta5()))
.addElement(
- 'c', lazy(t -> onElementPass(x -> ++x.mCasing, ofBlock(getCasingBlock(), getCasingMeta()))))
+ 'c',
+ lazy(t -> onElementPass(x -> ++x.mCasing, ofBlock(getCasingBlock(), getCasingMeta()))))
.addElement(
'h',
- lazy(t -> ofChain(
- buildHatchAdder(GregtechMTE_ElementalDuplicator.class)
- .atLeast(InputHatch, OutputBus, OutputHatch, Maintenance, Muffler, Energy)
- .casingIndex(getCasingTextureIndex())
- .dot(1)
- .build(),
- buildHatchAdder(GregtechMTE_ElementalDuplicator.class)
- .hatchClass(GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.class)
- .adder(GregtechMTE_ElementalDuplicator::addDataOrbHatch)
- .casingIndex(getCasingTextureIndex())
- .dot(1)
- .build(),
- onElementPass(x -> ++x.mCasing, ofBlock(getCasingBlock(), getCasingMeta())))))
+ lazy(
+ t -> ofChain(
+ buildHatchAdder(GregtechMTE_ElementalDuplicator.class).atLeast(
+ InputHatch,
+ OutputBus,
+ OutputHatch,
+ Maintenance,
+ Muffler,
+ Energy).casingIndex(getCasingTextureIndex()).dot(1).build(),
+ buildHatchAdder(GregtechMTE_ElementalDuplicator.class)
+ .hatchClass(GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.class)
+ .adder(GregtechMTE_ElementalDuplicator::addDataOrbHatch)
+ .casingIndex(getCasingTextureIndex()).dot(1).build(),
+ onElementPass(
+ x -> ++x.mCasing,
+ ofBlock(getCasingBlock(), getCasingMeta())))))
.build();
}
return STRUCTURE_DEFINITION;
@@ -217,8 +158,7 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
mCasing = 0;
boolean aDidBuild = checkPiece(STRUCTURE_PIECE_MAIN, 4, 4, 0);
- if (this.mInputHatches.size() != 1
- || (this.mOutputBusses.size() != 1 && this.mOutputHatches.size() != 0)
+ if (this.mInputHatches.size() != 1 || (this.mOutputBusses.size() != 1 && this.mOutputHatches.size() != 0)
|| this.mEnergyHatches.size() != 1
|| this.mReplicatorDataOrbHatches.size() != 1) {
return false;
@@ -324,14 +264,8 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase
}
@Override
- public boolean checkRecipeGeneric(
- ItemStack[] aItemInputs,
- FluidStack[] aFluidInputs,
- int aMaxParallelRecipes,
- long aEUPercent,
- int aSpeedBonusPercent,
- int aOutputChanceRoll,
- GT_Recipe aRecipe) {
+ public boolean checkRecipeGeneric(ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes,
+ long aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe) {
// Based on the Processing Array. A bit overkill, but very flexible.
// Reset outputs and progress stats
@@ -346,8 +280,7 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase
try {
ItemStack aDataOrbStack = null;
- recipe:
- for (GT_Recipe nRecipe : this.getRecipeMap().mRecipeList) {
+ recipe: for (GT_Recipe nRecipe : this.getRecipeMap().mRecipeList) {
// log("Checking Recipe for: "+(nRecipe.mOutputs.length > 0 && nRecipe.mOutputs[0] != null ?
// nRecipe.mOutputs[0].getDisplayName() : nRecipe.mFluidOutputs[0].getLocalizedName()));
ItemStack aTempStack = getSpecialSlotStack(nRecipe);
@@ -455,24 +388,21 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase
/**
* finds a Recipe matching the aFluid and ItemStack Inputs.
*
- * @param aTileEntity an Object representing the current coordinates of the executing Block/Entity/Whatever. This may be null, especially during Startup.
- * @param aRecipe in case this is != null it will try to use this Recipe first when looking things up.
- * @param aNotUnificated if this is T the Recipe searcher will unificate the ItemStack Inputs
- * @param aDontCheckStackSizes if set to false will only return recipes that can be executed at least once with the provided input
- * @param aVoltage Voltage of the Machine or Long.MAX_VALUE if it has no Voltage
- * @param aFluids the Fluid Inputs
- * @param aSpecialSlot the content of the Special Slot, the regular Manager doesn't do anything with this, but some custom ones do.
- * @param aInputs the Item Inputs
+ * @param aTileEntity an Object representing the current coordinates of the executing
+ * Block/Entity/Whatever. This may be null, especially during Startup.
+ * @param aRecipe in case this is != null it will try to use this Recipe first when looking things up.
+ * @param aNotUnificated if this is T the Recipe searcher will unificate the ItemStack Inputs
+ * @param aDontCheckStackSizes if set to false will only return recipes that can be executed at least once with the
+ * provided input
+ * @param aVoltage Voltage of the Machine or Long.MAX_VALUE if it has no Voltage
+ * @param aFluids the Fluid Inputs
+ * @param aSpecialSlot the content of the Special Slot, the regular Manager doesn't do anything with this,
+ * but some custom ones do.
+ * @param aInputs the Item Inputs
* @return the Recipe it has found or null for no matching Recipe
*/
- public GT_Recipe findRecipe(
- IHasWorldObjectAndCoords aTileEntity,
- GT_Recipe aRecipe,
- boolean aNotUnificated,
- boolean aDontCheckStackSizes,
- long aVoltage,
- FluidStack[] aFluids,
- ItemStack aSpecialSlot,
+ public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated,
+ boolean aDontCheckStackSizes, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot,
ItemStack... aInputs) {
GT_Recipe_Map mRecipeMap = this.getRecipeMap();
@@ -508,8 +438,7 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase
// Check the Recipe which has been used last time in order to not have to search for it again, if possible.
if (aRecipe != null) {
ItemStack aRecipeSpecial = getSpecialSlotStack(aRecipe);
- if (!aRecipe.mFakeRecipe
- && aRecipe.mCanBeBuffered
+ if (!aRecipe.mFakeRecipe && aRecipe.mCanBeBuffered
&& aRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)
&& GT_Utility.areStacksEqual(aRecipeSpecial, aSpecialSlot, false)
&& areDataOrbsEqual(aRecipeSpecial, aSpecialSlot)) {
@@ -518,61 +447,51 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase
}
// Now look for the Recipes inside the Item HashMaps, but only when the Recipes usually have Items.
- if (mRecipeMap.mUsualInputCount > 0 && aInputs != null)
- for (ItemStack tStack : aInputs)
- if (tStack != null) {
- Collection<GT_Recipe> tRecipes = mRecipeMap.mRecipeItemMap.get(new GT_ItemStack(tStack));
- if (tRecipes != null) {
- for (GT_Recipe tRecipe : tRecipes) {
- if (!tRecipe.mFakeRecipe
- && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) {
- ItemStack aRecipeSpecial = getSpecialSlotStack(tRecipe);
- if (GT_Utility.areStacksEqual(aRecipeSpecial, aSpecialSlot, false)
- && areDataOrbsEqual(aRecipeSpecial, aSpecialSlot)) {
- return tRecipe.mEnabled && aVoltage * mRecipeMap.mAmperage >= tRecipe.mEUt
- ? tRecipe
- : null;
- }
- }
- tRecipes = mRecipeMap.mRecipeItemMap.get(new GT_ItemStack(tStack, true));
+ if (mRecipeMap.mUsualInputCount > 0 && aInputs != null) for (ItemStack tStack : aInputs) if (tStack != null) {
+ Collection<GT_Recipe> tRecipes = mRecipeMap.mRecipeItemMap.get(new GT_ItemStack(tStack));
+ if (tRecipes != null) {
+ for (GT_Recipe tRecipe : tRecipes) {
+ if (!tRecipe.mFakeRecipe
+ && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) {
+ ItemStack aRecipeSpecial = getSpecialSlotStack(tRecipe);
+ if (GT_Utility.areStacksEqual(aRecipeSpecial, aSpecialSlot, false)
+ && areDataOrbsEqual(aRecipeSpecial, aSpecialSlot)) {
+ return tRecipe.mEnabled && aVoltage * mRecipeMap.mAmperage >= tRecipe.mEUt ? tRecipe : null;
}
}
- if (tRecipes != null) {
- for (GT_Recipe tRecipe : tRecipes) {
- if (!tRecipe.mFakeRecipe
- && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) {
- ItemStack aRecipeSpecial = getSpecialSlotStack(tRecipe);
- if (GT_Utility.areStacksEqual(aRecipeSpecial, aSpecialSlot, false)
- && areDataOrbsEqual(aRecipeSpecial, aSpecialSlot)) {
- return tRecipe.mEnabled && aVoltage * mRecipeMap.mAmperage >= tRecipe.mEUt
- ? tRecipe
- : null;
- }
- }
+ tRecipes = mRecipeMap.mRecipeItemMap.get(new GT_ItemStack(tStack, true));
+ }
+ }
+ if (tRecipes != null) {
+ for (GT_Recipe tRecipe : tRecipes) {
+ if (!tRecipe.mFakeRecipe
+ && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) {
+ ItemStack aRecipeSpecial = getSpecialSlotStack(tRecipe);
+ if (GT_Utility.areStacksEqual(aRecipeSpecial, aSpecialSlot, false)
+ && areDataOrbsEqual(aRecipeSpecial, aSpecialSlot)) {
+ return tRecipe.mEnabled && aVoltage * mRecipeMap.mAmperage >= tRecipe.mEUt ? tRecipe : null;
}
}
}
+ }
+ }
// If the minimal Amount of Items for the Recipe is 0, then it could be a Fluid-Only Recipe, so check that Map
// too.
if (mRecipeMap.mMinimalInputItems == 0 && aFluids != null)
- for (FluidStack aFluid : aFluids)
- if (aFluid != null) {
- Collection<GT_Recipe> tRecipes = mRecipeMap.mRecipeFluidMap.get(aFluid.getFluid());
- if (tRecipes != null)
- for (GT_Recipe tRecipe : tRecipes) {
- if (!tRecipe.mFakeRecipe
- && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) {
- ItemStack aRecipeSpecial = getSpecialSlotStack(tRecipe);
- if (GT_Utility.areStacksEqual(aRecipeSpecial, aSpecialSlot, false)
- && areDataOrbsEqual(aRecipeSpecial, aSpecialSlot)) {
- return tRecipe.mEnabled && aVoltage * mRecipeMap.mAmperage >= tRecipe.mEUt
- ? tRecipe
- : null;
- }
- }
+ for (FluidStack aFluid : aFluids) if (aFluid != null) {
+ Collection<GT_Recipe> tRecipes = mRecipeMap.mRecipeFluidMap.get(aFluid.getFluid());
+ if (tRecipes != null) for (GT_Recipe tRecipe : tRecipes) {
+ if (!tRecipe.mFakeRecipe
+ && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) {
+ ItemStack aRecipeSpecial = getSpecialSlotStack(tRecipe);
+ if (GT_Utility.areStacksEqual(aRecipeSpecial, aSpecialSlot, false)
+ && areDataOrbsEqual(aRecipeSpecial, aSpecialSlot)) {
+ return tRecipe.mEnabled && aVoltage * mRecipeMap.mAmperage >= tRecipe.mEUt ? tRecipe : null;
}
+ }
}
+ }
// And nothing has been found.
return null;
@@ -591,12 +510,8 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase
private static boolean areDataOrbsEqual(ItemStack aOrb1, ItemStack aOrb2) {
if (aOrb1 != null && aOrb2 != null) {
- Materials tMaterial1 = Element.get(Behaviour_DataOrb.getDataName(aOrb1))
- .mLinkedMaterials
- .get(0);
- Materials tMaterial2 = Element.get(Behaviour_DataOrb.getDataName(aOrb2))
- .mLinkedMaterials
- .get(0);
+ Materials tMaterial1 = Element.get(Behaviour_DataOrb.getDataName(aOrb1)).mLinkedMaterials.get(0);
+ Materials tMaterial2 = Element.get(Behaviour_DataOrb.getDataName(aOrb2)).mLinkedMaterials.get(0);
if (tMaterial1.equals(tMaterial2)) {
return true;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FastNeutronReactor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FastNeutronReactor.java
index 69d93ce06d..62552ad7c8 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FastNeutronReactor.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FastNeutronReactor.java
@@ -1,208 +1,48 @@
/*
-package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production;
-
-
-public class GregtechMTE_FastNeutronReactor
-extends GregtechMeta_MultiBlockBase
-{
-
- private int mSuperEfficencyIncrease = 0;
-
-
- public GregtechMTE_FastNeutronReactor(int aID, String aName, String aNameRegional)
- {
- super(aID, aName, aNameRegional);
- }
-
- public GregtechMTE_FastNeutronReactor(String mName) {
- super(mName);
- }
-
- @Override
- public String getMachineType() {
- return "Reactor";
- }
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity)
- {
- return new GregtechMTE_FastNeutronReactor(this.mName);
- }
- @Override
- public boolean isFacingValid(byte aFacing)
- {
- return aFacing > 1;
- }
-
- @Override
- public boolean isCorrectMachinePart(ItemStack aStack)
- {
- return true;
- }
-
- @Override
- public int getDamageToComponent(ItemStack aStack){
- return 0;
- }
-
- @Override
- public boolean checkRecipe(final ItemStack aStack) {
- this.mSuperEfficencyIncrease=0;
- if (processing_Stage_1()) {
- if (processing_Stage_2()) {
- if (processing_Stage_3()) {
- if (processing_Stage_4()) {
-
- }
- else {
- //Stage 4
- }
- }
- else {
- //Stage 3
- }
- }
- else {
- //Stage 2
- }
- }
- else {
- //Stage 1
- }
- return false;
- }
-
- @Override
- public int getMaxParallelRecipes() {
- return 1;
- }
-
- @Override
- public int getEuDiscountForParallelism() {
- return 0;
- }
-
- public boolean processing_Stage_1() { //Deplete Water, Add More Progress Time
- for (GT_MetaTileEntity_Hatch_Input tRecipe : this.mInputHatches) {
- if (tRecipe.getFluid() != null){
- FluidStack tFluid = FluidUtils.getFluidStack(tRecipe.getFluid(), 200);
- if (tFluid != null) {
- if (tFluid == GT_ModHandler.getDistilledWater(1)) {
- if (depleteInput(tFluid)) {
- this.mMaxProgresstime = Math.max(1, runtimeBoost(8 * 2));
- this.mEUt = getEUt();
- this.mEfficiencyIncrease = (this.mMaxProgresstime * getEfficiencyIncrease());
- return true;
- }
- }
-
- }
- }
- }
- this.mMaxProgresstime = 0;
- this.mEUt = 0;
- return false;
- }
- public boolean processing_Stage_2() {
- return false;
- }
- public boolean processing_Stage_3() {
- return false;
- }
- public boolean processing_Stage_4() {
- return false;
- }
-
- @Override
- public boolean onRunningTick(ItemStack aStack) {
- if (this.mEUt > 0) {
- if(this.mSuperEfficencyIncrease>0){
- this.mEfficiency = Math.min(10000, this.mEfficiency + this.mSuperEfficencyIncrease);
- }
- int tGeneratedEU = (int) (this.mEUt * 2L * this.mEfficiency / 10000L);
- if (tGeneratedEU > 0) {
- long amount = (tGeneratedEU + 160) / 160;
- if (!depleteInput(GT_ModHandler.getDistilledWater(amount))) {
- explodeMultiblock();
- } else {
- addOutput(GT_ModHandler.getSteam(tGeneratedEU));
- }
- }
- return true;
- }
- return true;
- }
-
- public int getEUt() {
- return 0; //Default 400
- }
-
- public int getEfficiencyIncrease() {
- return 0; //Default 12
- }
-
- int runtimeBoost(int mTime) {
- return mTime * 150 / 100;
- }
-
- @Override
- public boolean explodesOnComponentBreak(ItemStack aStack)
- {
- return true;
- }
-
- @Override
- public int getMaxEfficiency(ItemStack aStack)
- {
- return 10000;
- }
-
- @Override
- public int getPollutionPerTick(ItemStack aStack)
- {
- return 0;
- }
-
- public int getAmountOfOutputs()
- {
- return 1;
- }
-
- @Override
- public String[] getTooltip()
- {
- return new String[]{
- "Fukushima-Daiichi Reactor No. 6",
- "------------------------------------------",
- "Boiling Water Reactor",
- "Harness the power of Nuclear Fission",
- "------------------------------------------",
- "Consult user manual for more information",
- };
- }
-
- @Override
- public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
- if (aSide == aFacing) {
- return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(1)),
- new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)};
- }
- return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(1))};
- }
-
- @Override
- public boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack arg1) {
- return true;
- }
-
- public boolean damageFilter(){
- return false;
- }
-
- @Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- super.onPostTick(aBaseMetaTileEntity, aTick);
- }
-
-}
-*/
+ * package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; public class
+ * GregtechMTE_FastNeutronReactor extends GregtechMeta_MultiBlockBase { private int mSuperEfficencyIncrease = 0; public
+ * GregtechMTE_FastNeutronReactor(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); }
+ * public GregtechMTE_FastNeutronReactor(String mName) { super(mName); }
+ * @Override public String getMachineType() { return "Reactor"; }
+ * @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new
+ * GregtechMTE_FastNeutronReactor(this.mName); }
+ * @Override public boolean isFacingValid(byte aFacing) { return aFacing > 1; }
+ * @Override public boolean isCorrectMachinePart(ItemStack aStack) { return true; }
+ * @Override public int getDamageToComponent(ItemStack aStack){ return 0; }
+ * @Override public boolean checkRecipe(final ItemStack aStack) { this.mSuperEfficencyIncrease=0; if
+ * (processing_Stage_1()) { if (processing_Stage_2()) { if (processing_Stage_3()) { if (processing_Stage_4()) { } else {
+ * //Stage 4 } } else { //Stage 3 } } else { //Stage 2 } } else { //Stage 1 } return false; }
+ * @Override public int getMaxParallelRecipes() { return 1; }
+ * @Override public int getEuDiscountForParallelism() { return 0; } public boolean processing_Stage_1() { //Deplete
+ * Water, Add More Progress Time for (GT_MetaTileEntity_Hatch_Input tRecipe : this.mInputHatches) { if
+ * (tRecipe.getFluid() != null){ FluidStack tFluid = FluidUtils.getFluidStack(tRecipe.getFluid(), 200); if (tFluid !=
+ * null) { if (tFluid == GT_ModHandler.getDistilledWater(1)) { if (depleteInput(tFluid)) { this.mMaxProgresstime =
+ * Math.max(1, runtimeBoost(8 * 2)); this.mEUt = getEUt(); this.mEfficiencyIncrease = (this.mMaxProgresstime *
+ * getEfficiencyIncrease()); return true; } } } } } this.mMaxProgresstime = 0; this.mEUt = 0; return false; } public
+ * boolean processing_Stage_2() { return false; } public boolean processing_Stage_3() { return false; } public boolean
+ * processing_Stage_4() { return false; }
+ * @Override public boolean onRunningTick(ItemStack aStack) { if (this.mEUt > 0) { if(this.mSuperEfficencyIncrease>0){
+ * this.mEfficiency = Math.min(10000, this.mEfficiency + this.mSuperEfficencyIncrease); } int tGeneratedEU = (int)
+ * (this.mEUt * 2L * this.mEfficiency / 10000L); if (tGeneratedEU > 0) { long amount = (tGeneratedEU + 160) / 160; if
+ * (!depleteInput(GT_ModHandler.getDistilledWater(amount))) { explodeMultiblock(); } else {
+ * addOutput(GT_ModHandler.getSteam(tGeneratedEU)); } } return true; } return true; } public int getEUt() { return 0;
+ * //Default 400 } public int getEfficiencyIncrease() { return 0; //Default 12 } int runtimeBoost(int mTime) { return
+ * mTime * 150 / 100; }
+ * @Override public boolean explodesOnComponentBreak(ItemStack aStack) { return true; }
+ * @Override public int getMaxEfficiency(ItemStack aStack) { return 10000; }
+ * @Override public int getPollutionPerTick(ItemStack aStack) { return 0; } public int getAmountOfOutputs() { return 1;
+ * }
+ * @Override public String[] getTooltip() { return new String[]{ "Fukushima-Daiichi Reactor No. 6",
+ * "------------------------------------------", "Boiling Water Reactor", "Harness the power of Nuclear Fission",
+ * "------------------------------------------", "Consult user manual for more information", }; }
+ * @Override public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte
+ * aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { if (aSide == aFacing) { return new
+ * ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(1)), new GT_RenderedTexture(aActive ?
+ * Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE :
+ * Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)}; } return new
+ * ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(1))}; }
+ * @Override public boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack arg1) { return true; }
+ * public boolean damageFilter(){ return false; }
+ * @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ * super.onPostTick(aBaseMetaTileEntity, aTick); } }
+ */
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FrothFlotationCell.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FrothFlotationCell.java
index b27f3d6b25..96cd2d74e7 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FrothFlotationCell.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FrothFlotationCell.java
@@ -5,10 +5,18 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElement
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.util.Objects;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.common.util.Constants;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.TAE;
import gregtech.api.interfaces.IIconContainer;
@@ -24,11 +32,6 @@ import gtPlusPlus.core.material.Material;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.helpers.FlotationRecipeHandler;
-import java.util.Objects;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.common.util.Constants;
-import net.minecraftforge.fluids.FluidStack;
public class GregtechMTE_FrothFlotationCell extends GregtechMeta_MultiBlockBase<GregtechMTE_FrothFlotationCell>
implements ISurvivalConstructable {
@@ -57,21 +60,13 @@ public class GregtechMTE_FrothFlotationCell extends GregtechMeta_MultiBlockBase<
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Process that milled ore!")
+ tt.addMachineType(getMachineType()).addInfo("Process that milled ore!")
.addInfo("You can only ever process one type of material per controller")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(7, 9, 7, true)
- .addController("Front Center")
- .addCasingInfo("Inconel Reinforced Casing", 68)
- .addCasingInfo("Flotation Casing", 52)
- .addInputBus("Bottom Casing", 1)
- .addInputHatch("Bottom Casing", 1)
- .addOutputHatch("Bottom Casing", 1)
- .addEnergyHatch("Bottom Casing", 1)
- .addMaintenanceHatch("Bottom Casing", 1)
- .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(7, 9, 7, true)
+ .addController("Front Center").addCasingInfo("Inconel Reinforced Casing", 68)
+ .addCasingInfo("Flotation Casing", 52).addInputBus("Bottom Casing", 1).addInputHatch("Bottom Casing", 1)
+ .addOutputHatch("Bottom Casing", 1).addEnergyHatch("Bottom Casing", 1)
+ .addMaintenanceHatch("Bottom Casing", 1).toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -113,29 +108,25 @@ public class GregtechMTE_FrothFlotationCell extends GregtechMeta_MultiBlockBase<
@Override
public IStructureDefinition<GregtechMTE_FrothFlotationCell> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
- STRUCTURE_DEFINITION = StructureDefinition.<GregtechMTE_FrothFlotationCell>builder()
- .addShape(mName, new String[][] {
- {" ", " ", " X ", " X~X ", " X ", " ", " "},
- {" ", " F ", " FFF ", " FF FF ", " FFF ", " F ", " "},
- {" ", " F ", " F F ", " F F ", " F F ", " F ", " "},
- {" ", " F ", " F F ", " F F ", " F F ", " F ", " "},
- {" ", " F ", " F F ", " F F ", " F F ", " F ", " "},
- {" ", " F ", " F F ", " F F ", " F F ", " F ", " "},
- {" ", " F ", " F F ", " F F ", " F F ", " F ", " "},
- {" CCC ", " CCCCC ", "CCCCCCC", "CCCCCCC", "CCCCCCC", " CCCCC ", " CCC "},
- {" CCC ", " CCCCC ", "CCCCCCC", "CCCCCCC", "CCCCCCC", " CCCCC ", " CCC "},
- })
+ STRUCTURE_DEFINITION = StructureDefinition.<GregtechMTE_FrothFlotationCell>builder().addShape(
+ mName,
+ new String[][] { { " ", " ", " X ", " X~X ", " X ", " ", " " },
+ { " ", " F ", " FFF ", " FF FF ", " FFF ", " F ", " " },
+ { " ", " F ", " F F ", " F F ", " F F ", " F ", " " },
+ { " ", " F ", " F F ", " F F ", " F F ", " F ", " " },
+ { " ", " F ", " F F ", " F F ", " F F ", " F ", " " },
+ { " ", " F ", " F F ", " F F ", " F F ", " F ", " " },
+ { " ", " F ", " F F ", " F F ", " F F ", " F ", " " },
+ { " CCC ", " CCCCC ", "CCCCCCC", "CCCCCCC", "CCCCCCC", " CCCCC ", " CCC " },
+ { " CCC ", " CCCCC ", "CCCCCCC", "CCCCCCC", "CCCCCCC", " CCCCC ", " CCC " }, })
.addElement(
'C',
buildHatchAdder(GregtechMTE_FrothFlotationCell.class)
.atLeast(InputBus, InputHatch, OutputHatch, Maintenance, Energy)
- .casingIndex(getCasingTextureId())
- .dot(1)
- .buildAndChain(
+ .casingIndex(getCasingTextureId()).dot(1).buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings3Misc, 1))))
.addElement('F', ofBlock(ModBlocks.blockSpecialMultiCasings, 9))
- .addElement('X', ofBlock(ModBlocks.blockCasings3Misc, 1))
- .build();
+ .addElement('X', ofBlock(ModBlocks.blockCasings3Misc, 1)).build();
}
return STRUCTURE_DEFINITION;
}
@@ -198,14 +189,8 @@ public class GregtechMTE_FrothFlotationCell extends GregtechMeta_MultiBlockBase<
}
@Override
- public boolean checkRecipeGeneric(
- ItemStack[] aItemInputs,
- FluidStack[] aFluidInputs,
- int aMaxParallelRecipes,
- long aEUPercent,
- int aSpeedBonusPercent,
- int aOutputChanceRoll,
- GT_Recipe aRecipe) {
+ public boolean checkRecipeGeneric(ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes,
+ long aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe) {
// Based on the Processing Array. A bit overkill, but very flexible.
// Reset outputs and progress stats
@@ -233,15 +218,11 @@ public class GregtechMTE_FrothFlotationCell extends GregtechMeta_MultiBlockBase<
}
/*
- *
- * Material checks
- * Makes sure we can only ever use one type of material in this flotation cell.
- * We used to depend on Alk's hash, but it's unreliable and user-hostile
- * So we're using unlocalized name of material now.
- *
+ * Material checks Makes sure we can only ever use one type of material in this flotation cell. We used to
+ * depend on Alk's hash, but it's unreliable and user-hostile So we're using unlocalized name of material now.
*/
- Material foundMaterial =
- FlotationRecipeHandler.getMaterialOfMilledProduct(FlotationRecipeHandler.findMilledStack(tRecipe));
+ Material foundMaterial = FlotationRecipeHandler
+ .getMaterialOfMilledProduct(FlotationRecipeHandler.findMilledStack(tRecipe));
String foundMaterialName = null;
if (foundMaterial != null) {
foundMaterialName = foundMaterial.getUnlocalizedName();
@@ -303,6 +284,6 @@ public class GregtechMTE_FrothFlotationCell extends GregtechMeta_MultiBlockBase<
@Override
public String[] getExtraInfoData() {
- return new String[] {"Locked material: " + lockedMaterialName};
+ return new String[] { "Locked material: " + lockedMaterialName };
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_LargeNaqReactor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_LargeNaqReactor.java
index 92b3729cc2..92025a337f 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_LargeNaqReactor.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_LargeNaqReactor.java
@@ -1,461 +1,164 @@
/*
-package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production;
-
-
-public class GregtechMTE_LargeNaqReactor extends GregtechMeta_MultiBlockBase {
-
- public ArrayList<GT_MetaTileEntity_Hatch_Naquadah> mNaqHatches = new ArrayList<GT_MetaTileEntity_Hatch_Naquadah>();
- public static String[] mCasingName = new String[5];
- public static String mHatchName = "Naquadah Fuel Hatch";
-
- private final int CASING_TEXTURE_ID = TAE.getIndexFromPage(0, 13);
- private final int META_BaseCasing = 0; //4
- private final int META_ContainmentCasing = 15; //3
- private final int META_Shielding = 13; //1
- private final int META_PipeCasing = 1; //4
- private final int META_IntegralCasing = 6; //0
- private final int META_ContainmentChamberCasing = 2; //4
-
- public GregtechMTE_LargeNaqReactor(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional);
- mCasingName[0] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 0);
- mCasingName[1] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 1);
- mCasingName[2] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 2);
- mCasingName[3] = LangUtils.getLocalizedNameOfBlock(getCasing(3), 15);
- mCasingName[4] = LangUtils.getLocalizedNameOfBlock(getCasing(1), 13);
- mHatchName = LangUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 969);
- }
-
- public GregtechMTE_LargeNaqReactor(String aName) {
- super(aName);
- }
-
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMTE_LargeNaqReactor(this.mName);
- }
-
- public String[] getTooltip() {
- if (mCasingName[0].toLowerCase().contains(".name")) {
- mCasingName[0] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 0);
- }
- if (mCasingName[1].toLowerCase().contains(".name")) {
- mCasingName[1] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 1);
- }
- if (mCasingName[2].toLowerCase().contains(".name")) {
- mCasingName[2] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 2);
- }
- if (mCasingName[3].toLowerCase().contains(".name")) {
- mCasingName[3] = LangUtils.getLocalizedNameOfBlock(getCasing(3), 15);
- }
- if (mCasingName[4].toLowerCase().contains(".name")) {
- mCasingName[4] = LangUtils.getLocalizedNameOfBlock(getCasing(1), 13);
- }
- if (mHatchName.toLowerCase().contains(".name")) {
- mHatchName = LangUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 969);
- }
- return new String[]{
- "Naquadah reacts violently with potassium, ",
- "resulting in massive explosions with radioactive potential.",
- "Size: 3x4x12, WxHxL",
- "Bottom Layer: "+mCasingName[0]+"s, (30x min)",
- "Middle Layer: "+mCasingName[2]+"s (10x), with",
- " "+mCasingName[3]+"s on either side",
- " "+mCasingName[3]+"s also on each end (x26)",
- "Middle Layer2: "+mCasingName[1]+" (12x total), with",
- " "+mCasingName[4]+"s on either side (x24)",
- "Top: Single row of "+mCasingName[0]+" along the middle (x12) ",
- "",
- "1x " + mHatchName + " (Any bottom layer casing)",
- "1x " + "Maintenance Hatch" + " (Any bottom layer side casing)",
- "1x " + "Energy Hatch" + " (Any top layer casing)",
-
- };
- }
-
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
- boolean aActive, boolean aRedstone) {
- return aSide == aFacing
- ? new ITexture[]{BlockIcons.getCasingTextureForId(TAE.getIndexFromPage(3, 0)),
- new GT_RenderedTexture(aActive
- ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active
- : TexturesGtBlock.Overlay_Machine_Controller_Default)}
- : new ITexture[]{BlockIcons.getCasingTextureForId(TAE.getIndexFromPage(3, 0))};
- }
-
- public GT_Recipe_Map getRecipeMap() {
- return null;
- }
-
- public boolean isCorrectMachinePart(ItemStack aStack) {
- return true;
- }
-
- public boolean isFacingValid(byte aFacing) {
- return aFacing == 1;
- }
-
- public boolean checkRecipe(ItemStack aStack) {
- return false;
- }
-
- @Override
- public int getMaxParallelRecipes() {
- return 1;
- }
-
- @Override
- public int getEuDiscountForParallelism() {
- return 0;
- }
-
- public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
- super.startSoundLoop(aIndex, aX, aY, aZ);
- if (aIndex == 20) {
- GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(212)), 10, 1.0F, aX, aY,
- aZ);
- }
- }
-
- @Override
- public String getSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(212));
- }
-
- private Block getCasing(int casingID) {
- if (casingID == 1) {
- return ModBlocks.blockCasingsMisc;
- }
- else if (casingID == 2) {
- return ModBlocks.blockCasings2Misc;
- }
- else if (casingID == 3) {
- return ModBlocks.blockCasings3Misc;
- }
- else if (casingID == 4) {
- return ModBlocks.blockCasings4Misc;
- }
- else {
- return ModBlocks.blockCasingsTieredGTPP;
- }
- }
-
-
-
- //Casing3, Meta 10 - "Grate Machine Casing");
- //Casing2, Meta 0 - "Solid Steel Machine Casing"
- //Casing2, Meta 5 - "Assembling Line Casing"
- //Casing2, Meta 9 - "Assembler Machine Casing"
- //Magic Glass - blockAlloyGlass
-
- public boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 4;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 4;
-
- // Counts for all Casing Types
- int aBaseCasingCount = 0;
- int aContainmentCasingCount = 0;
- int aShieldingCount = 0;
- int aPipeCount = 0;
- int aIntegralCasingCount = 0;
- int aContainmentChamberCount = 0;
-
- // Bottom Layer
- aBaseCasingCount += checkEntireLayer(aBaseMetaTileEntity, getCasing(4), META_BaseCasing, -7, xDir, zDir);
- log("Bottom Layer is Valid. Moving to Layer 1.");
-
- // Layer 1
- aShieldingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(1), this.META_Shielding, -6, xDir, zDir);
- aIntegralCasingCount += checkIntegralRing(aBaseMetaTileEntity, getCasing(0), this.META_IntegralCasing, -6, xDir, zDir);
- aContainmentChamberCount += checkContainmentRing(aBaseMetaTileEntity, getCasing(4), this.META_ContainmentChamberCasing, -6, xDir, zDir);
- log("Layer 1 is Valid. Moving to Layer 2.");
-
- // Layer 2
- aShieldingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(1), this.META_Shielding, -5, xDir, zDir);
- aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4), this.META_PipeCasing, -5, xDir, zDir);
- log("Layer 2 is Valid. Moving to Layer 3.");
-
- // Layer 3
- aContainmentCasingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(3), this.META_ContainmentCasing, -4, xDir, zDir);
- aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4), this.META_PipeCasing, -4, xDir, zDir);
- log("Layer 3 is Valid. Moving to Layer 4.");
-
- // Layer 4
- aContainmentCasingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(3), this.META_ContainmentCasing, -3, xDir, zDir);
- aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4), this.META_PipeCasing, -3, xDir, zDir);
- log("Layer 4 is Valid. Moving to Layer 5.");
-
- // Layer 5
- aShieldingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(1), this.META_Shielding, -2, xDir, zDir);
- aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4), this.META_PipeCasing, -2, xDir, zDir);
- log("Layer 5 is Valid. Moving to Layer 6.");
-
- // Layer 6
- aShieldingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(1), this.META_Shielding, -1, xDir, zDir);
- aIntegralCasingCount += checkIntegralRing(aBaseMetaTileEntity, getCasing(0), this.META_IntegralCasing, -1, xDir, zDir);
- aContainmentChamberCount += checkContainmentRing(aBaseMetaTileEntity, getCasing(4), this.META_ContainmentChamberCasing, -1, xDir, zDir);
- log("Layer 6 is Valid. Moving to Top Layer.");
-
- // Top Layer
- aBaseCasingCount += checkEntireLayer(aBaseMetaTileEntity, getCasing(4), META_BaseCasing, 0, xDir, zDir);
-
- log("Found "+aBaseCasingCount+" "+mCasingName[0]+"s");
- log("Found "+aShieldingCount+" "+mCasingName[4]+"s");
- log("Found "+aPipeCount+" "+mCasingName[1]+"s");
- log("Found "+aContainmentCasingCount+" "+mCasingName[3]+"s");
- log("Found "+aIntegralCasingCount+" "+LangUtils.getLocalizedNameOfBlock(getCasing(0), 6)+"s");
- log("Found "+aContainmentChamberCount+" "+mCasingName[2]+"s");
-
- // Try mesage player
- String aOwnerName = this.getBaseMetaTileEntity().getOwnerName();
- EntityPlayer aOwner = null;
- if (aOwnerName != null && aOwnerName.length() > 0) {
- aOwner = PlayerUtils.getPlayer(aOwnerName);
- }
-
- if (aShieldingCount != 128) {
- log("Not enough "+mCasingName[4]+"s, require 128.");
- if (aOwner != null) {
- PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[4]+"s, require 128.");
- }
- return false;
- }
- if (aPipeCount != 20) {
- log("Not enough "+mCasingName[1]+"s, require 20.");
- if (aOwner != null) {
- PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[1]+"s, require 20.");
- }
- return false;
- }
- if (aContainmentCasingCount != 64) {
- log("Not enough "+mCasingName[3]+"s, require 64.");
- if (aOwner != null) {
- PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[3]+"s, require 64.");
- }
- return false;
- }
- if (aContainmentChamberCount != 42) {
- log("Not enough "+mCasingName[2]+"s, require 42.");
- if (aOwner != null) {
- PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[2]+"s, require 42.");
- }
- return false;
- }
- if (aBaseCasingCount < 140) {
- log("Not enough "+mCasingName[0]+"s, require 140 at a minimum.");
- if (aOwner != null) {
- PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[0]+"s, require 140 at a minimum.");
- }
- return false;
- }
- if (aIntegralCasingCount != 48) {
- log("Not enough "+LangUtils.getLocalizedNameOfBlock(getCasing(0), 6)+"s, require 48.");
- if (aOwner != null) {
- PlayerUtils.messagePlayer(aOwner, "Not enough "+LangUtils.getLocalizedNameOfBlock(getCasing(0), 6)+"s, require 48.");
- }
- return false;
- }
- log("LNR Formed.");
- if (aOwner != null) {
- PlayerUtils.messagePlayer(aOwner, "Large Naquadah Reactor has formed successfully.");
- }
- return true;
- }
-
- public boolean addNaquadahHatchToMachineInput(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (aTileEntity == null) {
- return false;
- } else {
- IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- return false;
- } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Naquadah) {
- this.updateTexture(aMetaTileEntity, aBaseCasingIndex);
- return this.mNaqHatches.add((GT_MetaTileEntity_Hatch_Naquadah) aMetaTileEntity);
- } else {
- return false;
- }
- }
- }
-
- public int checkEntireLayer(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) {
- int aCasingCount = 0;
- for (int x = -4; x < 5; x++) {
- for (int z = -4; z < 5; z++) {
- int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x;
- int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY;
- int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z;
- //Skip the corners
- if ((x == 4 && z == 4) || (x == -4 && z == -4) || (x == 4 && z == -4) || (x == -4 && z == 4)) {
- continue;
- }
- // Skip controller
- if (aY == 0 && x == 0 && z == 0) {
- continue;
- }
-
- Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z);
- int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z);
- if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) {
- aCasingCount++;
- }
- final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z);
- if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, true, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) {
- log("Layer has error. Height: "+aY);
- //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3);
- return 0;
- }
- }
- }
- return aCasingCount;
- }
-
- public int checkOuterRing(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) {
- int aCasingCount = 0;
- for (int x = -4; x < 5; x++) {
- for (int z = -4; z < 5; z++) {
- int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x;
- int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY;
- int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z;
- //Skip the corners
- if ((x == 4 && z == 4) || (x == -4 && z == -4) || (x == 4 && z == -4) || (x == -4 && z == 4)) {
- continue;
- }
-
- // If we are on the 5x5 ring, proceed
- if ((x > -4 && x < 4 ) && (z > -4 && z < 4)) {
- if ((x == 3 && z == 3) || (x == -3 && z == -3) || (x == 3 && z == -3) || (x == -3 && z == 3)) {
- //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3);
- }
- else {
- continue;
- }
- }
-
- Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z);
- int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z);
- if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) {
- aCasingCount++;
- }
- final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z);
- if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) {
- log("Layer has error. Height: "+aY);
- //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3);
- return 0;
- }
- }
- }
- return aCasingCount;
- }
- public int checkIntegralRing(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) {
- int aCasingCount = 0;
- for (int x = -3; x < 4; x++) {
- for (int z = -3; z < 4; z++) {
- int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x;
- int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY;
- int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z;
- //Skip the corners
- if ((x == 3 && z == 3) || (x == -3 && z == -3) || (x == 3 && z == -3) || (x == -3 && z == 3)) {
- continue;
- }
-
- // If we are on the 5x5 ring, proceed
- if ((x > -3 && x < 3 ) && (z > -3 && z < 3)) {
- if ((x == 2 && z == 2) || (x == -2 && z == -2) || (x == 2 && z == -2) || (x == -2 && z == 2)) {
- //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3);
- }
- else {
- continue;
- }
- }
-
- Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z);
- int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z);
- if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) {
- aCasingCount++;
- }
- final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z);
- if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) {
- log("Layer has error. Height: "+aY);
- //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3);
- return 0;
- }
- }
- }
- return aCasingCount;
- }
-
- public int checkPipes(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) {
- int aCasingCount = 0;
- for (int x = -1; x < 2; x++) {
- for (int z = -1; z < 2; z++) {
- int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x;
- int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY;
- int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z;
- //Skip the corners
- if ((x == 1 && z == 1) || (x == -1 && z == -1) || (x == 1 && z == -1) || (x == -1 && z == 1) || (x == 0 && z == 0)) {
- Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z);
- int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z);
- if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) {
- aCasingCount++;
- }
- final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z);
- if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) {
- log("Pipe has error. Height: "+aY);
- //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3);
- return 0;
- };
- }
- }
- }
- return aCasingCount;
- }
-
- public int checkContainmentRing(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) {
- int aCasingCount = 0;
- for (int x = -2; x < 3; x++) {
- for (int z = -2; z < 3; z++) {
- int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x;
- int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY;
- int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z;
- //Skip the corners
- if ((x == 2 && z == 2) || (x == -2 && z == -2) || (x == 2 && z == -2) || (x == -2 && z == 2)) {
- continue;
- }
-
- Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z);
- int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z);
- if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) {
- aCasingCount++;
- }
- final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z);
- if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) {
- log("Layer has error. Height: "+aY);
- //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3);
- return 0;
- }
- }
- }
- return aCasingCount;
- }
-
- public int getMaxEfficiency(ItemStack aStack) {
- return 10000;
- }
-
- public int getPollutionPerTick(ItemStack aStack) {
- return 133;
- }
-
- public int getDamageToComponent(ItemStack aStack) {
- return 0;
- }
-
- public boolean explodesOnComponentBreak(ItemStack aStack) {
- return false;
- }
-
- @Override
- public String getMachineType() {
- return "Reactor";
- }
-}*/
+ * package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; public class
+ * GregtechMTE_LargeNaqReactor extends GregtechMeta_MultiBlockBase { public ArrayList<GT_MetaTileEntity_Hatch_Naquadah>
+ * mNaqHatches = new ArrayList<GT_MetaTileEntity_Hatch_Naquadah>(); public static String[] mCasingName = new String[5];
+ * public static String mHatchName = "Naquadah Fuel Hatch"; private final int CASING_TEXTURE_ID =
+ * TAE.getIndexFromPage(0, 13); private final int META_BaseCasing = 0; //4 private final int META_ContainmentCasing =
+ * 15; //3 private final int META_Shielding = 13; //1 private final int META_PipeCasing = 1; //4 private final int
+ * META_IntegralCasing = 6; //0 private final int META_ContainmentChamberCasing = 2; //4 public
+ * GregtechMTE_LargeNaqReactor(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional);
+ * mCasingName[0] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 0); mCasingName[1] =
+ * LangUtils.getLocalizedNameOfBlock(getCasing(4), 1); mCasingName[2] = LangUtils.getLocalizedNameOfBlock(getCasing(4),
+ * 2); mCasingName[3] = LangUtils.getLocalizedNameOfBlock(getCasing(3), 15); mCasingName[4] =
+ * LangUtils.getLocalizedNameOfBlock(getCasing(1), 13); mHatchName =
+ * LangUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 969); } public GregtechMTE_LargeNaqReactor(String
+ * aName) { super(aName); } public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new
+ * GregtechMTE_LargeNaqReactor(this.mName); } public String[] getTooltip() { if
+ * (mCasingName[0].toLowerCase().contains(".name")) { mCasingName[0] = LangUtils.getLocalizedNameOfBlock(getCasing(4),
+ * 0); } if (mCasingName[1].toLowerCase().contains(".name")) { mCasingName[1] =
+ * LangUtils.getLocalizedNameOfBlock(getCasing(4), 1); } if (mCasingName[2].toLowerCase().contains(".name")) {
+ * mCasingName[2] = LangUtils.getLocalizedNameOfBlock(getCasing(4), 2); } if
+ * (mCasingName[3].toLowerCase().contains(".name")) { mCasingName[3] = LangUtils.getLocalizedNameOfBlock(getCasing(3),
+ * 15); } if (mCasingName[4].toLowerCase().contains(".name")) { mCasingName[4] =
+ * LangUtils.getLocalizedNameOfBlock(getCasing(1), 13); } if (mHatchName.toLowerCase().contains(".name")) { mHatchName =
+ * LangUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 969); } return new String[]{
+ * "Naquadah reacts violently with potassium, ", "resulting in massive explosions with radioactive potential.",
+ * "Size: 3x4x12, WxHxL", "Bottom Layer: "+mCasingName[0]+"s, (30x min)",
+ * "Middle Layer: "+mCasingName[2]+"s (10x), with", " "+mCasingName[3]+"s on either side",
+ * " "+mCasingName[3]+"s also on each end (x26)", "Middle Layer2: "+mCasingName[1]+" (12x total), with",
+ * " "+mCasingName[4]+"s on either side (x24)",
+ * "Top: Single row of "+mCasingName[0]+" along the middle (x12) ", "", "1x " + mHatchName +
+ * " (Any bottom layer casing)", "1x " + "Maintenance Hatch" + " (Any bottom layer side casing)", "1x " + "Energy Hatch"
+ * + " (Any top layer casing)", }; } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide,
+ * byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { return aSide == aFacing ? new
+ * ITexture[]{BlockIcons.getCasingTextureForId(TAE.getIndexFromPage(3, 0)), new GT_RenderedTexture(aActive ?
+ * TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)} :
+ * new ITexture[]{BlockIcons.getCasingTextureForId(TAE.getIndexFromPage(3, 0))}; } public GT_Recipe_Map getRecipeMap() {
+ * return null; } public boolean isCorrectMachinePart(ItemStack aStack) { return true; } public boolean
+ * isFacingValid(byte aFacing) { return aFacing == 1; } public boolean checkRecipe(ItemStack aStack) { return false; }
+ * @Override public int getMaxParallelRecipes() { return 1; }
+ * @Override public int getEuDiscountForParallelism() { return 0; } public void startSoundLoop(byte aIndex, double aX,
+ * double aY, double aZ) { super.startSoundLoop(aIndex, aX, aY, aZ); if (aIndex == 20) {
+ * GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(212)), 10, 1.0F, aX, aY, aZ); } }
+ * @Override public String getSound() { return (String) GregTech_API.sSoundList.get(Integer.valueOf(212)); } private
+ * Block getCasing(int casingID) { if (casingID == 1) { return ModBlocks.blockCasingsMisc; } else if (casingID == 2) {
+ * return ModBlocks.blockCasings2Misc; } else if (casingID == 3) { return ModBlocks.blockCasings3Misc; } else if
+ * (casingID == 4) { return ModBlocks.blockCasings4Misc; } else { return ModBlocks.blockCasingsTieredGTPP; } }
+ * //Casing3, Meta 10 - "Grate Machine Casing"); //Casing2, Meta 0 - "Solid Steel Machine Casing" //Casing2, Meta 5 -
+ * "Assembling Line Casing" //Casing2, Meta 9 - "Assembler Machine Casing" //Magic Glass - blockAlloyGlass public
+ * boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { int xDir =
+ * ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 4; int zDir =
+ * ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 4; // Counts for all Casing Types int
+ * aBaseCasingCount = 0; int aContainmentCasingCount = 0; int aShieldingCount = 0; int aPipeCount = 0; int
+ * aIntegralCasingCount = 0; int aContainmentChamberCount = 0; // Bottom Layer aBaseCasingCount +=
+ * checkEntireLayer(aBaseMetaTileEntity, getCasing(4), META_BaseCasing, -7, xDir, zDir);
+ * log("Bottom Layer is Valid. Moving to Layer 1."); // Layer 1 aShieldingCount += checkOuterRing(aBaseMetaTileEntity,
+ * getCasing(1), this.META_Shielding, -6, xDir, zDir); aIntegralCasingCount += checkIntegralRing(aBaseMetaTileEntity,
+ * getCasing(0), this.META_IntegralCasing, -6, xDir, zDir); aContainmentChamberCount +=
+ * checkContainmentRing(aBaseMetaTileEntity, getCasing(4), this.META_ContainmentChamberCasing, -6, xDir, zDir);
+ * log("Layer 1 is Valid. Moving to Layer 2."); // Layer 2 aShieldingCount += checkOuterRing(aBaseMetaTileEntity,
+ * getCasing(1), this.META_Shielding, -5, xDir, zDir); aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4),
+ * this.META_PipeCasing, -5, xDir, zDir); log("Layer 2 is Valid. Moving to Layer 3."); // Layer 3
+ * aContainmentCasingCount += checkOuterRing(aBaseMetaTileEntity, getCasing(3), this.META_ContainmentCasing, -4, xDir,
+ * zDir); aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4), this.META_PipeCasing, -4, xDir, zDir);
+ * log("Layer 3 is Valid. Moving to Layer 4."); // Layer 4 aContainmentCasingCount +=
+ * checkOuterRing(aBaseMetaTileEntity, getCasing(3), this.META_ContainmentCasing, -3, xDir, zDir); aPipeCount +=
+ * checkPipes(aBaseMetaTileEntity, getCasing(4), this.META_PipeCasing, -3, xDir, zDir);
+ * log("Layer 4 is Valid. Moving to Layer 5."); // Layer 5 aShieldingCount += checkOuterRing(aBaseMetaTileEntity,
+ * getCasing(1), this.META_Shielding, -2, xDir, zDir); aPipeCount += checkPipes(aBaseMetaTileEntity, getCasing(4),
+ * this.META_PipeCasing, -2, xDir, zDir); log("Layer 5 is Valid. Moving to Layer 6."); // Layer 6 aShieldingCount +=
+ * checkOuterRing(aBaseMetaTileEntity, getCasing(1), this.META_Shielding, -1, xDir, zDir); aIntegralCasingCount +=
+ * checkIntegralRing(aBaseMetaTileEntity, getCasing(0), this.META_IntegralCasing, -1, xDir, zDir);
+ * aContainmentChamberCount += checkContainmentRing(aBaseMetaTileEntity, getCasing(4),
+ * this.META_ContainmentChamberCasing, -1, xDir, zDir); log("Layer 6 is Valid. Moving to Top Layer."); // Top Layer
+ * aBaseCasingCount += checkEntireLayer(aBaseMetaTileEntity, getCasing(4), META_BaseCasing, 0, xDir, zDir);
+ * log("Found "+aBaseCasingCount+" "+mCasingName[0]+"s"); log("Found "+aShieldingCount+" "+mCasingName[4]+"s");
+ * log("Found "+aPipeCount+" "+mCasingName[1]+"s"); log("Found "+aContainmentCasingCount+" "+mCasingName[3]+"s");
+ * log("Found "+aIntegralCasingCount+" "+LangUtils.getLocalizedNameOfBlock(getCasing(0), 6)+"s");
+ * log("Found "+aContainmentChamberCount+" "+mCasingName[2]+"s"); // Try mesage player String aOwnerName =
+ * this.getBaseMetaTileEntity().getOwnerName(); EntityPlayer aOwner = null; if (aOwnerName != null &&
+ * aOwnerName.length() > 0) { aOwner = PlayerUtils.getPlayer(aOwnerName); } if (aShieldingCount != 128) {
+ * log("Not enough "+mCasingName[4]+"s, require 128."); if (aOwner != null) { PlayerUtils.messagePlayer(aOwner,
+ * "Not enough "+mCasingName[4]+"s, require 128."); } return false; } if (aPipeCount != 20) {
+ * log("Not enough "+mCasingName[1]+"s, require 20."); if (aOwner != null) { PlayerUtils.messagePlayer(aOwner,
+ * "Not enough "+mCasingName[1]+"s, require 20."); } return false; } if (aContainmentCasingCount != 64) {
+ * log("Not enough "+mCasingName[3]+"s, require 64."); if (aOwner != null) { PlayerUtils.messagePlayer(aOwner,
+ * "Not enough "+mCasingName[3]+"s, require 64."); } return false; } if (aContainmentChamberCount != 42) {
+ * log("Not enough "+mCasingName[2]+"s, require 42."); if (aOwner != null) { PlayerUtils.messagePlayer(aOwner,
+ * "Not enough "+mCasingName[2]+"s, require 42."); } return false; } if (aBaseCasingCount < 140) {
+ * log("Not enough "+mCasingName[0]+"s, require 140 at a minimum."); if (aOwner != null) {
+ * PlayerUtils.messagePlayer(aOwner, "Not enough "+mCasingName[0]+"s, require 140 at a minimum."); } return false; } if
+ * (aIntegralCasingCount != 48) { log("Not enough "+LangUtils.getLocalizedNameOfBlock(getCasing(0),
+ * 6)+"s, require 48."); if (aOwner != null) { PlayerUtils.messagePlayer(aOwner,
+ * "Not enough "+LangUtils.getLocalizedNameOfBlock(getCasing(0), 6)+"s, require 48."); } return false; }
+ * log("LNR Formed."); if (aOwner != null) { PlayerUtils.messagePlayer(aOwner,
+ * "Large Naquadah Reactor has formed successfully."); } return true; } public boolean
+ * addNaquadahHatchToMachineInput(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { if (aTileEntity == null) {
+ * return false; } else { IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); if (aMetaTileEntity ==
+ * null) { return false; } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Naquadah) {
+ * this.updateTexture(aMetaTileEntity, aBaseCasingIndex); return this.mNaqHatches.add((GT_MetaTileEntity_Hatch_Naquadah)
+ * aMetaTileEntity); } else { return false; } } } public int checkEntireLayer(IGregTechTileEntity aBaseMetaTileEntity,
+ * Block aBlock, int aMeta, int aY, int xDir, int zDir) { int aCasingCount = 0; for (int x = -4; x < 5; x++) { for (int
+ * z = -4; z < 5; z++) { int aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x; int aOffsetY =
+ * this.getBaseMetaTileEntity().getYCoord() + aY; int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; //Skip
+ * the corners if ((x == 4 && z == 4) || (x == -4 && z == -4) || (x == 4 && z == -4) || (x == -4 && z == 4)) { continue;
+ * } // Skip controller if (aY == 0 && x == 0 && z == 0) { continue; } Block aCurrentBlock =
+ * aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z); int aCurrentMeta = (int)
+ * aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) {
+ * aCasingCount++; } final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x,
+ * aY, zDir + z); if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, true, aCurrentBlock, aCurrentMeta,
+ * aBlock, aMeta)) { log("Layer has error. Height: "+aY); //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX,
+ * aOffsetY, aOffsetZ, aBlock, aMeta, 3); return 0; } } } return aCasingCount; } public int
+ * checkOuterRing(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) { int
+ * aCasingCount = 0; for (int x = -4; x < 5; x++) { for (int z = -4; z < 5; z++) { int aOffsetX =
+ * this.getBaseMetaTileEntity().getXCoord() + x; int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY; int
+ * aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; //Skip the corners if ((x == 4 && z == 4) || (x == -4 && z
+ * == -4) || (x == 4 && z == -4) || (x == -4 && z == 4)) { continue; } // If we are on the 5x5 ring, proceed if ((x > -4
+ * && x < 4 ) && (z > -4 && z < 4)) { if ((x == 3 && z == 3) || (x == -3 && z == -3) || (x == 3 && z == -3) || (x == -3
+ * && z == 3)) { //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); }
+ * else { continue; } } Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z); int
+ * aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); if (aCurrentBlock == aBlock &&
+ * aCurrentMeta == aMeta) { aCasingCount++; } final IGregTechTileEntity tTileEntity =
+ * aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z); if (!isValidBlockForStructure(tTileEntity,
+ * CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) { log("Layer has error. Height: "+aY);
+ * //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); return 0; } } }
+ * return aCasingCount; } public int checkIntegralRing(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta,
+ * int aY, int xDir, int zDir) { int aCasingCount = 0; for (int x = -3; x < 4; x++) { for (int z = -3; z < 4; z++) { int
+ * aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x; int aOffsetY = this.getBaseMetaTileEntity().getYCoord() +
+ * aY; int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; //Skip the corners if ((x == 3 && z == 3) || (x ==
+ * -3 && z == -3) || (x == 3 && z == -3) || (x == -3 && z == 3)) { continue; } // If we are on the 5x5 ring, proceed if
+ * ((x > -3 && x < 3 ) && (z > -3 && z < 3)) { if ((x == 2 && z == 2) || (x == -2 && z == -2) || (x == 2 && z == -2) ||
+ * (x == -2 && z == 2)) { //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock,
+ * aMeta, 3); } else { continue; } } Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z);
+ * int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); if (aCurrentBlock == aBlock &&
+ * aCurrentMeta == aMeta) { aCasingCount++; } final IGregTechTileEntity tTileEntity =
+ * aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, aY, zDir + z); if (!isValidBlockForStructure(tTileEntity,
+ * CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta, aBlock, aMeta)) { log("Layer has error. Height: "+aY);
+ * //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX, aOffsetY, aOffsetZ, aBlock, aMeta, 3); return 0; } } }
+ * return aCasingCount; } public int checkPipes(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int
+ * aY, int xDir, int zDir) { int aCasingCount = 0; for (int x = -1; x < 2; x++) { for (int z = -1; z < 2; z++) { int
+ * aOffsetX = this.getBaseMetaTileEntity().getXCoord() + x; int aOffsetY = this.getBaseMetaTileEntity().getYCoord() +
+ * aY; int aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; //Skip the corners if ((x == 1 && z == 1) || (x ==
+ * -1 && z == -1) || (x == 1 && z == -1) || (x == -1 && z == 1) || (x == 0 && z == 0)) { Block aCurrentBlock =
+ * aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z); int aCurrentMeta = (int)
+ * aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) {
+ * aCasingCount++; } final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x,
+ * aY, zDir + z); if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta,
+ * aBlock, aMeta)) { log("Pipe has error. Height: "+aY); //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX,
+ * aOffsetY, aOffsetZ, aBlock, aMeta, 3); return 0; }; } } } return aCasingCount; } public int
+ * checkContainmentRing(IGregTechTileEntity aBaseMetaTileEntity, Block aBlock, int aMeta, int aY, int xDir, int zDir) {
+ * int aCasingCount = 0; for (int x = -2; x < 3; x++) { for (int z = -2; z < 3; z++) { int aOffsetX =
+ * this.getBaseMetaTileEntity().getXCoord() + x; int aOffsetY = this.getBaseMetaTileEntity().getYCoord() + aY; int
+ * aOffsetZ = this.getBaseMetaTileEntity().getZCoord() + z; //Skip the corners if ((x == 2 && z == 2) || (x == -2 && z
+ * == -2) || (x == 2 && z == -2) || (x == -2 && z == 2)) { continue; } Block aCurrentBlock =
+ * aBaseMetaTileEntity.getBlockOffset(xDir + x, aY, zDir + z); int aCurrentMeta = (int)
+ * aBaseMetaTileEntity.getMetaIDOffset(xDir + x, aY, zDir + z); if (aCurrentBlock == aBlock && aCurrentMeta == aMeta) {
+ * aCasingCount++; } final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x,
+ * aY, zDir + z); if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, false, aCurrentBlock, aCurrentMeta,
+ * aBlock, aMeta)) { log("Layer has error. Height: "+aY); //this.getBaseMetaTileEntity().getWorld().setBlock(aOffsetX,
+ * aOffsetY, aOffsetZ, aBlock, aMeta, 3); return 0; } } } return aCasingCount; } public int getMaxEfficiency(ItemStack
+ * aStack) { return 10000; } public int getPollutionPerTick(ItemStack aStack) { return 133; } public int
+ * getDamageToComponent(ItemStack aStack) { return 0; } public boolean explodesOnComponentBreak(ItemStack aStack) {
+ * return false; }
+ * @Override public String getMachineType() { return "Reactor"; } }
+ */
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java
index bdbedbc36e..753cbc9d4f 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java
@@ -1,351 +1,95 @@
/*
-package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production;
-
-
-public class GregtechMTE_MiniFusionPlant extends GregtechMeta_MultiBlockBase {
-
- public long currentVoltage = GT_Values.V[7];
- public byte currentTier = 8;
-
- public void upvolt() {
- byte f = currentTier;
- if ((f+1) > 10) {
- f = 8;
- }
- else {
- f++;
- }
- this.currentTier = f;
- updateVoltage();
- }
-
- public void downvolt() {
- byte f = currentTier;
- if ((f-1) < 8) {
- f = 10;
- }
- else {
- f--;
- }
- this.currentTier = f;
- updateVoltage();
- }
-
- private long updateVoltage() {
- this.currentVoltage = GT_Values.V[this.currentTier-1];
- return currentVoltage;
- }
-
- public GregtechMTE_MiniFusionPlant(String aName) {
- super(aName);
- }
-
- public GregtechMTE_MiniFusionPlant(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional);
- }
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMTE_MiniFusionPlant(this.mName);
- }
-
- @Override
- public boolean isCorrectMachinePart(ItemStack aStack) {
- return true;
- }
-
- @Override
- public int getDamageToComponent(ItemStack aStack) {
- return 0;
- }
-
- @Override
- public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
- final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
- if (aSide == this.getBaseMetaTileEntity().getBackFacing()) {
- return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(10)),
- Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[(int) this.getInputTier()]};
- }
- if (aSide == 1) {
- return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(10)),
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[(int) this.getOutputTier()]};
- }
- if (aSide == aFacing) {
- return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(10)),
- new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER)};
- }
- return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(10))};
- }
-
-
- @Override
- public GT_Recipe.GT_Recipe_Map getRecipeMap() {
- return GTPP_Recipe.GTPP_Recipe_Map.sSlowFusionRecipes;
- }
-
- @Override
- public String getMachineType() {
- return "Fusion Reactor";
- }
-
- @Override
- public String[] getTooltip() {
- return new String[] {
- "Small scale fusion",
- "16x slower than using Multiblock of the same voltage",
- //"Input voltage can be changed within the GUI",
- "Place Input/Output Hatches on sides and bottom",
- "Power can only be inserted into the back",
- //e"Power can only be extracted from the top",
- TAG_HIDE_HATCHES
- };
- }
-
- @Override
- public int getMaxParallelRecipes() {
- return 1;
- }
-
- @Override
- public int getEuDiscountForParallelism() {
- return 0;
- }
-
- @Override
- public boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
- int xDir2 = ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()).offsetX;
- int zDir2 = ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()).offsetZ;
- int tAmount = 0;
-
- ForgeDirection aDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing());
-
- //Require air in front, I think
- if (!aBaseMetaTileEntity.getAirOffset(xDir2, 0, zDir2)) {
- Logger.INFO("Did not find air in front");
- return false;
- } else {
- for (int i = -1; i < 2; ++i) {
- for (int j = -1; j < 2; ++j) {
- for (int h = -1; h < 2; ++h) {
- if (h != 0 || (xDir + i != 0 || zDir + j != 0) && (i != 0 || j != 0)) {
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i,
- h, zDir + j);
- if (this.addToMachineList(tTileEntity, TAE.GTPP_INDEX(10))) {
- tAmount++;
- }
- }
- }
- }
- }
- }
- Logger.INFO("Tanks found: "+tAmount);
- return tAmount == 3;
- }
-
- @Override
- public boolean checkRecipe(ItemStack arg0) {
-
-
- ArrayList tFluidList = this.getStoredFluids();
- int tFluidList_sS = tFluidList.size();
-
- for (int tFluids = 0; tFluids < tFluidList_sS - 1; ++tFluids) {
- for (int tRecipe = tFluids + 1; tRecipe < tFluidList_sS; ++tRecipe) {
- if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(tFluids),
- (FluidStack) tFluidList.get(tRecipe))) {
- if (((FluidStack) tFluidList.get(tFluids)).amount < ((FluidStack) tFluidList.get(tRecipe)).amount) {
- tFluidList.remove(tFluids--);
- tFluidList_sS = tFluidList.size();
- break;
- }
-
- tFluidList.remove(tRecipe--);
- tFluidList_sS = tFluidList.size();
- }
- }
- }
- int aStep = 0;
- //Logger.INFO("Step "+aStep++);
- if (tFluidList.size() > 1) {
- //Logger.INFO("Step "+aStep++);
- FluidStack[] arg5 = (FluidStack[]) tFluidList.toArray(new FluidStack[tFluidList.size()]);
- GT_Recipe arg6 = getRecipeMap().findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe,
- false, this.getMaxInputVoltage(), arg5, new ItemStack[0]);
- if (arg6 == null && !this.mRunningOnLoad || (arg6 != null && this.maxEUStore() < (long) arg6.mSpecialValue)) {
- //Logger.INFO("Bad Step "+aStep++);
- //this.turnCasingActive(false);
- this.mLastRecipe = null;
- return false;
- }
- //Logger.INFO("Step "+aStep++);
-
- if (this.mRunningOnLoad || (arg6 != null && arg6.isRecipeInputEqual(true, arg5, new ItemStack[0]))) {
- //Logger.INFO("Step "+aStep++);
- this.mLastRecipe = arg6;
- this.mEUt = this.mLastRecipe.mEUt * 1;
- this.mMaxProgresstime = this.mLastRecipe.mDuration / 1;
- this.mEfficiencyIncrease = 10000;
- this.mOutputFluids = this.mLastRecipe.mFluidOutputs;
- //this.turnCasingActive(true);
- this.mRunningOnLoad = false;
- return true;
- }
- //Logger.INFO("Step "+aStep++);
- }
- //Logger.INFO("Step "+aStep++);
-
- return false;
-
-
-
-
- //return this.checkRecipeGeneric(this.getMaxParallelRecipes(), getEuDiscountForParallelism(), 0);
- }
-
- @Override
- public int getMaxEfficiency(ItemStack arg0) {
- return 10000;
- }
-
- @Override
- public boolean drainEnergyInput(long aEU) {
- // Not applicable to this machine
- return true;
- }
-
- @Override
- public boolean addEnergyOutput(long aEU) {
- // Not applicable to this machine
- return true;
- }
-
- @Override
- public long maxEUStore() {
- return this.getMaxInputVoltage() * 256 * 512;
- }
-
- @Override
- public long getMinimumStoredEU() {
- return 0;
- }
-
- @Override
- public String[] getExtraInfoData() {
- String mode = EnumChatFormatting.BLUE + "" + currentVoltage + EnumChatFormatting.RESET;
- String aOutput = EnumChatFormatting.BLUE + "" + mEUt + EnumChatFormatting.RESET;
- String storedEnergyText;
- if (this.getEUVar() > maxEUStore()) {
- storedEnergyText = EnumChatFormatting.RED + GT_Utility.formatNumbers(this.getEUVar()) + EnumChatFormatting.RESET;
- } else {
- storedEnergyText = EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.getEUVar()) + EnumChatFormatting.RESET;
- }
-
- return new String[]{
- "Stored EU: " + storedEnergyText,
- "Capacity: " + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(this.maxEUStore()) + EnumChatFormatting.RESET,
- "Voltage: " + mode,
- "Output Voltage: " + aOutput
- };
- }
-
- @Override
- public void explodeMultiblock() {
- super.explodeMultiblock();
- }
-
- @Override
- public void doExplosion(long aExplosionPower) {
- super.doExplosion(aExplosionPower);
- }
-
- @Override
- public long getMaxInputVoltage() {
- return updateVoltage();
- }
-
- @Override
- public long getInputTier() {
- return (long) GT_Utility.getTier(maxEUInput());
- }
-
- @Override
- public boolean isElectric() {
- return true;
- }
-
- @Override
- public boolean isEnetInput() {
- return true;
- }
-
- @Override
- public boolean isEnetOutput() {
- return false;
- }
-
- @Override
- public boolean isInputFacing(byte aSide) {
- return (aSide == this.getBaseMetaTileEntity().getBackFacing());
- }
-
- @Override
- public boolean isOutputFacing(byte aSide) {
- return aSide == 1;
- }
-
- @Override
- public long maxAmperesIn() {
- return 32;
- }
-
- @Override
- public long maxAmperesOut() {
- return 1;
- }
-
- @Override
- public long maxEUInput() {
- return updateVoltage();
- }
-
- @Override
- public long maxEUOutput() {
- return mEUt > 0 ? mEUt : 0;
- }
-
- @Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- super.onPostTick(aBaseMetaTileEntity, aTick);
- this.mWrench = true;
- this.mScrewdriver = true;
- this.mSoftHammer = true;
- this.mHardHammer = true;
- this.mSolderingTool = true;
- this.mCrowbar = true;
- }
-
- @Override
- public boolean causeMaintenanceIssue() {
- return true;
- }
-
- @Override
- public int getControlCoreTier() {
- return this.currentTier;
- }
-
- @Override
- public int getPollutionPerTick(ItemStack arg0) {
- return 0;
- }
-
- @Override
- public GT_MetaTileEntity_Hatch_ControlCore getControlCoreBus() {
- GT_MetaTileEntity_Hatch_ControlCore x = new GT_MetaTileEntity_Hatch_ControlCore("", 0, "", null);
- return (GT_MetaTileEntity_Hatch_ControlCore) x;
- }
-
-}
-*/
+ * package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; public class
+ * GregtechMTE_MiniFusionPlant extends GregtechMeta_MultiBlockBase { public long currentVoltage = GT_Values.V[7]; public
+ * byte currentTier = 8; public void upvolt() { byte f = currentTier; if ((f+1) > 10) { f = 8; } else { f++; }
+ * this.currentTier = f; updateVoltage(); } public void downvolt() { byte f = currentTier; if ((f-1) < 8) { f = 10; }
+ * else { f--; } this.currentTier = f; updateVoltage(); } private long updateVoltage() { this.currentVoltage =
+ * GT_Values.V[this.currentTier-1]; return currentVoltage; } public GregtechMTE_MiniFusionPlant(String aName) {
+ * super(aName); } public GregtechMTE_MiniFusionPlant(int aID, String aName, String aNameRegional) { super(aID, aName,
+ * aNameRegional); }
+ * @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new
+ * GregtechMTE_MiniFusionPlant(this.mName); }
+ * @Override public boolean isCorrectMachinePart(ItemStack aStack) { return true; }
+ * @Override public int getDamageToComponent(ItemStack aStack) { return 0; }
+ * @Override public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte
+ * aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { if (aSide ==
+ * this.getBaseMetaTileEntity().getBackFacing()) { return new
+ * ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(10)),
+ * Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[(int) this.getInputTier()]}; } if (aSide == 1) { return new
+ * ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(10)),
+ * Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[(int) this.getOutputTier()]}; } if (aSide == aFacing) { return new
+ * ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(10)), new GT_RenderedTexture(aActive ?
+ * Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER)}; } return
+ * new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(10))}; }
+ * @Override public GT_Recipe.GT_Recipe_Map getRecipeMap() { return GTPP_Recipe.GTPP_Recipe_Map.sSlowFusionRecipes; }
+ * @Override public String getMachineType() { return "Fusion Reactor"; }
+ * @Override public String[] getTooltip() { return new String[] { "Small scale fusion",
+ * "16x slower than using Multiblock of the same voltage", //"Input voltage can be changed within the GUI",
+ * "Place Input/Output Hatches on sides and bottom", "Power can only be inserted into the back",
+ * //e"Power can only be extracted from the top", TAG_HIDE_HATCHES }; }
+ * @Override public int getMaxParallelRecipes() { return 1; }
+ * @Override public int getEuDiscountForParallelism() { return 0; }
+ * @Override public boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { int xDir =
+ * ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; int zDir =
+ * ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; int xDir2 =
+ * ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()).offsetX; int zDir2 =
+ * ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()).offsetZ; int tAmount = 0; ForgeDirection aDir =
+ * ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()); //Require air in front, I think if
+ * (!aBaseMetaTileEntity.getAirOffset(xDir2, 0, zDir2)) { Logger.INFO("Did not find air in front"); return false; } else
+ * { for (int i = -1; i < 2; ++i) { for (int j = -1; j < 2; ++j) { for (int h = -1; h < 2; ++h) { if (h != 0 || (xDir +
+ * i != 0 || zDir + j != 0) && (i != 0 || j != 0)) { IGregTechTileEntity tTileEntity =
+ * aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j); if (this.addToMachineList(tTileEntity,
+ * TAE.GTPP_INDEX(10))) { tAmount++; } } } } } } Logger.INFO("Tanks found: "+tAmount); return tAmount == 3; }
+ * @Override public boolean checkRecipe(ItemStack arg0) { ArrayList tFluidList = this.getStoredFluids(); int
+ * tFluidList_sS = tFluidList.size(); for (int tFluids = 0; tFluids < tFluidList_sS - 1; ++tFluids) { for (int tRecipe =
+ * tFluids + 1; tRecipe < tFluidList_sS; ++tRecipe) { if (GT_Utility.areFluidsEqual((FluidStack)
+ * tFluidList.get(tFluids), (FluidStack) tFluidList.get(tRecipe))) { if (((FluidStack) tFluidList.get(tFluids)).amount <
+ * ((FluidStack) tFluidList.get(tRecipe)).amount) { tFluidList.remove(tFluids--); tFluidList_sS = tFluidList.size();
+ * break; } tFluidList.remove(tRecipe--); tFluidList_sS = tFluidList.size(); } } } int aStep = 0;
+ * //Logger.INFO("Step "+aStep++); if (tFluidList.size() > 1) { //Logger.INFO("Step "+aStep++); FluidStack[] arg5 =
+ * (FluidStack[]) tFluidList.toArray(new FluidStack[tFluidList.size()]); GT_Recipe arg6 =
+ * getRecipeMap().findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, false, this.getMaxInputVoltage(), arg5, new
+ * ItemStack[0]); if (arg6 == null && !this.mRunningOnLoad || (arg6 != null && this.maxEUStore() < (long)
+ * arg6.mSpecialValue)) { //Logger.INFO("Bad Step "+aStep++); //this.turnCasingActive(false); this.mLastRecipe = null;
+ * return false; } //Logger.INFO("Step "+aStep++); if (this.mRunningOnLoad || (arg6 != null &&
+ * arg6.isRecipeInputEqual(true, arg5, new ItemStack[0]))) { //Logger.INFO("Step "+aStep++); this.mLastRecipe = arg6;
+ * this.mEUt = this.mLastRecipe.mEUt * 1; this.mMaxProgresstime = this.mLastRecipe.mDuration / 1;
+ * this.mEfficiencyIncrease = 10000; this.mOutputFluids = this.mLastRecipe.mFluidOutputs; //this.turnCasingActive(true);
+ * this.mRunningOnLoad = false; return true; } //Logger.INFO("Step "+aStep++); } //Logger.INFO("Step "+aStep++); return
+ * false; //return this.checkRecipeGeneric(this.getMaxParallelRecipes(), getEuDiscountForParallelism(), 0); }
+ * @Override public int getMaxEfficiency(ItemStack arg0) { return 10000; }
+ * @Override public boolean drainEnergyInput(long aEU) { // Not applicable to this machine return true; }
+ * @Override public boolean addEnergyOutput(long aEU) { // Not applicable to this machine return true; }
+ * @Override public long maxEUStore() { return this.getMaxInputVoltage() * 256 * 512; }
+ * @Override public long getMinimumStoredEU() { return 0; }
+ * @Override public String[] getExtraInfoData() { String mode = EnumChatFormatting.BLUE + "" + currentVoltage +
+ * EnumChatFormatting.RESET; String aOutput = EnumChatFormatting.BLUE + "" + mEUt + EnumChatFormatting.RESET; String
+ * storedEnergyText; if (this.getEUVar() > maxEUStore()) { storedEnergyText = EnumChatFormatting.RED +
+ * GT_Utility.formatNumbers(this.getEUVar()) + EnumChatFormatting.RESET; } else { storedEnergyText =
+ * EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.getEUVar()) + EnumChatFormatting.RESET; } return new
+ * String[]{ "Stored EU: " + storedEnergyText, "Capacity: " + EnumChatFormatting.YELLOW +
+ * GT_Utility.formatNumbers(this.maxEUStore()) + EnumChatFormatting.RESET, "Voltage: " + mode, "Output Voltage: " +
+ * aOutput }; }
+ * @Override public void explodeMultiblock() { super.explodeMultiblock(); }
+ * @Override public void doExplosion(long aExplosionPower) { super.doExplosion(aExplosionPower); }
+ * @Override public long getMaxInputVoltage() { return updateVoltage(); }
+ * @Override public long getInputTier() { return (long) GT_Utility.getTier(maxEUInput()); }
+ * @Override public boolean isElectric() { return true; }
+ * @Override public boolean isEnetInput() { return true; }
+ * @Override public boolean isEnetOutput() { return false; }
+ * @Override public boolean isInputFacing(byte aSide) { return (aSide == this.getBaseMetaTileEntity().getBackFacing());
+ * }
+ * @Override public boolean isOutputFacing(byte aSide) { return aSide == 1; }
+ * @Override public long maxAmperesIn() { return 32; }
+ * @Override public long maxAmperesOut() { return 1; }
+ * @Override public long maxEUInput() { return updateVoltage(); }
+ * @Override public long maxEUOutput() { return mEUt > 0 ? mEUt : 0; }
+ * @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ * super.onPostTick(aBaseMetaTileEntity, aTick); this.mWrench = true; this.mScrewdriver = true; this.mSoftHammer = true;
+ * this.mHardHammer = true; this.mSolderingTool = true; this.mCrowbar = true; }
+ * @Override public boolean causeMaintenanceIssue() { return true; }
+ * @Override public int getControlCoreTier() { return this.currentTier; }
+ * @Override public int getPollutionPerTick(ItemStack arg0) { return 0; }
+ * @Override public GT_MetaTileEntity_Hatch_ControlCore getControlCoreBus() { GT_MetaTileEntity_Hatch_ControlCore x =
+ * new GT_MetaTileEntity_Hatch_ControlCore("", 0, "", null); return (GT_MetaTileEntity_Hatch_ControlCore) x; } }
+ */
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java
index d71e4d7933..42cd033829 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java
@@ -8,10 +8,17 @@ import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
import static gregtech.api.util.GT_StructureUtility.filterByMTETier;
+import java.util.Collection;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.enums.TAE;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
@@ -32,10 +39,6 @@ import gtPlusPlus.core.material.ELEMENT;
import gtPlusPlus.core.material.nuclear.NUCLIDE;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
-import java.util.Collection;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.fluids.FluidStack;
public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase<GregtechMTE_NuclearReactor>
implements ISurvivalConstructable {
@@ -71,48 +74,34 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase<Greg
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Liquid Fluoride Thorium Reactor.")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Liquid Fluoride Thorium Reactor.")
.addInfo("Produces Heat & Energy from Radioactive Beta Decay.")
.addInfo("Input Li2BeF4 and a molten salt as fuel, and match the 4 Dynamo Hatches:")
.addInfo("LFTR Fuel 1 (4 IV amps), LFTR Fuel 2 (4 LuV amps), LFTR Fuel 3 (4 ZPM amps)")
.addInfo("Outputs U233 every 10 seconds, on average, while the reactor is running")
.addInfo("Check NEI to see the other outputs - they differ between fuels")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(7, 4, 7, true)
- .addController("Bottom Center")
- .addCasingInfo("Hastelloy-N Reactor Casing", 27)
- .addCasingInfo("Zeron-100 Reactor Shielding", 26)
- .addInputHatch("Top or bottom layer edges", 1)
- .addOutputHatch("Top or bottom layer edges", 1)
- .addDynamoHatch("Top or bottom layer edges", 1)
- .addMaintenanceHatch("Top or bottom layer edges", 1)
- .addMufflerHatch("Top 3x3", 2)
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(7, 4, 7, true)
+ .addController("Bottom Center").addCasingInfo("Hastelloy-N Reactor Casing", 27)
+ .addCasingInfo("Zeron-100 Reactor Shielding", 26).addInputHatch("Top or bottom layer edges", 1)
+ .addOutputHatch("Top or bottom layer edges", 1).addDynamoHatch("Top or bottom layer edges", 1)
+ .addMaintenanceHatch("Top or bottom layer edges", 1).addMufflerHatch("Top 3x3", 2)
.addStructureInfo("All dynamos must be between EV and LuV tier.")
.addStructureInfo("All other hatches must be IV+ tier.")
.addStructureInfo("3x Output Hatches, 2x Input Hatches, 4x Dynamo Hatches")
- .addStructureInfo("2x Maintenance Hatches, 4x Mufflers")
- .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ .addStructureInfo("2x Maintenance Hatches, 4x Mufflers").toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@Override
public String[] getExtraInfoData() {
final String tRunning = (this.mMaxProgresstime > 0 ? "Reactor running" : "Reactor stopped");
- final String tMaintainance =
- (this.getIdealStatus() == this.getRepairStatus() ? "No Maintainance issues" : "Needs Maintainance");
+ final String tMaintainance = (this.getIdealStatus() == this.getRepairStatus() ? "No Maintainance issues"
+ : "Needs Maintainance");
- return new String[] {
- "Liquid Fluoride Thorium Reactor",
- tRunning,
- tMaintainance,
- "Current Output: " + this.lEUt + " EU/t",
- "Fuel Remaining: " + this.mFuelRemaining + " Litres",
- "Current Efficiency: " + (this.mEfficiency / 5) + "%",
- "Current Efficiency (Raw): " + (this.mEfficiency),
- "It requires you to have 100% Efficiency."
- };
+ return new String[] { "Liquid Fluoride Thorium Reactor", tRunning, tMaintainance,
+ "Current Output: " + this.lEUt + " EU/t", "Fuel Remaining: " + this.mFuelRemaining + " Litres",
+ "Current Efficiency: " + (this.mEfficiency / 5) + "%",
+ "Current Efficiency (Raw): " + (this.mEfficiency), "It requires you to have 100% Efficiency." };
}
@Override
@@ -121,54 +110,29 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase<Greg
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
boolean aWarmedUp = this.mEfficiency == this.getMaxEfficiency(null);
if (!aBaseMetaTileEntity.isActive() || !aWarmedUp) {
if (aSide == aFacing) {
- if (aActive)
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(12)),
- TextureFactory.builder()
- .addIcon(Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR_ACTIVE)
- .extFacing()
- .build()
- };
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(12)),
- TextureFactory.builder()
- .addIcon(Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR)
- .extFacing()
- .build()
- };
+ if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(12)),
+ TextureFactory.builder().addIcon(Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR_ACTIVE)
+ .extFacing().build() };
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(12)), TextureFactory
+ .builder().addIcon(Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR).extFacing().build() };
}
- return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(12))};
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(12)) };
} else if (aBaseMetaTileEntity.isActive() && aWarmedUp) {
if (aSide == aFacing) {
- if (aActive)
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(13)),
- TextureFactory.builder()
- .addIcon(Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR_ACTIVE)
- .extFacing()
- .build()
- };
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(13)),
- TextureFactory.builder()
- .addIcon(Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR)
- .extFacing()
- .build()
- };
+ if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(13)),
+ TextureFactory.builder().addIcon(Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR_ACTIVE)
+ .extFacing().build() };
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(13)), TextureFactory
+ .builder().addIcon(Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR).extFacing().build() };
}
- return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(13))};
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(13)) };
}
- return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(12))};
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(12)) };
}
public final boolean addNuclearReactorEdgeList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
@@ -181,14 +145,16 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase<Greg
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo
&& (((GT_MetaTileEntity_Hatch_Dynamo) aMetaTileEntity).mTier >= 4
&& ((GT_MetaTileEntity_Hatch_Dynamo) aMetaTileEntity).mTier <= 6)) {
- return addToMachineList(aTileEntity, aBaseCasingIndex);
- } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input
- && ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mTier >= 5) {
- return addToMachineList(aTileEntity, aBaseCasingIndex);
- } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output
- && ((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity).mTier >= 5) {
- return addToMachineList(aTileEntity, aBaseCasingIndex);
- }
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
+ } else
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input
+ && ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mTier >= 5) {
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
+ } else
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output
+ && ((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity).mTier >= 5) {
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
+ }
}
return false;
}
@@ -209,49 +175,37 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase<Greg
@Override
public IStructureDefinition<GregtechMTE_NuclearReactor> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
- STRUCTURE_DEFINITION = StructureDefinition.<GregtechMTE_NuclearReactor>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCCCCCC", "COOOOOC", "COXXXOC", "COXXXOC", "COXXXOC", "COOOOOC", "CCCCCCC"},
- {"GGGGGGG", "G-----G", "G-----G", "G-----G", "G-----G", "G-----G", "GGGGGGG"},
- {"GGGGGGG", "G-----G", "G-----G", "G-----G", "G-----G", "G-----G", "GGGGGGG"},
- {"CCC~CCC", "COOOOOC", "COOOOOC", "COOOOOC", "COOOOOC", "COOOOOC", "CCCCCCC"},
- }))
+ STRUCTURE_DEFINITION = StructureDefinition.<GregtechMTE_NuclearReactor>builder().addShape(
+ mName,
+ transpose(
+ new String[][] {
+ { "CCCCCCC", "COOOOOC", "COXXXOC", "COXXXOC", "COXXXOC", "COOOOOC", "CCCCCCC" },
+ { "GGGGGGG", "G-----G", "G-----G", "G-----G", "G-----G", "G-----G", "GGGGGGG" },
+ { "GGGGGGG", "G-----G", "G-----G", "G-----G", "G-----G", "G-----G", "GGGGGGG" },
+ { "CCC~CCC", "COOOOOC", "COOOOOC", "COOOOOC", "COOOOOC", "COOOOOC", "CCCCCCC" }, }))
.addElement(
'C',
ofChain(
- buildHatchAdder(GregtechMTE_NuclearReactor.class)
- .atLeast(Maintenance)
- .casingIndex(TAE.GTPP_INDEX(12))
- .dot(1)
- .build(),
- buildHatchAdder(GregtechMTE_NuclearReactor.class)
- .atLeast(InputHatch, OutputHatch)
+ buildHatchAdder(GregtechMTE_NuclearReactor.class).atLeast(Maintenance)
+ .casingIndex(TAE.GTPP_INDEX(12)).dot(1).build(),
+ buildHatchAdder(GregtechMTE_NuclearReactor.class).atLeast(InputHatch, OutputHatch)
.adder(GregtechMTE_NuclearReactor::addNuclearReactorEdgeList)
.hatchItemFilterAnd(t -> filterByMTETier(5, Integer.MAX_VALUE))
- .casingIndex(TAE.GTPP_INDEX(12))
- .dot(1)
- .build(),
- buildHatchAdder(GregtechMTE_NuclearReactor.class)
- .atLeast(Dynamo)
+ .casingIndex(TAE.GTPP_INDEX(12)).dot(1).build(),
+ buildHatchAdder(GregtechMTE_NuclearReactor.class).atLeast(Dynamo)
.adder(GregtechMTE_NuclearReactor::addNuclearReactorEdgeList)
.hatchItemFilterAnd(t -> filterByMTETier(4, 6))
- .casingIndex(TAE.GTPP_INDEX(12))
- .dot(1)
- .build(),
+ .casingIndex(TAE.GTPP_INDEX(12)).dot(1).build(),
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasingsMisc, 12))))
.addElement(
'X',
- buildHatchAdder(GregtechMTE_NuclearReactor.class)
- .atLeast(Muffler)
+ buildHatchAdder(GregtechMTE_NuclearReactor.class).atLeast(Muffler)
.adder(GregtechMTE_NuclearReactor::addNuclearReactorTopList)
.hatchItemFilterAnd(t -> filterByMTETier(5, Integer.MAX_VALUE))
- .casingIndex(TAE.GTPP_INDEX(12))
- .dot(1)
- .buildAndChain(
+ .casingIndex(TAE.GTPP_INDEX(12)).dot(1).buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasingsMisc, 12))))
.addElement('O', ofBlock(ModBlocks.blockCasingsMisc, 12))
- .addElement('G', ofBlock(ModBlocks.blockCasingsMisc, 13))
- .build();
+ .addElement('G', ofBlock(ModBlocks.blockCasingsMisc, 13)).build();
}
return STRUCTURE_DEFINITION;
}
@@ -271,8 +225,7 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase<Greg
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
mCasing = 0;
if (checkPiece(mName, 3, 3, 0) && mCasing >= 27) {
- if (mOutputHatches.size() >= 3
- && mInputHatches.size() >= 2
+ if (mOutputHatches.size() >= 3 && mInputHatches.size() >= 2
&& mDynamoHatches.size() == 4
&& mMufflerHatches.size() == 4
&& mMaintenanceHatches.size() == 2) {
@@ -291,21 +244,15 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase<Greg
// Alk's Life Lessons from Greg.
/*
- [23:41:15] <GregoriusTechneticies> xdir and zdir are x2 and not x3
- [23:41:26] <GregoriusTechneticies> thats you issue
- [23:44:33] <Alkalus> mmm?
- [23:44:49] <Alkalus> Should they be x3?
- [23:44:50] <GregoriusTechneticies> you just do a x2, what is for a 5x5 multiblock
- [23:45:01] <GregoriusTechneticies> x3 is for a 7x7 one
- [23:45:06] <Alkalus> I have no idea what that value does, tbh..
- [23:45:15] <GregoriusTechneticies> its the offset
- [23:45:23] <Alkalus> Debugging checkMachine has been a pain and I usually trash designs that don't work straight up..
- [23:45:28] <GregoriusTechneticies> it determines the horizontal middle of the multiblock
- [23:45:47] <GregoriusTechneticies> which is in your case THREE blocks away from the controller
- [23:45:51] <Alkalus> Ahh
- [23:45:57] <GregoriusTechneticies> and not 2
- [23:46:06] <Alkalus> Noted, thanks :D
- */
+ * [23:41:15] <GregoriusTechneticies> xdir and zdir are x2 and not x3 [23:41:26] <GregoriusTechneticies> thats you
+ * issue [23:44:33] <Alkalus> mmm? [23:44:49] <Alkalus> Should they be x3? [23:44:50] <GregoriusTechneticies> you
+ * just do a x2, what is for a 5x5 multiblock [23:45:01] <GregoriusTechneticies> x3 is for a 7x7 one [23:45:06]
+ * <Alkalus> I have no idea what that value does, tbh.. [23:45:15] <GregoriusTechneticies> its the offset [23:45:23]
+ * <Alkalus> Debugging checkMachine has been a pain and I usually trash designs that don't work straight up..
+ * [23:45:28] <GregoriusTechneticies> it determines the horizontal middle of the multiblock [23:45:47]
+ * <GregoriusTechneticies> which is in your case THREE blocks away from the controller [23:45:51] <Alkalus> Ahh
+ * [23:45:57] <GregoriusTechneticies> and not 2 [23:46:06] <Alkalus> Noted, thanks :D
+ */
@Override
public boolean isCorrectMachinePart(final ItemStack aStack) {
@@ -412,8 +359,8 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase<Greg
if (tFluids.length > 0 && tRecipeList != null && tRecipeList.size() > 0) { // Does input hatch have a LFTR fuel?
Logger.WARNING("Found more than one input fluid and a list of valid recipes.");
// Find a valid recipe
- GT_Recipe aFuelProcessing =
- this.findRecipe(getBaseMetaTileEntity(), mLastRecipe, true, 0, tFluids, new ItemStack[] {});
+ GT_Recipe aFuelProcessing = this
+ .findRecipe(getBaseMetaTileEntity(), mLastRecipe, true, 0, tFluids, new ItemStack[] {});
if (aFuelProcessing == null) {
Logger.WARNING("Did not find valid recipe for given inputs.");
return false;
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java
index 279ab77b9c..3700b28ea1 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java
@@ -7,10 +7,16 @@ import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
import static gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase.GTPPHatchElement.TTDynamo;
+import java.util.*;
+
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -23,9 +29,6 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.*;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntityGeneratorArray
extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntityGeneratorArray> implements ISurvivalConstructable {
@@ -54,20 +57,13 @@ public class GregtechMetaTileEntityGeneratorArray
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Generator Array")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Generator Array")
.addInfo("Runs supplied generators as if placed in the world")
- .addInfo("Place up to 16 Single Block GT Generators into the Controller")
- .addSeparator()
- .beginStructureBlock(3, 3, 3, true)
- .addController("Front center")
- .addCasingInfo("Robust Tungstensteel Machine Casings", 10)
- .addInputBus("Any casing", 1)
- .addOutputBus("Any casing", 1)
- .addInputHatch("Any Casing", 1)
- .addOutputHatch("Any Casing", 1)
- .addDynamoHatch("Any casing", 1)
- .addMaintenanceHatch("Any casing", 1)
+ .addInfo("Place up to 16 Single Block GT Generators into the Controller").addSeparator()
+ .beginStructureBlock(3, 3, 3, true).addController("Front center")
+ .addCasingInfo("Robust Tungstensteel Machine Casings", 10).addInputBus("Any casing", 1)
+ .addOutputBus("Any casing", 1).addInputHatch("Any Casing", 1).addOutputHatch("Any Casing", 1)
+ .addDynamoHatch("Any casing", 1).addMaintenanceHatch("Any casing", 1)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -141,16 +137,16 @@ public class GregtechMetaTileEntityGeneratorArray
private static final int MODE_NAQUADAH = 9;
private static final int MODE_NONE = 100;
- private static final int[] ID_STEAM = new int[] {962, 1120, 1121, 1122};
- private static final int[] ID_GAS = new int[] {961, 1115, 1116, 1117};
- private static final int[] ID_DIESEL = new int[] {960, 1110, 1111, 1112};
- private static final int[] ID_SEMIFLUID = new int[] {837, 838, 839};
- private static final int[] ID_GEOTHERMAL = new int[] {830, 831, 832};
- private static final int[] ID_ROCKETFUEL = new int[] {793, 794, 795};
- private static final int[] ID_MAGIC_A = new int[] {1123, 1124, 1125};
- private static final int[] ID_MAGIC_B_DISABLED = new int[] {1127, 1128, 1129, 1130};
- private static final int[] ID_PLASMA = new int[] {1196, 1197, 1198};
- private static final int[] ID_NAQUADAH = new int[] {1190, 1191, 1192};
+ private static final int[] ID_STEAM = new int[] { 962, 1120, 1121, 1122 };
+ private static final int[] ID_GAS = new int[] { 961, 1115, 1116, 1117 };
+ private static final int[] ID_DIESEL = new int[] { 960, 1110, 1111, 1112 };
+ private static final int[] ID_SEMIFLUID = new int[] { 837, 838, 839 };
+ private static final int[] ID_GEOTHERMAL = new int[] { 830, 831, 832 };
+ private static final int[] ID_ROCKETFUEL = new int[] { 793, 794, 795 };
+ private static final int[] ID_MAGIC_A = new int[] { 1123, 1124, 1125 };
+ private static final int[] ID_MAGIC_B_DISABLED = new int[] { 1127, 1128, 1129, 1130 };
+ private static final int[] ID_PLASMA = new int[] { 1196, 1197, 1198 };
+ private static final int[] ID_NAQUADAH = new int[] { 1190, 1191, 1192 };
private static final int getModeFromInventorySlot(ItemStack aStack) {
@@ -214,82 +210,40 @@ public class GregtechMetaTileEntityGeneratorArray
public boolean checkRecipe(ItemStack aStack) {
return false;
- /** this.resetRecipeMapForAllInputHatches();
- * this.mMode = getModeFromInventorySlot(aStack);
- * if (mMode == MODE_NONE) {
- * Logger.INFO("Did not find valid generator.");
- * return false;
- * }
- * else {
- * Logger.INFO("Changed Mode to "+mMode);
- * }
- * int aMulti = this.getGUIItemStack() != null ? this.getGUIItemStack().stackSize : 0;
- * if (aMulti > 16 || aMulti == 0) {
- * return false;
- * }
+ /**
+ * this.resetRecipeMapForAllInputHatches(); this.mMode = getModeFromInventorySlot(aStack); if (mMode ==
+ * MODE_NONE) { Logger.INFO("Did not find valid generator."); return false; } else { Logger.INFO("Changed Mode
+ * to "+mMode); } int aMulti = this.getGUIItemStack() != null ? this.getGUIItemStack().stackSize : 0; if (aMulti
+ * > 16 || aMulti == 0) { return false; }
*
*
*
* ArrayList<FluidStack> tFluids = this.getStoredFluids();
*
- * Collection<GT_Recipe> tRecipeList = this.getRecipeMap().mRecipeList;
- * Logger.INFO("Got Recipe Map");
- * if (tFluids.size() > 0 && tRecipeList != null) {
- * Logger.INFO("Found Fuels for Map.");
- * Iterator<FluidStack> arg3 = tFluids.iterator();
- * int aCount = 0;
- * while (arg3.hasNext()) {
- * FluidStack hatchFluid1 = (FluidStack) arg3.next();
- * Logger.INFO("Iterating Fluid Found "+(aCount++)+" | "+hatchFluid1.getLocalizedName());
+ * Collection<GT_Recipe> tRecipeList = this.getRecipeMap().mRecipeList; Logger.INFO("Got Recipe Map"); if
+ * (tFluids.size() > 0 && tRecipeList != null) { Logger.INFO("Found Fuels for Map."); Iterator<FluidStack> arg3
+ * = tFluids.iterator(); int aCount = 0; while (arg3.hasNext()) { FluidStack hatchFluid1 = (FluidStack)
+ * arg3.next(); Logger.INFO("Iterating Fluid Found "+(aCount++)+" | "+hatchFluid1.getLocalizedName());
* Iterator<GT_Recipe> arg5 = tRecipeList.iterator();
*
- * int Hatch = 0;
- * int totalFuelValue = 0;
- * while (arg5.hasNext()) {
- * Logger.INFO("Iterating Recipe "+(Hatch++));
- * GT_Recipe aFuel = (GT_Recipe) arg5.next();
- * FluidStack tLiquid;
- * boolean addedFuelOnce = false;
- * for (int a = 0; a < aMulti; a++) {
- * if ((tLiquid = GT_Utility.getFluidForFilledItem(aFuel.getRepresentativeInput(0), true)) != null
- * && hatchFluid1.isFluidEqual(tLiquid)) {
- * this.fuelConsumption = tLiquid.amount = this.boostEu
- * ? 4096 / aFuel.mSpecialValue
- * : 2048 / aFuel.mSpecialValue;
- * if (this.depleteInput(tLiquid)) {
- * Logger.INFO("Depleted Fuel");
- * this.boostEu = this.depleteInput(Materials.Oxygen.getGas(2L));
+ * int Hatch = 0; int totalFuelValue = 0; while (arg5.hasNext()) { Logger.INFO("Iterating Recipe "+(Hatch++));
+ * GT_Recipe aFuel = (GT_Recipe) arg5.next(); FluidStack tLiquid; boolean addedFuelOnce = false; for (int a = 0;
+ * a < aMulti; a++) { if ((tLiquid = GT_Utility.getFluidForFilledItem(aFuel.getRepresentativeInput(0), true)) !=
+ * null && hatchFluid1.isFluidEqual(tLiquid)) { this.fuelConsumption = tLiquid.amount = this.boostEu ? 4096 /
+ * aFuel.mSpecialValue : 2048 / aFuel.mSpecialValue; if (this.depleteInput(tLiquid)) { Logger.INFO("Depleted
+ * Fuel"); this.boostEu = this.depleteInput(Materials.Oxygen.getGas(2L));
*
- * /*if (!tFluids.contains(Materials.Lubricant.getFluid(1L))) {
- * Logger.INFO("No Lube.");
- * return false;
- * }*/
+ * /*if (!tFluids.contains(Materials.Lubricant.getFluid(1L))) { Logger.INFO("No Lube."); return false; }
+ */
/**
* if (this.mRuntime % 72 == 0 || this.mRuntime == 0) {
- * this.depleteInput(Materials.Lubricant.getFluid(this.boostEu ? 2L : 1L));
- * }
- * Logger.INFO("ADDING POWER");
- * this.fuelRemaining = hatchFluid1.amount;
- * totalFuelValue++;
- * }
- * }
- * }
- * //Do things after consuming Fuel
- * if (totalFuelValue == aMulti) {
- * this.fuelValue = aFuel.mSpecialValue*aMulti;
- * this.mEUt = this.mEfficiency < 2000 ? 0 : aFuel.mSpecialValue*aMulti;
- * this.mProgresstime = aMulti;
- * this.mMaxProgresstime = aMulti;
- * this.mEfficiencyIncrease = 15*aMulti;
- * return true;
- * }
- * }
- * }
- * }
+ * this.depleteInput(Materials.Lubricant.getFluid(this.boostEu ? 2L : 1L)); } Logger.INFO("ADDING POWER");
+ * this.fuelRemaining = hatchFluid1.amount; totalFuelValue++; } } } //Do things after consuming Fuel if
+ * (totalFuelValue == aMulti) { this.fuelValue = aFuel.mSpecialValue*aMulti; this.mEUt = this.mEfficiency < 2000
+ * ? 0 : aFuel.mSpecialValue*aMulti; this.mProgresstime = aMulti; this.mMaxProgresstime = aMulti;
+ * this.mEfficiencyIncrease = 15*aMulti; return true; } } } }
*
- * this.mEUt = 0;
- * this.mEfficiency = 0;
- * return false;
+ * this.mEUt = 0; this.mEfficiency = 0; return false;
**/
}
@@ -303,25 +257,21 @@ public class GregtechMetaTileEntityGeneratorArray
public IStructureDefinition<GregtechMetaTileEntityGeneratorArray> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntityGeneratorArray>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC"},
- {"C~C", "C-C", "CCC"},
- {"CCC", "CCC", "CCC"},
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC" }, { "C~C", "C-C", "CCC" },
+ { "CCC", "CCC", "CCC" }, }))
.addElement(
'C',
- buildHatchAdder(GregtechMetaTileEntityGeneratorArray.class)
- .atLeast(
- InputHatch,
- OutputHatch,
- InputBus,
- OutputBus,
- Maintenance,
- Dynamo.or(TTDynamo),
- Muffler)
- .casingIndex(48)
- .dot(1)
- .buildAndChain(
+ buildHatchAdder(GregtechMetaTileEntityGeneratorArray.class).atLeast(
+ InputHatch,
+ OutputHatch,
+ InputBus,
+ OutputBus,
+ Maintenance,
+ Dynamo.or(TTDynamo),
+ Muffler).casingIndex(48).dot(1).buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(GregTech_API.sBlockCasings4, 0))))
.build();
}
@@ -381,7 +331,7 @@ public class GregtechMetaTileEntityGeneratorArray
}
/**
- * Code from single blocks
+ * Code from single blocks
*/
public void tryProcessFuelItems(IGregTechTileEntity aBaseMetaTileEntity, ItemStack a) {
if (a != null
@@ -410,9 +360,8 @@ public class GregtechMetaTileEntityGeneratorArray
long tFluidAmountToUse = Math.min(
(long) (mFluid.amount / tEmptyContainer),
(this.maxEUStore() - aBaseMetaTileEntity.getUniversalEnergyStored()) / (long) tFuelValue);
- if (tFluidAmountToUse > 0L
- && aBaseMetaTileEntity.increaseStoredEnergyUnits(
- tFluidAmountToUse * (long) tFuelValue, true)) {
+ if (tFluidAmountToUse > 0L && aBaseMetaTileEntity
+ .increaseStoredEnergyUnits(tFluidAmountToUse * (long) tFuelValue, true)) {
PollutionUtils.addPollution(this.getBaseMetaTileEntity(), 10 * this.getPollutionPerTick(null));
mFluid.amount = (int) ((long) mFluid.amount - tFluidAmountToUse * (long) tEmptyContainer);
}
@@ -423,8 +372,8 @@ public class GregtechMetaTileEntityGeneratorArray
}
if (aBaseMetaTileEntity.isServerSide()) {
- aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork()
- && aBaseMetaTileEntity.getUniversalEnergyStored()
+ aBaseMetaTileEntity.setActive(
+ aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.getUniversalEnergyStored()
>= this.maxEUOutput() + this.getMinimumStoredEU());
}
}
@@ -448,8 +397,7 @@ public class GregtechMetaTileEntityGeneratorArray
FluidStack tLiquid;
if ((tLiquid = GT_Utility.getFluidForFilledItem(tFuel.getRepresentativeInput(0), true)) != null
&& aLiquid.isFluidEqual(tLiquid)) {
- return (int) ((long) tFuel.mSpecialValue
- * (long) this.mEfficiency
+ return (int) ((long) tFuel.mSpecialValue * (long) this.mEfficiency
* (long) this.consumedFluidPerOperation(tLiquid)
/ 100L);
}
@@ -464,11 +412,12 @@ public class GregtechMetaTileEntityGeneratorArray
public int getFuelValue(ItemStack aStack) {
if (!GT_Utility.isStackInvalid(aStack) && this.getRecipeMap() != null) {
- GT_Recipe tFuel = this.getRecipeMap()
- .findRecipe(
- this.getBaseMetaTileEntity(), false, Long.MAX_VALUE, (FluidStack[]) null, new ItemStack[] {
- aStack
- });
+ GT_Recipe tFuel = this.getRecipeMap().findRecipe(
+ this.getBaseMetaTileEntity(),
+ false,
+ Long.MAX_VALUE,
+ (FluidStack[]) null,
+ new ItemStack[] { aStack });
return tFuel != null ? (int) ((long) tFuel.mSpecialValue * 1000L * (long) this.mEfficiency / 100L) : 0;
} else {
return 0;
@@ -477,13 +426,13 @@ public class GregtechMetaTileEntityGeneratorArray
public ItemStack getEmptyContainer(ItemStack aStack) {
if (!GT_Utility.isStackInvalid(aStack) && this.getRecipeMap() != null) {
- GT_Recipe tFuel = this.getRecipeMap()
- .findRecipe(
- this.getBaseMetaTileEntity(), false, Long.MAX_VALUE, (FluidStack[]) null, new ItemStack[] {
- aStack
- });
- return tFuel != null
- ? GT_Utility.copy(new Object[] {tFuel.getOutput(0)})
+ GT_Recipe tFuel = this.getRecipeMap().findRecipe(
+ this.getBaseMetaTileEntity(),
+ false,
+ Long.MAX_VALUE,
+ (FluidStack[]) null,
+ new ItemStack[] { aStack });
+ return tFuel != null ? GT_Utility.copy(new Object[] { tFuel.getOutput(0) })
: GT_Utility.getContainerItem(aStack, true);
} else {
return null;
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java
index bf3fbe0477..82f9f6b712 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java
@@ -7,10 +7,21 @@ import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
import static gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase.GTPPHatchElement.TTEnergy;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import javax.annotation.Nonnull;
+
+import net.minecraft.init.Blocks;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import forestry.api.arboriculture.EnumTreeChromosome;
import forestry.api.arboriculture.ITree;
import forestry.api.arboriculture.TreeManager;
@@ -38,20 +49,13 @@ import gtPlusPlus.core.util.minecraft.MaterialUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.helpers.TreeFarmHelper;
-import java.util.ArrayList;
-import java.util.HashMap;
-import javax.annotation.Nonnull;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntityTreeFarm>
implements ISurvivalConstructable {
public static int CASING_TEXTURE_ID;
public static String mCasingName = "Sterile Farm Casing";
- // public static TreeGenerator mTreeData;
+ // public static TreeGenerator mTreeData;
public static HashMap<String, ItemStack> sLogCache = new HashMap<>();
private static final int TICKS_PER_OPERATION = 100;
@@ -87,31 +91,19 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase<
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Converts EU to Logs")
- .addInfo("Eu Usage: 100% | Parallel: 1")
- .addInfo("Requires a Saw or Chainsaw in GUI slot")
- .addInfo("Output multiplier:")
- .addInfo("Saw = 1x")
- .addInfo("Buzzsaw = 2x")
- .addInfo("Chainsaw = 4x")
+ tt.addMachineType(getMachineType()).addInfo("Converts EU to Logs").addInfo("Eu Usage: 100% | Parallel: 1")
+ .addInfo("Requires a Saw or Chainsaw in GUI slot").addInfo("Output multiplier:").addInfo("Saw = 1x")
+ .addInfo("Buzzsaw = 2x").addInfo("Chainsaw = 4x")
.addInfo("Add a sapling in the input bus to select wood type output")
.addInfo("Tools can also be fed to the controller via input bus")
.addInfo("The working speed is fixed for 5s")
.addInfo("Production Formula: (2 * tier^2 - 2 * tier + 5) * 5 * saw boost")
.addInfo("When fertilizer is insufficient, sapling production reduced to one-tenth")
.addInfo("Forestry saplings can get increased production")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 3, 3, true)
- .addController("Front center")
- .addCasingInfo("Sterile Farm Casing", 8)
- .addInputBus("Any casing", 1)
- .addOutputBus("Any casing", 1)
- .addEnergyHatch("Any casing", 1)
- .addMaintenanceHatch("Any casing", 1)
- .addMufflerHatch("Any casing", 1)
- .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 3, true)
+ .addController("Front center").addCasingInfo("Sterile Farm Casing", 8).addInputBus("Any casing", 1)
+ .addOutputBus("Any casing", 1).addEnergyHatch("Any casing", 1).addMaintenanceHatch("Any casing", 1)
+ .addMufflerHatch("Any casing", 1).toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -142,6 +134,7 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase<
/**
* Method used to get the boost based on the ordinal of the saw
+ *
* @param sawType type of the saw
* @return an int corresponding to the boost
*/
@@ -168,8 +161,8 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase<
long tVoltage = getMaxInputVoltage();
byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- int aOutputAmount =
- ((2 * (tTier * tTier)) - (2 * tTier) + 5) * (TICKS_PER_OPERATION / 20) * getSawBoost(mToolType);
+ int aOutputAmount = ((2 * (tTier * tTier)) - (2 * tTier) + 5) * (TICKS_PER_OPERATION / 20)
+ * getSawBoost(mToolType);
int aFert = hasLiquidFert();
ItemStack[] toOutput;
@@ -178,10 +171,10 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase<
aOutputAmount /= 10;
}
int amplifiedOutputAmount = (int) (aOutputAmount * saplingsModifier);
- toOutput = new ItemStack[] {ItemUtils.getSimpleStack(mSapling, amplifiedOutputAmount)};
+ toOutput = new ItemStack[] { ItemUtils.getSimpleStack(mSapling, amplifiedOutputAmount) };
} else { // Log
int amplifiedOutputAmount = (int) (aOutputAmount * heightModifier * girthModifier);
- toOutput = new ItemStack[] {ItemUtils.getSimpleStack(mWood, amplifiedOutputAmount)};
+ toOutput = new ItemStack[] { ItemUtils.getSimpleStack(mWood, amplifiedOutputAmount) };
}
GT_Recipe tRecipe = new GT_Recipe(null, toOutput, null, null, null, null, 0, 0, 0);
@@ -241,25 +234,21 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase<
public IStructureDefinition<GregtechMetaTileEntityTreeFarm> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntityTreeFarm>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC"},
- {"C~C", "C-C", "CCC"},
- {"CCC", "CCC", "CCC"},
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC" }, { "C~C", "C-C", "CCC" },
+ { "CCC", "CCC", "CCC" }, }))
.addElement(
'C',
- buildHatchAdder(GregtechMetaTileEntityTreeFarm.class)
- .atLeast(
- InputHatch,
- OutputHatch,
- InputBus,
- OutputBus,
- Maintenance,
- Energy.or(TTEnergy),
- Muffler)
- .casingIndex(CASING_TEXTURE_ID)
- .dot(1)
- .buildAndChain(
+ buildHatchAdder(GregtechMetaTileEntityTreeFarm.class).atLeast(
+ InputHatch,
+ OutputHatch,
+ InputBus,
+ OutputBus,
+ Maintenance,
+ Energy.or(TTEnergy),
+ Muffler).casingIndex(CASING_TEXTURE_ID).dot(1).buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings2Misc, 15))))
.build();
}
@@ -278,8 +267,7 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase<
@Override
public int getDamageToComponent(final ItemStack aStack) {
- return MathUtils.balance(
- (int) (75 - ((GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).getMass()))), 5, 120);
+ return MathUtils.balance((int) (75 - ((GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).getMass()))), 5, 120);
}
@Override
@@ -336,9 +324,7 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase<
this.saplingsModifier = Math.max(tree.getGenome().getFertility() * 20, 1);
this.girthModifier = tree.getGenome().getGirth();
boolean fireproof = ((IAlleleBoolean) tree.getGenome()
- .getChromosomes()[EnumTreeChromosome.FIREPROOF.ordinal()]
- .getActiveAllele())
- .getValue();
+ .getChromosomes()[EnumTreeChromosome.FIREPROOF.ordinal()].getActiveAllele()).getValue();
aWood = sLogCache.get(tree.getIdent() + (fireproof ? "fireproof" : ""));
@@ -355,9 +341,8 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase<
public static void loadMapWoodFromSapling() {
// galaxySpace
- mapSaplingToLog(
- "GalaxySpace:barnardaCsapling:1",
- GT_ModHandler.getModItem("GalaxySpace", "barnardaClog", 1)); // barnarda c
+ mapSaplingToLog("GalaxySpace:barnardaCsapling:1", GT_ModHandler.getModItem("GalaxySpace", "barnardaClog", 1)); // barnarda
+ // c
// minecraft
mapSaplingToLog("minecraft:sapling:0", new ItemStack(Blocks.log, 1, 0)); // oak
@@ -387,48 +372,32 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase<
mapSaplingToLog("Natura:Rare Sapling:4", GT_ModHandler.getModItem("Natura", "willow", 1, 0)); // willow
// BOP
- mapSaplingToLog(
- "BiomesOPlenty:colorizedSaplings:0",
- GT_ModHandler.getModItem("BiomesOPlenty", "logs1", 1, 0)); // Sacred Oak
- mapSaplingToLog(
- "BiomesOPlenty:colorizedSaplings:1",
- GT_ModHandler.getModItem("BiomesOPlenty", "logs2", 1, 2)); // Mangrove
- mapSaplingToLog(
- "BiomesOPlenty:colorizedSaplings:2", GT_ModHandler.getModItem("BiomesOPlenty", "logs2", 1, 3)); // Palm
- mapSaplingToLog(
- "BiomesOPlenty:colorizedSaplings:3",
- GT_ModHandler.getModItem("BiomesOPlenty", "logs3", 1, 0)); // Redwood
- mapSaplingToLog(
- "BiomesOPlenty:colorizedSaplings:4",
- GT_ModHandler.getModItem("BiomesOPlenty", "logs3", 1, 1)); // Willow
- mapSaplingToLog(
- "BiomesOPlenty:colorizedSaplings:5", GT_ModHandler.getModItem("BiomesOPlenty", "logs4", 1, 0)); // Pine
- mapSaplingToLog(
- "BiomesOPlenty:colorizedSaplings:6",
- GT_ModHandler.getModItem("BiomesOPlenty", "logs4", 1, 3)); // Mahogany
- mapSaplingToLog(
- "BiomesOPlenty:saplings:2", GT_ModHandler.getModItem("BiomesOPlenty", "bamboo", 1, 0)); // Bamboo
+ mapSaplingToLog("BiomesOPlenty:colorizedSaplings:0", GT_ModHandler.getModItem("BiomesOPlenty", "logs1", 1, 0)); // Sacred
+ // Oak
+ mapSaplingToLog("BiomesOPlenty:colorizedSaplings:1", GT_ModHandler.getModItem("BiomesOPlenty", "logs2", 1, 2)); // Mangrove
+ mapSaplingToLog("BiomesOPlenty:colorizedSaplings:2", GT_ModHandler.getModItem("BiomesOPlenty", "logs2", 1, 3)); // Palm
+ mapSaplingToLog("BiomesOPlenty:colorizedSaplings:3", GT_ModHandler.getModItem("BiomesOPlenty", "logs3", 1, 0)); // Redwood
+ mapSaplingToLog("BiomesOPlenty:colorizedSaplings:4", GT_ModHandler.getModItem("BiomesOPlenty", "logs3", 1, 1)); // Willow
+ mapSaplingToLog("BiomesOPlenty:colorizedSaplings:5", GT_ModHandler.getModItem("BiomesOPlenty", "logs4", 1, 0)); // Pine
+ mapSaplingToLog("BiomesOPlenty:colorizedSaplings:6", GT_ModHandler.getModItem("BiomesOPlenty", "logs4", 1, 3)); // Mahogany
+ mapSaplingToLog("BiomesOPlenty:saplings:2", GT_ModHandler.getModItem("BiomesOPlenty", "bamboo", 1, 0)); // Bamboo
mapSaplingToLog("BiomesOPlenty:saplings:3", GT_ModHandler.getModItem("BiomesOPlenty", "logs2", 1, 1)); // Magic
mapSaplingToLog("BiomesOPlenty:saplings:4", GT_ModHandler.getModItem("BiomesOPlenty", "logs1", 1, 2)); // Dark
- mapSaplingToLog(
- "BiomesOPlenty:saplings:5", GT_ModHandler.getModItem("BiomesOPlenty", "logs3", 1, 2)); // Dying/Dead
+ mapSaplingToLog("BiomesOPlenty:saplings:5", GT_ModHandler.getModItem("BiomesOPlenty", "logs3", 1, 2)); // Dying/Dead
mapSaplingToLog("BiomesOPlenty:saplings:6", GT_ModHandler.getModItem("BiomesOPlenty", "logs1", 1, 3)); // Fir
- mapSaplingToLog(
- "BiomesOPlenty:saplings:7", GT_ModHandler.getModItem("BiomesOPlenty", "logs2", 1, 0)); // Ethereal
- mapSaplingToLog(
- "BiomesOPlenty:saplings:10", GT_ModHandler.getModItem("BiomesOPlenty", "logs1", 1, 1)); // Pink Cherry
- mapSaplingToLog(
- "BiomesOPlenty:saplings:12", GT_ModHandler.getModItem("BiomesOPlenty", "logs1", 1, 1)); // White Cherry
- mapSaplingToLog(
- "BiomesOPlenty:saplings:13", GT_ModHandler.getModItem("BiomesOPlenty", "logs4", 1, 1)); // Hellbark
- mapSaplingToLog(
- "BiomesOPlenty:saplings:14", GT_ModHandler.getModItem("BiomesOPlenty", "logs4", 1, 2)); // Jacaranda
- mapSaplingToLog(
- "minecraft:yellow_flower:0",
- GT_ModHandler.getModItem("BiomesOPlenty", "logs3", 1, 3)); // Giant Flower Stem
- mapSaplingToLog(
- "minecraft:red_flower:0",
- GT_ModHandler.getModItem("BiomesOPlenty", "logs3", 1, 3)); // Giant Flower Stem
+ mapSaplingToLog("BiomesOPlenty:saplings:7", GT_ModHandler.getModItem("BiomesOPlenty", "logs2", 1, 0)); // Ethereal
+ mapSaplingToLog("BiomesOPlenty:saplings:10", GT_ModHandler.getModItem("BiomesOPlenty", "logs1", 1, 1)); // Pink
+ // Cherry
+ mapSaplingToLog("BiomesOPlenty:saplings:12", GT_ModHandler.getModItem("BiomesOPlenty", "logs1", 1, 1)); // White
+ // Cherry
+ mapSaplingToLog("BiomesOPlenty:saplings:13", GT_ModHandler.getModItem("BiomesOPlenty", "logs4", 1, 1)); // Hellbark
+ mapSaplingToLog("BiomesOPlenty:saplings:14", GT_ModHandler.getModItem("BiomesOPlenty", "logs4", 1, 2)); // Jacaranda
+ mapSaplingToLog("minecraft:yellow_flower:0", GT_ModHandler.getModItem("BiomesOPlenty", "logs3", 1, 3)); // Giant
+ // Flower
+ // Stem
+ mapSaplingToLog("minecraft:red_flower:0", GT_ModHandler.getModItem("BiomesOPlenty", "logs3", 1, 3)); // Giant
+ // Flower
+ // Stem
// Witchery
mapSaplingToLog("witchery:witchsapling:0", GT_ModHandler.getModItem("witchery", "witchlog", 1, 0)); // Rowan
@@ -436,9 +405,9 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase<
mapSaplingToLog("witchery:witchsapling:2", GT_ModHandler.getModItem("witchery", "witchlog", 1, 2)); // Hawthorn
// TConstruct
- mapSaplingToLog(
- "TConstruct:slime.sapling:0",
- GT_ModHandler.getModItem("TConstruct", "slime.gel", 1)); // green slime blocks
+ mapSaplingToLog("TConstruct:slime.sapling:0", GT_ModHandler.getModItem("TConstruct", "slime.gel", 1)); // green
+ // slime
+ // blocks
// TaintedMagic
mapSaplingToLog(
@@ -457,14 +426,12 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase<
mapSaplingToLog(
"miscutils:blockRainforestOakSapling:0",
GT_ModHandler.getModItem("miscutils", "blockRainforestOakLog", 1)); // rainforest
- mapSaplingToLog(
- "miscutils:blockPineSapling:0", GT_ModHandler.getModItem("miscutils", "blockPineLogLog", 1)); // pine
+ mapSaplingToLog("miscutils:blockPineSapling:0", GT_ModHandler.getModItem("miscutils", "blockPineLogLog", 1)); // pine
// Harvestcraft
mapSaplingToLog("harvestcraft:pampistachioSapling:0", new ItemStack(Blocks.log, 1, 3)); // Pistachio
mapSaplingToLog("harvestcraft:pampapayaSapling:0", new ItemStack(Blocks.log, 1, 3)); // Papaya
- mapSaplingToLog(
- "harvestcraft:pammapleSapling:0", GT_ModHandler.getModItem("harvestcraft", "pamMaple", 1)); // Maple
+ mapSaplingToLog("harvestcraft:pammapleSapling:0", GT_ModHandler.getModItem("harvestcraft", "pamMaple", 1)); // Maple
mapSaplingToLog("harvestcraft:pamappleSapling:0", new ItemStack(Blocks.log, 1, 0)); // Apple
mapSaplingToLog("harvestcraft:pamdateSapling:0", new ItemStack(Blocks.log, 1, 3)); // Date
mapSaplingToLog("harvestcraft:pamorangeSapling:0", new ItemStack(Blocks.log, 1, 3)); // Orange
@@ -542,17 +509,12 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase<
// Thaumic Bases
mapSaplingToLog("thaumicbases:goldenOakSapling:0", new ItemStack(Blocks.log, 1, 0)); // Golden Oak
- mapSaplingToLog(
- "thaumicbases:goldenOakSapling:1",
- GT_ModHandler.getModItem("thaumicbases", "genLogs", 1, 0)); // Peaceful
- mapSaplingToLog(
- "thaumicbases:goldenOakSapling:2", GT_ModHandler.getModItem("thaumicbases", "genLogs", 1, 1)); // Nether
- mapSaplingToLog(
- "thaumicbases:goldenOakSapling:3", GT_ModHandler.getModItem("thaumicbases", "genLogs", 1, 2)); // Ender
+ mapSaplingToLog("thaumicbases:goldenOakSapling:1", GT_ModHandler.getModItem("thaumicbases", "genLogs", 1, 0)); // Peaceful
+ mapSaplingToLog("thaumicbases:goldenOakSapling:2", GT_ModHandler.getModItem("thaumicbases", "genLogs", 1, 1)); // Nether
+ mapSaplingToLog("thaumicbases:goldenOakSapling:3", GT_ModHandler.getModItem("thaumicbases", "genLogs", 1, 2)); // Ender
// Forbidden Magic
- mapSaplingToLog(
- "ForbiddenMagic:TaintSapling:0", GT_ModHandler.getModItem("ForbiddenMagic", "TaintLog", 1)); // Tainted
+ mapSaplingToLog("ForbiddenMagic:TaintSapling:0", GT_ModHandler.getModItem("ForbiddenMagic", "TaintLog", 1)); // Tainted
}
@Override
@@ -580,20 +542,22 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase<
public static boolean addFakeRecipeToNEI(@Nonnull ItemStack aSapling, ItemStack aLog) {
int aRecipes = GTPP_Recipe_Map.sTreeSimFakeRecipes.mRecipeList.size();
- Logger.INFO("Adding Tree Growth Simulation for " + aSapling.getDisplayName() + " -> "
- + (aLog == null ? "NULL" : aLog.getDisplayName()));
- ItemStack[] aOutput = new ItemStack[] {aLog, aSapling};
+ Logger.INFO(
+ "Adding Tree Growth Simulation for " + aSapling.getDisplayName()
+ + " -> "
+ + (aLog == null ? "NULL" : aLog.getDisplayName()));
+ ItemStack[] aOutput = new ItemStack[] { aLog, aSapling };
String aOutputs = ItemUtils.getArrayStackNames(aOutput);
Logger.INFO("" + aOutputs);
ItemStack inputStack = aSapling.copy();
inputStack.stackSize = 0;
GTPP_Recipe_Map.sTreeSimFakeRecipes.addFakeRecipe(
false,
- new ItemStack[] {inputStack},
+ new ItemStack[] { inputStack },
aOutput,
null,
- new int[] {10000, 1000},
- new FluidStack[] {FluidUtils.getFluidStack(ModItems.fluidFertBasic, 1)},
+ new int[] { 10000, 1000 },
+ new FluidStack[] { FluidUtils.getFluidStack(ModItems.fluidFertBasic, 1) },
new FluidStack[] {},
1,
sRecipeID++,
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java
index 64f04e530d..7903a86868 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java
@@ -6,10 +6,21 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.util.ArrayList;
+import java.util.List;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.StatCollector;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.TAE;
import gregtech.api.interfaces.IIconContainer;
@@ -27,18 +38,9 @@ import gtPlusPlus.core.recipe.common.CI;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.ArrayList;
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.StatCollector;
-import net.minecraftforge.fluids.FluidStack;
-public class GregtechMetaTileEntity_AlloyBlastSmelter
- extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_AlloyBlastSmelter>
- implements ISurvivalConstructable {
+public class GregtechMetaTileEntity_AlloyBlastSmelter extends
+ GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_AlloyBlastSmelter> implements ISurvivalConstructable {
private int mMode = 0;
private boolean isUsingControllerCircuit = false;
@@ -80,24 +82,15 @@ public class GregtechMetaTileEntity_AlloyBlastSmelter
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Alloy Blast Smelter")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Alloy Blast Smelter")
.addInfo("20% Faster than the Electric Blast Furnace")
- .addInfo("Allows Complex GT++ alloys to be created")
- .addInfo("Accepts only one Energy Hatch")
+ .addInfo("Allows Complex GT++ alloys to be created").addInfo("Accepts only one Energy Hatch")
.addInfo("Circuit for recipe goes in the Input Bus or GUI slot")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 4, 3, true)
- .addController("Bottom Center")
- .addCasingInfo("Blast Smelter Casings", 5)
- .addCasingInfo("Blast Smelter Heat Containment Coils", 16)
- .addInputBus("Any Casing", 1)
- .addInputHatch("Any Casing", 1)
- .addOutputHatch("Any Casing", 1)
- .addEnergyHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
- .addMufflerHatch("Any Casing", 1)
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 4, 3, true)
+ .addController("Bottom Center").addCasingInfo("Blast Smelter Casings", 5)
+ .addCasingInfo("Blast Smelter Heat Containment Coils", 16).addInputBus("Any Casing", 1)
+ .addInputHatch("Any Casing", 1).addOutputHatch("Any Casing", 1).addEnergyHatch("Any Casing", 1)
+ .addMaintenanceHatch("Any Casing", 1).addMufflerHatch("Any Casing", 1)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -106,22 +99,18 @@ public class GregtechMetaTileEntity_AlloyBlastSmelter
public IStructureDefinition<GregtechMetaTileEntity_AlloyBlastSmelter> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_AlloyBlastSmelter>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC"},
- {"HHH", "H-H", "HHH"},
- {"HHH", "H-H", "HHH"},
- {"C~C", "CCC", "CCC"},
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC" }, { "HHH", "H-H", "HHH" },
+ { "HHH", "H-H", "HHH" }, { "C~C", "CCC", "CCC" }, }))
.addElement(
'C',
buildHatchAdder(GregtechMetaTileEntity_AlloyBlastSmelter.class)
.atLeast(InputBus, InputHatch, OutputBus, OutputHatch, Maintenance, Energy, Muffler)
- .casingIndex(TAE.GTPP_INDEX(15))
- .dot(1)
- .buildAndChain(
+ .casingIndex(TAE.GTPP_INDEX(15)).dot(1).buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasingsMisc, 15))))
- .addElement('H', ofBlock(ModBlocks.blockCasingsMisc, 14))
- .build();
+ .addElement('H', ofBlock(ModBlocks.blockCasingsMisc, 14)).build();
}
return STRUCTURE_DEFINITION;
}
@@ -245,7 +234,11 @@ public class GregtechMetaTileEntity_AlloyBlastSmelter
}
tInputs = tInputList.toArray(new ItemStack[0]);
tRecipe = GTPP_Recipe.GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.findRecipe(
- this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
+ this.getBaseMetaTileEntity(),
+ false,
+ gregtech.api.enums.GT_Values.V[tTier],
+ tFluids,
+ tInputs);
}
// Validity check
@@ -277,7 +270,7 @@ public class GregtechMetaTileEntity_AlloyBlastSmelter
this.lEUt = (-this.lEUt);
}
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
- this.mOutputFluids = new FluidStack[] {tRecipe.getFluidOutput(0)};
+ this.mOutputFluids = new FluidStack[] { tRecipe.getFluidOutput(0) };
List<ItemStack> tOutPutItems = new ArrayList<ItemStack>();
for (ItemStack tOut : tRecipe.mOutputs) {
if (ItemUtils.checkForInvalidItems(tOut)) {
@@ -299,7 +292,8 @@ public class GregtechMetaTileEntity_AlloyBlastSmelter
public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
isBussesSeparate = !isBussesSeparate;
GT_Utility.sendChatToPlayer(
- aPlayer, StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + isBussesSeparate);
+ aPlayer,
+ StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + isBussesSeparate);
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java
index 52c8919691..2fced531a5 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java
@@ -6,10 +6,18 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.util.ArrayList;
+
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
@@ -26,11 +34,6 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.ArrayList;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_Cyclotron>
implements ISurvivalConstructable {
@@ -83,70 +86,31 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
@Override
public IStructureDefinition<GregtechMetaTileEntity_Cyclotron> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
- STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_Cyclotron>builder()
- .addShape(mName, transpose(new String[][] {
- {
- " ",
- " hhh ",
- " hh hh ",
- " h h ",
- " h h ",
- " h h ",
- " h h ",
- " h h ",
- " h h ",
- " h h ",
- " h h ",
- " h h ",
- " hh hh ",
- " hhh ",
- " ",
- },
- {
- " hhh ",
- " hhccchh ",
- " hcchhhcch ",
- " hchh hhch ",
- " hch hch ",
- " hch hch ",
- "hch hch",
- "hch hch",
- "hch hch",
- " hch hch ",
- " hch hch ",
- " hchh hhch ",
- " hcch~hcch ",
- " hhccchh ",
- " hhh ",
- },
- {
- " ",
- " hhh ",
- " hh hh ",
- " h h ",
- " h h ",
- " h h ",
- " h h ",
- " h h ",
- " h h ",
- " h h ",
- " h h ",
- " h h ",
- " hh hh ",
- " hhh ",
- " ",
- }
- }))
+ STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_Cyclotron>builder().addShape(
+ mName,
+ transpose(
+ new String[][] {
+ { " ", " hhh ", " hh hh ", " h h ",
+ " h h ", " h h ", " h h ", " h h ",
+ " h h ", " h h ", " h h ", " h h ",
+ " hh hh ", " hhh ", " ", },
+ { " hhh ", " hhccchh ", " hcchhhcch ", " hchh hhch ",
+ " hch hch ", " hch hch ", "hch hch", "hch hch",
+ "hch hch", " hch hch ", " hch hch ", " hchh hhch ",
+ " hcch~hcch ", " hhccchh ", " hhh ", },
+ { " ", " hhh ", " hh hh ", " h h ",
+ " h h ", " h h ", " h h ", " h h ",
+ " h h ", " h h ", " h h ", " h h ",
+ " hh hh ", " hhh ", " ", } }))
.addElement(
'h',
buildHatchAdder(GregtechMetaTileEntity_Cyclotron.class)
.atLeast(InputBus, OutputBus, Maintenance, Energy, Muffler, InputHatch, OutputHatch)
- .casingIndex(44)
- .dot(1)
- .buildAndChain(onElementPass(
- x -> ++x.mCasing, ofBlock(getCasingBlock(), getCasingMeta()))))
- .addElement('c', ofBlock(getCyclotronCoil(), getCyclotronCoilMeta()))
- .build();
+ .casingIndex(44).dot(1).buildAndChain(
+ onElementPass(
+ x -> ++x.mCasing,
+ ofBlock(getCasingBlock(), getCasingMeta()))))
+ .addElement('c', ofBlock(getCyclotronCoil(), getCyclotronCoilMeta())).build();
}
return STRUCTURE_DEFINITION;
}
@@ -187,29 +151,18 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Super Magnetic Speed Shooter")
- .addSeparator()
+ tt.addMachineType(getMachineType()).addInfo("Super Magnetic Speed Shooter").addSeparator()
.addInfo("Particles are accelerated over 186 revolutions to 80% light speed")
.addInfo("Can produce a continuous beam current of 2.2 mA at 590 MeV")
- .addInfo("Which will be extracted from the Isochronous Cyclotron")
- .addSeparator()
+ .addInfo("Which will be extracted from the Isochronous Cyclotron").addSeparator()
.addInfo("Consists of the same layout as a Fusion Reactor")
.addInfo("Any external casing can be a hatch/bus, unlike Fusion")
.addInfo("Cyclotron Machine Casings around Cyclotron Coil Blocks")
- .addInfo("All Hatches must be IV or better")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .addCasingInfo("Cyclotron Machine Casings", 40)
- .addCasingInfo("Cyclotron Coil", 32)
- .addInputBus("Any Casing", 1)
- .addOutputBus("Any Casing", 1)
- .addInputHatch("Any Casing", 1)
- .addOutputHatch("Any Casing", 1)
- .addEnergyHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
- .addMufflerHatch("Any Casing", 1)
- .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ .addInfo("All Hatches must be IV or better").addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator().addCasingInfo("Cyclotron Machine Casings", 40).addCasingInfo("Cyclotron Coil", 32)
+ .addInputBus("Any Casing", 1).addOutputBus("Any Casing", 1).addInputHatch("Any Casing", 1)
+ .addOutputHatch("Any Casing", 1).addEnergyHatch("Any Casing", 1).addMaintenanceHatch("Any Casing", 1)
+ .addMufflerHatch("Any Casing", 1).toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -243,9 +196,9 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
@Override
public boolean checkRecipe(ItemStack aStack) {
- /*if (CORE.DEVENV) {
- return this.checkRecipeGeneric();
- }*/
+ /*
+ * if (CORE.DEVENV) { return this.checkRecipeGeneric(); }
+ */
this.fixAllMaintenanceIssue();
// log("Recipe Check.");
@@ -257,7 +210,11 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
GT_Recipe tRecipe = GTPP_Recipe.GTPP_Recipe_Map.sCyclotronRecipes.findRecipe(
- getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluidInputs, tItemInputs);
+ getBaseMetaTileEntity(),
+ false,
+ gregtech.api.enums.GT_Values.V[tTier],
+ tFluidInputs,
+ tItemInputs);
if (tRecipe != null) {
if (tRecipe.isRecipeInputEqual(true, tFluidInputs, tItemInputs)) {
@@ -293,18 +250,20 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
if (s.getItem() instanceof IonParticles) {
long aCharge = IonParticles.getChargeState(s);
if (aCharge == 0) {
- IonParticles.setChargeState(s, MathUtils.getRandomFromArray(new int[] {
- -5, -5, -4, -4, -4, -3, -3, -3, -3, -3, -2, -2, -2, -2, -2, -2, -2, -1, -1, -1, -1,
- -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6
- }));
+ IonParticles.setChargeState(
+ s,
+ MathUtils.getRandomFromArray(
+ new int[] { -5, -5, -4, -4, -4, -3, -3, -3, -3, -3, -2, -2, -2, -2, -2,
+ -2, -2, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3,
+ 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6 }));
}
}
}
}
this.mOutputItems = outputs;
- this.mOutputFluids = new FluidStack[] {tRecipe.getFluidOutput(0)};
+ this.mOutputFluids = new FluidStack[] { tRecipe.getFluidOutput(0) };
this.updateSlots();
return true;
}
@@ -332,11 +291,13 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
if (s.getItem() instanceof IonParticles) {
long aCharge = IonParticles.getChargeState(s);
if (aCharge == 0) {
- IonParticles.setChargeState(s, MathUtils.getRandomFromArray(new int[] {
- -5, -5, -4, -4, -4, -3, -3, -3, -3, -3, -2, -2, -2, -2, -2, -2, -2, -1, -1, -1,
- -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6
- }));
+ IonParticles.setChargeState(
+ s,
+ MathUtils.getRandomFromArray(
+ new int[] { -5, -5, -4, -4, -4, -3, -3, -3, -3, -3, -2, -2, -2, -2,
+ -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6 }));
}
}
}
@@ -380,11 +341,8 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
}
}
- return new String[] {
- "COMET - Compact Cyclotron MK " + tier,
- "EU Required: " + powerRequired + "EU/t",
- "Stored EU: " + this.getEUVar() + " / " + maxEUStore()
- };
+ return new String[] { "COMET - Compact Cyclotron MK " + tier, "EU Required: " + powerRequired + "EU/t",
+ "Stored EU: " + this.getEUVar() + " / " + maxEUStore() };
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java
index 7422426669..1188cbe278 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java
@@ -7,11 +7,24 @@ import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.WeightedRandomFishable;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits;
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.enums.TAE;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.IIconContainer;
@@ -29,20 +42,9 @@ import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import ic2.core.init.BlocksItems;
import ic2.core.init.InternalName;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.WeightedRandomFishable;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.FluidStack;
-public class GregtechMetaTileEntity_IndustrialFishingPond
- extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialFishingPond>
- implements ISurvivalConstructable {
+public class GregtechMetaTileEntity_IndustrialFishingPond extends
+ GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialFishingPond> implements ISurvivalConstructable {
private boolean isUsingControllerCircuit = false;
private static final Item circuit = CI.getNumberedCircuit(0).getItem();
@@ -75,26 +77,14 @@ public class GregtechMetaTileEntity_IndustrialFishingPond
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Fishing Pond")
- .addInfo("Can process (Tier + 1) * 2 recipes")
- .addInfo("Put a numbered circuit into the input bus.")
- .addInfo("Circuit 14 for Fish")
- .addInfo("Circuit 15 for Junk")
- .addInfo("Circuit 16 for Treasure")
- .addInfo("Need to be filled with water.")
- .addInfo("Will automatically fill water from input hatch.")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(9, 3, 9, true)
- .addController("Front Center")
- .addCasingInfo("Aquatic Casings", 64)
- .addInputBus("Any Casing", 1)
- .addOutputBus("Any Casing", 1)
- .addInputHatch("Any Casing", 1)
- .addEnergyHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
- .addMufflerHatch("Any Casing", 1)
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Fishing Pond")
+ .addInfo("Can process (Tier + 1) * 2 recipes").addInfo("Put a numbered circuit into the input bus.")
+ .addInfo("Circuit 14 for Fish").addInfo("Circuit 15 for Junk").addInfo("Circuit 16 for Treasure")
+ .addInfo("Need to be filled with water.").addInfo("Will automatically fill water from input hatch.")
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(9, 3, 9, true)
+ .addController("Front Center").addCasingInfo("Aquatic Casings", 64).addInputBus("Any Casing", 1)
+ .addOutputBus("Any Casing", 1).addInputHatch("Any Casing", 1).addEnergyHatch("Any Casing", 1)
+ .addMaintenanceHatch("Any Casing", 1).addMufflerHatch("Any Casing", 1)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -109,49 +99,24 @@ public class GregtechMetaTileEntity_IndustrialFishingPond
public IStructureDefinition<GregtechMetaTileEntity_IndustrialFishingPond> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialFishingPond>builder()
- .addShape(mName, transpose(new String[][] {
- {
- "XXXXXXXXX",
- "X X",
- "X X",
- "X X",
- "X X",
- "X X",
- "X X",
- "X X",
- "XXXXXXXXX"
- },
- {
- "XXXX~XXXX",
- "X X",
- "X X",
- "X X",
- "X X",
- "X X",
- "X X",
- "X X",
- "XXXXXXXXX"
- },
- {
- "XXXXXXXXX",
- "XXXXXXXXX",
- "XXXXXXXXX",
- "XXXXXXXXX",
- "XXXXXXXXX",
- "XXXXXXXXX",
- "XXXXXXXXX",
- "XXXXXXXXX",
- "XXXXXXXXX"
- },
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] {
+ { "XXXXXXXXX", "X X", "X X", "X X", "X X",
+ "X X", "X X", "X X", "XXXXXXXXX" },
+ { "XXXX~XXXX", "X X", "X X", "X X", "X X",
+ "X X", "X X", "X X", "XXXXXXXXX" },
+ { "XXXXXXXXX", "XXXXXXXXX", "XXXXXXXXX", "XXXXXXXXX", "XXXXXXXXX",
+ "XXXXXXXXX", "XXXXXXXXX", "XXXXXXXXX", "XXXXXXXXX" }, }))
.addElement(
'X',
buildHatchAdder(GregtechMetaTileEntity_IndustrialFishingPond.class)
.atLeast(InputBus, OutputBus, Maintenance, Energy, Muffler, InputHatch)
- .casingIndex(getCasingTextureIndex())
- .dot(1)
- .buildAndChain(onElementPass(
- x -> ++x.mCasing, ofBlock(getCasingBlock(), getCasingMeta()))))
+ .casingIndex(getCasingTextureIndex()).dot(1).buildAndChain(
+ onElementPass(
+ x -> ++x.mCasing,
+ ofBlock(getCasingBlock(), getCasingMeta()))))
.build();
}
return STRUCTURE_DEFINITION;
@@ -296,10 +261,10 @@ public class GregtechMetaTileEntity_IndustrialFishingPond
// if (aBaseMetaTileEntity.fac)
- final int xDir =
- ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * mCurrentDirectionX;
- final int zDir =
- ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * mCurrentDirectionZ;
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX
+ * mCurrentDirectionX;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ
+ * mCurrentDirectionZ;
int tAmount = 0;
for (int i = mOffsetX_Lower + 1; i <= mOffsetX_Upper - 1; ++i) {
@@ -315,13 +280,11 @@ public class GregtechMetaTileEntity_IndustrialFishingPond
// Utils.LOG_WARNING("Going to try swap an air block for water from inut bus.");
stored.amount -= 1000;
Block fluidUsed = Blocks.water;
- aBaseMetaTileEntity
- .getWorld()
- .setBlock(
- aBaseMetaTileEntity.getXCoord() + xDir + i,
- aBaseMetaTileEntity.getYCoord() + h,
- aBaseMetaTileEntity.getZCoord() + zDir + j,
- fluidUsed);
+ aBaseMetaTileEntity.getWorld().setBlock(
+ aBaseMetaTileEntity.getXCoord() + xDir + i,
+ aBaseMetaTileEntity.getYCoord() + h,
+ aBaseMetaTileEntity.getZCoord() + zDir + j,
+ fluidUsed);
}
}
}
@@ -346,8 +309,7 @@ public class GregtechMetaTileEntity_IndustrialFishingPond
}
private boolean isNotStaticWater(Block block, byte meta) {
- return block == Blocks.air
- || block == Blocks.flowing_water
+ return block == Blocks.air || block == Blocks.flowing_water
|| block == BlocksItems.getFluidBlock(InternalName.fluidDistilledWater)
|| (cofhWater != null && cofhWater.isAssignableFrom(block.getClass()) && meta != 0);
}
@@ -418,8 +380,7 @@ public class GregtechMetaTileEntity_IndustrialFishingPond
}
// reflection map
- private static Map<WeightedRandomFishable, ItemStack> reflectiveFishMap =
- new HashMap<WeightedRandomFishable, ItemStack>();
+ private static Map<WeightedRandomFishable, ItemStack> reflectiveFishMap = new HashMap<WeightedRandomFishable, ItemStack>();
private ItemStack reflectiveFish(WeightedRandomFishable y) {
if (reflectiveFishMap.containsKey(y)) {
@@ -427,13 +388,11 @@ public class GregtechMetaTileEntity_IndustrialFishingPond
}
ItemStack t;
try {
- t = (ItemStack) ReflectionUtils.getField(WeightedRandomFishable.class, "field_150711_b")
- .get(y);
+ t = (ItemStack) ReflectionUtils.getField(WeightedRandomFishable.class, "field_150711_b").get(y);
ItemStack k = ItemUtils.getSimpleStack(t, 1);
reflectiveFishMap.put(y, k);
return t;
- } catch (IllegalArgumentException | IllegalAccessException e) {
- }
+ } catch (IllegalArgumentException | IllegalAccessException e) {}
return null;
}
@@ -441,39 +400,36 @@ public class GregtechMetaTileEntity_IndustrialFishingPond
ItemStack[] mFishOutput = new ItemStack[this.mMax];
if (this.mMode == 14) {
for (int k = 0; k < this.mMax; k++) {
- if (mFishOutput[k] == null)
- for (WeightedRandomFishable g : categoryFish.values()) {
- if (MathUtils.randInt(0, (65 - getMaxParallelRecipes())) <= 2) {
- ItemStack t = reflectiveFish(g);
- if (t != null) {
- mFishOutput[k] = ItemUtils.getSimpleStack(t, 1);
- }
+ if (mFishOutput[k] == null) for (WeightedRandomFishable g : categoryFish.values()) {
+ if (MathUtils.randInt(0, (65 - getMaxParallelRecipes())) <= 2) {
+ ItemStack t = reflectiveFish(g);
+ if (t != null) {
+ mFishOutput[k] = ItemUtils.getSimpleStack(t, 1);
}
}
+ }
}
} else if (this.mMode == 15) {
for (int k = 0; k < this.mMax; k++) {
- if (mFishOutput[k] == null)
- for (WeightedRandomFishable g : categoryJunk.values()) {
- if (MathUtils.randInt(0, 100) <= 1) {
- ItemStack t = reflectiveFish(g);
- if (t != null) {
- mFishOutput[k] = ItemUtils.getSimpleStack(t, 1);
- }
+ if (mFishOutput[k] == null) for (WeightedRandomFishable g : categoryJunk.values()) {
+ if (MathUtils.randInt(0, 100) <= 1) {
+ ItemStack t = reflectiveFish(g);
+ if (t != null) {
+ mFishOutput[k] = ItemUtils.getSimpleStack(t, 1);
}
}
+ }
}
} else if (this.mMode == 16) {
for (int k = 0; k < this.mMax; k++) {
- if (mFishOutput[k] == null)
- for (WeightedRandomFishable g : categoryLoot.values()) {
- if (MathUtils.randInt(0, 1000) <= 2) {
- ItemStack t = reflectiveFish(g);
- if (t != null) {
- mFishOutput[k] = ItemUtils.getSimpleStack(t, 1);
- }
+ if (mFishOutput[k] == null) for (WeightedRandomFishable g : categoryLoot.values()) {
+ if (MathUtils.randInt(0, 1000) <= 2) {
+ ItemStack t = reflectiveFish(g);
+ if (t != null) {
+ mFishOutput[k] = ItemUtils.getSimpleStack(t, 1);
}
}
+ }
}
} else {
mFishOutput = null;
@@ -482,13 +438,8 @@ public class GregtechMetaTileEntity_IndustrialFishingPond
}
@Override
- public boolean checkRecipeGeneric(
- ItemStack[] aItemInputs,
- FluidStack[] aFluidInputs,
- int aMaxParallelRecipes,
- long aEUPercent,
- int aSpeedBonusPercent,
- int aOutputChanceRoll) {
+ public boolean checkRecipeGeneric(ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes,
+ long aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll) {
// Control Core to control the Multiblocks behaviour.
int aControlCoreTier = getControlCoreTier();
@@ -517,23 +468,26 @@ public class GregtechMetaTileEntity_IndustrialFishingPond
getCircuit(aItemInputs);
/*
- * GT_Recipe tRecipe = this.getRecipeMap().findRecipe( getBaseMetaTileEntity(),
- * mLastRecipe, false, gregtech.api.enums.GT_Values.V[tTier], aFluidInputs,
- * aItemInputs);
+ * GT_Recipe tRecipe = this.getRecipeMap().findRecipe( getBaseMetaTileEntity(), mLastRecipe, false,
+ * gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs);
*/
ItemStack[] mFishOutput = generateLoot(this.mMode);
mFishOutput = removeNulls(mFishOutput);
GT_Recipe g = new GTPP_Recipe(
- true, new ItemStack[] {}, mFishOutput, null, new int[] {}, aFluidInputs, mOutputFluids, 200, 16, 0);
- GT_ParallelHelper helper = new GT_ParallelHelper()
- .setRecipe(g)
- .setItemInputs(aItemInputs)
- .setFluidInputs(aFluidInputs)
- .setAvailableEUt(tEnergy)
- .setMaxParallel(aMaxParallelRecipes)
- .enableConsumption()
- .enableOutputCalculation();
+ true,
+ new ItemStack[] {},
+ mFishOutput,
+ null,
+ new int[] {},
+ aFluidInputs,
+ mOutputFluids,
+ 200,
+ 16,
+ 0);
+ GT_ParallelHelper helper = new GT_ParallelHelper().setRecipe(g).setItemInputs(aItemInputs)
+ .setFluidInputs(aFluidInputs).setAvailableEUt(tEnergy).setMaxParallel(aMaxParallelRecipes)
+ .enableConsumption().enableOutputCalculation();
if (!mVoidExcess) {
helper.enableVoidProtection(this);
}
@@ -551,14 +505,10 @@ public class GregtechMetaTileEntity_IndustrialFishingPond
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
- GT_OverclockCalculator calculator = new GT_OverclockCalculator()
- .setRecipeEUt(g.mEUt)
- .setEUt(tEnergy)
- .setDuration(g.mDuration)
- .setEUtDiscount(aEUPercent / 100.0f)
+ GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(g.mEUt).setEUt(tEnergy)
+ .setDuration(g.mDuration).setEUtDiscount(aEUPercent / 100.0f)
.setSpeedBoost(100.0f / (100.0f + aSpeedBonusPercent))
- .setParallel(Math.min(aMaxParallelRecipes, helper.getCurrentParallel()))
- .calculate();
+ .setParallel(Math.min(aMaxParallelRecipes, helper.getCurrentParallel())).calculate();
lEUt = -calculator.getConsumption();
mMaxProgresstime = (int) Math.ceil(calculator.getDuration() * helper.getDurationMultiplier());
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialRockBreaker.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialRockBreaker.java
index 99c08bd17b..8c2b1dfc0c 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialRockBreaker.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialRockBreaker.java
@@ -8,10 +8,19 @@ import static gregtech.api.enums.GT_Values.E;
import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.util.ArrayList;
+import java.util.HashSet;
+
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
@@ -28,16 +37,9 @@ import gtPlusPlus.core.util.minecraft.FluidUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.ArrayList;
-import java.util.HashSet;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
-public class GregtechMetaTileEntity_IndustrialRockBreaker
- extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialRockBreaker>
- implements ISurvivalConstructable {
+public class GregtechMetaTileEntity_IndustrialRockBreaker extends
+ GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialRockBreaker> implements ISurvivalConstructable {
private int mCasing;
private static IStructureDefinition<GregtechMetaTileEntity_IndustrialRockBreaker> STRUCTURE_DEFINITION = null;
@@ -63,24 +65,14 @@ public class GregtechMetaTileEntity_IndustrialRockBreaker
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Industrial Rock Breaker")
- .addInfo("Speed: +200% | EU Usage: 75% | Parallel: Tier x 8")
- .addInfo("Circuit goes in the GUI slot")
- .addInfo("1 = cobble, 2 = stone, 3 = obsidian")
- .addInfo("Supply Water/Lava")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 4, 3, true)
- .addController("Bottom Center")
- .addCasingInfo("Thermal Processing Casing", 9)
- .addCasingInfo("Thermal Containment Casing", 16)
- .addInputBus("Any Casing", 1)
- .addInputHatch("Any Casing", 1)
- .addOutputBus("Any Casing", 1)
- .addEnergyHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
- .addMufflerHatch("Any Casing", 1)
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Industrial Rock Breaker")
+ .addInfo("Speed: +200% | EU Usage: 75% | Parallel: Tier x 8").addInfo("Circuit goes in the GUI slot")
+ .addInfo("1 = cobble, 2 = stone, 3 = obsidian").addInfo("Supply Water/Lava")
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 4, 3, true)
+ .addController("Bottom Center").addCasingInfo("Thermal Processing Casing", 9)
+ .addCasingInfo("Thermal Containment Casing", 16).addInputBus("Any Casing", 1)
+ .addInputHatch("Any Casing", 1).addOutputBus("Any Casing", 1).addEnergyHatch("Any Casing", 1)
+ .addMaintenanceHatch("Any Casing", 1).addMufflerHatch("Any Casing", 1)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -89,22 +81,18 @@ public class GregtechMetaTileEntity_IndustrialRockBreaker
public IStructureDefinition<GregtechMetaTileEntity_IndustrialRockBreaker> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialRockBreaker>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCC", "CCC", "CCC"},
- {"HHH", "H-H", "HHH"},
- {"HHH", "H-H", "HHH"},
- {"C~C", "CCC", "CCC"},
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCC", "CCC", "CCC" }, { "HHH", "H-H", "HHH" },
+ { "HHH", "H-H", "HHH" }, { "C~C", "CCC", "CCC" }, }))
.addElement(
'C',
buildHatchAdder(GregtechMetaTileEntity_IndustrialRockBreaker.class)
.atLeast(InputBus, InputHatch, OutputBus, Maintenance, Energy, Muffler)
- .casingIndex(TAE.GTPP_INDEX(16))
- .dot(1)
- .buildAndChain(
+ .casingIndex(TAE.GTPP_INDEX(16)).dot(1).buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings2Misc, 0))))
- .addElement('H', ofBlock(ModBlocks.blockCasings2Misc, 11))
- .build();
+ .addElement('H', ofBlock(ModBlocks.blockCasings2Misc, 11)).build();
}
return STRUCTURE_DEFINITION;
}
@@ -171,7 +159,7 @@ public class GregtechMetaTileEntity_IndustrialRockBreaker
if (sRecipe_Cobblestone == null || sRecipe_SmoothStone == null || sRecipe_Redstone == null) {
generateRecipes();
}
- FluidStack[] aInputFluids = new FluidStack[] {FluidUtils.getWater(1000), FluidUtils.getLava(1000)};
+ FluidStack[] aInputFluids = new FluidStack[] { FluidUtils.getWater(1000), FluidUtils.getLava(1000) };
GT_Recipe aTemp = sRecipe_Cobblestone.copy();
aTemp.mFluidInputs = aInputFluids;
sFakeRecipeMap.add(aTemp);
@@ -203,10 +191,10 @@ public class GregtechMetaTileEntity_IndustrialRockBreaker
private static final void generateRecipes() {
sRecipe_Cobblestone = new GTPP_Recipe(
false,
- new ItemStack[] {CI.getNumberedCircuit(1)},
- new ItemStack[] {ItemUtils.getSimpleStack(Blocks.cobblestone)},
+ new ItemStack[] { CI.getNumberedCircuit(1) },
+ new ItemStack[] { ItemUtils.getSimpleStack(Blocks.cobblestone) },
null,
- new int[] {10000},
+ new int[] { 10000 },
null,
null,
16,
@@ -214,10 +202,10 @@ public class GregtechMetaTileEntity_IndustrialRockBreaker
0);
sRecipe_SmoothStone = new GTPP_Recipe(
false,
- new ItemStack[] {CI.getNumberedCircuit(2)},
- new ItemStack[] {ItemUtils.getSimpleStack(Blocks.stone)},
+ new ItemStack[] { CI.getNumberedCircuit(2) },
+ new ItemStack[] { ItemUtils.getSimpleStack(Blocks.stone) },
null,
- new int[] {10000},
+ new int[] { 10000 },
null,
null,
16,
@@ -225,12 +213,11 @@ public class GregtechMetaTileEntity_IndustrialRockBreaker
0);
sRecipe_Redstone = new GTPP_Recipe(
false,
- new ItemStack[] {
- CI.getNumberedCircuit(3), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L)
- },
- new ItemStack[] {ItemUtils.getSimpleStack(Blocks.obsidian)},
+ new ItemStack[] { CI.getNumberedCircuit(3),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L) },
+ new ItemStack[] { ItemUtils.getSimpleStack(Blocks.obsidian) },
null,
- new int[] {10000},
+ new int[] { 10000 },
null,
null,
128,
@@ -256,7 +243,8 @@ public class GregtechMetaTileEntity_IndustrialRockBreaker
if (!aItems.isEmpty()) {
for (ItemStack aItem : aItems) {
if (GT_Utility.areStacksEqual(
- aItem, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L))) {
+ aItem,
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L))) {
aHasRedstone = true;
break;
}
@@ -315,14 +303,9 @@ public class GregtechMetaTileEntity_IndustrialRockBreaker
int aEUPercent = getEuDiscountForParallelism();
int aSpeedBonusPercent = 200;
- GT_ParallelHelper helper = new GT_ParallelHelper()
- .setRecipe(tRecipe)
- .setItemInputs(aItemInputs)
- .setFluidInputs(aFluidInputs)
- .setAvailableEUt(tEnergy)
- .setMaxParallel(aMaxParallelRecipes)
- .enableConsumption()
- .enableOutputCalculation();
+ GT_ParallelHelper helper = new GT_ParallelHelper().setRecipe(tRecipe).setItemInputs(aItemInputs)
+ .setFluidInputs(aFluidInputs).setAvailableEUt(tEnergy).setMaxParallel(aMaxParallelRecipes)
+ .enableConsumption().enableOutputCalculation();
if (!mVoidExcess) {
helper.enableVoidProtection(this);
}
@@ -340,14 +323,10 @@ public class GregtechMetaTileEntity_IndustrialRockBreaker
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
- GT_OverclockCalculator calculator = new GT_OverclockCalculator()
- .setRecipeEUt(tRecipe.mEUt)
- .setEUt(tEnergy)
- .setDuration(tRecipe.mDuration)
- .setEUtDiscount(aEUPercent / 100.0f)
+ GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(tRecipe.mEUt).setEUt(tEnergy)
+ .setDuration(tRecipe.mDuration).setEUtDiscount(aEUPercent / 100.0f)
.setSpeedBoost(100.0f / (100.0f + aSpeedBonusPercent))
- .setParallel(Math.min(aMaxParallelRecipes, helper.getCurrentParallel()))
- .calculate();
+ .setParallel(Math.min(aMaxParallelRecipes, helper.getCurrentParallel())).calculate();
lEUt = -calculator.getConsumption();
mMaxProgresstime = (int) Math.ceil(calculator.getDuration() * helper.getDurationMultiplier());
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java
index d5a7316b28..b9658fcd7b 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java
@@ -8,11 +8,20 @@ import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
import static gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase.GTPPHatchElement.AirIntake;
import static gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase.GTPPHatchElement.TTDynamo;
+import java.util.ArrayList;
+
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidStack;
+
import com.google.common.collect.ImmutableMap;
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.TAE;
import gregtech.api.interfaces.IIconContainer;
@@ -32,16 +41,10 @@ import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEn
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler_Adv;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.ArrayList;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-public class GregtechMetaTileEntity_LargeRocketEngine
- extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_LargeRocketEngine>
- implements ISurvivalConstructable {
+public class GregtechMetaTileEntity_LargeRocketEngine extends
+ GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_LargeRocketEngine> implements ISurvivalConstructable {
+
protected int fuelConsumption;
protected int fuelValue;
protected int fuelRemaining;
@@ -85,8 +88,7 @@ public class GregtechMetaTileEntity_LargeRocketEngine
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Large Rocket Engine")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Large Rocket Engine")
.addInfo("Supply GT++ Rocket Fuels and 1000L of " + mLubricantName + " per hour")
.addInfo("Produces as much energy as you put fuel in, with optional boosting")
.addInfo("Consumes 2000L/s of air and pollutes 1500 gibbl/s per 16384 eu/t produced")
@@ -99,18 +101,12 @@ public class GregtechMetaTileEntity_LargeRocketEngine
.addInfo("- 75% of max fuel efficiency at 53k or 159k EU/t output energy")
.addInfo("- 50% of max fuel efficiency at 69k or 207k EU/t output energy")
.addInfo("- 25% of max fuel efficiency at 98k or 294k EU/t output energy")
- .addInfo("formula: x = input of energy (30K^(1/3)/ x^(1/3)) * (80K^(1/3)/ x^(1/3))")
- .addSeparator()
- .beginStructureBlock(3, 3, 10, false)
- .addController("Front Center")
- .addCasingInfo(mCasingName, 64)
- .addCasingInfo(mGearboxName, 8)
- .addStructureHint("Air Intake Hatch", 1)
- .addInputBus("Side center line", 1)
- .addInputHatch("Side center line", 1)
+ .addInfo("formula: x = input of energy (30K^(1/3)/ x^(1/3)) * (80K^(1/3)/ x^(1/3))").addSeparator()
+ .beginStructureBlock(3, 3, 10, false).addController("Front Center").addCasingInfo(mCasingName, 64)
+ .addCasingInfo(mGearboxName, 8).addStructureHint("Air Intake Hatch", 1)
+ .addInputBus("Side center line", 1).addInputHatch("Side center line", 1)
.addMaintenanceHatch("Any Block Touching Inconel Reinforced Casing", 1)
- .addDynamoHatch("Top center line", 2)
- .addMufflerHatch("Back Center", 3)
+ .addDynamoHatch("Top center line", 2).addMufflerHatch("Back Center", 3)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -119,11 +115,14 @@ public class GregtechMetaTileEntity_LargeRocketEngine
public IStructureDefinition<GregtechMetaTileEntity_LargeRocketEngine> getStructureDefinition() {
if (this.STRUCTURE_DEFINITION == null) {
this.STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_LargeRocketEngine>builder()
- .addShape(this.mName, transpose(new String[][] {
- {"CTC", "CTC", "CTC", "CTC", "CTC", "CTC", "CTC", "CTC", "CTC", "CTC"},
- {"C~C", "SIS", "SIS", "SIS", "SIS", "SIS", "SIS", "SIS", "SIS", "CMC"},
- {"CCC", "CSC", "CSC", "CSC", "CSC", "CSC", "CSC", "CSC", "CSC", "CCC"},
- }))
+ .addShape(
+ this.mName,
+ transpose(
+ new String[][] {
+ { "CTC", "CTC", "CTC", "CTC", "CTC", "CTC", "CTC", "CTC", "CTC", "CTC" },
+ { "C~C", "SIS", "SIS", "SIS", "SIS", "SIS", "SIS", "SIS", "SIS", "CMC" },
+ { "CCC", "CSC", "CSC", "CSC", "CSC", "CSC", "CSC", "CSC", "CSC",
+ "CCC" }, }))
.addElement('C', ofBlock(getCasingBlock(), getCasingMeta()))
.addElement('I', ofBlock(getGearboxBlock(), getGearboxMeta()))
// side
@@ -131,21 +130,20 @@ public class GregtechMetaTileEntity_LargeRocketEngine
'S',
buildHatchAdder(GregtechMetaTileEntity_LargeRocketEngine.class)
.atLeast(ImmutableMap.of(AirIntake, 8, InputBus, 1, InputHatch, 3, Maintenance, 1))
- .casingIndex(getCasingTextureIndex())
- .dot(1)
- .buildAndChain(onElementPass(
- x -> ++x.mCasing, ofBlock(getCasingBlock(), getCasingMeta()))))
+ .casingIndex(getCasingTextureIndex()).dot(1).buildAndChain(
+ onElementPass(
+ x -> ++x.mCasing,
+ ofBlock(getCasingBlock(), getCasingMeta()))))
// top
.addElement(
'T',
buildHatchAdder(GregtechMetaTileEntity_LargeRocketEngine.class)
.atLeast(ImmutableMap.of(AirIntake, 8, Dynamo.or(TTDynamo), 1, Maintenance, 1))
- .casingIndex(getCasingTextureIndex())
- .dot(2)
- .buildAndChain(onElementPass(
- x -> ++x.mCasing, ofBlock(getCasingBlock(), getCasingMeta()))))
- .addElement('M', Muffler.newAny(getCasingTextureIndex(), 3))
- .build();
+ .casingIndex(getCasingTextureIndex()).dot(2).buildAndChain(
+ onElementPass(
+ x -> ++x.mCasing,
+ ofBlock(getCasingBlock(), getCasingMeta()))))
+ .addElement('M', Muffler.newAny(getCasingTextureIndex(), 3)).build();
}
return this.STRUCTURE_DEFINITION;
}
@@ -167,8 +165,7 @@ public class GregtechMetaTileEntity_LargeRocketEngine
this.mTecTechDynamoHatches.clear();
this.mAllDynamoHatches.clear();
this.mAirIntakes.clear();
- return checkPiece(this.mName, 1, 1, 0)
- && this.mCasing >= 64 - 48
+ return checkPiece(this.mName, 1, 1, 0) && this.mCasing >= 64 - 48
&& this.mAirIntakes.size() >= 1
&& checkHatch();
}
@@ -338,6 +335,7 @@ public class GregtechMetaTileEntity_LargeRocketEngine
/**
* Consumes Fuel if required. Free Fuel Ticks are handled here.
+ *
* @param aFuel
* @return
*/
@@ -387,8 +385,9 @@ public class GregtechMetaTileEntity_LargeRocketEngine
public boolean consumeLOH() {
int LOHamount = (3 * this.euProduction) / 1000;
- return this.depleteInput(FluidUtils.getFluidStack(
- RocketFuels.Liquid_Hydrogen, LOHamount)); // (40 * ((long) euProduction / 10000))
+ return this.depleteInput(FluidUtils.getFluidStack(RocketFuels.Liquid_Hydrogen, LOHamount)); // (40 * ((long)
+ // euProduction /
+ // 10000))
}
@Override
@@ -421,9 +420,10 @@ public class GregtechMetaTileEntity_LargeRocketEngine
} else {
/**
* Calcualtes overclocked ness using long integers
- * @param aEUt - recipe EUt
- * @param aDuration - recipe Duration
- * @param mAmperage - should be 1 ?
+ *
+ * @param aEUt - recipe EUt
+ * @param aDuration - recipe Duration
+ * @param mAmperage - should be 1 ?
*/
// Long time calculation
if (aFirstVoltageFound != aVoltage) {
@@ -473,8 +473,8 @@ public class GregtechMetaTileEntity_LargeRocketEngine
if (this.mRuntime % 20 == 0) {
if (this.mMufflerHatches.size() == 1
&& this.mMufflerHatches.get(0) instanceof GT_MetaTileEntity_Hatch_Muffler_Adv) {
- GT_MetaTileEntity_Hatch_Muffler_Adv tMuffler =
- (GT_MetaTileEntity_Hatch_Muffler_Adv) this.mMufflerHatches.get(0);
+ GT_MetaTileEntity_Hatch_Muffler_Adv tMuffler = (GT_MetaTileEntity_Hatch_Muffler_Adv) this.mMufflerHatches
+ .get(0);
if (!tMuffler.hasValidFilter()) {
ArrayList<ItemStack> tInputs = getStoredInputs();
for (ItemStack tItem : tInputs) {
@@ -553,18 +553,14 @@ public class GregtechMetaTileEntity_LargeRocketEngine
@Override
public String[] getExtraInfoData() {
- return new String[] {
- "Rocket Engine",
- "Current Air: " + getAir(),
- "Current Pollution: " + getPollutionPerTick(null),
- "Time until next fuel consumption: " + this.freeFuelTicks,
- "Current Output: " + this.lEUt * this.mEfficiency / 10000 + " EU/t",
- "Fuel Consumption: " + (this.fuelConsumption) + "L/s",
- "Fuel Value: " + this.fuelValue + " EU/L",
- "Fuel Remaining: " + this.fuelRemaining + " Litres",
- "Current Efficiency: " + this.mEfficiency / 100 + "%",
- (this.getIdealStatus() == this.getRepairStatus()) ? "No Maintainance issues" : "Needs Maintainance"
- };
+ return new String[] { "Rocket Engine", "Current Air: " + getAir(),
+ "Current Pollution: " + getPollutionPerTick(null),
+ "Time until next fuel consumption: " + this.freeFuelTicks,
+ "Current Output: " + this.lEUt * this.mEfficiency / 10000 + " EU/t",
+ "Fuel Consumption: " + (this.fuelConsumption) + "L/s", "Fuel Value: " + this.fuelValue + " EU/L",
+ "Fuel Remaining: " + this.fuelRemaining + " Litres",
+ "Current Efficiency: " + this.mEfficiency / 100 + "%",
+ (this.getIdealStatus() == this.getRepairStatus()) ? "No Maintainance issues" : "Needs Maintainance" };
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeSemifluidGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeSemifluidGenerator.java
index cdeebe7f40..1878cc8484 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeSemifluidGenerator.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeSemifluidGenerator.java
@@ -10,10 +10,18 @@ import static gregtech.api.enums.GT_HatchElement.Muffler;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
import static gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase.GTPPHatchElement.TTDynamo;
+import java.util.ArrayList;
+
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
import gregtech.api.enums.Textures;
@@ -29,15 +37,9 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
-import java.util.ArrayList;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.fluids.FluidStack;
-public class GregtechMetaTileEntity_LargeSemifluidGenerator
- extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_LargeSemifluidGenerator>
- implements ISurvivalConstructable {
+public class GregtechMetaTileEntity_LargeSemifluidGenerator extends
+ GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_LargeSemifluidGenerator> implements ISurvivalConstructable {
private int mCasing;
private static IStructureDefinition<GregtechMetaTileEntity_LargeSemifluidGenerator> STRUCTURE_DEFINITION = null;
@@ -58,25 +60,17 @@ public class GregtechMetaTileEntity_LargeSemifluidGenerator
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Large Semifluid Generator")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Large Semifluid Generator")
.addInfo("Engine Intake Casings must not be obstructed in front (only air blocks)")
.addInfo("Supply Semifluid Fuels and 2000L of Lubricant per hour to run.")
.addInfo("Supply 80L of Oxygen per second to boost output (optional).")
.addInfo("Default: Produces 2048EU/t at 100% efficiency")
.addInfo("Boosted: Produces 6144EU/t at 150% efficiency")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 3, 4, false)
- .addController("Front Center")
- .addCasingInfo("Stable Titanium Machine Casing", 16)
- .addCasingInfo("Steel Gear Box Machine Casing", 2)
- .addCasingInfo("Engine Intake Machine Casing", 8)
- .addInputHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
- .addMufflerHatch("Any Casing", 1)
- .addDynamoHatch("Back Center", 2)
- .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 4, false)
+ .addController("Front Center").addCasingInfo("Stable Titanium Machine Casing", 16)
+ .addCasingInfo("Steel Gear Box Machine Casing", 2).addCasingInfo("Engine Intake Machine Casing", 8)
+ .addInputHatch("Any Casing", 1).addMaintenanceHatch("Any Casing", 1).addMufflerHatch("Any Casing", 1)
+ .addDynamoHatch("Back Center", 2).toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -166,23 +160,22 @@ public class GregtechMetaTileEntity_LargeSemifluidGenerator
public IStructureDefinition<GregtechMetaTileEntity_LargeSemifluidGenerator> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_LargeSemifluidGenerator>builder()
- .addShape(mName, transpose(new String[][] {
- {"III", "CCC", "CCC", "CCC"},
- {"I~I", "CGC", "CGC", "CMC"},
- {"III", "CCC", "CCC", "CCC"},
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { "III", "CCC", "CCC", "CCC" }, { "I~I", "CGC", "CGC", "CMC" },
+ { "III", "CCC", "CCC", "CCC" }, }))
.addElement(
'C',
buildHatchAdder(GregtechMetaTileEntity_LargeSemifluidGenerator.class)
- .atLeast(Muffler, InputHatch, Maintenance)
- .casingIndex(getCasingTextureIndex())
- .dot(1)
- .buildAndChain(onElementPass(
- x -> ++x.mCasing, ofBlock(getCasingBlock(), getCasingMeta()))))
+ .atLeast(Muffler, InputHatch, Maintenance).casingIndex(getCasingTextureIndex())
+ .dot(1).buildAndChain(
+ onElementPass(
+ x -> ++x.mCasing,
+ ofBlock(getCasingBlock(), getCasingMeta()))))
.addElement('G', ofBlock(getGearboxBlock(), getGearboxMeta()))
.addElement('I', ofBlock(getIntakeBlock(), getIntakeMeta()))
- .addElement('M', Dynamo.or(TTDynamo).newAny(getCasingTextureIndex(), 2))
- .build();
+ .addElement('M', Dynamo.or(TTDynamo).newAny(getCasingTextureIndex(), 2)).build();
}
return STRUCTURE_DEFINITION;
}
@@ -297,15 +290,10 @@ public class GregtechMetaTileEntity_LargeSemifluidGenerator
@Override
public String[] getExtraInfoData() {
- return new String[] {
- "Large Semifluid Generator",
- "Current Output: " + lEUt * mEfficiency / 10000 + " EU/t",
- "Fuel Consumption: " + fuelConsumption + "L/t",
- "Fuel Value: " + fuelValue + " EU/L",
- "Fuel Remaining: " + fuelRemaining + " Litres",
- "Current Efficiency: " + (mEfficiency / 100) + "%",
- getIdealStatus() == getRepairStatus() ? "No Maintainance issues" : "Needs Maintainance"
- };
+ return new String[] { "Large Semifluid Generator", "Current Output: " + lEUt * mEfficiency / 10000 + " EU/t",
+ "Fuel Consumption: " + fuelConsumption + "L/t", "Fuel Value: " + fuelValue + " EU/L",
+ "Fuel Remaining: " + fuelRemaining + " Litres", "Current Efficiency: " + (mEfficiency / 100) + "%",
+ getIdealStatus() == getRepairStatus() ? "No Maintainance issues" : "Needs Maintainance" };
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java
index 49d867cb76..b5e8bd21e5 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java
@@ -6,6 +6,13 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose
import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.util.ArrayList;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
@@ -13,6 +20,7 @@ import com.gtnewhorizon.structurelib.structure.StructureDefinition;
import com.gtnewhorizons.modularui.common.widget.DynamicPositionedColumn;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
import com.gtnewhorizons.modularui.common.widget.TextWidget;
+
import gregtech.api.enums.ConfigCategories;
import gregtech.api.enums.Materials;
import gregtech.api.enums.TAE;
@@ -28,11 +36,6 @@ import gtPlusPlus.core.util.minecraft.MaterialUtils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.ArrayList;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntity_MassFabricator
extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_MassFabricator> implements ISurvivalConstructable {
@@ -91,26 +94,14 @@ public class GregtechMetaTileEntity_MassFabricator
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Matter Fabricator")
- .addInfo("Speed: +0% | EU Usage: 80%")
- .addInfo("Parallel: Scrap = 64 | UU = 8 * Tier")
- .addInfo("Produces UU-A, UU-M & Scrap")
- .addInfo("Change mode with screwdriver")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(5, 4, 5, true)
- .addController("Front Center")
- .addCasingInfo(mCasingName3, 9)
- .addCasingInfo(mCasingName2, 24)
- .addCasingInfo(mCasingName1, 40)
- .addInputBus("Any Casing", 1)
- .addOutputBus("Any Casing", 1)
- .addInputHatch("Any Casing", 1)
- .addOutputHatch("Any Casing", 1)
- .addEnergyHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
- .addMufflerHatch("Any Casing", 1)
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Matter Fabricator")
+ .addInfo("Speed: +0% | EU Usage: 80%").addInfo("Parallel: Scrap = 64 | UU = 8 * Tier")
+ .addInfo("Produces UU-A, UU-M & Scrap").addInfo("Change mode with screwdriver")
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(5, 4, 5, true)
+ .addController("Front Center").addCasingInfo(mCasingName3, 9).addCasingInfo(mCasingName2, 24)
+ .addCasingInfo(mCasingName1, 40).addInputBus("Any Casing", 1).addOutputBus("Any Casing", 1)
+ .addInputHatch("Any Casing", 1).addOutputHatch("Any Casing", 1).addEnergyHatch("Any Casing", 1)
+ .addMaintenanceHatch("Any Casing", 1).addMufflerHatch("Any Casing", 1)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -133,8 +124,8 @@ public class GregtechMetaTileEntity_MassFabricator
@Override
public void onConfigLoad(final GT_Config aConfig) {
super.onConfigLoad(aConfig);
- sDurationMultiplier = aConfig.get(
- ConfigCategories.machineconfig, "Massfabricator.UUM_Duration_Multiplier", sDurationMultiplier);
+ sDurationMultiplier = aConfig
+ .get(ConfigCategories.machineconfig, "Massfabricator.UUM_Duration_Multiplier", sDurationMultiplier);
sUUAperUUM = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUA_per_UUM", sUUAperUUM);
sUUASpeedBonus = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUA_Speed_Bonus", sUUASpeedBonus);
sRequiresUUA = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUA_Requirement", sRequiresUUA);
@@ -175,23 +166,21 @@ public class GregtechMetaTileEntity_MassFabricator
public IStructureDefinition<GregtechMetaTileEntity_MassFabricator> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_MassFabricator>builder()
- .addShape(mName, transpose(new String[][] {
- {"CCCCC", "CCCCC", "CCCCC", "CCCCC", "CCCCC"},
- {"CGGGC", "G---G", "G---G", "G---G", "CGGGC"},
- {"CGGGC", "G---G", "G---G", "G---G", "CGGGC"},
- {"CC~CC", "CHHHC", "CHHHC", "CHHHC", "CCCCC"},
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { "CCCCC", "CCCCC", "CCCCC", "CCCCC", "CCCCC" },
+ { "CGGGC", "G---G", "G---G", "G---G", "CGGGC" },
+ { "CGGGC", "G---G", "G---G", "G---G", "CGGGC" },
+ { "CC~CC", "CHHHC", "CHHHC", "CHHHC", "CCCCC" }, }))
.addElement(
'C',
buildHatchAdder(GregtechMetaTileEntity_MassFabricator.class)
.atLeast(InputBus, OutputBus, InputHatch, OutputHatch, Maintenance, Energy, Muffler)
- .casingIndex(TAE.GTPP_INDEX(9))
- .dot(1)
- .buildAndChain(
+ .casingIndex(TAE.GTPP_INDEX(9)).dot(1).buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasingsMisc, 9))))
.addElement('H', ofBlock(ModBlocks.blockCasingsMisc, 8))
- .addElement('G', ofBlock(ModBlocks.blockCasings3Misc, 15))
- .build();
+ .addElement('G', ofBlock(ModBlocks.blockCasings3Misc, 15)).build();
}
return STRUCTURE_DEFINITION;
}
@@ -243,20 +232,14 @@ public class GregtechMetaTileEntity_MassFabricator
*/
@Override
public GT_Recipe_Map getRecipeMap() {
- return this.mMode == MODE_SCRAP
- ? GT_Recipe_Map.sRecyclerRecipes
+ return this.mMode == MODE_SCRAP ? GT_Recipe_Map.sRecyclerRecipes
: GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes;
// return Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes;
}
@Override
- public boolean checkRecipeGeneric(
- ItemStack[] aItemInputs,
- FluidStack[] aFluidInputs,
- int aMaxParallelRecipes,
- long aEUPercent,
- int aSpeedBonusPercent,
- int aOutputChanceRoll) {
+ public boolean checkRecipeGeneric(ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes,
+ long aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll) {
if (this.mMode == MODE_SCRAP) {
return checkRecipeScrap(
aItemInputs,
@@ -276,13 +259,8 @@ public class GregtechMetaTileEntity_MassFabricator
}
}
- public boolean checkRecipeScrap(
- ItemStack[] aItemInputs,
- FluidStack[] aFluidInputs,
- int aMaxParallelRecipes,
- int aEUPercent,
- int aSpeedBonusPercent,
- int aOutputChanceRoll) {
+ public boolean checkRecipeScrap(ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes,
+ int aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll) {
if (aItemInputs == null || aItemInputs.length <= 0) {
return false;
@@ -294,24 +272,19 @@ public class GregtechMetaTileEntity_MassFabricator
ItemStack aPotentialOutput = GT_ModHandler.getRecyclerOutput(GT_Utility.copyAmount(1, aItemInputs[0]), 0);
GT_Recipe tRecipe = new GTPP_Recipe(
false,
- new ItemStack[] {GT_Utility.copyAmount(1, aItemInputs[0])},
- aPotentialOutput == null ? null : new ItemStack[] {aPotentialOutput},
+ new ItemStack[] { GT_Utility.copyAmount(1, aItemInputs[0]) },
+ aPotentialOutput == null ? null : new ItemStack[] { aPotentialOutput },
null,
- new int[] {2000},
+ new int[] { 2000 },
null,
null,
40,
MaterialUtils.getVoltageForTier(1),
0);
- GT_ParallelHelper helper = new GT_ParallelHelper()
- .setRecipe(tRecipe)
- .setItemInputs(aItemInputs)
- .setFluidInputs(aFluidInputs)
- .setAvailableEUt(tEnergy)
- .setMaxParallel(aMaxParallelRecipes)
- .enableConsumption()
- .enableOutputCalculation();
+ GT_ParallelHelper helper = new GT_ParallelHelper().setRecipe(tRecipe).setItemInputs(aItemInputs)
+ .setFluidInputs(aFluidInputs).setAvailableEUt(tEnergy).setMaxParallel(aMaxParallelRecipes)
+ .enableConsumption().enableOutputCalculation();
if (!mVoidExcess) {
helper.enableVoidProtection(this);
}
@@ -326,13 +299,9 @@ public class GregtechMetaTileEntity_MassFabricator
return false;
}
- GT_OverclockCalculator calculator = new GT_OverclockCalculator()
- .setRecipeEUt(tRecipe.mEUt)
- .setEUt(tEnergy)
- .setDuration(tRecipe.mDuration)
- .setEUtDiscount(aEUPercent / 100.0f)
- .setSpeedBoost(100.0f / (100.0f + aSpeedBonusPercent))
- .setParallel(helper.getCurrentParallel())
+ GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(tRecipe.mEUt).setEUt(tEnergy)
+ .setDuration(tRecipe.mDuration).setEUtDiscount(aEUPercent / 100.0f)
+ .setSpeedBoost(100.0f / (100.0f + aSpeedBonusPercent)).setParallel(helper.getCurrentParallel())
.calculate();
lEUt = -calculator.getConsumption();
mMaxProgresstime = (int) Math.ceil(calculator.getDuration() * helper.getDurationMultiplier());
@@ -345,13 +314,8 @@ public class GregtechMetaTileEntity_MassFabricator
return true;
}
- public boolean checkRecipeUU(
- ItemStack[] aItemInputs,
- FluidStack[] aFluidInputs,
- int aMaxParallelRecipes,
- int aEUPercent,
- int aSpeedBonusPercent,
- int aOutputChanceRoll) {
+ public boolean checkRecipeUU(ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes,
+ int aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll) {
// Based on the Processing Array. A bit overkill, but very flexible.
@@ -380,14 +344,9 @@ public class GregtechMetaTileEntity_MassFabricator
return false;
}
- GT_ParallelHelper helper = new GT_ParallelHelper()
- .setRecipe(tRecipe)
- .setItemInputs(aItemInputs)
- .setFluidInputs(aFluidInputs)
- .setAvailableEUt(tEnergy)
- .setMaxParallel(aMaxParallelRecipes)
- .enableConsumption()
- .enableOutputCalculation();
+ GT_ParallelHelper helper = new GT_ParallelHelper().setRecipe(tRecipe).setItemInputs(aItemInputs)
+ .setFluidInputs(aFluidInputs).setAvailableEUt(tEnergy).setMaxParallel(aMaxParallelRecipes)
+ .enableConsumption().enableOutputCalculation();
if (!mVoidExcess) {
helper.enableVoidProtection(this);
}
@@ -405,15 +364,10 @@ public class GregtechMetaTileEntity_MassFabricator
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
- GT_OverclockCalculator calculator = new GT_OverclockCalculator()
- .setRecipeEUt(tRecipe.mEUt)
- .setEUt(tEnergy)
- .setDuration(tRecipe.mDuration)
- .setEUtDiscount(aEUPercent / 100.0f)
+ GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(tRecipe.mEUt).setEUt(tEnergy)
+ .setDuration(tRecipe.mDuration).setEUtDiscount(aEUPercent / 100.0f)
.setSpeedBoost(100.0f / (100.0f + aSpeedBonusPercent))
- .setParallel(Math.min(aMaxParallelRecipes, helper.getCurrentParallel()))
- .enablePerfectOC()
- .calculate();
+ .setParallel(Math.min(aMaxParallelRecipes, helper.getCurrentParallel())).enablePerfectOC().calculate();
lEUt = -calculator.getConsumption();
mMaxProgresstime = (int) Math.ceil(calculator.getDuration() * helper.getDurationMultiplier());
@@ -510,25 +464,30 @@ public class GregtechMetaTileEntity_MassFabricator
super.drawTexts(screenElements, inventorySlot);
screenElements
- .widget(TextWidget.dynamicString(() -> "Scrap Made: " + mScrapProduced)
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0
- && getBaseMetaTileEntity().isActive()))
- .widget(TextWidget.dynamicString(() -> "Scrap Used: " + mScrapUsed)
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0
- && getBaseMetaTileEntity().isActive()))
- .widget(TextWidget.dynamicString(() -> "UUA Made: " + mAmplifierProduced)
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0
- && getBaseMetaTileEntity().isActive()))
- .widget(TextWidget.dynamicString(() -> "UUA Used: " + mAmplifierUsed)
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0
- && getBaseMetaTileEntity().isActive()))
- .widget(TextWidget.dynamicString(() -> "UUM Made: " + mMatterProduced)
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0
- && getBaseMetaTileEntity().isActive()));
+ .widget(
+ TextWidget.dynamicString(() -> "Scrap Made: " + mScrapProduced)
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(
+ widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0
+ && getBaseMetaTileEntity().isActive()))
+ .widget(
+ TextWidget.dynamicString(() -> "Scrap Used: " + mScrapUsed)
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(
+ widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0
+ && getBaseMetaTileEntity().isActive()))
+ .widget(
+ TextWidget.dynamicString(() -> "UUA Made: " + mAmplifierProduced)
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(
+ widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0
+ && getBaseMetaTileEntity().isActive()))
+ .widget(
+ TextWidget.dynamicString(() -> "UUA Used: " + mAmplifierUsed)
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(
+ widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0
+ && getBaseMetaTileEntity().isActive()))
+ .widget(
+ TextWidget.dynamicString(() -> "UUM Made: " + mMatterProduced)
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(
+ widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0
+ && getBaseMetaTileEntity().isActive()));
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_QuantumForceTransformer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_QuantumForceTransformer.java
index 80edf59fe3..1c76c02b8c 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_QuantumForceTransformer.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_QuantumForceTransformer.java
@@ -5,8 +5,29 @@ import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_OreDictUnificator.getAssociation;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.client.renderer.RenderBlocks;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.IIcon;
+import net.minecraft.util.StatCollector;
+import net.minecraft.world.IBlockAccess;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidStack;
+
+import org.apache.commons.lang3.tuple.Pair;
+import org.lwjgl.opengl.GL11;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.*;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.GregTech_API;
@@ -29,23 +50,6 @@ import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.material.ELEMENT;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import net.minecraft.block.Block;
-import net.minecraft.client.renderer.RenderBlocks;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.StatCollector;
-import net.minecraft.world.IBlockAccess;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-import org.apache.commons.lang3.tuple.Pair;
-import org.lwjgl.opengl.GL11;
public class GregtechMetaTileEntity_QuantumForceTransformer
extends GT_MetaTileEntity_ExtendedPowerMultiBlockBase<GregtechMetaTileEntity_QuantumForceTransformer>
@@ -61,412 +65,149 @@ public class GregtechMetaTileEntity_QuantumForceTransformer
private static final String MAIN_PIECE = "main";
private GT_MetaTileEntity_Hatch_Input mNeptuniumHatch;
private GT_MetaTileEntity_Hatch_Input mFermiumHatch;
- private static final IStructureDefinition<GregtechMetaTileEntity_QuantumForceTransformer> STRUCTURE_DEFINITION =
- StructureDefinition.<GregtechMetaTileEntity_QuantumForceTransformer>builder()
- .addShape(MAIN_PIECE, new String[][] { // A - 142, B - 234, C - 177, D - 96, E - 224, H - 36, M - 21
- {
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " BAB ",
- " BBBBABBBB ",
- " BAAAAAAAB ",
- " BABBABBAB ",
- " BA AB ",
- " A A ",
- " A A ",
- " A A "
- },
- {
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " BAB ",
- " AAABBBAAA ",
- " BAAAAAAAAAB ",
- " B B ",
- " A A ",
- " A A ",
- " ",
- " ",
- " "
- },
- {
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " BAB ",
- " AA AA ",
- " AA AA ",
- " BAA AAB ",
- " B B ",
- " A A ",
- " A A ",
- " ",
- " ",
- " "
- },
- {
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " BAAAB ",
- " AA AA ",
- " AA AA ",
- "BAA AAB",
- "B B",
- "A A",
- "A A",
- "A A",
- "A A",
- "A A"
- },
- {
- " TTT ",
- " EEE ",
- " EEE ",
- " EEE ",
- " DDD ",
- " EEE ",
- " DDD ",
- " EEE ",
- " EEE ",
- " EEE ",
- " DDD ",
- " BAEEEAB ",
- " AA EEE AA ",
- " A EEE A ",
- "BA DDD AB",
- "B EEE B",
- "B DDD B",
- " EEE ",
- " EEE ",
- " EEE ",
- " Z~X "
- },
- {
- " TTTTT ",
- " ECCCE ",
- " ECCCE ",
- " ECCCE ",
- " D D ",
- " ECCCE ",
- " D D ",
- " ECCCE ",
- " ECCCE ",
- " ECCCE ",
- " D D ",
- " BAECCCEAB ",
- " A ECCCE A ",
- " A ECCCE A ",
- "BA D D AB",
- "B ECCCE B",
- "B D D B",
- "B ECCCE B",
- " ECCCE ",
- " ECCCE ",
- " HHHHH "
- },
- {
- " TTTTTTT ",
- " ECCCCCE ",
- " EC CE ",
- " EC CE ",
- " D D ",
- " EC CE ",
- " D D ",
- " EC CE ",
- " EC CE ",
- " EC CE ",
- " D D ",
- " BAEC CEAB ",
- " B EC CE B ",
- "BB EC CE BB",
- "BA D D AB",
- "A EC CE A",
- "A D D A",
- "A EC CE A",
- " EC CE ",
- " EC CE ",
- " HHHHHHH "
- },
- {
- " TTTTTTT ",
- " ECCCCCE ",
- " EC CE ",
- " EC CE ",
- " D D ",
- " EC CE ",
- " D D ",
- " EC CE ",
- " EC CE ",
- " EC CE ",
- " D D ",
- " AAEC CEAA ",
- " A EC CE A ",
- "AB EC CE BA",
- "AA D D AA",
- "A EC CE A",
- "A D D A",
- " EC CE ",
- " EC CE ",
- " EC CE ",
- " HHHHHHH "
- },
- {
- " TTTTTTT ",
- " ECCCCCE ",
- " EC CE ",
- " EC CE ",
- " D D ",
- " EC CE ",
- " D D ",
- " EC CE ",
- " EC CE ",
- " EC CE ",
- " D D ",
- " BAEC CEAB ",
- " B EC CE B ",
- "BB EC CE BB",
- "BA D D AB",
- "A EC CE A",
- "A D D A",
- "A EC CE A",
- " EC CE ",
- " EC CE ",
- " HHHHHHH "
- },
- {
- " TTTTT ",
- " ECCCE ",
- " ECCCE ",
- " ECCCE ",
- " D D ",
- " ECCCE ",
- " D D ",
- " ECCCE ",
- " ECCCE ",
- " ECCCE ",
- " D D ",
- " BAECCCEAB ",
- " A ECCCE A ",
- " A ECCCE A ",
- "BA D D AB",
- "B ECCCE B",
- "B D D B",
- "B ECCCE B",
- " ECCCE ",
- " ECCCE ",
- " HHHHH "
- },
- {
- " TTT ",
- " EEE ",
- " EEE ",
- " EEE ",
- " DDD ",
- " EEE ",
- " DDD ",
- " EEE ",
- " EEE ",
- " EEE ",
- " DDD ",
- " BAEEEAB ",
- " AA EEE AA ",
- " A EEE A ",
- "BA DDD AB",
- "B EEE B",
- "B DDD B",
- " EEE ",
- " EEE ",
- " EEE ",
- " HHH "
- },
- {
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " BAAAB ",
- " AA AA ",
- " AA AA ",
- "BAA AB",
- "B B",
- "A A",
- "A A",
- "A A",
- "A A",
- "A A"
- },
- {
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " BAB ",
- " AA AA ",
- " AA AA ",
- " BA AB ",
- " B B ",
- " A A ",
- " A A ",
- " ",
- " ",
- " "
- },
- {
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " BAB ",
- " AAABBBAAA ",
- " BAAAAAAAAAB ",
- " B B ",
- " A A ",
- " A A ",
- " ",
- " ",
- " "
- },
- {
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " BAB ",
- " BBBBABBBB ",
- " BBBAAABBB ",
- " ABBAAABBA ",
- " A BA AB A ",
- " A A ",
- " A A ",
- " A A "
- },
- })
- .addElement(
- 'A',
- StructureUtility.ofBlocksTiered(
- craftingTierConverter(),
- getAllCraftingTiers(),
- 0,
- GregtechMetaTileEntity_QuantumForceTransformer::setCraftingTier,
- GregtechMetaTileEntity_QuantumForceTransformer::getCraftingTier))
- .addElement(
- 'B',
- StructureUtility.ofBlocksTiered(
- focusingTierConverter(),
- getAllFocusingTiers(),
- 0,
- GregtechMetaTileEntity_QuantumForceTransformer::setFocusingTier,
- GregtechMetaTileEntity_QuantumForceTransformer::getFocusingTier))
- .addElement('C', ofBlock(ModBlocks.blockCasings4Misc, 4))
- .addElement('D', ofBlock(ModBlocks.blockCasings2Misc, 12))
- .addElement('E', lazy(t -> ofBlock(t.getCasingBlock1(), t.getCasingMeta1())))
- .addElement(
- 'H',
- buildHatchAdder(GregtechMetaTileEntity_QuantumForceTransformer.class)
- .atLeast(InputBus, InputHatch, Maintenance, Energy.or(ExoticEnergy))
- .casingIndex(TAE.getIndexFromPage(0, 10))
- .dot(4)
- .buildAndChain(
- onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings2Misc, 12))))
- .addElement(
- 'T',
- buildHatchAdder(GregtechMetaTileEntity_QuantumForceTransformer.class)
- .atLeast(OutputBus, OutputHatch, Maintenance)
- .casingIndex(TAE.getIndexFromPage(0, 10))
- .dot(5)
- .buildAndChain(
- onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings2Misc, 12))))
- .addElement(
- 'Z',
- buildHatchAdder(GregtechMetaTileEntity_QuantumForceTransformer.class)
- .hatchClass(GT_MetaTileEntity_Hatch_Input.class)
- .adder(GregtechMetaTileEntity_QuantumForceTransformer::addNeptuniumHatch)
- .casingIndex(TAE.getIndexFromPage(0, 10))
- .dot(5)
- .buildAndChain(
- onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings2Misc, 12))))
- .addElement(
- 'X',
- buildHatchAdder(GregtechMetaTileEntity_QuantumForceTransformer.class)
- .hatchClass(GT_MetaTileEntity_Hatch_Input.class)
- .adder(GregtechMetaTileEntity_QuantumForceTransformer::addFermiumHatch)
- .casingIndex(TAE.getIndexFromPage(0, 10))
- .dot(5)
- .buildAndChain(
- onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings2Misc, 12))))
- .build();
-
- public GregtechMetaTileEntity_QuantumForceTransformer(
- final int aID, final String aName, final String aNameRegional) {
+ private static final IStructureDefinition<GregtechMetaTileEntity_QuantumForceTransformer> STRUCTURE_DEFINITION = StructureDefinition
+ .<GregtechMetaTileEntity_QuantumForceTransformer>builder().addShape(
+ MAIN_PIECE,
+ new String[][] { // A - 142, B - 234, C - 177, D - 96, E - 224, H - 36, M - 21
+ { " ", " ", " ", " ",
+ " ", " ", " ", " ",
+ " ", " ", " ", " ",
+ " ", " BAB ", " BBBBABBBB ", " BAAAAAAAB ",
+ " BABBABBAB ", " BA AB ", " A A ", " A A ",
+ " A A " },
+ { " ", " ", " ", " ",
+ " ", " ", " ", " ",
+ " ", " ", " ", " ",
+ " BAB ", " AAABBBAAA ", " BAAAAAAAAAB ", " B B ",
+ " A A ", " A A ", " ", " ",
+ " " },
+ { " ", " ", " ", " ",
+ " ", " ", " ", " ",
+ " ", " ", " ", " BAB ",
+ " AA AA ", " AA AA ", " BAA AAB ", " B B ",
+ " A A ", " A A ", " ", " ",
+ " " },
+ { " ", " ", " ", " ",
+ " ", " ", " ", " ",
+ " ", " ", " ", " BAAAB ",
+ " AA AA ", " AA AA ", "BAA AAB", "B B",
+ "A A", "A A", "A A", "A A",
+ "A A" },
+ { " TTT ", " EEE ", " EEE ", " EEE ",
+ " DDD ", " EEE ", " DDD ", " EEE ",
+ " EEE ", " EEE ", " DDD ", " BAEEEAB ",
+ " AA EEE AA ", " A EEE A ", "BA DDD AB", "B EEE B",
+ "B DDD B", " EEE ", " EEE ", " EEE ",
+ " Z~X " },
+ { " TTTTT ", " ECCCE ", " ECCCE ", " ECCCE ",
+ " D D ", " ECCCE ", " D D ", " ECCCE ",
+ " ECCCE ", " ECCCE ", " D D ", " BAECCCEAB ",
+ " A ECCCE A ", " A ECCCE A ", "BA D D AB", "B ECCCE B",
+ "B D D B", "B ECCCE B", " ECCCE ", " ECCCE ",
+ " HHHHH " },
+ { " TTTTTTT ", " ECCCCCE ", " EC CE ", " EC CE ",
+ " D D ", " EC CE ", " D D ", " EC CE ",
+ " EC CE ", " EC CE ", " D D ", " BAEC CEAB ",
+ " B EC CE B ", "BB EC CE BB", "BA D D AB", "A EC CE A",
+ "A D D A", "A EC CE A", " EC CE ", " EC CE ",
+ " HHHHHHH " },
+ { " TTTTTTT ", " ECCCCCE ", " EC CE ", " EC CE ",
+ " D D ", " EC CE ", " D D ", " EC CE ",
+ " EC CE ", " EC CE ", " D D ", " AAEC CEAA ",
+ " A EC CE A ", "AB EC CE BA", "AA D D AA", "A EC CE A",
+ "A D D A", " EC CE ", " EC CE ", " EC CE ",
+ " HHHHHHH " },
+ { " TTTTTTT ", " ECCCCCE ", " EC CE ", " EC CE ",
+ " D D ", " EC CE ", " D D ", " EC CE ",
+ " EC CE ", " EC CE ", " D D ", " BAEC CEAB ",
+ " B EC CE B ", "BB EC CE BB", "BA D D AB", "A EC CE A",
+ "A D D A", "A EC CE A", " EC CE ", " EC CE ",
+ " HHHHHHH " },
+ { " TTTTT ", " ECCCE ", " ECCCE ", " ECCCE ",
+ " D D ", " ECCCE ", " D D ", " ECCCE ",
+ " ECCCE ", " ECCCE ", " D D ", " BAECCCEAB ",
+ " A ECCCE A ", " A ECCCE A ", "BA D D AB", "B ECCCE B",
+ "B D D B", "B ECCCE B", " ECCCE ", " ECCCE ",
+ " HHHHH " },
+ { " TTT ", " EEE ", " EEE ", " EEE ",
+ " DDD ", " EEE ", " DDD ", " EEE ",
+ " EEE ", " EEE ", " DDD ", " BAEEEAB ",
+ " AA EEE AA ", " A EEE A ", "BA DDD AB", "B EEE B",
+ "B DDD B", " EEE ", " EEE ", " EEE ",
+ " HHH " },
+ { " ", " ", " ", " ",
+ " ", " ", " ", " ",
+ " ", " ", " ", " BAAAB ",
+ " AA AA ", " AA AA ", "BAA AB", "B B",
+ "A A", "A A", "A A", "A A",
+ "A A" },
+ { " ", " ", " ", " ",
+ " ", " ", " ", " ",
+ " ", " ", " ", " BAB ",
+ " AA AA ", " AA AA ", " BA AB ", " B B ",
+ " A A ", " A A ", " ", " ",
+ " " },
+ { " ", " ", " ", " ",
+ " ", " ", " ", " ",
+ " ", " ", " ", " ",
+ " BAB ", " AAABBBAAA ", " BAAAAAAAAAB ", " B B ",
+ " A A ", " A A ", " ", " ",
+ " " },
+ { " ", " ", " ", " ",
+ " ", " ", " ", " ",
+ " ", " ", " ", " ",
+ " ", " BAB ", " BBBBABBBB ", " BBBAAABBB ",
+ " ABBAAABBA ", " A BA AB A ", " A A ", " A A ",
+ " A A " }, })
+ .addElement(
+ 'A',
+ StructureUtility.ofBlocksTiered(
+ craftingTierConverter(),
+ getAllCraftingTiers(),
+ 0,
+ GregtechMetaTileEntity_QuantumForceTransformer::setCraftingTier,
+ GregtechMetaTileEntity_QuantumForceTransformer::getCraftingTier))
+ .addElement(
+ 'B',
+ StructureUtility.ofBlocksTiered(
+ focusingTierConverter(),
+ getAllFocusingTiers(),
+ 0,
+ GregtechMetaTileEntity_QuantumForceTransformer::setFocusingTier,
+ GregtechMetaTileEntity_QuantumForceTransformer::getFocusingTier))
+ .addElement('C', ofBlock(ModBlocks.blockCasings4Misc, 4))
+ .addElement('D', ofBlock(ModBlocks.blockCasings2Misc, 12))
+ .addElement('E', lazy(t -> ofBlock(t.getCasingBlock1(), t.getCasingMeta1())))
+ .addElement(
+ 'H',
+ buildHatchAdder(GregtechMetaTileEntity_QuantumForceTransformer.class)
+ .atLeast(InputBus, InputHatch, Maintenance, Energy.or(ExoticEnergy))
+ .casingIndex(TAE.getIndexFromPage(0, 10)).dot(4)
+ .buildAndChain(onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings2Misc, 12))))
+ .addElement(
+ 'T',
+ buildHatchAdder(GregtechMetaTileEntity_QuantumForceTransformer.class)
+ .atLeast(OutputBus, OutputHatch, Maintenance).casingIndex(TAE.getIndexFromPage(0, 10))
+ .dot(5)
+ .buildAndChain(onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings2Misc, 12))))
+ .addElement(
+ 'Z',
+ buildHatchAdder(GregtechMetaTileEntity_QuantumForceTransformer.class)
+ .hatchClass(GT_MetaTileEntity_Hatch_Input.class)
+ .adder(GregtechMetaTileEntity_QuantumForceTransformer::addNeptuniumHatch)
+ .casingIndex(TAE.getIndexFromPage(0, 10)).dot(5)
+ .buildAndChain(onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings2Misc, 12))))
+ .addElement(
+ 'X',
+ buildHatchAdder(GregtechMetaTileEntity_QuantumForceTransformer.class)
+ .hatchClass(GT_MetaTileEntity_Hatch_Input.class)
+ .adder(GregtechMetaTileEntity_QuantumForceTransformer::addFermiumHatch)
+ .casingIndex(TAE.getIndexFromPage(0, 10)).dot(5)
+ .buildAndChain(onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings2Misc, 12))))
+ .build();
+
+ public GregtechMetaTileEntity_QuantumForceTransformer(final int aID, final String aName,
+ final String aNameRegional) {
super(aID, aName, aNameRegional);
}
@@ -482,8 +223,7 @@ public class GregtechMetaTileEntity_QuantumForceTransformer
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Quantum Force Transformer")
- .addInfo("Controller Block for the Quantum Force Transformer")
+ tt.addMachineType("Quantum Force Transformer").addInfo("Controller Block for the Quantum Force Transformer")
.addInfo("Allows Complex chemical lines to be performed instantly in one step")
.addInfo("Every recipe requires a catalyst, each catalyst adds 1 parallel and lasts forever")
.addInfo("Accepts TecTech Energy and Laser Hatches")
@@ -497,25 +237,19 @@ public class GregtechMetaTileEntity_QuantumForceTransformer
.addInfo("Casing functions:")
.addInfo("Pulse Manipulators: Recipe Tier Allowed (check NEI for the tier of each recipe)")
.addInfo("Shielding Cores: Focusing Tier (equal to or higher than recipe tier to allow focus)")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(15, 21, 15, true)
- .addController("Bottom Center")
- .addCasingInfo("Bulk Production Frame", 80)
- .addCasingInfo("Quantum Force Conductor", 177)
- .addCasingInfo("Particle Containment Casing", 224)
- .addCasingInfo("Neutron Pulse Manipulators", 233)
- .addCasingInfo("Neutron Shielding Cores", 142)
- .addInputBus("Bottom Layer", 4)
- .addInputHatch("Bottom Layer", 4)
- .addOutputHatch("Top Layer", 5)
- .addOutputBus("Top Layer", 5)
- .addEnergyHatch("Bottom Layer", 4)
- .addMaintenanceHatch("Bottom Layer", 4)
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(15, 21, 15, true)
+ .addController("Bottom Center").addCasingInfo("Bulk Production Frame", 80)
+ .addCasingInfo("Quantum Force Conductor", 177).addCasingInfo("Particle Containment Casing", 224)
+ .addCasingInfo("Neutron Pulse Manipulators", 233).addCasingInfo("Neutron Shielding Cores", 142)
+ .addInputBus("Bottom Layer", 4).addInputHatch("Bottom Layer", 4).addOutputHatch("Top Layer", 5)
+ .addOutputBus("Top Layer", 5).addEnergyHatch("Bottom Layer", 4).addMaintenanceHatch("Bottom Layer", 4)
.addStructureInfo("Neptunium Plasma Hatch: Left side of Controller")
- .addStructureInfo("Fermium Plasma Hatch: Right side of Controller")
- .toolTipFinisher(GT_Values.AuthorBlueWeabo + EnumChatFormatting.RESET + EnumChatFormatting.GREEN
- + " + Steelux" + EnumChatFormatting.RESET + " - [GT++]");
+ .addStructureInfo("Fermium Plasma Hatch: Right side of Controller").toolTipFinisher(
+ GT_Values.AuthorBlueWeabo + EnumChatFormatting.RESET
+ + EnumChatFormatting.GREEN
+ + " + Steelux"
+ + EnumChatFormatting.RESET
+ + " - [GT++]");
return tt;
}
@@ -531,8 +265,7 @@ public class GregtechMetaTileEntity_QuantumForceTransformer
return false;
}
- if (mMaintenanceHatches.size() != 1
- || mOutputBusses.size() < 1
+ if (mMaintenanceHatches.size() != 1 || mOutputBusses.size() < 1
|| mInputBusses.size() < 1
|| mInputHatches.size() < 1
|| mOutputHatches.size() < 1) {
@@ -575,6 +308,7 @@ public class GregtechMetaTileEntity_QuantumForceTransformer
public static List<Pair<Block, Integer>> getAllCraftingTiers() {
return new ArrayList<Pair<Block, Integer>>() {
+
{
add(Pair.of(ModBlocks.blockCasings5Misc, 7));
add(Pair.of(ModBlocks.blockCasings5Misc, 8));
@@ -586,6 +320,7 @@ public class GregtechMetaTileEntity_QuantumForceTransformer
public static List<Pair<Block, Integer>> getAllFocusingTiers() {
return new ArrayList<Pair<Block, Integer>>() {
+
{
add(Pair.of(ModBlocks.blockCasings5Misc, 11));
add(Pair.of(ModBlocks.blockCasings5Misc, 12));
@@ -713,11 +448,15 @@ public class GregtechMetaTileEntity_QuantumForceTransformer
return false;
}
- private boolean processRecipe(
- ItemStack[] aItemInputs, FluidStack[] aFluidInputs, GT_Recipe.GT_Recipe_Map aRecipeMap, ItemStack aStack) {
+ private boolean processRecipe(ItemStack[] aItemInputs, FluidStack[] aFluidInputs,
+ GT_Recipe.GT_Recipe_Map aRecipeMap, ItemStack aStack) {
byte tTier = (byte) Math.max(1, GT_Utility.getTier(getAverageInputVoltage()));
GT_Recipe tRecipe = aRecipeMap.findRecipe(
- getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs);
+ getBaseMetaTileEntity(),
+ false,
+ gregtech.api.enums.GT_Values.V[tTier],
+ aFluidInputs,
+ aItemInputs);
if (tRecipe != null && tRecipe.mSpecialValue <= getCraftingTier()) {
ItemStack aRecipeCatalyst = null;
@@ -755,13 +494,9 @@ public class GregtechMetaTileEntity_QuantumForceTransformer
doFermium = false;
}
- GT_ParallelHelper helper = new GT_ParallelHelper()
- .setRecipe(tRecipe)
- .setItemInputs(aItemInputs)
- .setFluidInputs(aFluidInputs)
- .setAvailableEUt(getMaxInputAmps() * getAverageInputVoltage())
- .setMaxParallel(mCurrentMaxParallel)
- .enableConsumption();
+ GT_ParallelHelper helper = new GT_ParallelHelper().setRecipe(tRecipe).setItemInputs(aItemInputs)
+ .setFluidInputs(aFluidInputs).setAvailableEUt(getMaxInputAmps() * getAverageInputVoltage())
+ .setMaxParallel(mCurrentMaxParallel).enableConsumption();
if (mBatchMode) {
helper.enableBatchMode(128);
@@ -773,13 +508,9 @@ public class GregtechMetaTileEntity_QuantumForceTransformer
return false;
}
- GT_OverclockCalculator calculator = new GT_OverclockCalculator()
- .setRecipeEUt(tRecipe.mEUt)
- .setEUt(getAverageInputVoltage())
- .setAmperage(getMaxInputAmps())
- .setDuration(tRecipe.mDuration)
- .setParallel(Math.min(mMaxParallel, helper.getCurrentParallel()))
- .calculate();
+ GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(tRecipe.mEUt)
+ .setEUt(getAverageInputVoltage()).setAmperage(getMaxInputAmps()).setDuration(tRecipe.mDuration)
+ .setParallel(Math.min(mMaxParallel, helper.getCurrentParallel())).calculate();
lEUt = -calculator.getConsumption();
mMaxProgresstime = (int) Math.ceil(calculator.getDuration() * helper.getDurationMultiplier());
@@ -793,8 +524,7 @@ public class GregtechMetaTileEntity_QuantumForceTransformer
}
int[] tChances;
- if (aStack == null
- || aStack.getItemDamage() == 0
+ if (aStack == null || aStack.getItemDamage() == 0
|| mNeptuniumHatch.getFluid() == null
|| !mNeptuniumHatch.getFluid().isFluidEqual(new FluidStack(mNeptunium, 1))
|| tRecipe.mSpecialValue > getFocusingTier()) {
@@ -828,8 +558,8 @@ public class GregtechMetaTileEntity_QuantumForceTransformer
}
} else {
ItemStack aItem = tRecipe.getOutput(i);
- tItemOutputs.add(
- GT_Utility.copyAmountUnsafe(aItem.stackSize * mCurrentParallel, aItem));
+ tItemOutputs
+ .add(GT_Utility.copyAmountUnsafe(aItem.stackSize * mCurrentParallel, aItem));
}
} else {
FluidStack aFluid = tRecipe.getFluidOutput(i - tRecipe.mOutputs.length);
@@ -845,8 +575,7 @@ public class GregtechMetaTileEntity_QuantumForceTransformer
aItem.stackSize *= mCurrentParallel;
tItemOutputs.add(aItem);
} else {
- FluidStack aFluid = tRecipe.getFluidOutput(i - tRecipe.mOutputs.length)
- .copy();
+ FluidStack aFluid = tRecipe.getFluidOutput(i - tRecipe.mOutputs.length).copy();
aFluid.amount *= mCurrentParallel;
tFluidOutputs.add(aFluid);
}
@@ -875,8 +604,9 @@ public class GregtechMetaTileEntity_QuantumForceTransformer
if (runningTick % 20 == 0) {
if (doFermium) {
- FluidStack tFluid =
- new FluidStack(mFermium, (int) (getFocusingTier() * 4 * Math.sqrt(mCurrentParallel)));
+ FluidStack tFluid = new FluidStack(
+ mFermium,
+ (int) (getFocusingTier() * 4 * Math.sqrt(mCurrentParallel)));
FluidStack tLiquid = mFermiumHatch.drain(tFluid.amount, true);
if (tLiquid == null || tLiquid.amount < tFluid.amount) {
doFermium = false;
@@ -886,8 +616,9 @@ public class GregtechMetaTileEntity_QuantumForceTransformer
}
if (doNeptunium) {
- FluidStack tFluid =
- new FluidStack(mNeptunium, (int) (getFocusingTier() * 4 * Math.sqrt(mCurrentParallel)));
+ FluidStack tFluid = new FluidStack(
+ mNeptunium,
+ (int) (getFocusingTier() * 4 * Math.sqrt(mCurrentParallel)));
FluidStack tLiquid = mNeptuniumHatch.drain(tFluid.amount, true);
if (tLiquid == null || tLiquid.amount < tFluid.amount) {
doNeptunium = false;
@@ -995,8 +726,8 @@ public class GregtechMetaTileEntity_QuantumForceTransformer
}
@Override
- public boolean onWireCutterRightClick(
- byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ public boolean onWireCutterRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY,
+ float aZ) {
if (aPlayer.isSneaking()) {
mBatchMode = !mBatchMode;
if (mBatchMode) {
@@ -1008,7 +739,8 @@ public class GregtechMetaTileEntity_QuantumForceTransformer
}
mSeparateInputBusses = !mSeparateInputBusses;
GT_Utility.sendChatToPlayer(
- aPlayer, StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + mSeparateInputBusses);
+ aPlayer,
+ StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + mSeparateInputBusses);
return true;
}
@@ -1016,7 +748,8 @@ public class GregtechMetaTileEntity_QuantumForceTransformer
public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
mFluidMode = !mFluidMode;
GT_Utility.sendChatToPlayer(
- aPlayer, StatCollector.translateToLocal("miscutils.machines.QFTFluidMode") + " " + mFluidMode);
+ aPlayer,
+ StatCollector.translateToLocal("miscutils.machines.QFTFluidMode") + " " + mFluidMode);
}
public boolean addNeptuniumHatch(IGregTechTileEntity aTileEntity, short aBaseCasingIndex) {
@@ -1074,31 +807,15 @@ public class GregtechMetaTileEntity_QuantumForceTransformer
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive)
- return new ITexture[] {
- getCasingTexture(),
- TextureFactory.builder()
- .addIcon(getActiveOverlay())
- .extFacing()
- .build()
- };
- return new ITexture[] {
- getCasingTexture(),
- TextureFactory.builder()
- .addIcon(getInactiveOverlay())
- .extFacing()
- .build()
- };
+ if (aActive) return new ITexture[] { getCasingTexture(),
+ TextureFactory.builder().addIcon(getActiveOverlay()).extFacing().build() };
+ return new ITexture[] { getCasingTexture(),
+ TextureFactory.builder().addIcon(getInactiveOverlay()).extFacing().build() };
}
- return new ITexture[] {getCasingTexture()};
+ return new ITexture[] { getCasingTexture() };
}
private ITexture getCasingTexture() {
@@ -1106,8 +823,8 @@ public class GregtechMetaTileEntity_QuantumForceTransformer
}
@SideOnly(Side.CLIENT)
- private void renderForceField(
- double x, double y, double z, int side, double minU, double maxU, double minV, double maxV) {
+ private void renderForceField(double x, double y, double z, int side, double minU, double maxU, double minV,
+ double maxV) {
// spotless:off
Tessellator tes = Tessellator.instance;
switch (side) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java
index b557272c82..6d359f43cc 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java
@@ -8,10 +8,13 @@ import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
import static gregtech.api.util.GT_StructureUtility.filterByMTETier;
+import net.minecraft.item.ItemStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.enums.TAE;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.IIconContainer;
@@ -25,7 +28,6 @@ import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
-import net.minecraft.item.ItemStack;
public class GregtechMetaTileEntity_Refinery extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_Refinery>
implements ISurvivalConstructable {
@@ -49,22 +51,13 @@ public class GregtechMetaTileEntity_Refinery extends GregtechMeta_MultiBlockBase
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Fission Fuel Processing Unit")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(3, 9, 3, false)
- .addController("Bottom Center")
- .addCasingInfo("Hastelloy-X Structural Casing", 7)
- .addCasingInfo("Incoloy-DS Fluid Containment Block", 5)
- .addCasingInfo("Zeron-100 Reactor Shielding", 4)
- .addCasingInfo("Hastelloy-N Sealant Blocks", 17)
- .addInputHatch("Base platform", 1)
- .addOutputHatch("Base platform", 1)
- .addOutputBus("Base platform", 1)
- .addMufflerHatch("Base platform", 1)
- .addMaintenanceHatch("Base platform", 1)
- .addEnergyHatch("Base platform", 1)
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Fission Fuel Processing Unit")
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 9, 3, false)
+ .addController("Bottom Center").addCasingInfo("Hastelloy-X Structural Casing", 7)
+ .addCasingInfo("Incoloy-DS Fluid Containment Block", 5).addCasingInfo("Zeron-100 Reactor Shielding", 4)
+ .addCasingInfo("Hastelloy-N Sealant Blocks", 17).addInputHatch("Base platform", 1)
+ .addOutputHatch("Base platform", 1).addOutputBus("Base platform", 1).addMufflerHatch("Base platform", 1)
+ .addMaintenanceHatch("Base platform", 1).addEnergyHatch("Base platform", 1)
.addStructureInfo("Muffler's Tier must be IV+")
.addStructureInfo("4x Input Hatches, 2x Output Hatches, 1x Output Bus")
.addStructureInfo("1x Muffler, 1x Maintenance Hatch, 1x Energy Hatch")
@@ -130,37 +123,26 @@ public class GregtechMetaTileEntity_Refinery extends GregtechMeta_MultiBlockBase
@Override
public IStructureDefinition<GregtechMetaTileEntity_Refinery> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
- STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_Refinery>builder()
- .addShape(mName, transpose(new String[][] {
- {" ", " N ", " "},
- {" N ", "NIN", " N "},
- {" N ", "NIN", " N "},
- {" N ", "NIN", " N "},
- {" Z ", "ZIZ", " Z "},
- {" N ", "NIN", " N "},
- {"XXX", "XXX", "XXX"},
- {"X~X", "XXX", "XXX"},
- }))
+ STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_Refinery>builder().addShape(
+ mName,
+ transpose(
+ new String[][] { { " ", " N ", " " }, { " N ", "NIN", " N " }, { " N ", "NIN", " N " },
+ { " N ", "NIN", " N " }, { " Z ", "ZIZ", " Z " }, { " N ", "NIN", " N " },
+ { "XXX", "XXX", "XXX" }, { "X~X", "XXX", "XXX" }, }))
.addElement(
'X',
ofChain(
buildHatchAdder(GregtechMetaTileEntity_Refinery.class)
.atLeast(Energy, Maintenance, OutputHatch, OutputBus, InputHatch)
- .casingIndex(TAE.GTPP_INDEX(18))
- .dot(1)
- .build(),
- buildHatchAdder(GregtechMetaTileEntity_Refinery.class)
- .atLeast(Muffler)
+ .casingIndex(TAE.GTPP_INDEX(18)).dot(1).build(),
+ buildHatchAdder(GregtechMetaTileEntity_Refinery.class).atLeast(Muffler)
.adder(GregtechMetaTileEntity_Refinery::addMufflerToMachineList)
.hatchItemFilterAnd(t -> filterByMTETier(6, Integer.MAX_VALUE))
- .casingIndex(TAE.GTPP_INDEX(18))
- .dot(1)
- .build(),
+ .casingIndex(TAE.GTPP_INDEX(18)).dot(1).build(),
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings2Misc, 2))))
.addElement('I', ofBlock(ModBlocks.blockCasings2Misc, 3))
.addElement('N', ofBlock(ModBlocks.blockCasings2Misc, 1))
- .addElement('Z', ofBlock(ModBlocks.blockCasingsMisc, 13))
- .build();
+ .addElement('Z', ofBlock(ModBlocks.blockCasingsMisc, 13)).build();
}
return STRUCTURE_DEFINITION;
}
@@ -180,8 +162,7 @@ public class GregtechMetaTileEntity_Refinery extends GregtechMeta_MultiBlockBase
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
mCasing = 0;
if (checkPiece(mName, 1, 7, 0) && mCasing >= 7) {
- if (this.mInputHatches.size() == 4
- && this.mOutputHatches.size() == 2
+ if (this.mInputHatches.size() == 4 && this.mOutputHatches.size() == 2
&& this.mOutputBusses.size() == 1
&& this.mMufflerHatches.size() == 1
&& this.mMaintenanceHatches.size() == 1
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_SolarTower.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_SolarTower.java
index 6dedfd0e5d..d09eaf86b0 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_SolarTower.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_SolarTower.java
@@ -8,10 +8,21 @@ import static gregtech.api.enums.GT_HatchElement.Maintenance;
import static gregtech.api.enums.GT_HatchElement.OutputHatch;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import java.util.ArrayList;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.TAE;
import gregtech.api.enums.Textures;
@@ -29,14 +40,6 @@ import gtPlusPlus.core.util.minecraft.FluidUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.tileentities.misc.TileEntitySolarHeater;
-import java.util.ArrayList;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntity_SolarTower extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_SolarTower>
implements ISurvivalConstructable {
@@ -72,8 +75,7 @@ public class GregtechMetaTileEntity_SolarTower extends GregtechMeta_MultiBlockBa
@Override
protected final GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Contributing Green Energy towards the future")
+ tt.addMachineType(getMachineType()).addInfo("Contributing Green Energy towards the future")
.addInfo("Surround with rings of Solar Reflectors")
.addInfo("The Reflectors increase the internal heat value of the Tower (see below for formula)")
.addInfo("Each Reflector ring increases tier, the first ring is required for the Tower to work")
@@ -89,18 +91,12 @@ public class GregtechMetaTileEntity_SolarTower extends GregtechMeta_MultiBlockBa
.addInfo("Heat gain per cycle: numberHeaters * heatEfficiency * (10 + bonus)")
.addInfo("Bonus: 1 ring = +1, 2 rings = +2, 3 rings = +4, 4 rings = +8, 5 rings = +16")
.addInfo("Total number of reflectors based on how many rings are built:")
- .addInfo("1 ring = 36, 2 rings = 88, 3 rings = 156, 4 rings = 240, 5 rings = 340")
- .addSeparator()
- .beginVariableStructureBlock(15, 31, 28, 28, 15, 31, false)
- .addController("Top Middle")
- .addCasingInfo("Structural Solar Casing", 229)
- .addCasingInfo("Thermally Insulated Casing", 60)
- .addCasingInfo("Salt Containment Casing", 66)
- .addCasingInfo("Thermal Containment Casing", 60)
- .addInputHatch("Any 2 dot hint(min 1)", 2)
- .addOutputHatch("Any 2 dot hint(min 1)", 2)
- .addMaintenanceHatch("Any 2 dot hint", 2)
- .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ .addInfo("1 ring = 36, 2 rings = 88, 3 rings = 156, 4 rings = 240, 5 rings = 340").addSeparator()
+ .beginVariableStructureBlock(15, 31, 28, 28, 15, 31, false).addController("Top Middle")
+ .addCasingInfo("Structural Solar Casing", 229).addCasingInfo("Thermally Insulated Casing", 60)
+ .addCasingInfo("Salt Containment Casing", 66).addCasingInfo("Thermal Containment Casing", 60)
+ .addInputHatch("Any 2 dot hint(min 1)", 2).addOutputHatch("Any 2 dot hint(min 1)", 2)
+ .addMaintenanceHatch("Any 2 dot hint", 2).toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -108,300 +104,164 @@ public class GregtechMetaTileEntity_SolarTower extends GregtechMeta_MultiBlockBa
private static final String STRUCTURE_PIECE_TOWER = "tower";
private static final String STRUCTURE_PIECE_TOP = "top";
- private static final String[] STRUCTURE_PIECE_SOLAR_HEATER_RING = {"ring1", "ring2", "ring3", "ring4", "ring5"};
+ private static final String[] STRUCTURE_PIECE_SOLAR_HEATER_RING = { "ring1", "ring2", "ring3", "ring4", "ring5" };
private static final String SOLAR_HEATER_RING_1 = STRUCTURE_PIECE_SOLAR_HEATER_RING[0];
private static final String SOLAR_HEATER_RING_2 = STRUCTURE_PIECE_SOLAR_HEATER_RING[1];
private static final String SOLAR_HEATER_RING_3 = STRUCTURE_PIECE_SOLAR_HEATER_RING[2];
private static final String SOLAR_HEATER_RING_4 = STRUCTURE_PIECE_SOLAR_HEATER_RING[3];
private static final String SOLAR_HEATER_RING_5 = STRUCTURE_PIECE_SOLAR_HEATER_RING[4];
- private static final ClassValue<IStructureDefinition<GregtechMetaTileEntity_SolarTower>> STRUCTURE_DEFINITION =
- new ClassValue<IStructureDefinition<GregtechMetaTileEntity_SolarTower>>() {
- @Override
- protected IStructureDefinition<GregtechMetaTileEntity_SolarTower> computeValue(Class<?> type) {
- return StructureDefinition.<GregtechMetaTileEntity_SolarTower>builder()
-
- // s = salt
- // c = thermal containment
- // i = thermal insulated
- // t = solar structural
- // h = hatch
- // g = solar heater
-
- .addShape(STRUCTURE_PIECE_TOP, (new String[][] {
- {" ", " ", " ~ ", " ", " "},
- {" ", " s ", " sss ", " s ", " "},
- {" c ", " ccc ", "ccscc", " ccc ", " c "},
- {" c ", " ccc ", "ccscc", " ccc ", " c "},
- {" c ", " ccc ", "ccscc", " ccc ", " c "},
- {" c ", " ccc ", "ccscc", " ccc ", " c "},
- {" c ", " ccc ", "ccscc", " ccc ", " c "},
- }))
- .addShape(STRUCTURE_PIECE_TOWER, (new String[][] {
- {" i ", "isi", " i "},
- {" i ", "isi", " i "},
- {" i ", "isi", " i "},
- {" i ", "isi", " i "},
- {" i ", "isi", " i "},
- {" i ", "isi", " i "},
- {" i ", "isi", " i "},
- {" i ", "isi", " i "},
- {" i ", "isi", " i "},
- {" i ", "isi", " i "},
- {" i ", "isi", " i "},
- {" i ", "isi", " i "},
- {" i ", "isi", " i "},
- {" i ", "isi", " i "},
- {" i ", "isi", " i "},
- }))
- .addShape(STRUCTURE_PIECE_BASE, (new String[][] {
- {
- " ",
- " ",
- " t ",
- " ttt ",
- " ttstt ",
- " ttssstt ",
- " ttstt ",
- " ttt ",
- " t ",
- " ",
- " "
- },
- {
- " ",
- " ",
- " t ",
- " ttt ",
- " tssst ",
- " ttssstt ",
- " tssst ",
- " ttt ",
- " t ",
- " ",
- " "
- },
- {
- " ",
- " t ",
- " ttt ",
- " ttttt ",
- " ttssstt ",
- " tttsssttt ",
- " ttssstt ",
- " ttttt ",
- " ttt ",
- " t ",
- " "
- },
- {
- " ",
- " t ",
- " ttt ",
- " ttttt ",
- " ttssstt ",
- " tttsssttt ",
- " ttssstt ",
- " ttttt ",
- " ttt ",
- " t ",
- " "
- },
- {
- " hhh ",
- " ttttt ",
- " ttttttt ",
- " ttttttttt ",
- "htttsssttth",
- "htttsssttth",
- "htttsssttth",
- " ttttttttt ",
- " ttttttt ",
- " ttttt ",
- " hhh "
- },
- {
- " hhh ",
- " ttttt ",
- " ttttttt ",
- " ttttttttt ",
- "httttttttth",
- "httttttttth",
- "httttttttth",
- " ttttttttt ",
- " ttttttt ",
- " ttttt ",
- " hhh "
- },
- }))
- .addShape(SOLAR_HEATER_RING_1, (new String[][] {
- {
- " ggggg ",
- " g g ",
- " g g ",
- " g g ",
- " g g ",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- " g g ",
- " g g ",
- " g g ",
- " g g ",
- " ggggg ",
- }
- }))
- .addShape(SOLAR_HEATER_RING_2, (new String[][] {
- {
- " ggggggggg ",
- " g g ",
- " g g ",
- " g g ",
- " g g ",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- " g g ",
- " g g ",
- " g g ",
- " g g ",
- " ggggggggg ",
- }
- }))
- .addShape(SOLAR_HEATER_RING_3, (new String[][] {
- {
- " ggggggggggggg ",
- " g g ",
- " g g ",
- " g g ",
- " g g ",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- " g g ",
- " g g ",
- " g g ",
- " g g ",
- " ggggggggggggg ",
- }
- }))
- .addShape(SOLAR_HEATER_RING_4, (new String[][] {
- {
- " ggggggggggggggggg ",
- " g g ",
- " g g ",
- " g g ",
- " g g ",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- " g g ",
- " g g ",
- " g g ",
- " g g ",
- " ggggggggggggggggg ",
- }
- }))
- .addShape(SOLAR_HEATER_RING_5, (new String[][] {
- {
- " ggggggggggggggggggggg ",
- " g g ",
- " g g ",
- " g g ",
- " g g ",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- "g g",
- " g g ",
- " g g ",
- " g g ",
- " g g ",
- " ggggggggggggggggggggg ",
- }
- }))
- .addElement('g', lazy(t -> buildHatchAdder(GregtechMetaTileEntity_SolarTower.class)
- .hatchClass(TileEntitySolarHeater.class)
- .adder(GregtechMetaTileEntity_SolarTower::addSolarHeater)
- // Use a positive casing index to make adder builder happy
- .casingIndex(1)
- .dot(1)
- .continueIfSuccess()
- .build()))
- .addElement(
- 't',
- lazy(t -> onElementPass(
- x -> ++x.mCasing1, ofBlock(t.getCasingBlock(), t.getCasingMeta()))))
- .addElement(
- 'i',
- lazy(t -> onElementPass(
- x -> ++x.mCasing2, ofBlock(t.getCasingBlock(), t.getCasingMeta2()))))
- .addElement(
- 's',
- lazy(t -> onElementPass(
- x -> ++x.mCasing3, ofBlock(t.getCasingBlock(), t.getCasingMeta3()))))
- .addElement(
- 'c',
- lazy(t -> onElementPass(
- x -> ++x.mCasing4, ofBlock(t.getCasingBlock2(), t.getCasingMeta4()))))
- .addElement('h', lazy(t -> buildHatchAdder(GregtechMetaTileEntity_SolarTower.class)
- .atLeast(InputHatch, OutputHatch, Maintenance)
- .casingIndex(t.getCasingTextureIndex())
- .dot(2)
- .buildAndChain(onElementPass(
- x -> ++x.mCasing1, ofBlock(t.getCasingBlock(), t.getCasingMeta())))))
- .build();
- }
- };
+ private static final ClassValue<IStructureDefinition<GregtechMetaTileEntity_SolarTower>> STRUCTURE_DEFINITION = new ClassValue<IStructureDefinition<GregtechMetaTileEntity_SolarTower>>() {
+
+ @Override
+ protected IStructureDefinition<GregtechMetaTileEntity_SolarTower> computeValue(Class<?> type) {
+ return StructureDefinition.<GregtechMetaTileEntity_SolarTower>builder()
+
+ // s = salt
+ // c = thermal containment
+ // i = thermal insulated
+ // t = solar structural
+ // h = hatch
+ // g = solar heater
+
+ .addShape(
+ STRUCTURE_PIECE_TOP,
+ (new String[][] { { " ", " ", " ~ ", " ", " " },
+ { " ", " s ", " sss ", " s ", " " },
+ { " c ", " ccc ", "ccscc", " ccc ", " c " },
+ { " c ", " ccc ", "ccscc", " ccc ", " c " },
+ { " c ", " ccc ", "ccscc", " ccc ", " c " },
+ { " c ", " ccc ", "ccscc", " ccc ", " c " },
+ { " c ", " ccc ", "ccscc", " ccc ", " c " }, }))
+ .addShape(
+ STRUCTURE_PIECE_TOWER,
+ (new String[][] { { " i ", "isi", " i " }, { " i ", "isi", " i " }, { " i ", "isi", " i " },
+ { " i ", "isi", " i " }, { " i ", "isi", " i " }, { " i ", "isi", " i " },
+ { " i ", "isi", " i " }, { " i ", "isi", " i " }, { " i ", "isi", " i " },
+ { " i ", "isi", " i " }, { " i ", "isi", " i " }, { " i ", "isi", " i " },
+ { " i ", "isi", " i " }, { " i ", "isi", " i " }, { " i ", "isi", " i " }, }))
+ .addShape(
+ STRUCTURE_PIECE_BASE,
+ (new String[][] {
+ { " ", " ", " t ", " ttt ", " ttstt ",
+ " ttssstt ", " ttstt ", " ttt ", " t ", " ",
+ " " },
+ { " ", " ", " t ", " ttt ", " tssst ",
+ " ttssstt ", " tssst ", " ttt ", " t ", " ",
+ " " },
+ { " ", " t ", " ttt ", " ttttt ", " ttssstt ",
+ " tttsssttt ", " ttssstt ", " ttttt ", " ttt ", " t ",
+ " " },
+ { " ", " t ", " ttt ", " ttttt ", " ttssstt ",
+ " tttsssttt ", " ttssstt ", " ttttt ", " ttt ", " t ",
+ " " },
+ { " hhh ", " ttttt ", " ttttttt ", " ttttttttt ", "htttsssttth",
+ "htttsssttth", "htttsssttth", " ttttttttt ", " ttttttt ", " ttttt ",
+ " hhh " },
+ { " hhh ", " ttttt ", " ttttttt ", " ttttttttt ", "httttttttth",
+ "httttttttth", "httttttttth", " ttttttttt ", " ttttttt ", " ttttt ",
+ " hhh " }, }))
+ .addShape(
+ SOLAR_HEATER_RING_1,
+ (new String[][] { { " ggggg ", " g g ", " g g ",
+ " g g ", " g g ", "g g", "g g",
+ "g g", "g g", "g g", " g g ",
+ " g g ", " g g ", " g g ", " ggggg ", } }))
+ .addShape(
+ SOLAR_HEATER_RING_2,
+ (new String[][] { { " ggggggggg ", " g g ", " g g ",
+ " g g ", " g g ", "g g",
+ "g g", "g g", "g g",
+ "g g", "g g", "g g",
+ "g g", "g g", " g g ",
+ " g g ", " g g ", " g g ",
+ " ggggggggg ", } }))
+ .addShape(
+ SOLAR_HEATER_RING_3,
+ (new String[][] { { " ggggggggggggg ", " g g ",
+ " g g ", " g g ", " g g ",
+ "g g", "g g", "g g",
+ "g g", "g g", "g g",
+ "g g", "g g", "g g",
+ "g g", "g g", "g g",
+ "g g", " g g ", " g g ",
+ " g g ", " g g ",
+ " ggggggggggggg ", } }))
+ .addShape(
+ SOLAR_HEATER_RING_4,
+ (new String[][] { { " ggggggggggggggggg ", " g g ",
+ " g g ", " g g ",
+ " g g ", "g g",
+ "g g", "g g",
+ "g g", "g g",
+ "g g", "g g",
+ "g g", "g g",
+ "g g", "g g",
+ "g g", "g g",
+ "g g", "g g",
+ "g g", "g g",
+ " g g ", " g g ",
+ " g g ", " g g ",
+ " ggggggggggggggggg ", } }))
+ .addShape(
+ SOLAR_HEATER_RING_5,
+ (new String[][] { { " ggggggggggggggggggggg ", " g g ",
+ " g g ", " g g ",
+ " g g ", "g g",
+ "g g", "g g",
+ "g g", "g g",
+ "g g", "g g",
+ "g g", "g g",
+ "g g", "g g",
+ "g g", "g g",
+ "g g", "g g",
+ "g g", "g g",
+ "g g", "g g",
+ "g g", "g g",
+ " g g ", " g g ",
+ " g g ", " g g ",
+ " ggggggggggggggggggggg ", } }))
+ .addElement(
+ 'g',
+ lazy(
+ t -> buildHatchAdder(GregtechMetaTileEntity_SolarTower.class)
+ .hatchClass(TileEntitySolarHeater.class)
+ .adder(GregtechMetaTileEntity_SolarTower::addSolarHeater)
+ // Use a positive casing index to make adder builder happy
+ .casingIndex(1).dot(1).continueIfSuccess().build()))
+ .addElement(
+ 't',
+ lazy(t -> onElementPass(x -> ++x.mCasing1, ofBlock(t.getCasingBlock(), t.getCasingMeta()))))
+ .addElement(
+ 'i',
+ lazy(
+ t -> onElementPass(
+ x -> ++x.mCasing2,
+ ofBlock(t.getCasingBlock(), t.getCasingMeta2()))))
+ .addElement(
+ 's',
+ lazy(
+ t -> onElementPass(
+ x -> ++x.mCasing3,
+ ofBlock(t.getCasingBlock(), t.getCasingMeta3()))))
+ .addElement(
+ 'c',
+ lazy(
+ t -> onElementPass(
+ x -> ++x.mCasing4,
+ ofBlock(t.getCasingBlock2(), t.getCasingMeta4()))))
+ .addElement(
+ 'h',
+ lazy(
+ t -> buildHatchAdder(GregtechMetaTileEntity_SolarTower.class)
+ .atLeast(InputHatch, OutputHatch, Maintenance)
+ .casingIndex(t.getCasingTextureIndex()).dot(2).buildAndChain(
+ onElementPass(
+ x -> ++x.mCasing1,
+ ofBlock(t.getCasingBlock(), t.getCasingMeta())))))
+ .build();
+ }
+ };
@Override
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
@@ -426,27 +286,53 @@ public class GregtechMetaTileEntity_SolarTower extends GregtechMeta_MultiBlockBa
boolean aCasingCount4 = mCasing4 == 60;
boolean aAllStructure = aStructureTop && aStructureTower && aStructureBase;
boolean aAllCasings = aCasingCount1 && aCasingCount2 && aCasingCount3 && aCasingCount4;
- if (!aAllCasings
- || !aAllStructure
+ if (!aAllCasings || !aAllStructure
|| mMaintenanceHatches.size() != 1
|| mInputHatches.size() < 1
|| mOutputHatches.size() < 1) {
- log("Bad Hatches - Solar Heaters: " + mSolarHeaters.size() + ", Maint: "
- + mMaintenanceHatches.size() + ", Input Hatches: "
- + mInputHatches.size() + ", Output Hatches: "
- + mOutputHatches.size() + ", Top: "
- + aStructureTop + ", Tower: "
- + aStructureTower + ", Base: "
- + aStructureBase + ", Casing Count: "
- + aCasingCount1 + " | Found: " + mCasing1 + ", Casing Count: "
- + aCasingCount2 + " | Found: " + mCasing2 + ", Casing Count: "
- + aCasingCount3 + " | Found: " + mCasing3 + ", Casing Count: "
- + aCasingCount4 + " | Found: " + mCasing4);
+ log(
+ "Bad Hatches - Solar Heaters: " + mSolarHeaters.size()
+ + ", Maint: "
+ + mMaintenanceHatches.size()
+ + ", Input Hatches: "
+ + mInputHatches.size()
+ + ", Output Hatches: "
+ + mOutputHatches.size()
+ + ", Top: "
+ + aStructureTop
+ + ", Tower: "
+ + aStructureTower
+ + ", Base: "
+ + aStructureBase
+ + ", Casing Count: "
+ + aCasingCount1
+ + " | Found: "
+ + mCasing1
+ + ", Casing Count: "
+ + aCasingCount2
+ + " | Found: "
+ + mCasing2
+ + ", Casing Count: "
+ + aCasingCount3
+ + " | Found: "
+ + mCasing3
+ + ", Casing Count: "
+ + aCasingCount4
+ + " | Found: "
+ + mCasing4);
return false;
}
- log("Built " + this.getLocalName() + " with " + mCasing1 + " Structural Solar casings, " + mCasing2
- + " Thermally Insulated casings, " + mCasing3 + " Salt Containment casings, " + mCasing4
- + " Thermal Containment casings.");
+ log(
+ "Built " + this.getLocalName()
+ + " with "
+ + mCasing1
+ + " Structural Solar casings, "
+ + mCasing2
+ + " Thermally Insulated casings, "
+ + mCasing3
+ + " Salt Containment casings, "
+ + mCasing4
+ + " Thermal Containment casings.");
return aAllCasings && aAllStructure;
}
@@ -515,31 +401,16 @@ public class GregtechMetaTileEntity_SolarTower extends GregtechMeta_MultiBlockBa
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
if (aSide == 0 || aSide == 1) {
- if (aActive)
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(12)),
- TextureFactory.builder()
- .addIcon(TexturesGtBlock.Overlay_Machine_Controller_Default_Active)
- .extFacing()
- .build()
- };
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(12)),
- TextureFactory.builder()
- .addIcon(TexturesGtBlock.Overlay_Machine_Controller_Default)
- .extFacing()
- .build()
- };
+ if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(12)),
+ TextureFactory.builder().addIcon(TexturesGtBlock.Overlay_Machine_Controller_Default_Active)
+ .extFacing().build() };
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(12)), TextureFactory
+ .builder().addIcon(TexturesGtBlock.Overlay_Machine_Controller_Default).extFacing().build() };
}
- return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(12))};
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(12)) };
}
@Override
@@ -650,8 +521,7 @@ public class GregtechMetaTileEntity_SolarTower extends GregtechMeta_MultiBlockBa
this.mEfficiencyIncrease = 100;
this.mMaxProgresstime = 200;
- if (this.mSolarHeaters.isEmpty()
- || this.mSolarHeaters.size() < 340
+ if (this.mSolarHeaters.isEmpty() || this.mSolarHeaters.size() < 340
|| this.getTotalRuntimeInTicks() % 200 == 0) {
getConnectedSolarReflectors();
}
@@ -673,12 +543,24 @@ public class GregtechMetaTileEntity_SolarTower extends GregtechMeta_MultiBlockBa
if (aHeaters > 0 && w.isDaytime()) {
if (w.isRaining() && this.getBaseMetaTileEntity().getBiome().rainfall > 0.0F) {
this.mHeatLevel += GT_Utility.safeInt((long) ((aHeaters / 2) * aEfficiency * (10 + aTier)));
- log("Added Heat (rain): " + aHeaters / 2 + " * " + aEfficiency + " * " + (10 + aTier) + " = "
- + (aHeaters * aEfficiency * (10 + aTier)));
+ log(
+ "Added Heat (rain): " + aHeaters / 2
+ + " * "
+ + aEfficiency
+ + " * "
+ + (10 + aTier)
+ + " = "
+ + (aHeaters * aEfficiency * (10 + aTier)));
} else {
this.mHeatLevel += GT_Utility.safeInt((long) (aHeaters * aEfficiency * (10 + aTier)));
- log("Added Heat: " + aHeaters + " * " + aEfficiency + " * " + (10 + aTier) + " = "
- + (aHeaters * aEfficiency * (10 + aTier)));
+ log(
+ "Added Heat: " + aHeaters
+ + " * "
+ + aEfficiency
+ + " * "
+ + (10 + aTier)
+ + " = "
+ + (aHeaters * aEfficiency * (10 + aTier)));
}
}
@@ -827,9 +709,8 @@ public class GregtechMetaTileEntity_SolarTower extends GregtechMeta_MultiBlockBa
@Override
public String[] getExtraInfoData() {
- return new String[] {
- "Internal Heat Level: " + this.mHeatLevel, "Connected Solar Reflectors: " + this.mSolarHeaters.size()
- };
+ return new String[] { "Internal Heat Level: " + this.mHeatLevel,
+ "Connected Solar Reflectors: " + this.mSolarHeaters.size() };
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java
index 1225fe318d..504f398e25 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java
@@ -9,11 +9,18 @@ import static gregtech.api.enums.GT_HatchElement.InputHatch;
import static gregtech.api.enums.GT_HatchElement.OutputBus;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits;
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.TAE;
import gregtech.api.interfaces.IIconContainer;
@@ -35,11 +42,6 @@ import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.loaders.recipe.RecipeLoader_AlgaeFarm;
import ic2.core.init.BlocksItems;
import ic2.core.init.InternalName;
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.FluidStack;
public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase<GregtechMTE_AlgaePondBase>
implements ISurvivalConstructable {
@@ -76,24 +78,16 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase<Gregt
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Grows Algae!")
- .addInfo("Controller Block for the Algae Farm")
+ tt.addMachineType(getMachineType()).addInfo("Grows Algae!").addInfo("Controller Block for the Algae Farm")
.addInfo("Provide compost to boost production by one tier")
.addInfo("Does not require power or maintenance")
.addInfo("All Machine Casings must be the same tier, this dictates machine speed.")
.addInfo("All Buses/Hatches must, at least, match the tier of the Casings")
.addInfo("Fill Input Hatch with Water to fill the inside of the multiblock.")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(9, 3, 9, true)
- .addController("Front Center")
- .addCasingInfo("Machine Casings", 64)
- .addCasingInfo("Sterile Farm Casings", 34)
- .addInputBus("Any Casing", 1)
- .addOutputBus("Any Casing", 1)
- .addInputHatch("Any Casing", 1)
- .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(9, 3, 9, true)
+ .addController("Front Center").addCasingInfo("Machine Casings", 64)
+ .addCasingInfo("Sterile Farm Casings", 34).addInputBus("Any Casing", 1).addOutputBus("Any Casing", 1)
+ .addInputHatch("Any Casing", 1).toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -109,49 +103,22 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase<Gregt
public IStructureDefinition<GregtechMTE_AlgaePondBase> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMTE_AlgaePondBase>builder()
- .addShape(mName, transpose(new String[][] {
- {
- "XXXXXXXXX",
- "X X",
- "X X",
- "X X",
- "X X",
- "X X",
- "X X",
- "X X",
- "XXXXXXXXX"
- },
- {
- "XXXXXXXXX",
- "X X",
- "X X",
- "X X",
- "X X",
- "X X",
- "X X",
- "X X",
- "XXXXXXXXX"
- },
- {
- "CCCC~CCCC",
- "CCCCCCCCC",
- "CCCCCCCCC",
- "CCCCCCCCC",
- "CCCCCCCCC",
- "CCCCCCCCC",
- "CCCCCCCCC",
- "CCCCCCCCC",
- "CCCCCCCCC"
- },
- }))
+ .addShape(
+ mName,
+ transpose(
+ new String[][] {
+ { "XXXXXXXXX", "X X", "X X", "X X", "X X",
+ "X X", "X X", "X X", "XXXXXXXXX" },
+ { "XXXXXXXXX", "X X", "X X", "X X", "X X",
+ "X X", "X X", "X X", "XXXXXXXXX" },
+ { "CCCC~CCCC", "CCCCCCCCC", "CCCCCCCCC", "CCCCCCCCC", "CCCCCCCCC",
+ "CCCCCCCCC", "CCCCCCCCC", "CCCCCCCCC", "CCCCCCCCC" }, }))
.addElement(
'C',
ofChain(
buildHatchAdder(GregtechMTE_AlgaePondBase.class)
.atLeast(InputHatch, InputBus, OutputBus)
- .casingIndex(TAE.getIndexFromPage(1, 15))
- .dot(1)
- .build(),
+ .casingIndex(TAE.getIndexFromPage(1, 15)).dot(1).build(),
onElementPass(
x -> ++x.mCasing,
addTieredBlock(
@@ -159,8 +126,7 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase<Gregt
GregtechMTE_AlgaePondBase::setMeta,
GregtechMTE_AlgaePondBase::getMeta,
10))))
- .addElement('X', ofBlock(ModBlocks.blockCasings2Misc, 15))
- .build();
+ .addElement('X', ofBlock(ModBlocks.blockCasings2Misc, 15)).build();
}
return STRUCTURE_DEFINITION;
}
@@ -256,10 +222,10 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase<Gregt
// if (aBaseMetaTileEntity.fac)
- final int xDir =
- ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * mCurrentDirectionX;
- final int zDir =
- ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * mCurrentDirectionZ;
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX
+ * mCurrentDirectionX;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ
+ * mCurrentDirectionZ;
int tAmount = 0;
for (int i = mOffsetX_Lower + 1; i <= mOffsetX_Upper - 1; ++i) {
@@ -275,13 +241,11 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase<Gregt
// Utils.LOG_WARNING("Going to try swap an air block for water from inut bus.");
stored.amount -= 1000;
Block fluidUsed = Blocks.water;
- aBaseMetaTileEntity
- .getWorld()
- .setBlock(
- aBaseMetaTileEntity.getXCoord() + xDir + i,
- aBaseMetaTileEntity.getYCoord() + h,
- aBaseMetaTileEntity.getZCoord() + zDir + j,
- fluidUsed);
+ aBaseMetaTileEntity.getWorld().setBlock(
+ aBaseMetaTileEntity.getXCoord() + xDir + i,
+ aBaseMetaTileEntity.getYCoord() + h,
+ aBaseMetaTileEntity.getZCoord() + zDir + j,
+ fluidUsed);
}
}
}
@@ -307,8 +271,7 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase<Gregt
}
private boolean isNotStaticWater(Block block, byte meta) {
- return block == Blocks.air
- || block == Blocks.flowing_water
+ return block == Blocks.air || block == Blocks.flowing_water
|| block == BlocksItems.getFluidBlock(InternalName.fluidDistilledWater)
|| (cofhWater != null && cofhWater.isAssignableFrom(block.getClass()) && meta != 0);
}
@@ -353,14 +316,8 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase<Gregt
return checkRecipeGeneric(getMaxParallelRecipes(), getEuDiscountForParallelism(), 0);
}
- public boolean checkRecipeGeneric(
- ItemStack[] aItemInputs,
- FluidStack[] aFluidInputs,
- int aMaxParallelRecipes,
- long aEUPercent,
- int aSpeedBonusPercent,
- int aOutputChanceRoll,
- GT_Recipe aRecipe) {
+ public boolean checkRecipeGeneric(ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes,
+ long aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe) {
if (this.mLevel < 0) {
return false;
@@ -384,14 +341,9 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase<Gregt
return false;
}
- GT_ParallelHelper helper = new GT_ParallelHelper()
- .setRecipe(tRecipe)
- .setItemInputs(aItemInputs)
- .setFluidInputs(aFluidInputs)
- .setAvailableEUt(120)
- .setMaxParallel(aMaxParallelRecipes)
- .enableConsumption()
- .enableOutputCalculation();
+ GT_ParallelHelper helper = new GT_ParallelHelper().setRecipe(tRecipe).setItemInputs(aItemInputs)
+ .setFluidInputs(aFluidInputs).setAvailableEUt(120).setMaxParallel(aMaxParallelRecipes)
+ .enableConsumption().enableOutputCalculation();
if (!mVoidExcess) {
helper.enableVoidProtection(this);
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform1.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform1.java
index 875c449f2d..97bd9dbce7 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform1.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform1.java
@@ -1,41 +1,12 @@
/*
-package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.bedrock;
-
-
-public class GregtechMetaTileEntity_BedrockMiningPlatform1 extends GregtechMetaTileEntity_BedrockMiningPlatformBase {
- public GregtechMetaTileEntity_BedrockMiningPlatform1(final int aID, final String aName, final String aNameRegional) {
- super(aID, aName, aNameRegional);
- }
-
- public GregtechMetaTileEntity_BedrockMiningPlatform1(final String aName) {
- super(aName);
- }
-
- public String[] getTooltip() {
- return this.getDescriptionInternal("I");
- }
-
- public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
- return (IMetaTileEntity) new GregtechMetaTileEntity_BedrockMiningPlatform1(this.mName);
- }
-
- protected Material getFrameMaterial() {
- return ALLOY.INCONEL_690;
- }
-
- protected int getCasingTextureIndex() {
- return TAE.getIndexFromPage(0, 14);
- }
-
- protected int getRadiusInChunks() {
- return 9;
- }
-
- protected int getMinTier() {
- return 5;
- }
-
- protected int getBaseProgressTime() {
- return (int) (420*(this.mProductionModifier/100));
- }
-}*/
+ * package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.bedrock; public class
+ * GregtechMetaTileEntity_BedrockMiningPlatform1 extends GregtechMetaTileEntity_BedrockMiningPlatformBase { public
+ * GregtechMetaTileEntity_BedrockMiningPlatform1(final int aID, final String aName, final String aNameRegional) {
+ * super(aID, aName, aNameRegional); } public GregtechMetaTileEntity_BedrockMiningPlatform1(final String aName) {
+ * super(aName); } public String[] getTooltip() { return this.getDescriptionInternal("I"); } public IMetaTileEntity
+ * newMetaEntity(final IGregTechTileEntity aTileEntity) { return (IMetaTileEntity) new
+ * GregtechMetaTileEntity_BedrockMiningPlatform1(this.mName); } protected Material getFrameMaterial() { return
+ * ALLOY.INCONEL_690; } protected int getCasingTextureIndex() { return TAE.getIndexFromPage(0, 14); } protected int
+ * getRadiusInChunks() { return 9; } protected int getMinTier() { return 5; } protected int getBaseProgressTime() {
+ * return (int) (420*(this.mProductionModifier/100)); } }
+ */
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform2.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform2.java
index f67ecfe87f..b4be6eb80f 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform2.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatform2.java
@@ -1,41 +1,12 @@
/*
-package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.bedrock;
-
-
-public class GregtechMetaTileEntity_BedrockMiningPlatform2 extends GregtechMetaTileEntity_BedrockMiningPlatformBase {
- public GregtechMetaTileEntity_BedrockMiningPlatform2(final int aID, final String aName, final String aNameRegional) {
- super(aID, aName, aNameRegional);
- }
-
- public GregtechMetaTileEntity_BedrockMiningPlatform2(final String aName) {
- super(aName);
- }
-
- public String[] getTooltip() {
- return this.getDescriptionInternal("II");
- }
-
- public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
- return (IMetaTileEntity) new GregtechMetaTileEntity_BedrockMiningPlatform2(this.mName);
- }
-
- protected Material getFrameMaterial() {
- return ELEMENT.getInstance().AMERICIUM241;
- }
-
- protected int getCasingTextureIndex() {
- return 62;
- }
-
- protected int getRadiusInChunks() {
- return 9;
- }
-
- protected int getMinTier() {
- return 5;
- }
-
- protected int getBaseProgressTime() {
- return 480;
- }
-}*/
+ * package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.bedrock; public class
+ * GregtechMetaTileEntity_BedrockMiningPlatform2 extends GregtechMetaTileEntity_BedrockMiningPlatformBase { public
+ * GregtechMetaTileEntity_BedrockMiningPlatform2(final int aID, final String aName, final String aNameRegional) {
+ * super(aID, aName, aNameRegional); } public GregtechMetaTileEntity_BedrockMiningPlatform2(final String aName) {
+ * super(aName); } public String[] getTooltip() { return this.getDescriptionInternal("II"); } public IMetaTileEntity
+ * newMetaEntity(final IGregTechTileEntity aTileEntity) { return (IMetaTileEntity) new
+ * GregtechMetaTileEntity_BedrockMiningPlatform2(this.mName); } protected Material getFrameMaterial() { return
+ * ELEMENT.getInstance().AMERICIUM241; } protected int getCasingTextureIndex() { return 62; } protected int
+ * getRadiusInChunks() { return 9; } protected int getMinTier() { return 5; } protected int getBaseProgressTime() {
+ * return 480; } }
+ */
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java
index f64f0feab7..2c40e6875a 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java
@@ -1,5 +1,10 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.bedrock;
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.common.util.ForgeDirection;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Textures;
@@ -23,10 +28,6 @@ import gtPlusPlus.core.util.minecraft.MiningUtils;
import gtPlusPlus.core.util.minecraft.OreDictUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.common.util.ForgeDirection;
public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends GregtechMeta_MultiBlockBase {
@@ -49,8 +50,8 @@ public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends G
private int[] xCenter = new int[5];
private int[] zCenter = new int[5];
- public GregtechMetaTileEntity_BedrockMiningPlatformBase(
- final int aID, final String aName, final String aNameRegional) {
+ public GregtechMetaTileEntity_BedrockMiningPlatformBase(final int aID, final String aName,
+ final String aNameRegional) {
super(aID, aName, aNameRegional);
this.initFields();
}
@@ -203,7 +204,8 @@ public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends G
}
if (pipes == null) {
this.setInventorySlotContents(
- 1, GT_Utility.copy(new Object[] {GregtechMetaTileEntity_BedrockMiningPlatformBase.miningPipe}));
+ 1,
+ GT_Utility.copy(new Object[] { GregtechMetaTileEntity_BedrockMiningPlatformBase.miningPipe }));
pipes = this.getStackInSlot(1);
}
if (pipes.stackSize == maxPipes) {
@@ -221,8 +223,7 @@ public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends G
private boolean isHasMiningPipes(final int minCount) {
final ItemStack pipe = this.getStackInSlot(1);
- return pipe != null
- && pipe.stackSize > minCount - 1
+ return pipe != null && pipe.stackSize > minCount - 1
&& pipe.isItemEqual(GregtechMetaTileEntity_BedrockMiningPlatformBase.miningPipe);
}
@@ -241,8 +242,8 @@ public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends G
for (int j = -1; j < 2; ++j) {
for (int h = -1; h < 2; ++h) {
if (h != 0 || (xDir + i != 0 || zDir + j != 0) && (i != 0 || j != 0)) {
- IGregTechTileEntity tTileEntity =
- aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
+ IGregTechTileEntity tTileEntity = aBaseMetaTileEntity
+ .getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
Block aBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j);
int aMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j);
@@ -258,10 +259,10 @@ public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends G
}
++tAmount;
- /*if (!isValidBlockForStructure(tTileEntity, 48, true, aBlock, aMeta, sBlockCasings4, 0)) {
- Logger.INFO("Bad centrifuge casing");
- return false;
- }*/
+ /*
+ * if (!isValidBlockForStructure(tTileEntity, 48, true, aBlock, aMeta, sBlockCasings4, 0)) {
+ * Logger.INFO("Bad centrifuge casing"); return false; }
+ */
}
}
@@ -275,8 +276,7 @@ public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends G
this.xDrill = this.getBaseMetaTileEntity().getXCoord();
this.yDrill = this.getBaseMetaTileEntity().getYCoord() - 1;
this.zDrill = this.getBaseMetaTileEntity().getZCoord();
- this.back =
- ForgeDirection.getOrientation((int) this.getBaseMetaTileEntity().getBackFacing());
+ this.back = ForgeDirection.getOrientation((int) this.getBaseMetaTileEntity().getBackFacing());
// Middle
this.xCenter[0] = this.xDrill + this.back.offsetX;
@@ -332,22 +332,19 @@ public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends G
protected String[] getDescriptionInternal(final String tierSuffix) {
final String casings = this.getCasingBlockItem().get(0L, new Object[0]).getDisplayName();
return new String[] {
- "Controller Block for the Experimental Deep Earth Drilling Platform - MK "
- + ((tierSuffix != null) ? tierSuffix : ""),
- "Size(WxHxD): 3x7x3, Controller (Front middle bottom)",
- "3x1x3 Base of " + casings,
- "1x3x1 " + casings + " pillar (Center of base)",
- "1x3x1 " + this.getFrameMaterial().getLocalizedName() + " Frame Boxes (Each pillar side and on top)",
- "2x Input Hatch (Any bottom layer casing)",
- "1x Input Bus for mining pipes (Any bottom layer casing; not necessary)",
- "1x Output Bus (Any bottom layer casing)",
- "1x Maintenance Hatch (Any bottom layer casing)",
- "1x " + GT_Values.VN[this.getMinTier()] + "+ Energy Hatch (Any bottom layer casing)",
- "Radius is " + (this.getRadiusInChunks() << 4) + " blocks",
- "Every tick, this machine altenates betweem consumption of Pyrotheum & Cryotheum",
- "Pyrotheum is used to bore through the Mantle of the world",
- "Cryotheum is used to keep the internal components cool",
- };
+ "Controller Block for the Experimental Deep Earth Drilling Platform - MK "
+ + ((tierSuffix != null) ? tierSuffix : ""),
+ "Size(WxHxD): 3x7x3, Controller (Front middle bottom)", "3x1x3 Base of " + casings,
+ "1x3x1 " + casings + " pillar (Center of base)",
+ "1x3x1 " + this.getFrameMaterial().getLocalizedName() + " Frame Boxes (Each pillar side and on top)",
+ "2x Input Hatch (Any bottom layer casing)",
+ "1x Input Bus for mining pipes (Any bottom layer casing; not necessary)",
+ "1x Output Bus (Any bottom layer casing)", "1x Maintenance Hatch (Any bottom layer casing)",
+ "1x " + GT_Values.VN[this.getMinTier()] + "+ Energy Hatch (Any bottom layer casing)",
+ "Radius is " + (this.getRadiusInChunks() << 4) + " blocks",
+ "Every tick, this machine altenates betweem consumption of Pyrotheum & Cryotheum",
+ "Pyrotheum is used to bore through the Mantle of the world",
+ "Cryotheum is used to keep the internal components cool", };
}
static {
@@ -469,9 +466,8 @@ public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends G
mMixedOreData.put(new Pair<String, Integer>("oreLapis", 40));
mMixedOreData.put(new Pair<String, Integer>("oreRedstone", 40));
- if (LoadedMods.Thaumcraft
- || (OreDictUtils.containsValidEntries("oreAmber")
- && OreDictUtils.containsValidEntries("oreCinnabar"))) {
+ if (LoadedMods.Thaumcraft || (OreDictUtils.containsValidEntries("oreAmber")
+ && OreDictUtils.containsValidEntries("oreCinnabar"))) {
mMixedOreData.put(new Pair<String, Integer>("oreAmber", 20));
mMixedOreData.put(new Pair<String, Integer>("oreCinnabar", 20));
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java
index cb25aeb155..6c4358219f 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java
@@ -8,9 +8,23 @@ import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
import static gregtech.api.util.GT_StructureUtility.filterByMTETier;
import static gregtech.api.util.GT_StructureUtility.ofCoil;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+
+import javax.annotation.Nullable;
+
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.StructureLibAPI;
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.*;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.HeatingCoilLevel;
import gregtech.api.interfaces.IIconContainer;
@@ -35,16 +49,6 @@ import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.nbthandlers.GT_MetaTileEntity_Hatch_Catalysts;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.stream.Collectors;
-import java.util.stream.IntStream;
-import javax.annotation.Nullable;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
-import net.minecraftforge.fluids.FluidStack;
public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase<GregtechMTE_ChemicalPlant>
implements ISurvivalConstructable {
@@ -61,8 +65,7 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase<Gregt
private int mCasing;
private static IStructureDefinition<GregtechMTE_ChemicalPlant> STRUCTURE_DEFINITION = null;
- private final ArrayList<GT_MetaTileEntity_Hatch_Catalysts> mCatalystBuses =
- new ArrayList<GT_MetaTileEntity_Hatch_Catalysts>();
+ private final ArrayList<GT_MetaTileEntity_Hatch_Catalysts> mCatalystBuses = new ArrayList<GT_MetaTileEntity_Hatch_Catalysts>();
private static final HashMap<Integer, Triplet<Block, Integer, Integer>> mTieredBlockRegistry = new HashMap<>();
@@ -75,11 +78,14 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase<Gregt
}
public static boolean registerMachineCasingForTier(int aTier, Block aBlock, int aMeta, int aCasingTextureID) {
- Triplet<Block, Integer, Integer> aCasingData =
- new Triplet<Block, Integer, Integer>(aBlock, aMeta, aCasingTextureID);
+ Triplet<Block, Integer, Integer> aCasingData = new Triplet<Block, Integer, Integer>(
+ aBlock,
+ aMeta,
+ aCasingTextureID);
if (mTieredBlockRegistry.containsKey(aTier)) {
- CORE.crash("Tried to register a Machine casing for tier " + aTier
- + " to the Chemical Plant, however this tier already contains one.");
+ CORE.crash(
+ "Tried to register a Machine casing for tier " + aTier
+ + " to the Chemical Plant, however this tier already contains one.");
}
mTieredBlockRegistry.put(aTier, aCasingData);
return true;
@@ -107,24 +113,15 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase<Gregt
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Chemical Plant")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Chemical Plant")
.addInfo("Heavy Industry, now right at your doorstep!")
- .addInfo("Please read the user manual for more information on construction and usage")
- .addSeparator()
- .addController("Bottom Center")
- .addStructureHint("Catalyst Housing", 1)
- .addInputBus("Bottom Casing", 1)
- .addOutputBus("Bottom Casing", 1)
- .addInputHatch("Bottom Casing", 1)
- .addOutputHatch("Bottom Casing", 1)
- .addEnergyHatch("Bottom Casing", 1)
- .addMaintenanceHatch("Bottom Casing", 1)
+ .addInfo("Please read the user manual for more information on construction and usage").addSeparator()
+ .addController("Bottom Center").addStructureHint("Catalyst Housing", 1).addInputBus("Bottom Casing", 1)
+ .addOutputBus("Bottom Casing", 1).addInputHatch("Bottom Casing", 1).addOutputHatch("Bottom Casing", 1)
+ .addEnergyHatch("Bottom Casing", 1).addMaintenanceHatch("Bottom Casing", 1)
.addSubChannelUsage("casing", "metal machine casing")
- .addSubChannelUsage("machine", "tier machine casing")
- .addSubChannelUsage("coil", "heating coil blocks")
- .addSubChannelUsage("pipe", "pipe casing blocks")
- .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ .addSubChannelUsage("machine", "tier machine casing").addSubChannelUsage("coil", "heating coil blocks")
+ .addSubChannelUsage("pipe", "pipe casing blocks").toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -192,42 +189,37 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase<Gregt
if (STRUCTURE_DEFINITION == null) {
IStructureElement<GregtechMTE_ChemicalPlant> allCasingsElement = withChannel(
"casing",
- ofChain(IntStream.range(0, 8)
- .mapToObj(GregtechMTE_ChemicalPlant::ofSolidCasing)
- .collect(Collectors.toList())));
- STRUCTURE_DEFINITION = StructureDefinition.<GregtechMTE_ChemicalPlant>builder()
- .addShape(mName, transpose(new String[][] {
- {"XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX"},
- {"X X", " MMMMM ", " MHHHM ", " MHHHM ", " MHHHM ", " MMMMM ", "X X"},
- {"X X", " ", " PPP ", " PPP ", " PPP ", " ", "X X"},
- {"X X", " ", " HHH ", " HHH ", " HHH ", " ", "X X"},
- {"X X", " ", " PPP ", " PPP ", " PPP ", " ", "X X"},
- {"X X", " MMMMM ", " MHHHM ", " MHHHM ", " MHHHM ", " MMMMM ", "X X"},
- {"CCC~CCC", "CMMMMMC", "CMMMMMC", "CMMMMMC", "CMMMMMC", "CMMMMMC", "CCCCCCC"},
- }))
+ ofChain(
+ IntStream.range(0, 8).mapToObj(GregtechMTE_ChemicalPlant::ofSolidCasing)
+ .collect(Collectors.toList())));
+ STRUCTURE_DEFINITION = StructureDefinition.<GregtechMTE_ChemicalPlant>builder().addShape(
+ mName,
+ transpose(
+ new String[][] {
+ { "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX" },
+ { "X X", " MMMMM ", " MHHHM ", " MHHHM ", " MHHHM ", " MMMMM ", "X X" },
+ { "X X", " ", " PPP ", " PPP ", " PPP ", " ", "X X" },
+ { "X X", " ", " HHH ", " HHH ", " HHH ", " ", "X X" },
+ { "X X", " ", " PPP ", " PPP ", " PPP ", " ", "X X" },
+ { "X X", " MMMMM ", " MHHHM ", " MHHHM ", " MHHHM ", " MMMMM ", "X X" },
+ { "CCC~CCC", "CMMMMMC", "CMMMMMC", "CMMMMMC", "CMMMMMC", "CMMMMMC", "CCCCCCC" }, }))
.addElement(
'C',
ofChain(
- buildHatchAdder(GregtechMTE_ChemicalPlant.class)
- .atLeast(Maintenance)
- .casingIndex(getCasingTextureID())
- .dot(1)
- .build(),
+ buildHatchAdder(GregtechMTE_ChemicalPlant.class).atLeast(Maintenance)
+ .casingIndex(getCasingTextureID()).dot(1).build(),
buildHatchAdder(GregtechMTE_ChemicalPlant.class)
.atLeast(InputHatch, OutputHatch, InputBus, OutputBus)
.adder(GregtechMTE_ChemicalPlant::addChemicalPlantList)
- .hatchItemFilterAnd((t, s) -> filterByMTETier(
- Integer.MIN_VALUE,
- s.stackSize >= 10 ? Integer.MAX_VALUE : s.stackSize))
- .casingIndex(getCasingTextureID())
- .dot(1)
- .build(),
+ .hatchItemFilterAnd(
+ (t, s) -> filterByMTETier(
+ Integer.MIN_VALUE,
+ s.stackSize >= 10 ? Integer.MAX_VALUE : s.stackSize))
+ .casingIndex(getCasingTextureID()).dot(1).build(),
buildHatchAdder(GregtechMTE_ChemicalPlant.class)
.hatchClass(GT_MetaTileEntity_Hatch_Catalysts.class)
.adder(GregtechMTE_ChemicalPlant::addChemicalPlantList)
- .casingIndex(getCasingTextureID())
- .dot(1)
- .build(),
+ .casingIndex(getCasingTextureID()).dot(1).build(),
allCasingsElement))
.addElement('X', allCasingsElement)
.addElement(
@@ -263,6 +255,7 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase<Gregt
private static IStructureElement<GregtechMTE_ChemicalPlant> ofSolidCasing(int aIndex) {
return new IStructureElement<GregtechMTE_ChemicalPlant>() {
+
@Override
public boolean check(GregtechMTE_ChemicalPlant t, World world, int x, int y, int z) {
if (check(aIndex, world, x, y, z)) {
@@ -298,8 +291,8 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase<Gregt
}
@Override
- public boolean placeBlock(
- GregtechMTE_ChemicalPlant t, World world, int x, int y, int z, ItemStack trigger) {
+ public boolean placeBlock(GregtechMTE_ChemicalPlant t, World world, int x, int y, int z,
+ ItemStack trigger) {
return world.setBlock(
x,
y,
@@ -311,28 +304,16 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase<Gregt
@Nullable
@Override
- public BlocksToPlace getBlocksToPlace(
- GregtechMTE_ChemicalPlant gregtechMTE_chemicalPlant,
- World world,
- int x,
- int y,
- int z,
- ItemStack trigger,
- AutoPlaceEnvironment env) {
+ public BlocksToPlace getBlocksToPlace(GregtechMTE_ChemicalPlant gregtechMTE_chemicalPlant, World world,
+ int x, int y, int z, ItemStack trigger, AutoPlaceEnvironment env) {
return BlocksToPlace.create(
mTieredBlockRegistry.get(getIndex(trigger.stackSize)).getValue_1(),
mTieredBlockRegistry.get(getIndex(trigger.stackSize)).getValue_2());
}
@Override
- public PlaceResult survivalPlaceBlock(
- GregtechMTE_ChemicalPlant t,
- World world,
- int x,
- int y,
- int z,
- ItemStack trigger,
- AutoPlaceEnvironment env) {
+ public PlaceResult survivalPlaceBlock(GregtechMTE_ChemicalPlant t, World world, int x, int y, int z,
+ ItemStack trigger, AutoPlaceEnvironment env) {
if (check(getIndex(trigger.stackSize), world, x, y, z)) return PlaceResult.SKIP;
return StructureUtility.survivalPlaceBlock(
mTieredBlockRegistry.get(getIndex(trigger.stackSize)).getValue_1(),
@@ -603,25 +584,24 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase<Gregt
}
@Override
- public boolean checkRecipeGeneric(
- int aMaxParallelRecipes, long aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll) {
+ public boolean checkRecipeGeneric(int aMaxParallelRecipes, long aEUPercent, int aSpeedBonusPercent,
+ int aOutputChanceRoll) {
ArrayList<ItemStack> tItems = getStoredInputs();
ArrayList<FluidStack> tFluids = getStoredFluids();
ItemStack[] tItemInputs = tItems.toArray(new ItemStack[tItems.size()]);
FluidStack[] tFluidInputs = tFluids.toArray(new FluidStack[tFluids.size()]);
return checkRecipeGeneric(
- tItemInputs, tFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll);
+ tItemInputs,
+ tFluidInputs,
+ aMaxParallelRecipes,
+ aEUPercent,
+ aSpeedBonusPercent,
+ aOutputChanceRoll);
}
@Override
- public boolean checkRecipeGeneric(
- ItemStack[] aItemInputs,
- FluidStack[] aFluidInputs,
- int aMaxParallelRecipes,
- long aEUPercent,
- int aSpeedBonusPercent,
- int aOutputChanceRoll,
- GT_Recipe aRecipe) {
+ public boolean checkRecipeGeneric(ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes,
+ long aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe) {
// Based on the Processing Array. A bit overkill, but very flexible.
@@ -636,9 +616,13 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase<Gregt
long tEnergy = getMaxInputEnergy();
// GT_Recipe tRecipe = findRecipe(getBaseMetaTileEntity(), mLastRecipe, false,
- // gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs);
+ // gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs);
GT_Recipe tRecipe = findRecipe(
- mLastRecipe, gregtech.api.enums.GT_Values.V[tTier], getSolidCasingTier(), aItemInputs, aFluidInputs);
+ mLastRecipe,
+ gregtech.api.enums.GT_Values.V[tTier],
+ getSolidCasingTier(),
+ aItemInputs,
+ aFluidInputs);
if (tRecipe == null) {
return false;
@@ -682,14 +666,9 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase<Gregt
return false;
}
- GT_ParallelHelper helper = new GT_ParallelHelper()
- .setRecipe(tRecipe)
- .setItemInputs(aItemInputs)
- .setFluidInputs(aFluidInputs)
- .setAvailableEUt(tEnergy)
- .setMaxParallel(tMaxParallelCatalyst)
- .enableConsumption()
- .enableOutputCalculation();
+ GT_ParallelHelper helper = new GT_ParallelHelper().setRecipe(tRecipe).setItemInputs(aItemInputs)
+ .setFluidInputs(aFluidInputs).setAvailableEUt(tEnergy).setMaxParallel(tMaxParallelCatalyst)
+ .enableConsumption().enableOutputCalculation();
if (!mVoidExcess) {
helper.enableVoidProtection(this);
}
@@ -707,14 +686,10 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase<Gregt
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
- GT_OverclockCalculator calculator = new GT_OverclockCalculator()
- .setRecipeEUt(tRecipe.mEUt)
- .setEUt(tEnergy)
- .setDuration(tRecipe.mDuration)
- .setEUtDiscount(100.0f / aEUPercent)
+ GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(tRecipe.mEUt).setEUt(tEnergy)
+ .setDuration(tRecipe.mDuration).setEUtDiscount(100.0f / aEUPercent)
.setSpeedBoost((100.0f / aSpeedBonusPercent))
- .setParallel(Math.min(aMaxParallelRecipes, helper.getCurrentParallel()))
- .calculate();
+ .setParallel(Math.min(aMaxParallelRecipes, helper.getCurrentParallel())).calculate();
lEUt = -calculator.getConsumption();
mMaxProgresstime = (int) Math.ceil(calculator.getDuration() * helper.getDurationMultiplier());
@@ -787,12 +762,8 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase<Gregt
}
}
- public GT_Recipe findRecipe(
- final GT_Recipe aRecipe,
- final long aVoltage,
- final long aSpecialValue,
- ItemStack[] aInputs,
- final FluidStack[] aFluids) {
+ public GT_Recipe findRecipe(final GT_Recipe aRecipe, final long aVoltage, final long aSpecialValue,
+ ItemStack[] aInputs, final FluidStack[] aFluids) {
if (!mInitRecipeCache) {
initRecipeCaches();
}
@@ -820,8 +791,7 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase<Gregt
GT_Recipe aFoundRecipe = null;
// Iterate the tiers recipes until we find the one with all inputs matching
- master:
- for (AutoMap<GT_Recipe> aTieredMap : aMasterMap) {
+ master: for (AutoMap<GT_Recipe> aTieredMap : aMasterMap) {
for (GT_Recipe aRecipeToCheck : aTieredMap) {
if (aRecipeToCheck.isRecipeInputEqual(false, aFluids, aInputs)) {
log("Found recipe with matching inputs!");
@@ -845,8 +815,8 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase<Gregt
return null;
}
- private int getCatalysts(
- ItemStack[] aItemInputs, ItemStack aRecipeCatalyst, int aMaxParrallel, ArrayList<ItemStack> aOutPut) {
+ private int getCatalysts(ItemStack[] aItemInputs, ItemStack aRecipeCatalyst, int aMaxParrallel,
+ ArrayList<ItemStack> aOutPut) {
int allowedParallel = 0;
for (final ItemStack aInput : aItemInputs) {
if (aRecipeCatalyst.isItemEqual(aInput)) {
@@ -905,7 +875,7 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase<Gregt
}
/*
- * Catalyst Handling
+ * Catalyst Handling
*/
@Override
public ArrayList<ItemStack> getStoredInputs() {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/mega/GregTechMetaTileEntity_MegaAlloyBlastSmelter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/mega/GregTechMetaTileEntity_MegaAlloyBlastSmelter.java
index 702dc467be..57e4724ecd 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/mega/GregTechMetaTileEntity_MegaAlloyBlastSmelter.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/mega/GregTechMetaTileEntity_MegaAlloyBlastSmelter.java
@@ -6,6 +6,15 @@ import static gregtech.api.enums.GT_HatchElement.Energy;
import static gregtech.api.enums.GT_HatchElement.Maintenance;
import static gregtech.api.util.GT_StructureUtility.*;
+import java.util.*;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.StatCollector;
+import net.minecraftforge.fluids.FluidStack;
+
import com.github.bartimaeusnek.bartworks.API.BorosilicateGlass;
import com.github.bartimaeusnek.bartworks.util.Pair;
import com.github.bartimaeusnek.bartworks.util.RecipeFinderForParallel;
@@ -13,6 +22,7 @@ import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructa
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.HeatingCoilLevel;
import gregtech.api.enums.TAE;
@@ -25,13 +35,6 @@ import gregtech.api.render.TextureFactory;
import gregtech.api.util.*;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.*;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.StatCollector;
-import net.minecraftforge.fluids.FluidStack;
public class GregTechMetaTileEntity_MegaAlloyBlastSmelter
extends GT_MetaTileEntity_ExtendedPowerMultiBlockBase<GregTechMetaTileEntity_MegaAlloyBlastSmelter>
@@ -44,283 +47,79 @@ public class GregTechMetaTileEntity_MegaAlloyBlastSmelter
private int currentParallels;
private boolean hasNormalCoils;
- private static final IStructureDefinition<GregTechMetaTileEntity_MegaAlloyBlastSmelter> STRUCTURE_DEFINITION =
- StructureDefinition.<GregTechMetaTileEntity_MegaAlloyBlastSmelter>builder()
- .addShape("main", new String[][] {
- {
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " DDDDD ",
- " CCCCC ",
- " AEEEA ",
- " AE~EA ",
- " AEEEA ",
- " CCCCC ",
- " ZZZZZ "
- },
- {
- " DDDDD ",
- " AAAAA ",
- " AAAAA ",
- " AAAAA ",
- " AAAAA ",
- " AAAAA ",
- " AAAAA ",
- " AAAAA ",
- " AAAAA ",
- " AAAAA ",
- " AAAAA ",
- " AAAAA ",
- " DDDDD ",
- " D D ",
- " C C ",
- " A A ",
- " A A ",
- " A A ",
- " C C ",
- " ZZZZZZZ "
- },
- {
- " DFFFFFD ",
- " ABBBBBA ",
- " ABBBBBA ",
- " ABBBBBA ",
- " ABBBBBA ",
- " ABBBBBA ",
- " ABBBBBA ",
- " ABBBBBA ",
- " ABBBBBA ",
- " ABBBBBA ",
- " ABBBBBA ",
- " ABBBBBA ",
- " DBBBBBD ",
- " D BBBBB D ",
- " C BBBBB C ",
- " A BBBBB A ",
- " A BBBBB A ",
- " A BBBBB A ",
- " C BBBBB C ",
- " ZZZZZZZZZ "
- },
- {
- " DFFFFFFFD ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " DB BD ",
- "D B B D",
- "C B B C",
- "A B B A",
- "A B B A",
- "A B B A",
- "C B B C",
- "ZZZZZZZZZZZ"
- },
- {
- " DFFFFFFFD ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " DB BD ",
- "D B B D",
- "C B B C",
- "A B B A",
- "A B B A",
- "A B B A",
- "C B B C",
- "ZZZZZZZZZZZ"
- },
- {
- " DFFFFFFFD ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " DB BD ",
- "D B B D",
- "C B B C",
- "A B B A",
- "A B B A",
- "A B B A",
- "C B B C",
- "ZZZZZZZZZZZ"
- },
- {
- " DFFFFFFFD ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " DB BD ",
- "D B B D",
- "C B B C",
- "A B B A",
- "A B B A",
- "A B B A",
- "C B B C",
- "ZZZZZZZZZZZ"
- },
- {
- " DFFFFFFFD ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " AB BA ",
- " DB BD ",
- "D B B D",
- "C B B C",
- "A B B A",
- "A B B A",
- "A B B A",
- "C B B C",
- "ZZZZZZZZZZZ"
- },
- {
- " DFFFFFD ",
- " ABBBBBA ",
- " ABBBBBA ",
- " ABBBBBA ",
- " ABBBBBA ",
- " ABBBBBA ",
- " ABBBBBA ",
- " ABBBBBA ",
- " ABBBBBA ",
- " ABBBBBA ",
- " ABBBBBA ",
- " ABBBBBA ",
- " DBBBBBD ",
- " D BBBBB D ",
- " C BBBBB C ",
- " A BBBBB A ",
- " A BBBBB A ",
- " A BBBBB A ",
- " C BBBBB C ",
- " ZZZZZZZZZ "
- },
- {
- " DDDDD ",
- " AAAAA ",
- " AAAAA ",
- " AAAAA ",
- " AAAAA ",
- " AAAAA ",
- " AAAAA ",
- " AAAAA ",
- " AAAAA ",
- " AAAAA ",
- " AAAAA ",
- " AAAAA ",
- " DDDDD ",
- " D D ",
- " C C ",
- " A A ",
- " A A ",
- " A A ",
- " C C ",
- " ZZZZZZZ "
- },
- {
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " DDDDD ",
- " CCCCC ",
- " AAAAA ",
- " AAAAA ",
- " AAAAA ",
- " CCCCC ",
- " ZZZZZ "
- }
- })
- .addElement(
- 'B',
- ofChain(
- onElementPass(
- te -> te.hasNormalCoils = false,
- ofCoil(
- GregTechMetaTileEntity_MegaAlloyBlastSmelter::setCoilLevel,
- GregTechMetaTileEntity_MegaAlloyBlastSmelter::getCoilLevel)),
- onElementPass(
- te -> te.hasNormalCoils = true, ofBlock(ModBlocks.blockCasingsMisc, 14))))
- .addElement(
- 'Z',
- buildHatchAdder(GregTechMetaTileEntity_MegaAlloyBlastSmelter.class)
- .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Energy, ExoticEnergy)
- .casingIndex(TAE.GTPP_INDEX(15))
- .dot(1)
- .buildAndChain(ofBlock(ModBlocks.blockCasingsMisc, 15)))
- .addElement(
- 'E',
- buildHatchAdder(GregTechMetaTileEntity_MegaAlloyBlastSmelter.class)
- .atLeast(Maintenance)
- .casingIndex(TAE.GTPP_INDEX(15))
- .dot(2)
- .buildAndChain(ofBlock(ModBlocks.blockCasingsMisc, 15)))
- .addElement('D', ofBlock(ModBlocks.blockCasingsMisc, 15))
- .addElement('C', ofBlock(ModBlocks.blockCasingsMisc, 14))
- .addElement(
- 'A',
- BorosilicateGlass.ofBoroGlass((byte) -1, (te, t) -> te.glassTier = t, te -> te.glassTier))
- .addElement('F', Muffler.newAny(TAE.GTPP_INDEX(15), 3))
- .build();
+ private static final IStructureDefinition<GregTechMetaTileEntity_MegaAlloyBlastSmelter> STRUCTURE_DEFINITION = StructureDefinition
+ .<GregTechMetaTileEntity_MegaAlloyBlastSmelter>builder()
+ .addShape(
+ "main",
+ new String[][] {
+ { " ", " ", " ", " ", " ", " ",
+ " ", " ", " ", " ", " ",
+ " ", " ", " DDDDD ", " CCCCC ", " AEEEA ",
+ " AE~EA ", " AEEEA ", " CCCCC ", " ZZZZZ " },
+ { " DDDDD ", " AAAAA ", " AAAAA ", " AAAAA ", " AAAAA ", " AAAAA ",
+ " AAAAA ", " AAAAA ", " AAAAA ", " AAAAA ", " AAAAA ",
+ " AAAAA ", " DDDDD ", " D D ", " C C ", " A A ",
+ " A A ", " A A ", " C C ", " ZZZZZZZ " },
+ { " DFFFFFD ", " ABBBBBA ", " ABBBBBA ", " ABBBBBA ", " ABBBBBA ", " ABBBBBA ",
+ " ABBBBBA ", " ABBBBBA ", " ABBBBBA ", " ABBBBBA ", " ABBBBBA ",
+ " ABBBBBA ", " DBBBBBD ", " D BBBBB D ", " C BBBBB C ", " A BBBBB A ",
+ " A BBBBB A ", " A BBBBB A ", " C BBBBB C ", " ZZZZZZZZZ " },
+ { " DFFFFFFFD ", " AB BA ", " AB BA ", " AB BA ", " AB BA ", " AB BA ",
+ " AB BA ", " AB BA ", " AB BA ", " AB BA ", " AB BA ",
+ " AB BA ", " DB BD ", "D B B D", "C B B C", "A B B A",
+ "A B B A", "A B B A", "C B B C", "ZZZZZZZZZZZ" },
+ { " DFFFFFFFD ", " AB BA ", " AB BA ", " AB BA ", " AB BA ", " AB BA ",
+ " AB BA ", " AB BA ", " AB BA ", " AB BA ", " AB BA ",
+ " AB BA ", " DB BD ", "D B B D", "C B B C", "A B B A",
+ "A B B A", "A B B A", "C B B C", "ZZZZZZZZZZZ" },
+ { " DFFFFFFFD ", " AB BA ", " AB BA ", " AB BA ", " AB BA ", " AB BA ",
+ " AB BA ", " AB BA ", " AB BA ", " AB BA ", " AB BA ",
+ " AB BA ", " DB BD ", "D B B D", "C B B C", "A B B A",
+ "A B B A", "A B B A", "C B B C", "ZZZZZZZZZZZ" },
+ { " DFFFFFFFD ", " AB BA ", " AB BA ", " AB BA ", " AB BA ", " AB BA ",
+ " AB BA ", " AB BA ", " AB BA ", " AB BA ", " AB BA ",
+ " AB BA ", " DB BD ", "D B B D", "C B B C", "A B B A",
+ "A B B A", "A B B A", "C B B C", "ZZZZZZZZZZZ" },
+ { " DFFFFFFFD ", " AB BA ", " AB BA ", " AB BA ", " AB BA ", " AB BA ",
+ " AB BA ", " AB BA ", " AB BA ", " AB BA ", " AB BA ",
+ " AB BA ", " DB BD ", "D B B D", "C B B C", "A B B A",
+ "A B B A", "A B B A", "C B B C", "ZZZZZZZZZZZ" },
+ { " DFFFFFD ", " ABBBBBA ", " ABBBBBA ", " ABBBBBA ", " ABBBBBA ", " ABBBBBA ",
+ " ABBBBBA ", " ABBBBBA ", " ABBBBBA ", " ABBBBBA ", " ABBBBBA ",
+ " ABBBBBA ", " DBBBBBD ", " D BBBBB D ", " C BBBBB C ", " A BBBBB A ",
+ " A BBBBB A ", " A BBBBB A ", " C BBBBB C ", " ZZZZZZZZZ " },
+ { " DDDDD ", " AAAAA ", " AAAAA ", " AAAAA ", " AAAAA ", " AAAAA ",
+ " AAAAA ", " AAAAA ", " AAAAA ", " AAAAA ", " AAAAA ",
+ " AAAAA ", " DDDDD ", " D D ", " C C ", " A A ",
+ " A A ", " A A ", " C C ", " ZZZZZZZ " },
+ { " ", " ", " ", " ", " ", " ",
+ " ", " ", " ", " ", " ",
+ " ", " ", " DDDDD ", " CCCCC ", " AAAAA ",
+ " AAAAA ", " AAAAA ", " CCCCC ", " ZZZZZ " } })
+ .addElement(
+ 'B',
+ ofChain(
+ onElementPass(
+ te -> te.hasNormalCoils = false,
+ ofCoil(
+ GregTechMetaTileEntity_MegaAlloyBlastSmelter::setCoilLevel,
+ GregTechMetaTileEntity_MegaAlloyBlastSmelter::getCoilLevel)),
+ onElementPass(te -> te.hasNormalCoils = true, ofBlock(ModBlocks.blockCasingsMisc, 14))))
+ .addElement(
+ 'Z',
+ buildHatchAdder(GregTechMetaTileEntity_MegaAlloyBlastSmelter.class)
+ .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Energy, ExoticEnergy)
+ .casingIndex(TAE.GTPP_INDEX(15)).dot(1)
+ .buildAndChain(ofBlock(ModBlocks.blockCasingsMisc, 15)))
+ .addElement(
+ 'E',
+ buildHatchAdder(GregTechMetaTileEntity_MegaAlloyBlastSmelter.class).atLeast(Maintenance)
+ .casingIndex(TAE.GTPP_INDEX(15)).dot(2)
+ .buildAndChain(ofBlock(ModBlocks.blockCasingsMisc, 15)))
+ .addElement('D', ofBlock(ModBlocks.blockCasingsMisc, 15))
+ .addElement('C', ofBlock(ModBlocks.blockCasingsMisc, 14))
+ .addElement('A', BorosilicateGlass.ofBoroGlass((byte) -1, (te, t) -> te.glassTier = t, te -> te.glassTier))
+ .addElement('F', Muffler.newAny(TAE.GTPP_INDEX(15), 3)).build();
public GregTechMetaTileEntity_MegaAlloyBlastSmelter(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
@@ -372,18 +171,14 @@ public class GregTechMetaTileEntity_MegaAlloyBlastSmelter
currentParallels = RecipeFinderForParallel.handleParallelRecipe(recipe, tFluids, tItems, (int) parallels);
if (currentParallels <= 0) return false;
- GT_OverclockCalculator calculator = new GT_OverclockCalculator()
- .setRecipeEUt(recipe.mEUt)
- .setParallel(currentParallels)
- .setDuration(recipe.mDuration)
- .setEUt(tTotalEU)
- .calculate();
+ GT_OverclockCalculator calculator = new GT_OverclockCalculator().setRecipeEUt(recipe.mEUt)
+ .setParallel(currentParallels).setDuration(recipe.mDuration).setEUt(tTotalEU).calculate();
lEUt = calculator.getConsumption();
mMaxProgresstime = calculator.getDuration();
- Pair<ArrayList<FluidStack>, ArrayList<ItemStack>> outputs =
- RecipeFinderForParallel.getMultiOutput(recipe, currentParallels);
+ Pair<ArrayList<FluidStack>, ArrayList<ItemStack>> outputs = RecipeFinderForParallel
+ .getMultiOutput(recipe, currentParallels);
mMaxProgresstime -= coilLevel.getTier() < 0 ? 0 : mMaxProgresstime * getCoilDiscount(coilLevel);
@@ -487,28 +282,40 @@ public class GregTechMetaTileEntity_MegaAlloyBlastSmelter
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Fluid Alloy Cooker")
- .addInfo("Controller block for the Mega Alloy Blast Smelter")
- .addInfo("Runs the same recipes as the normal ABS, except with up to " + EnumChatFormatting.BOLD
- + EnumChatFormatting.UNDERLINE + MAX_PARALLELS + EnumChatFormatting.RESET
- + EnumChatFormatting.GRAY + " parallels.")
+ tt.addMachineType("Fluid Alloy Cooker").addInfo("Controller block for the Mega Alloy Blast Smelter")
+ .addInfo(
+ "Runs the same recipes as the normal ABS, except with up to " + EnumChatFormatting.BOLD
+ + EnumChatFormatting.UNDERLINE
+ + MAX_PARALLELS
+ + EnumChatFormatting.RESET
+ + EnumChatFormatting.GRAY
+ + " parallels.")
.addInfo("Every coil tier above cupronickel grants a speed bonus, based on this function:")
.addInfo("Bonus = TIER / 150, rounded to the nearest thousandth.")
- .addInfo(EnumChatFormatting.ITALIC
- + "Can also use normal ABS coils in their place instead, if you don't like the bonuses :)"
- + EnumChatFormatting.RESET + EnumChatFormatting.GRAY)
+ .addInfo(
+ EnumChatFormatting.ITALIC
+ + "Can also use normal ABS coils in their place instead, if you don't like the bonuses :)"
+ + EnumChatFormatting.RESET
+ + EnumChatFormatting.GRAY)
.addInfo("The glass limits the tier of the energy hatch. UEV glass unlocks all tiers.")
.addInfo("UV glass required for TecTech laser hatches.")
- .addInfo(EnumChatFormatting.ITALIC + "\"all it does is make metals hot\"" + EnumChatFormatting.RESET
- + EnumChatFormatting.GRAY)
+ .addInfo(
+ EnumChatFormatting.ITALIC + "\"all it does is make metals hot\""
+ + EnumChatFormatting.RESET
+ + EnumChatFormatting.GRAY)
.beginStructureBlock(11, 20, 11, false)
.addStructureInfo("This structure is too complex! See schematic for details.")
.addMaintenanceHatch("Around the controller", 2)
.addOtherStructurePart(
- "Input Bus, Output Bus, Input Hatch, Output Bus, Energy Hatch", "Bottom Casing", 1)
- .addMufflerHatch("At least 45", 3)
- .toolTipFinisher(EnumChatFormatting.AQUA + "MadMan310 " + EnumChatFormatting.GRAY + "via "
- + EnumChatFormatting.RED + "GT++");
+ "Input Bus, Output Bus, Input Hatch, Output Bus, Energy Hatch",
+ "Bottom Casing",
+ 1)
+ .addMufflerHatch("At least 45", 3).toolTipFinisher(
+ EnumChatFormatting.AQUA + "MadMan310 "
+ + EnumChatFormatting.GRAY
+ + "via "
+ + EnumChatFormatting.RED
+ + "GT++");
return tt;
}
@@ -526,30 +333,47 @@ public class GregTechMetaTileEntity_MegaAlloyBlastSmelter
}
}
- return new String[] {
- "------------ Critical Information ------------",
- StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + EnumChatFormatting.GREEN
- + GT_Utility.formatNumbers(mProgresstime) + EnumChatFormatting.RESET + "t / "
- + EnumChatFormatting.YELLOW
- + GT_Utility.formatNumbers(mMaxProgresstime) + EnumChatFormatting.RESET + "t",
- StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + EnumChatFormatting.GREEN
- + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / "
- + EnumChatFormatting.YELLOW
- + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU",
- StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + EnumChatFormatting.RED
- + GT_Utility.formatNumbers(-lEUt) + EnumChatFormatting.RESET + " EU/t",
- StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + EnumChatFormatting.YELLOW
- + GT_Utility.formatNumbers(getAverageInputVoltage())
- + EnumChatFormatting.RESET + " EU/t(*" + EnumChatFormatting.YELLOW
- + GT_Utility.formatNumbers(getMaxInputAmps())
- + EnumChatFormatting.RESET + "A) " + StatCollector.translateToLocal("GT5U.machines.tier")
- + ": " + EnumChatFormatting.YELLOW
- + GT_Values.VN[GT_Utility.getTier(getAverageInputVoltage())]
- + EnumChatFormatting.RESET,
- "Parallels: " + EnumChatFormatting.BLUE + paras + EnumChatFormatting.RESET,
- "Coil Discount: " + EnumChatFormatting.BLUE + discountP + "%" + EnumChatFormatting.RESET,
- "-----------------------------------------"
- };
+ return new String[] { "------------ Critical Information ------------",
+ StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": "
+ + EnumChatFormatting.GREEN
+ + GT_Utility.formatNumbers(mProgresstime)
+ + EnumChatFormatting.RESET
+ + "t / "
+ + EnumChatFormatting.YELLOW
+ + GT_Utility.formatNumbers(mMaxProgresstime)
+ + EnumChatFormatting.RESET
+ + "t",
+ StatCollector.translateToLocal("GT5U.multiblock.energy") + ": "
+ + EnumChatFormatting.GREEN
+ + GT_Utility.formatNumbers(storedEnergy)
+ + EnumChatFormatting.RESET
+ + " EU / "
+ + EnumChatFormatting.YELLOW
+ + GT_Utility.formatNumbers(maxEnergy)
+ + EnumChatFormatting.RESET
+ + " EU",
+ StatCollector.translateToLocal("GT5U.multiblock.usage") + ": "
+ + EnumChatFormatting.RED
+ + GT_Utility.formatNumbers(-lEUt)
+ + EnumChatFormatting.RESET
+ + " EU/t",
+ StatCollector.translateToLocal("GT5U.multiblock.mei") + ": "
+ + EnumChatFormatting.YELLOW
+ + GT_Utility.formatNumbers(getAverageInputVoltage())
+ + EnumChatFormatting.RESET
+ + " EU/t(*"
+ + EnumChatFormatting.YELLOW
+ + GT_Utility.formatNumbers(getMaxInputAmps())
+ + EnumChatFormatting.RESET
+ + "A) "
+ + StatCollector.translateToLocal("GT5U.machines.tier")
+ + ": "
+ + EnumChatFormatting.YELLOW
+ + GT_Values.VN[GT_Utility.getTier(getAverageInputVoltage())]
+ + EnumChatFormatting.RESET,
+ "Parallels: " + EnumChatFormatting.BLUE + paras + EnumChatFormatting.RESET,
+ "Coil Discount: " + EnumChatFormatting.BLUE + discountP + "%" + EnumChatFormatting.RESET,
+ "-----------------------------------------" };
}
@Override
@@ -558,32 +382,18 @@ public class GregTechMetaTileEntity_MegaAlloyBlastSmelter
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
if (aActive) {
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(15)),
- TextureFactory.builder()
- .addIcon(TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active)
- .extFacing()
- .build()
- };
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(15)),
+ TextureFactory.builder().addIcon(TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active)
+ .extFacing().build() };
}
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(15)),
- TextureFactory.builder()
- .addIcon(TexturesGtBlock.Overlay_Machine_Controller_Advanced)
- .extFacing()
- .build()
- };
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(15)), TextureFactory
+ .builder().addIcon(TexturesGtBlock.Overlay_Machine_Controller_Advanced).extFacing().build() };
}
- return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(15))};
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(15)) };
}
@Override
@@ -607,7 +417,8 @@ public class GregTechMetaTileEntity_MegaAlloyBlastSmelter
} else {
separateBusses = !separateBusses;
GT_Utility.sendChatToPlayer(
- aPlayer, StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + separateBusses);
+ aPlayer,
+ StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + separateBusses);
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Gas.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Gas.java
index 31715246fc..3f0d83114e 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Gas.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Gas.java
@@ -2,6 +2,12 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.t
import static gtPlusPlus.core.lib.CORE.RANDOM;
+import java.util.ArrayList;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.fluids.FluidStack;
+
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -9,10 +15,6 @@ import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gregtech.api.util.GT_Utility;
-import java.util.ArrayList;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.fluids.FluidStack;
@SuppressWarnings("deprecation")
public class GT_MTE_LargeTurbine_Gas extends GregtechMetaTileEntity_LargerTurbineBase {
@@ -67,9 +69,8 @@ public class GT_MTE_LargeTurbine_Gas extends GregtechMetaTileEntity_LargerTurbin
int tEU = 0;
int actualOptimalFlow = 0;
- FluidStack firstFuelType = new FluidStack(
- aFluids.get(0),
- 0); // Identify a SINGLE type of fluid to process. Doesn't matter which one. Ignore the rest!
+ FluidStack firstFuelType = new FluidStack(aFluids.get(0), 0); // Identify a SINGLE type of fluid to process.
+ // Doesn't matter which one. Ignore the rest!
int fuelValue = getFuelValue(firstFuelType);
// log("Fuel Value of "+aFluids.get(0).getLocalizedName()+" is "+fuelValue+"eu");
if (aOptFlow < fuelValue) {
@@ -85,8 +86,9 @@ public class GT_MTE_LargeTurbine_Gas extends GregtechMetaTileEntity_LargerTurbin
actualOptimalFlow = GT_Utility.safeInt((long) (aOptFlow * (double) flowMultipliers[1] / fuelValue));
this.realOptFlow = actualOptimalFlow;
- int remainingFlow = GT_Utility.safeInt((long) (actualOptimalFlow
- * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for
+ int remainingFlow = GT_Utility.safeInt((long) (actualOptimalFlow * 1.25f)); // Allowed to use up to 125% of
+ // optimal flow. Variable
+ // required outside of loop for
// multi-hatch scenarios.
int flow = 0;
int totalFlow = 0;
@@ -94,9 +96,8 @@ public class GT_MTE_LargeTurbine_Gas extends GregtechMetaTileEntity_LargerTurbin
storedFluid = 0;
for (FluidStack aFluid : aFluids) {
if (aFluid.isFluidEqual(firstFuelType)) {
- flow = Math.min(
- aFluid.amount,
- remainingFlow); // try to use up to 125% of optimal flow w/o exceeding remainingFlow
+ flow = Math.min(aFluid.amount, remainingFlow); // try to use up to 125% of optimal flow w/o
+ // exceeding remainingFlow
depleteInput(new FluidStack(aFluid, flow)); // deplete that amount
this.storedFluid += aFluid.amount;
remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Plasma.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Plasma.java
index b55d61baab..d30f44b737 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Plasma.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Plasma.java
@@ -1,5 +1,11 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.turbines;
+import java.util.ArrayList;
+
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -10,10 +16,6 @@ import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Turbine;
-import java.util.ArrayList;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
@SuppressWarnings("deprecation")
public class GT_MTE_LargeTurbine_Plasma extends GregtechMetaTileEntity_LargerTurbineBase {
@@ -63,21 +65,14 @@ public class GT_MTE_LargeTurbine_Plasma extends GregtechMetaTileEntity_LargerTur
}
@Override
- public boolean checkRecipeGeneric(
- ItemStack[] aItemInputs,
- FluidStack[] aFluidInputs,
- int aMaxParallelRecipes,
- long aEUPercent,
- int aSpeedBonusPercent,
- int aOutputChanceRoll,
- GT_Recipe aRecipe) {
+ public boolean checkRecipeGeneric(ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes,
+ long aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe) {
try {
ArrayList<GT_MetaTileEntity_Hatch_Turbine> aEmptyTurbineRotorHatches = getEmptyTurbineAssemblies();
if (aEmptyTurbineRotorHatches.size() > 0) {
log("Found " + aEmptyTurbineRotorHatches.size() + " Assemblies without Turbine.");
- hatch:
- for (GT_MetaTileEntity_Hatch_Turbine aHatch : aEmptyTurbineRotorHatches) {
+ hatch: for (GT_MetaTileEntity_Hatch_Turbine aHatch : aEmptyTurbineRotorHatches) {
ArrayList<ItemStack> aTurbines = getAllBufferedTurbines();
for (ItemStack aTurbineItem : aTurbines) {
if (aTurbineItem == null) {
@@ -101,8 +96,7 @@ public class GT_MTE_LargeTurbine_Plasma extends GregtechMetaTileEntity_LargerTur
ArrayList<FluidStack> tFluids = getStoredFluids();
if (tFluids.size() > 0) {
- if (baseEff == 0
- || optFlow == 0
+ if (baseEff == 0 || optFlow == 0
|| counter >= 512
|| this.getBaseMetaTileEntity().hasWorkJustBeenEnabled()
|| this.getBaseMetaTileEntity().hasInventoryBeenModified()) {
@@ -114,17 +108,18 @@ public class GT_MTE_LargeTurbine_Plasma extends GregtechMetaTileEntity_LargerTur
ItemStack aStack = getFullTurbineAssemblies().get(0).getTurbine();
for (int i = 0; i < getSpeedMultiplier(); i++) {
if (i == 0) {
- aTotalBaseEff += GT_Utility.safeInt((long)
- ((5F + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolCombatDamage(aStack))
+ aTotalBaseEff += GT_Utility.safeInt(
+ (long) ((5F
+ + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolCombatDamage(aStack))
* 1000F));
}
- aTotalOptimalFlow += GT_Utility.safeInt((long) Math.max(
- Float.MIN_NORMAL,
- ((GT_MetaGenerated_Tool) aStack.getItem())
- .getToolStats(aStack)
+ aTotalOptimalFlow += GT_Utility.safeInt(
+ (long) Math.max(
+ Float.MIN_NORMAL,
+ ((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack)
.getSpeedMultiplier()
- * GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolSpeed
- * 50));
+ * GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolSpeed
+ * 50));
if (aTotalOptimalFlow < 0) {
log("Int overflow, report to issue tracker");
aTotalOptimalFlow = 100;
@@ -154,8 +149,8 @@ public class GT_MTE_LargeTurbine_Plasma extends GregtechMetaTileEntity_LargerTur
// This is how much the turbine can actually change during this tick
int maxChangeAllowed = Math.max(10, GT_Utility.safeInt((long) Math.abs(difference) / 100));
- if (Math.abs(difference)
- > maxChangeAllowed) { // If this difference is too big, use the maximum allowed change
+ if (Math.abs(difference) > maxChangeAllowed) { // If this difference is too big, use the maximum allowed
+ // change
int change = maxChangeAllowed * (difference > 0 ? 1 : -1); // Make the change positive or negative.
this.lEUt += change; // Apply the change
} else {
@@ -169,7 +164,7 @@ public class GT_MTE_LargeTurbine_Plasma extends GregtechMetaTileEntity_LargerTur
} else {
this.mMaxProgresstime = 20;
this.mEfficiencyIncrease = 10;
- // Overvoltage is handled inside the MultiBlockBase when pushing out to dynamos. no need to do it here.
+ // Overvoltage is handled inside the MultiBlockBase when pushing out to dynamos. no need to do it here.
// Play sounds (GT++ addition - GT multiblocks play no sounds)
startProcess();
return true;
@@ -188,16 +183,16 @@ public class GT_MTE_LargeTurbine_Plasma extends GregtechMetaTileEntity_LargerTur
int actualOptimalFlow = 0;
- FluidStack firstFuelType = new FluidStack(
- aFluids.get(0),
- 0); // Identify a SINGLE type of fluid to process. Doesn't matter which one. Ignore the rest!
+ FluidStack firstFuelType = new FluidStack(aFluids.get(0), 0); // Identify a SINGLE type of fluid to process.
+ // Doesn't matter which one. Ignore the rest!
int fuelValue = getFuelValue(firstFuelType);
- actualOptimalFlow = GT_Utility.safeInt(
- (long) Math.ceil((double) aOptFlow * (double) flowMultipliers[2] / (double) fuelValue));
+ actualOptimalFlow = GT_Utility
+ .safeInt((long) Math.ceil((double) aOptFlow * (double) flowMultipliers[2] / (double) fuelValue));
this.realOptFlow = actualOptimalFlow; // For scanner info
- int remainingFlow = GT_Utility.safeInt((long) (actualOptimalFlow
- * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for
+ int remainingFlow = GT_Utility.safeInt((long) (actualOptimalFlow * 1.25f)); // Allowed to use up to 125% of
+ // optimal flow. Variable
+ // required outside of loop for
// multi-hatch scenarios.
int flow = 0;
int totalFlow = 0;
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SCSteam.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SCSteam.java
index c5b4697b1c..ea6753e7d7 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SCSteam.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SCSteam.java
@@ -1,5 +1,11 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.turbines;
+import java.util.ArrayList;
+
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -7,10 +13,6 @@ import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.util.math.MathUtils;
-import java.util.ArrayList;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
public class GT_MTE_LargeTurbine_SCSteam extends GregtechMetaTileEntity_LargerTurbineBase {
@@ -57,8 +59,8 @@ public class GT_MTE_LargeTurbine_SCSteam extends GregtechMetaTileEntity_LargerTu
int tEU = 0;
int totalFlow = 0; // Byproducts are based on actual flow
int flow = 0;
- int remainingFlow = MathUtils.safeInt((long) (aOptFlow
- * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for
+ int remainingFlow = MathUtils.safeInt((long) (aOptFlow * 1.25f)); // Allowed to use up to 125% of optimal flow.
+ // Variable required outside of loop for
// multi-hatch scenarios.
this.realOptFlow = (double) aOptFlow * (double) flowMultipliers[0];
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java
index d913abf9a8..4974508661 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java
@@ -1,5 +1,12 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.turbines;
+import java.util.ArrayList;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.fluids.FluidStack;
+
import gregtech.GT_Mod;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -10,11 +17,6 @@ import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
-import java.util.ArrayList;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.fluids.FluidStack;
@SuppressWarnings("deprecation")
public class GT_MTE_LargeTurbine_SHSteam extends GregtechMetaTileEntity_LargerTurbineBase {
@@ -77,8 +79,8 @@ public class GT_MTE_LargeTurbine_SHSteam extends GregtechMetaTileEntity_LargerTu
int tEU = 0;
int totalFlow = 0; // Byproducts are based on actual flow
int flow = 0;
- int remainingFlow = MathUtils.safeInt((long) (aOptFlow
- * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for
+ int remainingFlow = MathUtils.safeInt((long) (aOptFlow * 1.25f)); // Allowed to use up to 125% of optimal flow.
+ // Variable required outside of loop for
// multi-hatch scenarios.
this.realOptFlow = (double) aOptFlow * (double) flowMultipliers[0];
@@ -94,20 +96,16 @@ public class GT_MTE_LargeTurbine_SHSteam extends GregtechMetaTileEntity_LargerTu
if (!achievement) {
try {
GT_Mod.achievements.issueAchievement(
- this.getBaseMetaTileEntity()
- .getWorld()
- .getPlayerEntityByName(
- this.getBaseMetaTileEntity().getOwnerName()),
+ this.getBaseMetaTileEntity().getWorld()
+ .getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()),
"efficientsteam");
- } catch (Exception e) {
- }
+ } catch (Exception e) {}
achievement = true;
}
- } else if (fluidName.equals("fluid.steam")
- || fluidName.equals("ic2.fluidSteam")
+ } else if (fluidName.equals("fluid.steam") || fluidName.equals("ic2.fluidSteam")
|| fluidName.equals("fluid.mfr.steam.still.name")) {
- depleteInput(new FluidStack(aFluids.get(i), aFluids.get(i).amount));
- }
+ depleteInput(new FluidStack(aFluids.get(i), aFluids.get(i).amount));
+ }
}
if (totalFlow <= 0) return 0;
tEU = totalFlow;
@@ -133,7 +131,8 @@ public class GT_MTE_LargeTurbine_SHSteam extends GregtechMetaTileEntity_LargerTu
if (aSide == getBaseMetaTileEntity().getFrontFacing()) {
looseFit ^= true;
GT_Utility.sendChatToPlayer(
- aPlayer, looseFit ? "Fitting is Loose (Higher Flow)" : "Fitting is Tight (Higher Efficiency)");
+ aPlayer,
+ looseFit ? "Fitting is Loose (Higher Flow)" : "Fitting is Tight (Higher Efficiency)");
}
if (looseFit) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java
index cb58c8acc5..88af874326 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java
@@ -2,6 +2,13 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.t
import static gtPlusPlus.core.lib.CORE.RANDOM;
+import java.util.ArrayList;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.fluids.FluidStack;
+
import gregtech.GT_Mod;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -11,11 +18,6 @@ import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
-import java.util.ArrayList;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.fluids.FluidStack;
@SuppressWarnings("deprecation")
public class GT_MTE_LargeTurbine_Steam extends GregtechMetaTileEntity_LargerTurbineBase {
@@ -85,18 +87,16 @@ public class GT_MTE_LargeTurbine_Steam extends GregtechMetaTileEntity_LargerTurb
int tEU = 0;
int totalFlow = 0; // Byproducts are based on actual flow
int flow = 0;
- int remainingFlow = MathUtils.safeInt((long) (aOptFlow
- * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for
+ int remainingFlow = MathUtils.safeInt((long) (aOptFlow * 1.25f)); // Allowed to use up to 125% of optimal flow.
+ // Variable required outside of loop for
// multi-hatch scenarios.
this.realOptFlow = (double) aOptFlow * (double) flowMultipliers[0];
storedFluid = 0;
- for (int i = 0;
- i < aFluids.size() && remainingFlow > 0;
- i++) { // loop through each hatch; extract inputs and track totals.
+ for (int i = 0; i < aFluids.size() && remainingFlow > 0; i++) { // loop through each hatch; extract inputs and
+ // track totals.
String fluidName = aFluids.get(i).getFluid().getUnlocalizedName(aFluids.get(i));
- if (fluidName.equals("fluid.steam")
- || fluidName.equals("ic2.fluidSteam")
+ if (fluidName.equals("fluid.steam") || fluidName.equals("ic2.fluidSteam")
|| fluidName.equals("fluid.mfr.steam.still.name")) {
flow = Math.min(aFluids.get(i).amount, remainingFlow); // try to use up w/o exceeding remainingFlow
depleteInput(new FluidStack(aFluids.get(i), flow)); // deplete that amount
@@ -105,10 +105,8 @@ public class GT_MTE_LargeTurbine_Steam extends GregtechMetaTileEntity_LargerTurb
totalFlow += flow; // track total input used
if (!achievement) {
GT_Mod.achievements.issueAchievement(
- this.getBaseMetaTileEntity()
- .getWorld()
- .getPlayerEntityByName(
- this.getBaseMetaTileEntity().getOwnerName()),
+ this.getBaseMetaTileEntity().getWorld()
+ .getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()),
"muchsteam");
achievement = true;
}
@@ -141,7 +139,8 @@ public class GT_MTE_LargeTurbine_Steam extends GregtechMetaTileEntity_LargerTurb
if (aSide == getBaseMetaTileEntity().getFrontFacing()) {
looseFit ^= true;
GT_Utility.sendChatToPlayer(
- aPlayer, looseFit ? "Fitting: Loose - More Flow" : "Fitting: Tight - More Efficiency");
+ aPlayer,
+ looseFit ? "Fitting: Loose - More Flow" : "Fitting: Tight - More Efficiency");
}
if (looseFit) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java
index d6ce8e4bb2..f08fc1c9ea 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java
@@ -6,10 +6,21 @@ import static gregtech.api.enums.GT_HatchElement.*;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
import static gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase.GTPPHatchElement.TTDynamo;
+import java.util.ArrayList;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.StatCollector;
+import net.minecraftforge.fluids.FluidStack;
+
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.enums.Materials;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
@@ -34,18 +45,9 @@ import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Turbine;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
-import java.util.ArrayList;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.StatCollector;
-import net.minecraftforge.fluids.FluidStack;
-public abstract class GregtechMetaTileEntity_LargerTurbineBase
- extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_LargerTurbineBase>
- implements ISurvivalConstructable {
+public abstract class GregtechMetaTileEntity_LargerTurbineBase extends
+ GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_LargerTurbineBase> implements ISurvivalConstructable {
protected int baseEff = 0;
protected long optFlow = 0;
@@ -54,13 +56,12 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase
protected int counter = 0;
protected boolean mFastMode = false;
protected double mufflerReduction = 1;
- protected float[] flowMultipliers = new float[] {1, 1, 1};
+ protected float[] flowMultipliers = new float[] { 1, 1, 1 };
public ITexture frontFace;
public ITexture frontFaceActive;
- public ArrayList<GT_MetaTileEntity_Hatch_Turbine> mTurbineRotorHatches =
- new ArrayList<GT_MetaTileEntity_Hatch_Turbine>();
+ public ArrayList<GT_MetaTileEntity_Hatch_Turbine> mTurbineRotorHatches = new ArrayList<GT_MetaTileEntity_Hatch_Turbine>();
public GregtechMetaTileEntity_LargerTurbineBase(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
@@ -87,23 +88,17 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase
@Override
protected final GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the XL " + getTurbineType() + " Turbine")
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the XL " + getTurbineType() + " Turbine")
.addInfo("Runs as fast as 16 Large Turbines of the same type, takes the space of 12")
.addInfo("Right-click with screwdriver to enable Fast Mode, to run it even faster")
.addInfo("Optimal flow will increase or decrease accordingly on mode switch")
.addInfo("Fast Mode increases speed to 48x instead of 16x, with some penalties")
.addInfo("Maintenance problems and turbine damage happen 12x as often in Fast Mode")
.addInfo("XL Steam Turbines can use Loose Mode with either Slow or Fast Mode")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addInfo("Pollution is 3x higher in Fast Mode")
- .addSeparator()
- .beginStructureBlock(7, 9, 7, false)
- .addController("Top Middle")
- .addCasingInfo(getCasingName(), 360)
- .addCasingInfo("Rotor Shaft", 30)
- .addOtherStructurePart("Rotor Assembly", "Any 1 dot hint", 1)
- .addInputBus("Any 4 dot hint (min 1)", 4)
+ .addPollutionAmount(getPollutionPerSecond(null)).addInfo("Pollution is 3x higher in Fast Mode")
+ .addSeparator().beginStructureBlock(7, 9, 7, false).addController("Top Middle")
+ .addCasingInfo(getCasingName(), 360).addCasingInfo("Rotor Shaft", 30)
+ .addOtherStructurePart("Rotor Assembly", "Any 1 dot hint", 1).addInputBus("Any 4 dot hint (min 1)", 4)
.addInputHatch("Any 4 dot hint(min 1)", 4);
if (requiresOutputHatch()) {
tt.addOutputHatch("Any 4 dot hint(min 1)", 4);
@@ -117,48 +112,58 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase
}
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final ClassValue<IStructureDefinition<GregtechMetaTileEntity_LargerTurbineBase>>
- STRUCTURE_DEFINITION = new ClassValue<IStructureDefinition<GregtechMetaTileEntity_LargerTurbineBase>>() {
- @Override
- protected IStructureDefinition<GregtechMetaTileEntity_LargerTurbineBase> computeValue(Class<?> type) {
- return StructureDefinition.<GregtechMetaTileEntity_LargerTurbineBase>builder()
- // c = turbine casing
- // s = turbine shaft
- // t = turbine housing
- // h = dynamo/maint
- // m = muffler
- .addShape(STRUCTURE_PIECE_MAIN, (new String[][] {
- {"ccchccc", "ccccccc", "ccmmmcc", "ccm~mcc", "ccmmmcc", "ccccccc", "ccchccc"},
- {"ctchctc", "cscccsc", "cscccsc", "cscccsc", "cscccsc", "cscccsc", "ctchctc"},
- {"ccchccc", "ccccccc", "ccccccc", "ccccccc", "ccccccc", "ccccccc", "ccchccc"},
- {"ccchccc", "ccccccc", "ccccccc", "ccccccc", "ccccccc", "ccccccc", "ccchccc"},
- {"ctchctc", "cscccsc", "cscccsc", "cscccsc", "cscccsc", "cscccsc", "ctchctc"},
- {"ccchccc", "ccccccc", "ccccccc", "ccccccc", "ccccccc", "ccccccc", "ccchccc"},
- {"ccchccc", "ccccccc", "ccccccc", "ccccccc", "ccccccc", "ccccccc", "ccchccc"},
- {"ctchctc", "cscccsc", "cscccsc", "cscccsc", "cscccsc", "cscccsc", "ctchctc"},
- {"ccchccc", "ccccccc", "ccccccc", "ccccccc", "ccccccc", "ccccccc", "ccchccc"},
- }))
- .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMeta())))
- .addElement('s', lazy(t -> ofBlock(t.getShaftBlock(), t.getTurbineShaftMeta())))
- .addElement('t', lazy(t -> buildHatchAdder(GregtechMetaTileEntity_LargerTurbineBase.class)
- .adder(GregtechMetaTileEntity_LargerTurbineBase::addTurbineHatch)
- .hatchClass(GT_MetaTileEntity_Hatch_Turbine.class)
- .casingIndex(t.getCasingTextureIndex())
- .dot(1)
- .build()))
- .addElement('h', lazy(t -> buildHatchAdder(GregtechMetaTileEntity_LargerTurbineBase.class)
- .atLeast(InputBus, InputHatch, OutputHatch, Dynamo.or(TTDynamo), Maintenance)
- .casingIndex(t.getCasingTextureIndex())
- .dot(4)
- .buildAndChain(t.getCasingBlock(), t.getCasingMeta())))
- .addElement('m', lazy(t -> buildHatchAdder(GregtechMetaTileEntity_LargerTurbineBase.class)
- .atLeast(Muffler)
- .casingIndex(t.getCasingTextureIndex())
- .dot(7)
- .buildAndChain(t.getCasingBlock(), t.getCasingMeta())))
- .build();
- }
- };
+ private static final ClassValue<IStructureDefinition<GregtechMetaTileEntity_LargerTurbineBase>> STRUCTURE_DEFINITION = new ClassValue<IStructureDefinition<GregtechMetaTileEntity_LargerTurbineBase>>() {
+
+ @Override
+ protected IStructureDefinition<GregtechMetaTileEntity_LargerTurbineBase> computeValue(Class<?> type) {
+ return StructureDefinition.<GregtechMetaTileEntity_LargerTurbineBase>builder()
+ // c = turbine casing
+ // s = turbine shaft
+ // t = turbine housing
+ // h = dynamo/maint
+ // m = muffler
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ (new String[][] {
+ { "ccchccc", "ccccccc", "ccmmmcc", "ccm~mcc", "ccmmmcc", "ccccccc", "ccchccc" },
+ { "ctchctc", "cscccsc", "cscccsc", "cscccsc", "cscccsc", "cscccsc", "ctchctc" },
+ { "ccchccc", "ccccccc", "ccccccc", "ccccccc", "ccccccc", "ccccccc", "ccchccc" },
+ { "ccchccc", "ccccccc", "ccccccc", "ccccccc", "ccccccc", "ccccccc", "ccchccc" },
+ { "ctchctc", "cscccsc", "cscccsc", "cscccsc", "cscccsc", "cscccsc", "ctchctc" },
+ { "ccchccc", "ccccccc", "ccccccc", "ccccccc", "ccccccc", "ccccccc", "ccchccc" },
+ { "ccchccc", "ccccccc", "ccccccc", "ccccccc", "ccccccc", "ccccccc", "ccchccc" },
+ { "ctchctc", "cscccsc", "cscccsc", "cscccsc", "cscccsc", "cscccsc", "ctchctc" },
+ { "ccchccc", "ccccccc", "ccccccc", "ccccccc", "ccccccc", "ccccccc", "ccchccc" }, }))
+ .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMeta())))
+ .addElement('s', lazy(t -> ofBlock(t.getShaftBlock(), t.getTurbineShaftMeta())))
+ .addElement(
+ 't',
+ lazy(
+ t -> buildHatchAdder(GregtechMetaTileEntity_LargerTurbineBase.class)
+ .adder(GregtechMetaTileEntity_LargerTurbineBase::addTurbineHatch)
+ .hatchClass(GT_MetaTileEntity_Hatch_Turbine.class)
+ .casingIndex(t.getCasingTextureIndex()).dot(1).build()))
+ .addElement(
+ 'h',
+ lazy(
+ t -> buildHatchAdder(GregtechMetaTileEntity_LargerTurbineBase.class)
+ .atLeast(
+ InputBus,
+ InputHatch,
+ OutputHatch,
+ Dynamo.or(TTDynamo),
+ Maintenance)
+ .casingIndex(t.getCasingTextureIndex()).dot(4)
+ .buildAndChain(t.getCasingBlock(), t.getCasingMeta())))
+ .addElement(
+ 'm',
+ lazy(
+ t -> buildHatchAdder(GregtechMetaTileEntity_LargerTurbineBase.class)
+ .atLeast(Muffler).casingIndex(t.getCasingTextureIndex()).dot(7)
+ .buildAndChain(t.getCasingBlock(), t.getCasingMeta())))
+ .build();
+ }
+ };
@Override
public IStructureDefinition<GregtechMetaTileEntity_LargerTurbineBase> getStructureDefinition() {
@@ -199,20 +204,26 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase
// we do not check for casing count here. the bare minimal is 372 but we only require 360
boolean aStructure = checkPiece(STRUCTURE_PIECE_MAIN, 3, 3, 0);
log("Structure Check: " + aStructure);
- if (mTurbineRotorHatches.size() != 12
- || mMaintenanceHatches.size() != 1
+ if (mTurbineRotorHatches.size() != 12 || mMaintenanceHatches.size() != 1
|| (mDynamoHatches.size() < 1 && mTecTechDynamoHatches.size() < 1)
|| (requiresMufflers() && mMufflerHatches.size() != 4)
|| mInputBusses.size() < 1
|| mInputHatches.size() < 1
|| (requiresOutputHatch() && mOutputHatches.size() < 1)) {
- log("Bad Hatches - Turbine Housings: " + mTurbineRotorHatches.size() + ", Maint: "
- + mMaintenanceHatches.size() + ", Dynamo: "
- + mDynamoHatches.size() + ", Muffler: "
- + mMufflerHatches.size() + ", Input Buses: "
- + mInputBusses.size() + ", Input Hatches: "
- + mInputHatches.size() + ", Output Hatches: "
- + mOutputHatches.size());
+ log(
+ "Bad Hatches - Turbine Housings: " + mTurbineRotorHatches.size()
+ + ", Maint: "
+ + mMaintenanceHatches.size()
+ + ", Dynamo: "
+ + mDynamoHatches.size()
+ + ", Muffler: "
+ + mMufflerHatches.size()
+ + ", Input Buses: "
+ + mInputBusses.size()
+ + ", Input Hatches: "
+ + mInputHatches.size()
+ + ", Output Hatches: "
+ + mOutputHatches.size());
return false;
}
mufflerReduction = getMufflerReduction();
@@ -280,8 +291,7 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase
public abstract int getFuelValue(FluidStack aLiquid);
public static boolean isValidTurbine(ItemStack aTurbine) {
- return (aTurbine != null
- && aTurbine.getItem() instanceof GT_MetaGenerated_Tool
+ return (aTurbine != null && aTurbine.getItem() instanceof GT_MetaGenerated_Tool
&& aTurbine.getItemDamage() >= 170
&& aTurbine.getItemDamage() <= 176);
}
@@ -363,8 +373,7 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase
}
protected ArrayList<GT_MetaTileEntity_Hatch_Turbine> getEmptyTurbineAssemblies() {
- ArrayList<GT_MetaTileEntity_Hatch_Turbine> aEmptyTurbineRotorHatches =
- new ArrayList<GT_MetaTileEntity_Hatch_Turbine>();
+ ArrayList<GT_MetaTileEntity_Hatch_Turbine> aEmptyTurbineRotorHatches = new ArrayList<GT_MetaTileEntity_Hatch_Turbine>();
// log("Checking "+mTurbineRotorHatches.size()+" Assemblies for empties.");
for (GT_MetaTileEntity_Hatch_Turbine aTurbineHatch : this.mTurbineRotorHatches) {
if (!aTurbineHatch.hasTurbine()) {
@@ -376,8 +385,7 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase
}
protected ArrayList<GT_MetaTileEntity_Hatch_Turbine> getFullTurbineAssemblies() {
- ArrayList<GT_MetaTileEntity_Hatch_Turbine> aTurbineRotorHatches =
- new ArrayList<GT_MetaTileEntity_Hatch_Turbine>();
+ ArrayList<GT_MetaTileEntity_Hatch_Turbine> aTurbineRotorHatches = new ArrayList<GT_MetaTileEntity_Hatch_Turbine>();
// log("Checking "+mTurbineRotorHatches.size()+" Assemblies for Turbines.");
for (GT_MetaTileEntity_Hatch_Turbine aTurbineHatch : this.mTurbineRotorHatches) {
if (aTurbineHatch.hasTurbine()) {
@@ -411,25 +419,23 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase
@Override
public boolean checkRecipe(final ItemStack aStack) {
return checkRecipeGeneric(
- new ItemStack[] {}, getStoredFluids().toArray(new FluidStack[] {}), 1, 100, 100, 10000);
+ new ItemStack[] {},
+ getStoredFluids().toArray(new FluidStack[] {}),
+ 1,
+ 100,
+ 100,
+ 10000);
}
@Override
- public boolean checkRecipeGeneric(
- ItemStack[] aItemInputs,
- FluidStack[] aFluidInputs,
- int aMaxParallelRecipes,
- long aEUPercent,
- int aSpeedBonusPercent,
- int aOutputChanceRoll,
- GT_Recipe aRecipe) {
+ public boolean checkRecipeGeneric(ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes,
+ long aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe) {
try {
ArrayList<GT_MetaTileEntity_Hatch_Turbine> aEmptyTurbineRotorHatches = getEmptyTurbineAssemblies();
if (aEmptyTurbineRotorHatches.size() > 0) {
log("Found " + aEmptyTurbineRotorHatches.size() + " Assemblies without Turbine.");
- hatch:
- for (GT_MetaTileEntity_Hatch_Turbine aHatch : aEmptyTurbineRotorHatches) {
+ hatch: for (GT_MetaTileEntity_Hatch_Turbine aHatch : aEmptyTurbineRotorHatches) {
ArrayList<ItemStack> aTurbines = getAllBufferedTurbines();
for (ItemStack aTurbineItem : aTurbines) {
if (aTurbineItem == null) {
@@ -453,8 +459,7 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase
ArrayList<FluidStack> tFluids = getStoredFluids();
if (tFluids.size() > 0) {
- if (baseEff == 0
- || optFlow == 0
+ if (baseEff == 0 || optFlow == 0
|| counter >= 512
|| this.getBaseMetaTileEntity().hasWorkJustBeenEnabled()
|| this.getBaseMetaTileEntity().hasInventoryBeenModified()) {
@@ -467,18 +472,19 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase
ItemStack aStack = getFullTurbineAssemblies().get(0).getTurbine();
for (int i = 0; i < getSpeedMultiplier(); i++) {
if (i == 0) {
- aTotalBaseEff += GT_Utility.safeInt((long)
- ((5F + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolCombatDamage(aStack))
+ aTotalBaseEff += GT_Utility.safeInt(
+ (long) ((5F
+ + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolCombatDamage(aStack))
* 1000F));
// log("Bumped base eff to "+aTotalBaseEff);
}
- aTotalOptimalFlow += GT_Utility.safeInt((long) Math.max(
- Float.MIN_NORMAL,
- ((GT_MetaGenerated_Tool) aStack.getItem())
- .getToolStats(aStack)
+ aTotalOptimalFlow += GT_Utility.safeInt(
+ (long) Math.max(
+ Float.MIN_NORMAL,
+ ((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack)
.getSpeedMultiplier()
- * GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolSpeed
- * 50));
+ * GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolSpeed
+ * 50));
if (aTotalOptimalFlow < 0) {
log("Int overflow, report to issue tracker");
aTotalOptimalFlow = 100;
@@ -522,8 +528,8 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase
int maxChangeAllowed = Math.max(10, GT_Utility.safeInt((long) Math.abs(difference) / 100));
// log("Max Change Allowed: "+maxChangeAllowed);
- if (Math.abs(difference)
- > maxChangeAllowed) { // If this difference is too big, use the maximum allowed change
+ if (Math.abs(difference) > maxChangeAllowed) { // If this difference is too big, use the maximum allowed
+ // change
int change = maxChangeAllowed * (difference > 0 ? 1 : -1); // Make the change positive or negative.
this.lEUt += change; // Apply the change
// log("Applied power change.");
@@ -540,7 +546,7 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase
} else {
this.mMaxProgresstime = 1;
this.mEfficiencyIncrease = 10;
- // Overvoltage is handled inside the MultiBlockBase when pushing out to dynamos. no need to do it here.
+ // Overvoltage is handled inside the MultiBlockBase when pushing out to dynamos. no need to do it here.
// Play sounds (GT++ addition - GT multiblocks play no sounds)
startProcess();
// log("GOOD RETURN - Making: "+this.mEUt+" EU/t");
@@ -625,34 +631,25 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase
int mPollutionReduction = (int) (100 * mufflerReduction);
String tRunning = mMaxProgresstime > 0
- ? EnumChatFormatting.GREEN
- + StatCollector.translateToLocal("GT5U.turbine.running.true")
+ ? EnumChatFormatting.GREEN + StatCollector.translateToLocal("GT5U.turbine.running.true")
+ EnumChatFormatting.RESET
- : EnumChatFormatting.RED
- + StatCollector.translateToLocal("GT5U.turbine.running.false")
+ : EnumChatFormatting.RED + StatCollector.translateToLocal("GT5U.turbine.running.false")
+ EnumChatFormatting.RESET;
String tMaintainance = getIdealStatus() == getRepairStatus()
- ? EnumChatFormatting.GREEN
- + StatCollector.translateToLocal("GT5U.turbine.maintenance.false")
+ ? EnumChatFormatting.GREEN + StatCollector.translateToLocal("GT5U.turbine.maintenance.false")
+ EnumChatFormatting.RESET
- : EnumChatFormatting.RED
- + StatCollector.translateToLocal("GT5U.turbine.maintenance.true")
+ : EnumChatFormatting.RED + StatCollector.translateToLocal("GT5U.turbine.maintenance.true")
+ EnumChatFormatting.RESET;
int tDura = 0;
StringBuilder aTurbineDamage = new StringBuilder();
for (GT_MetaTileEntity_Hatch_Turbine aHatch : this.getFullTurbineAssemblies()) {
ItemStack aTurbine = aHatch.getTurbine();
- tDura = MathUtils.safeInt((long) (100.0f
- / GT_MetaGenerated_Tool.getToolMaxDamage(aTurbine)
- * (GT_MetaGenerated_Tool.getToolDamage(aTurbine))
- + 1));
- aTurbineDamage
- .append(EnumChatFormatting.RED)
- .append(tDura)
- .append(EnumChatFormatting.RESET)
- .append("% | ");
+ tDura = MathUtils.safeInt(
+ (long) (100.0f / GT_MetaGenerated_Tool.getToolMaxDamage(aTurbine)
+ * (GT_MetaGenerated_Tool.getToolDamage(aTurbine)) + 1));
+ aTurbineDamage.append(EnumChatFormatting.RED).append(tDura).append(EnumChatFormatting.RESET).append("% | ");
}
long storedEnergy = 0;
@@ -667,31 +664,53 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase
boolean aIsSteam = this.getClass().getName().toLowerCase().contains("steam");
String[] ret = new String[] {
- // 8 Lines available for information panels
- tRunning + ": " + EnumChatFormatting.RED + ((lEUt * mEfficiency) / 10000) + EnumChatFormatting.RESET
- + " EU/t",
- tMaintainance,
- StatCollector.translateToLocal("GT5U.turbine.efficiency") + ": " + EnumChatFormatting.YELLOW
- + (mEfficiency / 100F) + EnumChatFormatting.RESET + "%",
- StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + EnumChatFormatting.GREEN
- + storedEnergy + EnumChatFormatting.RESET + " EU / " + EnumChatFormatting.YELLOW
- + maxEnergy + EnumChatFormatting.RESET + " EU",
- StatCollector.translateToLocal("GT5U.turbine.flow") + ": " + EnumChatFormatting.YELLOW
- + MathUtils.safeInt((long) realOptFlow) + EnumChatFormatting.RESET + " L/s"
- + EnumChatFormatting.YELLOW + " ("
- + (isLooseMode()
- ? StatCollector.translateToLocal("GT5U.turbine.loose")
- : StatCollector.translateToLocal("GT5U.turbine.tight"))
- + ")",
- StatCollector.translateToLocal("GT5U.turbine.fuel") + ": " + EnumChatFormatting.GOLD + storedFluid
- + EnumChatFormatting.RESET + "L",
- StatCollector.translateToLocal("GT5U.turbine.dmg") + ": " + aTurbineDamage,
- StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + EnumChatFormatting.GREEN
- + mPollutionReduction + EnumChatFormatting.RESET + " %"
- };
- if (!aIsSteam)
- ret[4] = StatCollector.translateToLocal("GT5U.turbine.flow") + ": " + EnumChatFormatting.YELLOW
- + MathUtils.safeInt((long) realOptFlow) + EnumChatFormatting.RESET + " L/t";
+ // 8 Lines available for information panels
+ tRunning + ": "
+ + EnumChatFormatting.RED
+ + ((lEUt * mEfficiency) / 10000)
+ + EnumChatFormatting.RESET
+ + " EU/t",
+ tMaintainance,
+ StatCollector.translateToLocal("GT5U.turbine.efficiency") + ": "
+ + EnumChatFormatting.YELLOW
+ + (mEfficiency / 100F)
+ + EnumChatFormatting.RESET
+ + "%",
+ StatCollector.translateToLocal("GT5U.multiblock.energy") + ": "
+ + EnumChatFormatting.GREEN
+ + storedEnergy
+ + EnumChatFormatting.RESET
+ + " EU / "
+ + EnumChatFormatting.YELLOW
+ + maxEnergy
+ + EnumChatFormatting.RESET
+ + " EU",
+ StatCollector.translateToLocal("GT5U.turbine.flow") + ": "
+ + EnumChatFormatting.YELLOW
+ + MathUtils.safeInt((long) realOptFlow)
+ + EnumChatFormatting.RESET
+ + " L/s"
+ + EnumChatFormatting.YELLOW
+ + " ("
+ + (isLooseMode() ? StatCollector.translateToLocal("GT5U.turbine.loose")
+ : StatCollector.translateToLocal("GT5U.turbine.tight"))
+ + ")",
+ StatCollector.translateToLocal("GT5U.turbine.fuel") + ": "
+ + EnumChatFormatting.GOLD
+ + storedFluid
+ + EnumChatFormatting.RESET
+ + "L",
+ StatCollector.translateToLocal("GT5U.turbine.dmg") + ": " + aTurbineDamage,
+ StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": "
+ + EnumChatFormatting.GREEN
+ + mPollutionReduction
+ + EnumChatFormatting.RESET
+ + " %" };
+ if (!aIsSteam) ret[4] = StatCollector.translateToLocal("GT5U.turbine.flow") + ": "
+ + EnumChatFormatting.YELLOW
+ + MathUtils.safeInt((long) realOptFlow)
+ + EnumChatFormatting.RESET
+ + " L/t";
return ret;
}
@@ -752,19 +771,11 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase
}
@Override
- public final ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1],
- aFacing == aSide
- ? getFrontFacingTurbineTexture(aActive)
- : Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex())
- };
+ public final ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing,
+ byte aColorIndex, boolean aActive, boolean aRedstone) {
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1],
+ aFacing == aSide ? getFrontFacingTurbineTexture(aActive)
+ : Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex()) };
}
protected ITexture getFrontFacingTurbineTexture(boolean isActive) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_MultiTank.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_MultiTank.java
index d7e4a45191..be191fcc59 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_MultiTank.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_MultiTank.java
@@ -1,584 +1,270 @@
/*
-package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage;
-
-
-public class GregtechMetaTileEntity_MultiTank
-extends GregtechMeta_MultiBlockBase {
- public GregtechMetaTileEntity_MultiTank(final int aID, final String aName, final String aNameRegional) {
- super(aID, aName, aNameRegional);
- }
-
- private short multiblockCasingCount = 0;
- private int mInternalSaveClock = 0;
- private final short storageMultiplier = 1;
- private int maximumFluidStorage = 128000;
- private FluidStack internalStorageTank = null;
- private final NBTTagCompound internalCraftingComponentsTag = new NBTTagCompound();
-
- @Override
- public String getMachineType() {
- return "Fluid Tank";
- }
-
- @Override
- public String[] getExtraInfoData() {
- final ArrayList<GT_MetaTileEntity_Hatch_Energy> mTier = this.mEnergyHatches;
- if (!mTier.isEmpty()){
- final int temp = mTier.get(0).mTier;
- if (this.internalStorageTank == null) {
- return new String[]{
- GT_Values.VOLTAGE_NAMES[temp]+" Large Fluid Tank",
- "Stored Fluid: No Fluid",
- "Internal | Current: "+Integer.toString(0) + "L",
- "Internal | Maximum: "+Integer.toString(this.maximumFluidStorage) + "L"};
- }
- return new String[]{
- GT_Values.VOLTAGE_NAMES[temp]+" Large Fluid Tank",
- "Stored Fluid: "+this.internalStorageTank.getLocalizedName(),
- "Internal | Current: "+Integer.toString(this.internalStorageTank.amount) + "L",
- "Internal | Maximum: "+Integer.toString(this.maximumFluidStorage) + "L"};
- }
- return new String[]{
- "Voltage Tier not set -" +" Large Fluid Tank",
- "Stored Fluid: No Fluid",
- "Internal | Current: "+Integer.toString(0) + "L",
- "Internal | Maximum: "+Integer.toString(this.maximumFluidStorage) + "L"};
- }
-
- @Override
- public void saveNBTData(final NBTTagCompound aNBT) {
- super.saveNBTData(aNBT);
- */
-/*final NBTTagCompound gtCraftingComponentsTag = aNBT.getCompoundTag("GT.CraftingComponents");
-if (gtCraftingComponentsTag != null){
-
- Utils.LOG_WARNING("Got Crafting Tag");
-
- if (this.internalStorageTank != null){
- Utils.LOG_WARNING("mFluid was not null, Saving TileEntity NBT data.");
-
- gtCraftingComponentsTag.setString("xFluid", this.internalStorageTank.getFluid().getName());
- gtCraftingComponentsTag.setInteger("xAmount", this.internalStorageTank.amount);
- gtCraftingComponentsTag.setLong("xAmountMax", this.maximumFluidStorage);
-
- aNBT.setTag("GT.CraftingComponents", gtCraftingComponentsTag);
- }
- else {
- Utils.LOG_WARNING("mFluid was null, Saving TileEntity NBT data.");
- gtCraftingComponentsTag.removeTag("xFluid");
- gtCraftingComponentsTag.removeTag("xAmount");
- gtCraftingComponentsTag.removeTag("xAmountMax");
- gtCraftingComponentsTag.setLong("xAmountMax", this.maximumFluidStorage);
-
-
- aNBT.setTag("GT.CraftingComponents", gtCraftingComponentsTag);
- }
-}*//*
-
- }
-
- @Override
- public void loadNBTData(final NBTTagCompound aNBT) {
- super.loadNBTData(aNBT);
- */
-/*final NBTTagCompound gtCraftingComponentsTag = aNBT.getCompoundTag("GT.CraftingComponents");
-String xFluid = null;
-int xAmount = 0;
-if (gtCraftingComponentsTag.hasNoTags()){
- if (this.internalStorageTank != null){
- Utils.LOG_WARNING("mFluid was not null, Creating TileEntity NBT data.");
- gtCraftingComponentsTag.setInteger("xAmount", this.internalStorageTank.amount);
- gtCraftingComponentsTag.setString("xFluid", this.internalStorageTank.getFluid().getName());
- aNBT.setTag("GT.CraftingComponents", gtCraftingComponentsTag);
- }
-}
-else {
-
- //internalCraftingComponentsTag = gtCraftingComponentsTag.getCompoundTag("backupTag");
-
- if (gtCraftingComponentsTag.hasKey("xFluid")){
- Utils.LOG_WARNING("xFluid was not null, Loading TileEntity NBT data.");
- xFluid = gtCraftingComponentsTag.getString("xFluid");
- }
- if (gtCraftingComponentsTag.hasKey("xAmount")){
- Utils.LOG_WARNING("xAmount was not null, Loading TileEntity NBT data.");
- xAmount = gtCraftingComponentsTag.getInteger("xAmount");
- }
- if ((xFluid != null) && (xAmount != 0)){
- Utils.LOG_WARNING("Setting Internal Tank, loading "+xAmount+"L of "+xFluid);
- this.setInternalTank(xFluid, xAmount);
- }
-}*//*
-
- }
-
- private boolean setInternalTank(final String fluidName, final int amount){
- final FluidStack temp = FluidUtils.getFluidStack(fluidName, amount);
- if (temp != null){
- if (this.internalStorageTank == null){
- this.internalStorageTank = temp;
- Logger.WARNING(temp.getFluid().getName()+" Amount: "+temp.amount+"L");
- }
- else{
- Logger.WARNING("Retained Fluid.");
- Logger.WARNING(this.internalStorageTank.getFluid().getName()+" Amxount: "+this.internalStorageTank.amount+"L");
- }
- this.markDirty();
- return true;
- }
- return false;
- }
-
- @Override
- public void onLeftclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) {
- this.tryForceNBTUpdate();
- super.onLeftclick(aBaseMetaTileEntity, aPlayer);
- }
-
- @Override
- public boolean onWrenchRightClick(final byte aSide, final byte aWrenchingSide, final EntityPlayer aPlayer, final float aX, final float aY, final float aZ) {
- this.tryForceNBTUpdate();
- return super.onWrenchRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ);
- }
-
- @Override
- public void onRemoval() {
- this.tryForceNBTUpdate();
- super.onRemoval();
- }
-
-
- @Override
- public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
- super.onPostTick(aBaseMetaTileEntity, aTick);
-
- if ((this.internalStorageTank != null) && this.internalStorageTank.amount >= this.maximumFluidStorage){
- if (this.internalStorageTank.amount > this.maximumFluidStorage){
- this.internalStorageTank.amount = this.maximumFluidStorage;
- }
- this.stopMachine();
- }
-
- if (this.mInternalSaveClock != 20){
- this.mInternalSaveClock++;
- }
- else {
- this.mInternalSaveClock = 0;
- this.tryForceNBTUpdate();
- }
-
- }
-
- public GregtechMetaTileEntity_MultiTank(final String aName) {
- super(aName);
- }
-
- @Override
- public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntity_MultiTank(this.mName);
- }
-
- @Override
- public String[] getTooltip() {
- return new String[]{
- "Controller Block for the Multitank",
- "Size: 3xHx3 (Block behind controller must be air)",
- "Structure must be at least 4 blocks tall, maximum 20.",
- "Each casing within the structure adds 128000L storage.",
- "Multitank Exterior Casings (16 at least!)",
- "Controller (front centered)",
- "1x Input hatch",
- "1x Output hatch",
- "1x Energy Hatch",
- };
- }
-
- @Override
- public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
- if (aSide == aFacing) {
- return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(11)), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Screen_Logo : TexturesGtBlock.Overlay_Machine_Screen_Logo)};
- }
- return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(11))};
- }
-
- @Override
- public GT_Recipe.GT_Recipe_Map getRecipeMap() {
- return null;
- }
-
- @Override
- public boolean isFacingValid(final byte aFacing) {
- return aFacing > 1;
- }
-
- @Override
- public boolean checkRecipe(final ItemStack aStack) {
-
- final ArrayList<ItemStack> tInputList = this.getStoredInputs();
- for (int i = 0; i < (tInputList.size() - 1); i++) {
- for (int j = i + 1; j < tInputList.size(); j++) {
- if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) {
- if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) {
- tInputList.remove(j--);
- } else {
- tInputList.remove(i--);
- break;
- }
- }
- }
- }
- final ItemStack[] tInputs = Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
-
- final ArrayList<FluidStack> tFluidList = this.getStoredFluids();
- for (int i = 0; i < (tFluidList.size() - 1); i++) {
- for (int j = i + 1; j < tFluidList.size(); j++) {
- if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) {
- if (tFluidList.get(i).amount >= tFluidList.get(j).amount) {
- tFluidList.remove(j--);
- } else {
- tFluidList.remove(i--);
- break;
- }
- }
- }
- }
- final FluidStack[] tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[1]), 0, 1);
-
- if (tFluids.length >= 2){
- Logger.WARNING("Bad");
- return false;
- }
-
- final ArrayList<Pair<GT_MetaTileEntity_Hatch_Input, Boolean>> rList = new ArrayList<>();
- int slotInputCount = 0;
- for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) {
- boolean containsFluid = false;
- if (isValidMetaTileEntity(tHatch)) {
- slotInputCount++;
- for (int i=0; i<tHatch.getBaseMetaTileEntity().getSizeInventory(); i++) {
- if (tHatch.canTankBeEmptied()){containsFluid=true;}
- }
- rList.add(new Pair<>(tHatch, containsFluid));
- }
- }
- if ((tFluids.length <= 0) || (slotInputCount > 1)){
- Logger.WARNING("Bad");
- return false;
- }
-
- Logger.WARNING("Okay - 2");
- if (this.internalStorageTank == null){
- Logger.WARNING("Okay - 3");
- if ((rList.get(0).getKey().mFluid != null) && (rList.get(0).getKey().mFluid.amount > 0)){
- Logger.WARNING("Okay - 4");
- Logger.WARNING("Okay - 1"+" rList.get(0).getKey().mFluid.amount: "+rList.get(0).getKey().mFluid.amount */
-/*+" internalStorageTank:"+internalStorageTank.amount*//*
- );
- final FluidStack tempFluidStack = rList.get(0).getKey().mFluid;
- final Fluid tempFluid = tempFluidStack.getFluid();
- this.internalStorageTank = FluidUtils.getFluidStack(tempFluid.getName(), tempFluidStack.amount);
- rList.get(0).getKey().mFluid.amount = 0;
- Logger.WARNING("Okay - 1.1"+" rList.get(0).getKey().mFluid.amount: "+rList.get(0).getKey().mFluid.amount +" internalStorageTank:"+this.internalStorageTank.amount);
- return true;
- }
- Logger.WARNING("No Fluid in hatch.");
- return false;
- }
- else if (this.internalStorageTank.isFluidEqual(rList.get(0).getKey().mFluid)){
- Logger.WARNING("Storing "+rList.get(0).getKey().mFluid.amount+"L");
- Logger.WARNING("Contains "+this.internalStorageTank.amount+"L");
-
-
- int tempAdd = 0;
- tempAdd = rList.get(0).getKey().getFluidAmount();
- rList.get(0).getKey().mFluid = null;
- Logger.WARNING("adding "+tempAdd);
- this.internalStorageTank.amount = this.internalStorageTank.amount + tempAdd;
- Logger.WARNING("Tank now Contains "+this.internalStorageTank.amount+"L of "+this.internalStorageTank.getFluid().getName()+".");
-
-
- //Utils.LOG_WARNING("Tank");
- return true;
- }
- else {
- final FluidStack superTempFluidStack = rList.get(0).getKey().mFluid;
- Logger.WARNING("is input fluid equal to stored fluid? "+(this.internalStorageTank.isFluidEqual(superTempFluidStack)));
- if (superTempFluidStack != null) {
- Logger.WARNING("Input hatch[0] Contains "+superTempFluidStack.amount+"L of "+superTempFluidStack.getFluid().getName()+".");
- }
- Logger.WARNING("Large Multi-Tank Contains "+this.internalStorageTank.amount+"L of "+this.internalStorageTank.getFluid().getName()+".");
-
- if (this.internalStorageTank.amount <= 0){
- Logger.WARNING("Internal Tank is empty, sitting idle.");
- return false;
- }
-
- if ((this.mOutputHatches.get(0).mFluid == null) || this.mOutputHatches.isEmpty() || (this.mOutputHatches.get(0).mFluid.isFluidEqual(this.internalStorageTank) && (this.mOutputHatches.get(0).mFluid.amount < this.mOutputHatches.get(0).getCapacity()))){
- Logger.WARNING("Okay - 3");
- final int tempCurrentStored = this.internalStorageTank.amount;
- int tempResult = 0;
- final int tempHatchSize = this.mOutputHatches.get(0).getCapacity();
- final int tempHatchCurrentHolding = this.mOutputHatches.get(0).getFluidAmount();
- final int tempHatchRemainingSpace = tempHatchSize - tempHatchCurrentHolding;
- final FluidStack tempOutputFluid = this.internalStorageTank;
- if (tempHatchRemainingSpace <= 0){
- return false;
- }
- Logger.WARNING("Okay - 3.1.x"+" hatchCapacity: "+tempHatchSize +" tempCurrentStored: "+tempCurrentStored+" output hatch holds: "+tempHatchCurrentHolding+" tank has "+tempHatchRemainingSpace+"L of space left.");
-
- if (tempHatchSize >= tempHatchRemainingSpace){
- Logger.WARNING("Okay - 3.1.1"+" hatchCapacity: "+tempHatchSize +" tempCurrentStored: "+tempCurrentStored+" output hatch holds: "+tempHatchCurrentHolding+" tank has "+tempHatchRemainingSpace+"L of space left.");
-
- int adder;
- if ((tempCurrentStored > 0) && (tempCurrentStored <= tempHatchSize)){
- adder = tempCurrentStored;
- if (adder >= tempHatchRemainingSpace){
- adder = tempHatchRemainingSpace;
- }
- }
- else {
- adder = 0;
- if (tempCurrentStored >= tempHatchRemainingSpace){
- adder = tempHatchRemainingSpace;
- }
- }
-
- tempResult = adder;
- tempOutputFluid.amount = tempResult;
- Logger.WARNING("Okay - 3.1.2"+" result: "+tempResult +" tempCurrentStored: "+tempCurrentStored + " filling output hatch with: "+tempOutputFluid.amount+"L of "+tempOutputFluid.getFluid().getName());
- this.mOutputHatches.get(0).fill(tempOutputFluid, true);
- //mOutputHatches.get(0).mFluid.amount = tempResult;
- this.internalStorageTank.amount = (tempCurrentStored-adder);
- Logger.WARNING("Okay - 3.1.3"+" internalTankStorage: "+this.internalStorageTank.amount +"L | output hatch contains: "+this.mOutputHatches.get(0).mFluid.amount+"L of "+this.mOutputHatches.get(0).mFluid.getFluid().getName());
- */
-/*if (internalStorageTank.amount <= 0)
-internalStorageTank = null;*//*
-
- }
- Logger.WARNING("Tank ok.");
- return true;
- }
- }
- //this.getBaseMetaTileEntity().(tFluids[0].amount, true);
- Logger.WARNING("Tank");
- return false;
- }
-
- @Override
- public int getMaxParallelRecipes() {
- return 1;
- }
-
- @Override
- public int getEuDiscountForParallelism() {
- return 0;
- }
-
- @Override
- public boolean checkMultiblock(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
- final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
- final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
- if (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) {
- Logger.WARNING("Must be hollow.");
- return false;
- }
- int tAmount = 0;
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 2; j++) {
- for (int h = -1; h < 19; h++) {
- if ((h != 0) || ((((xDir + i) != 0) || ((zDir + j) != 0)) && ((i != 0) || (j != 0)))) {
- final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
- if ((!this.addMaintenanceToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) && (!this.addInputToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) && (!this.addOutputToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) && (!this.addEnergyInputToMachineList(tTileEntity, TAE.GTPP_INDEX(11)))) {
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- if (h < 3){
- Logger.WARNING("Casing Expected.");
- return false;
- }
- else if (h >= 3){
- //Utils.LOG_WARNING("Your Multitank can be 20 blocks tall.");
- }
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 11) {
- if (h < 3){
- Logger.WARNING("Wrong Meta.");
- return false;
- }
- else if (h >= 3){
- //Utils.LOG_WARNING("Your Multitank can be 20 blocks tall.");
- }
- }
- if (h < 3){
- tAmount++;
- }
- else if (h >= 3){
- if ((aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) == Blocks.air) || aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName().contains("residual")){
- Logger.WARNING("Found air");
- }
- else {
- Logger.WARNING("Layer "+(h+2)+" is complete. Adding "+(64000*9)+"L storage to the tank.");
- tAmount++;
- }
- }
- }
- }
- }
- }
- }
- this.multiblockCasingCount = (short) tAmount;
- this.maximumFluidStorage = getMaximumTankStorage(tAmount);
- Logger.INFO("Your Multitank can be 20 blocks tall.");
- Logger.INFO("Casings Count: "+this.multiblockCasingCount+" Valid Multiblock: "+(tAmount >= 16)+" Tank Storage Capacity:"+this.maximumFluidStorage+"L");
- this.tryForceNBTUpdate();
- return tAmount >= 16;
- }
-
- */
-/*public int countCasings() {
- Utils.LOG_INFO("Counting Machine Casings");
- try{
- if (this.getBaseMetaTileEntity().getWorld() == null){
- Utils.LOG_INFO("Tile Entity's world was null for casing count.");
- return 0;
- }
- if (this.getBaseMetaTileEntity() == null){
- Utils.LOG_INFO("Tile Entity was null for casing count.");
- return 0;
- }
- } catch(NullPointerException r){
- Utils.LOG_INFO("Null Pointer Exception caught.");
- return 0;
- }
- int xDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetZ;
- if (!this.getBaseMetaTileEntity().getAirOffset(xDir, 0, zDir)) {
- Utils.LOG_INFO("Failed due to air being misplaced.");
- Utils.LOG_WARNING("Must be hollow.");
- return 0;
- }
- int tAmount = 0;
- Utils.LOG_INFO("Casing Count set to 0.");
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 2; j++) {
- for (int h = -1; h < 19; h++) {
- if ((h != 0) || (((xDir + i != 0) || (zDir + j != 0)) && ((i != 0) || (j != 0)))) {
- IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
- if ((!addMaintenanceToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) && (!addInputToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) && (!addOutputToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) && (!addEnergyInputToMachineList(tTileEntity, TAE.GTPP_INDEX(11)))) {
- if (this.getBaseMetaTileEntity().getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- if (h < 3){
- Utils.LOG_WARNING("Casing Expected.");
- return 0;
- }
- else if (h >= 3){
- //Utils.LOG_WARNING("Your Multitank can be 20 blocks tall.");
- }
- }
- if (this.getBaseMetaTileEntity().getMetaIDOffset(xDir + i, h, zDir + j) != 11) {
- if (h < 3){
- Utils.LOG_WARNING("Wrong Meta.");
- return 0;
- }
- else if (h >= 3){
- //Utils.LOG_WARNING("Your Multitank can be 20 blocks tall.");
- }
- }
- if (h < 3){
- tAmount++;
- }
- else if (h >= 3){
- if (this.getBaseMetaTileEntity().getBlockOffset(xDir + i, h, zDir + j) == Blocks.air || this.getBaseMetaTileEntity().getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName().contains("residual")){
- Utils.LOG_WARNING("Found air");
- }
- else {
- Utils.LOG_WARNING("Layer "+(h+2)+" is complete. Adding "+(64000*9)+"L storage to the tank.");
- tAmount++;
- }
- }
- }
- }
- }
- }
- }
- Utils.LOG_INFO("Finished counting.");
- multiblockCasingCount = (short) tAmount;
- //Utils.LOG_INFO("Your Multitank can be 20 blocks tall.");
- Utils.LOG_INFO("Casings Count: "+tAmount+" Valid Multiblock: "+(tAmount >= 16)+" Tank Storage Capacity:"+getMaximumTankStorage(tAmount)+"L");
- return tAmount;
-}*//*
-
-
- @Override
- public int getMaxEfficiency(final ItemStack aStack) {
- return 10000;
- }
-
- @Override
- public int getPollutionPerTick(final ItemStack aStack) {
- return 5;
- }
-
- @Override
- public int getAmountOfOutputs() {
- return 1;
- }
-
- @Override
- public boolean explodesOnComponentBreak(final ItemStack aStack) {
- return false;
- }
-
- private static short getStorageMultiplier(final int casingCount){
- final int tsm = 1*casingCount;
- if (tsm <= 0){
- return 1;
- }
- return (short) tsm;
- }
-
- private static int getMaximumTankStorage(final int casingCount){
- final int multiplier = getStorageMultiplier(casingCount);
- final int tempTankStorageMax = 128000*multiplier;
- if (tempTankStorageMax <= 0){return 128000;}
- return tempTankStorageMax;
- }
-
- private boolean tryForceNBTUpdate(){
- */
+ * package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage; public class
+ * GregtechMetaTileEntity_MultiTank extends GregtechMeta_MultiBlockBase { public GregtechMetaTileEntity_MultiTank(final
+ * int aID, final String aName, final String aNameRegional) { super(aID, aName, aNameRegional); } private short
+ * multiblockCasingCount = 0; private int mInternalSaveClock = 0; private final short storageMultiplier = 1; private int
+ * maximumFluidStorage = 128000; private FluidStack internalStorageTank = null; private final NBTTagCompound
+ * internalCraftingComponentsTag = new NBTTagCompound();
+ * @Override public String getMachineType() { return "Fluid Tank"; }
+ * @Override public String[] getExtraInfoData() { final ArrayList<GT_MetaTileEntity_Hatch_Energy> mTier =
+ * this.mEnergyHatches; if (!mTier.isEmpty()){ final int temp = mTier.get(0).mTier; if (this.internalStorageTank ==
+ * null) { return new String[]{ GT_Values.VOLTAGE_NAMES[temp]+" Large Fluid Tank", "Stored Fluid: No Fluid",
+ * "Internal | Current: "+Integer.toString(0) + "L", "Internal | Maximum: "+Integer.toString(this.maximumFluidStorage) +
+ * "L"}; } return new String[]{ GT_Values.VOLTAGE_NAMES[temp]+" Large Fluid Tank",
+ * "Stored Fluid: "+this.internalStorageTank.getLocalizedName(),
+ * "Internal | Current: "+Integer.toString(this.internalStorageTank.amount) + "L",
+ * "Internal | Maximum: "+Integer.toString(this.maximumFluidStorage) + "L"}; } return new String[]{
+ * "Voltage Tier not set -" +" Large Fluid Tank", "Stored Fluid: No Fluid", "Internal | Current: "+Integer.toString(0) +
+ * "L", "Internal | Maximum: "+Integer.toString(this.maximumFluidStorage) + "L"}; }
+ * @Override public void saveNBTData(final NBTTagCompound aNBT) { super.saveNBTData(aNBT);
+ */
/*
-//Block is invalid.
-if ((this == null) || (this.getBaseMetaTileEntity() == null)){
- Utils.LOG_WARNING("Block was not valid for saving data.");
- return false;
-}
-
-//Don't need this to run clientside.
-if (!this.getBaseMetaTileEntity().isServerSide()) {
- return false;
-}
-
-//Internal Tag was not valid.
-try{
- if (this.internalCraftingComponentsTag == null){
- Utils.LOG_WARNING("Internal NBT data tag was null.");
- return false;
- }
-} catch (final NullPointerException x){
- Utils.LOG_WARNING("Caught null NBT.");
-}
-
-//Internal tag was valid.
-this.saveNBTData(this.internalCraftingComponentsTag);
-
-
-//Mark block for update
-int x,y,z = 0;
-x = this.getBaseMetaTileEntity().getXCoord();
-y = this.getBaseMetaTileEntity().getYCoord();
-z = this.getBaseMetaTileEntity().getZCoord();
-this.getBaseMetaTileEntity().getWorld().markBlockForUpdate(x, y, z);
-
-//Mark block dirty, let chunk know it's data has changed and it must be saved to disk. (Albeit slowly)
-this.getBaseMetaTileEntity().markDirty();*//*
-
- return true;
- }
- }*/
+ * final NBTTagCompound gtCraftingComponentsTag = aNBT.getCompoundTag("GT.CraftingComponents"); if
+ * (gtCraftingComponentsTag != null){ Utils.LOG_WARNING("Got Crafting Tag"); if (this.internalStorageTank != null){
+ * Utils.LOG_WARNING("mFluid was not null, Saving TileEntity NBT data."); gtCraftingComponentsTag.setString("xFluid",
+ * this.internalStorageTank.getFluid().getName()); gtCraftingComponentsTag.setInteger("xAmount",
+ * this.internalStorageTank.amount); gtCraftingComponentsTag.setLong("xAmountMax", this.maximumFluidStorage);
+ * aNBT.setTag("GT.CraftingComponents", gtCraftingComponentsTag); } else {
+ * Utils.LOG_WARNING("mFluid was null, Saving TileEntity NBT data."); gtCraftingComponentsTag.removeTag("xFluid");
+ * gtCraftingComponentsTag.removeTag("xAmount"); gtCraftingComponentsTag.removeTag("xAmountMax");
+ * gtCraftingComponentsTag.setLong("xAmountMax", this.maximumFluidStorage); aNBT.setTag("GT.CraftingComponents",
+ * gtCraftingComponentsTag); } }
+ *//*
+ * }
+ * @Override public void loadNBTData(final NBTTagCompound aNBT) { super.loadNBTData(aNBT);
+ */
+/*
+ * final NBTTagCompound gtCraftingComponentsTag = aNBT.getCompoundTag("GT.CraftingComponents"); String xFluid = null;
+ * int xAmount = 0; if (gtCraftingComponentsTag.hasNoTags()){ if (this.internalStorageTank != null){
+ * Utils.LOG_WARNING("mFluid was not null, Creating TileEntity NBT data.");
+ * gtCraftingComponentsTag.setInteger("xAmount", this.internalStorageTank.amount);
+ * gtCraftingComponentsTag.setString("xFluid", this.internalStorageTank.getFluid().getName());
+ * aNBT.setTag("GT.CraftingComponents", gtCraftingComponentsTag); } } else { //internalCraftingComponentsTag =
+ * gtCraftingComponentsTag.getCompoundTag("backupTag"); if (gtCraftingComponentsTag.hasKey("xFluid")){
+ * Utils.LOG_WARNING("xFluid was not null, Loading TileEntity NBT data."); xFluid =
+ * gtCraftingComponentsTag.getString("xFluid"); } if (gtCraftingComponentsTag.hasKey("xAmount")){
+ * Utils.LOG_WARNING("xAmount was not null, Loading TileEntity NBT data."); xAmount =
+ * gtCraftingComponentsTag.getInteger("xAmount"); } if ((xFluid != null) && (xAmount != 0)){
+ * Utils.LOG_WARNING("Setting Internal Tank, loading "+xAmount+"L of "+xFluid); this.setInternalTank(xFluid, xAmount); }
+ * }
+ *//*
+ * } private boolean setInternalTank(final String fluidName, final int amount){ final FluidStack temp =
+ * FluidUtils.getFluidStack(fluidName, amount); if (temp != null){ if (this.internalStorageTank == null){
+ * this.internalStorageTank = temp; Logger.WARNING(temp.getFluid().getName()+" Amount: "+temp.amount+"L"); } else{
+ * Logger.WARNING("Retained Fluid.");
+ * Logger.WARNING(this.internalStorageTank.getFluid().getName()+" Amxount: "+this.internalStorageTank.amount+"L"); }
+ * this.markDirty(); return true; } return false; }
+ * @Override public void onLeftclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) {
+ * this.tryForceNBTUpdate(); super.onLeftclick(aBaseMetaTileEntity, aPlayer); }
+ * @Override public boolean onWrenchRightClick(final byte aSide, final byte aWrenchingSide, final EntityPlayer
+ * aPlayer, final float aX, final float aY, final float aZ) { this.tryForceNBTUpdate(); return
+ * super.onWrenchRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ); }
+ * @Override public void onRemoval() { this.tryForceNBTUpdate(); super.onRemoval(); }
+ * @Override public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
+ * super.onPostTick(aBaseMetaTileEntity, aTick); if ((this.internalStorageTank != null) &&
+ * this.internalStorageTank.amount >= this.maximumFluidStorage){ if (this.internalStorageTank.amount >
+ * this.maximumFluidStorage){ this.internalStorageTank.amount = this.maximumFluidStorage; } this.stopMachine(); } if
+ * (this.mInternalSaveClock != 20){ this.mInternalSaveClock++; } else { this.mInternalSaveClock = 0;
+ * this.tryForceNBTUpdate(); } } public GregtechMetaTileEntity_MultiTank(final String aName) { super(aName); }
+ * @Override public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { return new
+ * GregtechMetaTileEntity_MultiTank(this.mName); }
+ * @Override public String[] getTooltip() { return new String[]{ "Controller Block for the Multitank",
+ * "Size: 3xHx3 (Block behind controller must be air)", "Structure must be at least 4 blocks tall, maximum 20.",
+ * "Each casing within the structure adds 128000L storage.", "Multitank Exterior Casings (16 at least!)",
+ * "Controller (front centered)", "1x Input hatch", "1x Output hatch", "1x Energy Hatch", }; }
+ * @Override public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte
+ * aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { if (aSide == aFacing) { return
+ * new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(11)), new GT_RenderedTexture(aActive ?
+ * TexturesGtBlock.Overlay_Machine_Screen_Logo : TexturesGtBlock.Overlay_Machine_Screen_Logo)}; } return new
+ * ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(11))}; }
+ * @Override public GT_Recipe.GT_Recipe_Map getRecipeMap() { return null; }
+ * @Override public boolean isFacingValid(final byte aFacing) { return aFacing > 1; }
+ * @Override public boolean checkRecipe(final ItemStack aStack) { final ArrayList<ItemStack> tInputList =
+ * this.getStoredInputs(); for (int i = 0; i < (tInputList.size() - 1); i++) { for (int j = i + 1; j <
+ * tInputList.size(); j++) { if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) { if
+ * (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) { tInputList.remove(j--); } else {
+ * tInputList.remove(i--); break; } } } } final ItemStack[] tInputs = Arrays.copyOfRange(tInputList.toArray(new
+ * ItemStack[tInputList.size()]), 0, 2); final ArrayList<FluidStack> tFluidList = this.getStoredFluids(); for (int i
+ * = 0; i < (tFluidList.size() - 1); i++) { for (int j = i + 1; j < tFluidList.size(); j++) { if
+ * (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) { if (tFluidList.get(i).amount >=
+ * tFluidList.get(j).amount) { tFluidList.remove(j--); } else { tFluidList.remove(i--); break; } } } } final
+ * FluidStack[] tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[1]), 0, 1); if (tFluids.length >= 2){
+ * Logger.WARNING("Bad"); return false; } final ArrayList<Pair<GT_MetaTileEntity_Hatch_Input, Boolean>> rList = new
+ * ArrayList<>(); int slotInputCount = 0; for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) {
+ * boolean containsFluid = false; if (isValidMetaTileEntity(tHatch)) { slotInputCount++; for (int i=0;
+ * i<tHatch.getBaseMetaTileEntity().getSizeInventory(); i++) { if (tHatch.canTankBeEmptied()){containsFluid=true;} }
+ * rList.add(new Pair<>(tHatch, containsFluid)); } } if ((tFluids.length <= 0) || (slotInputCount > 1)){
+ * Logger.WARNING("Bad"); return false; } Logger.WARNING("Okay - 2"); if (this.internalStorageTank == null){
+ * Logger.WARNING("Okay - 3"); if ((rList.get(0).getKey().mFluid != null) && (rList.get(0).getKey().mFluid.amount >
+ * 0)){ Logger.WARNING("Okay - 4");
+ * Logger.WARNING("Okay - 1"+" rList.get(0).getKey().mFluid.amount: "+rList.get(0).getKey().mFluid.amount
+ */
+/* +" internalStorageTank:"+internalStorageTank.amount *//*
+ * ); final FluidStack tempFluidStack =
+ * rList.get(0).getKey().mFluid; final Fluid tempFluid =
+ * tempFluidStack.getFluid(); this.internalStorageTank =
+ * FluidUtils.getFluidStack(tempFluid.getName(),
+ * tempFluidStack.amount); rList.get(0).getKey().mFluid.amount
+ * = 0; Logger.WARNING("Okay - 1.1"
+ * +" rList.get(0).getKey().mFluid.amount: "+rList.get(0).
+ * getKey().mFluid.amount
+ * +" internalStorageTank:"+this.internalStorageTank.amount);
+ * return true; } Logger.WARNING("No Fluid in hatch."); return
+ * false; } else if
+ * (this.internalStorageTank.isFluidEqual(rList.get(0).getKey()
+ * .mFluid)){
+ * Logger.WARNING("Storing "+rList.get(0).getKey().mFluid.
+ * amount+"L");
+ * Logger.WARNING("Contains "+this.internalStorageTank.amount+
+ * "L"); int tempAdd = 0; tempAdd =
+ * rList.get(0).getKey().getFluidAmount();
+ * rList.get(0).getKey().mFluid = null;
+ * Logger.WARNING("adding "+tempAdd);
+ * this.internalStorageTank.amount =
+ * this.internalStorageTank.amount + tempAdd;
+ * Logger.WARNING("Tank now Contains "+this.internalStorageTank
+ * .amount+"L of "+this.internalStorageTank.getFluid().getName(
+ * )+"."); //Utils.LOG_WARNING("Tank"); return true; } else {
+ * final FluidStack superTempFluidStack =
+ * rList.get(0).getKey().mFluid;
+ * Logger.WARNING("is input fluid equal to stored fluid? "+(
+ * this.internalStorageTank.isFluidEqual(superTempFluidStack)))
+ * ; if (superTempFluidStack != null) {
+ * Logger.WARNING("Input hatch[0] Contains "
+ * +superTempFluidStack.amount+"L of "+superTempFluidStack.
+ * getFluid().getName()+"."); }
+ * Logger.WARNING("Large Multi-Tank Contains "+this.
+ * internalStorageTank.amount+"L of "+this.internalStorageTank.
+ * getFluid().getName()+"."); if
+ * (this.internalStorageTank.amount <= 0){
+ * Logger.WARNING("Internal Tank is empty, sitting idle.");
+ * return false; } if ((this.mOutputHatches.get(0).mFluid ==
+ * null) || this.mOutputHatches.isEmpty() ||
+ * (this.mOutputHatches.get(0).mFluid.isFluidEqual(this.
+ * internalStorageTank) &&
+ * (this.mOutputHatches.get(0).mFluid.amount <
+ * this.mOutputHatches.get(0).getCapacity()))){
+ * Logger.WARNING("Okay - 3"); final int tempCurrentStored =
+ * this.internalStorageTank.amount; int tempResult = 0; final
+ * int tempHatchSize =
+ * this.mOutputHatches.get(0).getCapacity(); final int
+ * tempHatchCurrentHolding =
+ * this.mOutputHatches.get(0).getFluidAmount(); final int
+ * tempHatchRemainingSpace = tempHatchSize -
+ * tempHatchCurrentHolding; final FluidStack tempOutputFluid =
+ * this.internalStorageTank; if (tempHatchRemainingSpace <= 0){
+ * return false; }
+ * Logger.WARNING("Okay - 3.1.x"+" hatchCapacity: "
+ * +tempHatchSize +" tempCurrentStored: "
+ * +tempCurrentStored+" output hatch holds: "
+ * +tempHatchCurrentHolding+" tank has "
+ * +tempHatchRemainingSpace+"L of space left."); if
+ * (tempHatchSize >= tempHatchRemainingSpace){
+ * Logger.WARNING("Okay - 3.1.1"+" hatchCapacity: "
+ * +tempHatchSize +" tempCurrentStored: "
+ * +tempCurrentStored+" output hatch holds: "
+ * +tempHatchCurrentHolding+" tank has "
+ * +tempHatchRemainingSpace+"L of space left."); int adder; if
+ * ((tempCurrentStored > 0) && (tempCurrentStored <=
+ * tempHatchSize)){ adder = tempCurrentStored; if (adder >=
+ * tempHatchRemainingSpace){ adder = tempHatchRemainingSpace; }
+ * } else { adder = 0; if (tempCurrentStored >=
+ * tempHatchRemainingSpace){ adder = tempHatchRemainingSpace; }
+ * } tempResult = adder; tempOutputFluid.amount = tempResult;
+ * Logger.WARNING("Okay - 3.1.2"+" result: "+tempResult
+ * +" tempCurrentStored: "+tempCurrentStored +
+ * " filling output hatch with: "+tempOutputFluid.
+ * amount+"L of "+tempOutputFluid.getFluid().getName());
+ * this.mOutputHatches.get(0).fill(tempOutputFluid, true);
+ * //mOutputHatches.get(0).mFluid.amount = tempResult;
+ * this.internalStorageTank.amount = (tempCurrentStored-adder);
+ * Logger.WARNING("Okay - 3.1.3"+" internalTankStorage: "+this.
+ * internalStorageTank.amount
+ * +"L | output hatch contains: "+this.mOutputHatches.get(0).
+ * mFluid.amount+"L of "+this.mOutputHatches.get(0).mFluid.
+ * getFluid().getName());
+ */
+/*
+ * if (internalStorageTank.amount <= 0) internalStorageTank = null;
+ *//*
+ * } Logger.WARNING("Tank ok."); return true; } } //this.getBaseMetaTileEntity().(tFluids[0].amount, true);
+ * Logger.WARNING("Tank"); return false; }
+ * @Override public int getMaxParallelRecipes() { return 1; }
+ * @Override public int getEuDiscountForParallelism() { return 0; }
+ * @Override public boolean checkMultiblock(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ * final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; final int zDir =
+ * ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; if
+ * (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) { Logger.WARNING("Must be hollow."); return false; } int
+ * tAmount = 0; for (int i = -1; i < 2; i++) { for (int j = -1; j < 2; j++) { for (int h = -1; h < 19; h++) { if ((h
+ * != 0) || ((((xDir + i) != 0) || ((zDir + j) != 0)) && ((i != 0) || (j != 0)))) { final IGregTechTileEntity
+ * tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j); if
+ * ((!this.addMaintenanceToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) && (!this.addInputToMachineList(tTileEntity,
+ * TAE.GTPP_INDEX(11))) && (!this.addOutputToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) &&
+ * (!this.addEnergyInputToMachineList(tTileEntity, TAE.GTPP_INDEX(11)))) { if
+ * (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) { if (h < 3){
+ * Logger.WARNING("Casing Expected."); return false; } else if (h >= 3){
+ * //Utils.LOG_WARNING("Your Multitank can be 20 blocks tall."); } } if (aBaseMetaTileEntity.getMetaIDOffset(xDir +
+ * i, h, zDir + j) != 11) { if (h < 3){ Logger.WARNING("Wrong Meta."); return false; } else if (h >= 3){
+ * //Utils.LOG_WARNING("Your Multitank can be 20 blocks tall."); } } if (h < 3){ tAmount++; } else if (h >= 3){ if
+ * ((aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) == Blocks.air) ||
+ * aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName().contains("residual")){
+ * Logger.WARNING("Found air"); } else {
+ * Logger.WARNING("Layer "+(h+2)+" is complete. Adding "+(64000*9)+"L storage to the tank."); tAmount++; } } } } } }
+ * } this.multiblockCasingCount = (short) tAmount; this.maximumFluidStorage = getMaximumTankStorage(tAmount);
+ * Logger.INFO("Your Multitank can be 20 blocks tall.");
+ * Logger.INFO("Casings Count: "+this.multiblockCasingCount+" Valid Multiblock: "+(tAmount >=
+ * 16)+" Tank Storage Capacity:"+this.maximumFluidStorage+"L"); this.tryForceNBTUpdate(); return tAmount >= 16; }
+ */
+/*
+ * public int countCasings() { Utils.LOG_INFO("Counting Machine Casings"); try{ if
+ * (this.getBaseMetaTileEntity().getWorld() == null){ Utils.LOG_INFO("Tile Entity's world was null for casing count.");
+ * return 0; } if (this.getBaseMetaTileEntity() == null){ Utils.LOG_INFO("Tile Entity was null for casing count.");
+ * return 0; } } catch(NullPointerException r){ Utils.LOG_INFO("Null Pointer Exception caught."); return 0; } int xDir =
+ * ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetX; int zDir =
+ * ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetZ; if
+ * (!this.getBaseMetaTileEntity().getAirOffset(xDir, 0, zDir)) { Utils.LOG_INFO("Failed due to air being misplaced.");
+ * Utils.LOG_WARNING("Must be hollow."); return 0; } int tAmount = 0; Utils.LOG_INFO("Casing Count set to 0."); for (int
+ * i = -1; i < 2; i++) { for (int j = -1; j < 2; j++) { for (int h = -1; h < 19; h++) { if ((h != 0) || (((xDir + i !=
+ * 0) || (zDir + j != 0)) && ((i != 0) || (j != 0)))) { IGregTechTileEntity tTileEntity =
+ * this.getBaseMetaTileEntity().getIGregTechTileEntityOffset(xDir + i, h, zDir + j); if
+ * ((!addMaintenanceToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) && (!addInputToMachineList(tTileEntity,
+ * TAE.GTPP_INDEX(11))) && (!addOutputToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) &&
+ * (!addEnergyInputToMachineList(tTileEntity, TAE.GTPP_INDEX(11)))) { if
+ * (this.getBaseMetaTileEntity().getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) { if (h < 3){
+ * Utils.LOG_WARNING("Casing Expected."); return 0; } else if (h >= 3){
+ * //Utils.LOG_WARNING("Your Multitank can be 20 blocks tall."); } } if
+ * (this.getBaseMetaTileEntity().getMetaIDOffset(xDir + i, h, zDir + j) != 11) { if (h < 3){
+ * Utils.LOG_WARNING("Wrong Meta."); return 0; } else if (h >= 3){
+ * //Utils.LOG_WARNING("Your Multitank can be 20 blocks tall."); } } if (h < 3){ tAmount++; } else if (h >= 3){ if
+ * (this.getBaseMetaTileEntity().getBlockOffset(xDir + i, h, zDir + j) == Blocks.air ||
+ * this.getBaseMetaTileEntity().getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName().contains("residual")){
+ * Utils.LOG_WARNING("Found air"); } else {
+ * Utils.LOG_WARNING("Layer "+(h+2)+" is complete. Adding "+(64000*9)+"L storage to the tank."); tAmount++; } } } } } }
+ * } Utils.LOG_INFO("Finished counting."); multiblockCasingCount = (short) tAmount;
+ * //Utils.LOG_INFO("Your Multitank can be 20 blocks tall.");
+ * Utils.LOG_INFO("Casings Count: "+tAmount+" Valid Multiblock: "+(tAmount >=
+ * 16)+" Tank Storage Capacity:"+getMaximumTankStorage(tAmount)+"L"); return tAmount; }
+ *//*
+ * @Override public int getMaxEfficiency(final ItemStack aStack) { return 10000; }
+ * @Override public int getPollutionPerTick(final ItemStack aStack) { return 5; }
+ * @Override public int getAmountOfOutputs() { return 1; }
+ * @Override public boolean explodesOnComponentBreak(final ItemStack aStack) { return false; } private static short
+ * getStorageMultiplier(final int casingCount){ final int tsm = 1*casingCount; if (tsm <= 0){ return 1; } return
+ * (short) tsm; } private static int getMaximumTankStorage(final int casingCount){ final int multiplier =
+ * getStorageMultiplier(casingCount); final int tempTankStorageMax = 128000*multiplier; if (tempTankStorageMax <=
+ * 0){return 128000;} return tempTankStorageMax; } private boolean tryForceNBTUpdate(){
+ */
+/*
+ * //Block is invalid. if ((this == null) || (this.getBaseMetaTileEntity() == null)){
+ * Utils.LOG_WARNING("Block was not valid for saving data."); return false; } //Don't need this to run clientside. if
+ * (!this.getBaseMetaTileEntity().isServerSide()) { return false; } //Internal Tag was not valid. try{ if
+ * (this.internalCraftingComponentsTag == null){ Utils.LOG_WARNING("Internal NBT data tag was null."); return false; } }
+ * catch (final NullPointerException x){ Utils.LOG_WARNING("Caught null NBT."); } //Internal tag was valid.
+ * this.saveNBTData(this.internalCraftingComponentsTag); //Mark block for update int x,y,z = 0; x =
+ * this.getBaseMetaTileEntity().getXCoord(); y = this.getBaseMetaTileEntity().getYCoord(); z =
+ * this.getBaseMetaTileEntity().getZCoord(); this.getBaseMetaTileEntity().getWorld().markBlockForUpdate(x, y, z); //Mark
+ * block dirty, let chunk know it's data has changed and it must be saved to disk. (Albeit slowly)
+ * this.getBaseMetaTileEntity().markDirty();
+ *//*
+ * return true; } }
+ */
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java
index 58579164a1..a4929af626 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java
@@ -9,6 +9,17 @@ import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
import static gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase.GTPPHatchElement.TTDynamo;
import static gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase.GTPPHatchElement.TTEnergy;
+import javax.annotation.Nullable;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.Constants.NBT;
+import net.minecraftforge.common.util.ForgeDirection;
+
import com.gtnewhorizon.structurelib.StructureLibAPI;
import com.gtnewhorizon.structurelib.alignment.constructable.ChannelDataAccessor;
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
@@ -23,6 +34,7 @@ import com.gtnewhorizons.modularui.common.widget.ProgressBar;
import com.gtnewhorizons.modularui.common.widget.SlotGroup;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
import com.gtnewhorizons.modularui.common.widget.TextWidget;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.TAE;
import gregtech.api.enums.Textures;
@@ -50,15 +62,6 @@ import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.preloader.asm.AsmConfig;
import gtPlusPlus.xmod.gregtech.api.gui.GTPP_UITextures;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
-import javax.annotation.Nullable;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.Constants.NBT;
-import net.minecraftforge.common.util.ForgeDirection;
public class GregtechMetaTileEntity_PowerSubStationController
extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_PowerSubStationController>
@@ -86,8 +89,8 @@ public class GregtechMetaTileEntity_PowerSubStationController
private TopState topState = TopState.MayBeTop;
private static IStructureDefinition<GregtechMetaTileEntity_PowerSubStationController> STRUCTURE_DEFINITION = null;
- public GregtechMetaTileEntity_PowerSubStationController(
- final int aID, final String aName, final String aNameRegional) {
+ public GregtechMetaTileEntity_PowerSubStationController(final int aID, final String aName,
+ final String aNameRegional) {
super(aID, aName, aNameRegional);
}
@@ -106,48 +109,36 @@ public class GregtechMetaTileEntity_PowerSubStationController
tt.addMachineType(getMachineType())
.addInfo("Consumes " + this.ENERGY_TAX + "% of the average voltage of all energy type hatches")
.addInfo("Does not require maintenance")
- .addInfo("Can be built with variable height between " + (CELL_HEIGHT_MIN + 2) + "-"
- + (CELL_HEIGHT_MAX + 2) + "")
+ .addInfo(
+ "Can be built with variable height between " + (CELL_HEIGHT_MIN + 2)
+ + "-"
+ + (CELL_HEIGHT_MAX + 2)
+ + "")
.addInfo("Hatches can be placed nearly anywhere")
.addInfo("HV Energy/Dynamo Hatches are the lowest tier you can use")
- .addInfo("Supports voltages >= UHV using MAX tier components.")
- .addSeparator()
- .addController("Bottom Center")
- .addCasingInfo("Sub-Station External Casings", 10)
- .addDynamoHatch("Any Casing", 1)
- .addEnergyHatch("Any Casing", 1)
+ .addInfo("Supports voltages >= UHV using MAX tier components.").addSeparator()
+ .addController("Bottom Center").addCasingInfo("Sub-Station External Casings", 10)
+ .addDynamoHatch("Any Casing", 1).addEnergyHatch("Any Casing", 1)
.addSubChannelUsage("capacitor", "Vanadium Capacitor Cell Tier")
- .addSubChannelUsage("height", "Height of structure")
- .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ .addSubChannelUsage("height", "Height of structure").toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
if (aSide == aFacing) {
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(24)),
- new GT_RenderedTexture(
- aActive
- ? Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE
- : Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER)
- };
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(24)),
+ new GT_RenderedTexture(
+ aActive ? Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE
+ : Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER) };
}
if (aSide == this.getBaseMetaTileEntity().getBackFacing()) {
- return new ITexture[] {
- Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(24)),
- mIsOutputtingPower
- ? Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[(int) this.getOutputTier()]
- : Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[(int) this.getInputTier()]
- };
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(24)),
+ mIsOutputtingPower ? Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[(int) this.getOutputTier()]
+ : Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[(int) this.getInputTier()] };
}
- return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(23))};
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(23)) };
}
@Override
@@ -232,36 +223,36 @@ public class GregtechMetaTileEntity_PowerSubStationController
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_PowerSubStationController>builder()
.addShape(
- mName + "bottom", transpose(new String[][] {{"BB~BB", "BBBBB", "BBBBB", "BBBBB", "BBBBB"}}))
+ mName + "bottom",
+ transpose(new String[][] { { "BB~BB", "BBBBB", "BBBBB", "BBBBB", "BBBBB" } }))
+ .addShape(
+ mName + "layer",
+ transpose(new String[][] { { "CCCCC", "CIIIC", "CIIIC", "CIIIC", "CCCCC" } }))
+ .addShape(
+ mName + "mid",
+ transpose(new String[][] { { "CCCCC", "CHHHC", "CHHHC", "CHHHC", "CCCCC" } }))
.addShape(
- mName + "layer", transpose(new String[][] {{"CCCCC", "CIIIC", "CIIIC", "CIIIC", "CCCCC"}}))
- .addShape(mName + "mid", transpose(new String[][] {{"CCCCC", "CHHHC", "CHHHC", "CHHHC", "CCCCC"}}))
- .addShape(mName + "top", transpose(new String[][] {{"TTTTT", "TTTTT", "TTTTT", "TTTTT", "TTTTT"}}))
+ mName + "top",
+ transpose(new String[][] { { "TTTTT", "TTTTT", "TTTTT", "TTTTT", "TTTTT" } }))
.addElement(
'C',
buildHatchAdder(GregtechMetaTileEntity_PowerSubStationController.class)
.atLeast(Energy.or(TTEnergy), Dynamo.or(TTDynamo), Maintenance)
.disallowOnly(ForgeDirection.UP, ForgeDirection.DOWN)
- .casingIndex(TAE.GTPP_INDEX(24))
- .dot(1)
- .buildAndChain(
+ .casingIndex(TAE.GTPP_INDEX(24)).dot(1).buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings2Misc, 8))))
.addElement(
'B',
buildHatchAdder(GregtechMetaTileEntity_PowerSubStationController.class)
.atLeast(Energy.or(TTEnergy), Dynamo.or(TTDynamo), Maintenance)
- .disallowOnly(ForgeDirection.UP)
- .casingIndex(TAE.GTPP_INDEX(24))
- .dot(1)
+ .disallowOnly(ForgeDirection.UP).casingIndex(TAE.GTPP_INDEX(24)).dot(1)
.buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings2Misc, 8))))
.addElement(
'T',
buildHatchAdder(GregtechMetaTileEntity_PowerSubStationController.class)
.atLeast(Energy.or(TTEnergy), Dynamo.or(TTDynamo), Maintenance)
- .disallowOnly(ForgeDirection.DOWN)
- .casingIndex(TAE.GTPP_INDEX(24))
- .dot(1)
+ .disallowOnly(ForgeDirection.DOWN).casingIndex(TAE.GTPP_INDEX(24)).dot(1)
.buildAndChain(
onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings2Misc, 8))))
.addElement(
@@ -274,8 +265,7 @@ public class GregtechMetaTileEntity_PowerSubStationController
onElementPass(
x -> x.topState = TopState.Top,
ofHatchAdderOptional(
- GregtechMetaTileEntity_PowerSubStationController
- ::addPowerSubStationList,
+ GregtechMetaTileEntity_PowerSubStationController::addPowerSubStationList,
TAE.GTPP_INDEX(24),
1,
ModBlocks.blockCasings2Misc,
@@ -291,15 +281,16 @@ public class GregtechMetaTileEntity_PowerSubStationController
onElementPass(x -> ++x.cellCount[3], ofCell(7)),
onElementPass(x -> ++x.cellCount[4], ofCell(8)),
onElementPass(
- x -> ++x.cellCount[5], ofCell(9))))))))
- .addElement('H', ofCell(4))
- .build();
+ x -> ++x.cellCount[5],
+ ofCell(9))))))))
+ .addElement('H', ofCell(4)).build();
}
return STRUCTURE_DEFINITION;
}
public static <T> IStructureElement<T> ofCell(int aIndex) {
return new IStructureElement<T>() {
+
@Override
public boolean check(T t, World world, int x, int y, int z) {
Block block = world.getBlock(x, y, z);
@@ -338,14 +329,14 @@ public class GregtechMetaTileEntity_PowerSubStationController
@Nullable
@Override
- public BlocksToPlace getBlocksToPlace(
- T t, World world, int x, int y, int z, ItemStack trigger, AutoPlaceEnvironment env) {
+ public BlocksToPlace getBlocksToPlace(T t, World world, int x, int y, int z, ItemStack trigger,
+ AutoPlaceEnvironment env) {
return BlocksToPlace.create(getBlockFromTier(trigger.stackSize), getMetaFromTier(trigger.stackSize));
}
@Override
- public PlaceResult survivalPlaceBlock(
- T t, World world, int x, int y, int z, ItemStack trigger, AutoPlaceEnvironment env) {
+ public PlaceResult survivalPlaceBlock(T t, World world, int x, int y, int z, ItemStack trigger,
+ AutoPlaceEnvironment env) {
Block block = world.getBlock(x, y, z);
int meta = world.getBlockMetadata(x, y, z);
int tier = getCellTier(block, meta);
@@ -707,41 +698,54 @@ public class GregtechMetaTileEntity_PowerSubStationController
String storedEnergyText;
if (this.getEUVar() > this.mBatteryCapacity) {
- storedEnergyText =
- EnumChatFormatting.RED + GT_Utility.formatNumbers(this.getEUVar()) + EnumChatFormatting.RESET;
+ storedEnergyText = EnumChatFormatting.RED + GT_Utility.formatNumbers(this.getEUVar())
+ + EnumChatFormatting.RESET;
} else {
- storedEnergyText =
- EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.getEUVar()) + EnumChatFormatting.RESET;
+ storedEnergyText = EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.getEUVar())
+ + EnumChatFormatting.RESET;
}
int errorCode = this.getBaseMetaTileEntity().getErrorDisplayID();
boolean mMaint = (errorCode != 0);
- return new String[] {
- "Ergon Energy - District Sub-Station",
- "Stored EU: " + storedEnergyText,
- "Capacity: " + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(this.maxEUStore())
- + EnumChatFormatting.RESET,
- "Running Costs: " + EnumChatFormatting.RED + GT_Utility.formatNumbers(this.computeEnergyTax())
- + EnumChatFormatting.RESET + " EU/t",
- "Controller Mode: " + mode,
- "Requires Maintenance: " + (!mMaint ? EnumChatFormatting.GREEN : EnumChatFormatting.RED) + mMaint
- + EnumChatFormatting.RESET + " | Code: ["
- + (!mMaint ? EnumChatFormatting.GREEN : EnumChatFormatting.RED) + errorCode
- + EnumChatFormatting.RESET + "]",
- "----------------------",
- "Stats for Nerds",
- "Average Input: " + EnumChatFormatting.BLUE + GT_Utility.formatNumbers(this.getAverageEuAdded())
- + EnumChatFormatting.RESET + " EU",
- "Average Output: " + EnumChatFormatting.GOLD + GT_Utility.formatNumbers(this.getAverageEuConsumed())
- + EnumChatFormatting.RESET + " EU",
- "Total Input: " + EnumChatFormatting.BLUE + GT_Utility.formatNumbers(this.mTotalEnergyAdded)
- + EnumChatFormatting.RESET + " EU",
- "Total Output: " + EnumChatFormatting.GOLD + GT_Utility.formatNumbers(this.mTotalEnergyConsumed)
- + EnumChatFormatting.RESET + " EU",
- "Total Costs: " + EnumChatFormatting.RED + GT_Utility.formatNumbers(this.mTotalEnergyLost)
- + EnumChatFormatting.RESET + " EU",
- };
+ return new String[] { "Ergon Energy - District Sub-Station", "Stored EU: " + storedEnergyText,
+ "Capacity: " + EnumChatFormatting.YELLOW
+ + GT_Utility.formatNumbers(this.maxEUStore())
+ + EnumChatFormatting.RESET,
+ "Running Costs: " + EnumChatFormatting.RED
+ + GT_Utility.formatNumbers(this.computeEnergyTax())
+ + EnumChatFormatting.RESET
+ + " EU/t",
+ "Controller Mode: " + mode,
+ "Requires Maintenance: " + (!mMaint ? EnumChatFormatting.GREEN : EnumChatFormatting.RED)
+ + mMaint
+ + EnumChatFormatting.RESET
+ + " | Code: ["
+ + (!mMaint ? EnumChatFormatting.GREEN : EnumChatFormatting.RED)
+ + errorCode
+ + EnumChatFormatting.RESET
+ + "]",
+ "----------------------", "Stats for Nerds",
+ "Average Input: " + EnumChatFormatting.BLUE
+ + GT_Utility.formatNumbers(this.getAverageEuAdded())
+ + EnumChatFormatting.RESET
+ + " EU",
+ "Average Output: " + EnumChatFormatting.GOLD
+ + GT_Utility.formatNumbers(this.getAverageEuConsumed())
+ + EnumChatFormatting.RESET
+ + " EU",
+ "Total Input: " + EnumChatFormatting.BLUE
+ + GT_Utility.formatNumbers(this.mTotalEnergyAdded)
+ + EnumChatFormatting.RESET
+ + " EU",
+ "Total Output: " + EnumChatFormatting.GOLD
+ + GT_Utility.formatNumbers(this.mTotalEnergyConsumed)
+ + EnumChatFormatting.RESET
+ + " EU",
+ "Total Costs: " + EnumChatFormatting.RED
+ + GT_Utility.formatNumbers(this.mTotalEnergyLost)
+ + EnumChatFormatting.RESET
+ + " EU", };
}
@Override
@@ -841,79 +845,65 @@ public class GregtechMetaTileEntity_PowerSubStationController
@Override
public void addGregTechLogo(ModularWindow.Builder builder) {
- builder.widget(new DrawableWidget()
- .setDrawable(getGUITextureSet().getGregTechLogo())
- .setSize(17, 17)
- .setPos(175, 166));
+ builder.widget(
+ new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17)
+ .setPos(175, 166));
}
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
- builder.widget(new DrawableWidget()
- .setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK)
- .setPos(4, 4)
- .setSize(149, 149))
+ builder.widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(4, 4).setSize(149, 149))
.widget(new SlotWidget(inventoryHandler, 0).setPos(154, 4))
- .widget(new SlotWidget(inventoryHandler, 1)
- .setAccess(true, false)
- .setPos(154, 22))
- .widget(SlotGroup.ofItemHandler(new PlayerMainInvWrapper(buildContext.getPlayer().inventory), 9)
- .endAtSlot(8)
- .build()
- .setPos(7, 166))
- .widget(TextWidget.dynamicString(() -> getBaseMetaTileEntity().getErrorDisplayID() == 0
- ? getBaseMetaTileEntity().isActive() ? "Running perfectly" : "Turn on with Mallet"
- : "")
- .setSynced(false)
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(10, 8))
- .widget(new FakeSyncWidget.BooleanSyncer(
- () -> getBaseMetaTileEntity().isActive(),
- val -> getBaseMetaTileEntity().setActive(val)))
- .widget(new FakeSyncWidget.IntegerSyncer(
- () -> getBaseMetaTileEntity().getErrorDisplayID(),
- val -> getBaseMetaTileEntity().setErrorDisplayID(val)))
- .widget(new TextWidget("In")
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(178, 10))
- .widget(new TextWidget("Out")
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(176, 28))
- .widget(TextWidget.dynamicString(
- () -> "Avg In: " + GT_Utility.formatNumbers(getAverageEuAdded()) + " EU")
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(10, 20))
- .widget(TextWidget.dynamicString(
- () -> "Avg Out: " + GT_Utility.formatNumbers(getAverageEuConsumed()) + " EU")
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(10, 30))
- .widget(new DrawableWidget()
- .setDrawable(GTPP_UITextures.PICTURE_ENERGY_FRAME)
- .setPos(4, 155)
- .setSize(149, 7))
- .widget(new ProgressBar()
- .setProgress(this::getProgress)
- .setTexture(GTPP_UITextures.PROGRESSBAR_PSS_ENERGY, 147)
- .setDirection(ProgressBar.Direction.RIGHT)
- .setPos(5, 156)
- .setSize(147, 5))
- .widget(new TextWidget("Stored:")
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(10, 132))
+ .widget(new SlotWidget(inventoryHandler, 1).setAccess(true, false).setPos(154, 22))
+ .widget(
+ SlotGroup.ofItemHandler(new PlayerMainInvWrapper(buildContext.getPlayer().inventory), 9)
+ .endAtSlot(8).build().setPos(7, 166))
+ .widget(
+ TextWidget
+ .dynamicString(
+ () -> getBaseMetaTileEntity().getErrorDisplayID() == 0
+ ? getBaseMetaTileEntity().isActive() ? "Running perfectly"
+ : "Turn on with Mallet"
+ : "")
+ .setSynced(false).setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 8))
+ .widget(
+ new FakeSyncWidget.BooleanSyncer(
+ () -> getBaseMetaTileEntity().isActive(),
+ val -> getBaseMetaTileEntity().setActive(val)))
+ .widget(
+ new FakeSyncWidget.IntegerSyncer(
+ () -> getBaseMetaTileEntity().getErrorDisplayID(),
+ val -> getBaseMetaTileEntity().setErrorDisplayID(val)))
+ .widget(new TextWidget("In").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(178, 10))
+ .widget(new TextWidget("Out").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(176, 28))
+ .widget(
+ TextWidget
+ .dynamicString(() -> "Avg In: " + GT_Utility.formatNumbers(getAverageEuAdded()) + " EU")
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 20))
+ .widget(
+ TextWidget
+ .dynamicString(
+ () -> "Avg Out: " + GT_Utility.formatNumbers(getAverageEuConsumed()) + " EU")
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 30))
+ .widget(
+ new DrawableWidget().setDrawable(GTPP_UITextures.PICTURE_ENERGY_FRAME).setPos(4, 155)
+ .setSize(149, 7))
+ .widget(
+ new ProgressBar().setProgress(this::getProgress)
+ .setTexture(GTPP_UITextures.PROGRESSBAR_PSS_ENERGY, 147)
+ .setDirection(ProgressBar.Direction.RIGHT).setPos(5, 156).setSize(147, 5))
+ .widget(new TextWidget("Stored:").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 132))
.widget(TextWidget.dynamicText(() -> {
- int colorScale = (int) (getProgress() * 100 * 2.55);
- return new Text(GT_Utility.formatNumbers(
- getBaseMetaTileEntity().getStoredEU()) + " EU")
- .color(Utils.rgbtoHexValue((255 - colorScale), colorScale, 0));
- })
- .setPos(10, 142))
- .widget(TextWidget.dynamicString(() -> GT_Utility.formatNumbers(getProgress() * 100) + "%")
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(70, 155));
+ int colorScale = (int) (getProgress() * 100 * 2.55);
+ return new Text(GT_Utility.formatNumbers(getBaseMetaTileEntity().getStoredEU()) + " EU")
+ .color(Utils.rgbtoHexValue((255 - colorScale), colorScale, 0));
+ }).setPos(10, 142)).widget(
+ TextWidget.dynamicString(() -> GT_Utility.formatNumbers(getProgress() * 100) + "%")
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(70, 155));
}
private float getProgress() {
- return (float) getBaseMetaTileEntity().getStoredEU()
- / getBaseMetaTileEntity().getEUCapacity();
+ return (float) getBaseMetaTileEntity().getStoredEU() / getBaseMetaTileEntity().getEUCapacity();
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/GT_TileEntity_ComputerCube.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/GT_TileEntity_ComputerCube.java
index 6aec31dc1b..37f5d0ba25 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/GT_TileEntity_ComputerCube.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/GT_TileEntity_ComputerCube.java
@@ -3,7 +3,22 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.misc;
import static gregtech.api.enums.GT_Values.V;
import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.inventory.Slot;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+
import Ic2ExpReactorPlanner.SimulationData;
+
import com.gtnewhorizons.modularui.api.ModularUITextures;
import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable;
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
@@ -15,6 +30,7 @@ import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget;
import com.gtnewhorizons.modularui.common.widget.ProgressBar;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
import com.gtnewhorizons.modularui.common.widget.TextWidget;
+
import cpw.mods.fml.common.FMLCommonHandler;
import gregtech.api.GregTech_API;
import gregtech.api.enums.*;
@@ -38,18 +54,6 @@ import gtPlusPlus.xmod.gregtech.api.gui.widget.DataStickSlotWidget;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.computer.GT_Computercube_Description;
import gtPlusPlus.xmod.gregtech.common.computer.GT_Computercube_Simulator;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.stream.Collectors;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank implements IAddGregtechLogo {
@@ -110,14 +114,8 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank impl
@Override
public String[] getDescription() {
- return new String[] {
- this.mDescription,
- "Built in Reactor Planner",
- "Built in Scanner",
- "Built in Info-Bank",
- "Displays Fusion Recipes",
- CORE.GT_Tooltip
- };
+ return new String[] { this.mDescription, "Built in Reactor Planner", "Built in Scanner", "Built in Info-Bank",
+ "Displays Fusion Recipes", CORE.GT_Tooltip };
}
@Override
@@ -248,13 +246,13 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank impl
}
for (i = 54; i < 58; i++) {
if (this.mInventory[i] != null) {
- if (!this.getWorld().isRemote)
- this.getWorld().spawnEntityInWorld((Entity) new EntityItem(
- this.getWorld(),
- this.getXCoord() + 0.5D,
- this.getYCoord() + 0.5D,
- this.getZCoord() + 0.5D,
- this.mInventory[i]));
+ if (!this.getWorld().isRemote) this.getWorld().spawnEntityInWorld(
+ (Entity) new EntityItem(
+ this.getWorld(),
+ this.getXCoord() + 0.5D,
+ this.getYCoord() + 0.5D,
+ this.getZCoord() + 0.5D,
+ this.mInventory[i]));
this.mInventory[i] = null;
}
}
@@ -308,22 +306,20 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank impl
if (this.mMode == MODE_ELECTROLYZER) {
showElectrolyzerRecipe(0);
}
- this.getWorld()
- .addBlockEvent(
- this.getXCoord(),
- this.getYCoord(),
- this.getZCoord(),
- GregTech_API.sBlockMachines,
- 10,
- this.mMode);
- this.getWorld()
- .addBlockEvent(
- this.getXCoord(),
- this.getYCoord(),
- this.getZCoord(),
- GregTech_API.sBlockMachines,
- 11,
- this.mMaxHeat);
+ this.getWorld().addBlockEvent(
+ this.getXCoord(),
+ this.getYCoord(),
+ this.getZCoord(),
+ GregTech_API.sBlockMachines,
+ 10,
+ this.mMode);
+ this.getWorld().addBlockEvent(
+ this.getXCoord(),
+ this.getYCoord(),
+ this.getZCoord(),
+ GregTech_API.sBlockMachines,
+ 11,
+ this.mMaxHeat);
}
public void showDescription(int aIndex) {
@@ -335,105 +331,104 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank impl
if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[0] == null) {
this.mInventory[59] = null;
} else {
- this.mInventory[59] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex))
- .mStacks[0].copy();
+ this.mInventory[59] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
+ .get(aIndex)).mStacks[0].copy();
}
if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[1] == null) {
this.mInventory[60] = null;
} else {
- this.mInventory[60] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex))
- .mStacks[1].copy();
+ this.mInventory[60] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
+ .get(aIndex)).mStacks[1].copy();
}
if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[2] == null) {
this.mInventory[61] = null;
} else {
- this.mInventory[61] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex))
- .mStacks[2].copy();
+ this.mInventory[61] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
+ .get(aIndex)).mStacks[2].copy();
}
if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[3] == null) {
this.mInventory[62] = null;
} else {
- this.mInventory[62] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex))
- .mStacks[3].copy();
+ this.mInventory[62] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
+ .get(aIndex)).mStacks[3].copy();
}
if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[4] == null) {
this.mInventory[63] = null;
} else {
- this.mInventory[63] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex))
- .mStacks[4].copy();
+ this.mInventory[63] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
+ .get(aIndex)).mStacks[4].copy();
}
if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[5] == null) {
this.mInventory[64] = null;
} else {
- this.mInventory[64] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex))
- .mStacks[5].copy();
+ this.mInventory[64] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
+ .get(aIndex)).mStacks[5].copy();
this.mExplosionStrength = 100.0F;
}
if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[6] == null) {
this.mInventory[65] = null;
} else {
- this.mInventory[65] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex))
- .mStacks[6].copy();
+ this.mInventory[65] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
+ .get(aIndex)).mStacks[6].copy();
this.mExplosionStrength = 100.0F;
}
if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[7] == null) {
this.mInventory[66] = null;
} else {
- this.mInventory[66] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex))
- .mStacks[7].copy();
+ this.mInventory[66] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
+ .get(aIndex)).mStacks[7].copy();
this.mExplosionStrength = 100.0F;
}
if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[8] == null) {
this.mInventory[67] = null;
} else {
- this.mInventory[67] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex))
- .mStacks[8].copy();
+ this.mInventory[67] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
+ .get(aIndex)).mStacks[8].copy();
this.mExplosionStrength = 100.0F;
}
if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[9] == null) {
this.mInventory[68] = null;
} else {
- this.mInventory[68] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex))
- .mStacks[9].copy();
+ this.mInventory[68] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
+ .get(aIndex)).mStacks[9].copy();
this.mExplosionStrength = 100.0F;
}
if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[10] == null) {
this.mInventory[69] = null;
} else {
- this.mInventory[69] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex))
- .mStacks[10].copy();
+ this.mInventory[69] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
+ .get(aIndex)).mStacks[10].copy();
this.mExplosionStrength = 100.0F;
}
if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[11] == null) {
this.mInventory[70] = null;
} else {
- this.mInventory[70] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex))
- .mStacks[11].copy();
+ this.mInventory[70] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
+ .get(aIndex)).mStacks[11].copy();
this.mExplosionStrength = 100.0F;
}
if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[12] == null) {
this.mInventory[71] = null;
} else {
- this.mInventory[71] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex))
- .mStacks[12].copy();
+ this.mInventory[71] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
+ .get(aIndex)).mStacks[12].copy();
this.mExplosionStrength = 100.0F;
}
if (((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex)).mStacks[13] == null) {
this.mInventory[72] = null;
} else {
- this.mInventory[72] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions.get(aIndex))
- .mStacks[13].copy();
+ this.mInventory[72] = ((GT_Computercube_Description) GT_Computercube_Description.sDescriptions
+ .get(aIndex)).mStacks[13].copy();
this.mExplosionStrength = 100.0F;
}
this.mMaxHeat = aIndex;
- this.getWorld()
- .addBlockEvent(
- this.getXCoord(),
- this.getYCoord(),
- this.getZCoord(),
- GregTech_API.sBlockMachines,
- 11,
- this.mMaxHeat);
+ this.getWorld().addBlockEvent(
+ this.getXCoord(),
+ this.getYCoord(),
+ this.getZCoord(),
+ GregTech_API.sBlockMachines,
+ 11,
+ this.mMaxHeat);
}
public void switchDescriptionPageForward() {
@@ -448,50 +443,17 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank impl
public void showCentrifugeRecipe(int aIndex) {
/*
- if (aIndex >= GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.size() || aIndex < 0)
- aIndex = 0;
- GT_Recipe tRecipe = GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.get(aIndex);
- if (tRecipe != null) {
- if (tRecipe.mInput1 == null) {
- this.mInventory[59] = null;
- }
- else {
- this.mInventory[59] = tRecipe.mInput1.copy();
- }
- if (tRecipe.mInput2 == null) {
- this.mInventory[60] = null;
- }
- else {
- this.mInventory[60] = tRecipe.mInput2.copy();
- }
- if (tRecipe.mOutput1 == null) {
- this.mInventory[61] = null;
- }
- else {
- this.mInventory[61] = tRecipe.mOutput1.copy();
- }
- if (tRecipe.mOutput2 == null) {
- this.mInventory[62] = null;
- }
- else {
- this.mInventory[62] = tRecipe.mOutput2.copy();
- }
- if (tRecipe.mOutput3 == null) {
- this.mInventory[63] = null;
- }
- else {
- this.mInventory[63] = tRecipe.mOutput3.copy();
- }
- if (tRecipe.mOutput4 == null) {
- this.mInventory[64] = null;
- }
- else {
- this.mInventory[64] = tRecipe.mOutput4.copy();
- }
- this.mEU = tRecipe.mDuration * 5;
- this.mMaxHeat = aIndex;
- }
- this.getWorld().addBlockEvent(this.xCoord, this.yCoord, this.zCoord, (GregTech_API.sBlockList[1]).field_71990_ca, 11, this.mMaxHeat);
+ * if (aIndex >= GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.size() || aIndex < 0) aIndex = 0; GT_Recipe
+ * tRecipe = GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.get(aIndex); if (tRecipe != null) { if
+ * (tRecipe.mInput1 == null) { this.mInventory[59] = null; } else { this.mInventory[59] =
+ * tRecipe.mInput1.copy(); } if (tRecipe.mInput2 == null) { this.mInventory[60] = null; } else {
+ * this.mInventory[60] = tRecipe.mInput2.copy(); } if (tRecipe.mOutput1 == null) { this.mInventory[61] = null; }
+ * else { this.mInventory[61] = tRecipe.mOutput1.copy(); } if (tRecipe.mOutput2 == null) { this.mInventory[62] =
+ * null; } else { this.mInventory[62] = tRecipe.mOutput2.copy(); } if (tRecipe.mOutput3 == null) {
+ * this.mInventory[63] = null; } else { this.mInventory[63] = tRecipe.mOutput3.copy(); } if (tRecipe.mOutput4 ==
+ * null) { this.mInventory[64] = null; } else { this.mInventory[64] = tRecipe.mOutput4.copy(); } this.mEU =
+ * tRecipe.mDuration * 5; this.mMaxHeat = aIndex; } this.getWorld().addBlockEvent(this.xCoord, this.yCoord,
+ * this.zCoord, (GregTech_API.sBlockList[1]).field_71990_ca, 11, this.mMaxHeat);
*/ }
public void switchCentrifugePageForward() {
@@ -506,50 +468,17 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank impl
public void showElectrolyzerRecipe(int aIndex) {
/*
- if (aIndex >= GT_Recipe_Map.sElectrolyzerRecipes.mRecipeList.size() || aIndex < 0)
- aIndex = 0;
- GT_Recipe tRecipe = GT_Recipe_Map.sElectrolyzerRecipes.get(aIndex);
- if (tRecipe != null) {
- if (tRecipe.mInput1 == null) {
- this.mInventory[59] = null;
- }
- else {
- this.mInventory[59] = tRecipe.mInput1.copy();
- }
- if (tRecipe.mInput2 == null) {
- this.mInventory[60] = null;
- }
- else {
- this.mInventory[60] = tRecipe.mInput2.copy();
- }
- if (tRecipe.mOutput1 == null) {
- this.mInventory[61] = null;
- }
- else {
- this.mInventory[61] = tRecipe.mOutput1.copy();
- }
- if (tRecipe.mOutput2 == null) {
- this.mInventory[62] = null;
- }
- else {
- this.mInventory[62] = tRecipe.mOutput2.copy();
- }
- if (tRecipe.mOutput3 == null) {
- this.mInventory[63] = null;
- }
- else {
- this.mInventory[63] = tRecipe.mOutput3.copy();
- }
- if (tRecipe.mOutput4 == null) {
- this.mInventory[64] = null;
- }
- else {
- this.mInventory[64] = tRecipe.mOutput4.copy();
- }
- this.mEU = tRecipe.mDuration * tRecipe.mEUt;
- this.mMaxHeat = aIndex;
- }
- this.getWorld().addBlockEvent(this.xCoord, this.yCoord, this.zCoord, (GregTech_API.sBlockList[1]).field_71990_ca, 11, this.mMaxHeat);
+ * if (aIndex >= GT_Recipe_Map.sElectrolyzerRecipes.mRecipeList.size() || aIndex < 0) aIndex = 0; GT_Recipe
+ * tRecipe = GT_Recipe_Map.sElectrolyzerRecipes.get(aIndex); if (tRecipe != null) { if (tRecipe.mInput1 == null)
+ * { this.mInventory[59] = null; } else { this.mInventory[59] = tRecipe.mInput1.copy(); } if (tRecipe.mInput2 ==
+ * null) { this.mInventory[60] = null; } else { this.mInventory[60] = tRecipe.mInput2.copy(); } if
+ * (tRecipe.mOutput1 == null) { this.mInventory[61] = null; } else { this.mInventory[61] =
+ * tRecipe.mOutput1.copy(); } if (tRecipe.mOutput2 == null) { this.mInventory[62] = null; } else {
+ * this.mInventory[62] = tRecipe.mOutput2.copy(); } if (tRecipe.mOutput3 == null) { this.mInventory[63] = null;
+ * } else { this.mInventory[63] = tRecipe.mOutput3.copy(); } if (tRecipe.mOutput4 == null) { this.mInventory[64]
+ * = null; } else { this.mInventory[64] = tRecipe.mOutput4.copy(); } this.mEU = tRecipe.mDuration *
+ * tRecipe.mEUt; this.mMaxHeat = aIndex; } this.getWorld().addBlockEvent(this.xCoord, this.yCoord, this.zCoord,
+ * (GregTech_API.sBlockList[1]).field_71990_ca, 11, this.mMaxHeat);
*/ }
public void switchElectrolyzerPageForward() {
@@ -599,14 +528,13 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank impl
this.mMaxHeat = aIndex;
this.mFusionOutput = tRecipe.mFluidOutputs[0].getLocalizedName();
}
- this.getWorld()
- .addBlockEvent(
- this.getXCoord(),
- this.getYCoord(),
- this.getZCoord(),
- GregTech_API.sBlockMachines,
- 11,
- this.mMaxHeat);
+ this.getWorld().addBlockEvent(
+ this.getXCoord(),
+ this.getYCoord(),
+ this.getZCoord(),
+ GregTech_API.sBlockMachines,
+ 11,
+ this.mMaxHeat);
}
public void switchFusionPageForward() {
@@ -699,10 +627,10 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank impl
}
if (this.getBaseMetaTileEntity().isServerSide()) {
if (this.mMode == MODE_SCANNER) {
- /*if (this.mInventory[55] == null) {
- this.mInventory[55] = this.mInventory[54];
- this.mInventory[54] = null;
- }*/
+ /*
+ * if (this.mInventory[55] == null) { this.mInventory[55] = this.mInventory[54]; this.mInventory[54] =
+ * null; }
+ */
if (this.mInventory[57] == null) {
this.mInventory[57] = this.mInventory[56];
this.mInventory[56] = null;
@@ -711,47 +639,31 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank impl
// 54 - 55 || 56 - 57
// Do scanny bits
if (mSeedscanner && this.mMode == MODE_SCANNER) {
- /*if (doScan(this.mInventory[55]) == 4) {
- if ((this.mInventory[57] != null) && (this.mInventory[57].getUnlocalizedName().equals("gt.metaitem.01.32707"))) {
- GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "scanning");
- }
- }*/
- /*if (this.mEU > 0) {
- if (!this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(this.mEU, false)) {
- this.mProgress = 0;
- }
- }*/
+ /*
+ * if (doScan(this.mInventory[55]) == 4) { if ((this.mInventory[57] != null) &&
+ * (this.mInventory[57].getUnlocalizedName().equals("gt.metaitem.01.32707"))) {
+ * GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().
+ * getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "scanning"); } }
+ */
+ /*
+ * if (this.mEU > 0) { if (!this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(this.mEU, false))
+ * { this.mProgress = 0; } }
+ */
}
- /*if (mSeedscanner && this.mInventory[55] != null && GT_Utility.areStacksEqual(this.mInventory[55], Ic2Items.cropSeed, true) && this.mInventory[55].getTagCompound() != null) {
- if (this.mInventory[55].getTagCompound().getByte("scan") < 4) {
- if (this.mProgress >= 100) {
- this.mInventory[55].getTagCompound().setByte("scan", (byte) 4);
- this.mProgress = 0;
- }
- else if (this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(100, false)) {
- this.mProgress++;
- }
- }
- else {
- this.mProgress = 0;
- if (this.mInventory[56] == null) {
- this.mInventory[56] = this.mInventory[55];
- this.mInventory[55] = null;
- }
- }
- }
- else {
- this.mProgress = 0;
- if (this.mInventory[56] == null) {
- this.mInventory[56] = this.mInventory[55];
- this.mInventory[55] = null;
- }
- }*/
+ /*
+ * if (mSeedscanner && this.mInventory[55] != null && GT_Utility.areStacksEqual(this.mInventory[55],
+ * Ic2Items.cropSeed, true) && this.mInventory[55].getTagCompound() != null) { if
+ * (this.mInventory[55].getTagCompound().getByte("scan") < 4) { if (this.mProgress >= 100) {
+ * this.mInventory[55].getTagCompound().setByte("scan", (byte) 4); this.mProgress = 0; } else if
+ * (this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(100, false)) { this.mProgress++; } } else {
+ * this.mProgress = 0; if (this.mInventory[56] == null) { this.mInventory[56] = this.mInventory[55];
+ * this.mInventory[55] = null; } } } else { this.mProgress = 0; if (this.mInventory[56] == null) {
+ * this.mInventory[56] = this.mInventory[55]; this.mInventory[55] = null; } }
+ */
}
- if (this.mMode == MODE_REACTOR_PLANNER
- && mReactorplanner
+ if (this.mMode == MODE_REACTOR_PLANNER && mReactorplanner
&& this.mSimulator != null
&& this.mSimulator.simulator != null
&& this.mSimulator.simulatedReactor != null) {
@@ -769,22 +681,20 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank impl
}
if (aTick % 20L == 0L) {
- this.getWorld()
- .addBlockEvent(
- this.getXCoord(),
- this.getYCoord(),
- this.getZCoord(),
- GregTech_API.sBlockMachines,
- 10,
- this.mMode);
- this.getWorld()
- .addBlockEvent(
- this.getXCoord(),
- this.getYCoord(),
- this.getZCoord(),
- GregTech_API.sBlockMachines,
- 11,
- this.mMaxHeat);
+ this.getWorld().addBlockEvent(
+ this.getXCoord(),
+ this.getYCoord(),
+ this.getZCoord(),
+ GregTech_API.sBlockMachines,
+ 10,
+ this.mMode);
+ this.getWorld().addBlockEvent(
+ this.getXCoord(),
+ this.getYCoord(),
+ this.getZCoord(),
+ GregTech_API.sBlockMachines,
+ 11,
+ this.mMaxHeat);
}
}
}
@@ -792,16 +702,15 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank impl
@Override
public void receiveClientEvent(byte aEventID, byte aValue) {
super.receiveClientEvent(aEventID, aValue);
- if (this.getWorld().isRemote)
- switch (aEventID) {
- case 10:
- this.mNeedsUpdate = true;
- this.mMode = aValue;
- break;
- case 11:
- this.mMaxHeat = aValue;
- break;
- }
+ if (this.getWorld().isRemote) switch (aEventID) {
+ case 10:
+ this.mNeedsUpdate = true;
+ this.mMode = aValue;
+ break;
+ case 11:
+ this.mMaxHeat = aValue;
+ break;
+ }
return;
}
@@ -880,36 +789,29 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank impl
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
- return this.mTextures[
- (aSide == aFacing
- ? 0
- : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][
- aColorIndex + 1];
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ return this.mTextures[(aSide == aFacing ? 0
+ : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex
+ + 1];
}
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_3)};
+ return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_3) };
}
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(TexturesGtBlock.Casing_Computer_Cube)};
+ return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Computer_Cube) };
}
- protected static final int DID_NOT_FIND_RECIPE = 0,
- FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS = 1,
+ protected static final int DID_NOT_FIND_RECIPE = 0, FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS = 1,
FOUND_AND_SUCCESSFULLY_USED_RECIPE = 2;
/**
* Calcualtes overclocked ness using long integers
- * @param aEUt - recipe EUt
- * @param aDuration - recipe Duration
+ *
+ * @param aEUt - recipe EUt
+ * @param aDuration - recipe Duration
*/
protected void calculateOverclockedNess(int aEUt, int aDuration) {
if (mTier == 0) {
@@ -935,9 +837,8 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank impl
tempEUt <<= 2; // this actually controls overclocking
// xEUt *= 4;//this is effect of everclocking
mMaxProgress >>= 1; // this is effect of overclocking
- xEUt = mMaxProgress == 0
- ? xEUt >> 1
- : xEUt << 2; // U know, if the time is less than 1 tick make the machine use 2x less power
+ xEUt = mMaxProgress == 0 ? xEUt >> 1 : xEUt << 2; // U know, if the time is less than 1 tick make the
+ // machine use 2x less power
}
if (xEUt > Integer.MAX_VALUE - 1) {
mEU = Integer.MAX_VALUE - 1;
@@ -991,8 +892,7 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank impl
return 2;
}
ItemData tData = GT_OreDictUnificator.getAssociation(aStack);
- if ((tData != null)
- && ((tData.mPrefix == OrePrefixes.dust) || (tData.mPrefix == OrePrefixes.cell))
+ if ((tData != null) && ((tData.mPrefix == OrePrefixes.dust) || (tData.mPrefix == OrePrefixes.cell))
&& (tData.mMaterial.mMaterial.mElement != null)
&& (!tData.mMaterial.mMaterial.mElement.mIsIsotope)
&& (tData.mMaterial.mMaterial != Materials.Magic)
@@ -1038,8 +938,11 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank impl
aStack.stackSize -= 1;
this.mInventory[57] = GT_Utility.copyAmount(1L, getSpecialSlot());
- this.mInventory[57].setTagCompound(GT_Utility.getNBTContainingShort(
- new NBTTagCompound(), "map_id", (short) aStack.getItemDamage()));
+ this.mInventory[57].setTagCompound(
+ GT_Utility.getNBTContainingShort(
+ new NBTTagCompound(),
+ "map_id",
+ (short) aStack.getItemDamage()));
calculateOverclockedNess(30, 128);
// In case recipe is too OP for that machine
if (mMaxProgress == Integer.MAX_VALUE - 1 && mEU == Integer.MAX_VALUE - 1)
@@ -1134,361 +1037,306 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank impl
break;
}
- builder.widget(new ButtonWidget()
- .setOnClick((clickData, widget) -> {
- if (clickData.mouseButton == 0) {
- switchModeForward();
- } else if (clickData.mouseButton == 1) {
- switchModeBackward();
- }
- if (!widget.isClient()) {
- GT_UIInfos.openGTTileEntityUI(
- getBaseMetaTileEntity(), widget.getContext().getPlayer());
- }
- })
- .setBackground(GTPP_UITextures.BUTTON_STANDARD_16x16, GTPP_UITextures.OVERLAY_BUTTON_COMPUTER_MODE)
- .setPos(156 + (mMode == 5 ? 50 : 0), 4)
- .setSize(16, 16));
+ builder.widget(new ButtonWidget().setOnClick((clickData, widget) -> {
+ if (clickData.mouseButton == 0) {
+ switchModeForward();
+ } else if (clickData.mouseButton == 1) {
+ switchModeBackward();
+ }
+ if (!widget.isClient()) {
+ GT_UIInfos.openGTTileEntityUI(getBaseMetaTileEntity(), widget.getContext().getPlayer());
+ }
+ }).setBackground(GTPP_UITextures.BUTTON_STANDARD_16x16, GTPP_UITextures.OVERLAY_BUTTON_COMPUTER_MODE)
+ .setPos(156 + (mMode == 5 ? 50 : 0), 4).setSize(16, 16));
}
private void addPage0(ModularWindow.Builder builder) {
- builder.widget(new DrawableWidget()
- .setDrawable(GTPP_UITextures.PICTURE_COMPUTER_TOP)
- .setPos(32, 4)
- .setSize(112, 76))
- .widget(new ProgressBar()
- .setProgress(() -> (float) getBaseMetaTileEntity().getStoredEU()
- / getBaseMetaTileEntity().getEUCapacity())
- .setTexture(GTPP_UITextures.PROGRESSBAR_COMPUTER_ENERGY, 96)
- .setDirection(ProgressBar.Direction.RIGHT)
- .setPos(44, 8)
- .setSize(96, 5))
- .widget(new TextWidget("Solaris 1.7.10")
- .setDefaultColor(Utils.rgbtoHexValue(100, 190, 255))
- .setPos(56, 70));
+ builder.widget(
+ new DrawableWidget().setDrawable(GTPP_UITextures.PICTURE_COMPUTER_TOP).setPos(32, 4).setSize(112, 76))
+ .widget(
+ new ProgressBar()
+ .setProgress(
+ () -> (float) getBaseMetaTileEntity().getStoredEU()
+ / getBaseMetaTileEntity().getEUCapacity())
+ .setTexture(GTPP_UITextures.PROGRESSBAR_COMPUTER_ENERGY, 96)
+ .setDirection(ProgressBar.Direction.RIGHT).setPos(44, 8).setSize(96, 5))
+ .widget(
+ new TextWidget("Solaris 1.7.10").setDefaultColor(Utils.rgbtoHexValue(100, 190, 255))
+ .setPos(56, 70));
}
private void addPage1(ModularWindow.Builder builder) {
- builder.widget(new DrawableWidget()
- .setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK)
- .setPos(4, 103)
- .setSize(150, 59))
- .widget(new DrawableWidget()
- .setDrawable(ModularUITextures.ITEM_SLOT)
- .setPos(4, 4)
- .setSize(146, 98))
- .widget(new DrawableWidget()
- .setDrawable(GTPP_UITextures.PICTURE_V202)
- .setPos(155, 103)
- .setSize(17, 5))
- .widget(new ButtonWidget()
- .setOnClick((clickData, widget) -> saveNuclearReactor())
- .setBackground(GTPP_UITextures.BUTTON_STANDARD_16x16, GTPP_UITextures.OVERLAY_BUTTON_SAVE)
- .setPos(156, 54)
- .setSize(16, 16))
- .widget(new ButtonWidget()
- .setOnClick((clickData, widget) -> loadNuclearReactor())
- .setBackground(GTPP_UITextures.BUTTON_STANDARD_16x16, GTPP_UITextures.OVERLAY_BUTTON_LOAD)
- .setPos(156, 70)
- .setSize(16, 16))
- .widget(new ButtonWidget()
- .setOnClick((clickData, widget) -> switchNuclearReactor())
- .setBackground(
- GTPP_UITextures.BUTTON_STANDARD_16x16, GTPP_UITextures.OVERLAY_BUTTON_NUCLEAR_SWITCH)
- .setPos(156, 86)
- .setSize(16, 16));
+ builder.widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(4, 103).setSize(150, 59))
+ .widget(new DrawableWidget().setDrawable(ModularUITextures.ITEM_SLOT).setPos(4, 4).setSize(146, 98))
+ .widget(new DrawableWidget().setDrawable(GTPP_UITextures.PICTURE_V202).setPos(155, 103).setSize(17, 5))
+ .widget(
+ new ButtonWidget().setOnClick((clickData, widget) -> saveNuclearReactor())
+ .setBackground(
+ GTPP_UITextures.BUTTON_STANDARD_16x16,
+ GTPP_UITextures.OVERLAY_BUTTON_SAVE)
+ .setPos(156, 54).setSize(16, 16))
+ .widget(
+ new ButtonWidget().setOnClick((clickData, widget) -> loadNuclearReactor())
+ .setBackground(
+ GTPP_UITextures.BUTTON_STANDARD_16x16,
+ GTPP_UITextures.OVERLAY_BUTTON_LOAD)
+ .setPos(156, 70).setSize(16, 16))
+ .widget(
+ new ButtonWidget().setOnClick((clickData, widget) -> switchNuclearReactor())
+ .setBackground(
+ GTPP_UITextures.BUTTON_STANDARD_16x16,
+ GTPP_UITextures.OVERLAY_BUTTON_NUCLEAR_SWITCH)
+ .setPos(156, 86).setSize(16, 16));
SlotWidget displaySlot = new NuclearSlotWidget(inventoryHandler, 54, null);
for (int i = 0; i < 9 * 6; i++) {
- builder.widget(new NuclearSlotWidget(inventoryHandler, i, displaySlot.getMcSlot())
- .setBackground(GT_UITextures.TRANSPARENT)
- .setPos(5 + (i % 9) * 16, 5 + (i / 9) * 16));
- }
- builder.widget(displaySlot
- .setBackground(getGUITextureSet().getItemSlot(), GTPP_UITextures.OVERLAY_SLOT_ARROW_4)
- .setPos(152, 27));
- builder.widget(new TextWidget("Reactorstats:")
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(7, 108))
- .widget(TextWidget.dynamicString(() -> GT_Utility.formatNumbers(mEU) + "EU at " + mEUOut + "EU/t")
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(7, 120))
- .widget(TextWidget.dynamicString(() -> "HEM: " + (mHEM / 10000.0F))
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(7, 128))
- .widget(TextWidget.dynamicString(() ->
- GT_Utility.formatNumbers(mHeat) + "/" + GT_Utility.formatNumbers(mMaxHeat) + "Heat")
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(7, 136))
- .widget(TextWidget.dynamicString(() -> "Explosionpower: " + (mExplosionStrength / 100.0F))
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(7, 144))
- .widget(TextWidget.dynamicString(() -> "Runtime: " + ((mProgress > 0) ? (mProgress / 20) : 0) + "secs")
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(7, 152));
+ builder.widget(
+ new NuclearSlotWidget(inventoryHandler, i, displaySlot.getMcSlot())
+ .setBackground(GT_UITextures.TRANSPARENT).setPos(5 + (i % 9) * 16, 5 + (i / 9) * 16));
+ }
+ builder.widget(
+ displaySlot.setBackground(getGUITextureSet().getItemSlot(), GTPP_UITextures.OVERLAY_SLOT_ARROW_4)
+ .setPos(152, 27));
+ builder.widget(new TextWidget("Reactorstats:").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 108))
+ .widget(
+ TextWidget.dynamicString(() -> GT_Utility.formatNumbers(mEU) + "EU at " + mEUOut + "EU/t")
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 120))
+ .widget(
+ TextWidget.dynamicString(() -> "HEM: " + (mHEM / 10000.0F))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 128))
+ .widget(
+ TextWidget.dynamicString(
+ () -> GT_Utility.formatNumbers(mHeat) + "/"
+ + GT_Utility.formatNumbers(mMaxHeat)
+ + "Heat")
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 136))
+ .widget(
+ TextWidget.dynamicString(() -> "Explosionpower: " + (mExplosionStrength / 100.0F))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 144))
+ .widget(
+ TextWidget.dynamicString(() -> "Runtime: " + ((mProgress > 0) ? (mProgress / 20) : 0) + "secs")
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 152));
}
private void addPage2(ModularWindow.Builder builder) {
- builder.widget(new DrawableWidget()
- .setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK)
- .setPos(48, 4)
- .setSize(81, 67));
+ builder.widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(48, 4).setSize(81, 67));
builder.widget(new DataStickSlotWidget(inventoryHandler, 54).setPos(7, 27))
- .widget(new SlotWidget(inventoryHandler, 55)
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_MICROSCOPE)
- .setPos(25, 27))
- .widget(new SlotWidget(inventoryHandler, 56)
- .setAccess(true, false)
- .setPos(133, 27))
- .widget(new SlotWidget(inventoryHandler, 57)
- .setAccess(true, false)
- .setPos(151, 27));
- builder.widget(new TextWidget("Scanner")
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> mProgress == 0)
+ .widget(
+ new SlotWidget(inventoryHandler, 55)
+ .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_MICROSCOPE)
+ .setPos(25, 27))
+ .widget(new SlotWidget(inventoryHandler, 56).setAccess(true, false).setPos(133, 27))
+ .widget(new SlotWidget(inventoryHandler, 57).setAccess(true, false).setPos(151, 27));
+ builder.widget(
+ new TextWidget("Scanner").setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> mProgress == 0)
.setPos(51, 7))
- .widget(new TextWidget("Can be used to")
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> mProgress == 0)
- .setPos(51, 24))
- .widget(new TextWidget("scan things")
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> mProgress == 0)
- .setPos(51, 32))
- .widget(new TextWidget("Currently")
- .setDefaultColor(Utils.rgbtoHexValue(200, 20, 20))
- .setEnabled(widget -> mProgress == 0)
- .setPos(51, 48))
- .widget(new TextWidget("Disabled")
- .setDefaultColor(Utils.rgbtoHexValue(200, 20, 20))
- .setEnabled(widget -> mProgress == 0)
- .setPos(51, 56))
- .widget(new TextWidget("Progress:")
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> mProgress != 0)
- .setPos(51, 24))
- .widget(TextWidget.dynamicString(() -> MathUtils.findPercentage(
- mProgress, getBaseMetaTileEntity().getMaxProgress())
- + " %")
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> mProgress != 0)
- .setPos(51, 32))
+ .widget(
+ new TextWidget("Can be used to").setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setEnabled(widget -> mProgress == 0).setPos(51, 24))
+ .widget(
+ new TextWidget("scan things").setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setEnabled(widget -> mProgress == 0).setPos(51, 32))
+ .widget(
+ new TextWidget("Currently").setDefaultColor(Utils.rgbtoHexValue(200, 20, 20))
+ .setEnabled(widget -> mProgress == 0).setPos(51, 48))
+ .widget(
+ new TextWidget("Disabled").setDefaultColor(Utils.rgbtoHexValue(200, 20, 20))
+ .setEnabled(widget -> mProgress == 0).setPos(51, 56))
+ .widget(
+ new TextWidget("Progress:")
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(
+ widget -> mProgress != 0)
+ .setPos(51, 24))
+ .widget(
+ TextWidget.dynamicString(
+ () -> MathUtils.findPercentage(mProgress, getBaseMetaTileEntity().getMaxProgress())
+ + " %")
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> mProgress != 0)
+ .setPos(51, 32))
.widget(new FakeSyncWidget.IntegerSyncer(() -> mProgress, val -> mProgress = val));
}
private void addPage3(ModularWindow.Builder builder) {
- builder.widget(new DrawableWidget()
- .setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK)
- .setPos(4, 4)
- .setSize(86, 41))
- .widget(new DrawableWidget()
- .setDrawable(GTPP_UITextures.PICTURE_ARROWS_SEPARATE)
- .setPos(110, 23)
- .setSize(40, 40))
- .widget(new ButtonWidget()
- .setOnClick((clickData, widget) -> switchCentrifugePageBackward())
- .setBackground(GTPP_UITextures.BUTTON_STANDARD_16x16, GTPP_UITextures.OVERLAY_BUTTON_ARROW_LEFT)
- .setPos(88, 65)
- .setSize(16, 16))
- .widget(new ButtonWidget()
- .setOnClick((clickData, widget) -> switchCentrifugePageForward())
- .setBackground(
- GTPP_UITextures.BUTTON_STANDARD_16x16, GTPP_UITextures.OVERLAY_BUTTON_ARROW_RIGHT)
- .setPos(104, 65)
- .setSize(16, 16))
- .widget(SlotWidget.phantom(inventoryHandler, 59)
- .disableInteraction()
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_CENTRIFUGE)
- .setPos(121, 34))
- .widget(SlotWidget.phantom(inventoryHandler, 60)
- .disableInteraction()
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_CANISTER)
- .setPos(91, 4))
- .widget(SlotWidget.phantom(inventoryHandler, 61)
- .disableInteraction()
- .setPos(121, 4))
- .widget(SlotWidget.phantom(inventoryHandler, 62)
- .disableInteraction()
- .setPos(151, 34))
- .widget(SlotWidget.phantom(inventoryHandler, 63)
- .disableInteraction()
- .setPos(121, 64))
- .widget(SlotWidget.phantom(inventoryHandler, 64)
- .disableInteraction()
- .setPos(91, 34))
- .widget(new TextWidget("Centrifuge")
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(7, 7))
- .widget(TextWidget.dynamicString(() ->
- "Recipe: " + (mMaxHeat + 1) + "/" + GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.size())
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(7, 23))
- .widget(TextWidget.dynamicString(() -> "EU: " + GT_Utility.formatNumbers(mEU))
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(7, 31));
+ builder.widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(4, 4).setSize(86, 41))
+ .widget(
+ new DrawableWidget().setDrawable(GTPP_UITextures.PICTURE_ARROWS_SEPARATE).setPos(110, 23)
+ .setSize(40, 40))
+ .widget(
+ new ButtonWidget().setOnClick((clickData, widget) -> switchCentrifugePageBackward())
+ .setBackground(
+ GTPP_UITextures.BUTTON_STANDARD_16x16,
+ GTPP_UITextures.OVERLAY_BUTTON_ARROW_LEFT)
+ .setPos(88, 65).setSize(16, 16))
+ .widget(
+ new ButtonWidget().setOnClick((clickData, widget) -> switchCentrifugePageForward())
+ .setBackground(
+ GTPP_UITextures.BUTTON_STANDARD_16x16,
+ GTPP_UITextures.OVERLAY_BUTTON_ARROW_RIGHT)
+ .setPos(104, 65).setSize(16, 16))
+ .widget(
+ SlotWidget.phantom(inventoryHandler, 59).disableInteraction()
+ .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_CENTRIFUGE)
+ .setPos(121, 34))
+ .widget(
+ SlotWidget.phantom(inventoryHandler, 60).disableInteraction()
+ .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_CANISTER)
+ .setPos(91, 4))
+ .widget(SlotWidget.phantom(inventoryHandler, 61).disableInteraction().setPos(121, 4))
+ .widget(SlotWidget.phantom(inventoryHandler, 62).disableInteraction().setPos(151, 34))
+ .widget(SlotWidget.phantom(inventoryHandler, 63).disableInteraction().setPos(121, 64))
+ .widget(SlotWidget.phantom(inventoryHandler, 64).disableInteraction().setPos(91, 34))
+ .widget(new TextWidget("Centrifuge").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 7))
+ .widget(
+ TextWidget
+ .dynamicString(
+ () -> "Recipe: " + (mMaxHeat + 1)
+ + "/"
+ + GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.size())
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 23))
+ .widget(
+ TextWidget.dynamicString(() -> "EU: " + GT_Utility.formatNumbers(mEU))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 31));
}
private void addPage4(ModularWindow.Builder builder) {
- builder.widget(new DrawableWidget()
- .setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK)
- .setPos(4, 4)
- .setSize(116, 61))
- .widget(new DrawableWidget()
- .setDrawable(GTPP_UITextures.PICTURE_ARROWS_FUSION)
- .setPos(121, 23)
- .setSize(29, 40))
- .widget(new ButtonWidget()
- .setOnClick((clickData, widget) -> switchFusionPageBackward())
- .setBackground(GTPP_UITextures.BUTTON_STANDARD_16x16, GTPP_UITextures.OVERLAY_BUTTON_ARROW_LEFT)
- .setPos(88, 65)
- .setSize(16, 16))
- .widget(new ButtonWidget()
- .setOnClick((clickData, widget) -> switchFusionPageForward())
- .setBackground(
- GTPP_UITextures.BUTTON_STANDARD_16x16, GTPP_UITextures.OVERLAY_BUTTON_ARROW_RIGHT)
- .setPos(104, 65)
- .setSize(16, 16))
- .widget(SlotWidget.phantom(inventoryHandler, 59)
- .disableInteraction()
- .setPos(121, 4))
- .widget(SlotWidget.phantom(inventoryHandler, 60)
- .disableInteraction()
- .setPos(121, 64))
- .widget(SlotWidget.phantom(inventoryHandler, 61)
- .disableInteraction()
- .setPos(151, 34))
- .widget(new TextWidget("Fusionreactor")
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(7, 7))
- .widget(TextWidget.dynamicString(() -> "Recipe: " + (mMaxHeat + 1) + "/"
- + GT_TileEntity_ComputerCube.sFusionReactorRecipes.size())
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(7, 15))
- .widget(TextWidget.dynamicString(() -> "Start: " + GT_Utility.formatNumbers(mEU) + "EU")
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(7, 23))
- .widget(TextWidget.dynamicString(() -> "EU/t: " + GT_Utility.formatNumbers(mEUOut))
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(7, 31))
- .widget(TextWidget.dynamicString(() -> GT_Utility.formatNumbers(mHeat) + " Ticks")
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(7, 39))
- .widget(TextWidget.dynamicString(() -> GT_TileEntity_ComputerCube.sFusionReactorRecipes
- .get(mMaxHeat)
- .mFluidOutputs[0]
- .getLocalizedName())
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(7, 55))
- .widget(TextWidget.dynamicString(() -> mEUOut < 0
- ? "IN: " + GT_Utility.formatNumbers(-mEUOut * mHeat) + "EU"
- : "OUT: " + GT_Utility.formatNumbers(mEUOut * mHeat) + "EU")
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(7, 47));
+ builder.widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(4, 4).setSize(116, 61))
+ .widget(
+ new DrawableWidget().setDrawable(GTPP_UITextures.PICTURE_ARROWS_FUSION).setPos(121, 23)
+ .setSize(29, 40))
+ .widget(
+ new ButtonWidget().setOnClick((clickData, widget) -> switchFusionPageBackward())
+ .setBackground(
+ GTPP_UITextures.BUTTON_STANDARD_16x16,
+ GTPP_UITextures.OVERLAY_BUTTON_ARROW_LEFT)
+ .setPos(88, 65).setSize(16, 16))
+ .widget(
+ new ButtonWidget().setOnClick((clickData, widget) -> switchFusionPageForward())
+ .setBackground(
+ GTPP_UITextures.BUTTON_STANDARD_16x16,
+ GTPP_UITextures.OVERLAY_BUTTON_ARROW_RIGHT)
+ .setPos(104, 65).setSize(16, 16))
+ .widget(SlotWidget.phantom(inventoryHandler, 59).disableInteraction().setPos(121, 4))
+ .widget(SlotWidget.phantom(inventoryHandler, 60).disableInteraction().setPos(121, 64))
+ .widget(SlotWidget.phantom(inventoryHandler, 61).disableInteraction().setPos(151, 34))
+ .widget(new TextWidget("Fusionreactor").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 7))
+ .widget(
+ TextWidget
+ .dynamicString(
+ () -> "Recipe: " + (mMaxHeat + 1)
+ + "/"
+ + GT_TileEntity_ComputerCube.sFusionReactorRecipes.size())
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 15))
+ .widget(
+ TextWidget.dynamicString(() -> "Start: " + GT_Utility.formatNumbers(mEU) + "EU")
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 23))
+ .widget(
+ TextWidget.dynamicString(() -> "EU/t: " + GT_Utility.formatNumbers(mEUOut))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 31))
+ .widget(
+ TextWidget.dynamicString(() -> GT_Utility.formatNumbers(mHeat) + " Ticks")
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 39))
+ .widget(
+ TextWidget.dynamicString(
+ () -> GT_TileEntity_ComputerCube.sFusionReactorRecipes.get(mMaxHeat).mFluidOutputs[0]
+ .getLocalizedName())
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 55))
+ .widget(
+ TextWidget
+ .dynamicString(
+ () -> mEUOut < 0 ? "IN: " + GT_Utility.formatNumbers(-mEUOut * mHeat) + "EU"
+ : "OUT: " + GT_Utility.formatNumbers(mEUOut * mHeat) + "EU")
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 47));
}
private void addPage5(ModularWindow.Builder builder) {
- builder.widget(new DrawableWidget()
- .setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK)
- .setPos(4, 4)
- .setSize(200, 141))
- .widget(new DrawableWidget()
- .setDrawable(() -> mExplosionStrength != 0 ? GTPP_UITextures.PICTURE_COMPUTER_GRID : null)
- .setPos(152, 6)
- .setSize(50, 50))
- .widget(new ButtonWidget()
- .setOnClick((clickData, widget) -> switchDescriptionPageBackward())
- .setBackground(GTPP_UITextures.BUTTON_STANDARD_16x16, GTPP_UITextures.OVERLAY_BUTTON_ARROW_LEFT)
- .setPos(190, 146)
- .setSize(16, 16))
- .widget(new ButtonWidget()
- .setOnClick((clickData, widget) -> switchDescriptionPageForward())
- .setBackground(
- GTPP_UITextures.BUTTON_STANDARD_16x16, GTPP_UITextures.OVERLAY_BUTTON_ARROW_RIGHT)
- .setPos(206, 146)
- .setSize(16, 16));
+ builder.widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(4, 4).setSize(200, 141))
+ .widget(
+ new DrawableWidget()
+ .setDrawable(
+ () -> mExplosionStrength != 0 ? GTPP_UITextures.PICTURE_COMPUTER_GRID : null)
+ .setPos(152, 6).setSize(50, 50))
+ .widget(
+ new ButtonWidget().setOnClick((clickData, widget) -> switchDescriptionPageBackward())
+ .setBackground(
+ GTPP_UITextures.BUTTON_STANDARD_16x16,
+ GTPP_UITextures.OVERLAY_BUTTON_ARROW_LEFT)
+ .setPos(190, 146).setSize(16, 16))
+ .widget(
+ new ButtonWidget().setOnClick((clickData, widget) -> switchDescriptionPageForward())
+ .setBackground(
+ GTPP_UITextures.BUTTON_STANDARD_16x16,
+ GTPP_UITextures.OVERLAY_BUTTON_ARROW_RIGHT)
+ .setPos(206, 146).setSize(16, 16));
for (int i = 0; i < 5; i++) {
- builder.widget(SlotWidget.phantom(inventoryHandler, i + 59)
- .disableInteraction()
- .setPos(205, 37 + i * 18));
+ builder.widget(SlotWidget.phantom(inventoryHandler, i + 59).disableInteraction().setPos(205, 37 + i * 18));
}
for (int i = 0; i < 9; i++) {
- builder.widget(SlotWidget.phantom(inventoryHandler, i + 64)
- .disableInteraction()
- .setBackground(GT_UITextures.TRANSPARENT)
- .setPos(152 + (i % 3) * 16, 6 + (i / 3) * 16));
+ builder.widget(
+ SlotWidget.phantom(inventoryHandler, i + 64).disableInteraction()
+ .setBackground(GT_UITextures.TRANSPARENT).setPos(152 + (i % 3) * 16, 6 + (i / 3) * 16));
}
int descriptionMaxLines = GT_Computercube_Description.sDescriptions.stream()
- .sorted((d1, d2) -> d2.mDescription.length - d1.mDescription.length)
- .collect(Collectors.toList())
- .get(0)
- .mDescription
- .length;
+ .sorted((d1, d2) -> d2.mDescription.length - d1.mDescription.length).collect(Collectors.toList())
+ .get(0).mDescription.length;
for (int i = 0; i < descriptionMaxLines; i++) {
final int index = i;
builder.widget(TextWidget.dynamicString(() -> {
- if (mMaxHeat >= 0 && mMaxHeat < GT_Computercube_Description.sDescriptions.size()) {
- String[] descriptions =
- GT_Computercube_Description.sDescriptions.get(mMaxHeat).mDescription;
- if (index < descriptions.length) {
- return descriptions[index];
- }
- }
- return "";
- })
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(7, 7 + index * 8));
+ if (mMaxHeat >= 0 && mMaxHeat < GT_Computercube_Description.sDescriptions.size()) {
+ String[] descriptions = GT_Computercube_Description.sDescriptions.get(mMaxHeat).mDescription;
+ if (index < descriptions.length) {
+ return descriptions[index];
+ }
+ }
+ return "";
+ }).setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 7 + index * 8));
}
}
private void addPage6(ModularWindow.Builder builder) {
- builder.widget(new DrawableWidget()
- .setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK)
- .setPos(4, 4)
- .setSize(86, 41))
- .widget(new DrawableWidget()
- .setDrawable(GTPP_UITextures.PICTURE_ARROWS_SEPARATE)
- .setPos(110, 23)
- .setSize(40, 40))
- .widget(new ButtonWidget()
- .setOnClick((clickData, widget) -> switchElectrolyzerPageBackward())
- .setBackground(GTPP_UITextures.BUTTON_STANDARD_16x16, GTPP_UITextures.OVERLAY_BUTTON_ARROW_LEFT)
- .setPos(88, 65)
- .setSize(16, 16))
- .widget(new ButtonWidget()
- .setOnClick((clickData, widget) -> switchElectrolyzerPageForward())
- .setBackground(
- GTPP_UITextures.BUTTON_STANDARD_16x16, GTPP_UITextures.OVERLAY_BUTTON_ARROW_RIGHT)
- .setPos(104, 65)
- .setSize(16, 16))
- .widget(SlotWidget.phantom(inventoryHandler, 59)
- .disableInteraction()
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_CHARGER)
- .setPos(121, 34))
- .widget(SlotWidget.phantom(inventoryHandler, 60)
- .disableInteraction()
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_CANISTER)
- .setPos(91, 4))
- .widget(SlotWidget.phantom(inventoryHandler, 61)
- .disableInteraction()
- .setPos(121, 4))
- .widget(SlotWidget.phantom(inventoryHandler, 62)
- .disableInteraction()
- .setPos(151, 34))
- .widget(SlotWidget.phantom(inventoryHandler, 63)
- .disableInteraction()
- .setPos(121, 64))
- .widget(SlotWidget.phantom(inventoryHandler, 64)
- .disableInteraction()
- .setPos(91, 34))
- .widget(new TextWidget("Electrolyzer")
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(7, 7))
- .widget(TextWidget.dynamicString(() -> "Recipe: " + (mMaxHeat + 1) + "/"
- + GT_Recipe_Map.sElectrolyzerRecipes.mRecipeList.size())
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(7, 23))
- .widget(TextWidget.dynamicString(() -> "EU: " + GT_Utility.formatNumbers(mEU))
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(7, 31));
+ builder.widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(4, 4).setSize(86, 41))
+ .widget(
+ new DrawableWidget().setDrawable(GTPP_UITextures.PICTURE_ARROWS_SEPARATE).setPos(110, 23)
+ .setSize(40, 40))
+ .widget(
+ new ButtonWidget().setOnClick((clickData, widget) -> switchElectrolyzerPageBackward())
+ .setBackground(
+ GTPP_UITextures.BUTTON_STANDARD_16x16,
+ GTPP_UITextures.OVERLAY_BUTTON_ARROW_LEFT)
+ .setPos(88, 65).setSize(16, 16))
+ .widget(
+ new ButtonWidget().setOnClick((clickData, widget) -> switchElectrolyzerPageForward())
+ .setBackground(
+ GTPP_UITextures.BUTTON_STANDARD_16x16,
+ GTPP_UITextures.OVERLAY_BUTTON_ARROW_RIGHT)
+ .setPos(104, 65).setSize(16, 16))
+ .widget(
+ SlotWidget.phantom(inventoryHandler, 59).disableInteraction()
+ .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_CHARGER)
+ .setPos(121, 34))
+ .widget(
+ SlotWidget.phantom(inventoryHandler, 60).disableInteraction()
+ .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_CANISTER)
+ .setPos(91, 4))
+ .widget(SlotWidget.phantom(inventoryHandler, 61).disableInteraction().setPos(121, 4))
+ .widget(SlotWidget.phantom(inventoryHandler, 62).disableInteraction().setPos(151, 34))
+ .widget(SlotWidget.phantom(inventoryHandler, 63).disableInteraction().setPos(121, 64))
+ .widget(SlotWidget.phantom(inventoryHandler, 64).disableInteraction().setPos(91, 34))
+ .widget(new TextWidget("Electrolyzer").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 7))
+ .widget(
+ TextWidget
+ .dynamicString(
+ () -> "Recipe: " + (mMaxHeat + 1)
+ + "/"
+ + GT_Recipe_Map.sElectrolyzerRecipes.mRecipeList.size())
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 23))
+ .widget(
+ TextWidget.dynamicString(() -> "EU: " + GT_Utility.formatNumbers(mEU))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 31));
}
private class NuclearSlotWidget extends SlotWidget {
@@ -1521,10 +1369,7 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank impl
if (tStack == null) {
if (displaySlot.getStack() != null && aSlotIndex != 58) {
tSlot.putStack(displaySlot.getStack().copy());
- getSimulator()
- .slotClick(
- aSlotIndex,
- new GT_ItemStack(displaySlot.getStack().copy()));
+ getSimulator().slotClick(aSlotIndex, new GT_ItemStack(displaySlot.getStack().copy()));
} else {
tSlot.putStack(new ItemStack(GT_TileEntity_ComputerCube.sReactorList.get(0).mItem, 1));
getSimulator().slotClick(aSlotIndex, GT_TileEntity_ComputerCube.sReactorList.get(0));
@@ -1535,9 +1380,11 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank impl
if (GT_TileEntity_ComputerCube.sReactorList.get(i - 1).mItem == tStack.getItem()) {
tSlot.putStack(new ItemStack(GT_TileEntity_ComputerCube.sReactorList.get(i).mItem, 1, 0));
getSimulator().slotClick(aSlotIndex, GT_TileEntity_ComputerCube.sReactorList.get(i));
- /*if (tSlot.getStack() != null && tSlot.getStack().getItem() == GT_ModHandler.getIC2Item("reactorIsotopeCell", 1).getItem()) {
- tSlot.getStack().setItemDamage(tSlot.getStack().getMaxDamage() - 1);
- }*/
+ /*
+ * if (tSlot.getStack() != null && tSlot.getStack().getItem() ==
+ * GT_ModHandler.getIC2Item("reactorIsotopeCell", 1).getItem()) {
+ * tSlot.getStack().setItemDamage(tSlot.getStack().getMaxDamage() - 1); }
+ */
return;
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/TileEntitySolarHeater.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/TileEntitySolarHeater.java
index 5360ba612a..b690e56107 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/TileEntitySolarHeater.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/TileEntitySolarHeater.java
@@ -1,5 +1,9 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.misc;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -11,9 +15,6 @@ import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMetaTileEntity_SolarTower;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
public class TileEntitySolarHeater extends GT_MetaTileEntity_TieredMachineBlock {
@@ -23,28 +24,19 @@ public class TileEntitySolarHeater extends GT_MetaTileEntity_TieredMachineBlock
private int mTX, mTY, mTZ;
private Byte mRequiredFacing;
- public TileEntitySolarHeater(
- final int aID,
- final String aName,
- final String aNameRegional,
- final int aTier,
- final String aDescription,
- final int aSlotCount) {
+ public TileEntitySolarHeater(final int aID, final String aName, final String aNameRegional, final int aTier,
+ final String aDescription, final int aSlotCount) {
super(aID, aName, aNameRegional, aTier, aSlotCount, aDescription);
}
- public TileEntitySolarHeater(
- final String aName,
- final int aTier,
- final String aDescription,
- final ITexture[][][] aTextures,
- final int aSlotCount) {
+ public TileEntitySolarHeater(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures, final int aSlotCount) {
super(aName, aTier, aSlotCount, aDescription, aTextures);
}
@Override
public String[] getDescription() {
- return new String[] {this.mDescription, "Point me at a Solar Tower", CORE.GT_Tooltip};
+ return new String[] { this.mDescription, "Point me at a Solar Tower", CORE.GT_Tooltip };
}
@Override
@@ -66,79 +58,57 @@ public class TileEntitySolarHeater extends GT_MetaTileEntity_TieredMachineBlock
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
- return this.mTextures[
- (aActive ? 5 : 0)
- + (aSide == aFacing
- ? 0
- : aSide == GT_Utility.getOppositeSide(aFacing)
- ? 1
- : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][
- aColorIndex + 1];
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0
+ : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex
+ + 1];
}
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top),
- new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV)
- };
+ return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top),
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV) };
}
public ITexture[] getBack(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top)};
+ return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top) };
}
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)};
+ return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top),
- new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LuV)
- };
+ return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top),
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LuV) };
}
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top),
- new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV)
- };
+ return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top),
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV) };
}
public ITexture[] getFrontActive(final byte aColor) {
- return new ITexture[] {
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top),
- new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV)
- };
+ return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top),
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV) };
}
public ITexture[] getBackActive(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top)};
+ return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top) };
}
public ITexture[] getBottomActive(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)};
+ return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) };
}
public ITexture[] getTopActive(final byte aColor) {
- return new ITexture[] {
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top),
- new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LuV)
- };
+ return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top),
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LuV) };
}
public ITexture[] getSidesActive(final byte aColor) {
- return new ITexture[] {
- new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top),
- new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV)
- };
+ return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top),
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV) };
}
@Override
@@ -158,7 +128,7 @@ public class TileEntitySolarHeater extends GT_MetaTileEntity_TieredMachineBlock
@Override
public String[] getInfoData() {
- return new String[] {this.getLocalName(), "Testificate"};
+ return new String[] { this.getLocalName(), "Testificate" };
}
@Override
@@ -247,25 +217,19 @@ public class TileEntitySolarHeater extends GT_MetaTileEntity_TieredMachineBlock
@Override
public void saveNBTData(NBTTagCompound aNBT) {
- /*aNBT.setBoolean("mHasTower", mHasTower);
- if (this.mHasTower) {
- aNBT.setInteger("mTX", mTX);
- aNBT.setInteger("mTY", mTY);
- aNBT.setInteger("mTZ", mTZ);
- }*/
+ /*
+ * aNBT.setBoolean("mHasTower", mHasTower); if (this.mHasTower) { aNBT.setInteger("mTX", mTX);
+ * aNBT.setInteger("mTY", mTY); aNBT.setInteger("mTZ", mTZ); }
+ */
}
@Override
public void loadNBTData(NBTTagCompound aNBT) {
- /*this.mHasTower = aNBT.getBoolean("mHasTower");
- if (this.mHasTower) {
- if (aNBT.hasKey("mTX"))
- this.mTX = aNBT.getInteger("mTX");
- if (aNBT.hasKey("mTY"))
- this.mTY = aNBT.getInteger("mTY");
- if (aNBT.hasKey("mTZ"))
- this.mTZ = aNBT.getInteger("mTZ");
- }*/
+ /*
+ * this.mHasTower = aNBT.getBoolean("mHasTower"); if (this.mHasTower) { if (aNBT.hasKey("mTX")) this.mTX =
+ * aNBT.getInteger("mTX"); if (aNBT.hasKey("mTY")) this.mTY = aNBT.getInteger("mTY"); if (aNBT.hasKey("mTZ"))
+ * this.mTZ = aNBT.getInteger("mTZ"); }
+ */
}
@Override
@@ -298,12 +262,10 @@ public class TileEntitySolarHeater extends GT_MetaTileEntity_TieredMachineBlock
}
public boolean canSeeSky() {
- if (this.getBaseMetaTileEntity()
- .getWorld()
- .canBlockSeeTheSky(
- this.getBaseMetaTileEntity().getXCoord(),
- this.getBaseMetaTileEntity().getYCoord() + 1,
- this.getBaseMetaTileEntity().getZCoord())) {
+ if (this.getBaseMetaTileEntity().getWorld().canBlockSeeTheSky(
+ this.getBaseMetaTileEntity().getXCoord(),
+ this.getBaseMetaTileEntity().getYCoord() + 1,
+ this.getBaseMetaTileEntity().getZCoord())) {
return true;
}
return false;
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneBase.java
index 9846813ba0..f160bc1eba 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneBase.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneBase.java
@@ -1,47 +1,36 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.redstone;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock;
import gregtech.api.objects.GT_ItemStack;
import gtPlusPlus.core.lib.CORE;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
public abstract class GT_MetaTileEntity_RedstoneBase extends GT_MetaTileEntity_TieredMachineBlock {
protected int mOpenerCount;
- public GT_MetaTileEntity_RedstoneBase(
- int aID,
- String aName,
- String aNameRegional,
- int aTier,
- int aInvSlotCount,
- String aDescription,
- ITexture... aTextures) {
+ public GT_MetaTileEntity_RedstoneBase(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount,
+ String aDescription, ITexture... aTextures) {
super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures);
}
- public GT_MetaTileEntity_RedstoneBase(
- int aID,
- String aName,
- String aNameRegional,
- int aTier,
- int aInvSlotCount,
- String[] aDescription,
- ITexture... aTextures) {
+ public GT_MetaTileEntity_RedstoneBase(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount,
+ String[] aDescription, ITexture... aTextures) {
super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures);
}
- public GT_MetaTileEntity_RedstoneBase(
- String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_RedstoneBase(String aName, int aTier, int aInvSlotCount, String aDescription,
+ ITexture[][][] aTextures) {
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
}
- public GT_MetaTileEntity_RedstoneBase(
- String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_RedstoneBase(String aName, int aTier, int aInvSlotCount, String[] aDescription,
+ ITexture[][][] aTextures) {
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
}
@@ -117,6 +106,6 @@ public abstract class GT_MetaTileEntity_RedstoneBase extends GT_MetaTileEntity_T
@Override
public String[] getDescription() {
- return new String[] {this.mDescription, CORE.GT_Tooltip};
+ return new String[] { this.mDescription, CORE.GT_Tooltip };
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneButtonPanel.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneButtonPanel.java
index 3cf868a998..187fafb4b7 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneButtonPanel.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneButtonPanel.java
@@ -1,5 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.redstone;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -8,8 +11,6 @@ import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.nbt.NBTTagCompound;
public class GT_MetaTileEntity_RedstoneButtonPanel extends GT_MetaTileEntity_RedstoneBase {
@@ -33,8 +34,8 @@ public class GT_MetaTileEntity_RedstoneButtonPanel extends GT_MetaTileEntity_Red
"Right-click with Screwdriver to change Button Design");
}
- public GT_MetaTileEntity_RedstoneButtonPanel(
- final String aName, String aDescription, final ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_RedstoneButtonPanel(final String aName, String aDescription,
+ final ITexture[][][] aTextures) {
super(aName, 5, 0, aDescription, aTextures);
}
@@ -67,8 +68,8 @@ public class GT_MetaTileEntity_RedstoneButtonPanel extends GT_MetaTileEntity_Red
}
@Override
- public boolean onRightclick(
- IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) {
+ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX,
+ float aY, float aZ) {
if (aSide == getBaseMetaTileEntity().getFrontFacing()) {
if (getBaseMetaTileEntity().isServerSide()) {
mUpdate = 2;
@@ -98,24 +99,24 @@ public class GT_MetaTileEntity_RedstoneButtonPanel extends GT_MetaTileEntity_Red
switch (aSide) {
case 0:
case 1:
- mRedstoneStrength =
- (byte) (mRedstoneStrength ^ (1 << (((byte) (aX * 2) + 2 * (byte) (aZ * 2)))));
+ mRedstoneStrength = (byte) (mRedstoneStrength
+ ^ (1 << (((byte) (aX * 2) + 2 * (byte) (aZ * 2)))));
break;
case 2:
- mRedstoneStrength = (byte)
- (mRedstoneStrength ^ (1 << (((byte) (2 - aX * 2) + 2 * (byte) (2 - aY * 2)))));
+ mRedstoneStrength = (byte) (mRedstoneStrength
+ ^ (1 << (((byte) (2 - aX * 2) + 2 * (byte) (2 - aY * 2)))));
break;
case 3:
- mRedstoneStrength = (byte)
- (mRedstoneStrength ^ (1 << (((byte) (aX * 2) + 2 * (byte) (2 - aY * 2)))));
+ mRedstoneStrength = (byte) (mRedstoneStrength
+ ^ (1 << (((byte) (aX * 2) + 2 * (byte) (2 - aY * 2)))));
break;
case 4:
- mRedstoneStrength = (byte)
- (mRedstoneStrength ^ (1 << (((byte) (aZ * 2) + 2 * (byte) (2 - aY * 2)))));
+ mRedstoneStrength = (byte) (mRedstoneStrength
+ ^ (1 << (((byte) (aZ * 2) + 2 * (byte) (2 - aY * 2)))));
break;
case 5:
- mRedstoneStrength = (byte)
- (mRedstoneStrength ^ (1 << (((byte) (2 - aZ * 2) + 2 * (byte) (2 - aY * 2)))));
+ mRedstoneStrength = (byte) (mRedstoneStrength
+ ^ (1 << (((byte) (2 - aZ * 2) + 2 * (byte) (2 - aY * 2)))));
break;
}
break;
@@ -156,12 +157,12 @@ public class GT_MetaTileEntity_RedstoneButtonPanel extends GT_MetaTileEntity_Red
mRedstoneStrength = 0;
}
for (byte i = 0; i < 6; i++) {
- getBaseMetaTileEntity()
- .setStrongOutputRedstoneSignal(
- i, i == getBaseMetaTileEntity().getFrontFacing() ? (byte) 0 : mRedstoneStrength);
- getBaseMetaTileEntity()
- .setInternalOutputRedstoneSignal(
- i, i == getBaseMetaTileEntity().getFrontFacing() ? (byte) 0 : mRedstoneStrength);
+ getBaseMetaTileEntity().setStrongOutputRedstoneSignal(
+ i,
+ i == getBaseMetaTileEntity().getFrontFacing() ? (byte) 0 : mRedstoneStrength);
+ getBaseMetaTileEntity().setInternalOutputRedstoneSignal(
+ i,
+ i == getBaseMetaTileEntity().getFrontFacing() ? (byte) 0 : mRedstoneStrength);
}
}
}
@@ -190,72 +191,48 @@ public class GT_MetaTileEntity_RedstoneButtonPanel extends GT_MetaTileEntity_Red
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
if (aSide == aFacing) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1],
- new GT_RenderedTexture(sIconList[mType * 16 + mRedstoneStrength])
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1],
+ new GT_RenderedTexture(sIconList[mType * 16 + mRedstoneStrength]) };
}
- return this.mTextures[
- (aActive || hasRedstoneSignal() ? 5 : 0)
- + (aSide == aFacing
- ? 0
- : aSide == GT_Utility.getOppositeSide(aFacing)
- ? 1
- : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][
- aColorIndex + 1];
+ return this.mTextures[(aActive || hasRedstoneSignal() ? 5 : 0) + (aSide == aFacing ? 0
+ : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex
+ + 1];
}
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]};
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1] };
}
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Top_Main_Off)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Top_Main_Off) };
}
public ITexture[] getTopActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Top_Main_On)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Top_Main_On) };
}
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Bottom_Main_Off)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Bottom_Main_Off) };
}
public ITexture[] getBottomActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Bottom_Main_On)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Bottom_Main_On) };
}
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Side_Main_Off)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Side_Main_Off) };
}
public ITexture[] getSidesActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Side_Main_On)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Side_Main_On) };
}
}
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 64efa84154..15e0dd65cc 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
@@ -1,5 +1,14 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.redstone;
+import java.util.*;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraftforge.oredict.OreDictionary;
+
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
import com.gtnewhorizons.modularui.common.widget.ButtonWidget;
@@ -8,6 +17,7 @@ import com.gtnewhorizons.modularui.common.widget.DrawableWidget;
import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
import com.gtnewhorizons.modularui.common.widget.TextWidget;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.gui.modularui.GT_UIInfos;
@@ -23,26 +33,19 @@ import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.*;
import gtPlusPlus.xmod.gregtech.api.gui.GTPP_UITextures;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.util.*;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraftforge.oredict.OreDictionary;
public class GT_MetaTileEntity_RedstoneCircuitBlock extends GT_MetaTileEntity_RedstoneBase
implements IRedstoneCircuitBlock, IAddUIWidgets {
- public int mGate = 0, mGateData[] = new int[] {0, 0, 0, 0, 0, 0, 0, 0};
+ public int mGate = 0, mGateData[] = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
public boolean bOutput = true;
public GT_MetaTileEntity_RedstoneCircuitBlock(int aID) {
super(aID, "redstone.circuit", "Redstone Circuit Block", 1, 5, "Computes Redstone");
}
- public GT_MetaTileEntity_RedstoneCircuitBlock(
- final String aName, String aDescription, final ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_RedstoneCircuitBlock(final String aName, String aDescription,
+ final ITexture[][][] aTextures) {
super(aName, 1, 5, aDescription, aTextures);
}
@@ -142,7 +145,7 @@ public class GT_MetaTileEntity_RedstoneCircuitBlock extends GT_MetaTileEntity_Re
public void loadNBTData(NBTTagCompound aNBT) {
mGate = aNBT.getInteger("mGate");
mGateData = aNBT.getIntArray("mGateData");
- if (mGateData.length != 8) mGateData = new int[] {0, 0, 0, 0, 0, 0, 0, 0};
+ if (mGateData.length != 8) mGateData = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
}
public void switchGateForward(boolean aShift) {
@@ -209,23 +212,21 @@ public class GT_MetaTileEntity_RedstoneCircuitBlock extends GT_MetaTileEntity_Re
resetRedstone();
for (int i = 0; i < mGateData.length; i++) mGateData[i] = 0;
GT_CircuitryBehavior tBehaviour = GregTech_API.sCircuitryBehaviors.get(mGate);
- if (tBehaviour != null)
- try {
- tBehaviour.initParameters(mGateData, this);
- } catch (Throwable e) {
- GT_Log.err.print(e);
- }
+ if (tBehaviour != null) try {
+ tBehaviour.initParameters(mGateData, this);
+ } catch (Throwable e) {
+ GT_Log.err.print(e);
+ }
validateGateData();
}
private void validateGateData() {
GT_CircuitryBehavior tBehaviour = GregTech_API.sCircuitryBehaviors.get(mGate);
- if (tBehaviour != null)
- try {
- tBehaviour.validateParameters(mGateData, this);
- } catch (Throwable e) {
- GT_Log.err.print(e);
- }
+ if (tBehaviour != null) try {
+ tBehaviour.validateParameters(mGateData, this);
+ } catch (Throwable e) {
+ GT_Log.err.print(e);
+ }
}
@Override
@@ -335,21 +336,12 @@ public class GT_MetaTileEntity_RedstoneCircuitBlock extends GT_MetaTileEntity_Re
return false;
}
- /* @Override
- public int getTextureIndex(byte aSide, byte aFacing, boolean aActive, boolean aRedstone) {
- if (aSide == getOutputFacing()) {
- if (aSide == 0)
- return aRedstone ? 56 : 54;
- if (aSide == 1)
- return aRedstone ? 53 : 52;
- return aRedstone ? 94 : 93;
- }
- if (aSide == 0)
- return aRedstone ? 60 : 59;
- if (aSide == 1)
- return aRedstone ? 58 : 57;
- return aRedstone ? 62 : 61;
- }*/
+ /*
+ * @Override public int getTextureIndex(byte aSide, byte aFacing, boolean aActive, boolean aRedstone) { if (aSide ==
+ * getOutputFacing()) { if (aSide == 0) return aRedstone ? 56 : 54; if (aSide == 1) return aRedstone ? 53 : 52;
+ * return aRedstone ? 94 : 93; } if (aSide == 0) return aRedstone ? 60 : 59; if (aSide == 1) return aRedstone ? 58 :
+ * 57; return aRedstone ? 62 : 61; }
+ */
@Override
public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
@@ -430,21 +422,11 @@ public class GT_MetaTileEntity_RedstoneCircuitBlock extends GT_MetaTileEntity_Re
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
- return this.mTextures[
- (aActive || hasRedstoneSignal() ? 5 : 0)
- + (aSide == aFacing
- ? 0
- : aSide == GT_Utility.getOppositeSide(aFacing)
- ? 1
- : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][
- aColorIndex + 1];
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ return this.mTextures[(aActive || hasRedstoneSignal() ? 5 : 0) + (aSide == aFacing ? 0
+ : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex
+ + 1];
}
private GT_RenderedTexture getBase() {
@@ -452,43 +434,37 @@ public class GT_MetaTileEntity_RedstoneCircuitBlock extends GT_MetaTileEntity_Re
}
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {getBase(), new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Top_Off)};
+ return new ITexture[] { getBase(), new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Top_Off) };
}
public ITexture[] getTopActive(final byte aColor) {
- return new ITexture[] {getBase(), new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Top_On)};
+ return new ITexture[] { getBase(), new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Top_On) };
}
public ITexture[] getBack(final byte aColor) {
- return new ITexture[] {
- getBase(),
- new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Side_Off),
- new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Red)
- };
+ return new ITexture[] { getBase(), new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Side_Off),
+ new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Red) };
}
public ITexture[] getBackActive(final byte aColor) {
- return new ITexture[] {
- getBase(),
- new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Side_On),
- new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Red_Redstone)
- };
+ return new ITexture[] { getBase(), new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Side_On),
+ new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Red_Redstone) };
}
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {getBase(), new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Bottom_Off)};
+ return new ITexture[] { getBase(), new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Bottom_Off) };
}
public ITexture[] getBottomActive(final byte aColor) {
- return new ITexture[] {getBase(), new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Bottom_On)};
+ return new ITexture[] { getBase(), new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Bottom_On) };
}
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {getBase(), new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Side_Off)};
+ return new ITexture[] { getBase(), new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Side_Off) };
}
public ITexture[] getSidesActive(final byte aColor) {
- return new ITexture[] {getBase(), new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Side_On)};
+ return new ITexture[] { getBase(), new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Side_On) };
}
@Override
@@ -498,61 +474,44 @@ public class GT_MetaTileEntity_RedstoneCircuitBlock extends GT_MetaTileEntity_Re
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
- builder.widget(new DrawableWidget()
- .setDrawable(GTPP_UITextures.PICTURE_REDSTONE_CIRCUIT_SCREEN)
- .setPos(43, 5)
- .setSize(108, 72));
+ builder.widget(
+ new DrawableWidget().setDrawable(GTPP_UITextures.PICTURE_REDSTONE_CIRCUIT_SCREEN).setPos(43, 5)
+ .setSize(108, 72));
for (int i = 0; i < 4; i++) {
final int index = i;
- builder.widget(new ButtonWidget()
- .setOnClick((clickData, widget) -> {
- ItemStack tStack = widget.getContext()
- .getPlayer()
- .inventory
- .getItemStack();
- if (tStack == null) {
- changeGateData(
- index,
- clickData.mouseButton == 0
- ? clickData.shift ? +128 : +1
- : clickData.shift ? -128 : -1);
- } else {
- tStack = GT_Utility.copy(tStack);
- if (clickData.mouseButton != 0) tStack.setItemDamage(OreDictionary.WILDCARD_VALUE);
- stackGateData(index, tStack);
- }
- })
- .setBackground(GT_UITextures.BUTTON_STANDARD, GTPP_UITextures.OVERLAY_BUTTON_PLUS_MINUS)
- .setPos(7, 5 + i * 18)
- .setSize(18, 18))
- .widget(SlotWidget.phantom(inventoryHandler, i + 1)
- .disableInteraction()
- .setPos(25, 5 + i * 18));
+ builder.widget(new ButtonWidget().setOnClick((clickData, widget) -> {
+ ItemStack tStack = widget.getContext().getPlayer().inventory.getItemStack();
+ if (tStack == null) {
+ changeGateData(
+ index,
+ clickData.mouseButton == 0 ? clickData.shift ? +128 : +1 : clickData.shift ? -128 : -1);
+ } else {
+ tStack = GT_Utility.copy(tStack);
+ if (clickData.mouseButton != 0) tStack.setItemDamage(OreDictionary.WILDCARD_VALUE);
+ stackGateData(index, tStack);
+ }
+ }).setBackground(GT_UITextures.BUTTON_STANDARD, GTPP_UITextures.OVERLAY_BUTTON_PLUS_MINUS)
+ .setPos(7, 5 + i * 18).setSize(18, 18))
+ .widget(SlotWidget.phantom(inventoryHandler, i + 1).disableInteraction().setPos(25, 5 + i * 18));
}
- builder.widget(new CycleButtonWidget()
- .setToggle(() -> bOutput, val -> bOutput = val)
+ builder.widget(
+ new CycleButtonWidget().setToggle(() -> bOutput, val -> bOutput = val)
.setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_EMIT_ENERGY)
- .addTooltip("Toggle EU Output")
- .setPos(151, 5)
- .setSize(18, 18))
- .widget(new CycleButtonWidget()
- .setToggle(() -> getBaseMetaTileEntity().isActive(), val -> getBaseMetaTileEntity()
- .setActive(val))
- .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setStaticTexture(GTPP_UITextures.OVERLAY_BUTTON_ACTIVE_STATE)
- .addTooltip("Toggle Active State")
- .setPos(151, 23)
- .setSize(18, 18))
- .widget(new ButtonWidget()
- .setOnClick((clickData, widget) -> {
- if (clickData.mouseButton == 0) switchGateForward(clickData.shift);
- else switchGateBackward(clickData.shift);
- })
- .setBackground(GT_UITextures.BUTTON_STANDARD, GTPP_UITextures.OVERLAY_BUTTON_CHANGE_MODE)
- .addTooltip("Change Redstone Circuit")
- .setPos(151, 41)
- .setSize(18, 18));
+ .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_EMIT_ENERGY).addTooltip("Toggle EU Output")
+ .setPos(151, 5).setSize(18, 18))
+ .widget(
+ new CycleButtonWidget()
+ .setToggle(
+ () -> getBaseMetaTileEntity().isActive(),
+ val -> getBaseMetaTileEntity().setActive(val))
+ .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setStaticTexture(GTPP_UITextures.OVERLAY_BUTTON_ACTIVE_STATE)
+ .addTooltip("Toggle Active State").setPos(151, 23).setSize(18, 18))
+ .widget(new ButtonWidget().setOnClick((clickData, widget) -> {
+ if (clickData.mouseButton == 0) switchGateForward(clickData.shift);
+ else switchGateBackward(clickData.shift);
+ }).setBackground(GT_UITextures.BUTTON_STANDARD, GTPP_UITextures.OVERLAY_BUTTON_CHANGE_MODE)
+ .addTooltip("Change Redstone Circuit").setPos(151, 41).setSize(18, 18));
builder.widget(new FakeSyncWidget.IntegerSyncer(() -> mGate, val -> mGate = val));
for (int i = 0; i < mGateData.length; i++) {
@@ -560,115 +519,82 @@ public class GT_MetaTileEntity_RedstoneCircuitBlock extends GT_MetaTileEntity_Re
builder.widget(new FakeSyncWidget.IntegerSyncer(() -> mGateData[index], val -> mGateData[index] = val));
}
- builder.widget(new DrawableWidget()
- .setDrawable(() -> {
- if (getBaseMetaTileEntity().getErrorDisplayID() > 0) {
- if ((getBaseMetaTileEntity().getTimer() / 5) % 2 == 0) {
- return GTPP_UITextures.PICTURE_ELECTRICITY_ERROR;
- } else {
- return null;
- }
- } else {
- return GTPP_UITextures.PICTURE_ELECTRICITY_FINE;
- }
- })
- .setPos(140, 9)
- .setSize(7, 7))
- .widget(new FakeSyncWidget.IntegerSyncer(
+ builder.widget(new DrawableWidget().setDrawable(() -> {
+ if (getBaseMetaTileEntity().getErrorDisplayID() > 0) {
+ if ((getBaseMetaTileEntity().getTimer() / 5) % 2 == 0) {
+ return GTPP_UITextures.PICTURE_ELECTRICITY_ERROR;
+ } else {
+ return null;
+ }
+ } else {
+ return GTPP_UITextures.PICTURE_ELECTRICITY_FINE;
+ }
+ }).setPos(140, 9).setSize(7, 7)).widget(
+ new FakeSyncWidget.IntegerSyncer(
() -> getBaseMetaTileEntity().getErrorDisplayID(),
val -> getBaseMetaTileEntity().setErrorDisplayID(val)));
builder.widget(TextWidget.dynamicString(() -> {
- GT_CircuitryBehavior tCircuit = GregTech_API.sCircuitryBehaviors.get(mGate);
- if (tCircuit != null) return tCircuit.getName();
- return "";
- })
- .setSynced(false)
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(46, 8))
+ GT_CircuitryBehavior tCircuit = GregTech_API.sCircuitryBehaviors.get(mGate);
+ if (tCircuit != null) return tCircuit.getName();
+ return "";
+ }).setSynced(false).setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 8))
.widget(TextWidget.dynamicString(() -> {
- GT_CircuitryBehavior tCircuit = GregTech_API.sCircuitryBehaviors.get(mGate);
- if (tCircuit != null) return tCircuit.getDescription();
- return "";
- })
- .setSynced(false)
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(46, 19))
+ GT_CircuitryBehavior tCircuit = GregTech_API.sCircuitryBehaviors.get(mGate);
+ if (tCircuit != null) return tCircuit.getDescription();
+ return "";
+ }).setSynced(false).setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 19))
.widget(TextWidget.dynamicString(() -> {
- GT_CircuitryBehavior tCircuit = GregTech_API.sCircuitryBehaviors.get(mGate);
- if (tCircuit != null) return tCircuit.getDataDescription(mGateData, 0);
- return "";
- })
- .setSynced(false)
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(46, 33))
+ GT_CircuitryBehavior tCircuit = GregTech_API.sCircuitryBehaviors.get(mGate);
+ if (tCircuit != null) return tCircuit.getDataDescription(mGateData, 0);
+ return "";
+ }).setSynced(false).setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 33))
.widget(TextWidget.dynamicString(() -> {
- GT_CircuitryBehavior tCircuit = GregTech_API.sCircuitryBehaviors.get(mGate);
- if (tCircuit != null) return tCircuit.getDataDescription(mGateData, 1);
- return "";
- })
- .setSynced(false)
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(46, 44))
+ GT_CircuitryBehavior tCircuit = GregTech_API.sCircuitryBehaviors.get(mGate);
+ if (tCircuit != null) return tCircuit.getDataDescription(mGateData, 1);
+ return "";
+ }).setSynced(false).setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 44))
.widget(TextWidget.dynamicString(() -> {
- GT_CircuitryBehavior tCircuit = GregTech_API.sCircuitryBehaviors.get(mGate);
- if (tCircuit != null) return tCircuit.getDataDescription(mGateData, 2);
- return "";
- })
- .setSynced(false)
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(46, 55))
+ GT_CircuitryBehavior tCircuit = GregTech_API.sCircuitryBehaviors.get(mGate);
+ if (tCircuit != null) return tCircuit.getDataDescription(mGateData, 2);
+ return "";
+ }).setSynced(false).setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 55))
.widget(TextWidget.dynamicString(() -> {
- GT_CircuitryBehavior tCircuit = GregTech_API.sCircuitryBehaviors.get(mGate);
- if (tCircuit != null) return tCircuit.getDataDescription(mGateData, 3);
- return "";
- })
- .setSynced(false)
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(46, 66))
+ GT_CircuitryBehavior tCircuit = GregTech_API.sCircuitryBehaviors.get(mGate);
+ if (tCircuit != null) return tCircuit.getDataDescription(mGateData, 3);
+ return "";
+ }).setSynced(false).setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 66))
.widget(TextWidget.dynamicString(() -> {
- GT_CircuitryBehavior tCircuit = GregTech_API.sCircuitryBehaviors.get(mGate);
- if (tCircuit != null) {
- String tString = tCircuit.getDataDisplay(mGateData, 0);
- return tString == null ? GT_Utility.parseNumberToString(mGateData[0]) : tString;
- }
- return "";
- })
- .setSynced(false)
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(99, 33))
+ GT_CircuitryBehavior tCircuit = GregTech_API.sCircuitryBehaviors.get(mGate);
+ if (tCircuit != null) {
+ String tString = tCircuit.getDataDisplay(mGateData, 0);
+ return tString == null ? GT_Utility.parseNumberToString(mGateData[0]) : tString;
+ }
+ return "";
+ }).setSynced(false).setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(99, 33))
.widget(TextWidget.dynamicString(() -> {
- GT_CircuitryBehavior tCircuit = GregTech_API.sCircuitryBehaviors.get(mGate);
- if (tCircuit != null) {
- String tString = tCircuit.getDataDisplay(mGateData, 1);
- return tString == null ? GT_Utility.parseNumberToString(mGateData[1]) : tString;
- }
- return "";
- })
- .setSynced(false)
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(99, 44))
+ GT_CircuitryBehavior tCircuit = GregTech_API.sCircuitryBehaviors.get(mGate);
+ if (tCircuit != null) {
+ String tString = tCircuit.getDataDisplay(mGateData, 1);
+ return tString == null ? GT_Utility.parseNumberToString(mGateData[1]) : tString;
+ }
+ return "";
+ }).setSynced(false).setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(99, 44))
.widget(TextWidget.dynamicString(() -> {
- GT_CircuitryBehavior tCircuit = GregTech_API.sCircuitryBehaviors.get(mGate);
- if (tCircuit != null) {
- String tString = tCircuit.getDataDisplay(mGateData, 2);
- return tString == null ? GT_Utility.parseNumberToString(mGateData[2]) : tString;
- }
- return "";
- })
- .setSynced(false)
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(99, 55))
+ GT_CircuitryBehavior tCircuit = GregTech_API.sCircuitryBehaviors.get(mGate);
+ if (tCircuit != null) {
+ String tString = tCircuit.getDataDisplay(mGateData, 2);
+ return tString == null ? GT_Utility.parseNumberToString(mGateData[2]) : tString;
+ }
+ return "";
+ }).setSynced(false).setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(99, 55))
.widget(TextWidget.dynamicString(() -> {
- GT_CircuitryBehavior tCircuit = GregTech_API.sCircuitryBehaviors.get(mGate);
- if (tCircuit != null) {
- String tString = tCircuit.getDataDisplay(mGateData, 3);
- return tString == null ? GT_Utility.parseNumberToString(mGateData[3]) : tString;
- }
- return "";
- })
- .setSynced(false)
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(99, 66));
+ GT_CircuitryBehavior tCircuit = GregTech_API.sCircuitryBehaviors.get(mGate);
+ if (tCircuit != null) {
+ String tString = tCircuit.getDataDisplay(mGateData, 3);
+ return tString == null ? GT_Utility.parseNumberToString(mGateData[3]) : tString;
+ }
+ return "";
+ }).setSynced(false).setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(99, 66));
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneLamp.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneLamp.java
index dfb844654b..6413f59508 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneLamp.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneLamp.java
@@ -1,12 +1,13 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.redstone;
+import net.minecraft.nbt.NBTTagCompound;
+
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.objects.GT_RenderedTexture;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon;
-import net.minecraft.nbt.NBTTagCompound;
public class GT_MetaTileEntity_RedstoneLamp extends GT_MetaTileEntity_RedstoneBase {
@@ -56,21 +57,16 @@ public class GT_MetaTileEntity_RedstoneLamp extends GT_MetaTileEntity_RedstoneBa
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
return this.mTextures[(aActive ? 1 : 0)][aColorIndex + 1];
}
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(sIconList[0])};
+ return new ITexture[] { new GT_RenderedTexture(sIconList[0]) };
}
public ITexture[] getSidesActive(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(sIconList[1])};
+ return new ITexture[] { new GT_RenderedTexture(sIconList[1]) };
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneStrengthDisplay.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneStrengthDisplay.java
index 3b07f8b3ff..286b79ca3b 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneStrengthDisplay.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneStrengthDisplay.java
@@ -1,5 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.redstone;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -8,8 +11,6 @@ import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.nbt.NBTTagCompound;
public class GT_MetaTileEntity_RedstoneStrengthDisplay extends GT_MetaTileEntity_RedstoneBase {
@@ -26,8 +27,8 @@ public class GT_MetaTileEntity_RedstoneStrengthDisplay extends GT_MetaTileEntity
super(aID, aUnlocal, aLocal, 5, 0, aDescription);
}
- public GT_MetaTileEntity_RedstoneStrengthDisplay(
- final String aName, String aDescription, final ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_RedstoneStrengthDisplay(final String aName, String aDescription,
+ final ITexture[][][] aTextures) {
super(aName, 5, 0, aDescription, aTextures);
}
@@ -67,24 +68,20 @@ public class GT_MetaTileEntity_RedstoneStrengthDisplay extends GT_MetaTileEntity
}
}
- /*@Override
- public int getTextureIndex(byte aSide, byte aFacing, boolean aActive, boolean aRedstone) {
- if (aSide == 0)
- return aRedstone ? 60 : 59;
- if (aSide == 1)
- return aRedstone ? 58 : 57;
- return aRedstone ? 62 : 61;
- }*/
+ /*
+ * @Override public int getTextureIndex(byte aSide, byte aFacing, boolean aActive, boolean aRedstone) { if (aSide ==
+ * 0) return aRedstone ? 60 : 59; if (aSide == 1) return aRedstone ? 58 : 57; return aRedstone ? 62 : 61; }
+ */
@Override
public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
if (aSide == getBaseMetaTileEntity().getFrontFacing()) mType = (byte) ((mType + 1) % 6);
}
- /*@Override
- public IIcon getTextureIcon(byte aSide, byte aFacing, boolean aActive, boolean aRedstone) {
- return aSide == aFacing ? sIconList[mType * 16 + mRedstoneStrength] : null;
- }*/
+ /*
+ * @Override public IIcon getTextureIcon(byte aSide, byte aFacing, boolean aActive, boolean aRedstone) { return
+ * aSide == aFacing ? sIconList[mType * 16 + mRedstoneStrength] : null; }
+ */
@Override
public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
@@ -105,72 +102,48 @@ public class GT_MetaTileEntity_RedstoneStrengthDisplay extends GT_MetaTileEntity
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
if (aSide == aFacing) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1],
- new GT_RenderedTexture(sIconList[mType * 16 + mRedstoneStrength])
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1],
+ new GT_RenderedTexture(sIconList[mType * 16 + mRedstoneStrength]) };
}
- return this.mTextures[
- (aActive || hasRedstoneSignal() ? 5 : 0)
- + (aSide == aFacing
- ? 0
- : aSide == GT_Utility.getOppositeSide(aFacing)
- ? 1
- : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][
- aColorIndex + 1];
+ return this.mTextures[(aActive || hasRedstoneSignal() ? 5 : 0) + (aSide == aFacing ? 0
+ : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex
+ + 1];
}
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]};
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1] };
}
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Top_Off)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Top_Off) };
}
public ITexture[] getTopActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Top_On)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Top_On) };
}
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Bottom_Off)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Bottom_Off) };
}
public ITexture[] getBottomActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Bottom_On)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Bottom_On) };
}
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Side_Off)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Side_Off) };
}
public ITexture[] getSidesActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Side_On)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Side_On) };
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneStrengthScale.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneStrengthScale.java
index 8945f3f7b5..ff65ebfe91 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneStrengthScale.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneStrengthScale.java
@@ -1,5 +1,7 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.redstone;
+import net.minecraft.entity.player.EntityPlayer;
+
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -8,7 +10,6 @@ import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon;
-import net.minecraft.entity.player.EntityPlayer;
public class GT_MetaTileEntity_RedstoneStrengthScale extends GT_MetaTileEntity_RedstoneStrengthDisplay {
@@ -24,8 +25,8 @@ public class GT_MetaTileEntity_RedstoneStrengthScale extends GT_MetaTileEntity_R
super(aID, "redstone.display.scale", "Redstone Scale", "Redstone Strength on a Scale");
}
- public GT_MetaTileEntity_RedstoneStrengthScale(
- final String aName, String aDescription, final ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_RedstoneStrengthScale(final String aName, String aDescription,
+ final ITexture[][][] aTextures) {
super(aName, aDescription, aTextures);
}
@@ -40,26 +41,14 @@ public class GT_MetaTileEntity_RedstoneStrengthScale extends GT_MetaTileEntity_R
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
if (aSide == aFacing) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1],
- new GT_RenderedTexture(sIconList[mType * 16 + mRedstoneStrength])
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1],
+ new GT_RenderedTexture(sIconList[mType * 16 + mRedstoneStrength]) };
}
- return this.mTextures[
- (aActive || hasRedstoneSignal() ? 5 : 0)
- + (aSide == aFacing
- ? 0
- : aSide == GT_Utility.getOppositeSide(aFacing)
- ? 1
- : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][
- aColorIndex + 1];
+ return this.mTextures[(aActive || hasRedstoneSignal() ? 5 : 0) + (aSide == aFacing ? 0
+ : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex
+ + 1];
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_AdvancedCraftingTable.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_AdvancedCraftingTable.java
index 0b12373236..95363c9bb8 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_AdvancedCraftingTable.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_AdvancedCraftingTable.java
@@ -1,5 +1,16 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.storage;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTTagList;
+import net.minecraft.network.PacketBuffer;
+
import com.gtnewhorizons.modularui.api.drawable.IDrawable;
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
@@ -9,6 +20,7 @@ import com.gtnewhorizons.modularui.common.internal.wrapper.BaseSlot;
import com.gtnewhorizons.modularui.common.widget.ButtonWidget;
import com.gtnewhorizons.modularui.common.widget.SlotGroup;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.gui.modularui.GT_UIInfos;
import gregtech.api.gui.modularui.GT_UITextures;
@@ -28,15 +40,6 @@ import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.api.gui.GTPP_UITextures;
import gtPlusPlus.xmod.gregtech.api.gui.widget.ElectricSlotWidget;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
-import net.minecraft.network.PacketBuffer;
public class GT_MetaTileEntity_AdvancedCraftingTable extends GT_MetaTileEntity_BasicTank implements IAddGregtechLogo {
@@ -44,14 +47,14 @@ public class GT_MetaTileEntity_AdvancedCraftingTable extends GT_MetaTileEntity_B
protected String mLocalName;
- public GT_MetaTileEntity_AdvancedCraftingTable(
- final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription) {
+ public GT_MetaTileEntity_AdvancedCraftingTable(final int aID, final String aName, final String aNameRegional,
+ final int aTier, final String aDescription) {
super(aID, aName, aNameRegional, aTier, 35, aDescription);
mLocalName = aNameRegional;
}
- public GT_MetaTileEntity_AdvancedCraftingTable(
- final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_AdvancedCraftingTable(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures) {
super(aName, aTier, 35, aDescription, aTextures);
}
@@ -172,40 +175,37 @@ public class GT_MetaTileEntity_AdvancedCraftingTable extends GT_MetaTileEntity_B
}
public void sortIntoTheInputSlots() {
- for (byte i = 21; i < 30; i++)
- if (mInventory[i] != null) {
- if (mInventory[i].stackSize == 0) {
- mInventory[i] = null;
+ for (byte i = 21; i < 30; i++) if (mInventory[i] != null) {
+ if (mInventory[i].stackSize == 0) {
+ mInventory[i] = null;
+ }
+ if (mInventory[i] != null) for (byte j = 0; j < 16; j++) {
+ if (GT_Utility.areStacksEqual(mInventory[i], mInventory[j])) {
+ GT_Utility.moveStackFromSlotAToSlotB(
+ getBaseMetaTileEntity(),
+ getBaseMetaTileEntity(),
+ i,
+ j,
+ (byte) 64,
+ (byte) 1,
+ (byte) 64,
+ (byte) 1);
}
- if (mInventory[i] != null)
- for (byte j = 0; j < 16; j++) {
- if (GT_Utility.areStacksEqual(mInventory[i], mInventory[j])) {
- GT_Utility.moveStackFromSlotAToSlotB(
- getBaseMetaTileEntity(),
- getBaseMetaTileEntity(),
- i,
- j,
- (byte) 64,
- (byte) 1,
- (byte) 64,
- (byte) 1);
- }
- }
- if (mInventory[i] != null)
- for (byte j = 0; j < 16; j++) {
- if (mInventory[j] == null) {
- GT_Utility.moveStackFromSlotAToSlotB(
- getBaseMetaTileEntity(),
- getBaseMetaTileEntity(),
- i,
- j,
- (byte) 64,
- (byte) 1,
- (byte) 64,
- (byte) 1);
- }
- }
}
+ if (mInventory[i] != null) for (byte j = 0; j < 16; j++) {
+ if (mInventory[j] == null) {
+ GT_Utility.moveStackFromSlotAToSlotB(
+ getBaseMetaTileEntity(),
+ getBaseMetaTileEntity(),
+ i,
+ j,
+ (byte) 64,
+ (byte) 1,
+ (byte) 64,
+ (byte) 1);
+ }
+ }
+ }
}
private void fillLiquidContainers() {
@@ -215,21 +215,19 @@ public class GT_MetaTileEntity_AdvancedCraftingTable extends GT_MetaTileEntity_B
if (mInventory[i].stackSize == 1) {
mFluid.amount -= GT_Utility.getFluidForFilledItem(tOutput, true).amount * tOutput.stackSize;
mInventory[i] = tOutput;
- } else
- for (byte j = 16; j < 21; j++) {
- if (mInventory[j] == null
- || (GT_Utility.areStacksEqual(tOutput, mInventory[j])
- && mInventory[j].stackSize + tOutput.stackSize <= tOutput.getMaxStackSize())) {
- mFluid.amount -= GT_Utility.getFluidForFilledItem(tOutput, true).amount * tOutput.stackSize;
- getBaseMetaTileEntity().decrStackSize(i, 1);
- if (mInventory[j] == null) {
- mInventory[j] = tOutput;
- } else {
- mInventory[j].stackSize++;
- }
- break;
+ } else for (byte j = 16; j < 21; j++) {
+ if (mInventory[j] == null || (GT_Utility.areStacksEqual(tOutput, mInventory[j])
+ && mInventory[j].stackSize + tOutput.stackSize <= tOutput.getMaxStackSize())) {
+ mFluid.amount -= GT_Utility.getFluidForFilledItem(tOutput, true).amount * tOutput.stackSize;
+ getBaseMetaTileEntity().decrStackSize(i, 1);
+ if (mInventory[j] == null) {
+ mInventory[j] = tOutput;
+ } else {
+ mInventory[j].stackSize++;
}
+ break;
}
+ }
if (mFluid != null && mFluid.amount <= 0) mFluid = null;
}
}
@@ -241,17 +239,19 @@ public class GT_MetaTileEntity_AdvancedCraftingTable extends GT_MetaTileEntity_B
aStack = mInventory[30];
Logger.INFO("Using Slot 30 supply.");
}
- if (mInventory[31] == null
- || aStack == null
+ if (mInventory[31] == null || aStack == null
|| aStack.getItem() == null
|| aStack.getItemDamage() != 0
|| aStack.stackSize != 1
|| !(aStack.getItem() instanceof ItemBlueprint)) {
try {
- Logger.INFO("Could not set Blueprint. Slot 31: "
- + (mInventory[31] != null ? mInventory[31].getDisplayName() : "Null")
- + ", aStack: " + (aStack != null ? aStack.getDisplayName() : "Null")
- + ", Damage: " + (aStack != null ? aStack.getItemDamage() : "Null"));
+ Logger.INFO(
+ "Could not set Blueprint. Slot 31: "
+ + (mInventory[31] != null ? mInventory[31].getDisplayName() : "Null")
+ + ", aStack: "
+ + (aStack != null ? aStack.getDisplayName() : "Null")
+ + ", Damage: "
+ + (aStack != null ? aStack.getItemDamage() : "Null"));
} catch (Throwable t) {
t.printStackTrace();
}
@@ -281,8 +281,7 @@ public class GT_MetaTileEntity_AdvancedCraftingTable extends GT_MetaTileEntity_B
}
public ItemStack getCraftingOutput() {
- if (mInventory[30] != null
- && mInventory[30].getItem() != null
+ if (mInventory[30] != null && mInventory[30].getItem() != null
&& mInventory[30].getItemDamage() == 0
&& mInventory[30].hasTagCompound()
&& mInventory[30].getItem() instanceof ItemBlueprint) {
@@ -298,12 +297,10 @@ public class GT_MetaTileEntity_AdvancedCraftingTable extends GT_MetaTileEntity_B
}
}
}
- mInventory[31] =
- GT_ModHandler.getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), new ItemStack[] {
- mInventory[21], mInventory[22], mInventory[23],
- mInventory[24], mInventory[25], mInventory[26],
- mInventory[27], mInventory[28], mInventory[29]
- });
+ mInventory[31] = GT_ModHandler.getAllRecipeOutput(
+ getBaseMetaTileEntity().getWorld(),
+ new ItemStack[] { mInventory[21], mInventory[22], mInventory[23], mInventory[24], mInventory[25],
+ mInventory[26], mInventory[27], mInventory[28], mInventory[29] });
return mInventory[31];
}
@@ -351,41 +348,38 @@ public class GT_MetaTileEntity_AdvancedCraftingTable extends GT_MetaTileEntity_B
if (!GT_Utility.areStacksEqual(aHoldStack, mInventory[31])) return aHoldStack;
if (aHoldStack.stackSize + mInventory[31].stackSize > aHoldStack.getMaxStackSize()) return aHoldStack;
}
- for (byte i = 21; i < 30; i++)
- if (mInventory[i] != null) {
- for (byte j = 0; j <= i; j++) {
- if (j < 21 || j == i) {
- if (GT_Utility.areStacksOrToolsEqual(mInventory[i], mInventory[j])
- && mInventory[j].stackSize > 0) {
- ItemStack tStack = GT_Utility.getContainerItem(mInventory[j], true);
- if (tStack == null
- || (tStack.isItemStackDamageable()
- && tStack.getItemDamage() >= tStack.getMaxDamage())) {
- getBaseMetaTileEntity().decrStackSize(j, 1);
- } else if (mInventory[j].stackSize == 1) {
- mInventory[j] = tStack;
- } else {
- getBaseMetaTileEntity().decrStackSize(j, 1);
- for (byte k = 0; k < 21; k++) {
- if (mInventory[k] == null) {
- mInventory[k] = tStack;
- break;
- } else {
- if (GT_Utility.areStacksEqual(tStack, mInventory[k])) {
- if (tStack.stackSize + mInventory[k].stackSize
- <= mInventory[k].getMaxStackSize()) {
- mInventory[k].stackSize += tStack.stackSize;
- break;
- }
+ for (byte i = 21; i < 30; i++) if (mInventory[i] != null) {
+ for (byte j = 0; j <= i; j++) {
+ if (j < 21 || j == i) {
+ if (GT_Utility.areStacksOrToolsEqual(mInventory[i], mInventory[j]) && mInventory[j].stackSize > 0) {
+ ItemStack tStack = GT_Utility.getContainerItem(mInventory[j], true);
+ if (tStack == null || (tStack.isItemStackDamageable()
+ && tStack.getItemDamage() >= tStack.getMaxDamage())) {
+ getBaseMetaTileEntity().decrStackSize(j, 1);
+ } else if (mInventory[j].stackSize == 1) {
+ mInventory[j] = tStack;
+ } else {
+ getBaseMetaTileEntity().decrStackSize(j, 1);
+ for (byte k = 0; k < 21; k++) {
+ if (mInventory[k] == null) {
+ mInventory[k] = tStack;
+ break;
+ } else {
+ if (GT_Utility.areStacksEqual(tStack, mInventory[k])) {
+ if (tStack.stackSize + mInventory[k].stackSize
+ <= mInventory[k].getMaxStackSize()) {
+ mInventory[k].stackSize += tStack.stackSize;
+ break;
}
}
}
}
- break;
}
+ break;
}
}
}
+ }
if (aHoldStack == null) {
aHoldStack = GT_Utility.copy(mInventory[31]);
aHoldStack.onCrafting(getBaseMetaTileEntity().getWorld(), aPlayer, mInventory[31].stackSize);
@@ -465,22 +459,16 @@ public class GT_MetaTileEntity_AdvancedCraftingTable extends GT_MetaTileEntity_B
}
}
}
- /*if (aTick % 100 == 0) {
- for (int i = 0; i < this.mInventory.length; i++) {
- ItemStack aSlot = mInventory[i];
- Logger.INFO("Slot "+i+" "+(aSlot != null ? "contains "+aSlot.getDisplayName() : "is empty"));
- }
- }*/
+ /*
+ * if (aTick % 100 == 0) { for (int i = 0; i < this.mInventory.length; i++) { ItemStack aSlot = mInventory[i];
+ * Logger.INFO("Slot "+i+" "+(aSlot != null ? "contains "+aSlot.getDisplayName() : "is empty")); } }
+ */
}
@Override
public String[] getDescription() {
- return new String[] {
- isAdvanced() ? "For the very large Projects" : "For the smaller Projects",
- "Hold Shift in GUI to see slot usage",
- this.mDescription,
- CORE.GT_Tooltip
- };
+ return new String[] { isAdvanced() ? "For the very large Projects" : "For the smaller Projects",
+ "Hold Shift in GUI to see slot usage", this.mDescription, CORE.GT_Tooltip };
}
@Override
@@ -506,67 +494,41 @@ public class GT_MetaTileEntity_AdvancedCraftingTable extends GT_MetaTileEntity_B
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
- return this.mTextures[
- (aActive ? 5 : 0)
- + (aSide == aFacing
- ? 0
- : aSide == GT_Utility.getOppositeSide(aFacing)
- ? 1
- : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][
- aColorIndex + 1];
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0
+ : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex
+ + 1];
}
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {
- isAdvanced()
- ? new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Side)
- : new GT_RenderedTexture(TexturesGtBlock.Casing_Workbench_Side)
- };
+ return new ITexture[] { isAdvanced() ? new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Side)
+ : new GT_RenderedTexture(TexturesGtBlock.Casing_Workbench_Side) };
}
public ITexture[] getBack(final byte aColor) {
- return new ITexture[] {
- isAdvanced()
- ? new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Side)
- : new GT_RenderedTexture(TexturesGtBlock.Casing_Workbench_Side)
- };
+ return new ITexture[] { isAdvanced() ? new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Side)
+ : new GT_RenderedTexture(TexturesGtBlock.Casing_Workbench_Side) };
}
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {
- isAdvanced()
- ? new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Bottom)
- : new GT_RenderedTexture(TexturesGtBlock.Casing_Workbench_Bottom)
- };
+ return new ITexture[] { isAdvanced() ? new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Bottom)
+ : new GT_RenderedTexture(TexturesGtBlock.Casing_Workbench_Bottom) };
}
public ITexture[] getTop(final byte aColor) {
if (isAdvanced()) {
- return new ITexture[] {
- new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Top),
- new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Crafting_Overlay)
- };
+ return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Top),
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Crafting_Overlay) };
} else {
- return new ITexture[] {
- new GT_RenderedTexture(TexturesGtBlock.Casing_Workbench_Top),
- new GT_RenderedTexture(TexturesGtBlock.Casing_Workbench_Crafting_Overlay)
- };
+ return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Workbench_Top),
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Workbench_Crafting_Overlay) };
}
}
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {
- isAdvanced()
- ? new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Side)
- : new GT_RenderedTexture(TexturesGtBlock.Casing_Workbench_Side)
- };
+ return new ITexture[] { isAdvanced() ? new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Side)
+ : new GT_RenderedTexture(TexturesGtBlock.Casing_Workbench_Side) };
}
@Override
@@ -579,139 +541,115 @@ public class GT_MetaTileEntity_AdvancedCraftingTable extends GT_MetaTileEntity_B
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
- builder.widget(SlotGroup.ofItemHandler(inventoryHandler, 4)
- .endAtSlot(15)
- .background(getGUITextureSet().getItemSlot())
- .build()
- .setPos(7, 7));
+ builder.widget(
+ SlotGroup.ofItemHandler(inventoryHandler, 4).endAtSlot(15).background(getGUITextureSet().getItemSlot())
+ .build().setPos(7, 7));
for (int i = 0; i < 5; i++) {
builder.widget(createElectricSlot(i + 16).setPos(81 + i * 18, 7));
}
- builder.widget(SlotGroup.ofItemHandler(inventoryHandler, 3)
- .startFromSlot(21)
- .endAtSlot(29)
- .background(getGUITextureSet().getItemSlot())
- .applyForWidget(SlotWidget::disableShiftInsert)
- .build()
- .setPos(81, 27));
- builder.widget(new SlotWidget(inventoryHandler, 33)
- .disableShiftInsert()
- .addTooltipShift("Extraction Slot")
+ builder.widget(
+ SlotGroup.ofItemHandler(inventoryHandler, 3).startFromSlot(21).endAtSlot(29)
+ .background(getGUITextureSet().getItemSlot()).applyForWidget(SlotWidget::disableShiftInsert)
+ .build().setPos(81, 27));
+ builder.widget(
+ new SlotWidget(inventoryHandler, 33).disableShiftInsert().addTooltipShift("Extraction Slot")
.addTooltipShift("Things can always be pulled from here")
- .setBackground(getGUITextureSet().getItemSlot(), getArrowOverlay())
- .setPos(153, 27))
- .widget(new SlotWidget(inventoryHandler, 34)
- .disableShiftInsert()
- .addTooltipShift("Free Parking")
- .setBackground(getGUITextureSet().getItemSlot(), getParkOverlay())
- .setPos(153, 63));
+ .setBackground(getGUITextureSet().getItemSlot(), getArrowOverlay()).setPos(153, 27))
+ .widget(
+ new SlotWidget(inventoryHandler, 34).disableShiftInsert().addTooltipShift("Free Parking")
+ .setBackground(getGUITextureSet().getItemSlot(), getParkOverlay()).setPos(153, 63));
+
+ builder.widget(new SlotWidget(inventoryHandler, 30) {
+
+ @Override
+ public ClickResult onClick(int buttonId, boolean doubleClick) {
+ if (buttonId == 0 && Interactable.hasShiftDown()) {
+ syncToServer(99, NetworkUtils.EMPTY_PACKET);
+ return ClickResult.SUCCESS;
+ }
+ return super.onClick(buttonId, doubleClick);
+ }
- builder.widget(
- new SlotWidget(inventoryHandler, 30) {
- @Override
- public ClickResult onClick(int buttonId, boolean doubleClick) {
- if (buttonId == 0 && Interactable.hasShiftDown()) {
- syncToServer(99, NetworkUtils.EMPTY_PACKET);
- return ClickResult.SUCCESS;
+ @Override
+ public void readOnServer(int id, PacketBuffer buf) throws IOException {
+ if (id == 99) {
+ setBluePrint(null);
+ } else {
+ super.readOnServer(id, buf);
+ }
+ }
+ }.setFilter(stack -> stack.getItem() instanceof IItemBlueprint).disableShiftInsert()
+ .addTooltipShift("Blueprint Slot").addTooltipShift("Shift+Lmb Sets to crafting output")
+ .setBackground(getGUITextureSet().getItemSlot(), getBlueprintOverlay()).setPos(135, 27));
+
+ builder.widget(new SlotWidget(BaseSlot.phantom(inventoryHandler, 31)) {
+
+ @Override
+ protected void phantomClick(ClickData clickData, ItemStack cursorStack) {
+ EntityPlayer aPlayer = getContext().getPlayer();
+ ItemStack tStack = getMcSlot().getStack();
+ if (tStack == null) return;
+ if (tStack.stackSize <= 0 && !GT_Utility.areStacksEqual(tStack, aPlayer.inventory.getItemStack())) {
+ return;
+ }
+ ItemStack tStack2, tCraftedStack = getCraftingOutput();
+ if (tCraftedStack != null) {
+ if (clickData.shift) {
+ for (byte i = 0; i < aPlayer.inventory.mainInventory.length; i++) {
+ for (byte j = 0; j < tCraftedStack.getMaxStackSize() / tCraftedStack.stackSize
+ && canDoCraftingOutput(); j++) {
+ if (!GT_Utility.areStacksEqual(tStack2 = getCraftingOutput(), tCraftedStack)
+ || tStack.stackSize != tStack2.stackSize)
+ return;
+ aPlayer.inventory.mainInventory[i] = consumeMaterials(
+ aPlayer,
+ aPlayer.inventory.mainInventory[i]);
+ }
}
- return super.onClick(buttonId, doubleClick);
- }
-
- @Override
- public void readOnServer(int id, PacketBuffer buf) throws IOException {
- if (id == 99) {
- setBluePrint(null);
+ } else {
+ if (clickData.mouseButton == 0) {
+ if (canDoCraftingOutput()) aPlayer.inventory
+ .setItemStack(consumeMaterials(aPlayer, aPlayer.inventory.getItemStack()));
} else {
- super.readOnServer(id, buf);
- }
- }
- }.setFilter(stack -> stack.getItem() instanceof IItemBlueprint)
- .disableShiftInsert()
- .addTooltipShift("Blueprint Slot")
- .addTooltipShift("Shift+Lmb Sets to crafting output")
- .setBackground(getGUITextureSet().getItemSlot(), getBlueprintOverlay())
- .setPos(135, 27));
-
- builder.widget(
- new SlotWidget(BaseSlot.phantom(inventoryHandler, 31)) {
- @Override
- protected void phantomClick(ClickData clickData, ItemStack cursorStack) {
- EntityPlayer aPlayer = getContext().getPlayer();
- ItemStack tStack = getMcSlot().getStack();
- if (tStack == null) return;
- if (tStack.stackSize <= 0
- && !GT_Utility.areStacksEqual(tStack, aPlayer.inventory.getItemStack())) {
- return;
- }
- ItemStack tStack2, tCraftedStack = getCraftingOutput();
- if (tCraftedStack != null) {
- if (clickData.shift) {
- for (byte i = 0; i < aPlayer.inventory.mainInventory.length; i++) {
- for (byte j = 0;
- j < tCraftedStack.getMaxStackSize() / tCraftedStack.stackSize
- && canDoCraftingOutput();
- j++) {
- if (!GT_Utility.areStacksEqual(tStack2 = getCraftingOutput(), tCraftedStack)
- || tStack.stackSize != tStack2.stackSize) return;
- aPlayer.inventory.mainInventory[i] =
- consumeMaterials(aPlayer, aPlayer.inventory.mainInventory[i]);
- }
- }
- } else {
- if (clickData.mouseButton == 0) {
- if (canDoCraftingOutput())
- aPlayer.inventory.setItemStack(
- consumeMaterials(aPlayer, aPlayer.inventory.getItemStack()));
- } else {
- for (int i = 0;
- i < tCraftedStack.getMaxStackSize() / tCraftedStack.stackSize
- && canDoCraftingOutput();
- i++) {
- if (!GT_Utility.areStacksEqual(tStack2 = getCraftingOutput(), tCraftedStack)
- || tStack.stackSize != tStack2.stackSize) return;
- aPlayer.inventory.setItemStack(
- consumeMaterials(aPlayer, aPlayer.inventory.getItemStack()));
- }
- }
+ for (int i = 0; i < tCraftedStack.getMaxStackSize() / tCraftedStack.stackSize
+ && canDoCraftingOutput(); i++) {
+ if (!GT_Utility.areStacksEqual(tStack2 = getCraftingOutput(), tCraftedStack)
+ || tStack.stackSize != tStack2.stackSize)
+ return;
+ aPlayer.inventory
+ .setItemStack(consumeMaterials(aPlayer, aPlayer.inventory.getItemStack()));
}
}
}
+ }
+ }
- @Override
- public boolean handleDragAndDrop(ItemStack draggedStack, int button) {
- return false;
- }
+ @Override
+ public boolean handleDragAndDrop(ItemStack draggedStack, int button) {
+ return false;
+ }
- @Override
- public List<String> getExtraTooltip() {
- return Collections.emptyList();
- }
- }.setAccess(false, false)
- .setHandlePhantomActionClient(true)
- .addTooltipShift("Output Slot")
- .setBackground(getGUITextureSet().getItemSlot(), getCraftOutputOverlay())
- .setPos(135, 63));
-
- builder.widget(new ButtonWidget()
- .setOnClick((clickData, widget) -> sortIntoTheInputSlots())
- .addTooltipShift("Flush")
+ @Override
+ public List<String> getExtraTooltip() {
+ return Collections.emptyList();
+ }
+ }.setAccess(false, false).setHandlePhantomActionClient(true).addTooltipShift("Output Slot")
+ .setBackground(getGUITextureSet().getItemSlot(), getCraftOutputOverlay()).setPos(135, 63));
+
+ builder.widget(
+ new ButtonWidget().setOnClick((clickData, widget) -> sortIntoTheInputSlots()).addTooltipShift("Flush")
.addTooltipShift("Empty crafting grid back to storage")
- .setBackground(getButtonIcon(), getFlushOverlay())
- .setPos(135, 45)
- .setSize(18, 18))
- .widget(new ButtonWidget()
- .setOnClick((clickData, widget) -> mFlushMode = true)
- .addTooltipShift("Automation")
- .addTooltipShift("Allows output while")
- .addTooltipShift("crafting grid is full")
- .setBackground(getButtonIcon(), GTPP_UITextures.OVERLAY_BUTTON_AUTOMATION)
- .setPos(153, 45)
- .setSize(18, 18));
+ .setBackground(getButtonIcon(), getFlushOverlay()).setPos(135, 45).setSize(18, 18))
+ .widget(
+ new ButtonWidget().setOnClick((clickData, widget) -> mFlushMode = true)
+ .addTooltipShift("Automation").addTooltipShift("Allows output while")
+ .addTooltipShift("crafting grid is full")
+ .setBackground(getButtonIcon(), GTPP_UITextures.OVERLAY_BUTTON_AUTOMATION)
+ .setPos(153, 45).setSize(18, 18));
}
protected SlotWidget createElectricSlot(int index) {
- return (SlotWidget) new ElectricSlotWidget(inventoryHandler, index)
- .setShiftClickPriority(-1)
+ return (SlotWidget) new ElectricSlotWidget(inventoryHandler, index).setShiftClickPriority(-1)
.setBackground(getGUITextureSet().getItemSlot(), GTPP_UITextures.OVERLAY_SLOT_ELECTRIC_TOOL);
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_BronzeCraftingTable.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_BronzeCraftingTable.java
index eae9bb79ba..a28c4d90a3 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_BronzeCraftingTable.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_BronzeCraftingTable.java
@@ -2,6 +2,7 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.storage;
import com.gtnewhorizons.modularui.api.drawable.IDrawable;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.SteamVariant;
import gregtech.api.gui.modularui.GUITextureSet;
@@ -13,13 +14,13 @@ import gtPlusPlus.xmod.gregtech.api.gui.GTPP_UITextures;
public class GT_MetaTileEntity_BronzeCraftingTable extends GT_MetaTileEntity_AdvancedCraftingTable {
- public GT_MetaTileEntity_BronzeCraftingTable(
- final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription) {
+ public GT_MetaTileEntity_BronzeCraftingTable(final int aID, final String aName, final String aNameRegional,
+ final int aTier, final String aDescription) {
super(aID, aName, aNameRegional, aTier, aDescription);
}
- public GT_MetaTileEntity_BronzeCraftingTable(
- final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_BronzeCraftingTable(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
}
@@ -76,8 +77,7 @@ public class GT_MetaTileEntity_BronzeCraftingTable extends GT_MetaTileEntity_Adv
@Override
protected SlotWidget createElectricSlot(int index) {
- return (SlotWidget) new SlotWidget(inventoryHandler, index)
- .setBackground(getGUITextureSet().getItemSlot());
+ return (SlotWidget) new SlotWidget(inventoryHandler, index).setBackground(getGUITextureSet().getItemSlot());
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_ConnectableCrate.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_ConnectableCrate.java
index 2c29a0a00b..b51eae3131 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_ConnectableCrate.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_ConnectableCrate.java
@@ -1,10 +1,17 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.storage;
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
import com.gtnewhorizons.modularui.common.widget.DrawableWidget;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
import com.gtnewhorizons.modularui.common.widget.TextWidget;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.Textures.BlockIcons;
import gregtech.api.gui.modularui.GT_UIInfos;
@@ -22,20 +29,13 @@ import gtPlusPlus.api.objects.minecraft.BlockPos;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.data.ArrayUtils;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
public class GT_MetaTileEntity_ConnectableCrate extends GT_MetaTileEntity_TieredMachineBlock implements IAddUIWidgets {
- /*sides.put(getUp());
- sides.put(getDown());
- sides.put(getXPos());
- sides.put(getXNeg());
- sides.put(getZPos());
- sides.put(getZNeg());*/
+ /*
+ * sides.put(getUp()); sides.put(getDown()); sides.put(getXPos()); sides.put(getXNeg()); sides.put(getZPos());
+ * sides.put(getZNeg());
+ */
public int mItemCount = 0;
public ItemStack mItemStack = null;
@@ -51,7 +51,7 @@ public class GT_MetaTileEntity_ConnectableCrate extends GT_MetaTileEntity_Tiered
public static final int SIDE_XNeg = 3;
public static final int SIDE_ZPos = 4;
public static final int SIDE_ZNeg = 5;
- public static final int[] SIDES = new int[] {SIDE_Up, SIDE_Down, SIDE_XPos, SIDE_XNeg, SIDE_ZPos, SIDE_ZNeg};
+ public static final int[] SIDES = new int[] { SIDE_Up, SIDE_Down, SIDE_XPos, SIDE_XNeg, SIDE_ZPos, SIDE_ZNeg };
// Neighbour Cache
private GT_MetaTileEntity_ConnectableCrate[] mNeighbourCache = new GT_MetaTileEntity_ConnectableCrate[6];
@@ -62,7 +62,7 @@ public class GT_MetaTileEntity_ConnectableCrate extends GT_MetaTileEntity_Tiered
// Is Master?
protected boolean mIsMaster = false;
// Is Connected?
- protected boolean mIsConnected[] = new boolean[] {false, false, false, false, false, false};
+ protected boolean mIsConnected[] = new boolean[] { false, false, false, false, false, false };
// How many are connected?
protected int mConnectedCount = 0;
// Map of connected locations
@@ -85,7 +85,7 @@ public class GT_MetaTileEntity_ConnectableCrate extends GT_MetaTileEntity_Tiered
@Override
public String[] getDescription() {
- return new String[] {this.mDescription, CORE.GT_Tooltip};
+ return new String[] { this.mDescription, CORE.GT_Tooltip };
}
public boolean isSimpleMachine() {
@@ -187,10 +187,8 @@ public class GT_MetaTileEntity_ConnectableCrate extends GT_MetaTileEntity_Tiered
// Other Crate was not a Master, but we are, time to inherit it into our connection hivemind.
else {
// It would appear this controller has another master, time to query it.
- if (e.mMasterCrateLocation != null
- && !e.mMasterCrateLocation
- .getUniqueIdentifier()
- .equalsIgnoreCase(this.mMasterCrateLocation.getUniqueIdentifier())) {
+ if (e.mMasterCrateLocation != null && !e.mMasterCrateLocation.getUniqueIdentifier()
+ .equalsIgnoreCase(this.mMasterCrateLocation.getUniqueIdentifier())) {
GT_MetaTileEntity_ConnectableCrate gM = getCrateAtBlockPos(e.mMasterCrateLocation);
if (gM != null) {
// Lets compare controller strengths
@@ -207,8 +205,8 @@ public class GT_MetaTileEntity_ConnectableCrate extends GT_MetaTileEntity_Tiered
if (!this.mIsConnected[e4]) {
this.mIsConnected[e4] = true;
}
- this.mConnectedCache =
- ArrayUtils.mergeTwoMaps(this.mConnectedCache, gM.mConnectedCache);
+ this.mConnectedCache = ArrayUtils
+ .mergeTwoMaps(this.mConnectedCache, gM.mConnectedCache);
continue;
}
// We lost, time to submit to a new master crate
@@ -221,8 +219,8 @@ public class GT_MetaTileEntity_ConnectableCrate extends GT_MetaTileEntity_Tiered
if (!e.mIsConnected[getOppositeSide(e4)]) {
e.mIsConnected[getOppositeSide(e4)] = true;
}
- gM.mConnectedCache =
- ArrayUtils.mergeTwoMaps(gM.mConnectedCache, this.mConnectedCache);
+ gM.mConnectedCache = ArrayUtils
+ .mergeTwoMaps(gM.mConnectedCache, this.mConnectedCache);
// Best wipe our cache of connected blocks then, since they no longer hold
// value.
mConnectedCache.clear();
@@ -332,14 +330,10 @@ public class GT_MetaTileEntity_ConnectableCrate extends GT_MetaTileEntity_Tiered
}
private boolean checkSideForDataType(int aType, int aSide) {
- BlockPos mPosToCheck = aSide == SIDE_Up
- ? mCurrentPos.getUp()
- : aSide == SIDE_Down
- ? mCurrentPos.getDown()
- : aSide == SIDE_XPos
- ? mCurrentPos.getXPos()
- : aSide == SIDE_XNeg
- ? mCurrentPos.getXNeg()
+ BlockPos mPosToCheck = aSide == SIDE_Up ? mCurrentPos.getUp()
+ : aSide == SIDE_Down ? mCurrentPos.getDown()
+ : aSide == SIDE_XPos ? mCurrentPos.getXPos()
+ : aSide == SIDE_XNeg ? mCurrentPos.getXNeg()
: aSide == SIDE_ZPos ? mCurrentPos.getZPos() : mCurrentPos.getZNeg();
GT_MetaTileEntity_ConnectableCrate g = getCrateAtBlockPos(mPosToCheck);
if (g != null) {
@@ -383,8 +377,7 @@ public class GT_MetaTileEntity_ConnectableCrate extends GT_MetaTileEntity_Tiered
}
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) {
- if (this.getBaseMetaTileEntity().isServerSide()
- && this.getBaseMetaTileEntity().isAllowedToWork()) {
+ if (this.getBaseMetaTileEntity().isServerSide() && this.getBaseMetaTileEntity().isAllowedToWork()) {
if (this.getItemCount() <= 0) {
this.mItemStack = null;
this.mItemCount = 0;
@@ -394,8 +387,7 @@ public class GT_MetaTileEntity_ConnectableCrate extends GT_MetaTileEntity_Tiered
this.mItemStack = this.mInventory[0].copy();
}
- if (this.mInventory[0] != null
- && this.mItemCount < this.getMaxItemCount()
+ if (this.mInventory[0] != null && this.mItemCount < this.getMaxItemCount()
&& GT_Utility.areStacksEqual(this.mInventory[0], this.mItemStack)) {
this.mItemCount += this.mInventory[0].stackSize;
if (this.mItemCount > this.getMaxItemCount()) {
@@ -410,14 +402,14 @@ public class GT_MetaTileEntity_ConnectableCrate extends GT_MetaTileEntity_Tiered
this.mInventory[1] = this.mItemStack.copy();
this.mInventory[1].stackSize = Math.min(this.mItemStack.getMaxStackSize(), this.mItemCount);
this.mItemCount -= this.mInventory[1].stackSize;
- } else if (this.mItemCount > 0
- && GT_Utility.areStacksEqual(this.mInventory[1], this.mItemStack)
+ } else if (this.mItemCount > 0 && GT_Utility.areStacksEqual(this.mInventory[1], this.mItemStack)
&& this.mInventory[1].getMaxStackSize() > this.mInventory[1].stackSize) {
- int tmp =
- Math.min(this.mItemCount, this.mInventory[1].getMaxStackSize() - this.mInventory[1].stackSize);
- this.mInventory[1].stackSize += tmp;
- this.mItemCount -= tmp;
- }
+ int tmp = Math.min(
+ this.mItemCount,
+ this.mInventory[1].getMaxStackSize() - this.mInventory[1].stackSize);
+ this.mInventory[1].stackSize += tmp;
+ this.mItemCount -= tmp;
+ }
if (this.mItemStack != null) {
this.mInventory[2] = this.mItemStack.copy();
@@ -437,8 +429,7 @@ public class GT_MetaTileEntity_ConnectableCrate extends GT_MetaTileEntity_Tiered
}
public int getProgresstime() {
- return this.mItemCount
- + (this.mInventory[0] == null ? 0 : this.mInventory[0].stackSize)
+ return this.mItemCount + (this.mInventory[0] == null ? 0 : this.mInventory[0].stackSize)
+ (this.mInventory[1] == null ? 0 : this.mInventory[1].stackSize);
}
@@ -460,20 +451,10 @@ public class GT_MetaTileEntity_ConnectableCrate extends GT_MetaTileEntity_Tiered
public String[] getInfoData() {
return this.mItemStack == null
- ? new String[] {
- "Super Storage Chest",
- "Stored Items:",
- "No Items",
- Integer.toString(0),
- Integer.toString(this.getMaxItemCount())
- }
- : new String[] {
- "Super Storage Chest",
- "Stored Items:",
- this.mItemStack.getDisplayName(),
- Integer.toString(this.mItemCount),
- Integer.toString(this.getMaxItemCount())
- };
+ ? new String[] { "Super Storage Chest", "Stored Items:", "No Items", Integer.toString(0),
+ Integer.toString(this.getMaxItemCount()) }
+ : new String[] { "Super Storage Chest", "Stored Items:", this.mItemStack.getDisplayName(),
+ Integer.toString(this.mItemCount), Integer.toString(this.getMaxItemCount()) };
}
public boolean isGivingInformation() {
@@ -518,24 +499,15 @@ public class GT_MetaTileEntity_ConnectableCrate extends GT_MetaTileEntity_Tiered
}
}
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
return aBaseMetaTileEntity.getFrontFacing() == 0 && aSide == 4
- ? new ITexture[] {
- new GT_RenderedTexture(TexturesGtBlock.TEXTURE_CASING_AMAZON),
- new GT_RenderedTexture(BlockIcons.OVERLAY_QCHEST)
- }
+ ? new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.TEXTURE_CASING_AMAZON),
+ new GT_RenderedTexture(BlockIcons.OVERLAY_QCHEST) }
: (aSide == aBaseMetaTileEntity.getFrontFacing()
- ? new ITexture[] {
- new GT_RenderedTexture(TexturesGtBlock.TEXTURE_CASING_AMAZON),
- new GT_RenderedTexture(BlockIcons.OVERLAY_QCHEST)
- }
- : new ITexture[] {new GT_RenderedTexture(TexturesGtBlock.TEXTURE_CASING_AMAZON)});
+ ? new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.TEXTURE_CASING_AMAZON),
+ new GT_RenderedTexture(BlockIcons.OVERLAY_QCHEST) }
+ : new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.TEXTURE_CASING_AMAZON) });
}
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
@@ -567,26 +539,21 @@ public class GT_MetaTileEntity_ConnectableCrate extends GT_MetaTileEntity_Tiered
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
- builder.widget(new DrawableWidget()
- .setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK)
- .setPos(7, 16)
- .setSize(71, 45))
- .widget(new SlotWidget(inventoryHandler, 0)
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_IN)
- .setPos(79, 16))
- .widget(new SlotWidget(inventoryHandler, 1)
- .setAccess(true, false)
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_OUT)
- .setPos(79, 52))
- .widget(SlotWidget.phantom(inventoryHandler, 2)
- .disableInteraction()
- .setBackground(GT_UITextures.TRANSPARENT)
- .setPos(59, 42))
- .widget(new TextWidget("Item Amount")
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(10, 20))
- .widget(TextWidget.dynamicString(() -> GT_Utility.parseNumberToString(mItemCount))
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(10, 30));
+ builder.widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(7, 16).setSize(71, 45))
+ .widget(
+ new SlotWidget(inventoryHandler, 0)
+ .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_IN)
+ .setPos(79, 16))
+ .widget(
+ new SlotWidget(inventoryHandler, 1).setAccess(true, false)
+ .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_OUT)
+ .setPos(79, 52))
+ .widget(
+ SlotWidget.phantom(inventoryHandler, 2).disableInteraction()
+ .setBackground(GT_UITextures.TRANSPARENT).setPos(59, 42))
+ .widget(new TextWidget("Item Amount").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 20)).widget(
+ TextWidget.dynamicString(() -> GT_Utility.parseNumberToString(mItemCount))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 30));
}
}
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 eb5541ef82..103e0a159f 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
@@ -1,10 +1,15 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.storage;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
import com.gtnewhorizons.modularui.common.widget.DrawableWidget;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
import com.gtnewhorizons.modularui.common.widget.TextWidget;
+
import gregtech.api.enums.Textures.BlockIcons;
import gregtech.api.gui.modularui.GT_UIInfos;
import gregtech.api.gui.modularui.GT_UITextures;
@@ -16,11 +21,9 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachi
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.lib.CORE;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
public class GT_MetaTileEntity_TieredChest extends GT_MetaTileEntity_TieredMachineBlock implements IAddUIWidgets {
+
public int mItemCount = 0;
public ItemStack mItemStack = null;
private static final double mStorageFactor = (270000.0D / 16);
@@ -40,13 +43,14 @@ public class GT_MetaTileEntity_TieredChest extends GT_MetaTileEntity_TieredMachi
super(aName, aTier, 3, aDescription, aTextures);
}
- /*public GT_MetaTileEntity_TieredChest(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, 3, aDescription, aTextures);
- }*/
+ /*
+ * public GT_MetaTileEntity_TieredChest(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
+ * super(aName, aTier, 3, aDescription, aTextures); }
+ */
@Override
public String[] getDescription() {
- return new String[] {this.mDescription, CORE.GT_Tooltip};
+ return new String[] { this.mDescription, CORE.GT_Tooltip };
}
public boolean isSimpleMachine() {
@@ -75,8 +79,7 @@ public class GT_MetaTileEntity_TieredChest extends GT_MetaTileEntity_TieredMachi
}
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) {
- if (this.getBaseMetaTileEntity().isServerSide()
- && this.getBaseMetaTileEntity().isAllowedToWork()) {
+ if (this.getBaseMetaTileEntity().isServerSide() && this.getBaseMetaTileEntity().isAllowedToWork()) {
if (this.getItemCount() <= 0) {
this.mItemStack = null;
this.mItemCount = 0;
@@ -86,8 +89,7 @@ public class GT_MetaTileEntity_TieredChest extends GT_MetaTileEntity_TieredMachi
this.mItemStack = this.mInventory[0].copy();
}
- if (this.mInventory[0] != null
- && this.mItemCount < this.getMaxItemCount()
+ if (this.mInventory[0] != null && this.mItemCount < this.getMaxItemCount()
&& GT_Utility.areStacksEqual(this.mInventory[0], this.mItemStack)) {
this.mItemCount += this.mInventory[0].stackSize;
if (this.mItemCount > this.getMaxItemCount()) {
@@ -102,14 +104,14 @@ public class GT_MetaTileEntity_TieredChest extends GT_MetaTileEntity_TieredMachi
this.mInventory[1] = this.mItemStack.copy();
this.mInventory[1].stackSize = Math.min(this.mItemStack.getMaxStackSize(), this.mItemCount);
this.mItemCount -= this.mInventory[1].stackSize;
- } else if (this.mItemCount > 0
- && GT_Utility.areStacksEqual(this.mInventory[1], this.mItemStack)
+ } else if (this.mItemCount > 0 && GT_Utility.areStacksEqual(this.mInventory[1], this.mItemStack)
&& this.mInventory[1].getMaxStackSize() > this.mInventory[1].stackSize) {
- int tmp =
- Math.min(this.mItemCount, this.mInventory[1].getMaxStackSize() - this.mInventory[1].stackSize);
- this.mInventory[1].stackSize += tmp;
- this.mItemCount -= tmp;
- }
+ int tmp = Math.min(
+ this.mItemCount,
+ this.mInventory[1].getMaxStackSize() - this.mInventory[1].stackSize);
+ this.mInventory[1].stackSize += tmp;
+ this.mItemCount -= tmp;
+ }
if (this.mItemStack != null) {
this.mInventory[2] = this.mItemStack.copy();
@@ -129,8 +131,7 @@ public class GT_MetaTileEntity_TieredChest extends GT_MetaTileEntity_TieredMachi
}
public int getProgresstime() {
- return this.mItemCount
- + (this.mInventory[0] == null ? 0 : this.mInventory[0].stackSize)
+ return this.mItemCount + (this.mInventory[0] == null ? 0 : this.mInventory[0].stackSize)
+ (this.mInventory[1] == null ? 0 : this.mInventory[1].stackSize);
}
@@ -152,20 +153,10 @@ public class GT_MetaTileEntity_TieredChest extends GT_MetaTileEntity_TieredMachi
public String[] getInfoData() {
return this.mItemStack == null
- ? new String[] {
- "Super Storage Chest",
- "Stored Items:",
- "No Items",
- Integer.toString(0),
- Integer.toString(this.getMaxItemCount())
- }
- : new String[] {
- "Super Storage Chest",
- "Stored Items:",
- this.mItemStack.getDisplayName(),
- Integer.toString(this.mItemCount),
- Integer.toString(this.getMaxItemCount())
- };
+ ? new String[] { "Super Storage Chest", "Stored Items:", "No Items", Integer.toString(0),
+ Integer.toString(this.getMaxItemCount()) }
+ : new String[] { "Super Storage Chest", "Stored Items:", this.mItemStack.getDisplayName(),
+ Integer.toString(this.mItemCount), Integer.toString(this.getMaxItemCount()) };
}
public boolean isGivingInformation() {
@@ -189,24 +180,15 @@ public class GT_MetaTileEntity_TieredChest extends GT_MetaTileEntity_TieredMachi
}
}
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
return aBaseMetaTileEntity.getFrontFacing() == 0 && aSide == 4
- ? new ITexture[] {
- BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1],
- new GT_RenderedTexture(BlockIcons.OVERLAY_QCHEST)
- }
+ ? new ITexture[] { BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1],
+ new GT_RenderedTexture(BlockIcons.OVERLAY_QCHEST) }
: (aSide == aBaseMetaTileEntity.getFrontFacing()
- ? new ITexture[] {
- BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1],
- new GT_RenderedTexture(BlockIcons.OVERLAY_QCHEST)
- }
- : new ITexture[] {BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]});
+ ? new ITexture[] { BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1],
+ new GT_RenderedTexture(BlockIcons.OVERLAY_QCHEST) }
+ : new ITexture[] { BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1] });
}
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
@@ -220,26 +202,21 @@ public class GT_MetaTileEntity_TieredChest extends GT_MetaTileEntity_TieredMachi
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
- builder.widget(new DrawableWidget()
- .setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK)
- .setPos(7, 16)
- .setSize(71, 45))
- .widget(new SlotWidget(inventoryHandler, 0)
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_IN)
- .setPos(79, 16))
- .widget(new SlotWidget(inventoryHandler, 1)
- .setAccess(true, false)
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_OUT)
- .setPos(79, 52))
- .widget(SlotWidget.phantom(inventoryHandler, 2)
- .disableInteraction()
- .setBackground(GT_UITextures.TRANSPARENT)
- .setPos(59, 42))
- .widget(new TextWidget("Item Amount")
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(10, 20))
- .widget(TextWidget.dynamicString(() -> GT_Utility.parseNumberToString(mItemCount))
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(10, 30));
+ builder.widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(7, 16).setSize(71, 45))
+ .widget(
+ new SlotWidget(inventoryHandler, 0)
+ .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_IN)
+ .setPos(79, 16))
+ .widget(
+ new SlotWidget(inventoryHandler, 1).setAccess(true, false)
+ .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_OUT)
+ .setPos(79, 52))
+ .widget(
+ SlotWidget.phantom(inventoryHandler, 2).disableInteraction()
+ .setBackground(GT_UITextures.TRANSPARENT).setPos(59, 42))
+ .widget(new TextWidget("Item Amount").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 20)).widget(
+ TextWidget.dynamicString(() -> GT_Utility.parseNumberToString(mItemCount))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 30));
}
}
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 3bd7628e79..9366bc4d92 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
@@ -1,5 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.storage;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Textures;
import gregtech.api.gui.modularui.GT_UIInfos;
@@ -10,18 +13,16 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank;
import gregtech.api.objects.GT_RenderedTexture;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.nbt.NBTTagCompound;
public class GT_MetaTileEntity_TieredTank extends GT_MetaTileEntity_BasicTank {
- public GT_MetaTileEntity_TieredTank(
- final int aID, final String aName, final String aNameRegional, final int aTier) {
+ public GT_MetaTileEntity_TieredTank(final int aID, final String aName, final String aNameRegional,
+ final int aTier) {
super(aID, aName, aNameRegional, aTier, 3, "Stores " + ((int) (Math.pow(2, aTier) * 32000)) + "L of fluid");
}
- public GT_MetaTileEntity_TieredTank(
- final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_TieredTank(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures) {
super(aName, aTier, 3, "Stores " + ((int) (Math.pow(2, aTier) * 32000)) + "L of fluid", aTextures);
}
@@ -32,14 +33,10 @@ public class GT_MetaTileEntity_TieredTank extends GT_MetaTileEntity_BasicTank {
String aTankPortableness = "portable";
if (this.mFluid == null) {
- aTip = new String[] {this.mDescription, "A " + aTankPortableness + " tank.", CORE.GT_Tooltip};
+ aTip = new String[] { this.mDescription, "A " + aTankPortableness + " tank.", CORE.GT_Tooltip };
} else {
- aTip = new String[] {
- this.mDescription,
- "A " + aTankPortableness + " tank.",
- "Fluid: " + mFluid.getLocalizedName() + " " + mFluid.amount + "L",
- CORE.GT_Tooltip
- };
+ aTip = new String[] { this.mDescription, "A " + aTankPortableness + " tank.",
+ "Fluid: " + mFluid.getLocalizedName() + " " + mFluid.amount + "L", CORE.GT_Tooltip };
}
return aTip;
}
@@ -50,22 +47,13 @@ public class GT_MetaTileEntity_TieredTank extends GT_MetaTileEntity_BasicTank {
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
return aSide == 1
- ? new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1],
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER_ACTIVE)
- }
- : new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1],
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER)
- };
+ ? new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER_ACTIVE) }
+ : new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER) };
}
@Override
@@ -112,21 +100,12 @@ public class GT_MetaTileEntity_TieredTank extends GT_MetaTileEntity_BasicTank {
public String[] getInfoData() {
if (this.mFluid == null) {
- return new String[] {
- GT_Values.VOLTAGE_NAMES[this.mTier] + " Fluid Tank",
- "Stored Fluid:",
- "No Fluid",
- Integer.toString(0) + "L",
- Integer.toString(this.getCapacity()) + "L"
- };
+ return new String[] { GT_Values.VOLTAGE_NAMES[this.mTier] + " Fluid Tank", "Stored Fluid:", "No Fluid",
+ Integer.toString(0) + "L", Integer.toString(this.getCapacity()) + "L" };
}
- return new String[] {
- GT_Values.VOLTAGE_NAMES[this.mTier] + " Fluid Tank",
- "Stored Fluid:",
- this.mFluid.getLocalizedName(),
- Integer.toString(this.mFluid.amount) + "L",
- Integer.toString(this.getCapacity()) + "L"
- };
+ return new String[] { GT_Values.VOLTAGE_NAMES[this.mTier] + " Fluid Tank", "Stored Fluid:",
+ this.mFluid.getLocalizedName(), Integer.toString(this.mFluid.amount) + "L",
+ Integer.toString(this.getCapacity()) + "L" };
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java
index ff63957696..1d0b4dad7e 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java
@@ -2,6 +2,11 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.storage;
import static gregtech.api.enums.GT_Values.V;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -14,43 +19,25 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
public class GregtechMetaEnergyBuffer extends GregtechMetaTileEntity {
protected byte aCurrentOutputAmperage = 4;
- public GregtechMetaEnergyBuffer(
- final int aID,
- final String aName,
- final String aNameRegional,
- final int aTier,
- final String aDescription,
- final int aSlotCount) {
+ public GregtechMetaEnergyBuffer(final int aID, final String aName, final String aNameRegional, final int aTier,
+ final String aDescription, final int aSlotCount) {
super(aID, aName, aNameRegional, aTier, aSlotCount, aDescription);
}
- public GregtechMetaEnergyBuffer(
- final String aName,
- final int aTier,
- final String aDescription,
- final ITexture[][][] aTextures,
- final int aSlotCount) {
+ public GregtechMetaEnergyBuffer(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures, final int aSlotCount) {
super(aName, aTier, aSlotCount, aDescription, aTextures);
}
@Override
public String[] getDescription() {
- return new String[] {
- this.mDescription,
- "Defaults 4A In/Out",
- "Change output Amperage with a screwdriver",
- "Now Portable!",
- CORE.GT_Tooltip
- };
+ return new String[] { this.mDescription, "Defaults 4A In/Out", "Change output Amperage with a screwdriver",
+ "Now Portable!", CORE.GT_Tooltip };
}
@Override
@@ -84,139 +71,99 @@ public class GregtechMetaEnergyBuffer extends GregtechMetaTileEntity {
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
- return this.mTextures[
- (aActive ? 5 : 0)
- + (aSide == aFacing
- ? 0
- : aSide == GT_Utility.getOppositeSide(aFacing)
- ? 1
- : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][
- aColorIndex + 1];
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0
+ : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex
+ + 1];
}
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] };
}
public ITexture[] getBack(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) };
}
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) };
}
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Screen_Logo)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Screen_Logo) };
}
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) };
}
public ITexture[] getFrontActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] };
}
public ITexture[] getBackActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) };
}
public ITexture[] getBottomActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) };
}
public ITexture[] getTopActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Screen_Logo)
- };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Screen_Logo) };
}
public ITexture[] getSidesActive(final byte aColor) {
- return new ITexture[] {
- Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange)
- };
- }
-
- /*@Override
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
- ITexture[][][] rTextures = new ITexture[2][17][];
- for (byte i = -1; i < 16; i++) {
- rTextures[0][i + 1] = new ITexture[] { new GT_RenderedTexture(
- Textures.BlockIcons.MACHINE_HEATPROOFCASING) };
- rTextures[1][i + 1] = new ITexture[] {
- new GT_RenderedTexture(
- Textures.BlockIcons.MACHINE_HEATPROOFCASING),
- mInventory.length > 4 ? Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier]
- : Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier] };
- }
- return rTextures;
- }*/
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1],
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) };
+ }
/*
- * @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) {
- * ITexture[][][] rTextures = new ITexture[5][17][]; for (byte i = -1; i <
- * 16; i = (byte) (i + 1)) { ITexture[] tmp0 = { new GT_RenderedTexture(
- * Textures.BlockIcons.MACHINE_STEEL_BOTTOM, Dyes.getModulation(i,
- * Dyes._NULL.mRGBa)) }; rTextures[0][(i + 1)] = tmp0; ITexture[] tmp1 = {
- * new GT_RenderedTexture( Textures.BlockIcons.MACHINE_STEEL_TOP) };
- * rTextures[1][(i + 1)] = tmp1; ITexture[] tmp2 = { new GT_RenderedTexture(
- * Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(i,
- * Dyes._NULL.mRGBa)), new
- * GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE) }; rTextures[2][(i +
- * 1)] = tmp2; ITexture[] tmp4 = { new GT_RenderedTexture(
- * Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(i,
- * Dyes._NULL.mRGBa)), new
- * GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT) }; rTextures[3][(i +
- * 1)] = tmp4; ITexture[] tmp5 = { new GT_RenderedTexture(
- * Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(i,
- * Dyes._NULL.mRGBa)), new GT_RenderedTexture(
- * Textures.BlockIcons.BOILER_FRONT_ACTIVE) }; rTextures[4][(i + 1)] = tmp5;
- * } return rTextures; }
+ * @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new
+ * ITexture[2][17][]; for (byte i = -1; i < 16; i++) { rTextures[0][i + 1] = new ITexture[] { new
+ * GT_RenderedTexture( Textures.BlockIcons.MACHINE_HEATPROOFCASING) }; rTextures[1][i + 1] = new ITexture[] { new
+ * GT_RenderedTexture( Textures.BlockIcons.MACHINE_HEATPROOFCASING), mInventory.length > 4 ?
+ * Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier] : Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier] }; } return
+ * rTextures; }
*/
- /*@Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- return mTextures[aSide == aFacing ? 1 : 0][aColorIndex+1];
- }*/
+ /*
+ * @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new
+ * ITexture[5][17][]; for (byte i = -1; i < 16; i = (byte) (i + 1)) { ITexture[] tmp0 = { new GT_RenderedTexture(
+ * Textures.BlockIcons.MACHINE_STEEL_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa)) }; rTextures[0][(i + 1)] =
+ * tmp0; ITexture[] tmp1 = { new GT_RenderedTexture( Textures.BlockIcons.MACHINE_STEEL_TOP) }; rTextures[1][(i + 1)]
+ * = tmp1; ITexture[] tmp2 = { new GT_RenderedTexture( Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(i,
+ * Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE) }; rTextures[2][(i + 1)] = tmp2;
+ * ITexture[] tmp4 = { new GT_RenderedTexture( Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(i,
+ * Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT) }; rTextures[3][(i + 1)] = tmp4;
+ * ITexture[] tmp5 = { new GT_RenderedTexture( Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(i,
+ * Dyes._NULL.mRGBa)), new GT_RenderedTexture( Textures.BlockIcons.BOILER_FRONT_ACTIVE) }; rTextures[4][(i + 1)] =
+ * tmp5; } return rTextures; }
+ */
+
+ /*
+ * @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte
+ * aColorIndex, boolean aActive, boolean aRedstone) { return mTextures[aSide == aFacing ? 1 : 0][aColorIndex+1]; }
+ */
@Override
public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMetaEnergyBuffer(
- this.mName, this.mTier, this.mDescription, this.mTextures, this.mInventory.length);
+ this.mName,
+ this.mTier,
+ this.mDescription,
+ this.mTextures,
+ this.mInventory.length);
}
@Override
@@ -367,36 +314,34 @@ public class GregtechMetaEnergyBuffer extends GregtechMetaTileEntity {
final double roundOff = Math.round(c * 100.00) / 100.00;
PlayerUtils.messagePlayer(
playerIn,
- "Energy: " + GT_Utility.formatNumbers(tempStorage) + " EU at " + V[this.mTier] + "v (" + roundOff
- + "%)");
+ "Energy: " + GT_Utility
+ .formatNumbers(tempStorage) + " EU at " + V[this.mTier] + "v (" + roundOff + "%)");
PlayerUtils.messagePlayer(playerIn, "Amperage: " + GT_Utility.formatNumbers(maxAmperesOut()) + "A");
}
// Utils.LOG_WARNING("Begin Show Energy");
/*
- *
- //Utils.LOG_INFO("getProgresstime: "+tempStorage+" maxProgresstime: "+maxEUStore()+" C: "+c);
- Utils.LOG_INFO("getProgressTime: "+getProgresstime());
- Utils.LOG_INFO("maxProgressTime: "+maxProgresstime());
- Utils.LOG_INFO("getMinimumStoredEU: "+getMinimumStoredEU());
- Utils.LOG_INFO("maxEUStore: "+maxEUStore());*/
- /*final long d = (tempStorage * 100L) / maxEUStore();
- Utils.LOG_INFO("getProgresstime: "+tempStorage+" maxProgresstime: "+maxEUStore()+" D: "+d);
- final double roundOff2 = Math.round(d * 100.00) / 100.00;
- Utils.messagePlayer(playerIn, "Energy: " + tempStorage + " EU at "+V[mTier]+"v ("+roundOff2+"%)");
- Utils.LOG_WARNING("Making new instance of Guihandler");
- GuiHandler block = new GuiHandler();
- Utils.LOG_WARNING("Guihandler.toString(): "+block.toString());
- block.getClientGuiElement(1, playerIn, worldIn, (int) playerIn.posX, (int) playerIn.posY, (int) playerIn.posZ);*/
-
- @Override
- public boolean allowPullStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ * //Utils.LOG_INFO("getProgresstime: "+tempStorage+" maxProgresstime: "+maxEUStore()+" C: "+c);
+ * Utils.LOG_INFO("getProgressTime: "+getProgresstime()); Utils.LOG_INFO("maxProgressTime: "+maxProgresstime());
+ * Utils.LOG_INFO("getMinimumStoredEU: "+getMinimumStoredEU()); Utils.LOG_INFO("maxEUStore: "+maxEUStore());
+ */
+ /*
+ * final long d = (tempStorage * 100L) / maxEUStore();
+ * Utils.LOG_INFO("getProgresstime: "+tempStorage+" maxProgresstime: "+maxEUStore()+" D: "+d); final double
+ * roundOff2 = Math.round(d * 100.00) / 100.00; Utils.messagePlayer(playerIn, "Energy: " + tempStorage +
+ * " EU at "+V[mTier]+"v ("+roundOff2+"%)"); Utils.LOG_WARNING("Making new instance of Guihandler"); GuiHandler
+ * block = new GuiHandler(); Utils.LOG_WARNING("Guihandler.toString(): "+block.toString());
+ * block.getClientGuiElement(1, playerIn, worldIn, (int) playerIn.posX, (int) playerIn.posY, (int) playerIn.posZ);
+ */
+
+ @Override
+ public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return false;
}
@Override
- public boolean allowPutStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return false;
}
@@ -409,7 +354,7 @@ public class GregtechMetaEnergyBuffer extends GregtechMetaTileEntity {
String fmt = String.format("%%%ds", max.length());
cur = String.format(fmt, cur);
- return new String[] {cur + " EU stored", max + " EU capacity"};
+ return new String[] { cur + " EU stored", max + " EU capacity" };
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaSafeBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaSafeBlock.java
index 5115b87da7..12a64f7fa8 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaSafeBlock.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaSafeBlock.java
@@ -6,6 +6,7 @@ import com.gtnewhorizons.modularui.common.widget.ButtonWidget;
import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget;
import com.gtnewhorizons.modularui.common.widget.SlotGroup;
import com.gtnewhorizons.modularui.common.widget.TextWidget;
+
import gregtech.api.enums.Textures;
import gregtech.api.gui.modularui.GT_UITextures;
import gregtech.api.interfaces.ITexture;
@@ -23,34 +24,29 @@ public class GregtechMetaSafeBlock extends GregtechMetaSafeBlockBase implements
super(aID, aName, aNameRegional, aTier, 28, "Protecting your items from sticky fingers.");
}
- public GregtechMetaSafeBlock(
- final int aID,
- final String aName,
- final String aNameRegional,
- final int aTier,
- final int aInvSlotCount,
- final String aDescription) {
+ public GregtechMetaSafeBlock(final int aID, final String aName, final String aNameRegional, final int aTier,
+ final int aInvSlotCount, final String aDescription) {
super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription);
}
- public GregtechMetaSafeBlock(
- final String aName,
- final int aTier,
- final int aInvSlotCount,
- final String aDescription,
- final ITexture[][][] aTextures) {
+ public GregtechMetaSafeBlock(final String aName, final int aTier, final int aInvSlotCount,
+ final String aDescription, final ITexture[][][] aTextures) {
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
}
@Override
public String[] getDescription() {
- return new String[] {this.mDescription, CORE.GT_Tooltip};
+ return new String[] { this.mDescription, CORE.GT_Tooltip };
}
@Override
public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMetaSafeBlock(
- this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures);
+ this.mName,
+ this.mTier,
+ this.mInventory.length,
+ this.mDescription,
+ this.mTextures);
}
@Override
@@ -70,19 +66,15 @@ public class GregtechMetaSafeBlock extends GregtechMetaSafeBlockBase implements
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
- builder.widget(SlotGroup.ofItemHandler(inventoryHandler, 9)
- .endAtSlot(26)
- .build()
- .setPos(7, 4))
- .widget(new ButtonWidget()
- .setOnClick((clickData, widget) -> bUnbreakable = !bUnbreakable)
- .setBackground(GT_UITextures.BUTTON_STANDARD, GTPP_UITextures.OVERLAY_BUTTON_LOCK)
- .setPos(43, 62)
- .setSize(18, 18))
+ builder.widget(SlotGroup.ofItemHandler(inventoryHandler, 9).endAtSlot(26).build().setPos(7, 4))
+ .widget(
+ new ButtonWidget().setOnClick((clickData, widget) -> bUnbreakable = !bUnbreakable)
+ .setBackground(GT_UITextures.BUTTON_STANDARD, GTPP_UITextures.OVERLAY_BUTTON_LOCK)
+ .setPos(43, 62).setSize(18, 18))
.widget(new TextWidget("Safe Status").setPos(76, 61))
- .widget(TextWidget.dynamicString(() -> bUnbreakable ? "Locked" : "Unlocked")
- .setSynced(false)
- .setPos(82, 73))
+ .widget(
+ TextWidget.dynamicString(() -> bUnbreakable ? "Locked" : "Unlocked").setSynced(false)
+ .setPos(82, 73))
.widget(new FakeSyncWidget.BooleanSyncer(() -> bUnbreakable, val -> bUnbreakable = val));
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/creative/GT_MetaTileEntity_InfiniteItemHolder.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/creative/GT_MetaTileEntity_InfiniteItemHolder.java
index bff2cad086..daf79e022f 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/creative/GT_MetaTileEntity_InfiniteItemHolder.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/creative/GT_MetaTileEntity_InfiniteItemHolder.java
@@ -1,5 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.storage.creative;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
@@ -7,8 +10,6 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.core.util.sys.KeyboardUtils;
import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredChest;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
public class GT_MetaTileEntity_InfiniteItemHolder extends GT_MetaTileEntity_TieredChest {
@@ -16,14 +17,14 @@ public class GT_MetaTileEntity_InfiniteItemHolder extends GT_MetaTileEntity_Tier
super(aID, aName, aNameRegional, aTier);
}
- public GT_MetaTileEntity_InfiniteItemHolder(
- String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_InfiniteItemHolder(String aName, int aTier, String aDescription,
+ ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
}
@Override
public String[] getDescription() {
- return new String[] {this.mDescription, CORE.GT_Tooltip};
+ return new String[] { this.mDescription, CORE.GT_Tooltip };
}
@Override
@@ -39,7 +40,8 @@ public class GT_MetaTileEntity_InfiniteItemHolder extends GT_MetaTileEntity_Tier
this.mItemCount = Short.MAX_VALUE;
aPlayer.setCurrentItemOrArmor(0, null);
PlayerUtils.messagePlayer(
- aPlayer, "Now holding " + this.mItemStack.getDisplayName() + " x" + Short.MAX_VALUE + ".");
+ aPlayer,
+ "Now holding " + this.mItemStack.getDisplayName() + " x" + Short.MAX_VALUE + ".");
return true;
}
} else {
@@ -55,7 +57,8 @@ public class GT_MetaTileEntity_InfiniteItemHolder extends GT_MetaTileEntity_Tier
PlayerUtils.messagePlayer(
aPlayer,
- "Currently holding: " + (this.mItemStack != null ? this.mItemStack.getDisplayName() : "Nothing") + " x"
+ "Currently holding: " + (this.mItemStack != null ? this.mItemStack.getDisplayName() : "Nothing")
+ + " x"
+ this.mItemCount);
return true;
// return super.onRightclick(aBaseMetaTileEntity, aPlayer);
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java
index 18e95861b3..4d959789eb 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java
@@ -1,5 +1,10 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+
import gregtech.api.enums.*;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -15,22 +20,19 @@ import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.core.util.sys.KeyboardUtils;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
+
public byte mType = 0;
public String mOldDesc = "";
public boolean mLocked = false;
protected byte mIndex = (byte) MathUtils.randInt(1, 3);
- public static GT_RenderedTexture texBottom =
- new GT_RenderedTexture(new CustomIcon("TileEntities/gt4/machine_bottom"));
+ public static GT_RenderedTexture texBottom = new GT_RenderedTexture(
+ new CustomIcon("TileEntities/gt4/machine_bottom"));
public static GT_RenderedTexture texTop = new GT_RenderedTexture(new CustomIcon("TileEntities/gt4/machine_top"));
public static GT_RenderedTexture texSide = new GT_RenderedTexture(new CustomIcon("TileEntities/gt4/machine_side"));
- public static GT_RenderedTexture texSideCabinet =
- new GT_RenderedTexture(new CustomIcon("TileEntities/gt4/machine_side_cabinet"));
+ public static GT_RenderedTexture texSideCabinet = new GT_RenderedTexture(
+ new CustomIcon("TileEntities/gt4/machine_side_cabinet"));
public GT4Entity_Shelf(final int aID, final String aName, final String aNameRegional, final String aDescription) {
super(aID, aName, aNameRegional, 0, aDescription);
@@ -103,7 +105,9 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
if (this.mInventory[0] != null) {
PlayerUtils.messagePlayer(
aPlayer,
- "Contains " + this.mInventory[0].getDisplayName() + " x" + this.mInventory[0].stackSize
+ "Contains " + this.mInventory[0].getDisplayName()
+ + " x"
+ + this.mInventory[0].stackSize
+ ".");
}
return false;
@@ -112,7 +116,9 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
if (!this.mLocked) {
PlayerUtils.messagePlayer(
aPlayer,
- "Removed " + this.mInventory[0].getDisplayName() + " x" + this.mInventory[0].stackSize
+ "Removed " + this.mInventory[0].getDisplayName()
+ + " x"
+ + this.mInventory[0].stackSize
+ ".");
aPlayer.inventory.setInventorySlotContents(aPlayer.inventory.currentItem, this.mInventory[0]);
getBaseMetaTileEntity().setInventorySlotContents(0, null);
@@ -120,7 +126,8 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
return true;
} else {
PlayerUtils.messagePlayer(
- aPlayer, "This container is locked. It belongs to " + aTile.getOwnerName() + ".");
+ aPlayer,
+ "This container is locked. It belongs to " + aTile.getOwnerName() + ".");
return false;
}
}
@@ -147,7 +154,7 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
@Override
public void onLeftclick(IGregTechTileEntity aTile, EntityPlayer aPlayer) {
if ((this.mInventory[0] != null) && (this.mInventory[0].stackSize > 0)) {
- ItemStack tOutput = GT_Utility.copy(new Object[] {this.mInventory[0]});
+ ItemStack tOutput = GT_Utility.copy(new Object[] { this.mInventory[0] });
if (!aPlayer.isSneaking()) {
tOutput.stackSize = 1;
}
@@ -206,13 +213,8 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
@Override
public String[] getDescription() {
- return new String[] {
- mOldDesc,
- "Decorative Item Storage",
- "Right click to store/remove something",
- "Ctrl + Rmb to check contents",
- "Ctrl + Rmb with a screwdriver to lock",
- };
+ return new String[] { mOldDesc, "Decorative Item Storage", "Right click to store/remove something",
+ "Ctrl + Rmb to check contents", "Ctrl + Rmb with a screwdriver to lock", };
}
@Override
@@ -240,44 +242,35 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
ITexture[][][] rTextures = new ITexture[7][17][];
for (byte i = -1; i < 16; i = (byte) (i + 1)) {
- ITexture[] tmp0 = {this.getBottom((byte) 0)[0]};
+ ITexture[] tmp0 = { this.getBottom((byte) 0)[0] };
rTextures[0][(i + 1)] = tmp0;
- ITexture[] tmp1 = {this.getTop((byte) 0)[0]};
+ ITexture[] tmp1 = { this.getTop((byte) 0)[0] };
rTextures[1][(i + 1)] = tmp1;
- ITexture[] tmp2 = {this.getSides((byte) 0)[0]};
+ ITexture[] tmp2 = { this.getSides((byte) 0)[0] };
rTextures[2][(i + 1)] = tmp2;
- ITexture[] tmp4 = {this.getSides((byte) 0)[0]};
+ ITexture[] tmp4 = { this.getSides((byte) 0)[0] };
rTextures[3][(i + 1)] = tmp4;
- ITexture[] tmp5 = {this.getSides((byte) 0)[0], getFront((byte) 0)[0]};
+ ITexture[] tmp5 = { this.getSides((byte) 0)[0], getFront((byte) 0)[0] };
rTextures[4][(i + 1)] = tmp5;
- ITexture[] tmp6 = {this.getSides((byte) 0)[0], getFront((byte) 1)[0]};
+ ITexture[] tmp6 = { this.getSides((byte) 0)[0], getFront((byte) 1)[0] };
rTextures[5][(i + 1)] = tmp6;
- ITexture[] tmp7 = {this.getSides((byte) 0)[0], getFront((byte) 2)[0]};
+ ITexture[] tmp7 = { this.getSides((byte) 0)[0], getFront((byte) 2)[0] };
rTextures[6][(i + 1)] = tmp7;
}
return rTextures;
}
@Override
- public ITexture[] getTexture(
- final IGregTechTileEntity aBaseMetaTileEntity,
- final byte aSide,
- final byte aFacing,
- final byte aColorIndex,
- final boolean aActive,
- final boolean aRedstone) {
-
- ITexture[] tmp = this.mTextures[
- (aSide >= 2)
- ? ((aSide != aFacing)
- ? 2
- : ((byte) this.mType == 0
- ? 4
- : this.mType == 1 || this.mType == 2 ? 5 : this.mType == 3 ? 6 : 0))
- : aSide][
- aColorIndex + 1];
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+
+ ITexture[] tmp = this.mTextures[(aSide >= 2)
+ ? ((aSide != aFacing) ? 2
+ : ((byte) this.mType == 0 ? 4
+ : this.mType == 1 || this.mType == 2 ? 5 : this.mType == 3 ? 6 : 0))
+ : aSide][aColorIndex + 1];
if (aSide != aFacing && tmp.length == 2) {
- tmp = new ITexture[] {tmp[0]};
+ tmp = new ITexture[] { tmp[0] };
}
return tmp;
}
@@ -287,31 +280,31 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
private static GT_RenderedTexture x3 = new GT_RenderedTexture(TexturesGtBlock.OVERLAY_WOODEN_SHELF_CANS_FRONT);
public ITexture[] getFrontNormal() {
- return new ITexture[] {x1};
+ return new ITexture[] { x1 };
}
public ITexture[] getFrontActive() {
- return new ITexture[] {x2};
+ return new ITexture[] { x2 };
}
public ITexture[] getFrontAlternative() {
- return new ITexture[] {x3};
+ return new ITexture[] { x3 };
}
public ITexture[] getBack(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)};
+ return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks) };
}
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Acacia_Log)};
+ return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Acacia_Log) };
}
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)};
+ return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks) };
}
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)};
+ return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks) };
}
public ITexture[] getFrontActive(final byte aColor) {
@@ -351,8 +344,7 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
@Override
public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
if (KeyboardUtils.isCtrlKeyDown()) {
- if (!aPlayer.getDisplayName()
- .equalsIgnoreCase(this.getBaseMetaTileEntity().getOwnerName())) {
+ if (!aPlayer.getDisplayName().equalsIgnoreCase(this.getBaseMetaTileEntity().getOwnerName())) {
PlayerUtils.messagePlayer(aPlayer, "Container is not yours to lock.");
} else {
this.mLocked = Utils.invertBoolean(this.mLocked);
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java
index 93361a523f..b75b383377 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java
@@ -1,16 +1,17 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving;
+import net.minecraft.entity.player.EntityPlayer;
+
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.entity.player.EntityPlayer;
public class GT4Entity_Shelf_Compartment extends GT4Entity_Shelf {
- public GT4Entity_Shelf_Compartment(
- final int aID, final String aName, final String aNameRegional, final String aDescription) {
+ public GT4Entity_Shelf_Compartment(final int aID, final String aName, final String aNameRegional,
+ final String aDescription) {
super(aID, aName, aNameRegional, aDescription);
}
@@ -33,6 +34,6 @@ public class GT4Entity_Shelf_Compartment extends GT4Entity_Shelf {
@Override
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {TexturesGtBlock.OVERLAYS_COMPARTMENT_FRONT[this.mType < 16 ? this.mType : 0]};
+ return new ITexture[] { TexturesGtBlock.OVERLAYS_COMPARTMENT_FRONT[this.mType < 16 ? this.mType : 0] };
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java
index c9472e157c..0327424efb 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java
@@ -8,8 +8,8 @@ import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
public class GT4Entity_Shelf_Desk extends GT4Entity_Shelf {
- public GT4Entity_Shelf_Desk(
- final int aID, final String aName, final String aNameRegional, final String aDescription) {
+ public GT4Entity_Shelf_Desk(final int aID, final String aName, final String aNameRegional,
+ final String aDescription) {
super(aID, aName, aNameRegional, aDescription);
}
@@ -24,22 +24,22 @@ public class GT4Entity_Shelf_Desk extends GT4Entity_Shelf {
@Override
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {TexturesGtBlock.OVERLAYS_CABINET_FRONT[this.mType < 16 ? this.mType : 0]};
+ return new ITexture[] { TexturesGtBlock.OVERLAYS_CABINET_FRONT[this.mType < 16 ? this.mType : 0] };
}
public ITexture[] getBack(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)};
+ return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks) };
}
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)};
+ return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks) };
}
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)};
+ return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks) };
}
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks)};
+ return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks) };
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java
index 9c4ae3aefa..b7ebac4f90 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java
@@ -1,16 +1,17 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving;
+import net.minecraft.entity.player.EntityPlayer;
+
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import net.minecraft.entity.player.EntityPlayer;
public class GT4Entity_Shelf_FileCabinet extends GT4Entity_Shelf {
- public GT4Entity_Shelf_FileCabinet(
- final int aID, final String aName, final String aNameRegional, final String aDescription) {
+ public GT4Entity_Shelf_FileCabinet(final int aID, final String aName, final String aNameRegional,
+ final String aDescription) {
super(aID, aName, aNameRegional, aDescription);
}
@@ -33,22 +34,22 @@ public class GT4Entity_Shelf_FileCabinet extends GT4Entity_Shelf {
@Override
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {TexturesGtBlock.OVERLAYS_CABINET_FRONT[this.mType < 16 ? this.mType : 0]};
+ return new ITexture[] { TexturesGtBlock.OVERLAYS_CABINET_FRONT[this.mType < 16 ? this.mType : 0] };
}
public ITexture[] getBack(final byte aColor) {
- return new ITexture[] {texSide};
+ return new ITexture[] { texSide };
}
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {texBottom};
+ return new ITexture[] { texBottom };
}
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {texTop};
+ return new ITexture[] { texTop };
}
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {texSide};
+ return new ITexture[] { texSide };
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Iron.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Iron.java
index 17110e691b..a401fd96e3 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Iron.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Iron.java
@@ -6,8 +6,8 @@ import gregtech.api.metatileentity.MetaTileEntity;
public class GT4Entity_Shelf_Iron extends GT4Entity_Shelf {
- public GT4Entity_Shelf_Iron(
- final int aID, final String aName, final String aNameRegional, final String aDescription) {
+ public GT4Entity_Shelf_Iron(final int aID, final String aName, final String aNameRegional,
+ final String aDescription) {
super(aID, aName, aNameRegional, aDescription);
}
@@ -21,22 +21,22 @@ public class GT4Entity_Shelf_Iron extends GT4Entity_Shelf {
}
public ITexture[] getFront(final byte aColor) {
- return new ITexture[] {texSideCabinet};
+ return new ITexture[] { texSideCabinet };
}
public ITexture[] getBack(final byte aColor) {
- return new ITexture[] {texSide};
+ return new ITexture[] { texSide };
}
public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] {texBottom};
+ return new ITexture[] { texBottom };
}
public ITexture[] getTop(final byte aColor) {
- return new ITexture[] {texTop};
+ return new ITexture[] { texTop };
}
public ITexture[] getSides(final byte aColor) {
- return new ITexture[] {texSide};
+ return new ITexture[] { texSide };
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Large.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Large.java
index 15fa23bf95..4b8943f6d1 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Large.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Large.java
@@ -1,10 +1,16 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTBase;
+import net.minecraft.nbt.NBTTagCompound;
+
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
import com.gtnewhorizons.modularui.common.widget.DrawableWidget;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
import com.gtnewhorizons.modularui.common.widget.TextWidget;
+
import gregtech.api.gui.modularui.GT_UIInfos;
import gregtech.api.gui.modularui.GT_UITextures;
import gregtech.api.interfaces.ITexture;
@@ -14,10 +20,6 @@ import gregtech.api.util.GT_Utility;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.core.util.sys.KeyboardUtils;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTBase;
-import net.minecraft.nbt.NBTTagCompound;
public class GT4Entity_Shelf_Large extends GT4Entity_Shelf {
@@ -25,8 +27,8 @@ public class GT4Entity_Shelf_Large extends GT4Entity_Shelf {
public int mItemCount;
public ItemStack mItemStack;
- public GT4Entity_Shelf_Large(
- final int aID, final String aName, final String aNameRegional, final String aDescription, final int aSize) {
+ public GT4Entity_Shelf_Large(final int aID, final String aName, final String aNameRegional,
+ final String aDescription, final int aSize) {
super(aID, aName, aNameRegional, aDescription);
this.mSize = aSize;
this.mItemCount = 0;
@@ -45,10 +47,9 @@ public class GT4Entity_Shelf_Large extends GT4Entity_Shelf {
return new GT4Entity_Shelf_Large(this.mName, this.mDescription, mSize, this.mTextures);
}
- /*@Override
- public int getInvSize() {
- return (mSize > 0 && mSize < 255 ? mSize : 255);
- }*/
+ /*
+ * @Override public int getInvSize() { return (mSize > 0 && mSize < 255 ? mSize : 255); }
+ */
@Override
public boolean isGivingInformation() {
@@ -108,8 +109,7 @@ public class GT4Entity_Shelf_Large extends GT4Entity_Shelf {
}
public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTimer) {
- if (this.getBaseMetaTileEntity().isServerSide()
- && this.getBaseMetaTileEntity().isAllowedToWork()) {
+ if (this.getBaseMetaTileEntity().isServerSide() && this.getBaseMetaTileEntity().isAllowedToWork()) {
try {
if (this.mInventory[0] != null) {
this.mType = (byte) this.mIndex;
@@ -124,8 +124,7 @@ public class GT4Entity_Shelf_Large extends GT4Entity_Shelf {
if (this.mItemStack == null && this.mInventory[0] != null) {
this.mItemStack = this.mInventory[0].copy();
}
- if (this.mInventory[0] != null
- && this.mItemCount < this.getMaxItemCount()
+ if (this.mInventory[0] != null && this.mItemCount < this.getMaxItemCount()
&& GT_Utility.areStacksEqual(this.mInventory[0], this.mItemStack)) {
this.mItemCount += this.mInventory[0].stackSize;
if (this.mItemCount > this.getMaxItemCount()) {
@@ -139,15 +138,15 @@ public class GT4Entity_Shelf_Large extends GT4Entity_Shelf {
this.mInventory[1] = this.mItemStack.copy();
this.mInventory[1].stackSize = Math.min(this.mItemStack.getMaxStackSize(), this.mItemCount);
this.mItemCount -= this.mInventory[1].stackSize;
- } else if (this.mItemCount > 0
- && GT_Utility.areStacksEqual(this.mInventory[1], this.mItemStack)
+ } else if (this.mItemCount > 0 && GT_Utility.areStacksEqual(this.mInventory[1], this.mItemStack)
&& this.mInventory[1].getMaxStackSize() > this.mInventory[1].stackSize) {
- final int tmp = Math.min(
- this.mItemCount, this.mInventory[1].getMaxStackSize() - this.mInventory[1].stackSize);
- final ItemStack itemStack = this.mInventory[1];
- itemStack.stackSize += tmp;
- this.mItemCount -= tmp;
- }
+ final int tmp = Math.min(
+ this.mItemCount,
+ this.mInventory[1].getMaxStackSize() - this.mInventory[1].stackSize);
+ final ItemStack itemStack = this.mInventory[1];
+ itemStack.stackSize += tmp;
+ this.mItemCount -= tmp;
+ }
if (this.mItemStack != null) {
this.mInventory[2] = this.mItemStack.copy();
this.mInventory[2].stackSize = Math.min(this.mItemStack.getMaxStackSize(), this.mItemCount);
@@ -170,8 +169,7 @@ public class GT4Entity_Shelf_Large extends GT4Entity_Shelf {
public int getProgresstime() {
try {
- return this.mItemCount
- + ((this.mInventory[0] == null) ? 0 : this.mInventory[0].stackSize)
+ return this.mItemCount + ((this.mInventory[0] == null) ? 0 : this.mInventory[0].stackSize)
+ ((this.mInventory[1] == null) ? 0 : this.mInventory[1].stackSize);
} catch (Throwable t) {
return 0;
@@ -186,31 +184,28 @@ public class GT4Entity_Shelf_Large extends GT4Entity_Shelf {
return this.mSize;
}
- public boolean allowPullStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return aIndex == 1;
}
- public boolean allowPutStack(
- final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
- return aIndex == 0
- && ((this.mInventory[0] == null && this.mItemStack == null)
- || GT_Utility.areStacksEqual(this.mInventory[0], aStack)
- || (this.mItemStack != null && GT_Utility.areStacksEqual(this.mItemStack, aStack)));
+ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
+ return aIndex == 0 && ((this.mInventory[0] == null && this.mItemStack == null)
+ || GT_Utility.areStacksEqual(this.mInventory[0], aStack)
+ || (this.mItemStack != null && GT_Utility.areStacksEqual(this.mItemStack, aStack)));
}
public String[] getInfoData() {
if (this.mItemStack == null) {
- return new String[] {
- this.getLocalName(), "No Items Stored", "Free Space: " + Integer.toString(this.getMaxItemCount())
- };
+ return new String[] { this.getLocalName(), "No Items Stored",
+ "Free Space: " + Integer.toString(this.getMaxItemCount()) };
}
- return new String[] {
- this.getLocalName(),
- "Storing: " + this.mItemStack.getDisplayName() + " x" + Integer.toString(this.mItemCount),
- "Space Remaining: " + Integer.toString(this.getMaxItemCount() - this.getItemCount()) + "/"
- + Integer.toString(this.getMaxItemCount())
- };
+ return new String[] { this.getLocalName(),
+ "Storing: " + this.mItemStack.getDisplayName() + " x" + Integer.toString(this.mItemCount),
+ "Space Remaining: " + Integer.toString(this.getMaxItemCount() - this.getItemCount())
+ + "/"
+ + Integer.toString(this.getMaxItemCount()) };
}
@Override
@@ -263,18 +258,14 @@ public class GT4Entity_Shelf_Large extends GT4Entity_Shelf {
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
- builder.widget(new DrawableWidget()
- .setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK)
- .setPos(7, 16)
- .setSize(71, 45))
- .widget(new SlotWidget(inventoryHandler, 0)
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_IN)
- .setPos(79, 16))
- .widget(new TextWidget("Item Amount")
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(10, 20))
- .widget(TextWidget.dynamicString(() -> GT_Utility.parseNumberToString(mItemCount))
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(10, 30));
+ builder.widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(7, 16).setSize(71, 45))
+ .widget(
+ new SlotWidget(inventoryHandler, 0)
+ .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_IN)
+ .setPos(79, 16))
+ .widget(new TextWidget("Item Amount").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 20)).widget(
+ TextWidget.dynamicString(() -> GT_Utility.parseNumberToString(mItemCount))
+ .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 30));
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_AngleGrinder.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_AngleGrinder.java
index e8b72c7ea9..8065eee736 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_AngleGrinder.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_AngleGrinder.java
@@ -1,16 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.tools;
-import gregtech.GT_Mod;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.Textures.ItemIcons;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.common.items.behaviors.Behaviour_None;
-import gregtech.common.tools.GT_Tool;
-import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools;
import java.util.Arrays;
import java.util.List;
+
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@@ -23,14 +15,24 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IChatComponent;
import net.minecraftforge.event.world.BlockEvent;
+import gregtech.GT_Mod;
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.Textures.ItemIcons;
+import gregtech.api.interfaces.IIconContainer;
+import gregtech.api.items.GT_MetaGenerated_Tool;
+import gregtech.common.items.behaviors.Behaviour_None;
+import gregtech.common.tools.GT_Tool;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools;
+
public class TOOL_Gregtech_AngleGrinder extends GT_Tool {
- public static final List<String> mEffectiveList =
- Arrays.asList(new String[] {EntityIronGolem.class.getName(), "EntityTowerGuardian"});
+ public static final List<String> mEffectiveList = Arrays
+ .asList(new String[] { EntityIronGolem.class.getName(), "EntityTowerGuardian" });
@Override
- public float getNormalDamageAgainstEntity(
- final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) {
+ public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack,
+ final EntityPlayer aPlayer) {
String tName = aEntity.getClass().getName();
tName = tName.substring(tName.lastIndexOf(".") + 1);
return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage;
@@ -122,38 +124,21 @@ public class TOOL_Gregtech_AngleGrinder extends GT_Tool {
}
@Override
- public int convertBlockDrops(
- final List<ItemStack> aDrops,
- final ItemStack aStack,
- final EntityPlayer aPlayer,
- final Block aBlock,
- final int aX,
- final int aY,
- final int aZ,
- final byte aMetaData,
- final int aFortune,
- final boolean aSilkTouch,
- final BlockEvent.HarvestDropsEvent aEvent) {
+ public int convertBlockDrops(final List<ItemStack> aDrops, final ItemStack aStack, final EntityPlayer aPlayer,
+ final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune,
+ final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) {
int rConversions = 0;
- /*GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{new ItemStack(aBlock, 1, aMetaData)});
- if ((tRecipe == null) || (aBlock.hasTileEntity(aMetaData))) {
- for (final ItemStack tDrop : aDrops) {
- tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{tDrop})});
- if (tRecipe != null) {
- final ItemStack tHammeringOutput = tRecipe.getOutput(0);
- if (tHammeringOutput != null) {
- rConversions += tDrop.stackSize;
- tDrop.stackSize *= tHammeringOutput.stackSize;
- tHammeringOutput.stackSize = tDrop.stackSize;
- GT_Utility.setStack(tDrop, tHammeringOutput);
- }
- }
- }
- } else {
- aDrops.clear();
- aDrops.add(tRecipe.getOutput(0));
- rConversions++;
- }*/
+ /*
+ * GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new
+ * ItemStack[]{new ItemStack(aBlock, 1, aMetaData)}); if ((tRecipe == null) ||
+ * (aBlock.hasTileEntity(aMetaData))) { for (final ItemStack tDrop : aDrops) { tRecipe =
+ * GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new
+ * ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{tDrop})}); if (tRecipe != null) { final ItemStack
+ * tHammeringOutput = tRecipe.getOutput(0); if (tHammeringOutput != null) { rConversions += tDrop.stackSize;
+ * tDrop.stackSize *= tHammeringOutput.stackSize; tHammeringOutput.stackSize = tDrop.stackSize;
+ * GT_Utility.setStack(tDrop, tHammeringOutput); } } } } else { aDrops.clear();
+ * aDrops.add(tRecipe.getOutput(0)); rConversions++; }
+ */
return rConversions;
}
@@ -177,15 +162,18 @@ public class TOOL_Gregtech_AngleGrinder extends GT_Tool {
try {
GT_Mod.achievements.issueAchievement(aPlayer, "tools");
GT_Mod.achievements.issueAchievement(aPlayer, "unitool");
- } catch (final Exception e) {
- }
+ } catch (final Exception e) {}
}
@Override
public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE
- + " has been Ground out of existence by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName()
- + EnumChatFormatting.WHITE);
+ return new ChatComponentText(
+ EnumChatFormatting.RED + aEntity.getCommandSenderName()
+ + EnumChatFormatting.WHITE
+ + " has been Ground out of existence by "
+ + EnumChatFormatting.GREEN
+ + aPlayer.getCommandSenderName()
+ + EnumChatFormatting.WHITE);
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java
index db93f8fdd1..5939203637 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java
@@ -1,10 +1,7 @@
package gtPlusPlus.xmod.gregtech.common.tools;
-import gregtech.api.GregTech_API;
-import gregtech.api.damagesources.GT_DamageSources;
-import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_ToolStats;
-import gtPlusPlus.xmod.gregtech.api.items.Gregtech_MetaTool;
import java.util.List;
+
import net.minecraft.block.Block;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity;
@@ -17,9 +14,15 @@ import net.minecraft.util.EntityDamageSource;
import net.minecraft.util.IChatComponent;
import net.minecraftforge.event.world.BlockEvent;
+import gregtech.api.GregTech_API;
+import gregtech.api.damagesources.GT_DamageSources;
+import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_ToolStats;
+import gtPlusPlus.xmod.gregtech.api.items.Gregtech_MetaTool;
+
public abstract class TOOL_Gregtech_Base implements Interface_ToolStats {
- public static final Enchantment[] FORTUNE_ENCHANTMENT = {Enchantment.fortune};
- public static final Enchantment[] LOOTING_ENCHANTMENT = {Enchantment.looting};
+
+ public static final Enchantment[] FORTUNE_ENCHANTMENT = { Enchantment.fortune };
+ public static final Enchantment[] LOOTING_ENCHANTMENT = { Enchantment.looting };
public static final Enchantment[] ZERO_ENCHANTMENTS = new Enchantment[0];
public static final int[] ZERO_ENCHANTMENT_LEVELS = new int[0];
@@ -127,8 +130,7 @@ public abstract class TOOL_Gregtech_Base implements Interface_ToolStats {
return GT_DamageSources.getCombatDamage(
(aPlayer instanceof EntityPlayer) ? "player" : "mob",
aPlayer,
- (aEntity instanceof EntityLivingBase)
- ? this.getDeathMessage(aPlayer, (EntityLivingBase) aEntity)
+ (aEntity instanceof EntityLivingBase) ? this.getDeathMessage(aPlayer, (EntityLivingBase) aEntity)
: null);
}
@@ -138,18 +140,9 @@ public abstract class TOOL_Gregtech_Base implements Interface_ToolStats {
}
@Override
- public int convertBlockDrops(
- final List<ItemStack> aDrops,
- final ItemStack aStack,
- final EntityPlayer aPlayer,
- final Block aBlock,
- final int aX,
- final int aY,
- final int aZ,
- final byte aMetaData,
- final int aFortune,
- final boolean aSilkTouch,
- final BlockEvent.HarvestDropsEvent aEvent) {
+ public int convertBlockDrops(final List<ItemStack> aDrops, final ItemStack aStack, final EntityPlayer aPlayer,
+ final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune,
+ final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) {
return 0;
}
@@ -179,14 +172,14 @@ public abstract class TOOL_Gregtech_Base implements Interface_ToolStats {
public void onStatsAddedToTool(final Gregtech_MetaTool aItem, final int aID) {}
@Override
- public float getNormalDamageAgainstEntity(
- final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) {
+ public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack,
+ final EntityPlayer aPlayer) {
return aOriginalDamage;
}
@Override
- public float getMagicDamageAgainstEntity(
- final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) {
+ public float getMagicDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack,
+ final EntityPlayer aPlayer) {
return aOriginalDamage;
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java
index efdf8b18e9..bdd501ee99 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java
@@ -1,16 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.tools;
-import gregtech.GT_Mod;
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.tools.GT_Tool;
-import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools;
-import gtPlusPlus.xmod.gregtech.common.items.behaviours.Behaviour_Choocher;
import java.util.Arrays;
import java.util.List;
+
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
@@ -25,14 +17,24 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IChatComponent;
import net.minecraftforge.event.world.BlockEvent;
+import gregtech.GT_Mod;
+import gregtech.api.GregTech_API;
+import gregtech.api.interfaces.IIconContainer;
+import gregtech.api.items.GT_MetaGenerated_Tool;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
+import gregtech.common.tools.GT_Tool;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools;
+import gtPlusPlus.xmod.gregtech.common.items.behaviours.Behaviour_Choocher;
+
public class TOOL_Gregtech_Choocher extends GT_Tool {
- public static final List<String> mEffectiveList =
- Arrays.asList(new String[] {EntityIronGolem.class.getName(), "EntityTowerGuardian"});
+ public static final List<String> mEffectiveList = Arrays
+ .asList(new String[] { EntityIronGolem.class.getName(), "EntityTowerGuardian" });
@Override
- public float getNormalDamageAgainstEntity(
- final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) {
+ public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack,
+ final EntityPlayer aPlayer) {
String tName = aEntity.getClass().getName();
tName = tName.substring(tName.lastIndexOf(".") + 1);
return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage;
@@ -120,12 +122,9 @@ public class TOOL_Gregtech_Choocher extends GT_Tool {
@Override
public boolean isMinableBlock(final Block aBlock, final byte aMetaData) {
final String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null)
- && ((tTool.equals("sword"))
- || (tTool.equals("wrench"))
- || (tTool.equals("hammer"))
- || (tTool.equals("pickaxe"))))
- || (aBlock.getMaterial() == Material.rock)
+ return ((tTool != null) && ((tTool.equals("sword")) || (tTool.equals("wrench"))
+ || (tTool.equals("hammer"))
+ || (tTool.equals("pickaxe")))) || (aBlock.getMaterial() == Material.rock)
|| (aBlock.getMaterial() == Material.glass)
|| (aBlock.getMaterial() == Material.piston)
|| (aBlock == Blocks.hopper)
@@ -155,26 +154,20 @@ public class TOOL_Gregtech_Choocher extends GT_Tool {
}
@Override
- public int convertBlockDrops(
- final List<ItemStack> aDrops,
- final ItemStack aStack,
- final EntityPlayer aPlayer,
- final Block aBlock,
- final int aX,
- final int aY,
- final int aZ,
- final byte aMetaData,
- final int aFortune,
- final boolean aSilkTouch,
- final BlockEvent.HarvestDropsEvent aEvent) {
+ public int convertBlockDrops(final List<ItemStack> aDrops, final ItemStack aStack, final EntityPlayer aPlayer,
+ final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune,
+ final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) {
int rConversions = 0;
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(
- null, true, 2147483647L, null, new ItemStack[] {new ItemStack(aBlock, 1, aMetaData)});
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes
+ .findRecipe(null, true, 2147483647L, null, new ItemStack[] { new ItemStack(aBlock, 1, aMetaData) });
if ((tRecipe == null) || (aBlock.hasTileEntity(aMetaData))) {
for (final ItemStack tDrop : aDrops) {
tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(
- null, true, 2147483647L, null, new ItemStack[] {GT_Utility.copyAmount(1L, new Object[] {tDrop})
- });
+ null,
+ true,
+ 2147483647L,
+ null,
+ new ItemStack[] { GT_Utility.copyAmount(1L, new Object[] { tDrop }) });
if (tRecipe != null) {
final ItemStack tHammeringOutput = tRecipe.getOutput(0);
if (tHammeringOutput != null) {
@@ -216,15 +209,18 @@ public class TOOL_Gregtech_Choocher extends GT_Tool {
try {
GT_Mod.achievements.issueAchievement(aPlayer, "tools");
GT_Mod.achievements.issueAchievement(aPlayer, "unitool");
- } catch (final Exception e) {
- }
+ } catch (final Exception e) {}
}
@Override
public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE
- + " has been Choochered by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName()
- + EnumChatFormatting.WHITE);
+ return new ChatComponentText(
+ EnumChatFormatting.RED + aEntity.getCommandSenderName()
+ + EnumChatFormatting.WHITE
+ + " has been Choochered by "
+ + EnumChatFormatting.GREEN
+ + aPlayer.getCommandSenderName()
+ + EnumChatFormatting.WHITE);
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricButcherKnife.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricButcherKnife.java
index 06e429514e..1580119238 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricButcherKnife.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricButcherKnife.java
@@ -1,16 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.tools;
-import gregtech.GT_Mod;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.Textures.ItemIcons;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.common.items.behaviors.Behaviour_None;
-import gregtech.common.tools.GT_Tool;
-import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools;
import java.util.Arrays;
import java.util.List;
+
import net.minecraft.block.Block;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity;
@@ -23,14 +15,24 @@ import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IChatComponent;
+import gregtech.GT_Mod;
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.Textures.ItemIcons;
+import gregtech.api.interfaces.IIconContainer;
+import gregtech.api.items.GT_MetaGenerated_Tool;
+import gregtech.common.items.behaviors.Behaviour_None;
+import gregtech.common.tools.GT_Tool;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools;
+
public class TOOL_Gregtech_ElectricButcherKnife extends GT_Tool {
- public static final List<String> mEffectiveList =
- Arrays.asList(new String[] {EntityIronGolem.class.getName(), "EntityTowerGuardian"});
+ public static final List<String> mEffectiveList = Arrays
+ .asList(new String[] { EntityIronGolem.class.getName(), "EntityTowerGuardian" });
@Override
- public float getNormalDamageAgainstEntity(
- final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) {
+ public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack,
+ final EntityPlayer aPlayer) {
String tName = aEntity.getClass().getName();
tName = tName.substring(tName.lastIndexOf(".") + 1);
return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage;
@@ -136,15 +138,18 @@ public class TOOL_Gregtech_ElectricButcherKnife extends GT_Tool {
try {
GT_Mod.achievements.issueAchievement(aPlayer, "tools");
GT_Mod.achievements.issueAchievement(aPlayer, "unitool");
- } catch (final Exception e) {
- }
+ } catch (final Exception e) {}
}
@Override
public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE
- + " has been Sliced out of existence by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName()
- + EnumChatFormatting.WHITE);
+ return new ChatComponentText(
+ EnumChatFormatting.RED + aEntity.getCommandSenderName()
+ + EnumChatFormatting.WHITE
+ + " has been Sliced out of existence by "
+ + EnumChatFormatting.GREEN
+ + aPlayer.getCommandSenderName()
+ + EnumChatFormatting.WHITE);
}
@Override
@@ -179,6 +184,6 @@ public class TOOL_Gregtech_ElectricButcherKnife extends GT_Tool {
@Override
public int[] getEnchantmentLevels(ItemStack aStack) {
- return new int[] {(4 + GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolQuality) / 2};
+ return new int[] { (4 + GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolQuality) / 2 };
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java
index b1f4385a11..f14af8b988 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java
@@ -1,16 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.tools;
-import gregtech.GT_Mod;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.Textures.ItemIcons;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.common.tools.GT_Tool;
-import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools;
-import gtPlusPlus.xmod.gregtech.common.items.behaviours.Behaviour_Electric_Lighter;
import java.util.Arrays;
import java.util.List;
+
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@@ -22,14 +14,24 @@ import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IChatComponent;
+import gregtech.GT_Mod;
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.Textures.ItemIcons;
+import gregtech.api.interfaces.IIconContainer;
+import gregtech.api.items.GT_MetaGenerated_Tool;
+import gregtech.common.tools.GT_Tool;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools;
+import gtPlusPlus.xmod.gregtech.common.items.behaviours.Behaviour_Electric_Lighter;
+
public class TOOL_Gregtech_ElectricLighter extends GT_Tool {
- public static final List<String> mEffectiveList =
- Arrays.asList(new String[] {EntityIronGolem.class.getName(), "EntityTowerGuardian"});
+ public static final List<String> mEffectiveList = Arrays
+ .asList(new String[] { EntityIronGolem.class.getName(), "EntityTowerGuardian" });
@Override
- public float getNormalDamageAgainstEntity(
- final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) {
+ public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack,
+ final EntityPlayer aPlayer) {
String tName = aEntity.getClass().getName();
tName = tName.substring(tName.lastIndexOf(".") + 1);
return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage;
@@ -139,15 +141,18 @@ public class TOOL_Gregtech_ElectricLighter extends GT_Tool {
try {
GT_Mod.achievements.issueAchievement(aPlayer, "tools");
GT_Mod.achievements.issueAchievement(aPlayer, "unitool");
- } catch (final Exception e) {
- }
+ } catch (final Exception e) {}
}
@Override
public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE
- + " has been burnt out of existence by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName()
- + EnumChatFormatting.WHITE);
+ return new ChatComponentText(
+ EnumChatFormatting.RED + aEntity.getCommandSenderName()
+ + EnumChatFormatting.WHITE
+ + " has been burnt out of existence by "
+ + EnumChatFormatting.GREEN
+ + aPlayer.getCommandSenderName()
+ + EnumChatFormatting.WHITE);
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricSnips.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricSnips.java
index ae477cd7bb..9586896fc9 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricSnips.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricSnips.java
@@ -1,12 +1,5 @@
package gtPlusPlus.xmod.gregtech.common.tools;
-import gregtech.GT_Mod;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.Textures.ItemIcons;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.common.tools.GT_Tool_WireCutter;
-import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
@@ -15,6 +8,14 @@ import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IChatComponent;
+import gregtech.GT_Mod;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.Textures.ItemIcons;
+import gregtech.api.interfaces.IIconContainer;
+import gregtech.api.items.GT_MetaGenerated_Tool;
+import gregtech.common.tools.GT_Tool_WireCutter;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools;
+
public class TOOL_Gregtech_ElectricSnips extends GT_Tool_WireCutter {
@Override
@@ -77,14 +78,17 @@ public class TOOL_Gregtech_ElectricSnips extends GT_Tool_WireCutter {
try {
GT_Mod.achievements.issueAchievement(aPlayer, "tools");
GT_Mod.achievements.issueAchievement(aPlayer, "unitool");
- } catch (final Exception e) {
- }
+ } catch (final Exception e) {}
}
@Override
public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE
- + " has been Snipped out of existence by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName()
- + EnumChatFormatting.WHITE);
+ return new ChatComponentText(
+ EnumChatFormatting.RED + aEntity.getCommandSenderName()
+ + EnumChatFormatting.WHITE
+ + " has been Snipped out of existence by "
+ + EnumChatFormatting.GREEN
+ + aPlayer.getCommandSenderName()
+ + EnumChatFormatting.WHITE);
}
}