aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common
diff options
context:
space:
mode:
authorboubou19 <miisterunknown@gmail.com>2023-04-01 18:11:43 +0200
committerGitHub <noreply@github.com>2023-04-01 18:11:43 +0200
commit5f50e4a36ec000657b0a1664784acf00275293c6 (patch)
tree5ef81441032735438c9fd9c620224ca58e46e537 /src/main/java/gregtech/common
parent6b77557e0e87cf5afd9ebd3985323ff1249e615c (diff)
downloadGT5-Unofficial-5f50e4a36ec000657b0a1664784acf00275293c6.tar.gz
GT5-Unofficial-5f50e4a36ec000657b0a1664784acf00275293c6.tar.bz2
GT5-Unofficial-5f50e4a36ec000657b0a1664784acf00275293c6.zip
update spotless formatting (#1827)
Diffstat (limited to 'src/main/java/gregtech/common')
-rw-r--r--src/main/java/gregtech/common/GT_Client.java136
-rw-r--r--src/main/java/gregtech/common/GT_Network.java51
-rw-r--r--src/main/java/gregtech/common/GT_Pollution.java18
-rw-r--r--src/main/java/gregtech/common/GT_Proxy.java576
-rw-r--r--src/main/java/gregtech/common/GT_RecipeAdder.java148
-rw-r--r--src/main/java/gregtech/common/GT_ThaumcraftCompat.java8
-rw-r--r--src/main/java/gregtech/common/GT_UndergroundOil.java29
-rw-r--r--src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java263
-rw-r--r--src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java22
-rw-r--r--src/main/java/gregtech/common/GT_Worldgen_Stone.java44
-rw-r--r--src/main/java/gregtech/common/GT_Worldgenerator.java45
-rw-r--r--src/main/java/gregtech/common/bees/GT_AlleleHelper.java79
-rw-r--r--src/main/java/gregtech/common/bees/GT_Bee_Mutation.java3
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Casings1.java5
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Casings2.java4
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Casings4.java10
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Casings8.java10
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Casings9.java5
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Casings_Abstract.java4
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Machines.java36
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Ores.java20
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java6
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java109
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Storage.java4
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Item_Casings5.java10
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Item_Casings_Abstract.java60
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Item_Concretes.java5
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Item_LongDistancePipe.java10
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Item_Machines.java19
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Item_Ores.java4
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Item_Stones_Abstract.java5
-rw-r--r--src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java47
-rw-r--r--src/main/java/gregtech/common/covers/CoverInfo.java31
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Arm.java207
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java99
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java157
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java59
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Drain.java43
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java92
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java124
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_FluidLimiter.java18
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java303
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_FluidStorageMonitor.java32
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java191
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java59
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java120
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java108
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java150
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java73
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Pump.java177
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java5
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java65
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Shutter.java93
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java19
-rw-r--r--src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneReceiverBase.java92
-rw-r--r--src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterBase.java10
-rw-r--r--src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedWirelessRedstoneBase.java92
-rw-r--r--src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessFluidDetector.java14
-rw-r--r--src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessItemDetector.java68
-rw-r--r--src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessMaintenanceDetector.java11
-rw-r--r--src/main/java/gregtech/common/entities/GT_Entity_Arrow.java91
-rw-r--r--src/main/java/gregtech/common/fluid/GT_Fluid.java7
-rw-r--r--src/main/java/gregtech/common/gui/modularui/UIHelper.java20
-rw-r--r--src/main/java/gregtech/common/gui/modularui/uifactory/SelectItemUIFactory.java44
-rw-r--r--src/main/java/gregtech/common/gui/modularui/widget/CoverCycleButtonWidget.java21
-rw-r--r--src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_ToggleButtonWidget.java15
-rw-r--r--src/main/java/gregtech/common/gui/modularui/widget/FluidDisplaySlotWidget.java8
-rw-r--r--src/main/java/gregtech/common/items/CombType.java10
-rw-r--r--src/main/java/gregtech/common/items/DropType.java5
-rw-r--r--src/main/java/gregtech/common/items/GT_FluidDisplayItem.java20
-rw-r--r--src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java26
-rw-r--r--src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java230
-rw-r--r--src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java39
-rw-r--r--src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java142
-rw-r--r--src/main/java/gregtech/common/items/GT_MetaGenerated_Item_98.java7
-rw-r--r--src/main/java/gregtech/common/items/GT_MetaGenerated_Item_99.java4
-rw-r--r--src/main/java/gregtech/common/items/GT_NeutronReflector_Item.java11
-rw-r--r--src/main/java/gregtech/common/items/GT_VolumetricFlask.java52
-rw-r--r--src/main/java/gregtech/common/items/ItemComb.java10
-rw-r--r--src/main/java/gregtech/common/items/PollenType.java5
-rw-r--r--src/main/java/gregtech/common/items/PropolisType.java5
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_Cover_Tool.java11
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java6
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_Hoe.java13
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_Lighter.java15
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Essentia.java5
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Fluid.java15
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Item.java15
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java16
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_Scanner.java5
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_Scoop.java22
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_Sense.java5
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_SoftHammer.java75
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_Spray_Color.java10
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_Wrench.java7
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_WrittenBook.java3
-rw-r--r--src/main/java/gregtech/common/misc/GT_Command.java29
-rw-r--r--src/main/java/gregtech/common/misc/GT_DrillingLogicDelegate.java63
-rw-r--r--src/main/java/gregtech/common/misc/spaceprojects/SpaceProjectManager.java21
-rw-r--r--src/main/java/gregtech/common/misc/spaceprojects/SpaceProjectWorldSavedData.java107
-rw-r--r--src/main/java/gregtech/common/misc/spaceprojects/base/SP_Upgrade.java24
-rw-r--r--src/main/java/gregtech/common/misc/spaceprojects/base/SpaceProject.java19
-rw-r--r--src/main/java/gregtech/common/misc/spaceprojects/commands/SPM_Command.java18
-rw-r--r--src/main/java/gregtech/common/misc/spaceprojects/commands/SP_Command.java4
-rw-r--r--src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Randomizer.java5
-rw-r--r--src/main/java/gregtech/common/render/GT_CapeRenderer.java37
-rw-r--r--src/main/java/gregtech/common/render/GT_CopiedBlockTexture.java12
-rw-r--r--src/main/java/gregtech/common/render/GT_CopiedCTMBlockTexture.java39
-rw-r--r--src/main/java/gregtech/common/render/GT_FlaskRenderer.java6
-rw-r--r--src/main/java/gregtech/common/render/GT_FluidDisplayStackRenderer.java9
-rw-r--r--src/main/java/gregtech/common/render/GT_MetaGenerated_Tool_Renderer.java10
-rw-r--r--src/main/java/gregtech/common/render/GT_PollutionRenderer.java4
-rw-r--r--src/main/java/gregtech/common/render/GT_RenderedTexture.java23
-rw-r--r--src/main/java/gregtech/common/render/GT_Renderer_Block.java43
-rw-r--r--src/main/java/gregtech/common/render/GT_TextureBuilder.java6
-rw-r--r--src/main/java/gregtech/common/render/items/GT_GeneratedItem_Renderer.java6
-rw-r--r--src/main/java/gregtech/common/render/items/GT_GeneratedMaterial_Renderer.java3
-rw-r--r--src/main/java/gregtech/common/render/items/InfinityRenderer.java3
-rw-r--r--src/main/java/gregtech/common/render/items/UniversiumRenderer.java19
-rw-r--r--src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java10
-rw-r--r--src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java98
-rw-r--r--src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java10
-rw-r--r--src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_RecipeFilter.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java53
-rw-r--r--src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java12
-rw-r--r--src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java9
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java120
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java122
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java140
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java15
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java10
-rw-r--r--src/main/java/gregtech/common/tileentities/casings/upgrade/InventoryUpgrade.java21
-rw-r--r--src/main/java/gregtech/common/tileentities/debug/GT_MetaTileEntity_AdvDebugStructureWriter.java162
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java57
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java56
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java20
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java50
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java104
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java60
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java25
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java56
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java15
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java15
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java10
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java15
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_InputBus_ME.java177
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java45
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java30
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java91
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java52
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java15
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java175
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java423
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java52
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java79
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java87
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java22
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java48
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Printer.java4
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java45
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java54
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java40
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java142
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java108
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java147
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineBase.java12
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineFluid.java6
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineItem.java6
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java321
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java31
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java66
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java111
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java53
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java114
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java213
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java120
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java174
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java71
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java316
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java40
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java40
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java40
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java181
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java58
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java346
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java130
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java155
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java68
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java41
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_GasAdvanced.java40
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java45
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java62
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java46
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java122
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_NanoForge.java259
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java191
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java75
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillInfinite.java26
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java68
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java1144
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java254
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java233
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java147
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java136
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_TranscendentPlasmaMixer.java89
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java48
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multiblock/MultiBlock_CokeOven.java58
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multiblock/MultiBlock_Macerator.java144
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java72
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java72
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java68
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java68
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java64
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java64
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java60
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java60
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java56
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java60
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java91
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java90
-rw-r--r--src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java69
-rw-r--r--src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java302
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool.java4
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Axe.java8
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java8
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_LV.java9
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Crowbar.java4
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java32
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_JackHammer.java16
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Plow.java23
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Saw.java9
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java3
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Sense.java23
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Soldering_Iron.java3
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Wrench.java8
236 files changed, 10489 insertions, 5680 deletions
diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java
index 351a1aac16..9938b46ab0 100644
--- a/src/main/java/gregtech/common/GT_Client.java
+++ b/src/main/java/gregtech/common/GT_Client.java
@@ -101,17 +101,25 @@ public class GT_Client extends GT_Proxy implements Runnable {
// don't ask. these "just works"
private static final Transformation ROTATION_MARKER_TRANSFORM_CENTER = new Scale(0.5);
private static final Transformation[] ROTATION_MARKER_TRANSFORMS_SIDES_TRANSFORMS = {
- new Scale(0.25).with(new Translation(0, 0, 0.375)).compile(),
- new Scale(0.25).with(new Translation(0.375, 0, 0)).compile(),
- new Scale(0.25).with(new Translation(0, 0, -0.375)).compile(),
- new Scale(0.25).with(new Translation(-0.375, 0, 0)).compile(), };
+ new Scale(0.25).with(new Translation(0, 0, 0.375))
+ .compile(),
+ new Scale(0.25).with(new Translation(0.375, 0, 0))
+ .compile(),
+ new Scale(0.25).with(new Translation(0, 0, -0.375))
+ .compile(),
+ new Scale(0.25).with(new Translation(-0.375, 0, 0))
+ .compile(), };
private static final int[] ROTATION_MARKER_TRANSFORMS_SIDES = { -1, -1, 2, 0, 3, 1, -1, -1, 0, 2, 3, 1, 0, 2, -1,
-1, 3, 1, 2, 0, -1, -1, 3, 1, 1, 3, 2, 0, -1, -1, 3, 1, 2, 0, -1, -1 };
private static final Transformation[] ROTATION_MARKER_TRANSFORMS_CORNER = {
- new Scale(0.25).with(new Translation(0.375, 0, 0.375)).compile(),
- new Scale(0.25).with(new Translation(-0.375, 0, 0.375)).compile(),
- new Scale(0.25).with(new Translation(0.375, 0, -0.375)).compile(),
- new Scale(0.25).with(new Translation(-0.375, 0, -0.375)).compile(), };
+ new Scale(0.25).with(new Translation(0.375, 0, 0.375))
+ .compile(),
+ new Scale(0.25).with(new Translation(-0.375, 0, 0.375))
+ .compile(),
+ new Scale(0.25).with(new Translation(0.375, 0, -0.375))
+ .compile(),
+ new Scale(0.25).with(new Translation(-0.375, 0, -0.375))
+ .compile(), };
private static int rotationMarkerDisplayList;
private static boolean rotationMarkerDisplayListCompiled = false;
@@ -314,8 +322,10 @@ public class GT_Client extends GT_Proxy implements Runnable {
GL11.glVertex3d(+.25D, .0D, +.50D);
GL11.glVertex3d(-.25D, .0D, -.50D);
GL11.glVertex3d(-.25D, .0D, +.50D);
- final TileEntity tTile = aEvent.player.worldObj
- .getTileEntity(aEvent.target.blockX, aEvent.target.blockY, aEvent.target.blockZ);
+ final TileEntity tTile = aEvent.player.worldObj.getTileEntity(
+ aEvent.target.blockX,
+ aEvent.target.blockY,
+ aEvent.target.blockZ);
// draw connection indicators
byte tConnections = 0;
@@ -392,17 +402,19 @@ public class GT_Client extends GT_Proxy implements Runnable {
final ForgeDirection direction = tAlignment.getDirection();
if (direction.ordinal() == tSideHit)
drawExtendedRotationMarker(ROTATION_MARKER_TRANSFORM_CENTER, aIsSneaking, false);
- else if (direction.getOpposite().ordinal() == tSideHit) {
- for (Transformation t : ROTATION_MARKER_TRANSFORMS_CORNER) {
- drawExtendedRotationMarker(t, aIsSneaking, true);
- }
- } else {
- drawExtendedRotationMarker(
- ROTATION_MARKER_TRANSFORMS_SIDES_TRANSFORMS[ROTATION_MARKER_TRANSFORMS_SIDES[tSideHit * 6
- + direction.ordinal()]],
- aIsSneaking,
- true);
- }
+ else if (direction.getOpposite()
+ .ordinal()
+ == tSideHit) {
+ for (Transformation t : ROTATION_MARKER_TRANSFORMS_CORNER) {
+ drawExtendedRotationMarker(t, aIsSneaking, true);
+ }
+ } else {
+ drawExtendedRotationMarker(
+ ROTATION_MARKER_TRANSFORMS_SIDES_TRANSFORMS[ROTATION_MARKER_TRANSFORMS_SIDES[tSideHit
+ * 6 + direction.ordinal()]],
+ aIsSneaking,
+ true);
+ }
}
}
GL11.glPopMatrix(); // get back to player center
@@ -518,8 +530,10 @@ public class GT_Client extends GT_Proxy implements Runnable {
super.onPreLoad();
MinecraftForge.EVENT_BUS.register(new ExtraIcons());
- Minecraft.getMinecraft().getResourcePackRepository().rprMetadataSerializer
- .registerMetadataSectionType(new ColorsMetadataSectionSerializer(), ColorsMetadataSection.class);
+ Minecraft.getMinecraft()
+ .getResourcePackRepository().rprMetadataSerializer.registerMetadataSectionType(
+ new ColorsMetadataSectionSerializer(),
+ ColorsMetadataSection.class);
new GT_MetaTileEntity_AdvDebugStructureWriter.ForgeEventHandler();
@@ -580,7 +594,8 @@ public class GT_Client extends GT_Proxy implements Runnable {
for (int i = 1; i < GregTech_API.METATILEENTITIES.length; i++) {
try {
if (GregTech_API.METATILEENTITIES[i] != null) {
- GregTech_API.METATILEENTITIES[i].getStackForm(1L).getTooltip(null, true);
+ GregTech_API.METATILEENTITIES[i].getStackForm(1L)
+ .getTooltip(null, true);
GT_Log.out.println("META " + i + " " + GregTech_API.METATILEENTITIES[i].getMetaName());
}
} catch (Throwable e) {
@@ -594,16 +609,19 @@ public class GT_Client extends GT_Proxy implements Runnable {
// reobf doesn't work with lambda, so this must be a class
// noinspection Convert2Lambda
- ((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager())
- .registerReloadListener(new IResourceManagerReloadListener() {
-
- @Override
- public void onResourceManagerReload(IResourceManager l) {
- GT_GUIColorOverride.onResourceManagerReload();
- FallbackableSteamTexture.reload();
- GregTech_API.sCoverBehaviors.values().forEach(GT_CoverBehaviorBase::reloadColorOverride);
- }
- });
+ ((IReloadableResourceManager) Minecraft.getMinecraft()
+ .getResourceManager()).registerReloadListener(
+ new IResourceManagerReloadListener() {
+
+ @Override
+ public void onResourceManagerReload(IResourceManager l) {
+ GT_GUIColorOverride.onResourceManagerReload();
+ FallbackableSteamTexture.reload();
+ GregTech_API.sCoverBehaviors.values()
+ .forEach(
+ GT_CoverBehaviorBase::reloadColorOverride);
+ }
+ });
}
@Override
@@ -611,7 +629,9 @@ public class GT_Client extends GT_Proxy implements Runnable {
GT_Log.out.println("GT_Mod: Downloading Cape List.");
try (final Scanner tScanner = new Scanner(new URL(GT_CAPE_LIST_URL).openStream())) {
while (tScanner.hasNextLine()) {
- this.mCapeList.add(tScanner.nextLine().toLowerCase());
+ this.mCapeList.add(
+ tScanner.nextLine()
+ .toLowerCase());
}
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
@@ -619,7 +639,8 @@ public class GT_Client extends GT_Proxy implements Runnable {
GT_Log.out.println("GT New Horizons: Downloading Cape List.");
try (final Scanner tScanner = new Scanner(new URL(GTNH_CAPE_LIST_URL).openStream())) {
while (tScanner.hasNextLine()) {
- final String tName = tScanner.nextLine().toLowerCase();
+ final String tName = tScanner.nextLine()
+ .toLowerCase();
if (tName.contains(":")) {
if (!this.mCapeList.contains(tName.substring(0, tName.indexOf(":")))) {
this.mCapeList.add(tName);
@@ -659,7 +680,8 @@ public class GT_Client extends GT_Proxy implements Runnable {
mFirstTick = false;
GT_Values.NW.sendToServer(new GT_Packet_ClientPreference(mPreference));
- if (!Minecraft.getMinecraft().isSingleplayer()) {
+ if (!Minecraft.getMinecraft()
+ .isSingleplayer()) {
// Check for more IC2 recipes to also catch MineTweaker additions
GT_ModHandler.addIC2RecipesToGT(
GT_ModHandler.getMaceratorRecipeList(),
@@ -701,7 +723,7 @@ public class GT_Client extends GT_Proxy implements Runnable {
}
}
for (Iterator<Map.Entry<GT_PlayedSound, Integer>> iterator = GT_Utility.sPlayedSoundMap.entrySet()
- .iterator(); iterator.hasNext();) {
+ .iterator(); iterator.hasNext();) {
Map.Entry<GT_PlayedSound, Integer> tEntry = iterator.next();
if (tEntry.getValue() < 0) {
iterator.remove();
@@ -718,8 +740,10 @@ public class GT_Client extends GT_Proxy implements Runnable {
mLastUpdatedBlockX = trace.blockX;
mLastUpdatedBlockY = trace.blockY;
mLastUpdatedBlockZ = trace.blockZ;
- final TileEntity tileEntity = aEvent.player.worldObj
- .getTileEntity(trace.blockX, trace.blockY, trace.blockZ);
+ final TileEntity tileEntity = aEvent.player.worldObj.getTileEntity(
+ trace.blockX,
+ trace.blockY,
+ trace.blockZ);
if (tileEntity instanceof IGregTechTileEntity) {
final IGregTechTileEntity gtTile = (IGregTechTileEntity) tileEntity;
if (gtTile.getMetaTileEntity() instanceof IHasFluidDisplayItem) {
@@ -749,10 +773,14 @@ public class GT_Client extends GT_Proxy implements Runnable {
@SubscribeEvent
public void onDrawBlockHighlight(DrawBlockHighlightEvent aEvent) {
- final Block aBlock = aEvent.player.worldObj
- .getBlock(aEvent.target.blockX, aEvent.target.blockY, aEvent.target.blockZ);
- final TileEntity aTileEntity = aEvent.player.worldObj
- .getTileEntity(aEvent.target.blockX, aEvent.target.blockY, aEvent.target.blockZ);
+ final Block aBlock = aEvent.player.worldObj.getBlock(
+ aEvent.target.blockX,
+ aEvent.target.blockY,
+ aEvent.target.blockZ);
+ final TileEntity aTileEntity = aEvent.player.worldObj.getTileEntity(
+ aEvent.target.blockX,
+ aEvent.target.blockY,
+ aEvent.target.blockZ);
if (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sWrenchList)) {
if (aTileEntity instanceof ITurnable || ROTATABLE_VANILLA_BLOCKS.contains(aBlock)
@@ -975,11 +1003,20 @@ public class GT_Client extends GT_Proxy implements Runnable {
}
if (tString.startsWith("streaming.")) {
new WorldSpawnedEventBuilder.RecordEffectEventBuilder().setIdentifier(tString.substring(10))
- .setPosition(aX, aY, aZ).run();
+ .setPosition(aX, aY, aZ)
+ .run();
} else {
- new WorldSpawnedEventBuilder.SoundEventBuilder().setVolume(3f).setPitch(
- tString.startsWith("note.") ? (float) Math.pow(2D, (double) (aStack.stackSize - 13) / 12D) : 1.0F)
- .setIdentifier(tString).setPosition(aX, aY, aZ).run();
+ new WorldSpawnedEventBuilder.SoundEventBuilder().setVolume(3f)
+ .setPitch(
+ tString.startsWith("note.")
+ ? (float) Math.pow(
+ 2D,
+ (double) (aStack.stackSize - 13)
+ / 12D)
+ : 1.0F)
+ .setIdentifier(tString)
+ .setPosition(aX, aY, aZ)
+ .run();
}
}
@@ -1005,7 +1042,8 @@ public class GT_Client extends GT_Proxy implements Runnable {
final int[] ids = OreDictionary.getOreIDs(tCurrentItem);
int hide = 0;
for (int i : ids) {
- if (OreDictionary.getOreName(i).equals("craftingToolSolderingIron")) {
+ if (OreDictionary.getOreName(i)
+ .equals("craftingToolSolderingIron")) {
hide |= 0x1;
break;
}
diff --git a/src/main/java/gregtech/common/GT_Network.java b/src/main/java/gregtech/common/GT_Network.java
index 77a7e3477e..665439dbd8 100644
--- a/src/main/java/gregtech/common/GT_Network.java
+++ b/src/main/java/gregtech/common/GT_Network.java
@@ -74,15 +74,23 @@ public class GT_Network extends MessageToMessageCodec<FMLProxyPacket, GT_Packet>
@Override
protected void encode(ChannelHandlerContext aContext, GT_Packet aPacket, List<Object> aOutput) throws Exception {
- final ByteBuf tBuf = Unpooled.buffer().writeByte(aPacket.getPacketID());
+ final ByteBuf tBuf = Unpooled.buffer()
+ .writeByte(aPacket.getPacketID());
aPacket.encode(tBuf);
- aOutput.add(new FMLProxyPacket(tBuf, aContext.channel().attr(NetworkRegistry.FML_CHANNEL).get()));
+ aOutput.add(
+ new FMLProxyPacket(
+ tBuf,
+ aContext.channel()
+ .attr(NetworkRegistry.FML_CHANNEL)
+ .get()));
}
@Override
protected void decode(ChannelHandlerContext aContext, FMLProxyPacket aPacket, List<Object> aOutput)
throws Exception {
- final ByteArrayDataInput aData = ByteStreams.newDataInput(aPacket.payload().array());
+ final ByteArrayDataInput aData = ByteStreams.newDataInput(
+ aPacket.payload()
+ .array());
final GT_Packet tPacket = this.mSubChannels[aData.readByte()].decode(aData);
tPacket.setINetHandler(aPacket.handler());
aOutput.add(tPacket);
@@ -98,25 +106,35 @@ public class GT_Network extends MessageToMessageCodec<FMLProxyPacket, GT_Packet>
GT_FML_LOGGER.info("player null");
return;
}
- this.mChannel.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET)
- .set(FMLOutboundHandler.OutboundTarget.PLAYER);
- this.mChannel.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(aPlayer);
- this.mChannel.get(Side.SERVER).writeAndFlush(aPacket);
+ this.mChannel.get(Side.SERVER)
+ .attr(FMLOutboundHandler.FML_MESSAGETARGET)
+ .set(FMLOutboundHandler.OutboundTarget.PLAYER);
+ this.mChannel.get(Side.SERVER)
+ .attr(FMLOutboundHandler.FML_MESSAGETARGETARGS)
+ .set(aPlayer);
+ this.mChannel.get(Side.SERVER)
+ .writeAndFlush(aPacket);
}
@Override
public void sendToAllAround(GT_Packet aPacket, NetworkRegistry.TargetPoint aPosition) {
- this.mChannel.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET)
- .set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT);
- this.mChannel.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(aPosition);
- this.mChannel.get(Side.SERVER).writeAndFlush(aPacket);
+ this.mChannel.get(Side.SERVER)
+ .attr(FMLOutboundHandler.FML_MESSAGETARGET)
+ .set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT);
+ this.mChannel.get(Side.SERVER)
+ .attr(FMLOutboundHandler.FML_MESSAGETARGETARGS)
+ .set(aPosition);
+ this.mChannel.get(Side.SERVER)
+ .writeAndFlush(aPacket);
}
@Override
public void sendToServer(GT_Packet aPacket) {
- this.mChannel.get(Side.CLIENT).attr(FMLOutboundHandler.FML_MESSAGETARGET)
- .set(FMLOutboundHandler.OutboundTarget.TOSERVER);
- this.mChannel.get(Side.CLIENT).writeAndFlush(aPacket);
+ this.mChannel.get(Side.CLIENT)
+ .attr(FMLOutboundHandler.FML_MESSAGETARGET)
+ .set(FMLOutboundHandler.OutboundTarget.TOSERVER);
+ this.mChannel.get(Side.CLIENT)
+ .writeAndFlush(aPacket);
}
@Override
@@ -128,8 +146,9 @@ public class GT_Network extends MessageToMessageCodec<FMLProxyPacket, GT_Packet>
}
EntityPlayerMP tPlayer = (EntityPlayerMP) tObject;
Chunk tChunk = aWorld.getChunkFromBlockCoords(aX, aZ);
- if (tPlayer.getServerForPlayer().getPlayerManager()
- .isPlayerWatchingChunk(tPlayer, tChunk.xPosition, tChunk.zPosition)) {
+ if (tPlayer.getServerForPlayer()
+ .getPlayerManager()
+ .isPlayerWatchingChunk(tPlayer, tChunk.xPosition, tChunk.zPosition)) {
sendToPlayer(aPacket, tPlayer);
}
}
diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java
index 12ea4650e9..ad2da33259 100644
--- a/src/main/java/gregtech/common/GT_Pollution.java
+++ b/src/main/java/gregtech/common/GT_Pollution.java
@@ -318,8 +318,7 @@ public class GT_Pollution {
if (iMetaTileEntity instanceof IMachineCallback) {
if (((IMachineCallback) iMetaTileEntity).getCallbackBase() instanceof GT_MetaTileEntity_Cleanroom) {
if (aPollution > 0) {
- ((GT_MetaTileEntity_Cleanroom) ((IMachineCallback) iMetaTileEntity).getCallbackBase())
- .doMaintenanceIssue();
+ ((GT_MetaTileEntity_Cleanroom) ((IMachineCallback) iMetaTileEntity).getCallbackBase()).doMaintenanceIssue();
}
}
}
@@ -384,7 +383,8 @@ public class GT_Pollution {
if (w.isRemote)
// it really should be querying the client side stuff instead
return GT_PollutionRenderer.getKnownPollution(chunkX << 4, chunkZ << 4);
- return STORAGE.get(w, chunkX, chunkZ).getAmount();
+ return STORAGE.get(w, chunkX, chunkZ)
+ .getAmount();
}
@Deprecated
@@ -394,7 +394,9 @@ public class GT_Pollution {
public static boolean hasPollution(Chunk ch) {
if (!GT_Mod.gregtechproxy.mPollution) return false;
- return STORAGE.isCreated(ch.worldObj, ch.getChunkCoordIntPair()) && STORAGE.get(ch).getAmount() > 0;
+ return STORAGE.isCreated(ch.worldObj, ch.getChunkCoordIntPair()) && STORAGE.get(ch)
+ .getAmount()
+ > 0;
}
// Add compatibility with old code
@@ -406,7 +408,10 @@ public class GT_Pollution {
}
static void migrate(ChunkDataEvent.Load e) {
- addPollution(e.getChunk(), e.getData().getInteger("GTPOLLUTION"));
+ addPollution(
+ e.getChunk(),
+ e.getData()
+ .getInteger("GTPOLLUTION"));
}
public static class GT_PollutionEventHandler {
@@ -416,7 +421,8 @@ public class GT_Pollution {
if (!GT_Mod.gregtechproxy.mPollution) return;
World world = event.player.worldObj;
if (STORAGE.isCreated(world, event.chunk)) {
- int pollution = STORAGE.get(world, event.chunk).getAmount();
+ int pollution = STORAGE.get(world, event.chunk)
+ .getAmount();
if (pollution > POLLUTIONPACKET_MINVALUE)
GT_Values.NW.sendToPlayer(new GT_Packet_Pollution(event.chunk, pollution), event.player);
}
diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java
index 401b1395d5..30de62084a 100644
--- a/src/main/java/gregtech/common/GT_Proxy.java
+++ b/src/main/java/gregtech/common/GT_Proxy.java
@@ -748,18 +748,24 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
GameRegistry.registerFuelHandler(this);
MinecraftForge.EVENT_BUS.register(this);
MinecraftForge.ORE_GEN_BUS.register(this);
- FMLCommonHandler.instance().bus().register(this);
- GregTech_API.sThaumcraftCompat = (IThaumcraftCompat) GT_Utility
- .callConstructor("gregtech.common.GT_ThaumcraftCompat", 0, null, GT_Values.D1, new Object[0]);
- for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry
- .getRegisteredFluidContainerData()) {
+ FMLCommonHandler.instance()
+ .bus()
+ .register(this);
+ GregTech_API.sThaumcraftCompat = (IThaumcraftCompat) GT_Utility.callConstructor(
+ "gregtech.common.GT_ThaumcraftCompat",
+ 0,
+ null,
+ GT_Values.D1,
+ new Object[0]);
+ for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) {
onFluidContainerRegistration(new FluidContainerRegistry.FluidContainerRegisterEvent(tData));
}
try {
for (String tOreName : OreDictionary.getOreNames()) {
ItemStack tOreStack;
- for (Iterator i$ = OreDictionary.getOres(tOreName).iterator(); i$
- .hasNext(); registerOre(new OreDictionary.OreRegisterEvent(tOreName, tOreStack))) {
+ for (Iterator i$ = OreDictionary.getOres(tOreName)
+ .iterator(); i$.hasNext(); registerOre(
+ new OreDictionary.OreRegisterEvent(tOreName, tOreStack))) {
tOreStack = (ItemStack) i$.next();
}
}
@@ -776,8 +782,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
this.mIgnoreTcon = GregTech_API.sOPStuff.get(ConfigCategories.general, "ignoreTConstruct", true);
this.mWireHeatingTicks = GregTech_API.sOPStuff.get(ConfigCategories.general, "WireHeatingTicks", 4);
NetworkRegistry.INSTANCE.registerGuiHandler(GT_Values.GT, this);
- for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry
- .getRegisteredFluidContainerData()) {
+ for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) {
if ((tData.filledContainer.getItem() == Items.potionitem) && (tData.filledContainer.getItemDamage() == 0)) {
tData.fluid.amount = 0;
break;
@@ -872,8 +877,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
ItemList.IC2_Hops.set(GT_ModHandler.getIC2Item("hops", 1L));
ItemList.IC2_Resin.set(GT_ModHandler.getIC2Item("resin", 1L));
ItemList.IC2_Plantball.set(GT_ModHandler.getIC2Item("plantBall", 1L));
- ItemList.IC2_PlantballCompressed
- .set(GT_ModHandler.getIC2Item("compressedPlantBall", 1L, ItemList.IC2_Plantball.get(1L)));
+ ItemList.IC2_PlantballCompressed.set(
+ GT_ModHandler.getIC2Item("compressedPlantBall", 1L, ItemList.IC2_Plantball.get(1L)));
ItemList.IC2_Crop_Seeds.set(GT_ModHandler.getIC2Item("cropSeed", 1L));
ItemList.IC2_Grin_Powder.set(GT_ModHandler.getIC2Item("grinPowder", 1L));
ItemList.IC2_Energium_Dust.set(GT_ModHandler.getIC2Item("energiumDust", 1L));
@@ -883,8 +888,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
ItemList.IC2_Food_Can_Empty.set(GT_ModHandler.getIC2Item("tinCan", 1L));
ItemList.IC2_Food_Can_Filled.set(GT_ModHandler.getIC2Item("filledTinCan", 1L, 0));
ItemList.IC2_Food_Can_Spoiled.set(GT_ModHandler.getIC2Item("filledTinCan", 1L, 1));
- ItemList.IC2_Industrial_Diamond
- .set(GT_ModHandler.getIC2Item("industrialDiamond", 1L, new ItemStack(Items.diamond, 1)));
+ ItemList.IC2_Industrial_Diamond.set(
+ GT_ModHandler.getIC2Item("industrialDiamond", 1L, new ItemStack(Items.diamond, 1)));
ItemList.IC2_Compressed_Coal_Ball.set(GT_ModHandler.getIC2Item("compressedCoalBall", 1L));
ItemList.IC2_Compressed_Coal_Chunk.set(GT_ModHandler.getIC2Item("coalChunk", 1L));
ItemList.IC2_ShaftIron.set(GT_ModHandler.getIC2Item("ironshaft", 1L));
@@ -960,40 +965,40 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getIC2Item("hazmatChestplate", 1L, 32767));
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getIC2Item("hazmatLeggings", 1L, 32767));
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getIC2Item("hazmatBoots", 1L, 32767));
- GT_ModHandler.sNonReplaceableItems
- .add(GT_ModHandler.getModItem(Railcraft.modID, "part.turbine.disk", 1L, 32767));
- GT_ModHandler.sNonReplaceableItems
- .add(GT_ModHandler.getModItem(Railcraft.modID, "part.turbine.blade", 1L, 32767));
- GT_ModHandler.sNonReplaceableItems
- .add(GT_ModHandler.getModItem(Railcraft.modID, "part.turbine.rotor", 1L, 32767));
- GT_ModHandler.sNonReplaceableItems
- .add(GT_ModHandler.getModItem(Railcraft.modID, "borehead.diamond", 1L, 32767));
+ GT_ModHandler.sNonReplaceableItems.add(
+ GT_ModHandler.getModItem(Railcraft.modID, "part.turbine.disk", 1L, 32767));
+ GT_ModHandler.sNonReplaceableItems.add(
+ GT_ModHandler.getModItem(Railcraft.modID, "part.turbine.blade", 1L, 32767));
+ GT_ModHandler.sNonReplaceableItems.add(
+ GT_ModHandler.getModItem(Railcraft.modID, "part.turbine.rotor", 1L, 32767));
+ GT_ModHandler.sNonReplaceableItems.add(
+ GT_ModHandler.getModItem(Railcraft.modID, "borehead.diamond", 1L, 32767));
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(Railcraft.modID, "borehead.steel", 1L, 32767));
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(Railcraft.modID, "borehead.iron", 1L, 32767));
- GT_ModHandler.sNonReplaceableItems
- .add(GT_ModHandler.getModItem(TwilightForest.modID, "item.plateNaga", 1L, 32767));
- GT_ModHandler.sNonReplaceableItems
- .add(GT_ModHandler.getModItem(TwilightForest.modID, "item.legsNaga", 1L, 32767));
- GT_ModHandler.sNonReplaceableItems
- .add(GT_ModHandler.getModItem(TwilightForest.modID, "item.arcticHelm", 1L, 32767));
- GT_ModHandler.sNonReplaceableItems
- .add(GT_ModHandler.getModItem(TwilightForest.modID, "item.arcticPlate", 1L, 32767));
- GT_ModHandler.sNonReplaceableItems
- .add(GT_ModHandler.getModItem(TwilightForest.modID, "item.arcticLegs", 1L, 32767));
- GT_ModHandler.sNonReplaceableItems
- .add(GT_ModHandler.getModItem(TwilightForest.modID, "item.arcticBoots", 1L, 32767));
- GT_ModHandler.sNonReplaceableItems
- .add(GT_ModHandler.getModItem(TwilightForest.modID, "item.yetiHelm", 1L, 32767));
- GT_ModHandler.sNonReplaceableItems
- .add(GT_ModHandler.getModItem(TwilightForest.modID, "item.yetiPlate", 1L, 32767));
- GT_ModHandler.sNonReplaceableItems
- .add(GT_ModHandler.getModItem(TwilightForest.modID, "item.yetiLegs", 1L, 32767));
- GT_ModHandler.sNonReplaceableItems
- .add(GT_ModHandler.getModItem(TwilightForest.modID, "item.yetiBoots", 1L, 32767));
- GT_ModHandler.sNonReplaceableItems
- .add(GT_ModHandler.getModItem("appliedenergistics2", "item.ToolCertusQuartzCuttingKnife", 1L, 32767));
- GT_ModHandler.sNonReplaceableItems
- .add(GT_ModHandler.getModItem("appliedenergistics2", "item.ToolNetherQuartzCuttingKnife", 1L, 32767));
+ GT_ModHandler.sNonReplaceableItems.add(
+ GT_ModHandler.getModItem(TwilightForest.modID, "item.plateNaga", 1L, 32767));
+ GT_ModHandler.sNonReplaceableItems.add(
+ GT_ModHandler.getModItem(TwilightForest.modID, "item.legsNaga", 1L, 32767));
+ GT_ModHandler.sNonReplaceableItems.add(
+ GT_ModHandler.getModItem(TwilightForest.modID, "item.arcticHelm", 1L, 32767));
+ GT_ModHandler.sNonReplaceableItems.add(
+ GT_ModHandler.getModItem(TwilightForest.modID, "item.arcticPlate", 1L, 32767));
+ GT_ModHandler.sNonReplaceableItems.add(
+ GT_ModHandler.getModItem(TwilightForest.modID, "item.arcticLegs", 1L, 32767));
+ GT_ModHandler.sNonReplaceableItems.add(
+ GT_ModHandler.getModItem(TwilightForest.modID, "item.arcticBoots", 1L, 32767));
+ GT_ModHandler.sNonReplaceableItems.add(
+ GT_ModHandler.getModItem(TwilightForest.modID, "item.yetiHelm", 1L, 32767));
+ GT_ModHandler.sNonReplaceableItems.add(
+ GT_ModHandler.getModItem(TwilightForest.modID, "item.yetiPlate", 1L, 32767));
+ GT_ModHandler.sNonReplaceableItems.add(
+ GT_ModHandler.getModItem(TwilightForest.modID, "item.yetiLegs", 1L, 32767));
+ GT_ModHandler.sNonReplaceableItems.add(
+ GT_ModHandler.getModItem(TwilightForest.modID, "item.yetiBoots", 1L, 32767));
+ GT_ModHandler.sNonReplaceableItems.add(
+ GT_ModHandler.getModItem("appliedenergistics2", "item.ToolCertusQuartzCuttingKnife", 1L, 32767));
+ GT_ModHandler.sNonReplaceableItems.add(
+ GT_ModHandler.getModItem("appliedenergistics2", "item.ToolNetherQuartzCuttingKnife", 1L, 32767));
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(aTextForestry, "apiaristHelmet", 1L, 32767));
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(aTextForestry, "apiaristChest", 1L, 32767));
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(aTextForestry, "apiaristLegs", 1L, 32767));
@@ -1002,10 +1007,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(aTextForestry, "frameImpregnated", 1L, 32767));
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(aTextForestry, "frameProven", 1L, 32767));
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(aTextForestry, "waxCast", 1L, 32767));
- GT_ModHandler.sNonReplaceableItems
- .add(GT_ModHandler.getModItem("GalacticraftCore", "item.sensorGlasses", 1L, 32767));
- GT_ModHandler.sNonReplaceableItems
- .add(GT_ModHandler.getModItem("IC2NuclearControl", "ItemToolThermometer", 1L, 32767));
+ GT_ModHandler.sNonReplaceableItems.add(
+ GT_ModHandler.getModItem("GalacticraftCore", "item.sensorGlasses", 1L, 32767));
+ GT_ModHandler.sNonReplaceableItems.add(
+ GT_ModHandler.getModItem("IC2NuclearControl", "ItemToolThermometer", 1L, 32767));
RecipeSorter.register(
"gregtech:shaped",
@@ -1028,16 +1033,21 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
GT_OreDictUnificator.registerOre(
"cropChilipepper",
GT_ModHandler.getModItem("magicalcrops", "magicalcrops_CropProduce", 1L, 2));
- GT_OreDictUnificator
- .registerOre("cropTomato", GT_ModHandler.getModItem("magicalcrops", "magicalcrops_CropProduce", 1L, 8));
- GT_OreDictUnificator
- .registerOre("cropGrape", GT_ModHandler.getModItem("magicalcrops", "magicalcrops_CropProduce", 1L, 4));
+ GT_OreDictUnificator.registerOre(
+ "cropTomato",
+ GT_ModHandler.getModItem("magicalcrops", "magicalcrops_CropProduce", 1L, 8));
+ GT_OreDictUnificator.registerOre(
+ "cropGrape",
+ GT_ModHandler.getModItem("magicalcrops", "magicalcrops_CropProduce", 1L, 4));
GT_OreDictUnificator.registerOre("cropTea", GT_ModHandler.getModItem("ganyssurface", "teaLeaves", 1L, 0));
// Clay buckets, which don't get registered until Iguana Tweaks pre-init
if (IguanaTweaksTinkerConstruct.isModLoaded()) {
- OrePrefixes.bucketClay.mContainerItem = GT_ModHandler
- .getModItem(IguanaTweaksTinkerConstruct.modID, "clayBucketFired", 1L, 0);
+ OrePrefixes.bucketClay.mContainerItem = GT_ModHandler.getModItem(
+ IguanaTweaksTinkerConstruct.modID,
+ "clayBucketFired",
+ 1L,
+ 0);
GT_OreDictUnificator.set(
OrePrefixes.bucketClay,
Materials.Empty,
@@ -1162,8 +1172,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
addFullHazmatToGeneralItem("EnderIO", "item.stellar_boots", 1L);
GregTech_API.sLoadStarted = true;
- for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry
- .getRegisteredFluidContainerData()) {
+ for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) {
if ((tData.filledContainer.getItem() == Items.potionitem) && (tData.filledContainer.getItemDamage() == 0)) {
tData.fluid.amount = 0;
break;
@@ -1189,10 +1198,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
GT_MetaGenerated_Item_98.init();
GT_OreDictUnificator.addItemData(new ItemStack(Items.iron_door, 1), new ItemData(Materials.Iron, 21772800L));
- GT_OreDictUnificator
- .addItemData(new ItemStack(Items.wooden_door, 1, 32767), new ItemData(Materials.Wood, 21772800L));
- for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry
- .getRegisteredFluidContainerData()) {
+ GT_OreDictUnificator.addItemData(
+ new ItemStack(Items.wooden_door, 1, 32767),
+ new ItemData(Materials.Wood, 21772800L));
+ for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) {
if ((tData.filledContainer.getItem() == Items.potionitem) && (tData.filledContainer.getItemDamage() == 0)) {
tData.fluid.amount = 0;
break;
@@ -1284,8 +1293,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
this.mUniverse = null;
this.isFirstServerWorldTick = true;
- for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry
- .getRegisteredFluidContainerData()) {
+ for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) {
if ((tData.filledContainer.getItem() == Items.potionitem) && (tData.filledContainer.getItemDamage() == 0)) {
tData.fluid.amount = 0;
break;
@@ -1310,7 +1318,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
GT_Log.out.println(
"GT_Mod: Cleaning up all OreDict Crafting Recipes, which have an empty List in them, since they are never meeting any Condition.");
- List tList = CraftingManager.getInstance().getRecipeList();
+ List tList = CraftingManager.getInstance()
+ .getRecipeList();
for (int i = 0; i < tList.size(); i++) {
if ((tList.get(i) instanceof ShapedOreRecipe)) {
for (Object tObject : ((ShapedOreRecipe) tList.get(i)).getInput()) {
@@ -1362,8 +1371,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
public void onArrowNockEvent(ArrowNockEvent aEvent) {
if ((!aEvent.isCanceled()) && (GT_Utility.isStackValid(aEvent.result))
&& (GT_Utility.getProjectile(SubTag.PROJECTILE_ARROW, aEvent.entityPlayer.inventory) != null)) {
- aEvent.entityPlayer
- .setItemInUse(aEvent.result, aEvent.result.getItem().getMaxItemUseDuration(aEvent.result));
+ aEvent.entityPlayer.setItemInUse(
+ aEvent.result,
+ aEvent.result.getItem()
+ .getMaxItemUseDuration(aEvent.result));
aEvent.setCanceled(true);
}
}
@@ -1407,8 +1418,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
aEvent.bow.getItem();
new WorldSpawnedEventBuilder.SoundAtEntityEventBuilder().setPitch(0.64893958288F + tSpeed * 0.5F)
- .setVolume(1f).setIdentifier(SoundResource.RANDOM_BOW).setEntity(aEvent.entityPlayer)
- .setWorld(aEvent.entityPlayer.worldObj).run();
+ .setVolume(1f)
+ .setIdentifier(SoundResource.RANDOM_BOW)
+ .setEntity(aEvent.entityPlayer)
+ .setWorld(aEvent.entityPlayer.worldObj)
+ .run();
tArrowEntity.canBePickedUp = 1;
if (!aEvent.entityPlayer.capabilities.isCreativeMode) {
@@ -1446,8 +1460,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
new GT_Entity_Arrow(
(EntityArrow) aEvent.entity,
OrePrefixes.arrowGtWood.mPrefixedItems.get(
- aEvent.entity.worldObj.rand
- .nextInt(OrePrefixes.arrowGtWood.mPrefixedItems.size()))));
+ aEvent.entity.worldObj.rand.nextInt(
+ OrePrefixes.arrowGtWood.mPrefixedItems.size()))));
aEvent.entity.setDead();
}
}
@@ -1570,7 +1584,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
@SubscribeEvent
public void registerOre(OreDictionary.OreRegisterEvent aEvent) {
- ModContainer tContainer = Loader.instance().activeModContainer();
+ ModContainer tContainer = Loader.instance()
+ .activeModContainer();
String aMod = tContainer == null ? "UNKNOWN" : tContainer.getModId();
String aOriginalMod = aMod;
if (GT_OreDictUnificator.isRegisteringOres()) {
@@ -1582,7 +1597,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
|| (aEvent.Ore.getItem() == null)
|| (aEvent.Name == null)
|| (aEvent.Name.isEmpty())
- || (aEvent.Name.replaceAll("_", "").length() - aEvent.Name.length() == 9)) {
+ || (aEvent.Name.replaceAll("_", "")
+ .length()
+ - aEvent.Name.length() == 9)) {
if (aOriginalMod.equals("gregtech")) {
aOriginalMod = "UNKNOWN";
}
@@ -1595,11 +1612,16 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
}
try {
aEvent.Ore.stackSize = 1;
- if (this.mIgnoreTcon || aEvent.Ore.getUnlocalizedName().startsWith("item.oreberry")) {
- if ((aOriginalMod.toLowerCase(Locale.ENGLISH).contains("xycraft"))
- || (aOriginalMod.toLowerCase(Locale.ENGLISH).contains("tconstruct"))
- || ((aOriginalMod.toLowerCase(Locale.ENGLISH).contains("natura"))
- && (!aOriginalMod.toLowerCase(Locale.ENGLISH).contains("natural")))) {
+ if (this.mIgnoreTcon || aEvent.Ore.getUnlocalizedName()
+ .startsWith("item.oreberry")) {
+ if ((aOriginalMod.toLowerCase(Locale.ENGLISH)
+ .contains("xycraft"))
+ || (aOriginalMod.toLowerCase(Locale.ENGLISH)
+ .contains("tconstruct"))
+ || ((aOriginalMod.toLowerCase(Locale.ENGLISH)
+ .contains("natura"))
+ && (!aOriginalMod.toLowerCase(Locale.ENGLISH)
+ .contains("natural")))) {
if (GT_Values.D1) {
GT_Log.ore.println(aMod + " -> " + aEvent.Name + " is getting ignored, because of racism. :P");
}
@@ -1689,8 +1711,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
GT_Log.ore.println(
tModToName
+ " is getting re-registered because the OreDict Name containing invalid spaces.");
- GT_OreDictUnificator
- .registerOre(aEvent.Name.replaceAll(" ", ""), GT_Utility.copyAmount(1L, aEvent.Ore));
+ GT_OreDictUnificator.registerOre(
+ aEvent.Name.replaceAll(" ", ""),
+ GT_Utility.copyAmount(1L, aEvent.Ore));
aEvent.Ore.setStackDisplayName("Invalid OreDictionary Tag");
return;
} else if (this.mInvalidNames.contains(aEvent.Name)) {
@@ -1701,19 +1724,25 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
OrePrefixes aPrefix = OrePrefixes.getOrePrefix(aEvent.Name);
Materials aMaterial = Materials._NULL;
if ((aPrefix == OrePrefixes.nugget) && (aMod.equals("Thaumcraft"))
- && (aEvent.Ore.getItem().getUnlocalizedName().contains("ItemResource"))) {
+ && (aEvent.Ore.getItem()
+ .getUnlocalizedName()
+ .contains("ItemResource"))) {
return;
}
if (aPrefix == null) {
- if (aEvent.Name.toLowerCase().equals(aEvent.Name)) {
+ if (aEvent.Name.toLowerCase()
+ .equals(aEvent.Name)) {
GT_Log.ore.println(tModToName + " is invalid due to being solely lowercased.");
return;
- } else if (aEvent.Name.toUpperCase().equals(aEvent.Name)) {
- GT_Log.ore.println(tModToName + " is invalid due to being solely uppercased.");
- return;
- } else if (Character.isUpperCase(aEvent.Name.charAt(0))) {
- GT_Log.ore.println(tModToName + " is invalid due to the first character being uppercased.");
- }
+ } else if (aEvent.Name.toUpperCase()
+ .equals(aEvent.Name)) {
+ GT_Log.ore.println(
+ tModToName + " is invalid due to being solely uppercased.");
+ return;
+ } else
+ if (Character.isUpperCase(aEvent.Name.charAt(0))) {
+ GT_Log.ore.println(tModToName + " is invalid due to the first character being uppercased.");
+ }
} else {
if (aPrefix.mDontUnificateActively) {
GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
@@ -1749,9 +1778,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
}
if (aMaterial != Materials._NULL) {
Materials tReRegisteredMaterial;
- for (Iterator i$ = aMaterial.mOreReRegistrations.iterator(); i$
- .hasNext(); GT_OreDictUnificator
- .registerOre(aPrefix, tReRegisteredMaterial, aEvent.Ore)) {
+ for (Iterator i$ = aMaterial.mOreReRegistrations.iterator(); i$.hasNext(); GT_OreDictUnificator.registerOre(
+ aPrefix,
+ tReRegisteredMaterial,
+ aEvent.Ore)) {
tReRegisteredMaterial = (Materials) i$.next();
}
aMaterial.add(GT_Utility.copyAmount(1L, aEvent.Ore));
@@ -1822,8 +1852,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
if (aMaterial == Materials.Tin) {
GT_OreDictUnificator.registerOre(OreDictNames.craftingWireTin, aEvent.Ore);
} else if (aMaterial == Materials.AnyCopper) {
- GT_OreDictUnificator
- .registerOre(OreDictNames.craftingWireCopper, aEvent.Ore);
+ GT_OreDictUnificator.registerOre(
+ OreDictNames.craftingWireCopper,
+ aEvent.Ore);
} else if (aMaterial == Materials.Gold) {
GT_OreDictUnificator.registerOre(OreDictNames.craftingWireGold, aEvent.Ore);
} else if (aMaterial == Materials.AnyIron) {
@@ -1834,8 +1865,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
if ((aMaterial.contains(SubTag.TRANSPARENT))
&& (aMaterial.mColor != Dyes._NULL)) {
GT_OreDictUnificator.registerOre(
- "craftingLens"
- + aMaterial.mColor.toString().replaceFirst("dye", ""),
+ "craftingLens" + aMaterial.mColor.toString()
+ .replaceFirst("dye", ""),
aEvent.Ore);
}
break;
@@ -1905,40 +1936,66 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
} else if (aMaterial == Materials.Knightmetal) {
GT_OreDictUnificator.registerOre("knightmetal", aEvent.Ore);
} else if ((aMaterial == Materials.Brass) && (aEvent.Ore.getItemDamage() == 2)
- && (aEvent.Ore.getUnlocalizedName().equals("item.ingotBrass"))
+ && (aEvent.Ore.getUnlocalizedName()
+ .equals("item.ingotBrass"))
&& (new ItemStack(aEvent.Ore.getItem(), 1, 0).getUnlocalizedName()
- .contains("red"))) {
- GT_OreDictUnificator.set(
- OrePrefixes.ingot,
- Materials.RedAlloy,
- new ItemStack(aEvent.Ore.getItem(), 1, 0));
- GT_OreDictUnificator.set(
- OrePrefixes.ingot,
- Materials.BlueAlloy,
- new ItemStack(aEvent.Ore.getItem(), 1, 1));
- GT_OreDictUnificator.set(
- OrePrefixes.ingot,
- Materials.Brass,
- new ItemStack(aEvent.Ore.getItem(), 1, 2));
- if (!mDisableIC2Cables) {
- GT_Values.RA.addWiremillRecipe(
- GT_ModHandler.getIC2Item("copperCableItem", 3L),
- new ItemStack(aEvent.Ore.getItem(), 1, 8),
- 400,
- 1);
- GT_Values.RA.addWiremillRecipe(
- GT_ModHandler.getIC2Item("ironCableItem", 6L),
- new ItemStack(aEvent.Ore.getItem(), 1, 9),
- 400,
- 2);
- }
- GT_Values.RA.addCutterRecipe(
- new ItemStack(aEvent.Ore.getItem(), 1, 3),
- new ItemStack(aEvent.Ore.getItem(), 16, 4),
- null,
- 400,
- 8);
- }
+ .contains("red"))) {
+ GT_OreDictUnificator.set(
+ OrePrefixes.ingot,
+ Materials.RedAlloy,
+ new ItemStack(
+ aEvent.Ore.getItem(),
+ 1,
+ 0));
+ GT_OreDictUnificator.set(
+ OrePrefixes.ingot,
+ Materials.BlueAlloy,
+ new ItemStack(
+ aEvent.Ore.getItem(),
+ 1,
+ 1));
+ GT_OreDictUnificator.set(
+ OrePrefixes.ingot,
+ Materials.Brass,
+ new ItemStack(
+ aEvent.Ore.getItem(),
+ 1,
+ 2));
+ if (!mDisableIC2Cables) {
+ GT_Values.RA.addWiremillRecipe(
+ GT_ModHandler.getIC2Item(
+ "copperCableItem",
+ 3L),
+ new ItemStack(
+ aEvent.Ore.getItem(),
+ 1,
+ 8),
+ 400,
+ 1);
+ GT_Values.RA.addWiremillRecipe(
+ GT_ModHandler.getIC2Item(
+ "ironCableItem",
+ 6L),
+ new ItemStack(
+ aEvent.Ore.getItem(),
+ 1,
+ 9),
+ 400,
+ 2);
+ }
+ GT_Values.RA.addCutterRecipe(
+ new ItemStack(
+ aEvent.Ore.getItem(),
+ 1,
+ 3),
+ new ItemStack(
+ aEvent.Ore.getItem(),
+ 16,
+ 4),
+ null,
+ 400,
+ 8);
+ }
break;
default:
break;
@@ -1948,7 +2005,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
}
} else {
for (Dyes tDye : Dyes.VALUES) {
- if (aEvent.Name.endsWith(tDye.name().replaceFirst("dye", ""))) {
+ if (aEvent.Name.endsWith(
+ tDye.name()
+ .replaceFirst("dye", ""))) {
GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
GT_Log.ore.println(
tModToName
@@ -2049,8 +2108,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
int size = 5;
int sizeStep = mEvents.size() / 20 - 1;
GT_Proxy.OreDictEventContainer tEvent;
- for (Iterator<GT_Proxy.OreDictEventContainer> i$ = mEvents.iterator(); i$.hasNext(); GT_Proxy
- .registerRecipes(tEvent)) {
+ for (Iterator<GT_Proxy.OreDictEventContainer> i$ = mEvents.iterator(); i$.hasNext(); GT_Proxy.registerRecipes(
+ tEvent)) {
tEvent = i$.next();
sizeStep--;
if (sizeStep == 0) {
@@ -2147,8 +2206,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
&& (((EntityLivingBase) tEntity).getHealth() > 0.0F)) {
List tList = tEntity.worldObj.getEntitiesWithinAABBExcludingEntity(
tEntity,
- tEntity.boundingBox
- .expand(0.20000000298023224D, 0.0D, 0.20000000298023224D));
+ tEntity.boundingBox.expand(
+ 0.20000000298023224D,
+ 0.0D,
+ 0.20000000298023224D));
Class tClass = tEntity.getClass();
int tEntityCount = 1;
if (tList != null) {
@@ -2361,8 +2422,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
}
private static List<String> getOreDictNames(ItemStack stack) {
- return Arrays.stream(OreDictionary.getOreIDs(stack)).mapToObj(OreDictionary::getOreName)
- .collect(Collectors.toList());
+ return Arrays.stream(OreDictionary.getOreIDs(stack))
+ .mapToObj(OreDictionary::getOreName)
+ .collect(Collectors.toList());
}
@Override
@@ -2372,8 +2434,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
}
int rFuelValue = 0;
if ((aFuel.getItem() instanceof GT_MetaGenerated_Item)) {
- final Short tFuelValue = ((GT_MetaGenerated_Item) aFuel.getItem()).mBurnValues
- .get((short) aFuel.getItemDamage());
+ final Short tFuelValue = ((GT_MetaGenerated_Item) aFuel.getItem()).mBurnValues.get(
+ (short) aFuel.getItemDamage());
if (tFuelValue != null) {
rFuelValue = Math.max(rFuelValue, tFuelValue);
}
@@ -2387,7 +2449,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
// If not check the ore dict
rFuelValue = Math.max(
rFuelValue,
- getOreDictNames(aFuel).stream().mapToInt(f -> oreDictBurnTimes.getOrDefault(f, 0)).max().orElse(0));
+ getOreDictNames(aFuel).stream()
+ .mapToInt(f -> oreDictBurnTimes.getOrDefault(f, 0))
+ .max()
+ .orElse(0));
}
// If we have something from the GT MetaGenerated_Item, ItemFuelValue, or OreDict return
@@ -2414,13 +2479,16 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
: "autogenerated";
return GT_FluidFactory.builder(aMaterial.mName.toLowerCase(Locale.ENGLISH))
- .withLocalizedName(aMaterial.mDefaultLocalName).withTextureName(fluidTexture)
- .withColorRGBA(aMaterial.mRGBa).withStateAndTemperature(LIQUID, aMaterial.getLiquidTemperature())
- .buildAndRegister().configureMaterials(aMaterial)
- .registerBContainers(
- GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L),
- ItemList.Cell_Empty.get(1L))
- .asFluid();
+ .withLocalizedName(aMaterial.mDefaultLocalName)
+ .withTextureName(fluidTexture)
+ .withColorRGBA(aMaterial.mRGBa)
+ .withStateAndTemperature(LIQUID, aMaterial.getLiquidTemperature())
+ .buildAndRegister()
+ .configureMaterials(aMaterial)
+ .registerBContainers(
+ GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L),
+ ItemList.Cell_Empty.get(1L))
+ .asFluid();
}
public Fluid addAutoGeneratedCorrespondingGas(Materials aMaterial) {
@@ -2431,13 +2499,16 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
: "autogenerated";
return GT_FluidFactory.builder(aMaterial.mName.toLowerCase(Locale.ENGLISH))
- .withLocalizedName(aMaterial.mDefaultLocalName).withTextureName(fluidTexture)
- .withColorRGBA(aMaterial.mRGBa).withStateAndTemperature(GAS, aMaterial.getGasTemperature())
- .buildAndRegister().configureMaterials(aMaterial)
- .registerBContainers(
- GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L),
- ItemList.Cell_Empty.get(1L))
- .asFluid();
+ .withLocalizedName(aMaterial.mDefaultLocalName)
+ .withTextureName(fluidTexture)
+ .withColorRGBA(aMaterial.mRGBa)
+ .withStateAndTemperature(GAS, aMaterial.getGasTemperature())
+ .buildAndRegister()
+ .configureMaterials(aMaterial)
+ .registerBContainers(
+ GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L),
+ ItemList.Cell_Empty.get(1L))
+ .asFluid();
}
public Fluid addAutogeneratedPlasmaFluid(Materials aMaterial) {
@@ -2448,14 +2519,17 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
: "plasma.autogenerated";
return GT_FluidFactory.builder("plasma." + aMaterial.mName.toLowerCase(Locale.ENGLISH))
- .withLocalizedName(aMaterial.mDefaultLocalName + " Plasma").withTextureName(fluidTexture)
- .withColorRGBA(aMaterial.mMoltenRGBa).withStateAndTemperature(PLASMA, 10000).buildAndRegister()
- .configureMaterials(aMaterial)
- .registerContainers(
- GT_OreDictUnificator.get(OrePrefixes.cellPlasma, aMaterial, 1L),
- ItemList.Cell_Empty.get(1L),
- aMaterial.getMolten(1) != null ? 144 : 1000)
- .asFluid();
+ .withLocalizedName(aMaterial.mDefaultLocalName + " Plasma")
+ .withTextureName(fluidTexture)
+ .withColorRGBA(aMaterial.mMoltenRGBa)
+ .withStateAndTemperature(PLASMA, 10000)
+ .buildAndRegister()
+ .configureMaterials(aMaterial)
+ .registerContainers(
+ GT_OreDictUnificator.get(OrePrefixes.cellPlasma, aMaterial, 1L),
+ ItemList.Cell_Empty.get(1L),
+ aMaterial.getMolten(1) != null ? 144 : 1000)
+ .asFluid();
}
public Fluid addAutogeneratedMoltenFluid(Materials aMaterial) {
@@ -2466,15 +2540,19 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
: "molten.autogenerated";
return GT_FluidFactory.builder("molten." + aMaterial.mName.toLowerCase(Locale.ENGLISH))
- .withLocalizedName("Molten " + aMaterial.mDefaultLocalName).withTextureName(fluidTexture)
- .withColorRGBA(aMaterial.mMoltenRGBa)
- .withStateAndTemperature(MOLTEN, aMaterial.mMeltingPoint < 0 ? 1000 : aMaterial.mMeltingPoint)
- .buildAndRegister().configureMaterials(aMaterial)
- .registerContainers(
- GT_OreDictUnificator.get(OrePrefixes.cellMolten, aMaterial, 1L),
- ItemList.Cell_Empty.get(1L),
- 144)
- .asFluid();
+ .withLocalizedName("Molten " + aMaterial.mDefaultLocalName)
+ .withTextureName(fluidTexture)
+ .withColorRGBA(aMaterial.mMoltenRGBa)
+ .withStateAndTemperature(
+ MOLTEN,
+ aMaterial.mMeltingPoint < 0 ? 1000 : aMaterial.mMeltingPoint)
+ .buildAndRegister()
+ .configureMaterials(aMaterial)
+ .registerContainers(
+ GT_OreDictUnificator.get(OrePrefixes.cellMolten, aMaterial, 1L),
+ ItemList.Cell_Empty.get(1L),
+ 144)
+ .asFluid();
}
// ------------------------------------------------------------------------------------------------------------
@@ -2492,13 +2570,17 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
} else return;
for (int i = 0; i < 3; i++) {
crackedFluids[i] = GT_FluidFactory.builder(namePrefixes[i] + aMaterial.mName.toLowerCase(Locale.ENGLISH))
- .withIconsFrom(uncrackedFluid)
- .withLocalizedName(orePrefixes[i].mLocalizedMaterialPre + aMaterial.mDefaultLocalName)
- .withColorRGBA(aMaterial.mRGBa).withStateAndTemperature(GAS, 775).buildAndRegister()
- .registerBContainers(
- GT_OreDictUnificator.get(orePrefixes[i], aMaterial, 1L),
- ItemList.Cell_Empty.get(1L))
- .asFluid();
+ .withIconsFrom(uncrackedFluid)
+ .withLocalizedName(
+ orePrefixes[i].mLocalizedMaterialPre
+ + aMaterial.mDefaultLocalName)
+ .withColorRGBA(aMaterial.mRGBa)
+ .withStateAndTemperature(GAS, 775)
+ .buildAndRegister()
+ .registerBContainers(
+ GT_OreDictUnificator.get(orePrefixes[i], aMaterial, 1L),
+ ItemList.Cell_Empty.get(1L))
+ .asFluid();
int hydrogenAmount = 2 * i + 2;
GT_Values.RA.addCrackingRecipe(
@@ -2541,13 +2623,17 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
} else return;
for (int i = 0; i < 3; i++) {
crackedFluids[i] = GT_FluidFactory.builder(namePrefixes[i] + aMaterial.mName.toLowerCase(Locale.ENGLISH))
- .withIconsFrom(uncrackedFluid)
- .withLocalizedName(orePrefixes[i].mLocalizedMaterialPre + aMaterial.mDefaultLocalName)
- .withColorRGBA(aMaterial.mRGBa).withStateAndTemperature(GAS, 775).buildAndRegister()
- .registerBContainers(
- GT_OreDictUnificator.get(orePrefixes[i], aMaterial, 1L),
- ItemList.Cell_Empty.get(1L))
- .asFluid();
+ .withIconsFrom(uncrackedFluid)
+ .withLocalizedName(
+ orePrefixes[i].mLocalizedMaterialPre
+ + aMaterial.mDefaultLocalName)
+ .withColorRGBA(aMaterial.mRGBa)
+ .withStateAndTemperature(GAS, 775)
+ .buildAndRegister()
+ .registerBContainers(
+ GT_OreDictUnificator.get(orePrefixes[i], aMaterial, 1L),
+ ItemList.Cell_Empty.get(1L))
+ .asFluid();
GT_Values.RA.addCrackingRecipe(
i + 1,
@@ -2593,10 +2679,13 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
@Deprecated
public Fluid addFluid(String aName, String aLocalized, Materials aMaterial, int aState, int aTemperatureK,
ItemStack aFullContainer, ItemStack aEmptyContainer, int aFluidAmount) {
- return GT_FluidFactory.builder(aName).withLocalizedName(aLocalized)
- .withStateAndTemperature(FluidState.fromValue(aState), aTemperatureK).buildAndRegister()
- .configureMaterials(aMaterial).registerContainers(aFullContainer, aEmptyContainer, aFluidAmount)
- .asFluid();
+ return GT_FluidFactory.builder(aName)
+ .withLocalizedName(aLocalized)
+ .withStateAndTemperature(FluidState.fromValue(aState), aTemperatureK)
+ .buildAndRegister()
+ .configureMaterials(aMaterial)
+ .registerContainers(aFullContainer, aEmptyContainer, aFluidAmount)
+ .asFluid();
}
/**
@@ -2606,15 +2695,21 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
@SuppressWarnings({ "MethodWithTooManyParameters" }) // Deprecated method
public Fluid addFluid(String aName, String aTexture, String aLocalized, Materials aMaterial, short[] aRGBa,
int aState, int aTemperatureK, ItemStack aFullContainer, ItemStack aEmptyContainer, int aFluidAmount) {
- return GT_FluidFactory.builder(aName).withLocalizedName(aLocalized)
- .withStillIconResourceLocation(new ResourceLocation(MOD_ID, "fluids/fluid." + aTexture))
- .withColorRGBA(aRGBa).withStateAndTemperature(FluidState.fromValue(aState), aTemperatureK)
- .buildAndRegister().configureMaterials(aMaterial)
- .registerContainers(aFullContainer, aEmptyContainer, aFluidAmount).asFluid();
+ return GT_FluidFactory.builder(aName)
+ .withLocalizedName(aLocalized)
+ .withStillIconResourceLocation(new ResourceLocation(MOD_ID, "fluids/fluid." + aTexture))
+ .withColorRGBA(aRGBa)
+ .withStateAndTemperature(FluidState.fromValue(aState), aTemperatureK)
+ .buildAndRegister()
+ .configureMaterials(aMaterial)
+ .registerContainers(aFullContainer, aEmptyContainer, aFluidAmount)
+ .asFluid();
}
public File getSaveDirectory() {
- return this.mUniverse == null ? null : this.mUniverse.getSaveHandler().getWorldDirectory();
+ return this.mUniverse == null ? null
+ : this.mUniverse.getSaveHandler()
+ .getWorldDirectory();
}
public long getAnimationTicks() {
@@ -2644,22 +2739,29 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
tOre.mEvent.Ore,
(GregTech_API.sUnification.get(
new StringBuilder().append(ConfigCategories.specialunificationtargets)
- .append(".").append(tOre.mModID).toString(),
+ .append(".")
+ .append(tOre.mModID)
+ .toString(),
tOre.mEvent.Name,
true)),
true);
continue;
} else if (tOre.mModID.equalsIgnoreCase("thermalfoundation") && tOre.mPrefix == OrePrefixes.dust
&& tOre.mMaterial == Materials.Blizz) {
- GT_OreDictUnificator
- .addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
+ GT_OreDictUnificator.addAssociation(
+ tOre.mPrefix,
+ tOre.mMaterial,
+ tOre.mEvent.Ore,
+ false);
GT_OreDictUnificator.set(
tOre.mPrefix,
tOre.mMaterial,
tOre.mEvent.Ore,
(GregTech_API.sUnification.get(
new StringBuilder().append(ConfigCategories.specialunificationtargets)
- .append(".").append(tOre.mModID).toString(),
+ .append(".")
+ .append(tOre.mModID)
+ .toString(),
tOre.mEvent.Name,
true)),
true);
@@ -2667,16 +2769,21 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
} else
if (tOre.mModID.equalsIgnoreCase("thermalfoundation") && tOre.mPrefix == OrePrefixes.dust
&& tOre.mMaterial == Materials.Pyrotheum) {
- GT_OreDictUnificator
- .addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
+ GT_OreDictUnificator.addAssociation(
+ tOre.mPrefix,
+ tOre.mMaterial,
+ tOre.mEvent.Ore,
+ false);
GT_OreDictUnificator.set(
tOre.mPrefix,
tOre.mMaterial,
tOre.mEvent.Ore,
(GregTech_API.sUnification.get(
- new StringBuilder()
- .append(ConfigCategories.specialunificationtargets)
- .append(".").append(tOre.mModID).toString(),
+ new StringBuilder().append(
+ ConfigCategories.specialunificationtargets)
+ .append(".")
+ .append(tOre.mModID)
+ .toString(),
tOre.mEvent.Name,
true)),
true);
@@ -2684,16 +2791,21 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
} else
if (tOre.mModID.equalsIgnoreCase(aTextArsmagica2) && tOre.mPrefix == OrePrefixes.dust
&& tOre.mMaterial == Materials.Vinteum) {
- GT_OreDictUnificator
- .addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
+ GT_OreDictUnificator.addAssociation(
+ tOre.mPrefix,
+ tOre.mMaterial,
+ tOre.mEvent.Ore,
+ false);
GT_OreDictUnificator.set(
tOre.mPrefix,
tOre.mMaterial,
tOre.mEvent.Ore,
(GregTech_API.sUnification.get(
- new StringBuilder()
- .append(ConfigCategories.specialunificationtargets)
- .append(".").append(tOre.mModID).toString(),
+ new StringBuilder().append(
+ ConfigCategories.specialunificationtargets)
+ .append(".")
+ .append(tOre.mModID)
+ .toString(),
tOre.mEvent.Name,
true)),
true);
@@ -2711,9 +2823,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
tOre.mMaterial,
tOre.mEvent.Ore,
(GregTech_API.sUnification.get(
- new StringBuilder()
- .append(ConfigCategories.specialunificationtargets)
- .append(".").append(tOre.mModID).toString(),
+ new StringBuilder().append(
+ ConfigCategories.specialunificationtargets)
+ .append(".")
+ .append(tOre.mModID)
+ .toString(),
tOre.mEvent.Name,
true)),
true);
@@ -2733,7 +2847,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
(GregTech_API.sUnification.get(
new StringBuilder().append(
ConfigCategories.specialunificationtargets)
- .append(".").append(tOre.mModID).toString(),
+ .append(".")
+ .append(tOre.mModID)
+ .toString(),
tOre.mEvent.Name,
true)),
true);
@@ -2754,7 +2870,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
(GregTech_API.sUnification.get(
new StringBuilder().append(
ConfigCategories.specialunificationtargets)
- .append(".").append(tOre.mModID).toString(),
+ .append(".")
+ .append(tOre.mModID)
+ .toString(),
tOre.mEvent.Name,
true)),
true);
@@ -2775,8 +2893,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
(GregTech_API.sUnification.get(
new StringBuilder().append(
ConfigCategories.specialunificationtargets)
- .append(".").append(tOre.mModID)
- .toString(),
+ .append(".")
+ .append(tOre.mModID)
+ .toString(),
tOre.mEvent.Name,
true)),
true);
@@ -2797,8 +2916,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
(GregTech_API.sUnification.get(
new StringBuilder().append(
ConfigCategories.specialunificationtargets)
- .append(".").append(tOre.mModID)
- .toString(),
+ .append(".")
+ .append(tOre.mModID)
+ .toString(),
tOre.mEvent.Name,
true)),
true);
@@ -2819,8 +2939,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
(GregTech_API.sUnification.get(
new StringBuilder().append(
ConfigCategories.specialunificationtargets)
- .append(".").append(tOre.mModID)
- .toString(),
+ .append(".")
+ .append(tOre.mModID)
+ .toString(),
tOre.mEvent.Name,
true)),
true);
@@ -2841,9 +2962,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
(GregTech_API.sUnification.get(
new StringBuilder().append(
ConfigCategories.specialunificationtargets)
- .append(".")
- .append(tOre.mModID)
- .toString(),
+ .append(".")
+ .append(
+ tOre.mModID)
+ .toString(),
tOre.mEvent.Name,
true)),
true);
@@ -2859,8 +2981,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
tOre.mMaterial,
tOre.mEvent.Ore,
(chkmi) && (GregTech_API.sUnification.get(
- new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".")
- .append(tOre.mModID).toString(),
+ new StringBuilder().append(ConfigCategories.specialunificationtargets)
+ .append(".")
+ .append(tOre.mModID)
+ .toString(),
tOre.mEvent.Name,
false)),
true);
@@ -2880,8 +3004,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
tOre.mMaterial,
tOre.mEvent.Ore,
(tOre.mModID != null) && (GregTech_API.sUnification.get(
- new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".")
- .append(tOre.mModID),
+ new StringBuilder().append(ConfigCategories.specialunificationtargets)
+ .append(".")
+ .append(tOre.mModID),
tOre.mEvent.Name,
false)),
true);
@@ -2977,7 +3102,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
@SubscribeEvent
public void onBlockEvent(BlockEvent event) {
- if (event.block.getUnlocalizedName().equals("blockAlloyGlass"))
+ if (event.block.getUnlocalizedName()
+ .equals("blockAlloyGlass"))
GregTech_API.causeMachineUpdate(event.world, event.x, event.y, event.z);
}
diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java
index 0e4c6e8c9a..5c7ac4cd4a 100644
--- a/src/main/java/gregtech/common/GT_RecipeAdder.java
+++ b/src/main/java/gregtech/common/GT_RecipeAdder.java
@@ -51,7 +51,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if (aInput1 == null || aInput2 == null || aOutput1 == null || aDuration < 1 || aEUt < 1 || aStartEU < 1) {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile.get("fusion", aOutput1.getFluid().getName(), aDuration)) <= 0) {
+ if ((aDuration = GregTech_API.sRecipeFile.get(
+ "fusion",
+ aOutput1.getFluid()
+ .getName(),
+ aDuration)) <= 0) {
return false;
}
GT_Recipe.GT_Recipe_Map.sFusionRecipes.addRecipe(
@@ -163,8 +167,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if ((aInput1 != null) && ((aDuration = GregTech_API.sRecipeFile.get("centrifuge", aInput1, aDuration)) <= 0)) {
return false;
}
- if ((aFluidInput != null) && ((aDuration = GregTech_API.sRecipeFile
- .get("centrifuge", aFluidInput.getFluid().getName(), aDuration)) <= 0)) {
+ if ((aFluidInput != null) && ((aDuration = GregTech_API.sRecipeFile.get(
+ "centrifuge",
+ aFluidInput.getFluid()
+ .getName(),
+ aDuration)) <= 0)) {
return false;
}
if (!GT_Mod.gregtechproxy.mEnableCleanroom) {
@@ -274,8 +281,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
&& ((aDuration = GregTech_API.sRecipeFile.get("electrolyzer", aInput1, aDuration)) <= 0)) {
return false;
}
- if ((aFluidInput != null) && ((aDuration = GregTech_API.sRecipeFile
- .get("electrolyzer", aFluidInput.getFluid().getName(), aDuration)) <= 0)) {
+ if ((aFluidInput != null) && ((aDuration = GregTech_API.sRecipeFile.get(
+ "electrolyzer",
+ aFluidInput.getFluid()
+ .getName(),
+ aDuration)) <= 0)) {
return false;
}
GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.addRecipe(
@@ -395,8 +405,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
&& ((aDuration = GregTech_API.sRecipeFile.get("chemicalreactor", aOutput, aDuration)) <= 0)) {
return false;
}
- if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile
- .get("chemicalreactor", aFluidOutput.getFluid().getName(), aDuration)) <= 0)) {
+ if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(
+ "chemicalreactor",
+ aFluidOutput.getFluid()
+ .getName(),
+ aDuration)) <= 0)) {
return false;
}
if (aEUtick <= 0) {
@@ -444,8 +457,17 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if (aEUtick <= 0) {
return false;
}
- GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes
- .addRecipe(false, aInputs, aOutputs, null, null, aFluidInputs, aFluidOutputs, aDuration, aEUtick, 0);
+ GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.addRecipe(
+ false,
+ aInputs,
+ aOutputs,
+ null,
+ null,
+ aFluidInputs,
+ aFluidOutputs,
+ aDuration,
+ aEUtick,
+ 0);
return true;
}
@@ -460,8 +482,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
&& ((aDuration = GregTech_API.sRecipeFile.get("chemicalreactor", aOutput, aDuration)) <= 0)) {
return false;
}
- if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile
- .get("chemicalreactor", aFluidOutput.getFluid().getName(), aDuration)) <= 0)) {
+ if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(
+ "chemicalreactor",
+ aFluidOutput.getFluid()
+ .getName(),
+ aDuration)) <= 0)) {
return false;
}
if (aEUtick <= 0) {
@@ -861,7 +886,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if ((aInputs == null) || (aOutputs == null) || aInputs.length == 0 || aOutputs.length == 0) {
return false;
}
- if (Arrays.stream(aOutputs).noneMatch(Objects::nonNull)) {
+ if (Arrays.stream(aOutputs)
+ .noneMatch(Objects::nonNull)) {
return false;
}
if ((aDuration = GregTech_API.sRecipeFile.get("cutting", aInputs[0], aDuration)) <= 0) {
@@ -992,7 +1018,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
}
for (int oreID : OreDictionary.getOreIDs(aOutput1)) {
- if (OreDictionary.getOreName(oreID).startsWith("circuit")) {
+ if (OreDictionary.getOreName(oreID)
+ .startsWith("circuit")) {
return this.addAssemblerRecipeNonOD(aInputs, aFluidInput, aOutput1, aDuration, aEUt, aCleanroom);
}
}
@@ -1676,8 +1703,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if ((aInput == null) || (aOutput == null)) {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile.get("fermenting", aOutput.getFluid().getUnlocalizedName(), aDuration))
- <= 0) {
+ if ((aDuration = GregTech_API.sRecipeFile.get(
+ "fermenting",
+ aOutput.getFluid()
+ .getUnlocalizedName(),
+ aDuration)) <= 0) {
return false;
}
GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sFermentingRecipes.addRecipe(
@@ -1707,8 +1737,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if ((aInput == null) || (aOutput == null)) {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile.get("distillery", aOutput.getFluid().getUnlocalizedName(), aDuration))
- <= 0) {
+ if ((aDuration = GregTech_API.sRecipeFile.get(
+ "distillery",
+ aOutput.getFluid()
+ .getUnlocalizedName(),
+ aDuration)) <= 0) {
return false;
}
// reduce the batch size if fluid amount is exceeding
@@ -2230,9 +2263,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if ((aOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get("mixer", aOutput, aDuration)) <= 0)) {
return false;
}
- if ((aFluidOutput != null)
- && ((aDuration = GregTech_API.sRecipeFile.get("mixer", aFluidOutput.getFluid().getName(), aDuration))
- <= 0)) {
+ if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(
+ "mixer",
+ aFluidOutput.getFluid()
+ .getName(),
+ aDuration)) <= 0)) {
return false;
}
GT_Recipe.GT_Recipe_Map.sMixerRecipes.addRecipe(
@@ -2274,8 +2309,17 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
oNumber++;
}
- GT_Recipe.GT_Recipe_Map.sMultiblockMixerRecipes
- .addRecipe(false, itemInputs, itemOutputs, null, null, fluidInputs, fluidOutputs, aDuration, aEUt, 0);
+ GT_Recipe.GT_Recipe_Map.sMultiblockMixerRecipes.addRecipe(
+ false,
+ itemInputs,
+ itemOutputs,
+ null,
+ null,
+ fluidInputs,
+ fluidOutputs,
+ aDuration,
+ aEUt,
+ 0);
return true;
}
@@ -2374,9 +2418,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if ((aOutput1 != null) && ((aDuration = GregTech_API.sRecipeFile.get("mixer", aOutput1, aDuration)) <= 0)) {
return false;
}
- if ((aFluidOutput != null)
- && ((aDuration = GregTech_API.sRecipeFile.get("mixer", aFluidOutput.getFluid().getName(), aDuration))
- <= 0)) {
+ if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(
+ "mixer",
+ aFluidOutput.getFluid()
+ .getName(),
+ aDuration)) <= 0)) {
return false;
}
GT_Recipe.GT_Recipe_Map.sMixerRecipes.addRecipe(
@@ -2418,8 +2464,17 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
oNumber++;
}
- GT_Recipe.GT_Recipe_Map.sMultiblockMixerRecipes
- .addRecipe(false, itemInputs, itemOutputs, null, null, fluidInputs, fluidOutputs, aDuration, aEUt, 0);
+ GT_Recipe.GT_Recipe_Map.sMultiblockMixerRecipes.addRecipe(
+ false,
+ itemInputs,
+ itemOutputs,
+ null,
+ null,
+ fluidInputs,
+ fluidOutputs,
+ aDuration,
+ aEUt,
+ 0);
return true;
}
@@ -2501,8 +2556,16 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if ((ItemInputArray == null) || (OutputItemArray == null)) {
return false;
}
- GT_Recipe.GT_Recipe_Map.sPressRecipes
- .addRecipe(true, ItemInputArray, OutputItemArray, null, null, null, aDuration, aEUt, 0);
+ GT_Recipe.GT_Recipe_Map.sPressRecipes.addRecipe(
+ true,
+ ItemInputArray,
+ OutputItemArray,
+ null,
+ null,
+ null,
+ aDuration,
+ aEUt,
+ 0);
return true;
}
@@ -2511,8 +2574,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if ((aItem == null) || (aOutput == null)) {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile
- .get("fluidheater", aOutput.getFluid().getUnlocalizedName(), aDuration)) <= 0) {
+ if ((aDuration = GregTech_API.sRecipeFile.get(
+ "fluidheater",
+ aOutput.getFluid()
+ .getUnlocalizedName(),
+ aDuration)) <= 0) {
return false;
}
GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes.addRecipe(
@@ -2534,8 +2600,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if ((aInput == null) || (aOutput == null)) {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile
- .get("fluidheater", aOutput.getFluid().getUnlocalizedName(), aDuration)) <= 0) {
+ if ((aDuration = GregTech_API.sRecipeFile.get(
+ "fluidheater",
+ aOutput.getFluid()
+ .getUnlocalizedName(),
+ aDuration)) <= 0) {
return false;
}
GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes.addRecipe(
@@ -2923,11 +2992,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
try {
// sort the output, so the hash code is stable across launches
tList.sort(
- Comparator
- .<ItemStack, String>comparing(
- s -> GameRegistry.findUniqueIdentifierFor(s.getItem()).modId)
- .thenComparing(s -> GameRegistry.findUniqueIdentifierFor(s.getItem()).name)
- .thenComparingInt(Items.feather::getDamage).thenComparingInt(s -> s.stackSize));
+ Comparator.<ItemStack, String>comparing(
+ s -> GameRegistry.findUniqueIdentifierFor(s.getItem()).modId)
+ .thenComparing(s -> GameRegistry.findUniqueIdentifierFor(s.getItem()).name)
+ .thenComparingInt(Items.feather::getDamage)
+ .thenComparingInt(s -> s.stackSize));
int tAmount = ((Number) objs[1]).intValue();
List<ItemStack> uList = new ArrayList<>();
for (ItemStack tStack : tList) {
@@ -3023,7 +3092,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
}
for (int oreID : OreDictionary.getOreIDs(aOutput)) {
- if (OreDictionary.getOreName(oreID).startsWith("circuit")) {
+ if (OreDictionary.getOreName(oreID)
+ .startsWith("circuit")) {
return this.addCircuitAssemblerRecipeNonOredicted(
aInputs,
aFluidInput,
diff --git a/src/main/java/gregtech/common/GT_ThaumcraftCompat.java b/src/main/java/gregtech/common/GT_ThaumcraftCompat.java
index 2cd845fadf..a7a2f0d4ee 100644
--- a/src/main/java/gregtech/common/GT_ThaumcraftCompat.java
+++ b/src/main/java/gregtech/common/GT_ThaumcraftCompat.java
@@ -123,8 +123,9 @@ public class GT_ThaumcraftCompat implements IThaumcraftCompat {
private static final AspectList getAspectList(List<TC_Aspects.TC_AspectStack> aAspects) {
AspectList rAspects = new AspectList();
TC_Aspects.TC_AspectStack tAspect;
- for (Iterator i$ = aAspects.iterator(); i$.hasNext(); rAspects
- .add((Aspect) tAspect.mAspect.mAspect, (int) tAspect.mAmount)) {
+ for (Iterator i$ = aAspects.iterator(); i$.hasNext(); rAspects.add(
+ (Aspect) tAspect.mAspect.mAspect,
+ (int) tAspect.mAmount)) {
tAspect = (TC_Aspects.TC_AspectStack) i$.next();
}
return rAspects;
@@ -141,7 +142,8 @@ public class GT_ThaumcraftCompat implements IThaumcraftCompat {
if (tCategory == null) {
return null;
}
- for (Iterator i$ = tCategory.research.values().iterator(); i$.hasNext();) {
+ for (Iterator i$ = tCategory.research.values()
+ .iterator(); i$.hasNext();) {
ResearchItem tResearch = (ResearchItem) i$.next();
if ((tResearch.displayColumn == aX) && (tResearch.displayRow == aY)) {
aX += (aX > 0 ? 5 : -5);
diff --git a/src/main/java/gregtech/common/GT_UndergroundOil.java b/src/main/java/gregtech/common/GT_UndergroundOil.java
index 482ff54c02..1372855926 100644
--- a/src/main/java/gregtech/common/GT_UndergroundOil.java
+++ b/src/main/java/gregtech/common/GT_UndergroundOil.java
@@ -41,7 +41,10 @@ public class GT_UndergroundOil {
* @see #undergroundOil(World, int, int, float)
*/
public static FluidStack undergroundOilReadInformation(IGregTechTileEntity te) {
- return undergroundOil(te.getWorld().getChunkFromBlockCoords(te.getXCoord(), te.getZCoord()), -1);
+ return undergroundOil(
+ te.getWorld()
+ .getChunkFromBlockCoords(te.getXCoord(), te.getZCoord()),
+ -1);
}
/**
@@ -56,7 +59,8 @@ public class GT_UndergroundOil {
/** @see #undergroundOil(World, int, int, float) */
public static FluidStack undergroundOil(IGregTechTileEntity te, float readOrDrainCoefficient) {
return undergroundOil(
- te.getWorld().getChunkFromBlockCoords(te.getXCoord(), te.getZCoord()),
+ te.getWorld()
+ .getChunkFromBlockCoords(te.getXCoord(), te.getZCoord()),
readOrDrainCoefficient);
}
@@ -108,8 +112,8 @@ public class GT_UndergroundOil {
chunkData.setAmount(0);
} else {
// get the expected current output
- fluidInChunk.amount = (int) Math
- .floor(chunkData.getAmount() * (double) -readOrDrainCoefficient / DIVIDER);
+ fluidInChunk.amount = (int) Math.floor(
+ chunkData.getAmount() * (double) -readOrDrainCoefficient / DIVIDER);
}
}
return fluidInChunk;
@@ -140,11 +144,19 @@ public class GT_UndergroundOil {
}
static void migrate(ChunkDataEvent.Load e) {
- if (e.getData().hasKey("GTOIL") && e.getData().hasKey("GTOILFLUID")) {
+ if (e.getData()
+ .hasKey("GTOIL")
+ && e.getData()
+ .hasKey("GTOILFLUID")) {
ChunkData chunkData = STORAGE.get(e.getChunk());
Fluid fluid = chunkData.getFluid();
- if (fluid != null && fluid.getID() == e.getData().getInteger("GTOILFLUID"))
- chunkData.setAmount(Math.min(chunkData.getAmount(), e.getData().getInteger("GTOIL")));
+ if (fluid != null && fluid.getID() == e.getData()
+ .getInteger("GTOILFLUID"))
+ chunkData.setAmount(
+ Math.min(
+ chunkData.getAmount(),
+ e.getData()
+ .getInteger("GTOIL")));
}
}
@@ -215,7 +227,8 @@ public class GT_UndergroundOil {
if (hash == 0) return NIL_FLUID_STACK;
return new GT_UndergroundOil.ChunkData(
amount,
- GT_Mod.gregtechproxy.mUndergroundOil.GetDimension(world.provider.dimensionId).getUOFluid(veinKey),
+ GT_Mod.gregtechproxy.mUndergroundOil.GetDimension(world.provider.dimensionId)
+ .getUOFluid(veinKey),
veinKey);
}
diff --git a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java
index 737cd530f7..f11d6d0640 100644
--- a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java
+++ b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java
@@ -67,22 +67,37 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen {
mMaxY = (short) (this.mMinY + 9);
}
this.mMaxY = mMaxY;
- this.mWeight = ((short) GregTech_API.sWorldgenFile
- .get(aTextWorldgen + this.mWorldGenName, "RandomWeight", aWeight));
- this.mDensity = ((short) GregTech_API.sWorldgenFile
- .get(aTextWorldgen + this.mWorldGenName, "Density", aDensity));
- this.mSize = ((short) Math
- .max(1, GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Size", aSize)));
- this.mPrimaryMeta = ((short) GregTech_API.sWorldgenFile
- .get(aTextWorldgen + this.mWorldGenName, "OrePrimaryLayer", aPrimary));
- this.mSecondaryMeta = ((short) GregTech_API.sWorldgenFile
- .get(aTextWorldgen + this.mWorldGenName, "OreSecondaryLayer", aSecondary));
- this.mBetweenMeta = ((short) GregTech_API.sWorldgenFile
- .get(aTextWorldgen + this.mWorldGenName, "OreSporadiclyInbetween", aBetween));
- this.mSporadicMeta = ((short) GregTech_API.sWorldgenFile
- .get(aTextWorldgen + this.mWorldGenName, "OreSporaticlyAround", aSporadic));
- this.mRestrictBiome = GregTech_API.sWorldgenFile
- .get(aTextWorldgen + this.mWorldGenName, "RestrictToBiomeName", "None");
+ this.mWeight = ((short) GregTech_API.sWorldgenFile.get(
+ aTextWorldgen + this.mWorldGenName,
+ "RandomWeight",
+ aWeight));
+ this.mDensity = ((short) GregTech_API.sWorldgenFile.get(
+ aTextWorldgen + this.mWorldGenName,
+ "Density",
+ aDensity));
+ this.mSize = ((short) Math.max(
+ 1,
+ GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Size", aSize)));
+ this.mPrimaryMeta = ((short) GregTech_API.sWorldgenFile.get(
+ aTextWorldgen + this.mWorldGenName,
+ "OrePrimaryLayer",
+ aPrimary));
+ this.mSecondaryMeta = ((short) GregTech_API.sWorldgenFile.get(
+ aTextWorldgen + this.mWorldGenName,
+ "OreSecondaryLayer",
+ aSecondary));
+ this.mBetweenMeta = ((short) GregTech_API.sWorldgenFile.get(
+ aTextWorldgen + this.mWorldGenName,
+ "OreSporadiclyInbetween",
+ aBetween));
+ this.mSporadicMeta = ((short) GregTech_API.sWorldgenFile.get(
+ aTextWorldgen + this.mWorldGenName,
+ "OreSporaticlyAround",
+ aSporadic));
+ this.mRestrictBiome = GregTech_API.sWorldgenFile.get(
+ aTextWorldgen + this.mWorldGenName,
+ "RestrictToBiomeName",
+ "None");
if (this.mEnabled) {
sWeight += this.mWeight;
@@ -125,22 +140,37 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen {
mMaxY = (short) (this.mMinY + 9);
}
this.mMaxY = mMaxY;
- this.mWeight = ((short) GregTech_API.sWorldgenFile
- .get(aTextWorldgen + this.mWorldGenName, "RandomWeight", aWeight));
- this.mDensity = ((short) GregTech_API.sWorldgenFile
- .get(aTextWorldgen + this.mWorldGenName, "Density", aDensity));
- this.mSize = ((short) Math
- .max(1, GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Size", aSize)));
- this.mPrimaryMeta = ((short) GregTech_API.sWorldgenFile
- .get(aTextWorldgen + this.mWorldGenName, "OrePrimaryLayer", aPrimary.mMetaItemSubID));
- this.mSecondaryMeta = ((short) GregTech_API.sWorldgenFile
- .get(aTextWorldgen + this.mWorldGenName, "OreSecondaryLayer", aSecondary.mMetaItemSubID));
- this.mBetweenMeta = ((short) GregTech_API.sWorldgenFile
- .get(aTextWorldgen + this.mWorldGenName, "OreSporadiclyInbetween", aBetween.mMetaItemSubID));
- this.mSporadicMeta = ((short) GregTech_API.sWorldgenFile
- .get(aTextWorldgen + this.mWorldGenName, "OreSporaticlyAround", aSporadic.mMetaItemSubID));
- this.mRestrictBiome = GregTech_API.sWorldgenFile
- .get(aTextWorldgen + this.mWorldGenName, "RestrictToBiomeName", "None");
+ this.mWeight = ((short) GregTech_API.sWorldgenFile.get(
+ aTextWorldgen + this.mWorldGenName,
+ "RandomWeight",
+ aWeight));
+ this.mDensity = ((short) GregTech_API.sWorldgenFile.get(
+ aTextWorldgen + this.mWorldGenName,
+ "Density",
+ aDensity));
+ this.mSize = ((short) Math.max(
+ 1,
+ GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Size", aSize)));
+ this.mPrimaryMeta = ((short) GregTech_API.sWorldgenFile.get(
+ aTextWorldgen + this.mWorldGenName,
+ "OrePrimaryLayer",
+ aPrimary.mMetaItemSubID));
+ this.mSecondaryMeta = ((short) GregTech_API.sWorldgenFile.get(
+ aTextWorldgen + this.mWorldGenName,
+ "OreSecondaryLayer",
+ aSecondary.mMetaItemSubID));
+ this.mBetweenMeta = ((short) GregTech_API.sWorldgenFile.get(
+ aTextWorldgen + this.mWorldGenName,
+ "OreSporadiclyInbetween",
+ aBetween.mMetaItemSubID));
+ this.mSporadicMeta = ((short) GregTech_API.sWorldgenFile.get(
+ aTextWorldgen + this.mWorldGenName,
+ "OreSporaticlyAround",
+ aSporadic.mMetaItemSubID));
+ this.mRestrictBiome = GregTech_API.sWorldgenFile.get(
+ aTextWorldgen + this.mWorldGenName,
+ "RestrictToBiomeName",
+ "None");
if (this.mEnabled) {
sWeight += this.mWeight;
@@ -246,8 +276,8 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen {
// should always be max density due to truncation of Math.sqrt().
int localDensity = Math.max(
1,
- this.mDensity / ((int) Math
- .sqrt(2 + Math.pow(aChunkX / 16 - aSeedX / 16, 2) + Math.pow(aChunkZ / 16 - aSeedZ / 16, 2))));
+ this.mDensity / ((int) Math.sqrt(
+ 2 + Math.pow(aChunkX / 16 - aSeedX / 16, 2) + Math.pow(aChunkZ / 16 - aSeedZ / 16, 2))));
// To allow for early exit due to no ore placed in the bottom layer (probably because we are in the sky), unroll
// 1 pass through the loop
@@ -255,22 +285,35 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen {
// Layer -1 Secondary and Sporadic
int level = tMinY - 1; // Dunno why, but the first layer is actually played one below tMinY. Go figure.
for (int tX = wX; tX < eX; tX++) {
- int placeX = Math
- .max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX)) / localDensity);
+ int placeX = Math.max(
+ 1,
+ Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX)) / localDensity);
for (int tZ = nZ; tZ < sZ; tZ++) {
int placeZ = Math.max(
1,
Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ)) / localDensity);
if (((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSecondaryMeta > 0)) {
- if (GT_TileEntity_Ores
- .setOreBlock(aWorld, tX, level, tZ, this.mSecondaryMeta, false, isUnderdark)) {
+ if (GT_TileEntity_Ores.setOreBlock(
+ aWorld,
+ tX,
+ level,
+ tZ,
+ this.mSecondaryMeta,
+ false,
+ isUnderdark)) {
placeCount[1]++;
}
} else
if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0))
&& (this.mSporadicMeta > 0)) { // Sporadics are reduce by 1/7 to compensate
- if (GT_TileEntity_Ores
- .setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark))
+ if (GT_TileEntity_Ores.setOreBlock(
+ aWorld,
+ tX,
+ level,
+ tZ,
+ this.mSporadicMeta,
+ false,
+ isUnderdark))
placeCount[3]++;
}
}
@@ -291,15 +334,27 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen {
Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ)) / localDensity);
if (((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0))
&& (this.mSecondaryMeta > 0)) {
- if (GT_TileEntity_Ores
- .setOreBlock(aWorld, tX, level, tZ, this.mSecondaryMeta, false, isUnderdark)) {
+ if (GT_TileEntity_Ores.setOreBlock(
+ aWorld,
+ tX,
+ level,
+ tZ,
+ this.mSecondaryMeta,
+ false,
+ isUnderdark)) {
placeCount[1]++;
}
} else if ((aRandom.nextInt(7) == 0)
&& ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0))
&& (this.mSporadicMeta > 0)) { // Sporadics are reduce by 1/7 to compensate
- if (GT_TileEntity_Ores
- .setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark))
+ if (GT_TileEntity_Ores.setOreBlock(
+ aWorld,
+ tX,
+ level,
+ tZ,
+ this.mSporadicMeta,
+ false,
+ isUnderdark))
placeCount[3]++;
}
}
@@ -307,8 +362,9 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen {
}
// Layer 2 is Secondary, in-between, and sporadic
for (int tX = wX; tX < eX; tX++) {
- int placeX = Math
- .max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX)) / localDensity);
+ int placeX = Math.max(
+ 1,
+ Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX)) / localDensity);
for (int tZ = nZ; tZ < sZ; tZ++) {
int placeZ = Math.max(
1,
@@ -320,15 +376,27 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen {
}
} else if (((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0))
&& (this.mSecondaryMeta > 0)) {
- if (GT_TileEntity_Ores
- .setOreBlock(aWorld, tX, level, tZ, this.mSecondaryMeta, false, isUnderdark)) {
+ if (GT_TileEntity_Ores.setOreBlock(
+ aWorld,
+ tX,
+ level,
+ tZ,
+ this.mSecondaryMeta,
+ false,
+ isUnderdark)) {
placeCount[1]++;
}
} else
if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0))
&& (this.mSporadicMeta > 0)) { // Sporadics are reduce by 1/7 to compensate
- if (GT_TileEntity_Ores
- .setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark))
+ if (GT_TileEntity_Ores.setOreBlock(
+ aWorld,
+ tX,
+ level,
+ tZ,
+ this.mSporadicMeta,
+ false,
+ isUnderdark))
placeCount[3]++;
}
}
@@ -336,8 +404,9 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen {
level++; // Increment level to next layer
// Layer 3 is In-between, and sporadic
for (int tX = wX; tX < eX; tX++) {
- int placeX = Math
- .max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX)) / localDensity);
+ int placeX = Math.max(
+ 1,
+ Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX)) / localDensity);
for (int tZ = nZ; tZ < sZ; tZ++) {
int placeZ = Math.max(
1,
@@ -350,8 +419,14 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen {
} else
if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0))
&& (this.mSporadicMeta > 0)) { // Sporadics are reduce by 1/7 to compensate
- if (GT_TileEntity_Ores
- .setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark))
+ if (GT_TileEntity_Ores.setOreBlock(
+ aWorld,
+ tX,
+ level,
+ tZ,
+ this.mSporadicMeta,
+ false,
+ isUnderdark))
placeCount[3]++;
}
}
@@ -359,8 +434,9 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen {
level++; // Increment level to next layer
// Layer 4 is In-between, Primary and sporadic
for (int tX = wX; tX < eX; tX++) {
- int placeX = Math
- .max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX)) / localDensity);
+ int placeX = Math.max(
+ 1,
+ Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX)) / localDensity);
for (int tZ = nZ; tZ < sZ; tZ++) {
int placeZ = Math.max(
1,
@@ -372,15 +448,27 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen {
}
} else
if (((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mPrimaryMeta > 0)) {
- if (GT_TileEntity_Ores
- .setOreBlock(aWorld, tX, level, tZ, this.mPrimaryMeta, false, isUnderdark)) {
+ if (GT_TileEntity_Ores.setOreBlock(
+ aWorld,
+ tX,
+ level,
+ tZ,
+ this.mPrimaryMeta,
+ false,
+ isUnderdark)) {
placeCount[1]++;
}
} else if ((aRandom.nextInt(7) == 0)
&& ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0))
&& (this.mSporadicMeta > 0)) { // Sporadics are reduce by 1/7 to compensate
- if (GT_TileEntity_Ores
- .setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark))
+ if (GT_TileEntity_Ores.setOreBlock(
+ aWorld,
+ tX,
+ level,
+ tZ,
+ this.mSporadicMeta,
+ false,
+ isUnderdark))
placeCount[3]++;
}
}
@@ -388,8 +476,9 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen {
level++; // Increment level to next layer
// Layer 5 is In-between, Primary and sporadic
for (int tX = wX; tX < eX; tX++) {
- int placeX = Math
- .max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX)) / localDensity);
+ int placeX = Math.max(
+ 1,
+ Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX)) / localDensity);
for (int tZ = nZ; tZ < sZ; tZ++) {
int placeZ = Math.max(
1,
@@ -401,15 +490,27 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen {
}
} else
if (((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mPrimaryMeta > 0)) {
- if (GT_TileEntity_Ores
- .setOreBlock(aWorld, tX, level, tZ, this.mPrimaryMeta, false, isUnderdark)) {
+ if (GT_TileEntity_Ores.setOreBlock(
+ aWorld,
+ tX,
+ level,
+ tZ,
+ this.mPrimaryMeta,
+ false,
+ isUnderdark)) {
placeCount[1]++;
}
} else if ((aRandom.nextInt(7) == 0)
&& ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0))
&& (this.mSporadicMeta > 0)) { // Sporadics are reduce by 1/7 to compensate
- if (GT_TileEntity_Ores
- .setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark))
+ if (GT_TileEntity_Ores.setOreBlock(
+ aWorld,
+ tX,
+ level,
+ tZ,
+ this.mSporadicMeta,
+ false,
+ isUnderdark))
placeCount[3]++;
}
}
@@ -417,8 +518,9 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen {
level++; // Increment level to next layer
// Layer 6 is Primary and sporadic
for (int tX = wX; tX < eX; tX++) {
- int placeX = Math
- .max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX)) / localDensity);
+ int placeX = Math.max(
+ 1,
+ Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX)) / localDensity);
for (int tZ = nZ; tZ < sZ; tZ++) {
int placeZ = Math.max(
1,
@@ -430,8 +532,14 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen {
} else
if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0))
&& (this.mSporadicMeta > 0)) { // Sporadics are reduce by 1/7 to compensate
- if (GT_TileEntity_Ores
- .setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark))
+ if (GT_TileEntity_Ores.setOreBlock(
+ aWorld,
+ tX,
+ level,
+ tZ,
+ this.mSporadicMeta,
+ false,
+ isUnderdark))
placeCount[3]++;
}
}
@@ -439,8 +547,9 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen {
level++; // Increment level to next layer
// Layer 7 is Primary and sporadic
for (int tX = wX; tX < eX; tX++) {
- int placeX = Math
- .max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX)) / localDensity);
+ int placeX = Math.max(
+ 1,
+ Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX)) / localDensity);
for (int tZ = nZ; tZ < sZ; tZ++) {
int placeZ = Math.max(
1,
@@ -452,8 +561,14 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen {
} else
if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0))
&& (this.mSporadicMeta > 0)) { // Sporadics are reduce by 1/7 to compensate
- if (GT_TileEntity_Ores
- .setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark))
+ if (GT_TileEntity_Ores.setOreBlock(
+ aWorld,
+ tX,
+ level,
+ tZ,
+ this.mSporadicMeta,
+ false,
+ isUnderdark))
placeCount[3]++;
}
}
diff --git a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java
index ef8850638c..5387668dce 100644
--- a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java
+++ b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java
@@ -39,10 +39,13 @@ public class GT_Worldgen_GT_Ore_SmallPieces extends GT_Worldgen {
this.mMaxY = ((short) Math.max(
this.mMinY + 1,
GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MaxHeight", aMaxY)));
- this.mAmount = ((short) Math
- .max(1, GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Amount", aAmount)));
- this.mMeta = ((short) GregTech_API.sWorldgenFile
- .get(aTextWorldgen + this.mWorldGenName, "Ore", aPrimary.mMetaItemSubID));
+ this.mAmount = ((short) Math.max(
+ 1,
+ GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Amount", aAmount)));
+ this.mMeta = ((short) GregTech_API.sWorldgenFile.get(
+ aTextWorldgen + this.mWorldGenName,
+ "Ore",
+ aPrimary.mMetaItemSubID));
this.mBiome = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "BiomeName", "None");
sList.add(this);
}
@@ -58,10 +61,13 @@ public class GT_Worldgen_GT_Ore_SmallPieces extends GT_Worldgen {
this.mMaxY = ((short) Math.max(
this.mMinY + 1,
GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MaxHeight", aMaxY)));
- this.mAmount = ((short) Math
- .max(1, GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Amount", aAmount)));
- this.mMeta = ((short) GregTech_API.sWorldgenFile
- .get(aTextWorldgen + this.mWorldGenName, "Ore", aPrimary.mMetaItemSubID));
+ this.mAmount = ((short) Math.max(
+ 1,
+ GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Amount", aAmount)));
+ this.mMeta = ((short) GregTech_API.sWorldgenFile.get(
+ aTextWorldgen + this.mWorldGenName,
+ "Ore",
+ aPrimary.mMetaItemSubID));
this.mBiome = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "BiomeName", "None");
sList.add(this);
}
diff --git a/src/main/java/gregtech/common/GT_Worldgen_Stone.java b/src/main/java/gregtech/common/GT_Worldgen_Stone.java
index c75d6d6ad4..22782d8231 100644
--- a/src/main/java/gregtech/common/GT_Worldgen_Stone.java
+++ b/src/main/java/gregtech/common/GT_Worldgen_Stone.java
@@ -176,7 +176,8 @@ public class GT_Worldgen_Stone extends GT_Worldgen_Ore {
int tMaxZ = tZ + (int) (realSize / zSize + 2.0);
// If the (tY-ySize) of the stoneseed is air in the current chunk, mark the seed empty and move on.
- if (aWorld.getBlock(aChunkX + 8, tMinY, aChunkZ + 8).isAir(aWorld, aChunkX + 8, tMinY, aChunkZ + 8)) {
+ if (aWorld.getBlock(aChunkX + 8, tMinY, aChunkZ + 8)
+ .isAir(aWorld, aChunkX + 8, tMinY, aChunkZ + 8)) {
if (debugStones) GT_Log.out.println(
mWorldGenName + " tX="
+ tX
@@ -271,25 +272,42 @@ public class GT_Worldgen_Stone extends GT_Worldgen_Ore {
if (tTargetedBlock != GregTech_API.sBlockOres1) {
((GT_TileEntity_Ores) tTileEntity).convertOreBlock(aWorld, iX, iY, iZ);
}
- ((GT_TileEntity_Ores) tTileEntity)
- .overrideOreBlockMaterial(this.mBlock, (byte) this.mBlockMeta);
+ ((GT_TileEntity_Ores) tTileEntity).overrideOreBlockMaterial(
+ this.mBlock,
+ (byte) this.mBlockMeta);
}
- } else if (((this.mAllowToGenerateinVoid)
- && (aWorld.getBlock(iX, iY, iZ).isAir(aWorld, iX, iY, iZ)))
- || ((tTargetedBlock != null) && ((tTargetedBlock
- .isReplaceableOreGen(aWorld, iX, iY, iZ, Blocks.stone))
+ } else if (((this.mAllowToGenerateinVoid) && (aWorld.getBlock(iX, iY, iZ)
+ .isAir(aWorld, iX, iY, iZ)))
+ || ((tTargetedBlock != null) && ((tTargetedBlock.isReplaceableOreGen(
+ aWorld,
+ iX,
+ iY,
+ iZ,
+ Blocks.stone))
|| (tTargetedBlock.isReplaceableOreGen(
aWorld,
iX,
iY,
iZ,
Blocks.stained_hardened_clay))
- || (tTargetedBlock
- .isReplaceableOreGen(aWorld, iX, iY, iZ, Blocks.cobblestone))
- || (tTargetedBlock
- .isReplaceableOreGen(aWorld, iX, iY, iZ, Blocks.end_stone))
- || (tTargetedBlock
- .isReplaceableOreGen(aWorld, iX, iY, iZ, Blocks.netherrack))
+ || (tTargetedBlock.isReplaceableOreGen(
+ aWorld,
+ iX,
+ iY,
+ iZ,
+ Blocks.cobblestone))
+ || (tTargetedBlock.isReplaceableOreGen(
+ aWorld,
+ iX,
+ iY,
+ iZ,
+ Blocks.end_stone))
+ || (tTargetedBlock.isReplaceableOreGen(
+ aWorld,
+ iX,
+ iY,
+ iZ,
+ Blocks.netherrack))
|| (tTargetedBlock.isReplaceableOreGen(
aWorld,
iX,
diff --git a/src/main/java/gregtech/common/GT_Worldgenerator.java b/src/main/java/gregtech/common/GT_Worldgenerator.java
index c14444a3af..2ac29036d0 100644
--- a/src/main/java/gregtech/common/GT_Worldgenerator.java
+++ b/src/main/java/gregtech/common/GT_Worldgenerator.java
@@ -440,7 +440,8 @@ public class GT_Worldgenerator implements IWorldGenerator {
// Determine bounding box on how far out to check for oreveins affecting this chunk
// For now, manually reducing oreveinMaxSize when not in the Underdark for performance
- if (this.mWorld.provider.getDimensionName().equals("Underdark")) {
+ if (this.mWorld.provider.getDimensionName()
+ .equals("Underdark")) {
oreveinMaxSize = 32; // Leave Deep Dark/Underdark max oregen at 32, instead of 64
} else {
oreveinMaxSize = 32;
@@ -519,7 +520,8 @@ public class GT_Worldgenerator implements IWorldGenerator {
// } else if (tDimensionName.equals("Asteroids")) {
// mSize = aRandom.nextInt((int) (gcMaxSize - gcMinSize));
}
- if ((mWorld.getBlock(tX, tY, tZ).isAir(mWorld, tX, tY, tZ))) {
+ if ((mWorld.getBlock(tX, tY, tZ)
+ .isAir(mWorld, tX, tY, tZ))) {
float randomRadian = aRandom.nextFloat() * (float) Math.PI;
double xBase = tX + 8 + MathHelper.sin(randomRadian) * mSize / 8.0F;
double xFactor = tX + 8 - MathHelper.sin(randomRadian) * mSize / 8.0F;
@@ -551,20 +553,41 @@ public class GT_Worldgenerator implements IWorldGenerator {
for (int eZ = tMinZ; eZ <= tMaxZ; eZ++) {
double zChance = (eZ + 0.5D - zCenter) / (halfLength / 2.0D);
if ((xChance * xChance + yChance * yChance + zChance * zChance < 1.0D)
- && (mWorld.getBlock(tX, tY, tZ).isAir(mWorld, tX, tY, tZ))) {
+ && (mWorld.getBlock(tX, tY, tZ)
+ .isAir(mWorld, tX, tY, tZ))) {
int ranOre = aRandom.nextInt(50);
if (ranOre < 3) {
- GT_TileEntity_Ores
- .setOreBlock(mWorld, eX, eY, eZ, primaryMeta, false);
+ GT_TileEntity_Ores.setOreBlock(
+ mWorld,
+ eX,
+ eY,
+ eZ,
+ primaryMeta,
+ false);
} else if (ranOre < 6) {
- GT_TileEntity_Ores
- .setOreBlock(mWorld, eX, eY, eZ, secondaryMeta, false);
+ GT_TileEntity_Ores.setOreBlock(
+ mWorld,
+ eX,
+ eY,
+ eZ,
+ secondaryMeta,
+ false);
} else if (ranOre < 8) {
- GT_TileEntity_Ores
- .setOreBlock(mWorld, eX, eY, eZ, betweenMeta, false);
+ GT_TileEntity_Ores.setOreBlock(
+ mWorld,
+ eX,
+ eY,
+ eZ,
+ betweenMeta,
+ false);
} else if (ranOre < 10) {
- GT_TileEntity_Ores
- .setOreBlock(mWorld, eX, eY, eZ, sporadicMeta, false);
+ GT_TileEntity_Ores.setOreBlock(
+ mWorld,
+ eX,
+ eY,
+ eZ,
+ sporadicMeta,
+ false);
} else {
mWorld.setBlock(eX, eY, eZ, Blocks.end_stone, 0, 0);
}
diff --git a/src/main/java/gregtech/common/bees/GT_AlleleHelper.java b/src/main/java/gregtech/common/bees/GT_AlleleHelper.java
index 9143536dbd..8c605f95c6 100644
--- a/src/main/java/gregtech/common/bees/GT_AlleleHelper.java
+++ b/src/main/java/gregtech/common/bees/GT_AlleleHelper.java
@@ -53,8 +53,9 @@ public class GT_AlleleHelper extends AlleleHelper {
EnumBeeChromosome.FLOWER_PROVIDER,
EnumButterflyChromosome.FLOWER_PROVIDER);
- AlleleManager.alleleRegistry
- .registerDeprecatedAlleleReplacement("forestry.speedNorm", get(EnumAllele.Speed.NORMAL));
+ AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
+ "forestry.speedNorm",
+ get(EnumAllele.Speed.NORMAL));
}
if (PluginManager.Module.ARBORICULTURE.isEnabled()) {
@@ -65,30 +66,39 @@ public class GT_AlleleHelper extends AlleleHelper {
createAlleles(EnumAllele.Maturation.class, EnumTreeChromosome.MATURATION);
createAlleles(EnumAllele.Sappiness.class, EnumTreeChromosome.SAPPINESS);
- AlleleManager.alleleRegistry
- .registerDeprecatedAlleleReplacement("forestry.heightMax10", get(EnumAllele.Height.AVERAGE));
- AlleleManager.alleleRegistry
- .registerDeprecatedAlleleReplacement("forestry.saplingsDefault", get(EnumAllele.Saplings.AVERAGE));
- AlleleManager.alleleRegistry
- .registerDeprecatedAlleleReplacement("forestry.saplingsDouble", get(EnumAllele.Saplings.HIGH));
- AlleleManager.alleleRegistry
- .registerDeprecatedAlleleReplacement("forestry.saplingsTriple", get(EnumAllele.Saplings.HIGHER));
- AlleleManager.alleleRegistry
- .registerDeprecatedAlleleReplacement("forestry.yieldDefault", get(EnumAllele.Yield.AVERAGE));
+ AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
+ "forestry.heightMax10",
+ get(EnumAllele.Height.AVERAGE));
+ AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
+ "forestry.saplingsDefault",
+ get(EnumAllele.Saplings.AVERAGE));
+ AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
+ "forestry.saplingsDouble",
+ get(EnumAllele.Saplings.HIGH));
+ AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
+ "forestry.saplingsTriple",
+ get(EnumAllele.Saplings.HIGHER));
+ AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
+ "forestry.yieldDefault",
+ get(EnumAllele.Yield.AVERAGE));
AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
"forestry.maturitySlowest",
get(EnumAllele.Maturation.SLOWEST));
- AlleleManager.alleleRegistry
- .registerDeprecatedAlleleReplacement("forestry.maturitySlower", get(EnumAllele.Maturation.SLOWER));
- AlleleManager.alleleRegistry
- .registerDeprecatedAlleleReplacement("forestry.maturitySlow", get(EnumAllele.Maturation.SLOW));
+ AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
+ "forestry.maturitySlower",
+ get(EnumAllele.Maturation.SLOWER));
+ AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
+ "forestry.maturitySlow",
+ get(EnumAllele.Maturation.SLOW));
AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
"forestry.maturityAverage",
get(EnumAllele.Maturation.AVERAGE));
- AlleleManager.alleleRegistry
- .registerDeprecatedAlleleReplacement("forestry.maturityFast", get(EnumAllele.Maturation.FAST));
- AlleleManager.alleleRegistry
- .registerDeprecatedAlleleReplacement("forestry.maturityFaster", get(EnumAllele.Maturation.FASTER));
+ AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
+ "forestry.maturityFast",
+ get(EnumAllele.Maturation.FAST));
+ AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
+ "forestry.maturityFaster",
+ get(EnumAllele.Maturation.FASTER));
AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement(
"forestry.maturityFastest",
get(EnumAllele.Maturation.FASTEST));
@@ -151,7 +161,8 @@ public class GT_AlleleHelper extends AlleleHelper {
return;
}
- if (!chromosomeType.getAlleleClass().isInstance(allele)) {
+ if (!chromosomeType.getAlleleClass()
+ .isInstance(allele)) {
GT_Mod.GT_FML_LOGGER.info("chromosomeType is not an instance of allele!" + allele.getName());
return;
}
@@ -216,7 +227,8 @@ public class GT_AlleleHelper extends AlleleHelper {
}
private <K extends Enum<K> & IAlleleValue<V>, V> void createAlleles(Class<K> enumClass, IChromosomeType... types) {
- String category = enumClass.getSimpleName().toLowerCase(Locale.ENGLISH);
+ String category = enumClass.getSimpleName()
+ .toLowerCase(Locale.ENGLISH);
EnumMap<K, IAllele> map = new EnumMap<>(enumClass);
for (K enumValue : enumClass.getEnumConstants()) {
IAllele allele = createAllele(category, enumValue, types);
@@ -229,7 +241,8 @@ public class GT_AlleleHelper extends AlleleHelper {
IChromosomeType... types) {
V value = enumValue.getValue();
boolean isDominant = enumValue.isDominant();
- String name = enumValue.toString().toLowerCase(Locale.ENGLISH);
+ String name = enumValue.toString()
+ .toLowerCase(Locale.ENGLISH);
Class<?> valueClass = value.getClass();
if (Float.class.isAssignableFrom(valueClass)) {
@@ -238,8 +251,15 @@ public class GT_AlleleHelper extends AlleleHelper {
return AlleleManager.alleleFactory.createInteger(modId, category, name, (Integer) value, isDominant, types);
} else if (IVect.class.isAssignableFrom(valueClass)) {
IVect area = (IVect) value;
- return AlleleManager.alleleFactory
- .createArea(modId, category, name, area.getX(), area.getY(), area.getZ(), isDominant, types);
+ return AlleleManager.alleleFactory.createArea(
+ modId,
+ category,
+ name,
+ area.getX(),
+ area.getY(),
+ area.getZ(),
+ isDominant,
+ types);
} else if (Boolean.class.isAssignableFrom(valueClass)) {
return AlleleManager.alleleFactory.createBoolean(modId, category, (Boolean) value, isDominant, types);
} else if (EnumTolerance.class.isAssignableFrom(valueClass)) {
@@ -252,8 +272,13 @@ public class GT_AlleleHelper extends AlleleHelper {
AlleleManager.alleleRegistry.registerAllele(alleleTolerance, types);
return alleleTolerance;
} else if (FlowerProvider.class.isAssignableFrom(valueClass)) {
- return AlleleManager.alleleFactory
- .createFlowers(modId, category, name, (FlowerProvider) value, isDominant, types);
+ return AlleleManager.alleleFactory.createFlowers(
+ modId,
+ category,
+ name,
+ (FlowerProvider) value,
+ isDominant,
+ types);
}
throw new RuntimeException("could not create allele for category: " + category + " and value " + valueClass);
}
diff --git a/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java b/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java
index 7e78ef8fcd..b79fb98c73 100644
--- a/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java
+++ b/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java
@@ -47,7 +47,8 @@ public class GT_Bee_Mutation extends BeeMutation {
}
IBeeModifier beeHousingModifier = BeeManager.beeRoot.createBeeHousingModifier(housing);
- IBeeModifier beeModeModifier = BeeManager.beeRoot.getBeekeepingMode(world).getBeeModifier();
+ IBeeModifier beeModeModifier = BeeManager.beeRoot.getBeekeepingMode(world)
+ .getBeeModifier();
processedChance *= beeHousingModifier.getMutationModifier(genome0, genome1, processedChance);
processedChance *= beeModeModifier.getMutationModifier(genome0, genome1, processedChance);
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java
index 7d04a7bde3..e4d3e7e52a 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java
@@ -33,8 +33,9 @@ public class GT_Block_Casings1 extends GT_Block_Casings_Abstract {
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "UHV Machine Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Bronze Plated Bricks");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Heat Proof Machine Casing");
- GT_LanguageManager
- .addStringLocalization(getUnlocalizedName() + ".12.name", "Dimensionally Transcendent Casing");
+ GT_LanguageManager.addStringLocalization(
+ getUnlocalizedName() + ".12.name",
+ "Dimensionally Transcendent Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Dimensional Injection Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Dimensional Bridge");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Superconducting Coil Block");
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java
index 044806874b..c1cff0f346 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java
@@ -20,7 +20,9 @@ public class GT_Block_Casings2 extends GT_Block_Casings_Abstract {
super(GT_Item_Casings2.class, "gt.blockcasings2", GT_Material_Casings.INSTANCE, 96);
// Special handler for Pyrolyse Oven Casing on hatches...
Textures.BlockIcons.casingTexturePages[0][22] = TextureFactory.of(
- Block.getBlockFromItem(ItemList.Casing_ULV.get(1).getItem()),
+ Block.getBlockFromItem(
+ ItemList.Casing_ULV.get(1)
+ .getItem()),
0,
ForgeDirection.UNKNOWN,
Dyes.MACHINE_METAL.mRGBa);
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java
index 087818d099..254b34b513 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java
@@ -42,10 +42,12 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract {
public GT_Block_Casings4() {
super(GT_Item_Casings4.class, "gt.blockcasings4", GT_Material_Casings.INSTANCE, 16);
- GT_LanguageManager
- .addStringLocalization(getUnlocalizedName() + ".0.name", "Robust Tungstensteel Machine Casing");
- GT_LanguageManager
- .addStringLocalization(getUnlocalizedName() + ".1.name", "Clean Stainless Steel Machine Casing");
+ GT_LanguageManager.addStringLocalization(
+ getUnlocalizedName() + ".0.name",
+ "Robust Tungstensteel Machine Casing");
+ GT_LanguageManager.addStringLocalization(
+ getUnlocalizedName() + ".1.name",
+ "Clean Stainless Steel Machine Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Stable Titanium Machine Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Titanium Firebox Casing");
// GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Fusion Casing");
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java
index bda180b45d..a8d04cd10f 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java
@@ -36,13 +36,15 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract {
GT_LanguageManager.addStringLocalization(
getUnlocalizedName() + ".6.name",
"Advanced Rhodium Plated Palladium Machine Casing");
- GT_LanguageManager
- .addStringLocalization(getUnlocalizedName() + ".7.name", "Advanced Iridium Plated Machine Casing");
+ GT_LanguageManager.addStringLocalization(
+ getUnlocalizedName() + ".7.name",
+ "Advanced Iridium Plated Machine Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Magical Machine Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "HSS-S Turbine Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Radiant Naquadah Alloy Casing");
- GT_LanguageManager
- .addStringLocalization(getUnlocalizedName() + ".11.name", "Basic Photolithographic Framework Casing");
+ GT_LanguageManager.addStringLocalization(
+ getUnlocalizedName() + ".11.name",
+ "Basic Photolithographic Framework Casing");
GT_LanguageManager.addStringLocalization(
getUnlocalizedName() + ".12.name",
"Reinforced Photolithographic Framework Casing");
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings9.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings9.java
index 55e0f508d5..118d92a81b 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Casings9.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings9.java
@@ -15,8 +15,9 @@ public class GT_Block_Casings9 extends GT_Block_Casings_Abstract {
super(GT_Item_Casings9.class, "gt.blockcasings9", GT_Material_Casings.INSTANCE, 2);
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "PBI Pipe Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Advanced Filter Casing");
- GT_LanguageManager
- .addStringLocalization(getUnlocalizedName() + ".1.tooltip", "Less than five 0.1μm particles per m^3");
+ GT_LanguageManager.addStringLocalization(
+ getUnlocalizedName() + ".1.tooltip",
+ "Less than five 0.1μm particles per m^3");
ItemList.Casing_Pipe_Polybenzimidazole.set(new ItemStack(this, 1, 0));
ItemList.Casing_Vent_T2.set(new ItemStack(this, 1, 1));
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings_Abstract.java
index 6cd2700250..57e52b6137 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Casings_Abstract.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings_Abstract.java
@@ -126,7 +126,9 @@ public abstract class GT_Block_Casings_Abstract extends GT_Generic_Block
public void getSubBlocks(Item aItem, CreativeTabs aCreativeTab, List aList) {
for (int i = 0; i < 16; i++) {
ItemStack aStack = new ItemStack(aItem, 1, i);
- if (!aStack.getDisplayName().contains(".name")) aList.add(aStack);
+ if (!aStack.getDisplayName()
+ .contains(".name"))
+ aList.add(aStack);
}
}
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java
index 82e7ec61ac..e2a40aebc0 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java
@@ -235,8 +235,14 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo
final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
if (tTileEntity instanceof IGregTechTileEntity
&& ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) {
- ((IGregTechTileEntity) tTileEntity)
- .addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider);
+ ((IGregTechTileEntity) tTileEntity).addCollisionBoxesToList(
+ aWorld,
+ aX,
+ aY,
+ aZ,
+ inputAABB,
+ outputAABB,
+ collider);
return;
}
super.addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider);
@@ -268,8 +274,11 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo
final TileEntity tTileEntity = blockAccess.getTileEntity(aX, aY, aZ);
if (tTileEntity instanceof IGregTechTileEntity
&& (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null)) {
- final AxisAlignedBB bbb = ((IGregTechTileEntity) tTileEntity)
- .getCollisionBoundingBoxFromPool(((IGregTechTileEntity) tTileEntity).getWorld(), 0, 0, 0);
+ final AxisAlignedBB bbb = ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(
+ ((IGregTechTileEntity) tTileEntity).getWorld(),
+ 0,
+ 0,
+ 0);
minX = bbb.minX; // This essentially sets block bounds
minY = bbb.minY;
minZ = bbb.minZ;
@@ -365,8 +374,12 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo
if ((!aWorld.isRemote) && !((IGregTechTileEntity) tTileEntity).isUseableByPlayer(aPlayer)) {
return true;
}
- return ((IGregTechTileEntity) tTileEntity)
- .onRightclick(aPlayer, (byte) aSide, aOffsetX, aOffsetY, aOffsetZ);
+ return ((IGregTechTileEntity) tTileEntity).onRightclick(
+ aPlayer,
+ (byte) aSide,
+ aOffsetX,
+ aOffsetY,
+ aOffsetZ);
}
return false;
}
@@ -424,7 +437,10 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo
aZ + XSTR_INSTANCE.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 = (XSTR_INSTANCE.nextGaussian() * 0.05D);
tItemEntity.motionY = (XSTR_INSTANCE.nextGaussian() * 0.25D);
@@ -651,13 +667,15 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo
final byte aSide = (byte) side;
final CoverableTileEntity tile = (CoverableTileEntity) tTileEntity;
if (side != -1) {
- final Block facadeBlock = tile.getCoverInfoAtSide(aSide).getFacadeBlock();
+ final Block facadeBlock = tile.getCoverInfoAtSide(aSide)
+ .getFacadeBlock();
if (facadeBlock != null) return facadeBlock;
} else {
// we do not allow more than one type of facade per block, so no need to check every side
// see comment in gregtech.common.covers.GT_Cover_FacadeBase.isCoverPlaceable
for (byte tSide : ALL_VALID_SIDES) {
- final Block facadeBlock = tile.getCoverInfoAtSide(tSide).getFacadeBlock();
+ final Block facadeBlock = tile.getCoverInfoAtSide(tSide)
+ .getFacadeBlock();
if (facadeBlock != null) {
return facadeBlock;
}
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores.java
index 942441b0ba..4db556ac10 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Ores.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores.java
@@ -123,10 +123,22 @@ public class GT_Block_Ores extends GT_Block_Ores_Abstract {
Arrays.fill(rTextures, TextureFactory.of(Blocks.stone));
rTextures[1] = TextureFactory.of(Blocks.netherrack);
rTextures[2] = TextureFactory.of(Blocks.end_stone);
- rTextures[3] = TextureFactory.builder().addIcon(GRANITE_BLACK_STONE).stdOrient().build();
- rTextures[4] = TextureFactory.builder().addIcon(GRANITE_RED_STONE).stdOrient().build();
- rTextures[5] = TextureFactory.builder().addIcon(MARBLE_STONE).stdOrient().build();
- rTextures[6] = TextureFactory.builder().addIcon(BASALT_STONE).stdOrient().build();
+ rTextures[3] = TextureFactory.builder()
+ .addIcon(GRANITE_BLACK_STONE)
+ .stdOrient()
+ .build();
+ rTextures[4] = TextureFactory.builder()
+ .addIcon(GRANITE_RED_STONE)
+ .stdOrient()
+ .build();
+ rTextures[5] = TextureFactory.builder()
+ .addIcon(MARBLE_STONE)
+ .stdOrient()
+ .build();
+ rTextures[6] = TextureFactory.builder()
+ .addIcon(BASALT_STONE)
+ .stdOrient()
+ .build();
return rTextures;
}
}
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java
index fbe0516e6c..566e2486dc 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java
@@ -325,7 +325,8 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements
return ((GT_TileEntity_Ores) tTileEntity).getDrops(getDroppedBlock(), aFortune);
}
return mTemporaryTileEntity.get() == null ? new ArrayList<>()
- : mTemporaryTileEntity.get().getDrops(getDroppedBlock(), aFortune);
+ : mTemporaryTileEntity.get()
+ .getDrops(getDroppedBlock(), aFortune);
}
@Override
@@ -343,7 +344,8 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements
Materials tMaterial = GregTech_API.sGeneratedMaterials[i];
if ((tMaterial != null) && ((tMaterial.mTypes & 0x8) != 0) && !aBlockedOres.contains(tMaterial)) {
for (int meta = i; meta < 23000 + i; meta += 1000) {
- if (!(new ItemStack(aItem, 1, meta).getDisplayName().contains(DOT_NAME)))
+ if (!(new ItemStack(aItem, 1, meta).getDisplayName()
+ .contains(DOT_NAME)))
aList.add(new ItemStack(aItem, 1, meta));
}
}
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java
index f446bc7518..345b0385b0 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java
@@ -54,19 +54,84 @@ public class GT_Block_Reinforced extends GT_Generic_Block {
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Naquadah Reinforced Block");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Neutronium Reinforced Block");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Raw Deep Dark Portal Block");
- ItemList.Block_BronzePlate.set(new ItemStack(this.setHardness(60.0f).setResistance(150.0f), 1, 0));
- ItemList.Block_IridiumTungstensteel.set(new ItemStack(this.setHardness(400.0f).setResistance(600.0f), 1, 1));
- ItemList.Block_Plascrete.set(new ItemStack(this.setHardness(5.0f).setResistance(6.0f), 1, 2));
- ItemList.Block_TungstenSteelReinforced.set(new ItemStack(this.setHardness(250.0f).setResistance(400.0f), 1, 3));
- ItemList.Block_BrittleCharcoal.set(new ItemStack(this.setHardness(0.5f).setResistance(8.0f), 1, 4));
- ItemList.Block_Powderbarrel.set(new ItemStack(this.setHardness(2.5f).setResistance(2.0f), 1, 5));
- ItemList.Block_SSFUEL.set(new ItemStack(this.setHardness(2.5f).setResistance(2.0f), 1, 6));
- ItemList.Block_MSSFUEL.set(new ItemStack(this.setHardness(2.5f).setResistance(2.0f), 1, 7));
- ItemList.Block_SteelPlate.set(new ItemStack(this.setHardness(150.0f).setResistance(200.0f), 1, 8));
- ItemList.Block_TitaniumPlate.set(new ItemStack(this.setHardness(200.0f).setResistance(300.0f), 1, 9));
- ItemList.Block_NaquadahPlate.set(new ItemStack(this.setHardness(500.0f).setResistance(1000.0f), 1, 10));
- ItemList.Block_NeutroniumPlate.set(new ItemStack(this.setHardness(750.0f).setResistance(2500.0f), 1, 11));
- ItemList.Block_BedrockiumCompressed.set(new ItemStack(this.setHardness(1500.0f).setResistance(5000.0f), 1, 12));
+ ItemList.Block_BronzePlate.set(
+ new ItemStack(
+ this.setHardness(60.0f)
+ .setResistance(150.0f),
+ 1,
+ 0));
+ ItemList.Block_IridiumTungstensteel.set(
+ new ItemStack(
+ this.setHardness(400.0f)
+ .setResistance(600.0f),
+ 1,
+ 1));
+ ItemList.Block_Plascrete.set(
+ new ItemStack(
+ this.setHardness(5.0f)
+ .setResistance(6.0f),
+ 1,
+ 2));
+ ItemList.Block_TungstenSteelReinforced.set(
+ new ItemStack(
+ this.setHardness(250.0f)
+ .setResistance(400.0f),
+ 1,
+ 3));
+ ItemList.Block_BrittleCharcoal.set(
+ new ItemStack(
+ this.setHardness(0.5f)
+ .setResistance(8.0f),
+ 1,
+ 4));
+ ItemList.Block_Powderbarrel.set(
+ new ItemStack(
+ this.setHardness(2.5f)
+ .setResistance(2.0f),
+ 1,
+ 5));
+ ItemList.Block_SSFUEL.set(
+ new ItemStack(
+ this.setHardness(2.5f)
+ .setResistance(2.0f),
+ 1,
+ 6));
+ ItemList.Block_MSSFUEL.set(
+ new ItemStack(
+ this.setHardness(2.5f)
+ .setResistance(2.0f),
+ 1,
+ 7));
+ ItemList.Block_SteelPlate.set(
+ new ItemStack(
+ this.setHardness(150.0f)
+ .setResistance(200.0f),
+ 1,
+ 8));
+ ItemList.Block_TitaniumPlate.set(
+ new ItemStack(
+ this.setHardness(200.0f)
+ .setResistance(300.0f),
+ 1,
+ 9));
+ ItemList.Block_NaquadahPlate.set(
+ new ItemStack(
+ this.setHardness(500.0f)
+ .setResistance(1000.0f),
+ 1,
+ 10));
+ ItemList.Block_NeutroniumPlate.set(
+ new ItemStack(
+ this.setHardness(750.0f)
+ .setResistance(2500.0f),
+ 1,
+ 11));
+ ItemList.Block_BedrockiumCompressed.set(
+ new ItemStack(
+ this.setHardness(1500.0f)
+ .setResistance(5000.0f),
+ 1,
+ 12));
GT_ModHandler.addShapelessCraftingRecipe(
new ItemStack(Items.coal, 1, 1),
new Object[] { ItemList.Block_BrittleCharcoal.get(1) });
@@ -257,8 +322,12 @@ public class GT_Block_Reinforced extends GT_Generic_Block {
if (!world.isRemote && world.getBlockMetadata(x, y, z) == 5) {
EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, x + 0.5F, y + 0.5F, z + 0.5F, player);
world.spawnEntityInWorld(entitytntprimed);
- new WorldSpawnedEventBuilder.SoundAtEntityEventBuilder().setPitch(1f).setVolume(1f)
- .setIdentifier(SoundResource.GAME_TNT_PRIMED).setEntity(entitytntprimed).setWorld(world).run();
+ new WorldSpawnedEventBuilder.SoundAtEntityEventBuilder().setPitch(1f)
+ .setVolume(1f)
+ .setIdentifier(SoundResource.GAME_TNT_PRIMED)
+ .setEntity(entitytntprimed)
+ .setWorld(world)
+ .run();
world.setBlockToAir(x, y, z);
return false;
}
@@ -298,9 +367,9 @@ public class GT_Block_Reinforced extends GT_Generic_Block {
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float xOffset,
float yOffset, float zOffset) {
- if ((player.getCurrentEquippedItem() != null)
- && (player.getCurrentEquippedItem().getItem() == Items.flint_and_steel)
- && world.getBlockMetadata(x, y, z) == 5) {
+ if ((player.getCurrentEquippedItem() != null) && (player.getCurrentEquippedItem()
+ .getItem()
+ == Items.flint_and_steel) && world.getBlockMetadata(x, y, z) == 5) {
removedByPlayer(world, player, x, y, z);
return true;
@@ -317,7 +386,9 @@ public class GT_Block_Reinforced extends GT_Generic_Block {
public void getSubBlocks(Item aItem, CreativeTabs aCreativeTab, List aList) {
for (int i = 0; i < 16; i++) {
ItemStack aStack = new ItemStack(aItem, 1, i);
- if (!aStack.getDisplayName().contains(".name")) aList.add(aStack);
+ if (!aStack.getDisplayName()
+ .contains(".name"))
+ aList.add(aStack);
}
}
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Storage.java b/src/main/java/gregtech/common/blocks/GT_Block_Storage.java
index 967d98c080..e8e36a2b56 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Storage.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Storage.java
@@ -96,7 +96,9 @@ public class GT_Block_Storage extends GT_Generic_Block {
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item aItem, CreativeTabs aCreativeTab, List aList) {
for (int i = 0; i < 16; i++) {
- if (!(new ItemStack(aItem, 1, i).getDisplayName().contains(".name"))) aList.add(new ItemStack(aItem, 1, i));
+ if (!(new ItemStack(aItem, 1, i).getDisplayName()
+ .contains(".name")))
+ aList.add(new ItemStack(aItem, 1, i));
}
}
}
diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java
index b7fe3298ec..57b2ccae3e 100644
--- a/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java
+++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java
@@ -17,10 +17,12 @@ public class GT_Item_Casings5 extends GT_Item_Casings_Abstract {
super(block);
}
- protected static final String mCoilHeatTooltip = GT_LanguageManager
- .addStringLocalization("gt.coilheattooltip", "Base Heating Capacity = ");
- protected static final String mCoilUnitTooltip = GT_LanguageManager
- .addStringLocalization("gt.coilunittooltip", " Kelvin");
+ protected static final String mCoilHeatTooltip = GT_LanguageManager.addStringLocalization(
+ "gt.coilheattooltip",
+ "Base Heating Capacity = ");
+ protected static final String mCoilUnitTooltip = GT_LanguageManager.addStringLocalization(
+ "gt.coilunittooltip",
+ " Kelvin");
@Override
@SideOnly(Side.CLIENT)
diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings_Abstract.java
index bd6b12c23a..12c6619bcb 100644
--- a/src/main/java/gregtech/common/blocks/GT_Item_Casings_Abstract.java
+++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings_Abstract.java
@@ -12,30 +12,42 @@ import gregtech.api.util.GT_LanguageManager;
public abstract class GT_Item_Casings_Abstract extends ItemBlock {
- 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 mCoil01Tooltip = GT_LanguageManager
- .addStringLocalization("gt.coil01tooltip", "Base Heating Capacity = 1800 Kelvin");
- protected final String mCoil02Tooltip = GT_LanguageManager
- .addStringLocalization("gt.coil02tooltip", "Base Heating Capacity = 2700 Kelvin");
- protected final String mCoil03Tooltip = GT_LanguageManager
- .addStringLocalization("gt.coil03tooltip", "Base Heating Capacity = 3600 Kelvin");
- protected final String mCoil04Tooltip = GT_LanguageManager
- .addStringLocalization("gt.coil04tooltip", "Base Heating Capacity = 4500 Kelvin");
- protected final String mCoil05Tooltip = GT_LanguageManager
- .addStringLocalization("gt.coil05tooltip", "Base Heating Capacity = 5400 Kelvin");
- protected final String mCoil06Tooltip = GT_LanguageManager
- .addStringLocalization("gt.coil06tooltip", "Base Heating Capacity = 7200 Kelvin");
- protected final String mCoil07Tooltip = GT_LanguageManager
- .addStringLocalization("gt.coil07tooltip", "Base Heating Capacity = 9001 Kelvin");
- protected final String mCoil08Tooltip = GT_LanguageManager
- .addStringLocalization("gt.coil08tooltip", "Base Heating Capacity = 9900 Kelvin");
- protected final String mCoil09Tooltip = GT_LanguageManager
- .addStringLocalization("gt.coil09tooltip", "Base Heating Capacity = 10800 Kelvin");
- protected final String mBlastProofTooltip = GT_LanguageManager
- .addStringLocalization("gt.blastprooftooltip", "This Block is Blast Proof");
+ 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 mCoil01Tooltip = GT_LanguageManager.addStringLocalization(
+ "gt.coil01tooltip",
+ "Base Heating Capacity = 1800 Kelvin");
+ protected final String mCoil02Tooltip = GT_LanguageManager.addStringLocalization(
+ "gt.coil02tooltip",
+ "Base Heating Capacity = 2700 Kelvin");
+ protected final String mCoil03Tooltip = GT_LanguageManager.addStringLocalization(
+ "gt.coil03tooltip",
+ "Base Heating Capacity = 3600 Kelvin");
+ protected final String mCoil04Tooltip = GT_LanguageManager.addStringLocalization(
+ "gt.coil04tooltip",
+ "Base Heating Capacity = 4500 Kelvin");
+ protected final String mCoil05Tooltip = GT_LanguageManager.addStringLocalization(
+ "gt.coil05tooltip",
+ "Base Heating Capacity = 5400 Kelvin");
+ protected final String mCoil06Tooltip = GT_LanguageManager.addStringLocalization(
+ "gt.coil06tooltip",
+ "Base Heating Capacity = 7200 Kelvin");
+ protected final String mCoil07Tooltip = GT_LanguageManager.addStringLocalization(
+ "gt.coil07tooltip",
+ "Base Heating Capacity = 9001 Kelvin");
+ protected final String mCoil08Tooltip = GT_LanguageManager.addStringLocalization(
+ "gt.coil08tooltip",
+ "Base Heating Capacity = 9900 Kelvin");
+ protected final String mCoil09Tooltip = GT_LanguageManager.addStringLocalization(
+ "gt.coil09tooltip",
+ "Base Heating Capacity = 10800 Kelvin");
+ protected final String mBlastProofTooltip = GT_LanguageManager.addStringLocalization(
+ "gt.blastprooftooltip",
+ "This Block is Blast Proof");
public GT_Item_Casings_Abstract(Block block) {
super(block);
diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Concretes.java b/src/main/java/gregtech/common/blocks/GT_Item_Concretes.java
index c659d153d9..13b4ba2d25 100644
--- a/src/main/java/gregtech/common/blocks/GT_Item_Concretes.java
+++ b/src/main/java/gregtech/common/blocks/GT_Item_Concretes.java
@@ -10,8 +10,9 @@ import gregtech.api.util.GT_LanguageManager;
public class GT_Item_Concretes extends GT_Item_Stones_Abstract {
- private final String mRunFasterToolTip = GT_LanguageManager
- .addStringLocalization("gt.runfastertooltip", "You can walk faster on this Block");
+ private final String mRunFasterToolTip = GT_LanguageManager.addStringLocalization(
+ "gt.runfastertooltip",
+ "You can walk faster on this Block");
public GT_Item_Concretes(Block block) {
super(block);
diff --git a/src/main/java/gregtech/common/blocks/GT_Item_LongDistancePipe.java b/src/main/java/gregtech/common/blocks/GT_Item_LongDistancePipe.java
index 5ce04103ab..66c8abc3e2 100644
--- a/src/main/java/gregtech/common/blocks/GT_Item_LongDistancePipe.java
+++ b/src/main/java/gregtech/common/blocks/GT_Item_LongDistancePipe.java
@@ -12,10 +12,12 @@ import gregtech.api.util.GT_LanguageManager;
public class GT_Item_LongDistancePipe extends ItemBlock {
- 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 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 GT_Item_LongDistancePipe(Block block) {
super(block);
diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java
index f7ce8942c0..6965ffda2f 100644
--- a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java
+++ b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java
@@ -67,8 +67,7 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem {
final IGregTechTileEntity tTileEntity = GregTech_API.METATILEENTITIES[tDamage].getBaseMetaTileEntity();
if (!GregTech_API.sPostloadFinished
&& tTileEntity.getMetaTileEntity() instanceof ISecondaryDescribable) {
- final String[] tSecondaryDescription = ((ISecondaryDescribable) tTileEntity.getMetaTileEntity())
- .getSecondaryDescription();
+ final String[] tSecondaryDescription = ((ISecondaryDescribable) tTileEntity.getMetaTileEntity()).getSecondaryDescription();
addDescription(null, tSecondaryDescription, tDamage, "_Secondary", true);
}
{
@@ -133,8 +132,8 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem {
if (GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_QuantumTank
|| GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_SuperTank) {
if (aStack.hasTagCompound() && aStack.stackTagCompound.hasKey("mFluid")) {
- final FluidStack tContents = FluidStack
- .loadFluidStackFromNBT(aStack.stackTagCompound.getCompoundTag("mFluid"));
+ final FluidStack tContents = FluidStack.loadFluidStackFromNBT(
+ aStack.stackTagCompound.getCompoundTag("mFluid"));
if (tContents != null && tContents.amount > 0) {
aList.add(
GT_LanguageManager.addStringLocalization(
@@ -156,8 +155,8 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem {
}
if (GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_DigitalChestBase) {
if (aStack.hasTagCompound() && aStack.stackTagCompound.hasKey("mItemStack")) {
- final ItemStack tContents = ItemStack
- .loadItemStackFromNBT(aStack.stackTagCompound.getCompoundTag("mItemStack"));
+ final ItemStack tContents = ItemStack.loadItemStackFromNBT(
+ aStack.stackTagCompound.getCompoundTag("mItemStack"));
final int tSize = aStack.stackTagCompound.getInteger("mItemCount");
if (tContents != null && tSize > 0) {
aList.add(
@@ -244,10 +243,9 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem {
if (aDamage >= GregTech_API.METATILEENTITIES.length) return;
if (GregTech_API.METATILEENTITIES[aDamage] != null) {
final IMetaTileEntity tMetaTileEntity = GregTech_API.METATILEENTITIES[aDamage].getBaseMetaTileEntity()
- .getMetaTileEntity();
+ .getMetaTileEntity();
if (tMetaTileEntity instanceof ISecondaryDescribable) {
- final String[] tSecondaryDescription = ((ISecondaryDescribable) tMetaTileEntity)
- .getSecondaryDescription();
+ final String[] tSecondaryDescription = ((ISecondaryDescribable) tMetaTileEntity).getSecondaryDescription();
addDescription(null, tSecondaryDescription, aDamage, "_Secondary", true);
}
addDescription(null, tMetaTileEntity.getDescription(), aDamage, "", true);
@@ -332,7 +330,8 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem {
tTileEntity.setOwnerName(aPlayer.getDisplayName());
tTileEntity.setOwnerUuid(aPlayer.getUniqueID());
}
- tTileEntity.getMetaTileEntity().initDefaultModes(aStack.getTagCompound());
+ tTileEntity.getMetaTileEntity()
+ .initDefaultModes(aStack.getTagCompound());
final byte aSide = GT_Utility.getOppositeSide(side);
if (tTileEntity.getMetaTileEntity() instanceof IConnectable) {
// If we're connectable, try connecting to whatever we're up against
diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Ores.java b/src/main/java/gregtech/common/blocks/GT_Item_Ores.java
index e32558795c..f3cdaab1ba 100644
--- a/src/main/java/gregtech/common/blocks/GT_Item_Ores.java
+++ b/src/main/java/gregtech/common/blocks/GT_Item_Ores.java
@@ -74,8 +74,8 @@ public class GT_Item_Ores extends ItemBlock {
@Override
public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) {
- String formula = StatCollector
- .translateToLocal(field_150939_a.getUnlocalizedName() + '.' + getDamage(aStack) + ".tooltip");
+ String formula = StatCollector.translateToLocal(
+ field_150939_a.getUnlocalizedName() + '.' + getDamage(aStack) + ".tooltip");
if (!StringUtils.isBlank(formula)) aList.add(formula);
}
}
diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Stones_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Item_Stones_Abstract.java
index db6356b173..5a75f28dae 100644
--- a/src/main/java/gregtech/common/blocks/GT_Item_Stones_Abstract.java
+++ b/src/main/java/gregtech/common/blocks/GT_Item_Stones_Abstract.java
@@ -12,8 +12,9 @@ import gregtech.api.util.GT_LanguageManager;
public class GT_Item_Stones_Abstract extends ItemBlock {
- private final String mNoMobsToolTip = GT_LanguageManager
- .addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block");
+ private final String mNoMobsToolTip = GT_LanguageManager.addStringLocalization(
+ "gt.nomobspawnsonthisblock",
+ "Mobs cannot Spawn on this Block");
public GT_Item_Stones_Abstract(Block block) {
super(block);
diff --git a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java
index 92596a6c1a..099ccf2e65 100644
--- a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java
+++ b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java
@@ -35,8 +35,9 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit
public static byte getHarvestData(short aMetaData, int aBaseBlockHarvestLevel) {
Materials aMaterial = GregTech_API.sGeneratedMaterials[(aMetaData % 1000)];
byte tByte = aMaterial == null ? 0
- : (byte) Math
- .max(aBaseBlockHarvestLevel, Math.min(7, aMaterial.mToolQuality - (aMetaData < 16000 ? 0 : 1)));
+ : (byte) Math.max(
+ aBaseBlockHarvestLevel,
+ Math.min(7, aMaterial.mToolQuality - (aMetaData < 16000 ? 0 : 1)));
if (GT_Mod.gregtechproxy.mChangeHarvestLevels) {
tByte = aMaterial == null ? 0
: (byte) Math.max(
@@ -218,11 +219,19 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit
public void overrideOreBlockMaterial(Block aOverridingStoneBlock, byte aOverridingStoneMeta) {
if (this.worldObj == null || blockType == null) return;
this.mMetaData = ((short) (int) (this.mMetaData % 1000L + this.mMetaData / 16000L * 16000L));
- if (aOverridingStoneBlock
- .isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.netherrack)) {
+ if (aOverridingStoneBlock.isReplaceableOreGen(
+ this.worldObj,
+ this.xCoord,
+ this.yCoord,
+ this.zCoord,
+ Blocks.netherrack)) {
this.mMetaData = ((short) (this.mMetaData + 1000));
- } else if (aOverridingStoneBlock
- .isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.end_stone)) {
+ } else if (aOverridingStoneBlock.isReplaceableOreGen(
+ this.worldObj,
+ this.xCoord,
+ this.yCoord,
+ this.zCoord,
+ Blocks.end_stone)) {
this.mMetaData = ((short) (this.mMetaData + 2000));
} else
if (aOverridingStoneBlock.isReplaceableOreGen(
@@ -279,8 +288,8 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit
this.zCoord,
getHarvestData(
aMeta,
- ((GT_Block_Ores_Abstract) tTileEntity.blockType)
- .getBaseBlockHarvestLevel(aMeta % 16000 / 1000)),
+ ((GT_Block_Ores_Abstract) tTileEntity.blockType).getBaseBlockHarvestLevel(
+ aMeta % 16000 / 1000)),
0);
}
}
@@ -389,8 +398,10 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit
Materials dustMat = ((GT_Block_Ores_Abstract) aDroppedOre).getDroppedDusts()[this.mMetaData / 1000
% 16];
if (dustMat != null) rList.add(
- GT_OreDictUnificator
- .get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, dustMat, 1L));
+ GT_OreDictUnificator.get(
+ tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust,
+ dustMat,
+ 1L));
}
}
return rList;
@@ -401,16 +412,22 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit
Materials aMaterial = GregTech_API.sGeneratedMaterials[(this.mMetaData % 1000)];
if ((aMaterial != null) && (this.mMetaData < 32000)) {
ITexture iTexture = TextureFactory.builder()
- .addIcon(
- aMaterial.mIconSet.mTextures[this.mMetaData / 16000 == 0 ? OrePrefixes.ore.mTextureIndex
- : OrePrefixes.oreSmall.mTextureIndex])
- .setRGBA(aMaterial.mRGBa).stdOrient().build();
+ .addIcon(
+ aMaterial.mIconSet.mTextures[this.mMetaData / 16000 == 0
+ ? OrePrefixes.ore.mTextureIndex
+ : OrePrefixes.oreSmall.mTextureIndex])
+ .setRGBA(aMaterial.mRGBa)
+ .stdOrient()
+ .build();
if (aBlock instanceof GT_Block_Ores_Abstract) {
return new ITexture[] {
((GT_Block_Ores_Abstract) aBlock).getTextureSet()[((this.mMetaData / 1000) % 16)], iTexture };
}
}
return new ITexture[] { TextureFactory.of(Blocks.stone, 0), TextureFactory.builder()
- .addIcon(SET_NONE.mTextures[OrePrefixes.ore.mTextureIndex]).stdOrient().build() };
+ .addIcon(
+ SET_NONE.mTextures[OrePrefixes.ore.mTextureIndex])
+ .stdOrient()
+ .build() };
}
}
diff --git a/src/main/java/gregtech/common/covers/CoverInfo.java b/src/main/java/gregtech/common/covers/CoverInfo.java
index 206a82ca2e..cc6d2db1e9 100644
--- a/src/main/java/gregtech/common/covers/CoverInfo.java
+++ b/src/main/java/gregtech/common/covers/CoverInfo.java
@@ -136,8 +136,13 @@ public final class CoverInfo {
}
public ISerializableObject doCoverThings(long aTickTimer, byte aRedstone) {
- return getCoverBehavior()
- .doCoverThings(coverSide, aRedstone, coverID, coverData, coveredTile.get(), aTickTimer);
+ return getCoverBehavior().doCoverThings(
+ coverSide,
+ aRedstone,
+ coverID,
+ coverData,
+ coveredTile.get(),
+ aTickTimer);
}
public void onBaseTEDestroyed() {
@@ -219,8 +224,15 @@ public final class CoverInfo {
}
public boolean onCoverRightClick(EntityPlayer aPlayer, float aX, float aY, float aZ) {
- return getCoverBehavior()
- .onCoverRightClick(coverSide, coverID, coverData, coveredTile.get(), aPlayer, aX, aY, aZ);
+ return getCoverBehavior().onCoverRightClick(
+ coverSide,
+ coverID,
+ coverData,
+ coveredTile.get(),
+ aPlayer,
+ aX,
+ aY,
+ aZ);
}
public boolean onCoverShiftRightClick(EntityPlayer aPlayer) {
@@ -228,8 +240,15 @@ public final class CoverInfo {
}
public ISerializableObject onCoverScrewdriverClick(EntityPlayer aPlayer, float aX, float aY, float aZ) {
- return getCoverBehavior()
- .onCoverScrewdriverClick(coverSide, coverID, coverData, coveredTile.get(), aPlayer, aX, aY, aZ);
+ return getCoverBehavior().onCoverScrewdriverClick(
+ coverSide,
+ coverID,
+ coverData,
+ coveredTile.get(),
+ aPlayer,
+ aX,
+ aY,
+ aZ);
}
public Block getFacadeBlock() {
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java
index 845e74d1ab..83cf48386d 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java
@@ -305,8 +305,10 @@ public class GT_Cover_Arm extends GT_CoverBehavior {
protected void addUIWidgets(ModularWindow.Builder builder) {
maxSlot = getMaxSlot();
builder.widget(
- new CoverDataControllerWidget<>(this::getCoverData, this::setCoverData, GT_Cover_Arm.this)
- .addFollower(
+ new CoverDataControllerWidget<>(
+ this::getCoverData,
+ this::setCoverData,
+ GT_Cover_Arm.this).addFollower(
CoverDataFollower_ToggleButtonWidget.ofDisableable(),
coverData -> getFlagExport(convert(coverData)) > 0,
(coverData, state) -> {
@@ -319,95 +321,118 @@ public class GT_Cover_Arm extends GT_CoverBehavior {
}
},
widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_EXPORT)
- .addTooltip(GT_Utility.trans("006", "Export"))
- .setPos(spaceX * 0, spaceY * 0))
- .addFollower(
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- coverData -> getFlagExport(convert(coverData)) == 0,
- (coverData, state) -> {
- if (state) {
- return new ISerializableObject.LegacyCoverData(
- convert(coverData) & ~EXPORT_MASK | CONVERTED_BIT);
- } else {
- return new ISerializableObject.LegacyCoverData(
- convert(coverData) | EXPORT_MASK | CONVERTED_BIT);
- }
- },
- widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_IMPORT)
- .addTooltip(GT_Utility.trans("007", "Import"))
- .setPos(spaceX * 1, spaceY * 0))
- .addFollower(
- new CoverDataFollower_TextFieldWidget<>(),
- coverData -> getTextFieldContent(getFlagInternalSlot(convert(coverData)) - 1),
- (coverData, state) -> {
- final int coverVariable = convert(coverData);
- return new ISerializableObject.LegacyCoverData(
- getFlagExport(coverVariable)
- | ((getIntFromText(state) + 1) & SLOT_ID_MASK)
- | (getFlagAdjacentSlot(coverVariable) << 14)
- | CONVERTED_BIT);
- },
- widget -> widget.setOnScrollText().setValidator(val -> {
- final int valSlot = getIntFromText(val);
- if (valSlot > -1) {
- return TextFieldWidget.format.format(Math.min(valSlot, maxSlot));
- } else {
- return ANY_TEXT;
- }
- }).setPattern(BaseTextFieldWidget.NATURAL_NUMS).setFocusOnGuiOpen(true)
- .setPos(spaceX * 0, spaceY * 1 + 2).setSize(spaceX * 2 + 5, 12))
- .addFollower(
- new CoverDataFollower_TextFieldWidget<>(),
- coverData -> getTextFieldContent(getFlagAdjacentSlot(convert(coverData)) - 1),
- (coverData, state) -> {
- final int coverVariable = convert(coverData);
- return new ISerializableObject.LegacyCoverData(
- getFlagExport(coverVariable) | getFlagInternalSlot(coverVariable)
- | (((getIntFromText(state) + 1) & SLOT_ID_MASK) << 14)
- | CONVERTED_BIT);
- },
- widget -> widget.setValidator(val -> {
- final int valSlot = getIntFromText(val);
- final int adjacentMaxSlot;
- final ICoverable tile = getUIBuildContext().getTile();
- if (tile instanceof TileEntity && !tile.isDead()) {
- TileEntity adj = tile
- .getTileEntityAtSide(getUIBuildContext().getCoverSide());
- if (adj instanceof IInventory)
- adjacentMaxSlot = ((IInventory) adj).getSizeInventory() - 1;
- else adjacentMaxSlot = -1;
- } else {
- adjacentMaxSlot = -1;
- }
- if (valSlot > -1) {
- return TextFieldWidget.format.format(Math.min(valSlot, adjacentMaxSlot));
- } else {
- return ANY_TEXT;
- }
- }).setOnScroll((text, direction) -> {
- final int val = getIntFromText(text);
- int step = (GuiScreen.isShiftKeyDown() ? 50 : GuiScreen.isCtrlKeyDown() ? 5 : 1)
- * direction;
- return TextFieldWidget.format.format(val + step);
- }).setPattern(BaseTextFieldWidget.NATURAL_NUMS).setPos(spaceX * 0, spaceY * 2 + 2)
- .setSize(spaceX * 2 + 5, 12))
- .setPos(startX, startY))
- .widget(
- TextWidget
- .dynamicString(
- () -> (convert(getCoverData()) & EXPORT_MASK) > 0
- ? GT_Utility.trans("006", "Export")
- : GT_Utility.trans("007", "Import"))
- .setSynced(false).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 3, 4 + startY + spaceY * 0))
- .widget(
- new TextWidget(GT_Utility.trans("254.1", "Internal slot#"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 3, 4 + startY + spaceY * 1))
- .widget(
- new TextWidget(GT_Utility.trans("255", "Adjacent slot#"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 3, 4 + startY + spaceY * 2));
+ .addTooltip(GT_Utility.trans("006", "Export"))
+ .setPos(spaceX * 0, spaceY * 0))
+ .addFollower(
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ coverData -> getFlagExport(convert(coverData)) == 0,
+ (coverData, state) -> {
+ if (state) {
+ return new ISerializableObject.LegacyCoverData(
+ convert(coverData) & ~EXPORT_MASK
+ | CONVERTED_BIT);
+ } else {
+ return new ISerializableObject.LegacyCoverData(
+ convert(coverData) | EXPORT_MASK | CONVERTED_BIT);
+ }
+ },
+ widget -> widget.setStaticTexture(
+ GT_UITextures.OVERLAY_BUTTON_IMPORT)
+ .addTooltip(GT_Utility.trans("007", "Import"))
+ .setPos(spaceX * 1, spaceY * 0))
+ .addFollower(
+ new CoverDataFollower_TextFieldWidget<>(),
+ coverData -> getTextFieldContent(
+ getFlagInternalSlot(convert(coverData)) - 1),
+ (coverData, state) -> {
+ final int coverVariable = convert(coverData);
+ return new ISerializableObject.LegacyCoverData(
+ getFlagExport(coverVariable)
+ | ((getIntFromText(state) + 1) & SLOT_ID_MASK)
+ | (getFlagAdjacentSlot(coverVariable) << 14)
+ | CONVERTED_BIT);
+ },
+ widget -> widget.setOnScrollText()
+ .setValidator(val -> {
+ final int valSlot = getIntFromText(val);
+ if (valSlot > -1) {
+ return TextFieldWidget.format.format(
+ Math.min(valSlot, maxSlot));
+ } else {
+ return ANY_TEXT;
+ }
+ })
+ .setPattern(BaseTextFieldWidget.NATURAL_NUMS)
+ .setFocusOnGuiOpen(true)
+ .setPos(spaceX * 0, spaceY * 1 + 2)
+ .setSize(spaceX * 2 + 5, 12))
+ .addFollower(
+ new CoverDataFollower_TextFieldWidget<>(),
+ coverData -> getTextFieldContent(
+ getFlagAdjacentSlot(convert(coverData)) - 1),
+ (coverData, state) -> {
+ final int coverVariable = convert(coverData);
+ return new ISerializableObject.LegacyCoverData(
+ getFlagExport(coverVariable)
+ | getFlagInternalSlot(coverVariable)
+ | (((getIntFromText(state) + 1)
+ & SLOT_ID_MASK) << 14)
+ | CONVERTED_BIT);
+ },
+ widget -> widget.setValidator(val -> {
+ final int valSlot = getIntFromText(val);
+ final int adjacentMaxSlot;
+ final ICoverable tile = getUIBuildContext().getTile();
+ if (tile instanceof TileEntity && !tile.isDead()) {
+ TileEntity adj = tile.getTileEntityAtSide(
+ getUIBuildContext().getCoverSide());
+ if (adj instanceof IInventory)
+ adjacentMaxSlot = ((IInventory) adj).getSizeInventory()
+ - 1;
+ else adjacentMaxSlot = -1;
+ } else {
+ adjacentMaxSlot = -1;
+ }
+ if (valSlot > -1) {
+ return TextFieldWidget.format.format(
+ Math.min(valSlot, adjacentMaxSlot));
+ } else {
+ return ANY_TEXT;
+ }
+ })
+ .setOnScroll((text, direction) -> {
+ final int val = getIntFromText(text);
+ int step = (GuiScreen.isShiftKeyDown() ? 50
+ : GuiScreen.isCtrlKeyDown() ? 5 : 1)
+ * direction;
+ return TextFieldWidget.format.format(
+ val + step);
+ })
+ .setPattern(BaseTextFieldWidget.NATURAL_NUMS)
+ .setPos(spaceX * 0, spaceY * 2 + 2)
+ .setSize(spaceX * 2 + 5, 12))
+ .setPos(startX, startY))
+ .widget(
+ TextWidget.dynamicString(
+ () -> (convert(getCoverData()) & EXPORT_MASK) > 0 ? GT_Utility.trans("006", "Export")
+ : GT_Utility.trans("007", "Import"))
+ .setSynced(false)
+ .setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(startX + spaceX * 3, 4 + startY + spaceY * 0))
+ .widget(
+ new TextWidget(GT_Utility.trans("254.1", "Internal slot#"))
+ .setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 3,
+ 4 + startY + spaceY * 1))
+ .widget(
+ new TextWidget(GT_Utility.trans("255", "Adjacent slot#"))
+ .setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 3,
+ 4 + startY + spaceY * 2));
}
private int getMaxSlot() {
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java b/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java
index f3176896f8..6ed09dbf06 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java
@@ -212,47 +212,64 @@ public class GT_Cover_ControlsWork extends GT_CoverBehavior implements IControls
0,
CoverDataFollower_ToggleButtonWidget.ofDisableable(),
widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON)
- .setPos(spaceX * 0, spaceY * 0))
- .addToggleButton(
- 1,
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- widget -> widget
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF)
- .setPos(spaceX * 0, spaceY * 1))
- .addToggleButton(
- 2,
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- widget -> widget
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_CROSS)
- .setPos(spaceX * 0, spaceY * 2))
- .setPos(startX, startY))
- .widget(
- new CoverDataControllerWidget<>(
- this::getCoverData,
- this::setCoverData,
- GT_Cover_ControlsWork.this)
- .addFollower(
- CoverDataFollower_ToggleButtonWidget.ofCheckAndCross(),
- coverData -> convert(coverData) > 2,
- (coverData, state) -> new ISerializableObject.LegacyCoverData(
- adjustCoverVariable(state, convert(coverData))),
- widget -> widget.setPos(spaceX * 0, spaceY * 3))
- .setPos(startX, startY))
- .widget(
- new TextWidget(GT_Utility.trans("243", "Enable with Redstone"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 0))
- .widget(
- new TextWidget(GT_Utility.trans("244", "Disable with Redstone"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 1))
- .widget(
- new TextWidget(GT_Utility.trans("245", "Disable machine"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 2))
- .widget(
- new TextWidget(GT_Utility.trans("507", "Safe Mode")).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 3));
+ .setPos(spaceX * 0, spaceY * 0))
+ .addToggleButton(
+ 1,
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ widget -> widget.setStaticTexture(
+ GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF)
+ .setPos(
+ spaceX * 0,
+ spaceY * 1))
+ .addToggleButton(
+ 2,
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ widget -> widget.setStaticTexture(
+ GT_UITextures.OVERLAY_BUTTON_CROSS)
+ .setPos(
+ spaceX * 0,
+ spaceY * 2))
+ .setPos(startX, startY))
+ .widget(
+ new CoverDataControllerWidget<>(
+ this::getCoverData,
+ this::setCoverData,
+ GT_Cover_ControlsWork.this).addFollower(
+ CoverDataFollower_ToggleButtonWidget.ofCheckAndCross(),
+ coverData -> convert(coverData) > 2,
+ (coverData, state) -> new ISerializableObject.LegacyCoverData(
+ adjustCoverVariable(state, convert(coverData))),
+ widget -> widget.setPos(spaceX * 0, spaceY * 3))
+ .setPos(startX, startY))
+ .widget(
+ new TextWidget(GT_Utility.trans("243", "Enable with Redstone"))
+ .setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ 3 + startX
+ + spaceX * 1,
+ 4 + startY
+ + spaceY * 0))
+ .widget(
+ new TextWidget(
+ GT_Utility.trans("244", "Disable with Redstone"))
+ .setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ 3 + startX + spaceX * 1,
+ 4 + startY + spaceY * 1))
+ .widget(
+ new TextWidget(GT_Utility.trans("245", "Disable machine"))
+ .setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ 3 + startX + spaceX * 1,
+ 4 + startY + spaceY * 2))
+ .widget(
+ new TextWidget(GT_Utility.trans("507", "Safe Mode")).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(
+ 3 + startX + spaceX * 1,
+ 4 + startY + spaceY * 3));
}
private int getNewCoverVariable(int id, int coverVariable) {
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java
index a2a0fcb8cf..e056c1c02d 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java
@@ -223,69 +223,100 @@ public class GT_Cover_Conveyor extends GT_CoverBehavior {
0,
CoverDataFollower_ToggleButtonWidget.ofDisableable(),
widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_EXPORT)
- .addTooltip(GT_Utility.trans("006", "Export"))
- .setPos(spaceX * 0, spaceY * 0))
- .addToggleButton(
- 1,
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- widget -> widget
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_IMPORT)
- .addTooltip(GT_Utility.trans("007", "Import"))
- .setPos(spaceX * 1, spaceY * 0))
- .addToggleButton(
- 2,
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- widget -> widget
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_CHECKMARK)
- .addTooltip(GT_Utility.trans("224", "Always On"))
- .setPos(spaceX * 0, spaceY * 1))
- .addToggleButton(
- 3,
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- widget -> widget
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON)
- .addTooltip(
- GT_Utility.trans(
- "225",
- "Active with Redstone Signal"))
- .setPos(spaceX * 1, spaceY * 1))
- .addToggleButton(
- 4,
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- widget -> widget
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF)
- .addTooltip(
- GT_Utility.trans(
- "226",
- "Inactive with Redstone Signal"))
- .setPos(spaceX * 2, spaceY * 1))
- .addToggleButton(
- 5,
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- widget -> widget
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_ALLOW_INPUT)
- .addTooltip(GT_Utility.trans("227", "Allow Input"))
- .setPos(spaceX * 0, spaceY * 2))
- .addToggleButton(
- 6,
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- widget -> widget
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_BLOCK_INPUT)
- .addTooltip(GT_Utility.trans("228", "Block Input"))
- .setPos(spaceX * 1, spaceY * 2))
- .setPos(startX, startY))
- .widget(
- new TextWidget(GT_Utility.trans("229", "Import/Export"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 3, 3 + startY + spaceY * 0))
- .widget(
- new TextWidget(GT_Utility.trans("230", "Conditional"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 3, 3 + startY + spaceY * 1))
- .widget(
- new TextWidget(GT_Utility.trans("231", "Enable Input"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 3, 3 + startY + spaceY * 2));
+ .addTooltip(GT_Utility.trans("006", "Export"))
+ .setPos(spaceX * 0, spaceY * 0))
+ .addToggleButton(
+ 1,
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ widget -> widget.setStaticTexture(
+ GT_UITextures.OVERLAY_BUTTON_IMPORT)
+ .addTooltip(
+ GT_Utility.trans(
+ "007",
+ "Import"))
+ .setPos(
+ spaceX * 1,
+ spaceY * 0))
+ .addToggleButton(
+ 2,
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ widget -> widget.setStaticTexture(
+ GT_UITextures.OVERLAY_BUTTON_CHECKMARK)
+ .addTooltip(
+ GT_Utility.trans(
+ "224",
+ "Always On"))
+ .setPos(
+ spaceX * 0,
+ spaceY * 1))
+ .addToggleButton(
+ 3,
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ widget -> widget.setStaticTexture(
+ GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON)
+ .addTooltip(
+ GT_Utility.trans(
+ "225",
+ "Active with Redstone Signal"))
+ .setPos(
+ spaceX * 1,
+ spaceY * 1))
+ .addToggleButton(
+ 4,
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ widget -> widget.setStaticTexture(
+ GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF)
+ .addTooltip(
+ GT_Utility.trans(
+ "226",
+ "Inactive with Redstone Signal"))
+ .setPos(
+ spaceX * 2,
+ spaceY * 1))
+ .addToggleButton(
+ 5,
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ widget -> widget.setStaticTexture(
+ GT_UITextures.OVERLAY_BUTTON_ALLOW_INPUT)
+ .addTooltip(
+ GT_Utility.trans(
+ "227",
+ "Allow Input"))
+ .setPos(
+ spaceX * 0,
+ spaceY * 2))
+ .addToggleButton(
+ 6,
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ widget -> widget.setStaticTexture(
+ GT_UITextures.OVERLAY_BUTTON_BLOCK_INPUT)
+ .addTooltip(
+ GT_Utility.trans(
+ "228",
+ "Block Input"))
+ .setPos(
+ spaceX * 1,
+ spaceY * 2))
+ .setPos(startX, startY))
+ .widget(
+ new TextWidget(GT_Utility.trans("229", "Import/Export"))
+ .setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 3,
+ 3 + startY + spaceY * 0))
+ .widget(
+ new TextWidget(GT_Utility.trans("230", "Conditional")).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 3,
+ 3 + startY + spaceY * 1))
+ .widget(
+ new TextWidget(GT_Utility.trans("231", "Enable Input"))
+ .setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 3,
+ 3 + startY + spaceY * 2));
}
private int getNewCoverVariable(int id, int coverVariable) {
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java b/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java
index ff6741067c..c4d3364ba0 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java
@@ -170,34 +170,37 @@ public class GT_Cover_DoesWork extends GT_CoverBehavior {
0,
CoverDataFollower_ToggleButtonWidget.ofDisableable(),
widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_PROGRESS)
- .setPos(spaceX * 0, spaceY * 0))
- .addToggleButton(
- 1,
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- widget -> widget
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_CHECKMARK)
- .setPos(spaceX * 1, spaceY * 0))
- .addToggleButton(
- 2,
- CoverDataFollower_ToggleButtonWidget.ofRedstone(),
- widget -> widget.setPos(spaceX * 0, spaceY * 1))
- .setPos(startX, startY))
- .widget(
- TextWidget
- .dynamicString(
- () -> ((convert(getCoverData()) & 0x2) > 0)
- ? GT_Utility.trans("242", "Machine idle")
- : GT_Utility.trans("241", "Recipe progress"))
- .setSynced(false).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 3, 4 + startY + spaceY * 0))
- .widget(
- TextWidget
- .dynamicString(
- () -> ((convert(getCoverData()) & 0x1) > 0)
- ? GT_Utility.trans("INVERTED", "Inverted")
- : GT_Utility.trans("NORMAL", "Normal"))
- .setSynced(false).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 3, 4 + startY + spaceY * 1));
+ .setPos(spaceX * 0, spaceY * 0))
+ .addToggleButton(
+ 1,
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ widget -> widget.setStaticTexture(
+ GT_UITextures.OVERLAY_BUTTON_CHECKMARK)
+ .setPos(
+ spaceX * 1,
+ spaceY * 0))
+ .addToggleButton(
+ 2,
+ CoverDataFollower_ToggleButtonWidget.ofRedstone(),
+ widget -> widget.setPos(
+ spaceX * 0,
+ spaceY * 1))
+ .setPos(startX, startY))
+ .widget(
+ TextWidget.dynamicString(
+ () -> ((convert(getCoverData()) & 0x2) > 0) ? GT_Utility.trans("242", "Machine idle")
+ : GT_Utility.trans("241", "Recipe progress"))
+ .setSynced(false)
+ .setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(startX + spaceX * 3, 4 + startY + spaceY * 0))
+ .widget(
+ TextWidget.dynamicString(
+ () -> ((convert(getCoverData()) & 0x1) > 0)
+ ? GT_Utility.trans("INVERTED", "Inverted")
+ : GT_Utility.trans("NORMAL", "Normal"))
+ .setSynced(false)
+ .setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(startX + spaceX * 3, 4 + startY + spaceY * 1));
}
private int getNewCoverVariable(int id, int coverVariable) {
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Drain.java b/src/main/java/gregtech/common/covers/GT_Cover_Drain.java
index a103234fea..4a08925ca4 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Drain.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Drain.java
@@ -47,15 +47,18 @@ public class GT_Cover_Drain extends GT_CoverBehavior {
if (aSide != 6) {
Block tBlock = aTileEntity.getBlockAtSide(aSide);
if ((aCoverVariable < 3) && ((aTileEntity instanceof IFluidHandler))) {
- if ((aSide == 1) && (aTileEntity.getWorld().isRaining())
+ if ((aSide == 1) && (aTileEntity.getWorld()
+ .isRaining())
&& (aTileEntity.getWorld()
- .getPrecipitationHeight(aTileEntity.getXCoord(), aTileEntity.getZCoord()) - 2
- < aTileEntity.getYCoord())) {
+ .getPrecipitationHeight(aTileEntity.getXCoord(), aTileEntity.getZCoord())
+ - 2 < aTileEntity.getYCoord())) {
int tAmount = (int) (aTileEntity.getBiome().rainfall * 10.0F);
if (tAmount > 0) {
((IFluidHandler) aTileEntity).fill(
ForgeDirection.getOrientation(aSide),
- Materials.Water.getFluid(aTileEntity.getWorld().isThundering() ? tAmount * 2 : tAmount),
+ Materials.Water.getFluid(
+ aTileEntity.getWorld()
+ .isThundering() ? tAmount * 2 : tAmount),
true);
}
}
@@ -77,15 +80,20 @@ public class GT_Cover_Drain extends GT_CoverBehavior {
false);
}
if ((tLiquid != null) && (tLiquid.getFluid() != null)
- && ((aSide > 1) || ((aSide == 0) && (tLiquid.getFluid().getDensity() <= 0))
- || ((aSide == 1) && (tLiquid.getFluid().getDensity() >= 0)))
+ && ((aSide > 1) || ((aSide == 0) && (tLiquid.getFluid()
+ .getDensity()
+ <= 0))
+ || ((aSide == 1) && (tLiquid.getFluid()
+ .getDensity()
+ >= 0)))
&& (((IFluidHandler) aTileEntity).fill(ForgeDirection.getOrientation(aSide), tLiquid, false)
== tLiquid.amount)) {
((IFluidHandler) aTileEntity).fill(ForgeDirection.getOrientation(aSide), tLiquid, true);
- aTileEntity.getWorld().setBlockToAir(
- aTileEntity.getXCoord() + ForgeDirection.getOrientation(aSide).offsetX,
- aTileEntity.getYCoord() + ForgeDirection.getOrientation(aSide).offsetY,
- aTileEntity.getZCoord() + ForgeDirection.getOrientation(aSide).offsetZ);
+ aTileEntity.getWorld()
+ .setBlockToAir(
+ aTileEntity.getXCoord() + ForgeDirection.getOrientation(aSide).offsetX,
+ aTileEntity.getYCoord() + ForgeDirection.getOrientation(aSide).offsetY,
+ aTileEntity.getZCoord() + ForgeDirection.getOrientation(aSide).offsetZ);
}
}
}
@@ -94,13 +102,14 @@ public class GT_Cover_Drain extends GT_CoverBehavior {
|| (tBlock == Blocks.water)
|| (tBlock == Blocks.flowing_water)
|| ((tBlock instanceof IFluidBlock)))) {
- aTileEntity.getWorld().setBlock(
- aTileEntity.getOffsetX(aSide, 1),
- aTileEntity.getOffsetY(aSide, 1),
- aTileEntity.getOffsetZ(aSide, 1),
- Blocks.air,
- 0,
- 0);
+ aTileEntity.getWorld()
+ .setBlock(
+ aTileEntity.getOffsetX(aSide, 1),
+ aTileEntity.getOffsetY(aSide, 1),
+ aTileEntity.getOffsetZ(aSide, 1),
+ Blocks.air,
+ 0,
+ 0);
}
}
return aCoverVariable;
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java
index 53ce2bcbb3..0ded299507 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java
@@ -229,8 +229,10 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase<GT_Cover_EUMeter.EUMe
final String NORMAL = GT_Utility.trans("NORMAL", "Normal");
builder.widget(
- new CoverDataControllerWidget<>(this::getCoverData, this::setCoverData, GT_Cover_EUMeter.this)
- .addFollower(
+ new CoverDataControllerWidget<>(
+ this::getCoverData,
+ this::setCoverData,
+ GT_Cover_EUMeter.this).addFollower(
new CoverDataFollower_CycleButtonWidget<>(),
coverData -> coverData.type.ordinal(),
(coverData, state) -> {
@@ -238,42 +240,56 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase<GT_Cover_EUMeter.EUMe
return coverData;
},
widget -> widget.setLength(EnergyType.values().length)
- .addTooltip(state -> EnergyType.getEnergyType(state).getTooltip())
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_CYCLIC)
- .setPos(spaceX * 0, spaceY * 0))
- .addFollower(
- CoverDataFollower_ToggleButtonWidget.ofRedstone(),
- coverData -> coverData.inverted,
- (coverData, state) -> {
- coverData.inverted = state;
- return coverData;
- },
- widget -> widget.addTooltip(0, NORMAL).addTooltip(1, INVERTED)
- .setPos(spaceX * 0, spaceY * 1))
- .addFollower(
- new CoverDataFollower_TextFieldWidget<>(),
- coverData -> String.valueOf(coverData.threshold),
- (coverData, state) -> {
- coverData.threshold = (long) MathExpression.parseMathExpression(state);
- return coverData;
- },
- widget -> widget.setOnScrollNumbersLong(1000, 100, 100000)
- .setNumbersLong(() -> 0L, () -> Long.MAX_VALUE).setFocusOnGuiOpen(true)
- .setPos(spaceX * 0, spaceY * 2 + 2).setSize(spaceX * 8, 12))
- .setPos(startX, startY))
- .widget(
- TextWidget.dynamicString(() -> getCoverData() != null ? getCoverData().type.getTitle() : "")
- .setSynced(false).setDefaultColor(COLOR_TEXT_GRAY.get()).setPos(
- startX + spaceX,
- 4 + startY))
- .widget(
- TextWidget.dynamicString(
- () -> getCoverData() != null ? getCoverData().inverted ? INVERTED : NORMAL : "")
- .setSynced(false).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX, 4 + startY + spaceY))
- .widget(
- new TextWidget(GT_Utility.trans("222.1", "Energy threshold"))
- .setDefaultColor(COLOR_TEXT_GRAY.get()).setPos(startX, startY + spaceY * 3 + 4));
+ .addTooltip(
+ state -> EnergyType.getEnergyType(state)
+ .getTooltip())
+ .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_CYCLIC)
+ .setPos(spaceX * 0, spaceY * 0))
+ .addFollower(
+ CoverDataFollower_ToggleButtonWidget.ofRedstone(),
+ coverData -> coverData.inverted,
+ (coverData, state) -> {
+ coverData.inverted = state;
+ return coverData;
+ },
+ widget -> widget.addTooltip(0, NORMAL)
+ .addTooltip(1, INVERTED)
+ .setPos(spaceX * 0, spaceY * 1))
+ .addFollower(
+ new CoverDataFollower_TextFieldWidget<>(),
+ coverData -> String.valueOf(coverData.threshold),
+ (coverData, state) -> {
+ coverData.threshold = (long) MathExpression.parseMathExpression(
+ state);
+ return coverData;
+ },
+ widget -> widget.setOnScrollNumbersLong(1000, 100, 100000)
+ .setNumbersLong(
+ () -> 0L,
+ () -> Long.MAX_VALUE)
+ .setFocusOnGuiOpen(true)
+ .setPos(spaceX * 0, spaceY * 2 + 2)
+ .setSize(spaceX * 8, 12))
+ .setPos(startX, startY))
+ .widget(
+ TextWidget.dynamicString(() -> getCoverData() != null ? getCoverData().type.getTitle() : "")
+ .setSynced(false)
+ .setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(startX + spaceX, 4 + startY))
+ .widget(
+ TextWidget.dynamicString(
+ () -> getCoverData() != null ? getCoverData().inverted ? INVERTED : NORMAL : "")
+ .setSynced(false)
+ .setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(startX + spaceX, 4 + startY + spaceY))
+ .widget(
+ new TextWidget(GT_Utility.trans("222.1", "Energy threshold"))
+ .setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX,
+ startY + spaceY * 3
+ + 4));
}
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java b/src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java
index 0ac4a25fa1..80eeead660 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java
@@ -122,12 +122,13 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase<GT_Cover_
GT_Utility.stackToInt(aCover),
new FacadeData(GT_Utility.copyAmount(1, aCover), 0));
- if (aTileEntity.isClientSide()) GT_RenderingWorld.getInstance().register(
- aTileEntity.getXCoord(),
- aTileEntity.getYCoord(),
- aTileEntity.getZCoord(),
- getTargetBlock(aCover),
- getTargetMeta(aCover));
+ if (aTileEntity.isClientSide()) GT_RenderingWorld.getInstance()
+ .register(
+ aTileEntity.getXCoord(),
+ aTileEntity.getYCoord(),
+ aTileEntity.getZCoord(),
+ getTargetBlock(aCover),
+ getTargetMeta(aCover));
}
@Override
@@ -149,8 +150,11 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase<GT_Cover_
if (block == null) return Textures.BlockIcons.ERROR_RENDERING[0];
// TODO: change this when *someone* made the block render in both pass
if (block.getRenderBlockPass() != 0) return Textures.BlockIcons.ERROR_RENDERING[0];
- return TextureFactory.builder().setFromBlock(block, getTargetMeta(aCoverVariable.mStack)).useWorldCoord()
- .setFromSide(ForgeDirection.getOrientation(aSide)).build();
+ return TextureFactory.builder()
+ .setFromBlock(block, getTargetMeta(aCoverVariable.mStack))
+ .useWorldCoord()
+ .setFromSide(ForgeDirection.getOrientation(aSide))
+ .build();
}
@Override
@@ -177,12 +181,13 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase<GT_Cover_
@Override
protected void onDataChangedImpl(byte aSide, int aCoverID, FacadeData aCoverVariable, ICoverable aTileEntity) {
- if (aTileEntity.isClientSide()) GT_RenderingWorld.getInstance().register(
- aTileEntity.getXCoord(),
- aTileEntity.getYCoord(),
- aTileEntity.getZCoord(),
- getTargetBlock(aCoverVariable.mStack),
- getTargetMeta(aCoverVariable.mStack));
+ if (aTileEntity.isClientSide()) GT_RenderingWorld.getInstance()
+ .register(
+ aTileEntity.getXCoord(),
+ aTileEntity.getYCoord(),
+ aTileEntity.getZCoord(),
+ getTargetBlock(aCoverVariable.mStack),
+ getTargetMeta(aCoverVariable.mStack));
}
@Override
@@ -195,12 +200,13 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase<GT_Cover_
}
if (aCoverVariable.mStack != null)
// mStack == null -> cover removed before data reach client
- GT_RenderingWorld.getInstance().unregister(
- aTileEntity.getXCoord(),
- aTileEntity.getYCoord(),
- aTileEntity.getZCoord(),
- getTargetBlock(aCoverVariable.mStack),
- getTargetMeta(aCoverVariable.mStack));
+ GT_RenderingWorld.getInstance()
+ .unregister(
+ aTileEntity.getXCoord(),
+ aTileEntity.getYCoord(),
+ aTileEntity.getZCoord(),
+ getTargetBlock(aCoverVariable.mStack),
+ getTargetMeta(aCoverVariable.mStack));
}
}
@@ -329,39 +335,51 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase<GT_Cover_
0,
CoverDataFollower_ToggleButtonWidget.ofCheckAndCross(),
widget -> widget.setPos(spaceX * 0, spaceY * 0))
- .addToggleButton(
- 1,
- CoverDataFollower_ToggleButtonWidget.ofCheckAndCross(),
- widget -> widget.setPos(spaceX * 0, spaceY * 1))
- .addToggleButton(
- 2,
- CoverDataFollower_ToggleButtonWidget.ofCheckAndCross(),
- widget -> widget.setPos(spaceX * 0, spaceY * 2))
- .addToggleButton(
- 3,
- CoverDataFollower_ToggleButtonWidget.ofCheckAndCross(),
- widget -> widget.setPos(spaceX * 0, spaceY * 3))
- .setPos(startX, startY))
- .widget(
- new ItemDrawable(() -> getCoverData() != null ? getCoverData().mStack : null).asWidget()
- .setPos(5, 5).setSize(16, 16))
- .widget(
- TextWidget
- .dynamicString(
- () -> getCoverData() != null ? getCoverData().mStack.getDisplayName() : "")
- .setSynced(false).setDefaultColor(COLOR_TITLE.get()).setPos(25, 9))
- .widget(
- new TextWidget(GT_Utility.trans("128", "Redstone")).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 0))
- .widget(
- new TextWidget(GT_Utility.trans("129", "Energy")).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 1))
- .widget(
- new TextWidget(GT_Utility.trans("130", "Fluids")).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 2))
- .widget(
- new TextWidget(GT_Utility.trans("131", "Items")).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 3));
+ .addToggleButton(
+ 1,
+ CoverDataFollower_ToggleButtonWidget.ofCheckAndCross(),
+ widget -> widget.setPos(spaceX * 0, spaceY * 1))
+ .addToggleButton(
+ 2,
+ CoverDataFollower_ToggleButtonWidget.ofCheckAndCross(),
+ widget -> widget.setPos(spaceX * 0, spaceY * 2))
+ .addToggleButton(
+ 3,
+ CoverDataFollower_ToggleButtonWidget.ofCheckAndCross(),
+ widget -> widget.setPos(spaceX * 0, spaceY * 3))
+ .setPos(startX, startY))
+ .widget(
+ new ItemDrawable(() -> getCoverData() != null ? getCoverData().mStack : null).asWidget()
+ .setPos(5, 5)
+ .setSize(
+ 16,
+ 16))
+ .widget(
+ TextWidget.dynamicString(
+ () -> getCoverData() != null ? getCoverData().mStack.getDisplayName() : "")
+ .setSynced(false)
+ .setDefaultColor(COLOR_TITLE.get())
+ .setPos(25, 9))
+ .widget(
+ new TextWidget(GT_Utility.trans("128", "Redstone")).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(
+ 3 + startX + spaceX * 1,
+ 4 + startY + spaceY * 0))
+ .widget(
+ new TextWidget(GT_Utility.trans("129", "Energy")).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(
+ 3 + startX + spaceX * 1,
+ 4 + startY + spaceY * 1))
+ .widget(
+ new TextWidget(GT_Utility.trans("130", "Fluids")).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(
+ 3 + startX + spaceX * 1,
+ 4 + startY + spaceY * 2))
+ .widget(
+ new TextWidget(GT_Utility.trans("131", "Items")).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(
+ 3 + startX + spaceX * 1,
+ 4 + startY + spaceY * 3));
}
@Override
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_FluidLimiter.java b/src/main/java/gregtech/common/covers/GT_Cover_FluidLimiter.java
index 53eb3406d4..68bf59b5df 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_FluidLimiter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_FluidLimiter.java
@@ -197,19 +197,23 @@ public class GT_Cover_FluidLimiter extends GT_CoverBehaviorBase<GT_Cover_FluidLi
@Override
protected void addUIWidgets(ModularWindow.Builder builder) {
builder.widget(
- new CoverDataControllerWidget<>(this::getCoverData, this::setCoverData, GT_Cover_FluidLimiter.this)
- .addFollower(
+ new CoverDataControllerWidget<>(
+ this::getCoverData,
+ this::setCoverData,
+ GT_Cover_FluidLimiter.this).addFollower(
new CoverDataFollower_TextFieldWidget<>(),
coverData -> String.valueOf(Math.round(coverData.threshold * 100)),
(coverData, val) -> {
coverData.threshold = (float) (MathExpression.parseMathExpression(val) / 100);
return coverData;
},
- widget -> widget.setNumbers(0, 100).setFocusOnGuiOpen(true)
- .setPos(startX, startY + spaceY * 2 - 24).setSize(spaceX * 4 - 3, 12)))
- .widget(
- new TextWidget("Percent threshold").setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX, startY + spaceY * 2 - 35));
+ widget -> widget.setNumbers(0, 100)
+ .setFocusOnGuiOpen(true)
+ .setPos(startX, startY + spaceY * 2 - 24)
+ .setSize(spaceX * 4 - 3, 12)))
+ .widget(
+ new TextWidget("Percent threshold").setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(startX, startY + spaceY * 2 - 35));
}
}
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java b/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java
index b02610ebf4..d02f098e3b 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java
@@ -113,11 +113,13 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehaviorBase<GT_Cover_Fluid
tTank2 = aTileEntity.getITankContainerAtSide(aSide);
tTank1 = (IFluidHandler) aTileEntity;
directionFrom = ForgeDirection.getOrientation(aSide);
- directionTo = ForgeDirection.getOrientation(aSide).getOpposite();
+ directionTo = ForgeDirection.getOrientation(aSide)
+ .getOpposite();
} else {
tTank1 = aTileEntity.getITankContainerAtSide(aSide);
tTank2 = (IFluidHandler) aTileEntity;
- directionFrom = ForgeDirection.getOrientation(aSide).getOpposite();
+ directionFrom = ForgeDirection.getOrientation(aSide)
+ .getOpposite();
directionTo = ForgeDirection.getOrientation(aSide);
}
if (tTank1 != null && tTank2 != null) {
@@ -284,130 +286,179 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehaviorBase<GT_Cover_Fluid
new CoverDataControllerWidget<>(
this::getCoverData,
this::setCoverData,
- GT_Cover_FluidRegulator.this)
- .addFollower(
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- coverData -> coverData.speed >= 0,
- (coverData, state) -> {
- coverData.speed = Math.abs(coverData.speed);
- return coverData;
- },
- widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_EXPORT)
+ GT_Cover_FluidRegulator.this).addFollower(
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ coverData -> coverData.speed >= 0,
+ (coverData, state) -> {
+ coverData.speed = Math.abs(coverData.speed);
+ return coverData;
+ },
+ widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_EXPORT)
.addTooltip(GT_Utility.trans("006", "Export"))
.setPos(spaceX * 0, spaceY * 0))
- .addFollower(
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- coverData -> coverData.speed <= 0,
- (coverData, state) -> {
- coverData.speed = -Math.abs(coverData.speed);
- return coverData;
- },
- widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_IMPORT)
- .addTooltip(GT_Utility.trans("007", "Import"))
- .setPos(spaceX * 1, spaceY * 0))
- .addFollower(
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- coverData -> coverData.condition == Conditional.Always,
- (coverData, state) -> {
- coverData.condition = Conditional.Always;
- return coverData;
- },
- widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_CHECKMARK)
- .addTooltip(GT_Utility.trans("224", "Always On"))
- .setPos(spaceX * 0, spaceY * 1))
- .addFollower(
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- coverData -> coverData.condition == Conditional.Conditional,
- (coverData, state) -> {
- coverData.condition = Conditional.Conditional;
- return coverData;
- },
- widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON)
- .addTooltip(GT_Utility.trans("225", "Active with Redstone Signal"))
- .setPos(spaceX * 1, spaceY * 1))
- .addFollower(
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- coverData -> coverData.condition == Conditional.Inverted,
- (coverData, state) -> {
- coverData.condition = Conditional.Inverted;
- return coverData;
- },
- widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF)
- .addTooltip(
- GT_Utility.trans("226", "Inactive with Redstone Signal"))
- .setPos(spaceX * 2, spaceY * 1))
- .addFollower(
- new CoverDataFollower_TextFieldWidget<>(),
- coverData -> String.valueOf(coverData.speed),
- (coverData, state) -> {
- coverData.speed = (int) MathExpression.parseMathExpression(state);
- return coverData;
- },
- widget -> widget.setOnScrollNumbersLong(1, 5, 50).setNumbersLong(val -> {
- final int tickRate = getCoverData() != null ? getCoverData().tickRate
- : 0;
- final long maxFlow = (long) mTransferRate
- * GT_Utility.clamp(tickRate, TICK_RATE_MIN, TICK_RATE_MAX);
- warn.set(false);
- if (val > maxFlow) {
- val = maxFlow;
- warn.set(true);
- } else if (val < -maxFlow) {
- val = -maxFlow;
- warn.set(true);
- }
- return val;
- }).setPattern(BaseTextFieldWidget.WHOLE_NUMS).setFocusOnGuiOpen(true)
- .setPos(spaceX * 0, spaceY * 2 + 2).setSize(spaceX * 4 - 3, 12))
- .addFollower(
- new CoverDataFollower_TextFieldWidget<>(),
- coverData -> String.valueOf(coverData.tickRate),
- (coverData, state) -> {
- coverData.tickRate = (int) MathExpression.parseMathExpression(state);
- return coverData;
- },
- widget -> widget.setOnScrollNumbersLong(1, 5, 50).setNumbersLong(val -> {
- final int speed = getCoverData() != null ? getCoverData().speed : 0;
- warn.set(false);
- if (val > TICK_RATE_MAX) {
- val = (long) TICK_RATE_MAX;
- warn.set(true);
- } else if (Math.abs(speed) > mTransferRate * val) {
- val = (long) Math.min(
- TICK_RATE_MAX,
- (Math.abs(speed) + mTransferRate - 1) / mTransferRate);
- warn.set(true);
- } else if (val < TICK_RATE_MIN) {
- val = 1L;
- }
- return val;
- }).setPattern(BaseTextFieldWidget.WHOLE_NUMS)
- .setPos(spaceX * 5, spaceY * 2 + 2).setSize(spaceX * 2 - 3, 12))
- .setPos(startX, startY))
- .widget(
- new TextWidget(GT_Utility.trans("229", "Import/Export"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 4, 4 + startY + spaceY * 0))
- .widget(
- new TextWidget(GT_Utility.trans("230", "Conditional"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 4, 4 + startY + spaceY * 1))
- .widget(
- new TextWidget(GT_Utility.trans("208", " L")).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 4, 4 + startY + spaceY * 2))
- .widget(
- new TextWidget(GT_Utility.trans("209", " ticks")).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 7, 4 + startY + spaceY * 2))
- .widget(TextWidget.dynamicText(() -> {
- FluidRegulatorData coverVariable = getCoverData();
- if (coverVariable == null) return new Text("");
- return new Text(
- String.format(
- GT_Utility.trans("210", "Average: %.2f L/sec"),
- coverVariable.tickRate == 0 ? 0
- : coverVariable.speed * 20d / coverVariable.tickRate)).color(
- warn.get() ? COLOR_TEXT_WARN.get() : COLOR_TEXT_GRAY.get());
- }).setSynced(false).setPos(startX + spaceX * 0, 4 + startY + spaceY * 3));
+ .addFollower(
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ coverData -> coverData.speed <= 0,
+ (coverData, state) -> {
+ coverData.speed = -Math.abs(coverData.speed);
+ return coverData;
+ },
+ widget -> widget.setStaticTexture(
+ GT_UITextures.OVERLAY_BUTTON_IMPORT)
+ .addTooltip(
+ GT_Utility.trans(
+ "007",
+ "Import"))
+ .setPos(spaceX * 1, spaceY * 0))
+ .addFollower(
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ coverData -> coverData.condition == Conditional.Always,
+ (coverData, state) -> {
+ coverData.condition = Conditional.Always;
+ return coverData;
+ },
+ widget -> widget.setStaticTexture(
+ GT_UITextures.OVERLAY_BUTTON_CHECKMARK)
+ .addTooltip(
+ GT_Utility.trans(
+ "224",
+ "Always On"))
+ .setPos(spaceX * 0, spaceY * 1))
+ .addFollower(
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ coverData -> coverData.condition
+ == Conditional.Conditional,
+ (coverData, state) -> {
+ coverData.condition = Conditional.Conditional;
+ return coverData;
+ },
+ widget -> widget.setStaticTexture(
+ GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON)
+ .addTooltip(
+ GT_Utility.trans(
+ "225",
+ "Active with Redstone Signal"))
+ .setPos(spaceX * 1, spaceY * 1))
+ .addFollower(
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ coverData -> coverData.condition
+ == Conditional.Inverted,
+ (coverData, state) -> {
+ coverData.condition = Conditional.Inverted;
+ return coverData;
+ },
+ widget -> widget.setStaticTexture(
+ GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF)
+ .addTooltip(
+ GT_Utility.trans(
+ "226",
+ "Inactive with Redstone Signal"))
+ .setPos(spaceX * 2, spaceY * 1))
+ .addFollower(
+ new CoverDataFollower_TextFieldWidget<>(),
+ coverData -> String.valueOf(coverData.speed),
+ (coverData, state) -> {
+ coverData.speed = (int) MathExpression.parseMathExpression(
+ state);
+ return coverData;
+ },
+ widget -> widget.setOnScrollNumbersLong(1, 5, 50)
+ .setNumbersLong(val -> {
+ final int tickRate = getCoverData()
+ != null ? getCoverData().tickRate
+ : 0;
+ final long maxFlow = (long) mTransferRate
+ * GT_Utility.clamp(
+ tickRate,
+ TICK_RATE_MIN,
+ TICK_RATE_MAX);
+ warn.set(false);
+ if (val > maxFlow) {
+ val = maxFlow;
+ warn.set(true);
+ } else if (val < -maxFlow) {
+ val = -maxFlow;
+ warn.set(true);
+ }
+ return val;
+ })
+ .setPattern(
+ BaseTextFieldWidget.WHOLE_NUMS)
+ .setFocusOnGuiOpen(true)
+ .setPos(spaceX * 0, spaceY * 2 + 2)
+ .setSize(spaceX * 4 - 3, 12))
+ .addFollower(
+ new CoverDataFollower_TextFieldWidget<>(),
+ coverData -> String.valueOf(coverData.tickRate),
+ (coverData, state) -> {
+ coverData.tickRate = (int) MathExpression.parseMathExpression(
+ state);
+ return coverData;
+ },
+ widget -> widget.setOnScrollNumbersLong(1, 5, 50)
+ .setNumbersLong(val -> {
+ final int speed = getCoverData()
+ != null ? getCoverData().speed
+ : 0;
+ warn.set(false);
+ if (val > TICK_RATE_MAX) {
+ val = (long) TICK_RATE_MAX;
+ warn.set(true);
+ } else if (Math.abs(speed)
+ > mTransferRate * val) {
+ val = (long) Math.min(
+ TICK_RATE_MAX,
+ (Math.abs(
+ speed)
+ + mTransferRate
+ - 1)
+ / mTransferRate);
+ warn.set(true);
+ } else
+ if (val < TICK_RATE_MIN) {
+ val = 1L;
+ }
+ return val;
+ })
+ .setPattern(
+ BaseTextFieldWidget.WHOLE_NUMS)
+ .setPos(spaceX * 5, spaceY * 2 + 2)
+ .setSize(spaceX * 2 - 3, 12))
+ .setPos(startX, startY))
+ .widget(
+ new TextWidget(GT_Utility.trans("229", "Import/Export"))
+ .setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 4,
+ 4 + startY + spaceY * 0))
+ .widget(
+ new TextWidget(GT_Utility.trans("230", "Conditional")).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 4,
+ 4 + startY + spaceY * 1))
+ .widget(
+ new TextWidget(GT_Utility.trans("208", " L")).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 4,
+ 4 + startY + spaceY * 2))
+ .widget(
+ new TextWidget(GT_Utility.trans("209", " ticks")).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 7,
+ 4 + startY + spaceY * 2))
+ .widget(TextWidget.dynamicText(() -> {
+ FluidRegulatorData coverVariable = getCoverData();
+ if (coverVariable == null) return new Text("");
+ return new Text(
+ String.format(
+ GT_Utility.trans("210", "Average: %.2f L/sec"),
+ coverVariable.tickRate == 0 ? 0
+ : coverVariable.speed * 20d / coverVariable.tickRate)).color(
+ warn.get() ? COLOR_TEXT_WARN.get() : COLOR_TEXT_GRAY.get());
+ })
+ .setSynced(false)
+ .setPos(startX + spaceX * 0, 4 + startY + spaceY * 3));
}
}
@@ -499,7 +550,9 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehaviorBase<GT_Cover_Fluid
@Override
public void writeToByteBuf(ByteBuf aBuf) {
- aBuf.writeInt(tickRate).writeInt(speed).writeByte(condition.ordinal());
+ aBuf.writeInt(tickRate)
+ .writeInt(speed)
+ .writeByte(condition.ordinal());
}
@Override
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_FluidStorageMonitor.java b/src/main/java/gregtech/common/covers/GT_Cover_FluidStorageMonitor.java
index 184eb8705e..bb140b37a8 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_FluidStorageMonitor.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_FluidStorageMonitor.java
@@ -81,7 +81,8 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_
FluidStorageData aCoverVariable, ICoverable aTileEntity, long aTimer) {
final FluidTankInfo[] tanks = getValidFluidTankInfos(aTileEntity, aCoverVariable.side);
if (tanks == null) {
- return aCoverVariable.disable().issueCoverUpdateIfNeeded(aTileEntity, aSide);
+ return aCoverVariable.disable()
+ .issueCoverUpdateIfNeeded(aTileEntity, aSide);
}
assert 0 < tanks.length;
@@ -91,11 +92,13 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_
final FluidTankInfo tank = tanks[aCoverVariable.slot];
if (tank == null) {
- return aCoverVariable.setNullTank().issueCoverUpdateIfNeeded(aTileEntity, aSide);
+ return aCoverVariable.setNullTank()
+ .issueCoverUpdateIfNeeded(aTileEntity, aSide);
}
- return aCoverVariable.setFluid(tank.fluid).setScale(getTankScale(tank))
- .issueCoverUpdateIfNeeded(aTileEntity, aSide);
+ return aCoverVariable.setFluid(tank.fluid)
+ .setScale(getTankScale(tank))
+ .issueCoverUpdateIfNeeded(aTileEntity, aSide);
}
@Override
@@ -129,7 +132,9 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_
};
final short[] fluidRGBA = colorToRGBA(aCoverVariable.fluid.getColor());
- final ITextureBuilder fluidTextureBuilder = TextureFactory.builder().addIcon(fluidIcon).setRGBA(fluidRGBA);
+ final ITextureBuilder fluidTextureBuilder = TextureFactory.builder()
+ .addIcon(fluidIcon)
+ .setRGBA(fluidRGBA);
if (aCoverVariable.fluid.getLuminosity() > 0) fluidTextureBuilder.glow();
return TextureFactory.of(fluidTextureBuilder.build(), TextureFactory.of(icons[aCoverVariable.scale]));
}
@@ -221,7 +226,9 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_
side,
new FluidStack(tankInfo.fluid.getFluid(), containerItem.getCapacity(container)),
false))
- .filter(fs -> GT_Utility.areFluidsEqual(fs, tankInfo.fluid)).map(fs -> fs.amount).orElse(0),
+ .filter(fs -> GT_Utility.areFluidsEqual(fs, tankInfo.fluid))
+ .map(fs -> fs.amount)
+ .orElse(0),
containerItem.fill(
container,
new FluidStack(tankInfo.fluid.getFluid(), containerItem.getCapacity(container)),
@@ -242,7 +249,9 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_
return null;
}
if (Optional.ofNullable(tank.drain(side, filledFluid, false))
- .filter(fs -> GT_Utility.areFluidsEqual(fs, filledFluid)).map(fs -> fs.amount).orElse(0)
+ .filter(fs -> GT_Utility.areFluidsEqual(fs, filledFluid))
+ .map(fs -> fs.amount)
+ .orElse(0)
!= filledFluid.amount) {
return null;
}
@@ -264,7 +273,7 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_
if (aPlayer.isSneaking()) {
aCoverVariable.setSide(
ForgeDirection.values()[(aCoverVariable.side.ordinal() + 1) % ForgeDirection.values().length])
- .setSlot(0);
+ .setSlot(0);
GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("SIDE", "Side: ") + aCoverVariable.side.name());
return aCoverVariable;
}
@@ -276,8 +285,8 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_
if (aCoverVariable.slot < 0 || tanks.length <= aCoverVariable.slot) {
aCoverVariable.setSlot(0);
} else {
- aCoverVariable
- .setSlot((aCoverVariable.slot + tanks.length + (aPlayer.isSneaking() ? -1 : 1)) % tanks.length);
+ aCoverVariable.setSlot(
+ (aCoverVariable.slot + tanks.length + (aPlayer.isSneaking() ? -1 : 1)) % tanks.length);
}
GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("053", "Slot: ") + aCoverVariable.slot);
return aCoverVariable;
@@ -397,7 +406,8 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase<GT_Cover_
}
public FluidStorageData setNullTank() {
- return this.setFluid((Fluid) null).setScale(0);
+ return this.setFluid((Fluid) null)
+ .setScale(0);
}
public FluidStorageData issueCoverUpdateIfNeeded(ICoverable tileEntity, byte side) {
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java b/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java
index 09239c0a07..65e036a110 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java
@@ -273,94 +273,101 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase<GT_Cover_Fluidfil
0,
CoverDataFollower_ToggleButtonWidget.ofDisableable(),
widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_IMPORT)
- .addTooltip(GT_Utility.trans("232", "Filter Input"))
- .setPos(spaceX * 0, spaceY * 0))
- .addToggleButton(
- 1,
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_EXPORT)
- .addTooltip(GT_Utility.trans("233", "Filter Output"))
- .setPos(spaceX * 1, spaceY * 0))
- .addToggleButton(
- 2,
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_BLOCK_INPUT)
- .addTooltip(GT_Utility.trans("234", "Block Output"))
- .setPos(spaceX * 0, spaceY * 2))
- .addToggleButton(
- 3,
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_ALLOW_INPUT)
- .addTooltip(GT_Utility.trans("235", "Allow Output"))
- .setPos(spaceX * 1, spaceY * 2))
- .addToggleButton(
- 4,
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_WHITELIST)
- .addTooltip(GT_Utility.trans("236", "Whitelist Fluid"))
- .setPos(spaceX * 0, spaceY * 1))
- .addToggleButton(
- 5,
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_BLACKLIST)
- .addTooltip(GT_Utility.trans("237", "Blacklist Fluid"))
- .setPos(spaceX * 1, spaceY * 1))
- .addFollower(
- new CoverDataFollower_SlotWidget<FluidFilterData>(
- new ItemStackHandler(),
- 0,
- true) {
-
- @Override
- protected void putClickedStack(ItemStack stack, int mouseButton) {
- if (stack != null
- && GT_Utility.getFluidFromContainerOrFluidDisplay(stack)
- == null)
- return;
- super.putClickedStack(
- GT_Utility.getFluidDisplayStack(
- GT_Utility
- .getFluidFromContainerOrFluidDisplay(stack),
- false),
- mouseButton);
- }
- },
- this::getFluidDisplayItem,
- (coverData, stack) -> {
- if (stack == null) {
- coverData.mFluidID = -1;
- } else {
- FluidStack fluid = GT_Utility.getFluidFromDisplayStack(stack);
- if (fluid != null && fluid.getFluid() != null) {
- coverData.mFluidID = fluid.getFluid().getID();
- }
- }
- return coverData;
- },
- widget -> widget.setBackground(ModularUITextures.FLUID_SLOT)
- .setPos(0, spaceY * 3 + 2))
- .setPos(startX, startY))
- .widget(
- new TextWidget(GT_Utility.trans("238", "Filter Direction"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 2, 3 + startY + spaceY * 0))
- .widget(
- new TextWidget(GT_Utility.trans("239", "Filter Type"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 2, 3 + startY + spaceY * 1))
- .widget(
- new TextWidget(GT_Utility.trans("240", "Block Flow")).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 2, 3 + startY + spaceY * 2))
- .widget(TextWidget.dynamicString(() -> {
- if (getCoverData() != null) {
- ItemStack fluidDisplay = getFluidDisplayItem(getCoverData());
- if (fluidDisplay != null) {
- return fluidDisplay.getDisplayName();
- }
- }
- return GT_Utility.trans("315", "Filter Empty");
- }).setSynced(false).setDefaultColor(COLOR_TITLE.get())
- .setPos(startX + spaceX + 3, 4 + startY + spaceY * 3));
+ .addTooltip(GT_Utility.trans("232", "Filter Input"))
+ .setPos(spaceX * 0, spaceY * 0))
+ .addToggleButton(
+ 1,
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_EXPORT)
+ .addTooltip(GT_Utility.trans("233", "Filter Output"))
+ .setPos(spaceX * 1, spaceY * 0))
+ .addToggleButton(
+ 2,
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_BLOCK_INPUT)
+ .addTooltip(GT_Utility.trans("234", "Block Output"))
+ .setPos(spaceX * 0, spaceY * 2))
+ .addToggleButton(
+ 3,
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_ALLOW_INPUT)
+ .addTooltip(GT_Utility.trans("235", "Allow Output"))
+ .setPos(spaceX * 1, spaceY * 2))
+ .addToggleButton(
+ 4,
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_WHITELIST)
+ .addTooltip(GT_Utility.trans("236", "Whitelist Fluid"))
+ .setPos(spaceX * 0, spaceY * 1))
+ .addToggleButton(
+ 5,
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_BLACKLIST)
+ .addTooltip(GT_Utility.trans("237", "Blacklist Fluid"))
+ .setPos(spaceX * 1, spaceY * 1))
+ .addFollower(
+ new CoverDataFollower_SlotWidget<FluidFilterData>(
+ new ItemStackHandler(),
+ 0,
+ true) {
+
+ @Override
+ protected void putClickedStack(ItemStack stack, int mouseButton) {
+ if (stack != null
+ && GT_Utility.getFluidFromContainerOrFluidDisplay(stack) == null)
+ return;
+ super.putClickedStack(
+ GT_Utility.getFluidDisplayStack(
+ GT_Utility.getFluidFromContainerOrFluidDisplay(stack),
+ false),
+ mouseButton);
+ }
+ },
+ this::getFluidDisplayItem,
+ (coverData, stack) -> {
+ if (stack == null) {
+ coverData.mFluidID = -1;
+ } else {
+ FluidStack fluid = GT_Utility.getFluidFromDisplayStack(stack);
+ if (fluid != null && fluid.getFluid() != null) {
+ coverData.mFluidID = fluid.getFluid()
+ .getID();
+ }
+ }
+ return coverData;
+ },
+ widget -> widget.setBackground(ModularUITextures.FLUID_SLOT)
+ .setPos(0, spaceY * 3 + 2))
+ .setPos(startX, startY))
+ .widget(
+ new TextWidget(GT_Utility.trans("238", "Filter Direction"))
+ .setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 2,
+ 3 + startY + spaceY * 0))
+ .widget(
+ new TextWidget(GT_Utility.trans("239", "Filter Type")).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 2,
+ 3 + startY + spaceY * 1))
+ .widget(
+ new TextWidget(GT_Utility.trans("240", "Block Flow")).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 2,
+ 3 + startY + spaceY * 2))
+ .widget(TextWidget.dynamicString(() -> {
+ if (getCoverData() != null) {
+ ItemStack fluidDisplay = getFluidDisplayItem(getCoverData());
+ if (fluidDisplay != null) {
+ return fluidDisplay.getDisplayName();
+ }
+ }
+ return GT_Utility.trans("315", "Filter Empty");
+ })
+ .setSynced(false)
+ .setDefaultColor(COLOR_TITLE.get())
+ .setPos(startX + spaceX + 3, 4 + startY + spaceY * 3));
}
private int getNewFilterMode(int id, FluidFilterData coverVariable) {
@@ -423,13 +430,17 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase<GT_Cover_Fluidfil
public NBTBase saveDataToNBT() {
NBTTagCompound tNBT = new NBTTagCompound();
tNBT.setInteger("mFilterMode", mFilterMode);
- if (mFluidID >= 0) tNBT.setString("mFluid", FluidRegistry.getFluid(mFluidID).getName());
+ if (mFluidID >= 0) tNBT.setString(
+ "mFluid",
+ FluidRegistry.getFluid(mFluidID)
+ .getName());
return tNBT;
}
@Override
public void writeToByteBuf(ByteBuf aBuf) {
- aBuf.writeByte(mFilterMode).writeInt(mFluidID);
+ aBuf.writeByte(mFilterMode)
+ .writeInt(mFluidID);
}
@Override
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java b/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java
index a1378c9812..3ea7c88d8e 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java
@@ -214,37 +214,46 @@ public class GT_Cover_ItemFilter extends GT_CoverBehaviorBase<GT_Cover_ItemFilte
filterInvHandler.setStackInSlot(0, setStackSize1(getCoverData().mFilter));
}
builder.widget(
- new CoverDataControllerWidget<>(this::getCoverData, this::setCoverData, GT_Cover_ItemFilter.this)
- .addFollower(
+ new CoverDataControllerWidget<>(
+ this::getCoverData,
+ this::setCoverData,
+ GT_Cover_ItemFilter.this).addFollower(
new CoverDataFollower_ToggleButtonWidget<>(),
coverData -> coverData.mWhitelist,
(coverData, state) -> {
coverData.mWhitelist = state;
return coverData;
},
- widget -> widget
- .setToggleTexture(
- GT_UITextures.OVERLAY_BUTTON_WHITELIST,
- GT_UITextures.OVERLAY_BUTTON_BLACKLIST)
- .addTooltip(0, GT_Utility.trans("124.1", "Blacklist Mode"))
- .addTooltip(1, GT_Utility.trans("125.1", "Whitelist Mode"))
- .setPos(spaceX * 0, spaceY * 0))
- .addFollower(
- new CoverDataFollower_SlotWidget<>(filterInvHandler, 0, true),
- coverData -> setStackSize1(coverData.mFilter),
- (coverData, stack) -> {
- coverData.mFilter = setStackSize1(stack);
- return coverData;
- },
- widget -> widget.setBackground(GT_UITextures.SLOT_DARK_GRAY)
- .setPos(spaceX * 0, spaceY * 2))
- .setPos(startX, startY))
- .widget(
- new TextWidget(GT_Utility.trans("317", "Filter: ")).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 0, 3 + startY + spaceY * 1))
- .widget(
- new TextWidget(GT_Utility.trans("318", "Check Mode")).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 2, 3 + startY + spaceY * 0));
+ widget -> widget.setToggleTexture(
+ GT_UITextures.OVERLAY_BUTTON_WHITELIST,
+ GT_UITextures.OVERLAY_BUTTON_BLACKLIST)
+ .addTooltip(0, GT_Utility.trans("124.1", "Blacklist Mode"))
+ .addTooltip(1, GT_Utility.trans("125.1", "Whitelist Mode"))
+ .setPos(spaceX * 0, spaceY * 0))
+ .addFollower(
+ new CoverDataFollower_SlotWidget<>(
+ filterInvHandler,
+ 0,
+ true),
+ coverData -> setStackSize1(coverData.mFilter),
+ (coverData, stack) -> {
+ coverData.mFilter = setStackSize1(stack);
+ return coverData;
+ },
+ widget -> widget.setBackground(
+ GT_UITextures.SLOT_DARK_GRAY)
+ .setPos(spaceX * 0, spaceY * 2))
+ .setPos(startX, startY))
+ .widget(
+ new TextWidget(GT_Utility.trans("317", "Filter: ")).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 0,
+ 3 + startY + spaceY * 1))
+ .widget(
+ new TextWidget(GT_Utility.trans("318", "Check Mode")).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 2,
+ 3 + startY + spaceY * 0));
}
private ItemStack setStackSize1(ItemStack stack) {
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java
index 14607cdf09..cc3f553755 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java
@@ -135,8 +135,9 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter.
aCoverVariable.slot++;
if (aCoverVariable.slot > aTileEntity.getSizeInventory()) aCoverVariable.slot = -1;
- if (aCoverVariable.slot == -1) GT_Utility
- .sendChatToPlayer(aPlayer, GT_Utility.trans("053", "Slot: ") + GT_Utility.trans("ALL", "All"));
+ if (aCoverVariable.slot == -1) GT_Utility.sendChatToPlayer(
+ aPlayer,
+ GT_Utility.trans("053", "Slot: ") + GT_Utility.trans("ALL", "All"));
else GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("053", "Slot: ") + aCoverVariable.slot);
}
@@ -228,67 +229,84 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase<GT_Cover_ItemMeter.
maxSlot = getMaxSlot();
builder.widget(
- new CoverDataControllerWidget<>(this::getCoverData, this::setCoverData, GT_Cover_ItemMeter.this)
- .addFollower(
+ new CoverDataControllerWidget<>(
+ this::getCoverData,
+ this::setCoverData,
+ GT_Cover_ItemMeter.this).addFollower(
CoverDataFollower_ToggleButtonWidget.ofRedstone(),
coverData -> coverData.inverted,
(coverData, state) -> {
coverData.inverted = state;
return coverData;
},
- widget -> widget.addTooltip(0, NORMAL).addTooltip(1, INVERTED).setPos(0, 0))
- .addFollower(
- new CoverDataFollower_TextFieldWidget<>(),
- coverData -> getSlotTextFieldContent(coverData.slot),
- (coverData, state) -> {
- coverData.slot = getIntFromText(state);
- return coverData;
- },
- widget -> widget.setOnScrollText().setValidator(val -> {
- final int valSlot = getIntFromText(val);
- if (valSlot > -1) {
- return TextFieldWidget.format.format(Math.min(valSlot, maxSlot));
- } else {
- return ALL_TEXT;
- }
- }).setPattern(BaseTextFieldWidget.NATURAL_NUMS).setFocusOnGuiOpen(true)
- .setPos(0, spaceY + 2).setSize(spaceX * 2 + 5, 12))
- .addFollower(
- new CoverDataFollower_TextFieldWidget<>(),
- coverData -> String.valueOf(coverData.threshold),
- (coverData, state) -> {
- coverData.threshold = (int) MathExpression.parseMathExpression(state);
- return coverData;
- },
- widget -> widget.setOnScrollNumbers(1, 10, 64).setNumbers(0, getUpperBound())
- .setPos(0, spaceY * 2 + 2).setSize(spaceX * 2 + 5, 12))
- .setPos(startX, startY))
- .widget(
- new ItemWatcherSlotWidget().setGetter(
- this::getTargetItem).setPos(
- startX + spaceX * 8 - 4,
- startY + spaceY))
- .widget(
- TextWidget.dynamicString(
- () -> getCoverData() != null ? getCoverData().inverted ? INVERTED : NORMAL : "")
- .setSynced(false).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 3, 4 + startY))
- .widget(
- new TextWidget(GT_Utility.trans("254", "Detect slot#"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 3, 4 + startY + spaceY))
- .widget(
- new TextWidget(GT_Utility.trans("221", "Item threshold"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 3, startY + spaceY * 2 + 4));
+ widget -> widget.addTooltip(0, NORMAL)
+ .addTooltip(1, INVERTED)
+ .setPos(0, 0))
+ .addFollower(
+ new CoverDataFollower_TextFieldWidget<>(),
+ coverData -> getSlotTextFieldContent(coverData.slot),
+ (coverData, state) -> {
+ coverData.slot = getIntFromText(state);
+ return coverData;
+ },
+ widget -> widget.setOnScrollText()
+ .setValidator(val -> {
+ final int valSlot = getIntFromText(val);
+ if (valSlot > -1) {
+ return TextFieldWidget.format.format(
+ Math.min(valSlot, maxSlot));
+ } else {
+ return ALL_TEXT;
+ }
+ })
+ .setPattern(
+ BaseTextFieldWidget.NATURAL_NUMS)
+ .setFocusOnGuiOpen(true)
+ .setPos(0, spaceY + 2)
+ .setSize(spaceX * 2 + 5, 12))
+ .addFollower(
+ new CoverDataFollower_TextFieldWidget<>(),
+ coverData -> String.valueOf(coverData.threshold),
+ (coverData, state) -> {
+ coverData.threshold = (int) MathExpression.parseMathExpression(
+ state);
+ return coverData;
+ },
+ widget -> widget.setOnScrollNumbers(1, 10, 64)
+ .setNumbers(0, getUpperBound())
+ .setPos(0, spaceY * 2 + 2)
+ .setSize(spaceX * 2 + 5, 12))
+ .setPos(startX, startY))
+ .widget(
+ new ItemWatcherSlotWidget().setGetter(this::getTargetItem)
+ .setPos(startX + spaceX * 8 - 4, startY + spaceY))
+ .widget(
+ TextWidget.dynamicString(
+ () -> getCoverData() != null ? getCoverData().inverted ? INVERTED : NORMAL : "")
+ .setSynced(false)
+ .setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(startX + spaceX * 3, 4 + startY))
+ .widget(
+ new TextWidget(GT_Utility.trans("254", "Detect slot#"))
+ .setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 3,
+ 4 + startY + spaceY))
+ .widget(
+ new TextWidget(GT_Utility.trans("221", "Item threshold"))
+ .setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 3,
+ startY + spaceY * 2 + 4));
}
private int getMaxSlot() {
final ICoverable tile = getUIBuildContext().getTile();
if (tile instanceof TileEntity && !tile.isDead()
&& tile instanceof IGregTechTileEntity
- && !(((IGregTechTileEntity) tile)
- .getMetaTileEntity() instanceof GT_MetaTileEntity_DigitalChestBase))
+ && !(((IGregTechTileEntity) tile).getMetaTileEntity() instanceof GT_MetaTileEntity_DigitalChestBase))
return Math.min(tile.getSizeInventory() - 1, SLOT_MASK - 1);
else return -1;
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java
index af062ca56b..4e54aa7cf3 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java
@@ -66,10 +66,9 @@ public class GT_Cover_LiquidMeter extends GT_CoverBehaviorBase<GT_Cover_LiquidMe
if (tanks != null) {
for (FluidTankInfo tank : tanks) {
if (tank != null) {
- if (tileEntity instanceof BaseMetaTileEntity && ((BaseMetaTileEntity) tileEntity)
- .getMetaTileEntity() instanceof GT_MetaTileEntity_DigitalTankBase) {
- max += ((GT_MetaTileEntity_DigitalTankBase) ((BaseMetaTileEntity) tileEntity)
- .getMetaTileEntity()).getRealCapacity();
+ if (tileEntity instanceof BaseMetaTileEntity
+ && ((BaseMetaTileEntity) tileEntity).getMetaTileEntity() instanceof GT_MetaTileEntity_DigitalTankBase) {
+ max += ((GT_MetaTileEntity_DigitalTankBase) ((BaseMetaTileEntity) tileEntity).getMetaTileEntity()).getRealCapacity();
} else max += tank.capacity;
FluidStack tLiquid = tank.fluid;
if (tLiquid != null) {
@@ -196,60 +195,75 @@ public class GT_Cover_LiquidMeter extends GT_CoverBehaviorBase<GT_Cover_LiquidMe
final int maxCapacity;
if (getUIBuildContext().getTile() instanceof IFluidHandler) {
- FluidTankInfo[] tanks = ((IFluidHandler) getUIBuildContext().getTile())
- .getTankInfo(ForgeDirection.UNKNOWN);
- maxCapacity = Arrays.stream(tanks).mapToInt(tank -> tank.capacity).sum();
+ FluidTankInfo[] tanks = ((IFluidHandler) getUIBuildContext().getTile()).getTankInfo(
+ ForgeDirection.UNKNOWN);
+ maxCapacity = Arrays.stream(tanks)
+ .mapToInt(tank -> tank.capacity)
+ .sum();
} else {
maxCapacity = -1;
}
builder.widget(
- new CoverDataControllerWidget<>(this::getCoverData, this::setCoverData, GT_Cover_LiquidMeter.this)
- .addFollower(
+ new CoverDataControllerWidget<>(
+ this::getCoverData,
+ this::setCoverData,
+ GT_Cover_LiquidMeter.this).addFollower(
CoverDataFollower_ToggleButtonWidget.ofRedstone(),
coverData -> coverData.inverted,
(coverData, state) -> {
coverData.inverted = state;
return coverData;
},
- widget -> widget.addTooltip(0, NORMAL).addTooltip(1, INVERTED)
- .setPos(spaceX * 0, spaceY * 0))
- .addFollower(
- CoverDataFollower_ToggleButtonWidget.ofRedstone(),
- coverData -> coverData.strong,
- (coverData, state) -> {
- coverData.strong = state;
- return coverData;
- },
- widget -> widget.addTooltip(0, WEAK).addTooltip(1, STRONG)
- .setPos(spaceX * 0, spaceY * 1))
- .addFollower(
- new CoverDataFollower_TextFieldWidget<>(),
- coverData -> String.valueOf(coverData.threshold),
- (coverData, state) -> {
- coverData.threshold = (int) MathExpression.parseMathExpression(state);
- return coverData;
- },
- widget -> widget.setOnScrollNumbers(1000, 100, 100000)
- .setNumbers(0, maxCapacity > 0 ? maxCapacity : Integer.MAX_VALUE)
- .setFocusOnGuiOpen(true).setPos(spaceX * 0, spaceY * 2 + 2)
- .setSize(spaceX * 4 + 5, 12))
- .setPos(startX, startY))
- .widget(
- TextWidget.dynamicString(
- () -> getCoverData() != null ? getCoverData().inverted ? INVERTED : NORMAL : "")
- .setSynced(false).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 1, 4 + startY + spaceY * 0))
- .widget(
- TextWidget
- .dynamicString(
- () -> getCoverData() != null ? getCoverData().strong ? STRONG : WEAK : "")
- .setSynced(false).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 1, 4 + startY + spaceY * 1))
- .widget(
- new TextWidget(GT_Utility.trans("222", "Fluid threshold"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 5 - 10, startY + spaceY * 2 + 4));
+ widget -> widget.addTooltip(0, NORMAL)
+ .addTooltip(1, INVERTED)
+ .setPos(spaceX * 0, spaceY * 0))
+ .addFollower(
+ CoverDataFollower_ToggleButtonWidget.ofRedstone(),
+ coverData -> coverData.strong,
+ (coverData, state) -> {
+ coverData.strong = state;
+ return coverData;
+ },
+ widget -> widget.addTooltip(0, WEAK)
+ .addTooltip(1, STRONG)
+ .setPos(spaceX * 0, spaceY * 1))
+ .addFollower(
+ new CoverDataFollower_TextFieldWidget<>(),
+ coverData -> String.valueOf(coverData.threshold),
+ (coverData, state) -> {
+ coverData.threshold = (int) MathExpression.parseMathExpression(
+ state);
+ return coverData;
+ },
+ widget -> widget.setOnScrollNumbers(1000, 100, 100000)
+ .setNumbers(
+ 0,
+ maxCapacity > 0 ? maxCapacity
+ : Integer.MAX_VALUE)
+ .setFocusOnGuiOpen(true)
+ .setPos(spaceX * 0, spaceY * 2 + 2)
+ .setSize(spaceX * 4 + 5, 12))
+ .setPos(startX, startY))
+ .widget(
+ TextWidget.dynamicString(
+ () -> getCoverData() != null ? getCoverData().inverted ? INVERTED : NORMAL : "")
+ .setSynced(false)
+ .setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(startX + spaceX * 1, 4 + startY + spaceY * 0))
+ .widget(
+ TextWidget.dynamicString(
+ () -> getCoverData() != null ? getCoverData().strong ? STRONG : WEAK : "")
+ .setSynced(false)
+ .setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(startX + spaceX * 1, 4 + startY + spaceY * 1))
+ .widget(
+ new TextWidget(GT_Utility.trans("222", "Fluid threshold"))
+ .setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 5 - 10,
+ startY + spaceY * 2 + 4));
}
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java b/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java
index cb8c4e691e..0387d4e4b9 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java
@@ -247,69 +247,93 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior {
getNewCoverVariable(index, convert(coverData)))).addToggleButton(
0,
CoverDataFollower_ToggleButtonWidget.ofCheck(),
- widget -> widget.addTooltip(tooltipText[0]).setPos(spaceX * 0, spaceY * 0))
- .addToggleButton(
- 1,
- CoverDataFollower_ToggleButtonWidget.ofCheck(),
- widget -> widget.addTooltip(tooltipText[1])
- .setPos(spaceX * 0, spaceY * 1))
- .addToggleButton(
- 2,
- CoverDataFollower_ToggleButtonWidget.ofCheck(),
- widget -> widget.addTooltip(tooltipText[2])
- .setPos(spaceX * 0, spaceY * 2))
- .addToggleButton(
- 3,
- CoverDataFollower_ToggleButtonWidget.ofCheck(),
- widget -> widget.addTooltip(tooltipText[3])
- .setPos(spaceX * 0, spaceY * 3))
- .addToggleButton(
- 4,
- CoverDataFollower_ToggleButtonWidget.ofCheck(),
- widget -> widget.addTooltip(tooltipText[4])
- .setPos(spaceX * 4 + 4, spaceY * 0))
- .addToggleButton(
- 5,
- CoverDataFollower_ToggleButtonWidget.ofCheck(),
- widget -> widget.addTooltip(tooltipText[5])
- .setPos(spaceX * 4 + 4, spaceY * 1))
- .addToggleButton(
- 6,
- CoverDataFollower_ToggleButtonWidget.ofCheck(),
- widget -> widget.addTooltip(tooltipText[6])
- .setPos(spaceX * 4 + 4, spaceY * 2))
- .addToggleButton(
- 7,
- CoverDataFollower_ToggleButtonWidget.ofRedstone(),
- widget -> widget.setPos(spaceX * 4 + 4, spaceY * 3))
- .setPos(startX, startY))
- .widget(
- new TextWidget(buttonText[0]).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 1, 4 + startY + spaceY * 0))
- .widget(
- new TextWidget(buttonText[1]).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 1, 4 + startY + spaceY * 1))
- .widget(
- new TextWidget(buttonText[2]).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 1, 4 + startY + spaceY * 2))
- .widget(
- new TextWidget(buttonText[3]).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 1, 4 + startY + spaceY * 3))
- .widget(
- new TextWidget(buttonText[4]).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 5 + 4, 4 + startY + spaceY * 0))
- .widget(
- new TextWidget(buttonText[5]).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 5 + 4, 4 + startY + spaceY * 1))
- .widget(
- new TextWidget(buttonText[6]).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 5 + 4, 4 + startY + spaceY * 2))
- .widget(
- TextWidget
- .dynamicString(
- () -> isEnabled(7, convert(getCoverData())) ? buttonText[7] : buttonText[8])
- .setSynced(false).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 5 + 4, 4 + startY + spaceY * 3));
+ widget -> widget.addTooltip(tooltipText[0])
+ .setPos(spaceX * 0, spaceY * 0))
+ .addToggleButton(
+ 1,
+ CoverDataFollower_ToggleButtonWidget.ofCheck(),
+ widget -> widget.addTooltip(
+ tooltipText[1])
+ .setPos(
+ spaceX * 0,
+ spaceY * 1))
+ .addToggleButton(
+ 2,
+ CoverDataFollower_ToggleButtonWidget.ofCheck(),
+ widget -> widget.addTooltip(
+ tooltipText[2])
+ .setPos(
+ spaceX * 0,
+ spaceY * 2))
+ .addToggleButton(
+ 3,
+ CoverDataFollower_ToggleButtonWidget.ofCheck(),
+ widget -> widget.addTooltip(
+ tooltipText[3])
+ .setPos(
+ spaceX * 0,
+ spaceY * 3))
+ .addToggleButton(
+ 4,
+ CoverDataFollower_ToggleButtonWidget.ofCheck(),
+ widget -> widget.addTooltip(
+ tooltipText[4])
+ .setPos(
+ spaceX * 4
+ + 4,
+ spaceY * 0))
+ .addToggleButton(
+ 5,
+ CoverDataFollower_ToggleButtonWidget.ofCheck(),
+ widget -> widget.addTooltip(
+ tooltipText[5])
+ .setPos(
+ spaceX * 4
+ + 4,
+ spaceY * 1))
+ .addToggleButton(
+ 6,
+ CoverDataFollower_ToggleButtonWidget.ofCheck(),
+ widget -> widget.addTooltip(
+ tooltipText[6])
+ .setPos(
+ spaceX * 4
+ + 4,
+ spaceY * 2))
+ .addToggleButton(
+ 7,
+ CoverDataFollower_ToggleButtonWidget.ofRedstone(),
+ widget -> widget.setPos(
+ spaceX * 4 + 4,
+ spaceY * 3))
+ .setPos(startX, startY))
+ .widget(
+ new TextWidget(buttonText[0]).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(startX + spaceX * 1, 4 + startY + spaceY * 0))
+ .widget(
+ new TextWidget(buttonText[1]).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(startX + spaceX * 1, 4 + startY + spaceY * 1))
+ .widget(
+ new TextWidget(buttonText[2]).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(startX + spaceX * 1, 4 + startY + spaceY * 2))
+ .widget(
+ new TextWidget(buttonText[3]).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(startX + spaceX * 1, 4 + startY + spaceY * 3))
+ .widget(
+ new TextWidget(buttonText[4]).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(startX + spaceX * 5 + 4, 4 + startY + spaceY * 0))
+ .widget(
+ new TextWidget(buttonText[5]).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(startX + spaceX * 5 + 4, 4 + startY + spaceY * 1))
+ .widget(
+ new TextWidget(buttonText[6]).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(startX + spaceX * 5 + 4, 4 + startY + spaceY * 2))
+ .widget(
+ TextWidget.dynamicString(
+ () -> isEnabled(7, convert(getCoverData())) ? buttonText[7] : buttonText[8])
+ .setSynced(false)
+ .setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(startX + spaceX * 5 + 4, 4 + startY + spaceY * 3));
}
private int getNewCoverVariable(int id, int coverVariable) {
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java b/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java
index 5746807247..bbfe23eb30 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java
@@ -68,7 +68,8 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior {
playerDetected = true;
break;
}
- if (tEntity.getDisplayName().equalsIgnoreCase(placer)) {
+ if (tEntity.getDisplayName()
+ .equalsIgnoreCase(placer)) {
if (aCoverVariable == 1) {
playerDetected = true;
break;
@@ -187,33 +188,49 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior {
(index, coverData) -> new ISerializableObject.LegacyCoverData(index)).addToggleButton(
0,
CoverDataFollower_ToggleButtonWidget.ofCheck(),
- widget -> widget
- .addTooltip(GT_Utility.trans("068.1", "Emit if any Player is close"))
- .setPos(spaceX * 0, spaceY * 0))
- .addToggleButton(
- 1,
- CoverDataFollower_ToggleButtonWidget.ofCheck(),
- widget -> widget
- .addTooltip(
- GT_Utility.trans("069.1", "Emit if other Player is close"))
- .setPos(spaceX * 0, spaceY * 1))
- .addToggleButton(
- 2,
- CoverDataFollower_ToggleButtonWidget.ofCheck(),
- widget -> widget
- .addTooltip(GT_Utility.trans("070", "Emit if you are close"))
- .setPos(spaceX * 0, spaceY * 2))
- .setPos(startX, startY))
- .widget(
- new TextWidget(GT_Utility.trans("319", "Any player")).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 1, 4 + startY + spaceY * 0))
- .widget(
- new TextWidget(GT_Utility.trans("320", "Other players"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 1, 4 + startY + spaceY * 1))
- .widget(
- new TextWidget(GT_Utility.trans("321", "Only owner")).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 1, 4 + startY + spaceY * 2));
+ widget -> widget.addTooltip(
+ GT_Utility.trans("068.1", "Emit if any Player is close"))
+ .setPos(spaceX * 0, spaceY * 0))
+ .addToggleButton(
+ 1,
+ CoverDataFollower_ToggleButtonWidget.ofCheck(),
+ widget -> widget.addTooltip(
+ GT_Utility.trans(
+ "069.1",
+ "Emit if other Player is close"))
+ .setPos(
+ spaceX * 0,
+ spaceY * 1))
+ .addToggleButton(
+ 2,
+ CoverDataFollower_ToggleButtonWidget.ofCheck(),
+ widget -> widget.addTooltip(
+ GT_Utility.trans(
+ "070",
+ "Emit if you are close"))
+ .setPos(
+ spaceX * 0,
+ spaceY * 2))
+ .setPos(
+ startX,
+ startY))
+ .widget(
+ new TextWidget(GT_Utility.trans("319", "Any player")).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 1,
+ 4 + startY + spaceY * 0))
+ .widget(
+ new TextWidget(GT_Utility.trans("320", "Other players"))
+ .setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 1,
+ 4 + startY + spaceY * 1))
+ .widget(
+ new TextWidget(GT_Utility.trans("321", "Only owner")).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 1,
+ 4 + startY + spaceY * 2));
}
}
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java
index 57f39d4ba6..2e23995fcf 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java
@@ -60,18 +60,25 @@ public class GT_Cover_Pump extends GT_CoverBehavior {
FluidStack tLiquid = tTank1.drain(ForgeDirection.getOrientation(aSide), this.mTransferRate, false);
if (tLiquid != null) {
tLiquid = tLiquid.copy();
- tLiquid.amount = tTank2
- .fill(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid, false);
+ tLiquid.amount = tTank2.fill(
+ ForgeDirection.getOrientation(aSide)
+ .getOpposite(),
+ tLiquid,
+ false);
if (tLiquid.amount > 0 && canTransferFluid(tLiquid)) {
tTank2.fill(
- ForgeDirection.getOrientation(aSide).getOpposite(),
+ ForgeDirection.getOrientation(aSide)
+ .getOpposite(),
tTank1.drain(ForgeDirection.getOrientation(aSide), tLiquid.amount, true),
true);
}
}
} else {
- FluidStack tLiquid = tTank2
- .drain(ForgeDirection.getOrientation(aSide).getOpposite(), this.mTransferRate, false);
+ FluidStack tLiquid = tTank2.drain(
+ ForgeDirection.getOrientation(aSide)
+ .getOpposite(),
+ this.mTransferRate,
+ false);
if (tLiquid != null) {
tLiquid = tLiquid.copy();
tLiquid.amount = tTank1.fill(ForgeDirection.getOrientation(aSide), tLiquid, false);
@@ -79,7 +86,8 @@ public class GT_Cover_Pump extends GT_CoverBehavior {
tTank1.fill(
ForgeDirection.getOrientation(aSide),
tTank2.drain(
- ForgeDirection.getOrientation(aSide).getOpposite(),
+ ForgeDirection.getOrientation(aSide)
+ .getOpposite(),
tLiquid.amount,
true),
true);
@@ -245,69 +253,100 @@ public class GT_Cover_Pump extends GT_CoverBehavior {
0,
CoverDataFollower_ToggleButtonWidget.ofDisableable(),
widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_EXPORT)
- .addTooltip(GT_Utility.trans("006", "Export"))
- .setPos(spaceX * 0, spaceY * 0))
- .addToggleButton(
- 1,
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- widget -> widget
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_IMPORT)
- .addTooltip(GT_Utility.trans("007", "Import"))
- .setPos(spaceX * 1, spaceY * 0))
- .addToggleButton(
- 2,
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- widget -> widget
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_CHECKMARK)
- .addTooltip(GT_Utility.trans("224", "Always On"))
- .setPos(spaceX * 0, spaceY * 1))
- .addToggleButton(
- 3,
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- widget -> widget
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON)
- .addTooltip(
- GT_Utility.trans(
- "225",
- "Active with Redstone Signal"))
- .setPos(spaceX * 1, spaceY * 1))
- .addToggleButton(
- 4,
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- widget -> widget
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF)
- .addTooltip(
- GT_Utility.trans(
- "226",
- "Inactive with Redstone Signal"))
- .setPos(spaceX * 2, spaceY * 1))
- .addToggleButton(
- 5,
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- widget -> widget
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_ALLOW_INPUT)
- .addTooltip(GT_Utility.trans("227", "Allow Input"))
- .setPos(spaceX * 0, spaceY * 2))
- .addToggleButton(
- 6,
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- widget -> widget
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_BLOCK_INPUT)
- .addTooltip(GT_Utility.trans("228", "Block Input"))
- .setPos(spaceX * 1, spaceY * 2))
- .setPos(startX, startY))
- .widget(
- new TextWidget(GT_Utility.trans("229", "Import/Export"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 3, 3 + startY + spaceY * 0))
- .widget(
- new TextWidget(GT_Utility.trans("230", "Conditional"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 3, 3 + startY + spaceY * 1))
- .widget(
- new TextWidget(GT_Utility.trans("231", "Enable Input"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 3, 3 + startY + spaceY * 2));
+ .addTooltip(GT_Utility.trans("006", "Export"))
+ .setPos(spaceX * 0, spaceY * 0))
+ .addToggleButton(
+ 1,
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ widget -> widget.setStaticTexture(
+ GT_UITextures.OVERLAY_BUTTON_IMPORT)
+ .addTooltip(
+ GT_Utility.trans(
+ "007",
+ "Import"))
+ .setPos(
+ spaceX * 1,
+ spaceY * 0))
+ .addToggleButton(
+ 2,
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ widget -> widget.setStaticTexture(
+ GT_UITextures.OVERLAY_BUTTON_CHECKMARK)
+ .addTooltip(
+ GT_Utility.trans(
+ "224",
+ "Always On"))
+ .setPos(
+ spaceX * 0,
+ spaceY * 1))
+ .addToggleButton(
+ 3,
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ widget -> widget.setStaticTexture(
+ GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON)
+ .addTooltip(
+ GT_Utility.trans(
+ "225",
+ "Active with Redstone Signal"))
+ .setPos(
+ spaceX * 1,
+ spaceY * 1))
+ .addToggleButton(
+ 4,
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ widget -> widget.setStaticTexture(
+ GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF)
+ .addTooltip(
+ GT_Utility.trans(
+ "226",
+ "Inactive with Redstone Signal"))
+ .setPos(
+ spaceX * 2,
+ spaceY * 1))
+ .addToggleButton(
+ 5,
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ widget -> widget.setStaticTexture(
+ GT_UITextures.OVERLAY_BUTTON_ALLOW_INPUT)
+ .addTooltip(
+ GT_Utility.trans(
+ "227",
+ "Allow Input"))
+ .setPos(
+ spaceX * 0,
+ spaceY * 2))
+ .addToggleButton(
+ 6,
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ widget -> widget.setStaticTexture(
+ GT_UITextures.OVERLAY_BUTTON_BLOCK_INPUT)
+ .addTooltip(
+ GT_Utility.trans(
+ "228",
+ "Block Input"))
+ .setPos(
+ spaceX * 1,
+ spaceY * 2))
+ .setPos(startX, startY))
+ .widget(
+ new TextWidget(GT_Utility.trans("229", "Import/Export"))
+ .setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 3,
+ 3 + startY + spaceY * 0))
+ .widget(
+ new TextWidget(GT_Utility.trans("230", "Conditional")).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 3,
+ 3 + startY + spaceY * 1))
+ .widget(
+ new TextWidget(GT_Utility.trans("231", "Enable Input"))
+ .setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 3,
+ 3 + startY + spaceY * 2));
}
private int getNewCoverVariable(int id, int coverVariable) {
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java
index f4b7f5fa80..968ad3f815 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java
@@ -27,8 +27,9 @@ public class GT_Cover_RedstoneTransmitterInternal extends GT_Cover_RedstoneWirel
@Override
public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity,
long aTimer) {
- GregTech_API.sWirelessRedstone
- .put(Integer.valueOf(aCoverVariable), Byte.valueOf(aTileEntity.getOutputRedstoneSignal(aSide)));
+ GregTech_API.sWirelessRedstone.put(
+ Integer.valueOf(aCoverVariable),
+ Byte.valueOf(aTileEntity.getOutputRedstoneSignal(aSide)));
return aCoverVariable;
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java
index 441201af08..88a472797b 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java
@@ -68,13 +68,15 @@ public abstract class GT_Cover_RedstoneWirelessBase extends GT_CoverBehavior {
GregTech_API.sWirelessRedstone.put(aCoverVariable, (byte) 0);
int val = GT_Utility.stackToInt(aPlayer.inventory.getCurrentItem())
- * (1 + aPlayer.inventory.getCurrentItem().getItemDamage());
+ * (1 + aPlayer.inventory.getCurrentItem()
+ .getItemDamage());
aCoverVariable = (aCoverVariable & (PRIVATE_MASK | CHECKBOX_MASK)) | (val & PUBLIC_MASK);
aTileEntity.setCoverDataAtSide(aSide, aCoverVariable);
- GT_Utility
- .sendChatToPlayer(aPlayer, GT_Utility.trans("081", "Frequency: ") + (aCoverVariable & PUBLIC_MASK));
+ GT_Utility.sendChatToPlayer(
+ aPlayer,
+ GT_Utility.trans("081", "Frequency: ") + (aCoverVariable & PUBLIC_MASK));
return true;
}
return false;
@@ -198,30 +200,41 @@ public abstract class GT_Cover_RedstoneWirelessBase extends GT_CoverBehavior {
new CoverDataControllerWidget<>(
this::getCoverData,
this::setCoverData,
- GT_Cover_RedstoneWirelessBase.this)
- .addFollower(
- new CoverDataFollower_TextFieldWidget<>(),
- coverData -> String.valueOf(getFlagFrequency(convert(coverData))),
- (coverData, text) -> new ISerializableObject.LegacyCoverData(
- (int) MathExpression.parseMathExpression(text)
- | getFlagCheckbox(convert(coverData))),
- widget -> widget.setOnScrollNumbers().setNumbers(0, MAX_CHANNEL)
- .setFocusOnGuiOpen(true).setPos(spaceX * 0, spaceY * 0 + 2)
+ GT_Cover_RedstoneWirelessBase.this).addFollower(
+ new CoverDataFollower_TextFieldWidget<>(),
+ coverData -> String.valueOf(getFlagFrequency(convert(coverData))),
+ (coverData, text) -> new ISerializableObject.LegacyCoverData(
+ (int) MathExpression.parseMathExpression(text)
+ | getFlagCheckbox(convert(coverData))),
+ widget -> widget.setOnScrollNumbers()
+ .setNumbers(0, MAX_CHANNEL)
+ .setFocusOnGuiOpen(true)
+ .setPos(spaceX * 0, spaceY * 0 + 2)
.setSize(spaceX * 4 - 3, 12))
- .addFollower(
- CoverDataFollower_ToggleButtonWidget.ofCheck(),
- coverData -> getFlagCheckbox(convert(coverData)) > 0,
- (coverData, state) -> new ISerializableObject.LegacyCoverData(
- getFlagFrequency(convert(coverData)) | (state ? CHECKBOX_MASK : 0)),
- widget -> widget.setPos(spaceX * 0, spaceY * 2))
- .setPos(startX, startY))
- .widget(
- new TextWidget(GT_Utility.trans("246", "Frequency")).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 4, 4 + startY + spaceY * 0))
- .widget(
- new TextWidget(GT_Utility.trans("602", "Use Private Frequency"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 1, startY + spaceY * 2 + 4));
+ .addFollower(
+ CoverDataFollower_ToggleButtonWidget.ofCheck(),
+ coverData -> getFlagCheckbox(convert(coverData))
+ > 0,
+ (coverData,
+ state) -> new ISerializableObject.LegacyCoverData(
+ getFlagFrequency(
+ convert(coverData))
+ | (state ? CHECKBOX_MASK
+ : 0)),
+ widget -> widget.setPos(spaceX * 0, spaceY * 2))
+ .setPos(startX, startY))
+ .widget(
+ new TextWidget(GT_Utility.trans("246", "Frequency")).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 4,
+ 4 + startY + spaceY * 0))
+ .widget(
+ new TextWidget(GT_Utility.trans("602", "Use Private Frequency")).setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 1,
+ startY + spaceY * 2
+ + 4));
}
private int getFlagFrequency(int coverVariable) {
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java b/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java
index f1e977efad..81af7b06d4 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java
@@ -173,40 +173,65 @@ public class GT_Cover_Shutter extends GT_CoverBehavior {
this::setCoverData,
GT_Cover_Shutter.this,
(index, coverData) -> index == convert(coverData),
- (index, coverData) -> new ISerializableObject.LegacyCoverData(index))
- .addToggleButton(
- 0,
- CoverDataFollower_ToggleButtonWidget.ofCheck(),
- widget -> widget.setPos(spaceX * 0, spaceY * 0))
- .addToggleButton(
- 1,
- CoverDataFollower_ToggleButtonWidget.ofCheck(),
- widget -> widget.setPos(spaceX * 0, spaceY * 1))
- .addToggleButton(
- 2,
- CoverDataFollower_ToggleButtonWidget.ofCheck(),
- widget -> widget.setPos(spaceX * 0, spaceY * 2))
- .addToggleButton(
- 3,
- CoverDataFollower_ToggleButtonWidget.ofCheck(),
- widget -> widget.setPos(spaceX * 0, spaceY * 3))
- .setPos(startX, startY))
- .widget(
- new TextWidget(GT_Utility.trans("082", "Open if work enabled"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 0))
- .widget(
- new TextWidget(GT_Utility.trans("083", "Open if work disabled"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 1))
- .widget(
- new TextWidget(GT_Utility.trans("084", "Only Output allowed"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 2))
- .widget(
- new TextWidget(GT_Utility.trans("085", "Only Input allowed"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(3 + startX + spaceX * 1, 4 + startY + spaceY * 3));
+ (index, coverData) -> new ISerializableObject.LegacyCoverData(index)).addToggleButton(
+ 0,
+ CoverDataFollower_ToggleButtonWidget.ofCheck(),
+ widget -> widget.setPos(spaceX * 0, spaceY * 0))
+ .addToggleButton(
+ 1,
+ CoverDataFollower_ToggleButtonWidget.ofCheck(),
+ widget -> widget.setPos(
+ spaceX * 0,
+ spaceY * 1))
+ .addToggleButton(
+ 2,
+ CoverDataFollower_ToggleButtonWidget.ofCheck(),
+ widget -> widget.setPos(
+ spaceX * 0,
+ spaceY * 2))
+ .addToggleButton(
+ 3,
+ CoverDataFollower_ToggleButtonWidget.ofCheck(),
+ widget -> widget.setPos(
+ spaceX * 0,
+ spaceY * 3))
+ .setPos(
+ startX,
+ startY))
+ .widget(
+ new TextWidget(GT_Utility.trans("082", "Open if work enabled"))
+ .setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ 3 + startX
+ + spaceX * 1,
+ 4 + startY
+ + spaceY * 0))
+ .widget(
+ new TextWidget(
+ GT_Utility.trans("083", "Open if work disabled"))
+ .setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ 3 + startX + spaceX * 1,
+ 4 + startY + spaceY * 1))
+ .widget(
+ new TextWidget(GT_Utility.trans("084", "Only Output allowed"))
+ .setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ 3 + startX
+ + spaceX * 1,
+ 4 + startY
+ + spaceY * 2))
+ .widget(
+ new TextWidget(GT_Utility.trans("085", "Only Input allowed"))
+ .setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ 3 + startX + spaceX * 1,
+ 4 + startY
+ + spaceY * 3));
}
}
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java b/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java
index 7bd0503214..7b41aefcca 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java
@@ -32,22 +32,27 @@ public class GT_Cover_SolarPanel extends GT_CoverBehavior {
int coverState = aCoverVariable & 0x3;
int coverNum = aCoverVariable >> 2;
if (aTimer % 100L == 0L) {
- if (aTileEntity.getWorld().isThundering()) {
+ if (aTileEntity.getWorld()
+ .isThundering()) {
return aTileEntity.getBiome().rainfall > 0.0F && aTileEntity.getSkyAtSide(aSide)
? Math.min(20, coverNum) << 2
: coverNum << 2;
} else {
- if (aTileEntity.getWorld().isRaining() && aTileEntity.getBiome().rainfall > 0.0F) { // really rains
+ if (aTileEntity.getWorld()
+ .isRaining()
+ && aTileEntity.getBiome().rainfall > 0.0F) { // really rains
if (aTileEntity.getSkyAtSide(aSide)) coverNum = Math.min(30, coverNum);
if (aTileEntity.getWorld().skylightSubtracted >= 4) {
- if (aTileEntity.getWorld().isDaytime()) {
+ if (aTileEntity.getWorld()
+ .isDaytime()) {
coverState = 2;
} else {
return coverNum << 2;
}
}
} else { // not rains
- if (aTileEntity.getWorld().isDaytime()) {
+ if (aTileEntity.getWorld()
+ .isDaytime()) {
coverState = 1;
} else {
coverState = 2;
@@ -74,7 +79,8 @@ public class GT_Cover_SolarPanel extends GT_CoverBehavior {
for (int i = 0; i < aPlayer.inventory.mainInventory.length; i++) {
ItemStack is = aPlayer.inventory.mainInventory[i];
if (is == null) continue;
- if (is.getUnlocalizedName().equals(new ItemStack(Items.water_bucket).getUnlocalizedName())) {
+ if (is.getUnlocalizedName()
+ .equals(new ItemStack(Items.water_bucket).getUnlocalizedName())) {
aPlayer.inventory.mainInventory[i] = new ItemStack(Items.bucket);
if (aPlayer.inventoryContainer != null) aPlayer.inventoryContainer.detectAndSendChanges();
GT_Utility.sendChatToPlayer(
@@ -100,7 +106,8 @@ public class GT_Cover_SolarPanel extends GT_CoverBehavior {
for (int i = 0; i < aPlayer.inventory.mainInventory.length; i++) {
ItemStack is = aPlayer.inventory.mainInventory[i];
if (is == null) continue;
- if (is.getUnlocalizedName().equals(new ItemStack(Items.water_bucket).getUnlocalizedName())) {
+ if (is.getUnlocalizedName()
+ .equals(new ItemStack(Items.water_bucket).getUnlocalizedName())) {
aPlayer.inventory.mainInventory[i] = new ItemStack(Items.bucket);
if (aPlayer.inventoryContainer != null) aPlayer.inventoryContainer.detectAndSendChanges();
GT_Utility.sendChatToPlayer(aPlayer, "Cleaned solar panel from " + (aCoverVariable >> 2) + "% dirt");
diff --git a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneReceiverBase.java b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneReceiverBase.java
index e296785cd8..bebedffaca 100644
--- a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneReceiverBase.java
+++ b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneReceiverBase.java
@@ -72,7 +72,9 @@ public abstract class GT_Cover_AdvancedRedstoneReceiverBase
super.addUIWidgets(builder);
builder.widget(
new TextWidget(GT_Utility.trans("335", "Gate Mode")).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 5, 4 + startY + spaceY * 2));
+ .setPos(
+ startX + spaceX * 5,
+ 4 + startY + spaceY * 2));
}
@SuppressWarnings("PointlessArithmeticExpression")
@@ -87,48 +89,52 @@ public abstract class GT_Cover_AdvancedRedstoneReceiverBase
return coverData;
},
widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_GATE_AND)
- .addTooltip(GT_Utility.trans("331", "AND Gate")).setPos(spaceX * 0, spaceY * 2))
- .addFollower(
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- coverData -> coverData.mode == GateMode.NAND,
- (coverData, state) -> {
- coverData.mode = GateMode.NAND;
- return coverData;
- },
- widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_GATE_NAND)
- .addTooltip(GT_Utility.trans("332", "NAND Gate")).setPos(spaceX * 1, spaceY * 2))
- .addFollower(
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- coverData -> coverData.mode == GateMode.OR,
- (coverData, state) -> {
- coverData.mode = GateMode.OR;
- return coverData;
- },
- widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_GATE_OR)
- .addTooltip(GT_Utility.trans("333", "OR Gate")).setPos(spaceX * 2, spaceY * 2))
- .addFollower(
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- coverData -> coverData.mode == GateMode.NOR,
- (coverData, state) -> {
- coverData.mode = GateMode.NOR;
- return coverData;
- },
- widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_GATE_NOR)
- .addTooltip(GT_Utility.trans("334", "NOR Gate")).setPos(spaceX * 3, spaceY * 2))
- .addFollower(
- CoverDataFollower_ToggleButtonWidget.ofDisableable(),
- coverData -> coverData.mode == GateMode.SINGLE_SOURCE,
- (coverData, state) -> {
- coverData.mode = GateMode.SINGLE_SOURCE;
- return coverData;
- },
- widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_ANALOG)
- .addTooltips(
- Arrays.asList(
- "ANALOG Mode",
- "Only use this mode with ONE transmitter in total,",
- "no logic involved"))
- .setPos(spaceX * 4, spaceY * 2));
+ .addTooltip(GT_Utility.trans("331", "AND Gate"))
+ .setPos(spaceX * 0, spaceY * 2))
+ .addFollower(
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ coverData -> coverData.mode == GateMode.NAND,
+ (coverData, state) -> {
+ coverData.mode = GateMode.NAND;
+ return coverData;
+ },
+ widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_GATE_NAND)
+ .addTooltip(GT_Utility.trans("332", "NAND Gate"))
+ .setPos(spaceX * 1, spaceY * 2))
+ .addFollower(
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ coverData -> coverData.mode == GateMode.OR,
+ (coverData, state) -> {
+ coverData.mode = GateMode.OR;
+ return coverData;
+ },
+ widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_GATE_OR)
+ .addTooltip(GT_Utility.trans("333", "OR Gate"))
+ .setPos(spaceX * 2, spaceY * 2))
+ .addFollower(
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ coverData -> coverData.mode == GateMode.NOR,
+ (coverData, state) -> {
+ coverData.mode = GateMode.NOR;
+ return coverData;
+ },
+ widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_GATE_NOR)
+ .addTooltip(GT_Utility.trans("334", "NOR Gate"))
+ .setPos(spaceX * 3, spaceY * 2))
+ .addFollower(
+ CoverDataFollower_ToggleButtonWidget.ofDisableable(),
+ coverData -> coverData.mode == GateMode.SINGLE_SOURCE,
+ (coverData, state) -> {
+ coverData.mode = GateMode.SINGLE_SOURCE;
+ return coverData;
+ },
+ widget -> widget.setStaticTexture(GT_UITextures.OVERLAY_BUTTON_ANALOG)
+ .addTooltips(
+ Arrays.asList(
+ "ANALOG Mode",
+ "Only use this mode with ONE transmitter in total,",
+ "no logic involved"))
+ .setPos(spaceX * 4, spaceY * 2));
}
}
diff --git a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterBase.java b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterBase.java
index f39b573742..e74dffb102 100644
--- a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterBase.java
+++ b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterBase.java
@@ -163,8 +163,10 @@ public abstract class GT_Cover_AdvancedRedstoneTransmitterBase<T extends GT_Cove
} else {
return "";
}
- }).setSynced(false).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 10, 4 + startY + spaceY * getButtonRow()));
+ })
+ .setSynced(false)
+ .setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(startX + spaceX * 10, 4 + startY + spaceY * getButtonRow()));
}
@Override
@@ -178,8 +180,8 @@ public abstract class GT_Cover_AdvancedRedstoneTransmitterBase<T extends GT_Cove
return coverData;
},
widget -> widget.addTooltip(0, GT_Utility.trans("NORMAL", "Normal"))
- .addTooltip(1, GT_Utility.trans("INVERTED", "Inverted"))
- .setPos(spaceX * 9, spaceY * getButtonRow()));
+ .addTooltip(1, GT_Utility.trans("INVERTED", "Inverted"))
+ .setPos(spaceX * 9, spaceY * getButtonRow()));
}
}
}
diff --git a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedWirelessRedstoneBase.java b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedWirelessRedstoneBase.java
index 50302bade0..e619d72723 100644
--- a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedWirelessRedstoneBase.java
+++ b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedWirelessRedstoneBase.java
@@ -44,23 +44,34 @@ public abstract class GT_Cover_AdvancedWirelessRedstoneBase<T extends GT_Cover_A
switch (mode) {
case AND:
- return (byte) (signals.values().stream().map(signal -> signal > 0)
- .reduce(true, (signalA, signalB) -> signalA && signalB) ? 15 : 0);
+ return (byte) (signals.values()
+ .stream()
+ .map(signal -> signal > 0)
+ .reduce(true, (signalA, signalB) -> signalA && signalB) ? 15 : 0);
case NAND:
- return (byte) (signals.values().stream().map(signal -> signal > 0)
- .reduce(true, (signalA, signalB) -> signalA && signalB) ? 0 : 15);
+ return (byte) (signals.values()
+ .stream()
+ .map(signal -> signal > 0)
+ .reduce(true, (signalA, signalB) -> signalA && signalB) ? 0 : 15);
case OR:
- return (byte) (signals.values().stream().map(signal -> signal > 0)
- .reduce(false, (signalA, signalB) -> signalA || signalB) ? 15 : 0);
+ return (byte) (signals.values()
+ .stream()
+ .map(signal -> signal > 0)
+ .reduce(false, (signalA, signalB) -> signalA || signalB) ? 15 : 0);
case NOR:
- return (byte) (signals.values().stream().map(signal -> signal > 0)
- .reduce(false, (signalA, signalB) -> signalA || signalB) ? 0 : 15);
+ return (byte) (signals.values()
+ .stream()
+ .map(signal -> signal > 0)
+ .reduce(false, (signalA, signalB) -> signalA || signalB) ? 0 : 15);
case SINGLE_SOURCE:
- if (signals.values().isEmpty()) {
+ if (signals.values()
+ .isEmpty()) {
return 0;
}
- return signals.values().iterator().next();
+ return signals.values()
+ .iterator()
+ .next();
default:
return 0;
}
@@ -76,8 +87,9 @@ public abstract class GT_Cover_AdvancedWirelessRedstoneBase<T extends GT_Cover_A
}
public static void setSignalAt(UUID uuid, int frequency, long hash, byte value) {
- Map<Integer, Map<Long, Byte>> frequencies = GregTech_API.sAdvancedWirelessRedstone
- .computeIfAbsent(String.valueOf(uuid), k -> new ConcurrentHashMap<>());
+ Map<Integer, Map<Long, Byte>> frequencies = GregTech_API.sAdvancedWirelessRedstone.computeIfAbsent(
+ String.valueOf(uuid),
+ k -> new ConcurrentHashMap<>());
Map<Long, Byte> signals = frequencies.computeIfAbsent(frequency, k -> new ConcurrentHashMap<>());
signals.put(hash, value);
}
@@ -238,14 +250,22 @@ public abstract class GT_Cover_AdvancedWirelessRedstoneBase<T extends GT_Cover_A
addUIForDataController(dataController);
builder.widget(dataController)
- .widget(
- new TextWidget(GT_Utility.trans("246", "Frequency")).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 5, 4 + startY + spaceY * getFrequencyRow()))
- .widget(
- new TextWidget(GT_Utility.trans("602", "Use Private Frequency"))
- .setDefaultColor(COLOR_TEXT_GRAY.get()).setPos(
- startX + spaceX * privateExtraColumn,
- 4 + startY + spaceY * getButtonRow()));
+ .widget(
+ new TextWidget(GT_Utility.trans("246", "Frequency")).setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 5,
+ 4 + startY
+ + spaceY * getFrequencyRow()))
+ .widget(
+ new TextWidget(
+ GT_Utility.trans("602", "Use Private Frequency"))
+ .setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX
+ * privateExtraColumn,
+ 4 + startY
+ + spaceY * getButtonRow()));
}
protected void addUIForDataController(CoverDataControllerWidget<T> controller) {
@@ -256,20 +276,24 @@ public abstract class GT_Cover_AdvancedWirelessRedstoneBase<T extends GT_Cover_A
coverData.frequency = (int) MathExpression.parseMathExpression(state);
return coverData;
},
- widget -> widget.setOnScrollNumbers().setNumbers(0, Integer.MAX_VALUE).setFocusOnGuiOpen(true)
- .setPos(1, 2 + spaceY * getFrequencyRow()).setSize(spaceX * 5 - 4, 12))
- .addFollower(
- CoverDataFollower_ToggleButtonWidget.ofCheck(),
- coverData -> coverData.uuid != null,
- (coverData, state) -> {
- if (state) {
- coverData.uuid = getUIBuildContext().getPlayer().getUniqueID();
- } else {
- coverData.uuid = null;
- }
- return coverData;
- },
- widget -> widget.setPos(0, spaceY * getButtonRow()));
+ widget -> widget.setOnScrollNumbers()
+ .setNumbers(0, Integer.MAX_VALUE)
+ .setFocusOnGuiOpen(true)
+ .setPos(1, 2 + spaceY * getFrequencyRow())
+ .setSize(spaceX * 5 - 4, 12))
+ .addFollower(
+ CoverDataFollower_ToggleButtonWidget.ofCheck(),
+ coverData -> coverData.uuid != null,
+ (coverData, state) -> {
+ if (state) {
+ coverData.uuid = getUIBuildContext().getPlayer()
+ .getUniqueID();
+ } else {
+ coverData.uuid = null;
+ }
+ return coverData;
+ },
+ widget -> widget.setPos(0, spaceY * getButtonRow()));
}
protected abstract int getFrequencyRow();
diff --git a/src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessFluidDetector.java b/src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessFluidDetector.java
index 06388602c0..af1afbe18d 100644
--- a/src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessFluidDetector.java
+++ b/src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessFluidDetector.java
@@ -43,8 +43,10 @@ public class GT_Cover_WirelessFluidDetector
@Override
public FluidTransmitterData doCoverThingsImpl(byte aSide, byte aInputRedstone, int aCoverID,
FluidTransmitterData aCoverVariable, ICoverable aTileEntity, long aTimer) {
- byte signal = GT_Cover_LiquidMeter
- .computeSignalBasedOnFluid(aTileEntity, aCoverVariable.invert, aCoverVariable.threshold);
+ byte signal = GT_Cover_LiquidMeter.computeSignalBasedOnFluid(
+ aTileEntity,
+ aCoverVariable.invert,
+ aCoverVariable.threshold);
long hash = hashCoverCoords(aTileEntity, aSide);
setSignalAt(aCoverVariable.getUuid(), aCoverVariable.getFrequency(), hash, signal);
@@ -145,7 +147,7 @@ public class GT_Cover_WirelessFluidDetector
super.addUIWidgets(builder);
builder.widget(
new TextWidget(GT_Utility.trans("222", "Fluid threshold")).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 5, 4 + startY));
+ .setPos(startX + spaceX * 5, 4 + startY));
}
@Override
@@ -158,8 +160,10 @@ public class GT_Cover_WirelessFluidDetector
coverData.threshold = (int) MathExpression.parseMathExpression(state);
return coverData;
},
- widget -> widget.setOnScrollNumbers().setNumbers(0, Integer.MAX_VALUE).setPos(1, 2)
- .setSize(spaceX * 5 - 4, 12));
+ widget -> widget.setOnScrollNumbers()
+ .setNumbers(0, Integer.MAX_VALUE)
+ .setPos(1, 2)
+ .setSize(spaceX * 5 - 4, 12));
}
}
}
diff --git a/src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessItemDetector.java b/src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessItemDetector.java
index 0b69150e86..9c1e9b2c5f 100644
--- a/src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessItemDetector.java
+++ b/src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessItemDetector.java
@@ -175,15 +175,21 @@ public class GT_Cover_WirelessItemDetector
super.addUIWidgets(builder);
builder.widget(
new ItemWatcherSlotWidget().setGetter(this::getTargetItem)
- .setPos(startX + spaceX * 4 - 1, startY + spaceY * 3))
- .widget(
- new TextWidget(GT_Utility.trans("221", "Item threshold"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 5, 4 + startY + spaceY * 2))
- .widget(
- new TextWidget(GT_Utility.trans("254.0", "Detect Slot"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * 5, 4 + startY + spaceY * 3));
+ .setPos(startX + spaceX * 4 - 1, startY + spaceY * 3))
+ .widget(
+ new TextWidget(GT_Utility.trans("221", "Item threshold"))
+ .setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 5,
+ 4 + startY + spaceY * 2))
+ .widget(
+ new TextWidget(GT_Utility.trans("254.0", "Detect Slot"))
+ .setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ startX + spaceX * 5,
+ 4 + startY + spaceY * 3));
}
@Override
@@ -196,32 +202,36 @@ public class GT_Cover_WirelessItemDetector
coverData.threshold = (int) MathExpression.parseMathExpression(state);
return coverData;
},
- widget -> widget.setOnScrollNumbers(1, 10, 64).setNumbers(() -> 0, this::getMaxItemCount)
- .setPos(1, 2 + spaceY * 2).setSize(spaceX * 5 - 4, 12))
- .addFollower(
- new CoverDataFollower_TextFieldWidget<>(),
- coverData -> getSlotTextFieldContent(coverData.slot),
- (coverData, state) -> {
- coverData.slot = getIntFromText(state);
- return coverData;
- },
- widget -> widget.setOnScrollText().setValidator(val -> {
- final int valSlot = getIntFromText(val);
- if (valSlot > -1) {
- return TextFieldWidget.format.format(Math.min(valSlot, maxSlot));
- } else {
- return ALL_TEXT;
- }
- }).setPattern(BaseTextFieldWidget.NATURAL_NUMS).setPos(1, 2 + spaceY * 3)
- .setSize(spaceX * 4 - 8, 12));
+ widget -> widget.setOnScrollNumbers(1, 10, 64)
+ .setNumbers(() -> 0, this::getMaxItemCount)
+ .setPos(1, 2 + spaceY * 2)
+ .setSize(spaceX * 5 - 4, 12))
+ .addFollower(
+ new CoverDataFollower_TextFieldWidget<>(),
+ coverData -> getSlotTextFieldContent(coverData.slot),
+ (coverData, state) -> {
+ coverData.slot = getIntFromText(state);
+ return coverData;
+ },
+ widget -> widget.setOnScrollText()
+ .setValidator(val -> {
+ final int valSlot = getIntFromText(val);
+ if (valSlot > -1) {
+ return TextFieldWidget.format.format(Math.min(valSlot, maxSlot));
+ } else {
+ return ALL_TEXT;
+ }
+ })
+ .setPattern(BaseTextFieldWidget.NATURAL_NUMS)
+ .setPos(1, 2 + spaceY * 3)
+ .setSize(spaceX * 4 - 8, 12));
}
private int getMaxSlot() {
final ICoverable tile = getUIBuildContext().getTile();
if (tile instanceof TileEntity && !tile.isDead()
&& tile instanceof IGregTechTileEntity
- && !(((IGregTechTileEntity) tile)
- .getMetaTileEntity() instanceof GT_MetaTileEntity_DigitalChestBase)) {
+ && !(((IGregTechTileEntity) tile).getMetaTileEntity() instanceof GT_MetaTileEntity_DigitalChestBase)) {
return tile.getSizeInventory() - 1;
} else {
return -1;
diff --git a/src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessMaintenanceDetector.java b/src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessMaintenanceDetector.java
index 085a7e1f4d..515a196b65 100644
--- a/src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessMaintenanceDetector.java
+++ b/src/main/java/gregtech/common/covers/redstone/GT_Cover_WirelessMaintenanceDetector.java
@@ -225,7 +225,9 @@ public class GT_Cover_WirelessMaintenanceDetector extends
for (int i = 0; i < 8; i++) {
builder.widget(
new TextWidget(extraTexts[i]).setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(startX + spaceX * (i % 2 == 0 ? 1 : 7), 4 + startY + spaceY * (2 + i / 2)));
+ .setPos(
+ startX + spaceX * (i % 2 == 0 ? 1 : 7),
+ 4 + startY + spaceY * (2 + i / 2)));
}
}
@@ -241,9 +243,10 @@ public class GT_Cover_WirelessMaintenanceDetector extends
coverData.mode = MaintenanceMode.values()[index];
return coverData;
},
- widget -> widget
- .setToggleTexture(GT_UITextures.OVERLAY_BUTTON_CHECKMARK, GT_UITextures.TRANSPARENT)
- .setPos(spaceX * (index % 2 == 0 ? 0 : 6), spaceY * (2 + index / 2)));
+ widget -> widget.setToggleTexture(
+ GT_UITextures.OVERLAY_BUTTON_CHECKMARK,
+ GT_UITextures.TRANSPARENT)
+ .setPos(spaceX * (index % 2 == 0 ? 0 : 6), spaceY * (2 + index / 2)));
}
}
}
diff --git a/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java b/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java
index 6c096c09ee..540a8e23a5 100644
--- a/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java
+++ b/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java
@@ -86,8 +86,11 @@ public class GT_Entity_Arrow extends EntityArrow {
Block tBlock = this.worldObj.getBlock(this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ);
if (tBlock.getMaterial() != Material.air) {
tBlock.setBlockBoundsBasedOnState(this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ);
- AxisAlignedBB axisalignedbb = tBlock
- .getCollisionBoundingBoxFromPool(this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ);
+ AxisAlignedBB axisalignedbb = tBlock.getCollisionBoundingBoxFromPool(
+ this.worldObj,
+ this.mHitBlockX,
+ this.mHitBlockY,
+ this.mHitBlockZ);
if ((axisalignedbb != null)
&& (axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ)))) {
this.inGround = true;
@@ -109,19 +112,24 @@ public class GT_Entity_Arrow extends EntityArrow {
} else {
this.ticksInAir += 1;
Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
- Vec3 vec3 = Vec3
- .createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
+ Vec3 vec3 = Vec3.createVectorHelper(
+ this.posX + this.motionX,
+ this.posY + this.motionY,
+ this.posZ + this.motionZ);
MovingObjectPosition tVector = this.worldObj.func_147447_a(vec31, vec3, false, true, false);
vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
- vec3 = Vec3
- .createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
+ vec3 = Vec3.createVectorHelper(
+ this.posX + this.motionX,
+ this.posY + this.motionY,
+ this.posZ + this.motionZ);
if (tVector != null) {
vec3 = Vec3.createVectorHelper(tVector.hitVec.xCoord, tVector.hitVec.yCoord, tVector.hitVec.zCoord);
}
Entity tHitEntity = null;
List tAllPotentiallyHitEntities = this.worldObj.getEntitiesWithinAABBExcludingEntity(
this,
- this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
+ this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ)
+ .expand(1.0D, 1.0D, 1.0D));
double tLargestDistance = Double.MAX_VALUE;
for (int i = 0; i < tAllPotentiallyHitEntities.size(); i++) {
Entity entity1 = (Entity) tAllPotentiallyHitEntities.get(i);
@@ -151,8 +159,10 @@ public class GT_Entity_Arrow extends EntityArrow {
if (tVector.entityHit != null) {
ItemData tData = GT_OreDictUnificator.getItemData(this.mArrow);
- float tMagicDamage = (tVector.entityHit instanceof EntityLivingBase) ? EnchantmentHelper
- .func_152377_a(this.mArrow, ((EntityLivingBase) tVector.entityHit).getCreatureAttribute())
+ float tMagicDamage = (tVector.entityHit instanceof EntityLivingBase)
+ ? EnchantmentHelper.func_152377_a(
+ this.mArrow,
+ ((EntityLivingBase) tVector.entityHit).getCreatureAttribute())
: 0.0F;
float tDamage = MathHelper.ceiling_double_int(
MathHelper.sqrt_double(
@@ -209,26 +219,29 @@ public class GT_Entity_Arrow extends EntityArrow {
tPlayer.setDead();
}
}
- DamageSource tDamageSource = DamageSource
- .causeArrowDamage(this, tShootingEntity == null ? this : tShootingEntity);
+ DamageSource tDamageSource = DamageSource.causeArrowDamage(
+ this,
+ tShootingEntity == null ? this : tShootingEntity);
if ((tDamage + tMagicDamage > 0.0F)
&& (tVector.entityHit.attackEntityFrom(tDamageSource, tDamage + tMagicDamage))) {
if ((tVector.entityHit instanceof EntityLivingBase)) {
if (tHitTimer >= 0) {
tVector.entityHit.hurtResistantTime = tHitTimer;
}
- if (((tVector.entityHit instanceof EntityCreeper)) && (EnchantmentHelper
- .getEnchantmentLevel(Enchantment.fireAspect.effectId, this.mArrow) > 0)) {
+ if (((tVector.entityHit instanceof EntityCreeper))
+ && (EnchantmentHelper.getEnchantmentLevel(
+ Enchantment.fireAspect.effectId,
+ this.mArrow) > 0)) {
((EntityCreeper) tVector.entityHit).func_146079_cb();
}
EntityLivingBase tHitLivingEntity = (EntityLivingBase) tVector.entityHit;
if (!this.worldObj.isRemote) {
- tHitLivingEntity
- .setArrowCountInEntity(tHitLivingEntity.getArrowCountInEntity() + 1);
+ tHitLivingEntity.setArrowCountInEntity(
+ tHitLivingEntity.getArrowCountInEntity() + 1);
}
if (tKnockback > 0) {
- float tKnockbackDivider = MathHelper
- .sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
+ float tKnockbackDivider = MathHelper.sqrt_double(
+ this.motionX * this.motionX + this.motionZ * this.motionZ);
if (tKnockbackDivider > 0.0F) {
tHitLivingEntity.addVelocity(
this.motionX * tKnockback * 0.6000000238418579D / tKnockbackDivider,
@@ -249,8 +262,8 @@ public class GT_Entity_Arrow extends EntityArrow {
if ((tShootingEntity != null) && (tHitLivingEntity != tShootingEntity)
&& ((tHitLivingEntity instanceof EntityPlayer))
&& ((tShootingEntity instanceof EntityPlayerMP))) {
- ((EntityPlayerMP) tShootingEntity).playerNetServerHandler
- .sendPacket(new S2BPacketChangeGameState(6, 0.0F));
+ ((EntityPlayerMP) tShootingEntity).playerNetServerHandler.sendPacket(
+ new S2BPacketChangeGameState(6, 0.0F));
}
}
if (((tShootingEntity instanceof EntityPlayer)) && (tMagicDamage > 0.0F)) {
@@ -279,8 +292,10 @@ public class GT_Entity_Arrow extends EntityArrow {
this.mHitBlockY = tVector.blockY;
this.mHitBlockZ = tVector.blockZ;
this.mHitBlock = this.worldObj.getBlock(this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ);
- this.mHitBlockMeta = this.worldObj
- .getBlockMetadata(this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ);
+ this.mHitBlockMeta = this.worldObj.getBlockMetadata(
+ this.mHitBlockX,
+ this.mHitBlockY,
+ this.mHitBlockZ);
this.motionX = ((float) (tVector.hitVec.xCoord - this.posX));
this.motionY = ((float) (tVector.hitVec.yCoord - this.posY));
this.motionZ = ((float) (tVector.hitVec.zCoord - this.posZ));
@@ -316,20 +331,19 @@ public class GT_Entity_Arrow extends EntityArrow {
}
}
}
- WorldSpawnedEventBuilder.ParticleEventBuilder events = new WorldSpawnedEventBuilder.ParticleEventBuilder()
- .setWorld(this.worldObj);
+ WorldSpawnedEventBuilder.ParticleEventBuilder events = new WorldSpawnedEventBuilder.ParticleEventBuilder().setWorld(
+ this.worldObj);
if (getIsCritical()) {
events.setIdentifier(ParticleFX.CRIT)
- .setMotion(
- -this.motionX,
- -this.motionY + 0.2D,
- -this.motionZ).<WorldSpawnedEventBuilder.ParticleEventBuilder>times(
- 4,
- (x, i) -> x.setPosition(
- this.posX + this.motionX * i / 4.0D,
- this.posY + this.motionY * i / 4.0D,
- this.posZ + this.motionZ * i / 4.0D).run());
+ .setMotion(-this.motionX, -this.motionY + 0.2D, -this.motionZ).<WorldSpawnedEventBuilder
+ .ParticleEventBuilder>times(
+ 4,
+ (x, i) -> x.setPosition(
+ this.posX + this.motionX * i / 4.0D,
+ this.posY + this.motionY * i / 4.0D,
+ this.posZ + this.motionZ * i / 4.0D)
+ .run());
}
this.posX += this.motionX;
this.posY += this.motionY;
@@ -354,12 +368,13 @@ public class GT_Entity_Arrow extends EntityArrow {
this.rotationYaw = (this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F);
float tFrictionMultiplier = 0.99F;
if (isInWater()) {
- events.setMotion(-this.motionX, -this.motionY + 0.2D, -this.motionZ).setIdentifier(ParticleFX.BUBBLE)
- .setPosition(
- this.posX - this.motionX * 0.25D,
- this.posY - this.motionY * 0.25D,
- this.posZ - this.motionZ * 0.25D)
- .times(4, Runnable::run);
+ events.setMotion(-this.motionX, -this.motionY + 0.2D, -this.motionZ)
+ .setIdentifier(ParticleFX.BUBBLE)
+ .setPosition(
+ this.posX - this.motionX * 0.25D,
+ this.posY - this.motionY * 0.25D,
+ this.posZ - this.motionZ * 0.25D)
+ .times(4, Runnable::run);
tFrictionMultiplier = 0.8F;
}
if (isWet()) {
diff --git a/src/main/java/gregtech/common/fluid/GT_Fluid.java b/src/main/java/gregtech/common/fluid/GT_Fluid.java
index e4503f95ea..a508b5ecf1 100644
--- a/src/main/java/gregtech/common/fluid/GT_Fluid.java
+++ b/src/main/java/gregtech/common/fluid/GT_Fluid.java
@@ -55,10 +55,13 @@ public class GT_Fluid extends Fluid implements IGT_Fluid, IGT_RegisteredFluid, R
setGaseous(false).setViscosity(10000);
break;
case GAS:
- setGaseous(true).setDensity(-100).setViscosity(200);
+ setGaseous(true).setDensity(-100)
+ .setViscosity(200);
break;
case PLASMA:
- setGaseous(true).setDensity(55536).setViscosity(10).setLuminosity(15);
+ setGaseous(true).setDensity(55536)
+ .setViscosity(10)
+ .setLuminosity(15);
break;
case MOLTEN:
final int luminosity;
diff --git a/src/main/java/gregtech/common/gui/modularui/UIHelper.java b/src/main/java/gregtech/common/gui/modularui/UIHelper.java
index 8973992c28..2135d3686a 100644
--- a/src/main/java/gregtech/common/gui/modularui/UIHelper.java
+++ b/src/main/java/gregtech/common/gui/modularui/UIHelper.java
@@ -26,7 +26,9 @@ public class UIHelper {
SteamVariant steamVariant, Pos2d offset) {
List<Pos2d> itemInputPositions = recipeMap != null ? recipeMap.getItemInputPositions(itemInputCount)
: UIHelper.getItemInputPositions(itemInputCount);
- itemInputPositions = itemInputPositions.stream().map(p -> p.add(offset)).collect(Collectors.toList());
+ itemInputPositions = itemInputPositions.stream()
+ .map(p -> p.add(offset))
+ .collect(Collectors.toList());
for (int i = 0; i < itemInputPositions.size(); i++) {
forEachItemInputSlot.accept(
i,
@@ -36,7 +38,9 @@ public class UIHelper {
List<Pos2d> itemOutputPositions = recipeMap != null ? recipeMap.getItemOutputPositions(itemOutputCount)
: UIHelper.getItemOutputPositions(itemOutputCount);
- itemOutputPositions = itemOutputPositions.stream().map(p -> p.add(offset)).collect(Collectors.toList());
+ itemOutputPositions = itemOutputPositions.stream()
+ .map(p -> p.add(offset))
+ .collect(Collectors.toList());
for (int i = 0; i < itemOutputPositions.size(); i++) {
forEachItemOutputSlot.accept(
i,
@@ -47,12 +51,14 @@ public class UIHelper {
forEachSpecialSlot.accept(
0,
getBackgroundsForSlot(itemSlotBackground, recipeMap, false, false, 0, true, steamVariant),
- (recipeMap != null ? recipeMap.getSpecialItemPosition() : UIHelper.getSpecialItemPosition())
- .add(offset));
+ (recipeMap != null ? recipeMap.getSpecialItemPosition() : UIHelper.getSpecialItemPosition()).add(
+ offset));
List<Pos2d> fluidInputPositions = recipeMap != null ? recipeMap.getFluidInputPositions(fluidInputCount)
: UIHelper.getFluidInputPositions(fluidInputCount);
- fluidInputPositions = fluidInputPositions.stream().map(p -> p.add(offset)).collect(Collectors.toList());
+ fluidInputPositions = fluidInputPositions.stream()
+ .map(p -> p.add(offset))
+ .collect(Collectors.toList());
for (int i = 0; i < fluidInputPositions.size(); i++) {
forEachFluidInputSlot.accept(
i,
@@ -62,7 +68,9 @@ public class UIHelper {
List<Pos2d> fluidOutputPositions = recipeMap != null ? recipeMap.getFluidOutputPositions(fluidOutputCount)
: UIHelper.getFluidOutputPositions(fluidOutputCount);
- fluidOutputPositions = fluidOutputPositions.stream().map(p -> p.add(offset)).collect(Collectors.toList());
+ fluidOutputPositions = fluidOutputPositions.stream()
+ .map(p -> p.add(offset))
+ .collect(Collectors.toList());
for (int i = 0; i < fluidOutputPositions.size(); i++) {
forEachFluidOutputSlot.accept(
i,
diff --git a/src/main/java/gregtech/common/gui/modularui/uifactory/SelectItemUIFactory.java b/src/main/java/gregtech/common/gui/modularui/uifactory/SelectItemUIFactory.java
index 00cfcf9d6d..c8e015d5b4 100644
--- a/src/main/java/gregtech/common/gui/modularui/uifactory/SelectItemUIFactory.java
+++ b/src/main/java/gregtech/common/gui/modularui/uifactory/SelectItemUIFactory.java
@@ -116,15 +116,21 @@ public class SelectItemUIFactory {
}
public ModularWindow createWindow(UIBuildContext buildContext) {
- ModularWindow.Builder builder = ModularWindow
- .builder(getGUIWidth(), 53 + 18 * ((stacks.size() - 1) / cols + 1));
+ ModularWindow.Builder builder = ModularWindow.builder(
+ getGUIWidth(),
+ 53 + 18 * ((stacks.size() - 1) / cols + 1));
builder.setBackground(ModularUITextures.VANILLA_BACKGROUND);
builder.setGuiTint(guiTint);
if (headerItem != null) {
- builder.widget(new ItemDrawable(headerItem).asWidget().setPos(5, 5).setSize(16, 16));
+ builder.widget(
+ new ItemDrawable(headerItem).asWidget()
+ .setPos(5, 5)
+ .setSize(16, 16));
}
- builder.widget(new TextWidget(header).setDefaultColor(COLOR_TITLE.get()).setPos(25, 9));
+ builder.widget(
+ new TextWidget(header).setDefaultColor(COLOR_TITLE.get())
+ .setPos(25, 9));
builder.widget(new SlotWidget(BaseSlot.phantom(currentDisplayItemHandler, 0)) {
@@ -137,12 +143,18 @@ public class SelectItemUIFactory {
}
super.draw(partialTicks);
}
- }.disableInteraction().setBackground(GT_UITextures.SLOT_DARK_GRAY).setPos(
- 9 + getFontRenderer().getStringWidth(StatCollector.translateToLocal("GT5U.gui.select.current")),
- 24)).widget(
- new TextWidget(StatCollector.translateToLocal("GT5U.gui.select.current"))
- .setDefaultColor(COLOR_TEXT_GRAY.get())
- .setPos(8, 25 + (18 - getFontRenderer().FONT_HEIGHT) / 2));
+ }.disableInteraction()
+ .setBackground(GT_UITextures.SLOT_DARK_GRAY)
+ .setPos(9 + getFontRenderer().getStringWidth(StatCollector.translateToLocal("GT5U.gui.select.current")), 24))
+ .widget(
+ new TextWidget(
+ StatCollector.translateToLocal("GT5U.gui.select.current"))
+ .setDefaultColor(
+ COLOR_TEXT_GRAY.get())
+ .setPos(
+ 8,
+ 25 + (18 - getFontRenderer().FONT_HEIGHT)
+ / 2));
for (int i = 0; i < stacks.size(); i++) {
final int index = i;
@@ -167,7 +179,8 @@ public class SelectItemUIFactory {
return new IDrawable[] {
index == selected ? GT_UITextures.SLOT_DARK_GRAY : ModularUITextures.ITEM_SLOT };
}
- }.disableInteraction().setPos(7 + 18 * (index % cols), 43 + 18 * (index / cols)));
+ }.disableInteraction()
+ .setPos(7 + 18 * (index % cols), 43 + 18 * (index / cols)));
}
if (anotherWindow) {
@@ -178,9 +191,12 @@ public class SelectItemUIFactory {
public void onDestroy() {
dialogOpened.set(false);
}
- }.setOnClick((clickData, widget) -> widget.getWindow().tryClose())
- .setBackground(ModularUITextures.VANILLA_BACKGROUND, new Text("x")).setPos(getGUIWidth() - 15, 3)
- .setSize(12, 12));
+ }.setOnClick(
+ (clickData, widget) -> widget.getWindow()
+ .tryClose())
+ .setBackground(ModularUITextures.VANILLA_BACKGROUND, new Text("x"))
+ .setPos(getGUIWidth() - 15, 3)
+ .setSize(12, 12));
}
return builder.build();
diff --git a/src/main/java/gregtech/common/gui/modularui/widget/CoverCycleButtonWidget.java b/src/main/java/gregtech/common/gui/modularui/widget/CoverCycleButtonWidget.java
index 70978351c2..28b495ce42 100644
--- a/src/main/java/gregtech/common/gui/modularui/widget/CoverCycleButtonWidget.java
+++ b/src/main/java/gregtech/common/gui/modularui/widget/CoverCycleButtonWidget.java
@@ -16,13 +16,22 @@ import gregtech.api.gui.modularui.GT_UITextures;
*/
public class CoverCycleButtonWidget extends CycleButtonWidget {
- private static final UITexture BUTTON_NORMAL_NOT_PRESSED = GT_UITextures.BUTTON_COVER_NORMAL
- .getSubArea(0, 0, 1, 0.5f);
+ private static final UITexture BUTTON_NORMAL_NOT_PRESSED = GT_UITextures.BUTTON_COVER_NORMAL.getSubArea(
+ 0,
+ 0,
+ 1,
+ 0.5f);
private static final UITexture BUTTON_NORMAL_PRESSED = GT_UITextures.BUTTON_COVER_NORMAL.getSubArea(0, 0.5f, 1, 1);
- private static final UITexture BUTTON_HOVERED_NOT_PRESSED = GT_UITextures.BUTTON_COVER_NORMAL_HOVERED
- .getSubArea(0, 0, 1, 0.5f);
- private static final UITexture BUTTON_HOVERED_PRESSED = GT_UITextures.BUTTON_COVER_NORMAL_HOVERED
- .getSubArea(0, 0.5f, 1, 1);
+ private static final UITexture BUTTON_HOVERED_NOT_PRESSED = GT_UITextures.BUTTON_COVER_NORMAL_HOVERED.getSubArea(
+ 0,
+ 0,
+ 1,
+ 0.5f);
+ private static final UITexture BUTTON_HOVERED_PRESSED = GT_UITextures.BUTTON_COVER_NORMAL_HOVERED.getSubArea(
+ 0,
+ 0.5f,
+ 1,
+ 1);
private boolean clickPressed;
diff --git a/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_ToggleButtonWidget.java b/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_ToggleButtonWidget.java
index cb5fbf7994..0547609022 100644
--- a/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_ToggleButtonWidget.java
+++ b/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_ToggleButtonWidget.java
@@ -44,18 +44,21 @@ public class CoverDataFollower_ToggleButtonWidget<T extends ISerializableObject>
}
public static <T extends ISerializableObject> CoverDataFollower_ToggleButtonWidget<T> ofCheckAndCross() {
- return new CoverDataFollower_ToggleButtonWidget<T>()
- .setToggleTexture(GT_UITextures.OVERLAY_BUTTON_CHECKMARK, GT_UITextures.OVERLAY_BUTTON_CROSS);
+ return new CoverDataFollower_ToggleButtonWidget<T>().setToggleTexture(
+ GT_UITextures.OVERLAY_BUTTON_CHECKMARK,
+ GT_UITextures.OVERLAY_BUTTON_CROSS);
}
public static <T extends ISerializableObject> CoverDataFollower_ToggleButtonWidget<T> ofCheck() {
- return new CoverDataFollower_ToggleButtonWidget<T>()
- .setToggleTexture(GT_UITextures.OVERLAY_BUTTON_CHECKMARK, GT_UITextures.TRANSPARENT);
+ return new CoverDataFollower_ToggleButtonWidget<T>().setToggleTexture(
+ GT_UITextures.OVERLAY_BUTTON_CHECKMARK,
+ GT_UITextures.TRANSPARENT);
}
public static <T extends ISerializableObject> CoverDataFollower_ToggleButtonWidget<T> ofRedstone() {
- return new CoverDataFollower_ToggleButtonWidget<T>()
- .setToggleTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON, GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF);
+ return new CoverDataFollower_ToggleButtonWidget<T>().setToggleTexture(
+ GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON,
+ GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF);
}
public static <T extends ISerializableObject> CoverDataFollower_ToggleButtonWidget<T> ofDisableable() {
diff --git a/src/main/java/gregtech/common/gui/modularui/widget/FluidDisplaySlotWidget.java b/src/main/java/gregtech/common/gui/modularui/widget/FluidDisplaySlotWidget.java
index 182f007b33..13bcc12504 100644
--- a/src/main/java/gregtech/common/gui/modularui/widget/FluidDisplaySlotWidget.java
+++ b/src/main/java/gregtech/common/gui/modularui/widget/FluidDisplaySlotWidget.java
@@ -141,8 +141,8 @@ public class FluidDisplaySlotWidget extends SlotWidget {
ItemStack ret = null;
if (actionRealClick == Action.TRANSFER) {
if (fluidAccessConstructor == null) {
- GT_Mod.GT_FML_LOGGER
- .warn("FluidDisplaySlotWidget is asked to transfer fluid, but fluidAccessConstructor is null!");
+ GT_Mod.GT_FML_LOGGER.warn(
+ "FluidDisplaySlotWidget is asked to transfer fluid, but fluidAccessConstructor is null!");
return null;
}
ret = transferFluid(
@@ -238,7 +238,9 @@ public class FluidDisplaySlotWidget extends SlotWidget {
protected static ItemStack fillFluid(IFluidAccess aFluidAccess, EntityPlayer aPlayer, FluidStack aFluidHeld,
boolean aProcessFullStack) {
// we are not using aMachine.fill() here any more, so we need to check for fluid type here ourselves
- if (aFluidAccess.get() != null && !aFluidAccess.get().isFluidEqual(aFluidHeld)) return null;
+ if (aFluidAccess.get() != null && !aFluidAccess.get()
+ .isFluidEqual(aFluidHeld))
+ return null;
ItemStack tStackHeld = aPlayer.inventory.getItemStack();
ItemStack tStackSizedOne = GT_Utility.copyAmount(1, tStackHeld);
if (tStackSizedOne == null) return null;
diff --git a/src/main/java/gregtech/common/items/CombType.java b/src/main/java/gregtech/common/items/CombType.java
index 479f6fe82f..c646652e44 100644
--- a/src/main/java/gregtech/common/items/CombType.java
+++ b/src/main/java/gregtech/common/items/CombType.java
@@ -236,7 +236,10 @@ public enum CombType {
this.color = new int[] { color1, color2 };
this.localizedName = GT_LanguageManager.addStringLocalization(
"comb." + this.name,
- this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Comb");
+ this.name.substring(0, 1)
+ .toUpperCase()
+ + this.name.substring(1)
+ + " Comb");
}
public void setHidden() {
@@ -265,7 +268,10 @@ public enum CombType {
private static final CombType[] VALUES;
static {
- int biggestId = Arrays.stream(CombType.values()).mapToInt(CombType::getId).max().getAsInt();
+ int biggestId = Arrays.stream(CombType.values())
+ .mapToInt(CombType::getId)
+ .max()
+ .getAsInt();
VALUES = new CombType[biggestId + 1];
Arrays.fill(VALUES, _NULL);
for (CombType type : CombType.values()) {
diff --git a/src/main/java/gregtech/common/items/DropType.java b/src/main/java/gregtech/common/items/DropType.java
index 3195e9ecbd..3573978e21 100644
--- a/src/main/java/gregtech/common/items/DropType.java
+++ b/src/main/java/gregtech/common/items/DropType.java
@@ -36,7 +36,10 @@ public enum DropType {
return GT_LanguageManager.addStringLocalization(
"drop." + this.name,
- this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Drop");
+ this.name.substring(0, 1)
+ .toUpperCase()
+ + this.name.substring(1)
+ + " Drop");
}
public int[] getColours() {
diff --git a/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java b/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java
index 624e326268..95a6474c17 100644
--- a/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java
+++ b/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java
@@ -68,8 +68,10 @@ public class GT_FluidDisplayItem extends GT_Generic_Item {
+ " K"
+ EnumChatFormatting.GRAY);
aList.add(
- EnumChatFormatting.GREEN + String
- .format(transItem("018", "State: %s"), aNBT.getBoolean("mFluidState") ? "Gas" : "Liquid")
+ EnumChatFormatting.GREEN
+ + String.format(
+ transItem("018", "State: %s"),
+ aNBT.getBoolean("mFluidState") ? "Gas" : "Liquid")
+ EnumChatFormatting.GRAY);
}
}
@@ -80,8 +82,12 @@ public class GT_FluidDisplayItem extends GT_Generic_Item {
@Override
public IIcon getIconFromDamage(int aMetaData) {
- return Stream.of(FluidRegistry.getFluid(aMetaData), FluidRegistry.WATER).filter(Objects::nonNull)
- .map(Fluid::getStillIcon).filter(Objects::nonNull).findFirst().orElseThrow(IllegalStateException::new);
+ return Stream.of(FluidRegistry.getFluid(aMetaData), FluidRegistry.WATER)
+ .filter(Objects::nonNull)
+ .map(Fluid::getStillIcon)
+ .filter(Objects::nonNull)
+ .findFirst()
+ .orElseThrow(IllegalStateException::new);
}
@Override
@@ -168,8 +174,10 @@ public class GT_FluidDisplayItem extends GT_Generic_Item {
for (int tOreDict : OreDictionary.getOreIDs(tItemStack)) {
String tOreDictName = OreDictionary.getOreName(tOreDict);
if (tOreDictName.startsWith("cell")) {
- return Materials
- .getRealMaterial(tOreDictName.replace("cell", "").replace("Molten", "").replace("Plasma", ""));
+ return Materials.getRealMaterial(
+ tOreDictName.replace("cell", "")
+ .replace("Molten", "")
+ .replace("Plasma", ""));
}
}
return Materials._NULL;
diff --git a/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java b/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java
index 3fa06018f0..65cd24c116 100644
--- a/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java
+++ b/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java
@@ -195,15 +195,21 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo
super.addAdditionalToolTips(aList, aStack, aPlayer);
aList.add(
GT_LanguageManager.addStringLocalization(
- new StringBuilder().append(getUnlocalizedName()).append(".configuration").toString(),
+ new StringBuilder().append(getUnlocalizedName())
+ .append(".configuration")
+ .toString(),
"Configuration: ") + getConfigurationString(getDamage(aStack)));
aList.add(
GT_LanguageManager.addStringLocalization(
- new StringBuilder().append(getUnlocalizedName()).append(".tooltip.0").toString(),
+ new StringBuilder().append(getUnlocalizedName())
+ .append(".tooltip.0")
+ .toString(),
"Right click to reconfigure"));
aList.add(
GT_LanguageManager.addStringLocalization(
- new StringBuilder().append(getUnlocalizedName()).append(".tooltip.1").toString(),
+ new StringBuilder().append(getUnlocalizedName())
+ .append(".tooltip.1")
+ .toString(),
"Needs a screwdriver or circuit programming tool"));
}
@@ -223,8 +229,8 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo
public void registerIcons(IIconRegister aIconRegister) {
super.registerIcons(aIconRegister);
for (int i = 0; i < mIconDamage.length; i++) {
- mIconDamage[i] = aIconRegister
- .registerIcon(RES_PATH_ITEM + (GT_Config.troll ? "troll" : getUnlocalizedName() + "/" + i));
+ mIconDamage[i] = aIconRegister.registerIcon(
+ RES_PATH_ITEM + (GT_Config.troll ? "troll" : getUnlocalizedName() + "/" + i));
}
if (GregTech_API.sPostloadFinished) {
GT_Log.out.println("GT_Mod: Starting Item Icon Load Phase");
@@ -258,7 +264,8 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo
if (toolIndex == null) return true;
ItemStack[] mainInventory = player.inventory.mainInventory;
- mainInventory[toolIndex.getKey()] = toolIndex.getValue().apply(mainInventory[toolIndex.getKey()], player);
+ mainInventory[toolIndex.getKey()] = toolIndex.getValue()
+ .apply(mainInventory[toolIndex.getKey()], player);
}
stack.setItemDamage(meta);
@@ -324,9 +331,10 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo
if (!GT_Utility.isStackValid(toolStack)) continue;
- for (Map.Entry<Predicate<ItemStack>, BiFunction<ItemStack, EntityPlayerMP, ItemStack>> p : GregTech_API.sCircuitProgrammerList
- .entrySet())
- if (p.getKey().test(toolStack)) return Pair.of(j, p.getValue());
+ for (Map.Entry<Predicate<ItemStack>, BiFunction<ItemStack, EntityPlayerMP, ItemStack>> p : GregTech_API.sCircuitProgrammerList.entrySet())
+ if (p.getKey()
+ .test(toolStack))
+ return Pair.of(j, p.getValue());
}
return null;
}
diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java
index 9950b2581f..7165702f98 100644
--- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java
+++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java
@@ -50,8 +50,9 @@ import gregtech.common.items.behaviors.*;
public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
public static GT_MetaGenerated_Item_01 INSTANCE;
- private final String mToolTipPurify = GT_LanguageManager
- .addStringLocalization("metaitem.01.tooltip.purify", "Throw into Cauldron to get clean Dust");
+ private final String mToolTipPurify = GT_LanguageManager.addStringLocalization(
+ "metaitem.01.tooltip.purify",
+ "Throw into Cauldron to get clean Dust");
private static final String aTextArrow = " A";
private static final String aTextStick = " S ";
private static final String aTextFeather = "F ";
@@ -679,8 +680,8 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
ItemList.Shape_Mold_Plate.set(addItem(tLastID = 301, "Mold (Plate)", "Mold for making Plates"));
ItemList.Shape_Mold_Casing.set(addItem(tLastID = 302, "Mold (Casing)", "Mold for making Item Casings"));
ItemList.Shape_Mold_Gear.set(addItem(tLastID = 303, "Mold (Gear)", "Mold for making Gears"));
- ItemList.Shape_Mold_Credit
- .set(addItem(tLastID = 304, "Mold (Coinage)", "Secure Mold for making Coins (Don't lose it!)"));
+ ItemList.Shape_Mold_Credit.set(
+ addItem(tLastID = 304, "Mold (Coinage)", "Secure Mold for making Coins (Don't lose it!)"));
ItemList.Shape_Mold_Bottle.set(addItem(tLastID = 305, "Mold (Bottle)", "Mold for making Bottles"));
ItemList.Shape_Mold_Ingot.set(addItem(tLastID = 306, "Mold (Ingot)", "Mold for making Ingots"));
ItemList.Shape_Mold_Ball.set(addItem(tLastID = 307, "Mold (Ball)", "Mold for making Balls"));
@@ -691,8 +692,8 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
ItemList.Shape_Mold_Baguette.set(addItem(tLastID = 312, "Mold (Baguette)", "Mold for shaping Baguettes"));
ItemList.Shape_Mold_Cylinder.set(addItem(tLastID = 313, "Mold (Cylinder)", "Mold for shaping Cylinders"));
ItemList.Shape_Mold_Anvil.set(addItem(tLastID = 314, "Mold (Anvil)", "Mold for shaping Anvils"));
- ItemList.Shape_Mold_Name
- .set(addItem(tLastID = 315, "Mold (Name)", "Mold for naming Items (rename Mold with Anvil)"));
+ ItemList.Shape_Mold_Name.set(
+ addItem(tLastID = 315, "Mold (Name)", "Mold for naming Items (rename Mold with Anvil)"));
ItemList.Shape_Mold_Arrow.set(addItem(tLastID = 316, "Mold (Arrow Head)", "Mold for making Arrow Heads"));
ItemList.Shape_Mold_Gear_Small.set(addItem(tLastID = 317, "Mold (Small Gear)", "Mold for making small Gears"));
ItemList.Shape_Mold_Rod.set(addItem(tLastID = 318, "Mold (Rod)", "Mold for making Rods"));
@@ -702,16 +703,16 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
ItemList.Shape_Mold_Ring.set(addItem(tLastID = 322, "Mold (Ring)", "Mold for making Rings"));
ItemList.Shape_Mold_Rod_Long.set(addItem(tLastID = 323, "Mold (Long Rod)", "Mold for making Long Rods"));
ItemList.Shape_Mold_Rotor.set(addItem(tLastID = 324, "Mold (Rotor)", "Mold for making a Rotor"));
- ItemList.Shape_Mold_Turbine_Blade
- .set(addItem(tLastID = 325, "Mold (Turbine Blade)", "Mold for making a Turbine Blade"));
+ ItemList.Shape_Mold_Turbine_Blade.set(
+ addItem(tLastID = 325, "Mold (Turbine Blade)", "Mold for making a Turbine Blade"));
ItemList.Shape_Mold_Pipe_Tiny.set(addItem(tLastID = 326, "Mold (Tiny Pipe)", "Mold for making tiny Pipes"));
ItemList.Shape_Mold_Pipe_Small.set(addItem(tLastID = 327, "Mold (Small Pipe)", "Mold for making small Pipes"));
ItemList.Shape_Mold_Pipe_Medium.set(addItem(tLastID = 328, "Mold (Normal Pipe)", "Mold for making Pipes"));
ItemList.Shape_Mold_Pipe_Large.set(addItem(tLastID = 329, "Mold (Large Pipe)", "Mold for making large Pipes"));
- ItemList.Shape_Mold_Pipe_Huge
- .set(addItem(tLastID = 330, "Mold (Huge Pipe)", "Mold for making full Block Pipes"));
- ItemList.Shape_Mold_ToolHeadDrill
- .set(addItem(tLastID = 331, "Mold (Drill Head)", "Mold for making Drill Heads"));
+ ItemList.Shape_Mold_Pipe_Huge.set(
+ addItem(tLastID = 330, "Mold (Huge Pipe)", "Mold for making full Block Pipes"));
+ ItemList.Shape_Mold_ToolHeadDrill.set(
+ addItem(tLastID = 331, "Mold (Drill Head)", "Mold for making Drill Heads"));
GT_ModHandler.removeRecipe(
new ItemStack(Blocks.glass),
null,
@@ -719,69 +720,69 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
null,
new ItemStack(Blocks.glass));
- ItemList.Shape_Extruder_Plate
- .set(addItem(tLastID = 350, "Extruder Shape (Plate)", "Extruder Shape for making Plates"));
- ItemList.Shape_Extruder_Rod
- .set(addItem(tLastID = 351, "Extruder Shape (Rod)", "Extruder Shape for making Rods"));
- ItemList.Shape_Extruder_Bolt
- .set(addItem(tLastID = 352, "Extruder Shape (Bolt)", "Extruder Shape for making Bolts"));
- ItemList.Shape_Extruder_Ring
- .set(addItem(tLastID = 353, "Extruder Shape (Ring)", "Extruder Shape for making Rings"));
- ItemList.Shape_Extruder_Cell
- .set(addItem(tLastID = 354, "Extruder Shape (Cell)", "Extruder Shape for making Cells"));
+ ItemList.Shape_Extruder_Plate.set(
+ addItem(tLastID = 350, "Extruder Shape (Plate)", "Extruder Shape for making Plates"));
+ ItemList.Shape_Extruder_Rod.set(
+ addItem(tLastID = 351, "Extruder Shape (Rod)", "Extruder Shape for making Rods"));
+ ItemList.Shape_Extruder_Bolt.set(
+ addItem(tLastID = 352, "Extruder Shape (Bolt)", "Extruder Shape for making Bolts"));
+ ItemList.Shape_Extruder_Ring.set(
+ addItem(tLastID = 353, "Extruder Shape (Ring)", "Extruder Shape for making Rings"));
+ ItemList.Shape_Extruder_Cell.set(
+ addItem(tLastID = 354, "Extruder Shape (Cell)", "Extruder Shape for making Cells"));
ItemList.Shape_Extruder_Ingot.set(
addItem(
tLastID = 355,
"Extruder Shape (Ingot)",
"Extruder Shape for, wait, can't we just use a Furnace?"));
- ItemList.Shape_Extruder_Wire
- .set(addItem(tLastID = 356, "Extruder Shape (Wire)", "Extruder Shape for making Wires"));
- ItemList.Shape_Extruder_Casing
- .set(addItem(tLastID = 357, "Extruder Shape (Casing)", "Extruder Shape for making Item Casings"));
- ItemList.Shape_Extruder_Pipe_Tiny
- .set(addItem(tLastID = 358, "Extruder Shape (Tiny Pipe)", "Extruder Shape for making tiny Pipes"));
- ItemList.Shape_Extruder_Pipe_Small
- .set(addItem(tLastID = 359, "Extruder Shape (Small Pipe)", "Extruder Shape for making small Pipes"));
- ItemList.Shape_Extruder_Pipe_Medium
- .set(addItem(tLastID = 360, "Extruder Shape (Normal Pipe)", "Extruder Shape for making Pipes"));
- ItemList.Shape_Extruder_Pipe_Large
- .set(addItem(tLastID = 361, "Extruder Shape (Large Pipe)", "Extruder Shape for making large Pipes"));
+ ItemList.Shape_Extruder_Wire.set(
+ addItem(tLastID = 356, "Extruder Shape (Wire)", "Extruder Shape for making Wires"));
+ ItemList.Shape_Extruder_Casing.set(
+ addItem(tLastID = 357, "Extruder Shape (Casing)", "Extruder Shape for making Item Casings"));
+ ItemList.Shape_Extruder_Pipe_Tiny.set(
+ addItem(tLastID = 358, "Extruder Shape (Tiny Pipe)", "Extruder Shape for making tiny Pipes"));
+ ItemList.Shape_Extruder_Pipe_Small.set(
+ addItem(tLastID = 359, "Extruder Shape (Small Pipe)", "Extruder Shape for making small Pipes"));
+ ItemList.Shape_Extruder_Pipe_Medium.set(
+ addItem(tLastID = 360, "Extruder Shape (Normal Pipe)", "Extruder Shape for making Pipes"));
+ ItemList.Shape_Extruder_Pipe_Large.set(
+ addItem(tLastID = 361, "Extruder Shape (Large Pipe)", "Extruder Shape for making large Pipes"));
ItemList.Shape_Extruder_Pipe_Huge.set(
addItem(tLastID = 362, "Extruder Shape (Huge Pipe)", "Extruder Shape for making full Block Pipes"));
- ItemList.Shape_Extruder_Block
- .set(addItem(tLastID = 363, "Extruder Shape (Block)", "Extruder Shape for making Blocks"));
- ItemList.Shape_Extruder_Sword
- .set(addItem(tLastID = 364, "Extruder Shape (Sword Blade)", "Extruder Shape for making Swords"));
- ItemList.Shape_Extruder_Pickaxe
- .set(addItem(tLastID = 365, "Extruder Shape (Pickaxe Head)", "Extruder Shape for making Pickaxes"));
- ItemList.Shape_Extruder_Shovel
- .set(addItem(tLastID = 366, "Extruder Shape (Shovel Head)", "Extruder Shape for making Shovels"));
- ItemList.Shape_Extruder_Axe
- .set(addItem(tLastID = 367, "Extruder Shape (Axe Head)", "Extruder Shape for making Axes"));
- ItemList.Shape_Extruder_Hoe
- .set(addItem(tLastID = 368, "Extruder Shape (Hoe Head)", "Extruder Shape for making Hoes"));
- ItemList.Shape_Extruder_Hammer
- .set(addItem(tLastID = 369, "Extruder Shape (Hammer Head)", "Extruder Shape for making Hammers"));
- ItemList.Shape_Extruder_File
- .set(addItem(tLastID = 370, "Extruder Shape (File Head)", "Extruder Shape for making Files"));
- ItemList.Shape_Extruder_Saw
- .set(addItem(tLastID = 371, "Extruder Shape (Saw Blade)", "Extruder Shape for making Saws"));
- ItemList.Shape_Extruder_Gear
- .set(addItem(tLastID = 372, "Extruder Shape (Gear)", "Extruder Shape for making Gears"));
- ItemList.Shape_Extruder_Bottle
- .set(addItem(tLastID = 373, "Extruder Shape (Bottle)", "Extruder Shape for making Bottles"));
- ItemList.Shape_Extruder_Rotor
- .set(addItem(tLastID = 374, "Extruder Shape (Rotor)", "Extruder Shape for a Rotor"));
- ItemList.Shape_Extruder_Small_Gear
- .set(addItem(tLastID = 375, "Extruder Shape (Small Gear)", "Extruder Shape for a Small Gear"));
- ItemList.Shape_Extruder_Turbine_Blade
- .set(addItem(tLastID = 376, "Extruder Shape (Turbine Blade)", "Extruder Shape for a Turbine Blade"));
- ItemList.Shape_Extruder_ToolHeadDrill
- .set(addItem(tLastID = 377, "Extruder Shape (Drill Head)", "Extruder Shape for a Drill Head"));
+ ItemList.Shape_Extruder_Block.set(
+ addItem(tLastID = 363, "Extruder Shape (Block)", "Extruder Shape for making Blocks"));
+ ItemList.Shape_Extruder_Sword.set(
+ addItem(tLastID = 364, "Extruder Shape (Sword Blade)", "Extruder Shape for making Swords"));
+ ItemList.Shape_Extruder_Pickaxe.set(
+ addItem(tLastID = 365, "Extruder Shape (Pickaxe Head)", "Extruder Shape for making Pickaxes"));
+ ItemList.Shape_Extruder_Shovel.set(
+ addItem(tLastID = 366, "Extruder Shape (Shovel Head)", "Extruder Shape for making Shovels"));
+ ItemList.Shape_Extruder_Axe.set(
+ addItem(tLastID = 367, "Extruder Shape (Axe Head)", "Extruder Shape for making Axes"));
+ ItemList.Shape_Extruder_Hoe.set(
+ addItem(tLastID = 368, "Extruder Shape (Hoe Head)", "Extruder Shape for making Hoes"));
+ ItemList.Shape_Extruder_Hammer.set(
+ addItem(tLastID = 369, "Extruder Shape (Hammer Head)", "Extruder Shape for making Hammers"));
+ ItemList.Shape_Extruder_File.set(
+ addItem(tLastID = 370, "Extruder Shape (File Head)", "Extruder Shape for making Files"));
+ ItemList.Shape_Extruder_Saw.set(
+ addItem(tLastID = 371, "Extruder Shape (Saw Blade)", "Extruder Shape for making Saws"));
+ ItemList.Shape_Extruder_Gear.set(
+ addItem(tLastID = 372, "Extruder Shape (Gear)", "Extruder Shape for making Gears"));
+ ItemList.Shape_Extruder_Bottle.set(
+ addItem(tLastID = 373, "Extruder Shape (Bottle)", "Extruder Shape for making Bottles"));
+ ItemList.Shape_Extruder_Rotor.set(
+ addItem(tLastID = 374, "Extruder Shape (Rotor)", "Extruder Shape for a Rotor"));
+ ItemList.Shape_Extruder_Small_Gear.set(
+ addItem(tLastID = 375, "Extruder Shape (Small Gear)", "Extruder Shape for a Small Gear"));
+ ItemList.Shape_Extruder_Turbine_Blade.set(
+ addItem(tLastID = 376, "Extruder Shape (Turbine Blade)", "Extruder Shape for a Turbine Blade"));
+ ItemList.Shape_Extruder_ToolHeadDrill.set(
+ addItem(tLastID = 377, "Extruder Shape (Drill Head)", "Extruder Shape for a Drill Head"));
ItemList.Shape_Slicer_Flat.set(addItem(tLastID = 398, "Slicer Blade (Flat)", "Slicer Blade for cutting Flat"));
- ItemList.Shape_Slicer_Stripes
- .set(addItem(tLastID = 399, "Slicer Blade (Stripes)", "Slicer Blade for cutting Stripes"));
+ ItemList.Shape_Slicer_Stripes.set(
+ addItem(tLastID = 399, "Slicer Blade (Stripes)", "Slicer Blade for cutting Stripes"));
GT_ModHandler.addCraftingRecipe(
ItemList.Shape_Slicer_Flat.get(1L),
@@ -1178,8 +1179,12 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
ItemList.Tool_MatchBox_Full.get(1L),
64,
16);
- GT_Values.RA
- .addUnboxingRecipe(ItemList.Tool_MatchBox_Full.get(1L), ItemList.Tool_Matches.get(16L), null, 32, 16);
+ GT_Values.RA.addUnboxingRecipe(
+ ItemList.Tool_MatchBox_Full.get(1L),
+ ItemList.Tool_Matches.get(16L),
+ null,
+ 32,
+ 16);
ItemList.Tool_Lighter_Invar_Empty.set(
addItem(
@@ -1269,12 +1274,12 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
256);
if (GalacticraftMars.isModLoaded()) {
- ItemList.Ingot_Heavy1
- .set(addItem(tLastID = 462, "Heavy Duty Alloy Ingot T1", "Used to make Heavy Duty Plates T1"));
- ItemList.Ingot_Heavy2
- .set(addItem(tLastID = 463, "Heavy Duty Alloy Ingot T2", "Used to make Heavy Duty Plates T2"));
- ItemList.Ingot_Heavy3
- .set(addItem(tLastID = 464, "Heavy Duty Alloy Ingot T3", "Used to make Heavy Duty Plates T3"));
+ ItemList.Ingot_Heavy1.set(
+ addItem(tLastID = 462, "Heavy Duty Alloy Ingot T1", "Used to make Heavy Duty Plates T1"));
+ ItemList.Ingot_Heavy2.set(
+ addItem(tLastID = 463, "Heavy Duty Alloy Ingot T2", "Used to make Heavy Duty Plates T2"));
+ ItemList.Ingot_Heavy3.set(
+ addItem(tLastID = 464, "Heavy Duty Alloy Ingot T3", "Used to make Heavy Duty Plates T3"));
// GT_ModHandler.addCraftingRecipe(ItemList.Ingot_Heavy1.get(1L, new Object[0]),
// GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"BhB", "CAS", "B B", 'B',
@@ -1705,14 +1710,17 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
setElectricStats(32000 + tLastID, 800000L, GT_Values.V[3], 3L, -3L, true);
registerTieredTooltip(ItemList.Battery_RE_HV_Sodium.get(1), HV);
- GT_ModHandler
- .addExtractionRecipe(ItemList.Battery_SU_LV_SulfuricAcid.get(1L), ItemList.Battery_Hull_LV.get(1L));
+ GT_ModHandler.addExtractionRecipe(
+ ItemList.Battery_SU_LV_SulfuricAcid.get(1L),
+ ItemList.Battery_Hull_LV.get(1L));
GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_LV_Mercury.get(1L), ItemList.Battery_Hull_LV.get(1L));
- GT_ModHandler
- .addExtractionRecipe(ItemList.Battery_SU_MV_SulfuricAcid.get(1L), ItemList.Battery_Hull_MV.get(1L));
+ GT_ModHandler.addExtractionRecipe(
+ ItemList.Battery_SU_MV_SulfuricAcid.get(1L),
+ ItemList.Battery_Hull_MV.get(1L));
GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_MV_Mercury.get(1L), ItemList.Battery_Hull_MV.get(1L));
- GT_ModHandler
- .addExtractionRecipe(ItemList.Battery_SU_HV_SulfuricAcid.get(1L), ItemList.Battery_Hull_HV.get(1L));
+ GT_ModHandler.addExtractionRecipe(
+ ItemList.Battery_SU_HV_SulfuricAcid.get(1L),
+ ItemList.Battery_Hull_HV.get(1L));
GT_ModHandler.addExtractionRecipe(ItemList.Battery_SU_HV_Mercury.get(1L), ItemList.Battery_Hull_HV.get(1L));
GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_LV_Cadmium.get(1L), ItemList.Battery_Hull_LV.get(1L));
GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_LV_Lithium.get(1L), ItemList.Battery_Hull_LV.get(1L));
@@ -2565,8 +2573,8 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_VALVE)),
new GT_Cover_SteamValve(16384, TextureFactory.of(OVERLAY_VALVE)));
- ItemList.FluidRegulator_LV
- .set(addItem(tLastID = 660, "Fluid Regulator (LV)", FRText1 + GT_Utility.formatNumbers(640) + FRText2));
+ ItemList.FluidRegulator_LV.set(
+ addItem(tLastID = 660, "Fluid Regulator (LV)", FRText1 + GT_Utility.formatNumbers(640) + FRText2));
ItemList.FluidRegulator_MV.set(
addItem(tLastID = 661, "Fluid Regulator (MV)", FRText1 + GT_Utility.formatNumbers(2560) + FRText2));
ItemList.FluidRegulator_HV.set(
@@ -2615,8 +2623,8 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
TextureFactory.of(MACHINE_CASINGS[8][0], TextureFactory.of(OVERLAY_PUMP)),
new GT_Cover_FluidRegulator(524288, TextureFactory.of(OVERLAY_PUMP)));
- ItemList.FluidFilter
- .set(addItem(669, "Fluid Filter Cover", "Set with Fluid Container to only accept one Fluid Type"));
+ ItemList.FluidFilter.set(
+ addItem(669, "Fluid Filter Cover", "Set with Fluid Container to only accept one Fluid Type"));
GregTech_API.registerCover(
ItemList.FluidFilter.get(1L),
TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_SHUTTER)),
@@ -2639,8 +2647,8 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
ItemList.ItemFilter_Import.get(1L),
TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_CONVEYOR)),
new GT_Cover_ItemFilter(false, TextureFactory.of(OVERLAY_CONVEYOR)));
- ItemList.Cover_FluidLimiter
- .set(addItem(272, "Fluid Limiter Cover", "Limits fluid input depending on fill level"));
+ ItemList.Cover_FluidLimiter.set(
+ addItem(272, "Fluid Limiter Cover", "Limits fluid input depending on fill level"));
GregTech_API.registerCover(
ItemList.Cover_FluidLimiter.get(1L),
TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_SHUTTER)),
@@ -3561,15 +3569,15 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
ItemList.Circuit_Board_Coated.set(ItemList.Circuit_Board_Basic.get(1));
ItemList.Circuit_Board_Advanced.set(addItem(tLastID = 711, "Epoxy Circuit Board", "An Advanced Board"));
ItemList.Circuit_Board_Epoxy.set(ItemList.Circuit_Board_Advanced.get(1));
- ItemList.Circuit_Board_Elite
- .set(addItem(tLastID = 712, "Multilayer Fiber-Reinforced Circuit Board", "An Elite Board"));
+ ItemList.Circuit_Board_Elite.set(
+ addItem(tLastID = 712, "Multilayer Fiber-Reinforced Circuit Board", "An Elite Board"));
ItemList.Circuit_Board_Multifiberglass.set(ItemList.Circuit_Board_Elite.get(1));
- ItemList.Circuit_Parts_Crystal_Chip_Elite
- .set(addItem(tLastID = 713, "Engraved Crystal Chip", "Needed for Circuits"));
- ItemList.Circuit_Parts_Crystal_Chip_Master
- .set(addItem(tLastID = 714, "Engraved Lapotron Chip", "Needed for Circuits"));
- ItemList.Circuit_Parts_Crystal_Chip_Wetware
- .set(addItem(tLastID = 668, "Living Crystal Chip", "Needed for Circuits"));
+ ItemList.Circuit_Parts_Crystal_Chip_Elite.set(
+ addItem(tLastID = 713, "Engraved Crystal Chip", "Needed for Circuits"));
+ ItemList.Circuit_Parts_Crystal_Chip_Master.set(
+ addItem(tLastID = 714, "Engraved Lapotron Chip", "Needed for Circuits"));
+ ItemList.Circuit_Parts_Crystal_Chip_Wetware.set(
+ addItem(tLastID = 668, "Living Crystal Chip", "Needed for Circuits"));
ItemList.Circuit_Parts_Advanced.set(addItem(tLastID = 715, "Diode", "Basic Electronic Component"));
ItemList.Circuit_Parts_Diode.set(ItemList.Circuit_Parts_Advanced.get(1));
ItemList.Circuit_Parts_Wiring_Basic.set(addItem(tLastID = 716, "Resistor", "Basic Electronic Component"));
@@ -3793,7 +3801,10 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
final ITexture doesWorkCoverTexture = TextureFactory.of(
TextureFactory.of(OVERLAY_ACTIVITYDETECTOR),
- TextureFactory.builder().addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW).glow().build());
+ TextureFactory.builder()
+ .addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW)
+ .glow()
+ .build());
GregTech_API.registerCover(
ItemList.Cover_ActivityDetector.get(1L),
TextureFactory.of(MACHINE_CASINGS[2][0], doesWorkCoverTexture),
@@ -3813,7 +3824,10 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
final ITexture playerDectectorCoverTexture = TextureFactory.of(
TextureFactory.of(OVERLAY_ACTIVITYDETECTOR),
- TextureFactory.builder().addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW).glow().build());
+ TextureFactory.builder()
+ .addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW)
+ .glow()
+ .build());
GregTech_API.registerCover(
ItemList.Cover_PlayerDetector.get(1L),
TextureFactory.of(MACHINE_CASINGS[2][0], playerDectectorCoverTexture),
@@ -3942,7 +3956,10 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
final ITexture screenCoverTexture = TextureFactory.of(
TextureFactory.of(OVERLAY_SCREEN),
- TextureFactory.builder().addIcon(OVERLAY_SCREEN_GLOW).glow().build());
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SCREEN_GLOW)
+ .glow()
+ .build());
GregTech_API.registerCover(
ItemList.Cover_Screen.get(1L),
TextureFactory.of(MACHINE_CASINGS[2][0], screenCoverTexture),
@@ -4370,7 +4387,8 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
@Override
public boolean onEntityItemUpdate(EntityItem aItemEntity) {
- int aDamage = aItemEntity.getEntityItem().getItemDamage();
+ int aDamage = aItemEntity.getEntityItem()
+ .getItemDamage();
if ((aDamage < 32000) && (aDamage >= 0) && (!aItemEntity.worldObj.isRemote)) {
Materials aMaterial = GregTech_API.sGeneratedMaterials[(aDamage % 1000)];
if ((aMaterial != null) && (aMaterial != Materials.Empty) && (aMaterial != Materials._NULL)) {
@@ -4386,8 +4404,10 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
aMaterial = cauldronRemap.getOrDefault(aMaterial, aMaterial);
aItemEntity.setEntityItemStack(
- GT_OreDictUnificator
- .get(OrePrefixes.dust, aMaterial, aItemEntity.getEntityItem().stackSize));
+ GT_OreDictUnificator.get(
+ OrePrefixes.dust,
+ aMaterial,
+ aItemEntity.getEntityItem().stackSize));
aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3);
return true;
}
@@ -4437,10 +4457,12 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
if (aPrefix == OrePrefixes.cellPlasma && aMaterial.getPlasma(1L) != null) { // Materials has a plasma fluid
for (GT_Recipe recipe : fusionRecipes) { // Loop through fusion recipes
if (recipe.getFluidOutput(0) != null) { // Make sure fluid output can't be null (not sure if possible)
- if (recipe.getFluidOutput(0).isFluidEqual(aMaterial.getPlasma(1L))) return true; // Fusion recipe
- // output matches
- // current plasma
- // cell fluid
+ if (recipe.getFluidOutput(0)
+ .isFluidEqual(aMaterial.getPlasma(1L)))
+ return true; // Fusion recipe
+ // output matches
+ // current plasma
+ // cell fluid
}
}
}
diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java
index c52255ce3a..7300e59b14 100644
--- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java
+++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java
@@ -1679,7 +1679,8 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 {
tLastID = 414 + i,
Dyes.get(i).mName + " Dye",
"",
- Dyes.get(i).name(),
+ Dyes.get(i)
+ .name(),
new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L)));
}
ItemList.Plank_Oak.set(
@@ -2816,16 +2817,20 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 {
GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Tin, 1L));
GT_ModHandler.addCompressionRecipe(ItemList.Crop_Drop_Coppon.get(4L), new ItemStack(Blocks.wool, 1, 1));
- GT_ModHandler
- .addCompressionRecipe(ItemList.Crop_Drop_Plumbilia.get(4L), ItemList.IC2_PlantballCompressed.get(1L));
- GT_ModHandler
- .addCompressionRecipe(ItemList.Crop_Drop_Argentia.get(4L), ItemList.IC2_PlantballCompressed.get(1L));
+ GT_ModHandler.addCompressionRecipe(
+ ItemList.Crop_Drop_Plumbilia.get(4L),
+ ItemList.IC2_PlantballCompressed.get(1L));
+ GT_ModHandler.addCompressionRecipe(
+ ItemList.Crop_Drop_Argentia.get(4L),
+ ItemList.IC2_PlantballCompressed.get(1L));
GT_ModHandler.addCompressionRecipe(ItemList.Crop_Drop_Indigo.get(4L), ItemList.IC2_PlantballCompressed.get(1L));
GT_ModHandler.addCompressionRecipe(ItemList.Crop_Drop_Ferru.get(4L), ItemList.IC2_PlantballCompressed.get(1L));
- GT_ModHandler
- .addCompressionRecipe(ItemList.Crop_Drop_Aurelia.get(4L), ItemList.IC2_PlantballCompressed.get(1L));
- GT_ModHandler
- .addCompressionRecipe(ItemList.Crop_Drop_OilBerry.get(4L), ItemList.IC2_PlantballCompressed.get(1L));
+ GT_ModHandler.addCompressionRecipe(
+ ItemList.Crop_Drop_Aurelia.get(4L),
+ ItemList.IC2_PlantballCompressed.get(1L));
+ GT_ModHandler.addCompressionRecipe(
+ ItemList.Crop_Drop_OilBerry.get(4L),
+ ItemList.IC2_PlantballCompressed.get(1L));
GT_ModHandler.addCompressionRecipe(
ItemList.Crop_Drop_BobsYerUncleRanks.get(4L),
ItemList.IC2_PlantballCompressed.get(1L));
@@ -2898,9 +2903,9 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 {
try {
ic2.api.crops.CropCard tCrop;
GT_Utility.getField(tCrop = ic2.api.crops.Crops.instance.getCropList()[13], "mDrop")
- .set(tCrop, ItemList.Crop_Drop_Ferru.get(1L));
+ .set(tCrop, ItemList.Crop_Drop_Ferru.get(1L));
GT_Utility.getField(tCrop = ic2.api.crops.Crops.instance.getCropList()[14], "mDrop")
- .set(tCrop, ItemList.Crop_Drop_Aurelia.get(1L));
+ .set(tCrop, ItemList.Crop_Drop_Aurelia.get(1L));
} catch (Throwable e) {
if (GT_Values.D1) {
e.printStackTrace(GT_Log.err);
@@ -2953,8 +2958,13 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 {
int aDamage = aStack.getItemDamage();
if ((aDamage >= 25000) && (aDamage < 27000)) {
if (aDamage >= 26000) {
- return Behaviour_Arrow.DEFAULT_PLASTIC
- .getProjectile(this, aProjectileType, aStack, aWorld, aEntity, aSpeed);
+ return Behaviour_Arrow.DEFAULT_PLASTIC.getProjectile(
+ this,
+ aProjectileType,
+ aStack,
+ aWorld,
+ aEntity,
+ aSpeed);
}
return Behaviour_Arrow.DEFAULT_WOODEN.getProjectile(this, aProjectileType, aStack, aWorld, aEntity, aSpeed);
}
@@ -2982,7 +2992,8 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 {
@Override
public boolean doesShowInCreative(OrePrefixes aPrefix, Materials aMaterial, boolean aDoShowAllItems) {
- return (aDoShowAllItems) || (!aPrefix.name().startsWith("toolHead"));
+ return (aDoShowAllItems) || (!aPrefix.name()
+ .startsWith("toolHead"));
}
@Override
diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java
index 79c9ccc164..f2ea20a174 100644
--- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java
+++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java
@@ -35,8 +35,8 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 {
* copper foil + sulfuric acid fiberglass circuit board (simple + multilayer) / glass + plastic + electrum foil
* + sulfurci acid wetware lifesupport board / fiberglass CB + teflon +
*/
- ItemList.Circuit_Board_Wetware
- .set(addItem(tLastID = 6, "Wetware Lifesupport Circuit Board", "The Board that keeps life", o));
+ ItemList.Circuit_Board_Wetware.set(
+ addItem(tLastID = 6, "Wetware Lifesupport Circuit Board", "The Board that keeps life", o));
ItemList.Circuit_Board_Plastic.set(addItem(tLastID = 7, "Plastic Circuit Board", "A Good Board", o));
ItemList.Circuit_Board_Bio.set(addItem(tLastID = 8, "Bio Circuit Board", "Bio genetic mutated Board", o));
@@ -74,28 +74,28 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 {
"Electronic Component",
OrePrefixes.componentCircuit.get(Materials.Capacitor),
SubTag.NO_UNIFICATION));
- ItemList.Circuit_Parts_GlassFiber
- .set(addItem(tLastID = 21, "Glass Fiber", Materials.BorosilicateGlass.mChemicalFormula, o));
+ ItemList.Circuit_Parts_GlassFiber.set(
+ addItem(tLastID = 21, "Glass Fiber", Materials.BorosilicateGlass.mChemicalFormula, o));
ItemList.Circuit_Parts_PetriDish.set(addItem(tLastID = 22, "Petri Dish", "For cultivating cells", o));
ItemList.Circuit_Parts_Reinforced_Glass_Tube.set(addItem(tLastID = 23, "Reinforced Glass Tube", "", o));
- ItemList.Circuit_Parts_ResistorASMD
- .set(addItem(tLastID = 24, "Advanced SMD Resistor", "Advanced Electronic Component", o));
- ItemList.Circuit_Parts_DiodeASMD
- .set(addItem(tLastID = 25, "Advanced SMD Diode", "Advanced Electronic Component", o));
- ItemList.Circuit_Parts_TransistorASMD
- .set(addItem(tLastID = 26, "Advanced SMD Transistor", "Advanced Electronic Component", o));
- ItemList.Circuit_Parts_CapacitorASMD
- .set(addItem(tLastID = 27, "Advanced SMD Capacitor", "Advanced Electronic Component", o));
+ ItemList.Circuit_Parts_ResistorASMD.set(
+ addItem(tLastID = 24, "Advanced SMD Resistor", "Advanced Electronic Component", o));
+ ItemList.Circuit_Parts_DiodeASMD.set(
+ addItem(tLastID = 25, "Advanced SMD Diode", "Advanced Electronic Component", o));
+ ItemList.Circuit_Parts_TransistorASMD.set(
+ addItem(tLastID = 26, "Advanced SMD Transistor", "Advanced Electronic Component", o));
+ ItemList.Circuit_Parts_CapacitorASMD.set(
+ addItem(tLastID = 27, "Advanced SMD Capacitor", "Advanced Electronic Component", o));
- ItemList.Circuit_Parts_ResistorXSMD
- .set(addItem(tLastID = 178, "Optical SMD Resistor", "Highly Advanced Electronic Component", o));
- ItemList.Circuit_Parts_DiodeXSMD
- .set(addItem(tLastID = 179, "Optical SMD Diode", "Highly Advanced Electronic Component", o));
- ItemList.Circuit_Parts_TransistorXSMD
- .set(addItem(tLastID = 180, "Optical SMD Transistor", "Highly Advanced Electronic Component", o));
- ItemList.Circuit_Parts_CapacitorXSMD
- .set(addItem(tLastID = 181, "Optical SMD Capacitor", "Highly Advanced Electronic Component", o));
+ ItemList.Circuit_Parts_ResistorXSMD.set(
+ addItem(tLastID = 178, "Optical SMD Resistor", "Highly Advanced Electronic Component", o));
+ ItemList.Circuit_Parts_DiodeXSMD.set(
+ addItem(tLastID = 179, "Optical SMD Diode", "Highly Advanced Electronic Component", o));
+ ItemList.Circuit_Parts_TransistorXSMD.set(
+ addItem(tLastID = 180, "Optical SMD Transistor", "Highly Advanced Electronic Component", o));
+ ItemList.Circuit_Parts_CapacitorXSMD.set(
+ addItem(tLastID = 181, "Optical SMD Capacitor", "Highly Advanced Electronic Component", o));
ItemList.Circuit_Parts_InductorSMD.set(
addItem(
@@ -104,19 +104,25 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 {
"Electronic Component",
OrePrefixes.componentCircuit.get(Materials.Inductor),
SubTag.NO_UNIFICATION));
- ItemList.Circuit_Parts_InductorASMD
- .set(addItem(tLastID = 183, "Advanced SMD Inductor", "Advanced Electronic Component", o));
- ItemList.Circuit_Parts_InductorXSMD
- .set(addItem(tLastID = 184, "Optical SMD Inductor", "Highly Advanced Electronic Component", o));
+ ItemList.Circuit_Parts_InductorASMD.set(
+ addItem(tLastID = 183, "Advanced SMD Inductor", "Advanced Electronic Component", o));
+ ItemList.Circuit_Parts_InductorXSMD.set(
+ addItem(tLastID = 184, "Optical SMD Inductor", "Highly Advanced Electronic Component", o));
- GT_OreDictUnificator
- .set(OrePrefixes.componentCircuit, Materials.Resistor, ItemList.Circuit_Parts_Resistor.get(1L));
+ GT_OreDictUnificator.set(
+ OrePrefixes.componentCircuit,
+ Materials.Resistor,
+ ItemList.Circuit_Parts_Resistor.get(1L));
GT_OreDictUnificator.set(OrePrefixes.componentCircuit, Materials.Diode, ItemList.Circuit_Parts_Diode.get(1L));
- GT_OreDictUnificator
- .set(OrePrefixes.componentCircuit, Materials.Transistor, ItemList.Circuit_Parts_Transistor.get(1L));
+ GT_OreDictUnificator.set(
+ OrePrefixes.componentCircuit,
+ Materials.Transistor,
+ ItemList.Circuit_Parts_Transistor.get(1L));
GT_OreDictUnificator.set(OrePrefixes.componentCircuit, Materials.Inductor, ItemList.Circuit_Parts_Coil.get(1L));
- GT_OreDictUnificator
- .set(OrePrefixes.componentCircuit, Materials.Capacitor, ItemList.Circuit_Parts_Capacitor.get(1L));
+ GT_OreDictUnificator.set(
+ OrePrefixes.componentCircuit,
+ Materials.Capacitor,
+ ItemList.Circuit_Parts_Capacitor.get(1L));
GT_OreDictUnificator.addAssociation(
OrePrefixes.componentCircuit,
@@ -157,16 +163,16 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 {
* quantum chips
*/
ItemList.Circuit_Silicon_Ingot.set(addItem(tLastID = 30, "Monocrystalline Silicon Boule", "Raw Circuit", o));
- ItemList.Circuit_Silicon_Ingot2
- .set(addItem(tLastID = 31, "Phosphorus doped Monocrystalline Silicon Boule", "Raw Circuit", o));
- ItemList.Circuit_Silicon_Ingot3
- .set(addItem(tLastID = 32, "Naquadah doped Monocrystalline Silicon Boule", "Raw Circuit", o));
- ItemList.Circuit_Silicon_Ingot4
- .set(addItem(tLastID = 150, "Europium doped Monocrystalline Silicon Boule", "Raw Circuit", o));
- ItemList.Circuit_Silicon_Ingot5
- .set(addItem(tLastID = 152, "Americium doped Monocrystalline Silicon Boule", "Raw Circuit", o));
- ItemList.Circuit_Silicon_Ingot6
- .set(addItem(tLastID = 721, "Optically Enriched Crystalline Boule", "Raw Circuit", o));
+ ItemList.Circuit_Silicon_Ingot2.set(
+ addItem(tLastID = 31, "Phosphorus doped Monocrystalline Silicon Boule", "Raw Circuit", o));
+ ItemList.Circuit_Silicon_Ingot3.set(
+ addItem(tLastID = 32, "Naquadah doped Monocrystalline Silicon Boule", "Raw Circuit", o));
+ ItemList.Circuit_Silicon_Ingot4.set(
+ addItem(tLastID = 150, "Europium doped Monocrystalline Silicon Boule", "Raw Circuit", o));
+ ItemList.Circuit_Silicon_Ingot5.set(
+ addItem(tLastID = 152, "Americium doped Monocrystalline Silicon Boule", "Raw Circuit", o));
+ ItemList.Circuit_Silicon_Ingot6.set(
+ addItem(tLastID = 721, "Optically Enriched Crystalline Boule", "Raw Circuit", o));
ItemList.Circuit_Silicon_Wafer.set(addItem(tLastID = 33, "Wafer", "Raw Circuit", o));
ItemList.Circuit_Silicon_Wafer2.set(addItem(tLastID = 34, "Phosphorus doped Wafer", "Raw Circuit", o));
@@ -204,8 +210,8 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 {
ItemList.Circuit_Chip_HPIC.set(addItem(tLastID = 53, "High Power IC", "High Power Circuit", o));
ItemList.Circuit_Wafer_NanoCPU.set(addItem(tLastID = 54, "NanoCPU Wafer", "Raw Circuit", o));
- ItemList.Circuit_Chip_NanoCPU
- .set(addItem(tLastID = 55, "Nanocomponent Central Processing Unit", "Power Circuit", o));
+ ItemList.Circuit_Chip_NanoCPU.set(
+ addItem(tLastID = 55, "Nanocomponent Central Processing Unit", "Power Circuit", o));
ItemList.Circuit_Wafer_QuantumCPU.set(addItem(tLastID = 56, "QBit Wafer", "Raw Circuit", o));
ItemList.Circuit_Chip_QuantumCPU.set(addItem(tLastID = 57, "QBit Processing Unit", "Quantum CPU", o));
@@ -233,10 +239,10 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 {
/**
* Engraved Crystal Chip Engraved Lapotron Chip Crystal CPU SoCrystal stem cells (disassemble eggs)
*/
- ItemList.Circuit_Chip_CrystalSoC2
- .set(addItem(tLastID = 68, "Raw Advanced Crystal Chip", "Raw Advanced Crystal Processor", o));
- ItemList.Circuit_Parts_RawCrystalChip
- .set(addItem(tLastID = 69, "Raw Crystal Chip", "Raw Crystal Processor", o));
+ ItemList.Circuit_Chip_CrystalSoC2.set(
+ addItem(tLastID = 68, "Raw Advanced Crystal Chip", "Raw Advanced Crystal Processor", o));
+ ItemList.Circuit_Parts_RawCrystalChip.set(
+ addItem(tLastID = 69, "Raw Crystal Chip", "Raw Crystal Processor", o));
ItemList.Circuit_Chip_CrystalCPU.set(addItem(tLastID = 70, "Crystal Processing Unit", "Crystal CPU", o)); // Crystal
// chip
// elite
@@ -244,8 +250,8 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 {
ItemList.Circuit_Chip_CrystalSoC.set(addItem(tLastID = 71, "Crystal SoC", "Crystal System on a Chip", o));
ItemList.Circuit_Chip_NeuroCPU.set(addItem(tLastID = 72, "Neuro Processing Unit", "Neuro CPU", o));
ItemList.Circuit_Chip_Stemcell.set(addItem(tLastID = 73, "Stemcells", "Raw inteligence", o));
- ItemList.Circuit_Parts_RawCrystalParts
- .set(addItem(tLastID = 74, "Raw Crystal Chip Parts", "Raw Crystal Processor Parts", o));
+ ItemList.Circuit_Parts_RawCrystalParts.set(
+ addItem(tLastID = 74, "Raw Crystal Chip Parts", "Raw Crystal Processor Parts", o));
ItemList.Circuit_Chip_Biocell.set(addItem(tLastID = 76, "Biocells", "Mutated Raw inteligence", o));
ItemList.Circuit_Chip_BioCPU.set(addItem(tLastID = 77, "Bio Processing Unit", "Bio CPU", o));
ItemList.Circuit_Chip_Optical.set(addItem(tLastID = 724, "Raw Exposed Optical Chip", "Raw Optical Chip", o));
@@ -462,21 +468,21 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 {
registerTieredTooltip(ItemList.Circuit_Biomainframe.get(1), UEV);
ItemList.Circuit_Board_Coated_Basic.set(addItem(tLastID = 100, "Circuit Board", "A basic Circuit Board", o));
- ItemList.Circuit_Board_Phenolic_Good
- .set(addItem(tLastID = 101, "Good Circuit Board", "A good Circuit Board", o));
- ItemList.Circuit_Board_Epoxy_Advanced
- .set(addItem(tLastID = 102, "Advanced Circuit Board", "A advanced Circuit Board", o));
- ItemList.Circuit_Board_Fiberglass_Advanced
- .set(addItem(tLastID = 103, "More Advanced Circuit Board", "A more advanced Circuit Board", o));
- ItemList.Circuit_Board_Multifiberglass_Elite
- .set(addItem(tLastID = 104, "Elite Circuit Board", "A elite Circuit Board", o));
+ ItemList.Circuit_Board_Phenolic_Good.set(
+ addItem(tLastID = 101, "Good Circuit Board", "A good Circuit Board", o));
+ ItemList.Circuit_Board_Epoxy_Advanced.set(
+ addItem(tLastID = 102, "Advanced Circuit Board", "A advanced Circuit Board", o));
+ ItemList.Circuit_Board_Fiberglass_Advanced.set(
+ addItem(tLastID = 103, "More Advanced Circuit Board", "A more advanced Circuit Board", o));
+ ItemList.Circuit_Board_Multifiberglass_Elite.set(
+ addItem(tLastID = 104, "Elite Circuit Board", "A elite Circuit Board", o));
ItemList.Circuit_Board_Wetware_Extreme.set(
addItem(tLastID = 105, "Extreme Wetware Lifesupport Circuit Board", "The Board that keeps life", o));
ItemList.Circuit_Board_Plastic_Advanced.set(addItem(tLastID = 106, "Plastic Circuit Board", "A good Board", o));
- ItemList.Circuit_Board_Bio_Ultra
- .set(addItem(tLastID = 107, "Ultra Bio Mutated Circuit Board", "Bio genetic mutated Board", o));
- ItemList.Circuit_Board_Optical
- .set(addItem(tLastID = 728, "Optical Circuit Board", "Optically Infused Board", o));
+ ItemList.Circuit_Board_Bio_Ultra.set(
+ addItem(tLastID = 107, "Ultra Bio Mutated Circuit Board", "Bio genetic mutated Board", o));
+ ItemList.Circuit_Board_Optical.set(
+ addItem(tLastID = 728, "Optical Circuit Board", "Optically Infused Board", o));
// Optical circuits
ItemList.Circuit_OpticalProcessor.set(
@@ -666,8 +672,8 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 {
ItemList.UHV_Coil.set(addItem(tLastID = 149, "Highly Ultimate Voltage Coil", "Infinite Coil", o));
ItemList.GalliumArsenideCrystal.set(addItem(tLastID = 190, "Gallium Arsenide Crystal", "For making boules", o));
- ItemList.GalliumArsenideCrystalSmallPart
- .set(addItem(tLastID = 191, "Small Gallium Arsenide Crystal", "For making boules", o));
+ ItemList.GalliumArsenideCrystalSmallPart.set(
+ addItem(tLastID = 191, "Small Gallium Arsenide Crystal", "For making boules", o));
ItemList.KevlarFiber.set(addItem(tLastID = 192, "Kevlar Fiber", "For make Kevlar Plates", o));
ItemList.WovenKevlar.set(addItem(tLastID = 193, "Woven Kevlar", "For make Kevlar Plates", o));
ItemList.Spinneret.set(addItem(tLastID = 194, "Spinneret", "For make Kevlar Fiber", o));
@@ -900,11 +906,11 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 {
"BY THE POWERS OF NAUGHTINESS, I COMMAND THIS PARTICULAR STAR, TO BE REALLY, REALLY HOT",
SubTag.NO_UNIFICATION));
- ItemList.Optical_Cpu_Containment_Housing
- .set(addItem(tLastID = 727, "Optical CPU Containment Housing", "CPU Housing", o));
+ ItemList.Optical_Cpu_Containment_Housing.set(
+ addItem(tLastID = 727, "Optical CPU Containment Housing", "CPU Housing", o));
ItemList.Optically_Perfected_CPU.set(addItem(tLastID = 726, "Optically Perfected CPU", "Perfected CPU!", o));
- ItemList.Optically_Compatible_Memory
- .set(addItem(tLastID = 725, "Optically Compatible Memory", "Its in the name!", o));
+ ItemList.Optically_Compatible_Memory.set(
+ addItem(tLastID = 725, "Optically Compatible Memory", "Its in the name!", o));
int whiteDwarfIDs = 729;
ItemList.White_Dwarf_Shape_Extruder_Plate.set(
@@ -1051,6 +1057,8 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 {
@Override
public boolean doesShowInCreative(OrePrefixes aPrefix, Materials aMaterial, boolean aDoShowAllItems) {
- return aDoShowAllItems || (aPrefix.toString().toLowerCase().contains("nanite"));
+ return aDoShowAllItems || (aPrefix.toString()
+ .toLowerCase()
+ .contains("nanite"));
}
}
diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_98.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_98.java
index 7e50bd4556..8bd30912fc 100644
--- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_98.java
+++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_98.java
@@ -313,8 +313,11 @@ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item {
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item aItem, CreativeTabs aCreativeTab, List aList) {
- Arrays.stream(FluidCell.values()).filter(fluid -> FluidRegistry.getFluid(fluid.getFluidName()) != null)
- .map(FluidCell::get).filter(Objects::nonNull).forEach(aList::add);
+ Arrays.stream(FluidCell.values())
+ .filter(fluid -> FluidRegistry.getFluid(fluid.getFluidName()) != null)
+ .map(FluidCell::get)
+ .filter(Objects::nonNull)
+ .forEach(aList::add);
}
@Override
diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_99.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_99.java
index 51d8405107..4186b607f8 100644
--- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_99.java
+++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_99.java
@@ -178,7 +178,9 @@ public class GT_MetaGenerated_Item_99 extends GT_MetaGenerated_Item {
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item aItem, CreativeTabs aCreativeTab, List aList) {
- enabled.stream().mapToObj(i -> new ItemStack(this, 1, i)).forEach(aList::add);
+ enabled.stream()
+ .mapToObj(i -> new ItemStack(this, 1, i))
+ .forEach(aList::add);
}
@Override
diff --git a/src/main/java/gregtech/common/items/GT_NeutronReflector_Item.java b/src/main/java/gregtech/common/items/GT_NeutronReflector_Item.java
index cfcedaa8b6..9365677773 100644
--- a/src/main/java/gregtech/common/items/GT_NeutronReflector_Item.java
+++ b/src/main/java/gregtech/common/items/GT_NeutronReflector_Item.java
@@ -18,8 +18,15 @@ public class GT_NeutronReflector_Item extends GT_Generic_Item implements IReacto
public boolean acceptUraniumPulse(IReactor reactor, ItemStack yourStack, ItemStack pulsingStack, int youX, int youY,
int pulseX, int pulseY, boolean heatrun) {
if (!heatrun) {
- ((IReactorComponent) pulsingStack.getItem())
- .acceptUraniumPulse(reactor, pulsingStack, yourStack, pulseX, pulseY, youX, youY, heatrun);
+ ((IReactorComponent) pulsingStack.getItem()).acceptUraniumPulse(
+ reactor,
+ pulsingStack,
+ yourStack,
+ pulseX,
+ pulseY,
+ youX,
+ youY,
+ heatrun);
}
return true;
}
diff --git a/src/main/java/gregtech/common/items/GT_VolumetricFlask.java b/src/main/java/gregtech/common/items/GT_VolumetricFlask.java
index db2efa4d81..1787875100 100644
--- a/src/main/java/gregtech/common/items/GT_VolumetricFlask.java
+++ b/src/main/java/gregtech/common/items/GT_VolumetricFlask.java
@@ -228,7 +228,8 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs creativeTabs, List itemList) {
itemList.add(new ItemStack(this));
- for (Fluid fluid : FluidRegistry.getRegisteredFluids().values()) {
+ for (Fluid fluid : FluidRegistry.getRegisteredFluids()
+ .values()) {
if (fluid != null) {
ItemStack stack = new ItemStack(this);
setCapacity(stack, getMaxCapacity());
@@ -339,11 +340,14 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain
textField.setText(
String.valueOf(((GT_VolumetricFlask) getCurrentItem().getItem()).getCapacity(getCurrentItem())));
builder.widget(
- textField.setNumbers(() -> 1, () -> maxCapacity).setPattern(BaseTextFieldWidget.NATURAL_NUMS)
- .setTextAlignment(Alignment.CenterLeft).setTextColor(Color.WHITE.dark(1))
- .setFocusOnGuiOpen(true)
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD_LIGHT_GRAY.withOffset(-1, -1, 2, 2))
- .setPos(60, 55).setSize(59, 12));
+ textField.setNumbers(() -> 1, () -> maxCapacity)
+ .setPattern(BaseTextFieldWidget.NATURAL_NUMS)
+ .setTextAlignment(Alignment.CenterLeft)
+ .setTextColor(Color.WHITE.dark(1))
+ .setFocusOnGuiOpen(true)
+ .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD_LIGHT_GRAY.withOffset(-1, -1, 2, 2))
+ .setPos(60, 55)
+ .setSize(59, 12));
addChangeAmountButton(builder, "+1", new Pos2d(20, 26), new Size(22, 20), val -> val + 1);
addChangeAmountButton(builder, "+10", new Pos2d(48, 26), new Size(28, 20), val -> val + 10);
@@ -355,26 +359,34 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain
addChangeAmountButton(builder, "-1000", new Pos2d(120, 75), new Size(38, 20), val -> val - 1000);
builder.widget(
new VanillaButtonWidget().setDisplayString("Accept")
- .setClickableGetter(() -> MathExpression.parseMathExpression(textField.getText()) > 0)
- .setOnClick((clickData, widget) -> {
- if (widget.isClient()) {
- textField.onRemoveFocus();
- } else {
- widget.getWindow().tryClose();
- }
- }).setPos(128, 51).setSize(38, 20));
+ .setClickableGetter(
+ () -> MathExpression.parseMathExpression(textField.getText()) > 0)
+ .setOnClick((clickData, widget) -> {
+ if (widget.isClient()) {
+ textField.onRemoveFocus();
+ } else {
+ widget.getWindow()
+ .tryClose();
+ }
+ })
+ .setPos(128, 51)
+ .setSize(38, 20));
return builder.build();
}
private void addChangeAmountButton(ModularWindow.Builder builder, String text, Pos2d pos, Size size,
Function<Integer, Integer> function) {
- builder.widget(new VanillaButtonWidget().setDisplayString(text).setOnClick((clickData, widget) -> {
- String currentText = textField.getText();
- int amount = (int) MathExpression.parseMathExpression(currentText, 1);
- amount = Math.min(maxCapacity, Math.max(1, function.apply(amount)));
- textField.setText(String.valueOf(amount));
- }).setPos(pos).setSize(size));
+ builder.widget(
+ new VanillaButtonWidget().setDisplayString(text)
+ .setOnClick((clickData, widget) -> {
+ String currentText = textField.getText();
+ int amount = (int) MathExpression.parseMathExpression(currentText, 1);
+ amount = Math.min(maxCapacity, Math.max(1, function.apply(amount)));
+ textField.setText(String.valueOf(amount));
+ })
+ .setPos(pos)
+ .setSize(size));
}
private ItemStack getCurrentItem() {
diff --git a/src/main/java/gregtech/common/items/ItemComb.java b/src/main/java/gregtech/common/items/ItemComb.java
index b1146e8db6..70a89d3c17 100644
--- a/src/main/java/gregtech/common/items/ItemComb.java
+++ b/src/main/java/gregtech/common/items/ItemComb.java
@@ -98,7 +98,8 @@ public class ItemComb extends Item implements IGT_ItemWithMaterialRenderer {
@Override
public String getItemStackDisplayName(ItemStack stack) {
- return CombType.valueOf(stack.getItemDamage()).getName();
+ return CombType.valueOf(stack.getItemDamage())
+ .getName();
}
@Override
@@ -1597,7 +1598,12 @@ public class ItemComb extends Item implements IGT_ItemWithMaterialRenderer {
null,
fluid,
100 * 100,
- (fluid.getFluid().getDensity() * 128 > 0 ? (int) (fluid.getFluid().getDensity() * 100) : 128),
+ (fluid.getFluid()
+ .getDensity() * 128 > 0
+ ? (int) (fluid.getFluid()
+ .getDensity()
+ * 100)
+ : 128),
volt.getSimpleEnergy() / 2);
}
diff --git a/src/main/java/gregtech/common/items/PollenType.java b/src/main/java/gregtech/common/items/PollenType.java
index b8cccb70b6..782bed9f64 100644
--- a/src/main/java/gregtech/common/items/PollenType.java
+++ b/src/main/java/gregtech/common/items/PollenType.java
@@ -25,7 +25,10 @@ public enum PollenType {
public String getName() {
return GT_LanguageManager.addStringLocalization(
"pollen." + this.name,
- this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Pollen");
+ this.name.substring(0, 1)
+ .toUpperCase()
+ + this.name.substring(1)
+ + " Pollen");
}
public int[] getColours() {
diff --git a/src/main/java/gregtech/common/items/PropolisType.java b/src/main/java/gregtech/common/items/PropolisType.java
index 15f4a2400b..88a1a3faa8 100644
--- a/src/main/java/gregtech/common/items/PropolisType.java
+++ b/src/main/java/gregtech/common/items/PropolisType.java
@@ -36,7 +36,10 @@ public enum PropolisType {
// return "gt.comb."+this.name;
return GT_LanguageManager.addStringLocalization(
"propolis." + this.name,
- this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Propolis");
+ this.name.substring(0, 1)
+ .toUpperCase()
+ + this.name.substring(1)
+ + " Propolis");
}
public int getColours() {
diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Cover_Tool.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Cover_Tool.java
index 4a7beb453c..57e0750335 100644
--- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Cover_Tool.java
+++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Cover_Tool.java
@@ -23,8 +23,9 @@ import gregtech.api.util.*;
public class Behaviour_Cover_Tool extends Behaviour_None {
public static final IItemBehaviour<GT_MetaBase_Item> INSTANCE = new Behaviour_Cover_Tool();
- private final String mTooltip = GT_LanguageManager
- .addStringLocalization("gt.behaviour.cover_copy_paste", "Can copy/paste cover data.");
+ private final String mTooltip = GT_LanguageManager.addStringLocalization(
+ "gt.behaviour.cover_copy_paste",
+ "Can copy/paste cover data.");
private ISerializableObject mStoredData = GregTech_API.sNoBehavior.createDataObject();
private int mCoverType;
@@ -113,11 +114,13 @@ public class Behaviour_Cover_Tool extends Behaviour_None {
mCoverType = tCoverable.getCoverIDAtSide((byte) tSide);
aList.add(
"Block Side: " + EnumChatFormatting.AQUA
- + ForgeDirection.getOrientation(tSide).name()
+ + ForgeDirection.getOrientation(tSide)
+ .name()
+ EnumChatFormatting.RESET);
aList.add(
"Cover Type: " + EnumChatFormatting.GREEN
- + tCoverable.getCoverItemAtSide((byte) tSide).getDisplayName()
+ + tCoverable.getCoverItemAtSide((byte) tSide)
+ .getDisplayName()
+ EnumChatFormatting.RESET);
} else {
mStoredData = GregTech_API.sNoBehavior.createDataObject();
diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java
index 1dbcd4691d..84b6513563 100644
--- a/src/main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java
+++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java
@@ -32,7 +32,8 @@ public class Behaviour_DataStick extends Behaviour_None {
aList.add(tString.substring(i, Math.min(i + 64, j)));
}
}
- short sTier = GT_Utility.ItemNBT.getNBT(aStack).getShort("rocket_tier");
+ short sTier = GT_Utility.ItemNBT.getNBT(aStack)
+ .getShort("rocket_tier");
if (sTier > 0 && sTier < 100) {
aList.add("Rocket Schematic Tier: " + sTier);
} else if (sTier >= 100) {
@@ -51,7 +52,8 @@ public class Behaviour_DataStick extends Behaviour_None {
}
}
}
- long lastUpdate = GT_Utility.ItemNBT.getNBT(aStack).getLong("lastUpdate");
+ long lastUpdate = GT_Utility.ItemNBT.getNBT(aStack)
+ .getLong("lastUpdate");
if (lastUpdate != 0) aList.add(String.format("Last update at: %tc", lastUpdate));
return aList;
diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Hoe.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Hoe.java
index 933f30acb7..a66cba699d 100644
--- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Hoe.java
+++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Hoe.java
@@ -45,11 +45,14 @@ public class Behaviour_Hoe extends Behaviour_None {
Block aBlock = aWorld.getBlock(aX, aY, aZ);
if ((aSide != 0) && (GT_Utility.isBlockAir(aWorld, aX, aY + 1, aZ))
&& ((aBlock == Blocks.grass) || (aBlock == Blocks.dirt))) {
- new WorldSpawnedEventBuilder.SoundEventBuilder()
- .setVolume((Blocks.farmland.stepSound.getVolume() + 1.0F) / 2.0F)
- .setPitch(Blocks.farmland.stepSound.getPitch() * 0.8F)
- .setIdentifier(Blocks.farmland.stepSound.getStepResourcePath())
- .setPosition(aX + 0.5F, aY + 0.5F, aZ + 0.5F).setWorld(aWorld).run();
+ new WorldSpawnedEventBuilder.SoundEventBuilder().setVolume(
+ (Blocks.farmland.stepSound.getVolume() + 1.0F) / 2.0F)
+ .setPitch(Blocks.farmland.stepSound.getPitch() * 0.8F)
+ .setIdentifier(
+ Blocks.farmland.stepSound.getStepResourcePath())
+ .setPosition(aX + 0.5F, aY + 0.5F, aZ + 0.5F)
+ .setWorld(aWorld)
+ .run();
if (aWorld.isRemote) {
return true;
}
diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Lighter.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Lighter.java
index b1357a0777..1e232d4988 100644
--- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Lighter.java
+++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Lighter.java
@@ -24,12 +24,15 @@ public class Behaviour_Lighter extends Behaviour_None {
private final ItemStack mUsedLighter;
private final ItemStack mFullLighter;
private final long mFuelAmount;
- 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_Lighter(ItemStack aEmptyLighter, ItemStack aUsedLighter, ItemStack aFullLighter,
long aFuelAmount) {
diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Essentia.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Essentia.java
index c164695c36..0023511846 100644
--- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Essentia.java
+++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Essentia.java
@@ -18,8 +18,9 @@ import gregtech.api.util.GT_Utility;
public class Behaviour_Plunger_Essentia extends Behaviour_None {
private final int mCosts;
- private final String mTooltip = GT_LanguageManager
- .addStringLocalization("gt.behaviour.plunger.essentia", "Clears Essentia from Containers and Tubes");
+ private final String mTooltip = GT_LanguageManager.addStringLocalization(
+ "gt.behaviour.plunger.essentia",
+ "Clears Essentia from Containers and Tubes");
public Behaviour_Plunger_Essentia(int aCosts) {
this.mCosts = aCosts;
diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Fluid.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Fluid.java
index e0d0f91e48..737caf9f5b 100644
--- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Fluid.java
+++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Fluid.java
@@ -21,8 +21,9 @@ import gregtech.api.util.GT_Utility;
public class Behaviour_Plunger_Fluid extends Behaviour_None {
private final int mCosts;
- private final String mTooltip = GT_LanguageManager
- .addStringLocalization("gt.behaviour.plunger.fluid", "Clears 1000 Liters of Fluid from Tanks");
+ private final String mTooltip = GT_LanguageManager.addStringLocalization(
+ "gt.behaviour.plunger.fluid",
+ "Clears 1000 Liters of Fluid from Tanks");
public Behaviour_Plunger_Fluid(int aCosts) {
this.mCosts = aCosts;
@@ -61,8 +62,14 @@ public class Behaviour_Plunger_Fluid extends Behaviour_None {
GT_MetaTileEntity_BasicTank machine = (GT_MetaTileEntity_BasicTank) mTileEntity;
if (machine.mFluid != null && machine.mFluid.amount > 0)
machine.mFluid.amount = machine.mFluid.amount - Math.min(machine.mFluid.amount, 1000);
- GT_Utility
- .sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ);
+ GT_Utility.sendSoundToPlayers(
+ aWorld,
+ SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE,
+ 1.0F,
+ -1.0F,
+ aX,
+ aY,
+ aZ);
return true;
}
}
diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Item.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Item.java
index 1aeafc62fe..e4f0c3012d 100644
--- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Item.java
+++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Item.java
@@ -21,8 +21,9 @@ import gregtech.api.util.GT_Utility;
public class Behaviour_Plunger_Item extends Behaviour_None {
private final int mCosts;
- private final String mTooltip = GT_LanguageManager
- .addStringLocalization("gt.behaviour.plunger.item", "Clears Items from Pipes");
+ private final String mTooltip = GT_LanguageManager.addStringLocalization(
+ "gt.behaviour.plunger.item",
+ "Clears Items from Pipes");
public Behaviour_Plunger_Item(int aCosts) {
this.mCosts = aCosts;
@@ -39,9 +40,13 @@ public class Behaviour_Plunger_Item extends Behaviour_None {
IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aTileEntity).getMetaTileEntity();
if ((tMetaTileEntity instanceof IMetaTileEntityItemPipe)) {
for (IMetaTileEntityItemPipe tTileEntity : GT_Utility.sortMapByValuesAcending(
- IMetaTileEntityItemPipe.Util
- .scanPipes((IMetaTileEntityItemPipe) tMetaTileEntity, new HashMap<>(), 0L, false, true))
- .keySet()) {
+ IMetaTileEntityItemPipe.Util.scanPipes(
+ (IMetaTileEntityItemPipe) tMetaTileEntity,
+ new HashMap<>(),
+ 0L,
+ false,
+ true))
+ .keySet()) {
int i = 0;
for (int j = tTileEntity.getSizeInventory(); i < j; i++) {
if (tTileEntity.isValidSlot(i)) {
diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java
index 1374a33f7d..c007473df1 100644
--- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java
+++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java
@@ -31,8 +31,9 @@ public class Behaviour_Prospecting extends Behaviour_None {
private final int mVanillaCosts;
private final int mEUCosts;
- private final String mTooltip = GT_LanguageManager
- .addStringLocalization("gt.behaviour.prospecting", "Usable for Prospecting");
+ private final String mTooltip = GT_LanguageManager.addStringLocalization(
+ "gt.behaviour.prospecting",
+ "Usable for Prospecting");
public Behaviour_Prospecting(int aVanillaCosts, int aEUCosts) {
this.mVanillaCosts = aVanillaCosts;
@@ -54,7 +55,8 @@ public class Behaviour_Prospecting extends Behaviour_None {
ItemData tAssociation = GT_OreDictUnificator.getAssociation(new ItemStack(aBlock, 1, aMeta));
if (tAssociation != null && tAssociation.mPrefix != null
&& tAssociation.mMaterial != null
- && tAssociation.mPrefix.toString().startsWith("ore")) {
+ && tAssociation.mPrefix.toString()
+ .startsWith("ore")) {
GT_Utility.sendChatToPlayer(
aPlayer,
GT_Utility.trans("100", "This is ") + tAssociation.mMaterial.mMaterial.mDefaultLocalName
@@ -85,8 +87,9 @@ public class Behaviour_Prospecting extends Behaviour_None {
tBlock = aWorld.getBlock(tX, tY, tZ);
if (tBlock == Blocks.lava || tBlock == Blocks.flowing_lava) {
- GT_Utility
- .sendChatToPlayer(aPlayer, GT_Utility.trans("102", "There is Lava behind this Rock."));
+ GT_Utility.sendChatToPlayer(
+ aPlayer,
+ GT_Utility.trans("102", "There is Lava behind this Rock."));
break;
}
if (tBlock instanceof BlockLiquid || tBlock instanceof IFluidBlock) {
@@ -133,7 +136,8 @@ public class Behaviour_Prospecting extends Behaviour_None {
tAssociation = GT_OreDictUnificator.getAssociation(new ItemStack(tBlock, 1, tMetaID));
if (tAssociation != null && tAssociation.mPrefix != null
&& tAssociation.mMaterial != null
- && tAssociation.mPrefix.toString().startsWith("ore")) {
+ && tAssociation.mPrefix.toString()
+ .startsWith("ore")) {
GT_Utility.sendChatToPlayer(
aPlayer,
GT_Utility.trans("106", "Found traces of ")
diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Scanner.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Scanner.java
index ad8d99f6fb..d82585184d 100644
--- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Scanner.java
+++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Scanner.java
@@ -19,8 +19,9 @@ import gregtech.api.util.GT_Utility;
public class Behaviour_Scanner extends Behaviour_None {
public static final IItemBehaviour<GT_MetaBase_Item> INSTANCE = new Behaviour_Scanner();
- private final String mTooltip = GT_LanguageManager
- .addStringLocalization("gt.behaviour.scanning", "Can scan Blocks in World");
+ private final String mTooltip = GT_LanguageManager.addStringLocalization(
+ "gt.behaviour.scanning",
+ "Can scan Blocks in World");
@Override
public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX,
diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Scoop.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Scoop.java
index 83d5ffffa3..51723469d6 100644
--- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Scoop.java
+++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Scoop.java
@@ -17,8 +17,9 @@ import gregtech.api.util.GT_LanguageManager;
public class Behaviour_Scoop extends Behaviour_None {
private final int mCosts;
- private final String mTooltip = GT_LanguageManager
- .addStringLocalization("gt.behaviour.scoop", "Catches Butterflies on Leftclick");
+ private final String mTooltip = GT_LanguageManager.addStringLocalization(
+ "gt.behaviour.scoop",
+ "Catches Butterflies on Leftclick");
public Behaviour_Scoop(int aCosts) {
this.mCosts = aCosts;
@@ -33,18 +34,23 @@ public class Behaviour_Scoop extends Behaviour_None {
if ((aPlayer.capabilities.isCreativeMode)
|| (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) {
Object tButterfly = ((IEntityButterfly) aEntity).getButterfly();
- ((IButterfly) tButterfly).getGenome().getPrimary().getRoot()
- .getBreedingTracker(aEntity.worldObj, aPlayer.getGameProfile())
- .registerCatch((IButterfly) tButterfly);
+ ((IButterfly) tButterfly).getGenome()
+ .getPrimary()
+ .getRoot()
+ .getBreedingTracker(aEntity.worldObj, aPlayer.getGameProfile())
+ .registerCatch((IButterfly) tButterfly);
aPlayer.worldObj.spawnEntityInWorld(
new EntityItem(
aPlayer.worldObj,
aEntity.posX,
aEntity.posY,
aEntity.posZ,
- ((IButterfly) tButterfly).getGenome().getPrimary().getRoot().getMemberStack(
- ((IButterfly) tButterfly).copy(),
- EnumFlutterType.BUTTERFLY.ordinal())));
+ ((IButterfly) tButterfly).getGenome()
+ .getPrimary()
+ .getRoot()
+ .getMemberStack(
+ ((IButterfly) tButterfly).copy(),
+ EnumFlutterType.BUTTERFLY.ordinal())));
aEntity.setDead();
}
return true;
diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Sense.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Sense.java
index 75b4d9e431..949b57e581 100644
--- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Sense.java
+++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Sense.java
@@ -15,8 +15,9 @@ import ic2.api.crops.ICropTile;
public class Behaviour_Sense extends Behaviour_None {
private final int mCosts;
- private final String mTooltip = GT_LanguageManager
- .addStringLocalization("gt.behaviour.sense", "Rightclick to harvest Crop Sticks");
+ private final String mTooltip = GT_LanguageManager.addStringLocalization(
+ "gt.behaviour.sense",
+ "Rightclick to harvest Crop Sticks");
public Behaviour_Sense(int aCosts) {
this.mCosts = aCosts;
diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_SoftHammer.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_SoftHammer.java
index 7c5780c42d..75f3afb4fc 100644
--- a/src/main/java/gregtech/common/items/behaviors/Behaviour_SoftHammer.java
+++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_SoftHammer.java
@@ -17,8 +17,9 @@ import gregtech.api.util.GT_Utility;
public class Behaviour_SoftHammer extends Behaviour_None {
private final int mCosts;
- private final String mTooltip = GT_LanguageManager
- .addStringLocalization("gt.behaviour.softhammer", "Activates and Deactivates Machines");
+ private final String mTooltip = GT_LanguageManager.addStringLocalization(
+ "gt.behaviour.softhammer",
+ "Activates and Deactivates Machines");
public Behaviour_SoftHammer(int aCosts) {
this.mCosts = aCosts;
@@ -41,8 +42,14 @@ public class Behaviour_SoftHammer extends Behaviour_None {
aWorld.isRemote = true;
aWorld.setBlock(aX, aY, aZ, Blocks.redstone_lamp, 0, 0);
aWorld.isRemote = false;
- GT_Utility
- .sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ);
+ GT_Utility.sendSoundToPlayers(
+ aWorld,
+ SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE,
+ 1.0F,
+ -1.0F,
+ aX,
+ aY,
+ aZ);
}
return true;
}
@@ -52,8 +59,14 @@ public class Behaviour_SoftHammer extends Behaviour_None {
aWorld.isRemote = true;
aWorld.setBlock(aX, aY, aZ, Blocks.lit_redstone_lamp, 0, 0);
aWorld.isRemote = false;
- GT_Utility
- .sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ);
+ GT_Utility.sendSoundToPlayers(
+ aWorld,
+ SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE,
+ 1.0F,
+ -1.0F,
+ aX,
+ aY,
+ aZ);
}
return true;
}
@@ -63,8 +76,14 @@ public class Behaviour_SoftHammer extends Behaviour_None {
aWorld.isRemote = true;
aWorld.setBlock(aX, aY, aZ, aBlock, (aMeta + 8) % 16, 0);
aWorld.isRemote = false;
- GT_Utility
- .sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ);
+ GT_Utility.sendSoundToPlayers(
+ aWorld,
+ SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE,
+ 1.0F,
+ -1.0F,
+ aX,
+ aY,
+ aZ);
}
return true;
}
@@ -74,8 +93,14 @@ public class Behaviour_SoftHammer extends Behaviour_None {
aWorld.isRemote = true;
aWorld.setBlock(aX, aY, aZ, aBlock, (aMeta + 8) % 16, 0);
aWorld.isRemote = false;
- GT_Utility
- .sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ);
+ GT_Utility.sendSoundToPlayers(
+ aWorld,
+ SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE,
+ 1.0F,
+ -1.0F,
+ aX,
+ aY,
+ aZ);
}
return true;
}
@@ -92,8 +117,14 @@ public class Behaviour_SoftHammer extends Behaviour_None {
if ((aPlayer.capabilities.isCreativeMode)
|| (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) {
aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta + 1) % 6, 3);
- GT_Utility
- .sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ);
+ GT_Utility.sendSoundToPlayers(
+ aWorld,
+ SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE,
+ 1.0F,
+ -1.0F,
+ aX,
+ aY,
+ aZ);
}
return true;
}
@@ -105,8 +136,14 @@ public class Behaviour_SoftHammer extends Behaviour_None {
if ((aPlayer.capabilities.isCreativeMode)
|| (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) {
aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta - 1) % 4 + 2, 3);
- GT_Utility
- .sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ);
+ GT_Utility.sendSoundToPlayers(
+ aWorld,
+ SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE,
+ 1.0F,
+ -1.0F,
+ aX,
+ aY,
+ aZ);
}
return true;
}
@@ -114,8 +151,14 @@ public class Behaviour_SoftHammer extends Behaviour_None {
if ((aPlayer.capabilities.isCreativeMode)
|| (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) {
aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta + 1) % 6 != 1 ? (aMeta + 1) % 6 : 2, 3);
- GT_Utility
- .sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ);
+ GT_Utility.sendSoundToPlayers(
+ aWorld,
+ SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE,
+ 1.0F,
+ -1.0F,
+ aX,
+ aY,
+ aZ);
}
return true;
}
diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Spray_Color.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Spray_Color.java
index f5b4615a21..3365d44d11 100644
--- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Spray_Color.java
+++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Spray_Color.java
@@ -37,10 +37,12 @@ public class Behaviour_Spray_Color extends Behaviour_None {
Blocks.hardened_clay,
ItemList.TE_Rockwool.getBlock());
private final String mTooltip;
- private final String mTooltipUses = GT_LanguageManager
- .addStringLocalization("gt.behaviour.paintspray.uses", "Remaining Uses:");
- private final String mTooltipUnstackable = GT_LanguageManager
- .addStringLocalization("gt.behaviour.unstackable", "Not usable when stacked!");
+ private final String mTooltipUses = GT_LanguageManager.addStringLocalization(
+ "gt.behaviour.paintspray.uses",
+ "Remaining Uses:");
+ private final String mTooltipUnstackable = GT_LanguageManager.addStringLocalization(
+ "gt.behaviour.unstackable",
+ "Not usable when stacked!");
public Behaviour_Spray_Color(ItemStack aEmpty, ItemStack aUsed, ItemStack aFull, long aUses, int aColor) {
this.mEmpty = aEmpty;
diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Wrench.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Wrench.java
index 64d2660c53..a04593a1b8 100644
--- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Wrench.java
+++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Wrench.java
@@ -23,8 +23,9 @@ import ic2.api.tile.IWrenchable;
public class Behaviour_Wrench extends Behaviour_None {
private final int mCosts;
- private final String mTooltip = GT_LanguageManager
- .addStringLocalization("gt.behaviour.wrench", "Rotates Blocks on Rightclick");
+ private final String mTooltip = GT_LanguageManager.addStringLocalization(
+ "gt.behaviour.wrench",
+ "Rotates Blocks on Rightclick");
public Behaviour_Wrench(int aCosts) {
this.mCosts = aCosts;
@@ -165,7 +166,7 @@ public class Behaviour_Wrench extends Behaviour_None {
}
}
if ((Arrays.asList(aBlock.getValidRotations(aWorld, aX, aY, aZ))
- .contains(ForgeDirection.getOrientation(aTargetSide)))
+ .contains(ForgeDirection.getOrientation(aTargetSide)))
&& ((aPlayer.capabilities.isCreativeMode) || (!GT_ModHandler.isElectricItem(aStack))
|| (GT_ModHandler.canUseElectricItem(aStack, this.mCosts)))
&& (aBlock.rotateBlock(aWorld, aX, aY, aZ, ForgeDirection.getOrientation(aTargetSide)))) {
diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_WrittenBook.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_WrittenBook.java
index 947442ad8e..65ba5199ee 100644
--- a/src/main/java/gregtech/common/items/behaviors/Behaviour_WrittenBook.java
+++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_WrittenBook.java
@@ -22,7 +22,8 @@ public class Behaviour_WrittenBook extends Behaviour_None {
int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
if ((GT_Utility.isStringValid(GT_Utility.ItemNBT.getBookTitle(aStack)))
&& ((aPlayer instanceof EntityPlayerSP))) {
- Minecraft.getMinecraft().displayGuiScreen(new GuiScreenBook(aPlayer, aStack, false));
+ Minecraft.getMinecraft()
+ .displayGuiScreen(new GuiScreenBook(aPlayer, aStack, false));
}
return true;
}
diff --git a/src/main/java/gregtech/common/misc/GT_Command.java b/src/main/java/gregtech/common/misc/GT_Command.java
index c2af60523d..66b77b2c87 100644
--- a/src/main/java/gregtech/common/misc/GT_Command.java
+++ b/src/main/java/gregtech/common/misc/GT_Command.java
@@ -101,14 +101,16 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner
public List addTabCompletionOptions(ICommandSender sender, String[] ss) {
List<String> l = new ArrayList<>();
String test = ss.length == 0 ? "" : ss[0].trim();
- if (ss.length == 0 || ss.length == 1 && (test.isEmpty() || Stream.of(
- "toggle",
- "chunks",
- "pollution",
- "global_energy_add",
- "global_energy_set",
- "global_energy_join",
- "global_energy_display").anyMatch(s -> s.startsWith(test)))) {
+ if (ss.length == 0 || ss.length == 1 && (test.isEmpty() || Stream
+ .of(
+ "toggle",
+ "chunks",
+ "pollution",
+ "global_energy_add",
+ "global_energy_set",
+ "global_energy_join",
+ "global_energy_display")
+ .anyMatch(s -> s.startsWith(test)))) {
Stream.of(
"toggle",
"chunks",
@@ -116,7 +118,9 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner
"global_energy_add",
"global_energy_set",
"global_energy_join",
- "global_energy_display").filter(s -> test.isEmpty() || s.startsWith(test)).forEach(l::add);
+ "global_energy_display")
+ .filter(s -> test.isEmpty() || s.startsWith(test))
+ .forEach(l::add);
} else if (test.equals("toggle")) {
String test1 = ss[1].trim();
Stream.of(
@@ -133,7 +137,9 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner
"debugStones",
"debugChunkloaders",
"debugMulti",
- "debugWorldData").filter(s -> test1.isEmpty() || s.startsWith(test1)).forEach(l::add);
+ "debugWorldData")
+ .filter(s -> test1.isEmpty() || s.startsWith(test1))
+ .forEach(l::add);
}
return l;
}
@@ -178,7 +184,8 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner
int amount = (strings.length < 2) ? GT_Mod.gregtechproxy.mPollutionSmogLimit
: Integer.parseInt(strings[1]);
GT_Pollution.addPollution(
- sender.getEntityWorld().getChunkFromBlockCoords(coordinates.posX, coordinates.posZ),
+ sender.getEntityWorld()
+ .getChunkFromBlockCoords(coordinates.posX, coordinates.posZ),
amount);
break;
case "global_energy_add": {
diff --git a/src/main/java/gregtech/common/misc/GT_DrillingLogicDelegate.java b/src/main/java/gregtech/common/misc/GT_DrillingLogicDelegate.java
index 9edee98725..6de4de3c71 100644
--- a/src/main/java/gregtech/common/misc/GT_DrillingLogicDelegate.java
+++ b/src/main/java/gregtech/common/misc/GT_DrillingLogicDelegate.java
@@ -22,8 +22,8 @@ public class GT_DrillingLogicDelegate {
public static final ItemStack MINING_PIPE_STACK = GT_ModHandler.getIC2Item("miningPipe", 0);
public static final Block MINING_PIPE_BLOCK = GT_Utility.getBlockFromStack(MINING_PIPE_STACK);
- public static final Block MINING_PIPE_TIP_BLOCK = GT_Utility
- .getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 0));
+ public static final Block MINING_PIPE_TIP_BLOCK = GT_Utility.getBlockFromStack(
+ GT_ModHandler.getIC2Item("miningPipeTip", 0));
/** The owner machine pointer */
private final GT_IDrillingLogicDelegateOwner owner;
@@ -74,7 +74,8 @@ public class GT_DrillingLogicDelegate {
// Replace the tip onto pipe
if (te.getBlockOffset(0, tipDepth, 0) == MINING_PIPE_TIP_BLOCK) {
- te.getWorld().setBlock(xCoord, yCoord + tipDepth, zCoord, MINING_PIPE_BLOCK);
+ te.getWorld()
+ .setBlock(xCoord, yCoord + tipDepth, zCoord, MINING_PIPE_BLOCK);
}
// Get and decrease pipe from the machine
boolean pipeTaken = owner.pullInputs(MINING_PIPE_STACK.getItem(), 1, false);
@@ -91,7 +92,8 @@ public class GT_DrillingLogicDelegate {
}
// Descent the pipe tip
- te.getWorld().setBlock(xCoord, yCoord + tipDepth - 1, zCoord, MINING_PIPE_TIP_BLOCK);
+ te.getWorld()
+ .setBlock(xCoord, yCoord + tipDepth - 1, zCoord, MINING_PIPE_TIP_BLOCK);
tipDepth--;
return true;
}
@@ -140,16 +142,19 @@ public class GT_DrillingLogicDelegate {
int actualDrillY = yCoord + tipDepth;
// Move the pipe tip position
if (actualDrillY < yCoord - 1) {
- owner.getBaseMetaTileEntity().getWorld().setBlock(xCoord, actualDrillY + 1, zCoord, MINING_PIPE_TIP_BLOCK);
+ owner.getBaseMetaTileEntity()
+ .getWorld()
+ .setBlock(xCoord, actualDrillY + 1, zCoord, MINING_PIPE_TIP_BLOCK);
}
// Remove the old pipe tip
- aBaseMetaTileEntity.getWorld().setBlock(
- xCoord,
- actualDrillY,
- zCoord,
- Blocks.air,
- 0,
- /* send to client without neighbour updates */ 2);
+ aBaseMetaTileEntity.getWorld()
+ .setBlock(
+ xCoord,
+ actualDrillY,
+ zCoord,
+ Blocks.air,
+ 0,
+ /* send to client without neighbour updates */ 2);
// Return the pipe back to the machine (inputs allowed for this case!)
owner.pushOutputs(MINING_PIPE_STACK, 1, false, true);
@@ -177,19 +182,21 @@ public class GT_DrillingLogicDelegate {
}
short metaData = 0;
- TileEntity tTileEntity = owner.getBaseMetaTileEntity().getTileEntity(x, y, z);
+ TileEntity tTileEntity = owner.getBaseMetaTileEntity()
+ .getTileEntity(x, y, z);
if (tTileEntity instanceof GT_TileEntity_Ores) {
metaData = ((GT_TileEntity_Ores) tTileEntity).mMetaData;
}
ItemStack cobble = GT_Utility.getCobbleForOre(block, metaData);
- te.getWorld().setBlock(
- x,
- y,
- z,
- Block.getBlockFromItem(cobble.getItem()),
- cobble.getItemDamage(), /* cause updates(1) + send to client(2) */
- 3);
+ te.getWorld()
+ .setBlock(
+ x,
+ y,
+ z,
+ Block.getBlockFromItem(cobble.getItem()),
+ cobble.getItemDamage(), /* cause updates(1) + send to client(2) */
+ 3);
}
/**
@@ -231,18 +238,26 @@ public class GT_DrillingLogicDelegate {
}
public boolean canFakePlayerInteract(IGregTechTileEntity te, int xCoord, int yCoord, int zCoord) {
- return GT_Utility
- .setBlockByFakePlayer(getFakePlayer(te), xCoord, yCoord, zCoord, MINING_PIPE_TIP_BLOCK, 0, true);
+ return GT_Utility.setBlockByFakePlayer(
+ getFakePlayer(te),
+ xCoord,
+ yCoord,
+ zCoord,
+ MINING_PIPE_TIP_BLOCK,
+ 0,
+ true);
}
/** Get target block drops. We need to encapsulate everyting of mining in this class. */
private List<ItemStack> getBlockDrops(final Block oreBlock, int posX, int posY, int posZ) {
return oreBlock.getDrops(
- owner.getBaseMetaTileEntity().getWorld(),
+ owner.getBaseMetaTileEntity()
+ .getWorld(),
posX,
posY,
posZ,
- owner.getBaseMetaTileEntity().getMetaID(posX, posY, posZ),
+ owner.getBaseMetaTileEntity()
+ .getMetaID(posX, posY, posZ),
owner.getMachineTier());
}
diff --git a/src/main/java/gregtech/common/misc/spaceprojects/SpaceProjectManager.java b/src/main/java/gregtech/common/misc/spaceprojects/SpaceProjectManager.java
index 81c7fac375..db7b811a1d 100644
--- a/src/main/java/gregtech/common/misc/spaceprojects/SpaceProjectManager.java
+++ b/src/main/java/gregtech/common/misc/spaceprojects/SpaceProjectManager.java
@@ -103,11 +103,12 @@ public class SpaceProjectManager {
public static void putInTeam(UUID teamMember, UUID teamLeader) {
if (teamMember.equals(teamLeader)) {
spaceTeams.put(teamMember, teamLeader);
- } else if (!spaceTeams.get(teamLeader).equals(teamLeader)) {
- putInTeam(teamMember, spaceTeams.get(teamLeader));
- } else {
- spaceTeams.put(teamMember, teamLeader);
- }
+ } else if (!spaceTeams.get(teamLeader)
+ .equals(teamLeader)) {
+ putInTeam(teamMember, spaceTeams.get(teamLeader));
+ } else {
+ spaceTeams.put(teamMember, teamLeader);
+ }
SpaceProjectWorldSavedData.INSTANCE.markDirty();
}
@@ -264,14 +265,20 @@ public class SpaceProjectManager {
* Gets the UUID using the player's username
*/
public static UUID getPlayerUUIDFromName(String playerName) {
- return MinecraftServer.getServer().func_152358_ax().func_152655_a(playerName).getId();
+ return MinecraftServer.getServer()
+ .func_152358_ax()
+ .func_152655_a(playerName)
+ .getId();
}
/**
* Gets the player's name using their UUID
*/
public static String getPlayerNameFromUUID(UUID playerUUID) {
- return MinecraftServer.getServer().func_152358_ax().func_152652_a(playerUUID).getName();
+ return MinecraftServer.getServer()
+ .func_152358_ax()
+ .func_152652_a(playerUUID)
+ .getName();
}
// #endregion
diff --git a/src/main/java/gregtech/common/misc/spaceprojects/SpaceProjectWorldSavedData.java b/src/main/java/gregtech/common/misc/spaceprojects/SpaceProjectWorldSavedData.java
index 23a7b7bbb1..a70d1b5843 100644
--- a/src/main/java/gregtech/common/misc/spaceprojects/SpaceProjectWorldSavedData.java
+++ b/src/main/java/gregtech/common/misc/spaceprojects/SpaceProjectWorldSavedData.java
@@ -50,16 +50,34 @@ public class SpaceProjectWorldSavedData extends WorldSavedData {
public static SpaceProjectWorldSavedData INSTANCE;
- private static final Gson GSON_SPACE_PROJECT = new GsonBuilder().serializeNulls().enableComplexMapKeySerialization()
- .registerTypeAdapter(spaceTeamProjects.getClass(), new SpaceTeamProjectsMapAdapter())
- .registerTypeAdapter(Map.class, new SpaceTeamProjectsMapAdapter())
- .registerTypeAdapter(Pair.of((ISpaceBody) SolarSystem.Ariel, "").getClass(), new PairAdapter())
- .registerTypeAdapter(Pair.class, new PairAdapter())
- .registerTypeAdapter(ISpaceProject.class, new SpaceProjectAdapter())
- .registerTypeAdapter(ISP_Upgrade.class, new SP_UpgradeAdapter())
- .registerTypeHierarchyAdapter(ISpaceProject.class, new SpaceProjectAdapter())
- .registerTypeHierarchyAdapter(ISP_Upgrade.class, new SP_UpgradeAdapter()).create();
- private static final Gson GSON_TEAMS = new GsonBuilder().serializeNulls().create();
+ private static final Gson GSON_SPACE_PROJECT = new GsonBuilder().serializeNulls()
+ .enableComplexMapKeySerialization()
+ .registerTypeAdapter(
+ spaceTeamProjects.getClass(),
+ new SpaceTeamProjectsMapAdapter())
+ .registerTypeAdapter(
+ Map.class,
+ new SpaceTeamProjectsMapAdapter())
+ .registerTypeAdapter(
+ Pair.of((ISpaceBody) SolarSystem.Ariel, "")
+ .getClass(),
+ new PairAdapter())
+ .registerTypeAdapter(Pair.class, new PairAdapter())
+ .registerTypeAdapter(
+ ISpaceProject.class,
+ new SpaceProjectAdapter())
+ .registerTypeAdapter(
+ ISP_Upgrade.class,
+ new SP_UpgradeAdapter())
+ .registerTypeHierarchyAdapter(
+ ISpaceProject.class,
+ new SpaceProjectAdapter())
+ .registerTypeHierarchyAdapter(
+ ISP_Upgrade.class,
+ new SP_UpgradeAdapter())
+ .create();
+ private static final Gson GSON_TEAMS = new GsonBuilder().serializeNulls()
+ .create();
private static final String DATA_NAME = "GT_SpaceProjectData";
@@ -127,8 +145,14 @@ public class SpaceProjectWorldSavedData extends WorldSavedData {
} else {
spaceTeams = new HashMap<>();
}
- spaceTeamsFile = new File(aWorld.getSaveHandler().getWorldDirectory(), SPACE_TEAMS_JSON);
- teamProjectsFile = new File(aWorld.getSaveHandler().getWorldDirectory(), SPACE_TEAM_PROJECTS_JSON);
+ spaceTeamsFile = new File(
+ aWorld.getSaveHandler()
+ .getWorldDirectory(),
+ SPACE_TEAMS_JSON);
+ teamProjectsFile = new File(
+ aWorld.getSaveHandler()
+ .getWorldDirectory(),
+ SPACE_TEAM_PROJECTS_JSON);
MapStorage tStorage = aWorld.mapStorage;
INSTANCE = (SpaceProjectWorldSavedData) tStorage.loadData(SpaceProjectWorldSavedData.class, DATA_NAME);
if (INSTANCE == null) {
@@ -151,7 +175,10 @@ public class SpaceProjectWorldSavedData extends WorldSavedData {
@Override
public JsonElement serialize(Pair<ISpaceBody, String> src, Type typeOfSrc, JsonSerializationContext context) {
JsonObject pair = new JsonObject();
- pair.addProperty(PAIR_LEFT, src.getLeft().getName());
+ pair.addProperty(
+ PAIR_LEFT,
+ src.getLeft()
+ .getName());
pair.addProperty(PAIR_RIGHT, src.getRight());
return pair;
}
@@ -163,8 +190,11 @@ public class SpaceProjectWorldSavedData extends WorldSavedData {
if (json.isJsonObject()) {
JsonObject obj = json.getAsJsonObject();
pair = Pair.of(
- SpaceProjectManager.getLocation(obj.get(PAIR_LEFT).getAsString()),
- obj.get(PAIR_RIGHT).getAsString());
+ SpaceProjectManager.getLocation(
+ obj.get(PAIR_LEFT)
+ .getAsString()),
+ obj.get(PAIR_RIGHT)
+ .getAsString());
}
return pair;
}
@@ -177,7 +207,10 @@ public class SpaceProjectWorldSavedData extends WorldSavedData {
JsonObject obj = new JsonObject();
obj.addProperty(PROJECT_NAME, src.getProjectName());
obj.addProperty(PROJECT_CURRENT_STAGE, src.getCurrentStage());
- obj.addProperty(PROJECT_LOCATION, src.getProjectLocation().getName());
+ obj.addProperty(
+ PROJECT_LOCATION,
+ src.getProjectLocation()
+ .getName());
obj.add(PROJECT_CURRENT_UPGRADE, context.serialize(src.getUpgradeBeingBuilt()));
obj.add(PROJECT_UPGRADES_BUILT, context.serialize(src.getAllBuiltUpgrades()));
return obj;
@@ -190,15 +223,21 @@ public class SpaceProjectWorldSavedData extends WorldSavedData {
return null;
}
JsonObject obj = json.getAsJsonObject();
- String projectName = obj.get(PROJECT_NAME).getAsString();
+ String projectName = obj.get(PROJECT_NAME)
+ .getAsString();
ISpaceProject project = SpaceProjectManager.getProject(projectName);
- int projectCurrentStage = obj.get(PROJECT_CURRENT_STAGE).getAsInt();
+ int projectCurrentStage = obj.get(PROJECT_CURRENT_STAGE)
+ .getAsInt();
ISP_Upgrade[] projectUpgradesBuilt = new ISP_Upgrade[0];
- projectUpgradesBuilt = context
- .deserialize(obj.get(PROJECT_UPGRADES_BUILT), projectUpgradesBuilt.getClass());
- ISP_Upgrade projectCurrentUpgrade = context
- .deserialize(obj.get(PROJECT_CURRENT_UPGRADE), ISP_Upgrade.class);
- ISpaceBody projectLocation = SpaceProjectManager.getLocation(obj.get(PROJECT_LOCATION).getAsString());
+ projectUpgradesBuilt = context.deserialize(
+ obj.get(PROJECT_UPGRADES_BUILT),
+ projectUpgradesBuilt.getClass());
+ ISP_Upgrade projectCurrentUpgrade = context.deserialize(
+ obj.get(PROJECT_CURRENT_UPGRADE),
+ ISP_Upgrade.class);
+ ISpaceBody projectLocation = SpaceProjectManager.getLocation(
+ obj.get(PROJECT_LOCATION)
+ .getAsString());
project.setBuiltUpgrade(projectUpgradesBuilt);
project.setProjectLocation(projectLocation);
project.setProjectCurrentStage(projectCurrentStage);
@@ -213,7 +252,10 @@ public class SpaceProjectWorldSavedData extends WorldSavedData {
public JsonElement serialize(ISP_Upgrade src, Type typeOfSrc, JsonSerializationContext context) {
JsonObject obj = new JsonObject();
obj.addProperty(UPGRADE_NAME, src.getUpgradeName());
- obj.addProperty(UPGRADE_PROJECT_PARENT, src.getParentProject().getProjectName());
+ obj.addProperty(
+ UPGRADE_PROJECT_PARENT,
+ src.getParentProject()
+ .getProjectName());
obj.addProperty(UPGRADE_CURRENT_STAGE, src.getCurrentStage());
return obj;
}
@@ -225,14 +267,19 @@ public class SpaceProjectWorldSavedData extends WorldSavedData {
return null;
}
JsonObject obj = json.getAsJsonObject();
- String projectName = obj.get(UPGRADE_PROJECT_PARENT).getAsString();
+ String projectName = obj.get(UPGRADE_PROJECT_PARENT)
+ .getAsString();
ISpaceProject project = SpaceProjectManager.getProject(projectName);
- ISP_Upgrade upgrade = project.getUpgrade(obj.get(UPGRADE_NAME).getAsString());
+ ISP_Upgrade upgrade = project.getUpgrade(
+ obj.get(UPGRADE_NAME)
+ .getAsString());
if (upgrade == null) {
return null;
}
upgrade = upgrade.copy();
- upgrade.setUpgradeCurrentStage(obj.get(UPGRADE_CURRENT_STAGE).getAsInt());
+ upgrade.setUpgradeCurrentStage(
+ obj.get(UPGRADE_CURRENT_STAGE)
+ .getAsInt());
return upgrade;
}
}
@@ -249,7 +296,8 @@ public class SpaceProjectWorldSavedData extends WorldSavedData {
JsonObject teamMap = new JsonObject();
teamMap.add(MAP_UUID, context.serialize(firstEntry.getKey()));
JsonArray teamProjectMap = new JsonArray();
- for (Entry<Pair<ISpaceBody, String>, ISpaceProject> secondEntry : firstEntry.getValue().entrySet()) {
+ for (Entry<Pair<ISpaceBody, String>, ISpaceProject> secondEntry : firstEntry.getValue()
+ .entrySet()) {
JsonObject projectMap = new JsonObject();
projectMap.add(MAP_PAIR, context.serialize(secondEntry.getKey()));
projectMap.add(MAP_PROJECT, context.serialize(secondEntry.getValue()));
@@ -270,7 +318,8 @@ public class SpaceProjectWorldSavedData extends WorldSavedData {
JsonObject teamMap = teamMapElement.getAsJsonObject();
UUID uuid = context.deserialize(teamMap.get(MAP_UUID), UUID.class);
Map<Pair<ISpaceBody, String>, ISpaceProject> projectMap = new HashMap<>();
- for (JsonElement teamProjectMapElement : teamMap.get(MAP_MAP).getAsJsonArray()) {
+ for (JsonElement teamProjectMapElement : teamMap.get(MAP_MAP)
+ .getAsJsonArray()) {
JsonObject teamProjectMap = teamProjectMapElement.getAsJsonObject();
Pair<ISpaceBody, String> pair = context.deserialize(teamProjectMap.get(MAP_PAIR), Pair.class);
ISpaceProject project = context.deserialize(teamProjectMap.get(MAP_PROJECT), ISpaceProject.class);
diff --git a/src/main/java/gregtech/common/misc/spaceprojects/base/SP_Upgrade.java b/src/main/java/gregtech/common/misc/spaceprojects/base/SP_Upgrade.java
index 18540c429a..a4b8d5aa5b 100644
--- a/src/main/java/gregtech/common/misc/spaceprojects/base/SP_Upgrade.java
+++ b/src/main/java/gregtech/common/misc/spaceprojects/base/SP_Upgrade.java
@@ -294,14 +294,21 @@ public class SP_Upgrade implements ISP_Upgrade {
return true;
}
- if (requirements.getBodyType() != null && !requirements.getBodyType().equals(SpaceBodyType.NONE)) {
- if (!requirements.getBodyType().equals(projectBelongingTo.getProjectLocation().getType())) {
+ if (requirements.getBodyType() != null && !requirements.getBodyType()
+ .equals(SpaceBodyType.NONE)) {
+ if (!requirements.getBodyType()
+ .equals(
+ projectBelongingTo.getProjectLocation()
+ .getType())) {
return false;
}
}
if (requirements.getStarType() != null) {
- if (!requirements.getStarType().equals(projectBelongingTo.getProjectLocation().getStarType())) {
+ if (!requirements.getStarType()
+ .equals(
+ projectBelongingTo.getProjectLocation()
+ .getStarType())) {
return false;
}
}
@@ -327,9 +334,14 @@ public class SP_Upgrade implements ISP_Upgrade {
@Override
public SP_Upgrade copy() {
- SP_Upgrade copy = new SP_Upgrade().setUpgradeName(name).setUpgradeUnlocalizedName(unlocalizedName)
- .setUpgradeBuildTime(buildTime).setUpgradeFluidsCost(fluidsCost).setUpgradeItemsCost(itemsCost)
- .setUpgradeRequirements(requirements).setUpgradeTotalStages(totalStages).setUpgradeVoltage(voltage);
+ SP_Upgrade copy = new SP_Upgrade().setUpgradeName(name)
+ .setUpgradeUnlocalizedName(unlocalizedName)
+ .setUpgradeBuildTime(buildTime)
+ .setUpgradeFluidsCost(fluidsCost)
+ .setUpgradeItemsCost(itemsCost)
+ .setUpgradeRequirements(requirements)
+ .setUpgradeTotalStages(totalStages)
+ .setUpgradeVoltage(voltage);
return copy;
}
diff --git a/src/main/java/gregtech/common/misc/spaceprojects/base/SpaceProject.java b/src/main/java/gregtech/common/misc/spaceprojects/base/SpaceProject.java
index 0095ece5b1..dfbcf96dc6 100644
--- a/src/main/java/gregtech/common/misc/spaceprojects/base/SpaceProject.java
+++ b/src/main/java/gregtech/common/misc/spaceprojects/base/SpaceProject.java
@@ -368,10 +368,15 @@ public class SpaceProject implements ISpaceProject {
@Override
public ISpaceProject copy() {
- SpaceProject copy = new SpaceProject().setProjectName(name).setProjectUnlocalizedName(unlocalizedName)
- .setProjectVoltage(voltage).setProjectBuildTime(buildTime).setProjectItemsCost(itemsCost)
- .setProjectFluidsCost(fluidsCost).setProjectStages(totalStage).setProjectTexture(texture)
- .setProjectRequirements(requirements);
+ SpaceProject copy = new SpaceProject().setProjectName(name)
+ .setProjectUnlocalizedName(unlocalizedName)
+ .setProjectVoltage(voltage)
+ .setProjectBuildTime(buildTime)
+ .setProjectItemsCost(itemsCost)
+ .setProjectFluidsCost(fluidsCost)
+ .setProjectStages(totalStage)
+ .setProjectTexture(texture)
+ .setProjectRequirements(requirements);
if (upgradesAvailable != null) {
ISP_Upgrade[] upgrades = new SP_Upgrade[upgradesAvailable.size()];
int index = 0;
@@ -400,13 +405,15 @@ public class SpaceProject implements ISpaceProject {
}
if (requirements.getBodyType() != null && checkLocation) {
- if (!requirements.getBodyType().equals(location.getType())) {
+ if (!requirements.getBodyType()
+ .equals(location.getType())) {
return false;
}
}
if (requirements.getStarType() != null && checkLocation) {
- if (!requirements.getStarType().equals(location.getStarType())) {
+ if (!requirements.getStarType()
+ .equals(location.getStarType())) {
return false;
}
}
diff --git a/src/main/java/gregtech/common/misc/spaceprojects/commands/SPM_Command.java b/src/main/java/gregtech/common/misc/spaceprojects/commands/SPM_Command.java
index 8a54c40e70..6bd2561d68 100644
--- a/src/main/java/gregtech/common/misc/spaceprojects/commands/SPM_Command.java
+++ b/src/main/java/gregtech/common/misc/spaceprojects/commands/SPM_Command.java
@@ -152,20 +152,25 @@ public class SPM_Command extends CommandBase {
break;
}
String finalFilter = filter;
- return autoComplete.stream().filter(s -> finalFilter.isEmpty() || s.startsWith(finalFilter))
- .collect(Collectors.toList());
+ return autoComplete.stream()
+ .filter(s -> finalFilter.isEmpty() || s.startsWith(finalFilter))
+ .collect(Collectors.toList());
}
private String[] getPlayers() {
- return MinecraftServer.getServer().getAllUsernames();
+ return MinecraftServer.getServer()
+ .getAllUsernames();
}
private String[] getLocations() {
- return SpaceProjectManager.getLocationNames().toArray(new String[0]);
+ return SpaceProjectManager.getLocationNames()
+ .toArray(new String[0]);
}
private String[] getProjects() {
- return SpaceProjectManager.getProjectsMap().keySet().toArray(new String[0]);
+ return SpaceProjectManager.getProjectsMap()
+ .keySet()
+ .toArray(new String[0]);
}
private String[] getSubCommands() {
@@ -204,7 +209,8 @@ public class SPM_Command extends CommandBase {
UUID tID = SpaceProjectManager.getPlayerUUIDFromName(playerName);
switch (argument) {
case ALL:
- for (String project : SpaceProjectManager.getProjectsMap().keySet()) {
+ for (String project : SpaceProjectManager.getProjectsMap()
+ .keySet()) {
sender.addChatMessage(new ChatComponentText(project));
}
break;
diff --git a/src/main/java/gregtech/common/misc/spaceprojects/commands/SP_Command.java b/src/main/java/gregtech/common/misc/spaceprojects/commands/SP_Command.java
index ba673640c2..8ef301b6ba 100644
--- a/src/main/java/gregtech/common/misc/spaceprojects/commands/SP_Command.java
+++ b/src/main/java/gregtech/common/misc/spaceprojects/commands/SP_Command.java
@@ -19,8 +19,8 @@ import gregtech.common.misc.spaceprojects.SpaceProjectManager;
*/
public class SP_Command extends CommandBase {
- private static Set<Pair<EntityPlayerMP, EntityPlayerMP>> invite = Collections
- .newSetFromMap(new WeakHashMap<Pair<EntityPlayerMP, EntityPlayerMP>, Boolean>());
+ private static Set<Pair<EntityPlayerMP, EntityPlayerMP>> invite = Collections.newSetFromMap(
+ new WeakHashMap<Pair<EntityPlayerMP, EntityPlayerMP>, Boolean>());
private static Set<EntityPlayerMP> confirm = Collections.newSetFromMap(new WeakHashMap<EntityPlayerMP, Boolean>());
private static final String INVITE = "invite";
diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Randomizer.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Randomizer.java
index a8421d089b..cac5263454 100644
--- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Randomizer.java
+++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Randomizer.java
@@ -46,8 +46,9 @@ public class GT_Circuit_Randomizer extends GT_CircuitryBehavior {
}
if (aCircuitData[4] >= aCircuitData[0]) {
aCircuitData[4] = 0;
- aRedstoneCircuitBlock
- .setRedstone((byte) aRedstoneCircuitBlock.getRandom(16), aRedstoneCircuitBlock.getOutputFacing());
+ aRedstoneCircuitBlock.setRedstone(
+ (byte) aRedstoneCircuitBlock.getRandom(16),
+ aRedstoneCircuitBlock.getOutputFacing());
}
}
diff --git a/src/main/java/gregtech/common/render/GT_CapeRenderer.java b/src/main/java/gregtech/common/render/GT_CapeRenderer.java
index 274a914b67..6254a9df79 100644
--- a/src/main/java/gregtech/common/render/GT_CapeRenderer.java
+++ b/src/main/java/gregtech/common/render/GT_CapeRenderer.java
@@ -50,34 +50,51 @@ public class GT_CapeRenderer extends RenderPlayer {
}
try {
ResourceLocation tResource = aPlayer.getLocationCape();
- if (aPlayer.getDisplayName().equalsIgnoreCase("Friedi4321")) {
+ if (aPlayer.getDisplayName()
+ .equalsIgnoreCase("Friedi4321")) {
tResource = this.mCapes[0];
}
- if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase())) {
+ if (this.mCapeList.contains(
+ aPlayer.getDisplayName()
+ .toLowerCase())) {
tResource = this.mCapes[1];
}
- if (aPlayer.getDisplayName().equalsIgnoreCase("Mr_Brain")) {
+ if (aPlayer.getDisplayName()
+ .equalsIgnoreCase("Mr_Brain")) {
tResource = this.mCapes[2];
}
- if (aPlayer.getDisplayName().equalsIgnoreCase("GregoriusT")) {
+ if (aPlayer.getDisplayName()
+ .equalsIgnoreCase("GregoriusT")) {
tResource = this.mCapes[3];
}
- if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase() + ":capedonor")) {
+ if (this.mCapeList.contains(
+ aPlayer.getDisplayName()
+ .toLowerCase() + ":capedonor")) {
tResource = this.mCapes[4];
}
- if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase() + ":capedev")) {
+ if (this.mCapeList.contains(
+ aPlayer.getDisplayName()
+ .toLowerCase() + ":capedev")) {
tResource = this.mCapes[5];
}
- if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase() + ":cape_steam")) {
+ if (this.mCapeList.contains(
+ aPlayer.getDisplayName()
+ .toLowerCase() + ":cape_steam")) {
tResource = this.mCapes[6];
}
- if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase() + ":cape_titanium")) {
+ if (this.mCapeList.contains(
+ aPlayer.getDisplayName()
+ .toLowerCase() + ":cape_titanium")) {
tResource = this.mCapes[7];
}
- if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase() + ":cape_neutronium")) {
+ if (this.mCapeList.contains(
+ aPlayer.getDisplayName()
+ .toLowerCase() + ":cape_neutronium")) {
tResource = this.mCapes[8];
}
- if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase() + ":cape_stargate")) {
+ if (this.mCapeList.contains(
+ aPlayer.getDisplayName()
+ .toLowerCase() + ":cape_stargate")) {
tResource = this.mCapes[9];
}
diff --git a/src/main/java/gregtech/common/render/GT_CopiedBlockTexture.java b/src/main/java/gregtech/common/render/GT_CopiedBlockTexture.java
index f0df8277ee..fe9f378047 100644
--- a/src/main/java/gregtech/common/render/GT_CopiedBlockTexture.java
+++ b/src/main/java/gregtech/common/render/GT_CopiedBlockTexture.java
@@ -37,7 +37,7 @@ public class GT_CopiedBlockTexture extends GT_TextureBase implements ITexture, I
aRenderer.field_152631_f = true;
startDrawingQuads(aRenderer, 1.0f, 0.0f, 0.0f);
new LightingHelper(aRenderer).setupLightingXPos(aBlock, aX, aY, aZ)
- .setupColor(ForgeDirection.EAST.ordinal(), 0xffffff);
+ .setupColor(ForgeDirection.EAST.ordinal(), 0xffffff);
aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, aIcon);
draw(aRenderer);
aRenderer.field_152631_f = false;
@@ -48,7 +48,7 @@ public class GT_CopiedBlockTexture extends GT_TextureBase implements ITexture, I
startDrawingQuads(aRenderer, -1.0f, 0.0f, 0.0f);
final IIcon aIcon = getIcon(ForgeDirection.WEST.ordinal());
new LightingHelper(aRenderer).setupLightingXNeg(aBlock, aX, aY, aZ)
- .setupColor(ForgeDirection.WEST.ordinal(), 0xffffff);
+ .setupColor(ForgeDirection.WEST.ordinal(), 0xffffff);
aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, aIcon);
draw(aRenderer);
}
@@ -58,7 +58,7 @@ public class GT_CopiedBlockTexture extends GT_TextureBase implements ITexture, I
startDrawingQuads(aRenderer, 0.0f, 1.0f, 0.0f);
final IIcon aIcon = getIcon(ForgeDirection.UP.ordinal());
new LightingHelper(aRenderer).setupLightingYPos(aBlock, aX, aY, aZ)
- .setupColor(ForgeDirection.UP.ordinal(), 0xffffff);
+ .setupColor(ForgeDirection.UP.ordinal(), 0xffffff);
aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, aIcon);
draw(aRenderer);
}
@@ -68,7 +68,7 @@ public class GT_CopiedBlockTexture extends GT_TextureBase implements ITexture, I
startDrawingQuads(aRenderer, 0.0f, -1.0f, 0.0f);
final IIcon aIcon = getIcon(ForgeDirection.DOWN.ordinal());
new LightingHelper(aRenderer).setupLightingYNeg(aBlock, aX, aY, aZ)
- .setupColor(ForgeDirection.DOWN.ordinal(), 0xffffff);
+ .setupColor(ForgeDirection.DOWN.ordinal(), 0xffffff);
aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, aIcon);
draw(aRenderer);
}
@@ -78,7 +78,7 @@ public class GT_CopiedBlockTexture extends GT_TextureBase implements ITexture, I
startDrawingQuads(aRenderer, 0.0f, 0.0f, 1.0f);
final IIcon aIcon = getIcon(ForgeDirection.SOUTH.ordinal());
new LightingHelper(aRenderer).setupLightingZPos(aBlock, aX, aY, aZ)
- .setupColor(ForgeDirection.SOUTH.ordinal(), 0xffffff);
+ .setupColor(ForgeDirection.SOUTH.ordinal(), 0xffffff);
aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, aIcon);
draw(aRenderer);
}
@@ -89,7 +89,7 @@ public class GT_CopiedBlockTexture extends GT_TextureBase implements ITexture, I
final IIcon aIcon = getIcon(ForgeDirection.NORTH.ordinal());
aRenderer.field_152631_f = true;
new LightingHelper(aRenderer).setupLightingZNeg(aBlock, aX, aY, aZ)
- .setupColor(ForgeDirection.NORTH.ordinal(), 0xffffff);
+ .setupColor(ForgeDirection.NORTH.ordinal(), 0xffffff);
aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, aIcon);
draw(aRenderer);
aRenderer.field_152631_f = false;
diff --git a/src/main/java/gregtech/common/render/GT_CopiedCTMBlockTexture.java b/src/main/java/gregtech/common/render/GT_CopiedCTMBlockTexture.java
index c96c57398d..90caaf85cd 100644
--- a/src/main/java/gregtech/common/render/GT_CopiedCTMBlockTexture.java
+++ b/src/main/java/gregtech/common/render/GT_CopiedCTMBlockTexture.java
@@ -42,9 +42,10 @@ class GT_CopiedCTMBlockTexture extends GT_TextureBase implements ITexture, IBloc
final IIcon aIcon = getIcon(ForgeDirection.EAST.ordinal(), aX, aY, aZ, aRenderer);
aRenderer.field_152631_f = true;
startDrawingQuads(aRenderer, 1.0f, 0.0f, 0.0f);
- new LightingHelper(aRenderer).setupLightingXPos(aBlock, aX, aY, aZ).setupColor(
- ForgeDirection.EAST.ordinal(),
- mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ));
+ new LightingHelper(aRenderer).setupLightingXPos(aBlock, aX, aY, aZ)
+ .setupColor(
+ ForgeDirection.EAST.ordinal(),
+ mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ));
aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, aIcon);
draw(aRenderer);
aRenderer.field_152631_f = false;
@@ -54,9 +55,10 @@ class GT_CopiedCTMBlockTexture extends GT_TextureBase implements ITexture, IBloc
public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
startDrawingQuads(aRenderer, -1.0f, 0.0f, 0.0f);
final IIcon aIcon = getIcon(ForgeDirection.WEST.ordinal(), aX, aY, aZ, aRenderer);
- new LightingHelper(aRenderer).setupLightingXNeg(aBlock, aX, aY, aZ).setupColor(
- ForgeDirection.WEST.ordinal(),
- mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ));
+ new LightingHelper(aRenderer).setupLightingXNeg(aBlock, aX, aY, aZ)
+ .setupColor(
+ ForgeDirection.WEST.ordinal(),
+ mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ));
aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, aIcon);
draw(aRenderer);
}
@@ -66,7 +68,9 @@ class GT_CopiedCTMBlockTexture extends GT_TextureBase implements ITexture, IBloc
startDrawingQuads(aRenderer, 0.0f, 1.0f, 0.0f);
final IIcon aIcon = getIcon(ForgeDirection.UP.ordinal(), aX, aY, aZ, aRenderer);
new LightingHelper(aRenderer).setupLightingYPos(aBlock, aX, aY, aZ)
- .setupColor(ForgeDirection.UP.ordinal(), mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ));
+ .setupColor(
+ ForgeDirection.UP.ordinal(),
+ mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ));
aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, aIcon);
draw(aRenderer);
}
@@ -75,9 +79,10 @@ class GT_CopiedCTMBlockTexture extends GT_TextureBase implements ITexture, IBloc
public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
startDrawingQuads(aRenderer, 0.0f, -1.0f, 0.0f);
final IIcon aIcon = getIcon(ForgeDirection.DOWN.ordinal(), aX, aY, aZ, aRenderer);
- new LightingHelper(aRenderer).setupLightingYNeg(aBlock, aX, aY, aZ).setupColor(
- ForgeDirection.DOWN.ordinal(),
- mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ));
+ new LightingHelper(aRenderer).setupLightingYNeg(aBlock, aX, aY, aZ)
+ .setupColor(
+ ForgeDirection.DOWN.ordinal(),
+ mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ));
aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, aIcon);
draw(aRenderer);
}
@@ -86,9 +91,10 @@ class GT_CopiedCTMBlockTexture extends GT_TextureBase implements ITexture, IBloc
public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) {
startDrawingQuads(aRenderer, 0.0f, 0.0f, 1.0f);
final IIcon aIcon = getIcon(ForgeDirection.SOUTH.ordinal(), aX, aY, aZ, aRenderer);
- new LightingHelper(aRenderer).setupLightingZPos(aBlock, aX, aY, aZ).setupColor(
- ForgeDirection.SOUTH.ordinal(),
- mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ));
+ new LightingHelper(aRenderer).setupLightingZPos(aBlock, aX, aY, aZ)
+ .setupColor(
+ ForgeDirection.SOUTH.ordinal(),
+ mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ));
aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, aIcon);
draw(aRenderer);
}
@@ -98,9 +104,10 @@ class GT_CopiedCTMBlockTexture extends GT_TextureBase implements ITexture, IBloc
startDrawingQuads(aRenderer, 0.0f, 0.0f, -1.0f);
final IIcon aIcon = getIcon(ForgeDirection.NORTH.ordinal(), aX, aY, aZ, aRenderer);
aRenderer.field_152631_f = true;
- new LightingHelper(aRenderer).setupLightingZNeg(aBlock, aX, aY, aZ).setupColor(
- ForgeDirection.NORTH.ordinal(),
- mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ));
+ new LightingHelper(aRenderer).setupLightingZNeg(aBlock, aX, aY, aZ)
+ .setupColor(
+ ForgeDirection.NORTH.ordinal(),
+ mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ));
aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, aIcon);
draw(aRenderer);
aRenderer.field_152631_f = false;
diff --git a/src/main/java/gregtech/common/render/GT_FlaskRenderer.java b/src/main/java/gregtech/common/render/GT_FlaskRenderer.java
index 3523b0f4b6..bf29fe0528 100644
--- a/src/main/java/gregtech/common/render/GT_FlaskRenderer.java
+++ b/src/main/java/gregtech/common/render/GT_FlaskRenderer.java
@@ -56,8 +56,10 @@ public final class GT_FlaskRenderer implements IItemRenderer {
FluidStack fs = cell.getFluid(item);
if (fs != null) {
IIcon iconWindow = cell.iconWindow;
- IIcon fluidicon = fs.getFluid().getIcon(fs);
- int fluidColor = fs.getFluid().getColor(fs);
+ IIcon fluidicon = fs.getFluid()
+ .getIcon(fs);
+ int fluidColor = fs.getFluid()
+ .getColor(fs);
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture);
GL11.glBlendFunc(GL11.GL_ZERO, GL11.GL_ONE);
if (type.equals(ItemRenderType.INVENTORY)) {
diff --git a/src/main/java/gregtech/common/render/GT_FluidDisplayStackRenderer.java b/src/main/java/gregtech/common/render/GT_FluidDisplayStackRenderer.java
index 43865c9bdb..9d8d2afe70 100644
--- a/src/main/java/gregtech/common/render/GT_FluidDisplayStackRenderer.java
+++ b/src/main/java/gregtech/common/render/GT_FluidDisplayStackRenderer.java
@@ -48,7 +48,8 @@ public class GT_FluidDisplayStackRenderer implements IItemRenderer {
Materials associatedFluidMaterial = Materials.get(item.stackTagCompound.getString("mFluidMaterialName"));
if (associatedFluidMaterial.renderer == null
|| !associatedFluidMaterial.renderer.renderFluidDisplayItem(type, item, data)) {
- IIcon icon = item.getItem().getIconFromDamage(item.getItemDamage());
+ IIcon icon = item.getItem()
+ .getIconFromDamage(item.getItemDamage());
Tessellator tess = Tessellator.instance;
tess.startDrawingQuads();
// draw a simple rectangle for the inventory icon
@@ -70,8 +71,10 @@ public class GT_FluidDisplayStackRenderer implements IItemRenderer {
}
// Render Fluid amount text
- long fluidAmount = item.getTagCompound().getLong("mFluidDisplayAmount");
- if (fluidAmount > 0L && !item.getTagCompound().getBoolean("mHideStackSize")) {
+ long fluidAmount = item.getTagCompound()
+ .getLong("mFluidDisplayAmount");
+ if (fluidAmount > 0L && !item.getTagCompound()
+ .getBoolean("mHideStackSize")) {
String amountString;
if (fluidAmount < 10_000) {
diff --git a/src/main/java/gregtech/common/render/GT_MetaGenerated_Tool_Renderer.java b/src/main/java/gregtech/common/render/GT_MetaGenerated_Tool_Renderer.java
index b03b7d2f2d..12dcec1291 100644
--- a/src/main/java/gregtech/common/render/GT_MetaGenerated_Tool_Renderer.java
+++ b/src/main/java/gregtech/common/render/GT_MetaGenerated_Tool_Renderer.java
@@ -160,8 +160,9 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer {
} else if (tDamage >= tMaxDamage) {
aIcon = gregtech.api.enums.Textures.ItemIcons.DURABILITY_BAR[0];
} else {
- aIcon = gregtech.api.enums.Textures.ItemIcons.DURABILITY_BAR[((int) java.lang.Math
- .max(0L, java.lang.Math.min(7L, (tMaxDamage - tDamage) * 8L / tMaxDamage)))];
+ aIcon = gregtech.api.enums.Textures.ItemIcons.DURABILITY_BAR[((int) java.lang.Math.max(
+ 0L,
+ java.lang.Math.min(7L, (tMaxDamage - tDamage) * 8L / tMaxDamage)))];
}
if (aIcon != null) {
IIcon tIcon = aIcon.getIcon();
@@ -209,8 +210,9 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer {
} else if (tCharge >= tStats[0]) {
aIcon = gregtech.api.enums.Textures.ItemIcons.ENERGY_BAR[8];
} else {
- aIcon = gregtech.api.enums.Textures.ItemIcons.ENERGY_BAR[(7 - (int) java.lang.Math
- .max(0L, java.lang.Math.min(6L, (tStats[0] - tCharge) * 7L / tStats[0])))];
+ aIcon = gregtech.api.enums.Textures.ItemIcons.ENERGY_BAR[(7 - (int) java.lang.Math.max(
+ 0L,
+ java.lang.Math.min(6L, (tStats[0] - tCharge) * 7L / tStats[0])))];
}
} else {
aIcon = null;
diff --git a/src/main/java/gregtech/common/render/GT_PollutionRenderer.java b/src/main/java/gregtech/common/render/GT_PollutionRenderer.java
index ea8d5d1310..e98d90c659 100644
--- a/src/main/java/gregtech/common/render/GT_PollutionRenderer.java
+++ b/src/main/java/gregtech/common/render/GT_PollutionRenderer.java
@@ -57,7 +57,9 @@ public class GT_PollutionRenderer {
public void preLoad() {
net.minecraftforge.common.MinecraftForge.EVENT_BUS.register(this);
- FMLCommonHandler.instance().bus().register(this);
+ FMLCommonHandler.instance()
+ .bus()
+ .register(this);
}
public void processPacket(ChunkCoordIntPair chunk, int pollution) {
diff --git a/src/main/java/gregtech/common/render/GT_RenderedTexture.java b/src/main/java/gregtech/common/render/GT_RenderedTexture.java
index 5346a101d1..a4c19c79d3 100644
--- a/src/main/java/gregtech/common/render/GT_RenderedTexture.java
+++ b/src/main/java/gregtech/common/render/GT_RenderedTexture.java
@@ -63,7 +63,8 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol
lighting.setLightnessOverride(1.0F);
if (enableAO) lighting.setBrightnessOverride(MAX_BRIGHTNESS);
}
- lighting.setupLightingXPos(aBlock, aX, aY, aZ).setupColor(ForgeDirection.EAST.ordinal(), mRGBa);
+ lighting.setupLightingXPos(aBlock, aX, aY, aZ)
+ .setupColor(ForgeDirection.EAST.ordinal(), mRGBa);
final ExtendedFacing rotation = getExtendedFacing(aX, aY, aZ);
renderFaceXPos(aRenderer, aX, aY, aZ, mIconContainer.getIcon(), rotation);
if (mIconContainer.getOverlayIcon() != null) {
@@ -88,7 +89,8 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol
lighting.setLightnessOverride(1.0F);
lighting.setBrightnessOverride(MAX_BRIGHTNESS);
}
- lighting.setupLightingXNeg(aBlock, aX, aY, aZ).setupColor(ForgeDirection.WEST.ordinal(), mRGBa);
+ lighting.setupLightingXNeg(aBlock, aX, aY, aZ)
+ .setupColor(ForgeDirection.WEST.ordinal(), mRGBa);
final ExtendedFacing rotation = getExtendedFacing(aX, aY, aZ);
renderFaceXNeg(aRenderer, aX, aY, aZ, mIconContainer.getIcon(), rotation);
if (mIconContainer.getOverlayIcon() != null) {
@@ -113,7 +115,8 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol
lighting.setLightnessOverride(1.0F);
lighting.setBrightnessOverride(MAX_BRIGHTNESS);
}
- lighting.setupLightingYPos(aBlock, aX, aY, aZ).setupColor(ForgeDirection.UP.ordinal(), mRGBa);
+ lighting.setupLightingYPos(aBlock, aX, aY, aZ)
+ .setupColor(ForgeDirection.UP.ordinal(), mRGBa);
final ExtendedFacing rotation = getExtendedFacing(aX, aY, aZ);
renderFaceYPos(aRenderer, aX, aY, aZ, mIconContainer.getIcon(), rotation);
if (mIconContainer.getOverlayIcon() != null) {
@@ -138,7 +141,8 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol
lighting.setLightnessOverride(1.0F);
lighting.setBrightnessOverride(MAX_BRIGHTNESS);
}
- lighting.setupLightingYNeg(aBlock, aX, aY, aZ).setupColor(ForgeDirection.DOWN.ordinal(), mRGBa);
+ lighting.setupLightingYNeg(aBlock, aX, aY, aZ)
+ .setupColor(ForgeDirection.DOWN.ordinal(), mRGBa);
final ExtendedFacing rotation = getExtendedFacing(aX, aY, aZ);
renderFaceYNeg(aRenderer, aX, aY, aZ, mIconContainer.getIcon(), rotation);
if (mIconContainer.getOverlayIcon() != null) {
@@ -163,7 +167,8 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol
lighting.setLightnessOverride(1.0F);
lighting.setBrightnessOverride(MAX_BRIGHTNESS);
}
- lighting.setupLightingZPos(aBlock, aX, aY, aZ).setupColor(ForgeDirection.SOUTH.ordinal(), mRGBa);
+ lighting.setupLightingZPos(aBlock, aX, aY, aZ)
+ .setupColor(ForgeDirection.SOUTH.ordinal(), mRGBa);
final ExtendedFacing rotation = getExtendedFacing(aX, aY, aZ);
renderFaceZPos(aRenderer, aX, aY, aZ, mIconContainer.getIcon(), rotation);
if (mIconContainer.getOverlayIcon() != null) {
@@ -188,7 +193,8 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol
lighting.setLightnessOverride(1.0F);
lighting.setBrightnessOverride(MAX_BRIGHTNESS);
}
- lighting.setupLightingZNeg(aBlock, aX, aY, aZ).setupColor(ForgeDirection.NORTH.ordinal(), mRGBa);
+ lighting.setupLightingZNeg(aBlock, aX, aY, aZ)
+ .setupColor(ForgeDirection.NORTH.ordinal(), mRGBa);
final ExtendedFacing rotation = getExtendedFacing(aX, aY, aZ);
renderFaceZNeg(aRenderer, aX, aY, aZ, mIconContainer.getIcon(), rotation);
if (mIconContainer.getOverlayIcon() != null) {
@@ -427,7 +433,10 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol
if (meta instanceof IAlignmentProvider) {
alignment = ((IAlignmentProvider) meta).getAlignment();
} else if (meta != null) {
- return ExtendedFacing.of(ForgeDirection.getOrientation(meta.getBaseMetaTileEntity().getFrontFacing()));
+ return ExtendedFacing.of(
+ ForgeDirection.getOrientation(
+ meta.getBaseMetaTileEntity()
+ .getFrontFacing()));
}
} else if (te instanceof IAlignmentProvider) {
alignment = ((IAlignmentProvider) te).getAlignment();
diff --git a/src/main/java/gregtech/common/render/GT_Renderer_Block.java b/src/main/java/gregtech/common/render/GT_Renderer_Block.java
index 454982b48c..f17618829b 100644
--- a/src/main/java/gregtech/common/render/GT_Renderer_Block.java
+++ b/src/main/java/gregtech/common/render/GT_Renderer_Block.java
@@ -507,7 +507,9 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler {
0.0,
block,
block.getDamageValue(world, x, y, z),
- side)).applyColourMultiplier(x, y, z).multiplyVelocity(0.2F).multipleParticleScaleBy(0.6F));
+ side)).applyColourMultiplier(x, y, z)
+ .multiplyVelocity(0.2F)
+ .multipleParticleScaleBy(0.6F));
}
@SideOnly(Side.CLIENT)
@@ -900,8 +902,8 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler {
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) return;
for (ITexture iTexture : aIcon) {
@@ -915,8 +917,8 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler {
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) return;
for (ITexture iTexture : aIcon) {
@@ -930,8 +932,8 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler {
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));
}
if (aIcon == null) return;
for (ITexture iTexture : aIcon) {
@@ -945,8 +947,8 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler {
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) return;
for (ITexture iTexture : aIcon) {
@@ -960,8 +962,8 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler {
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) return;
for (ITexture iTexture : aIcon) {
@@ -975,8 +977,8 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler {
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));
}
if (aIcon == null) return;
for (ITexture iTexture : aIcon) {
@@ -1002,11 +1004,18 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler {
} else {
final boolean[] tSides = new boolean[6];
if (tRenderer instanceof IRenderedBlockSideCheck) {
- for (byte tSide : ALL_VALID_SIDES) rReturn |= (tSides[tSide] = ((IRenderedBlockSideCheck) tRenderer)
- .renderFullBlockSide(aBlock, aRenderer, tSide));
+ for (byte tSide : ALL_VALID_SIDES)
+ rReturn |= (tSides[tSide] = ((IRenderedBlockSideCheck) tRenderer).renderFullBlockSide(
+ aBlock,
+ aRenderer,
+ tSide));
} else {
- for (byte tSide : ALL_VALID_SIDES) rReturn |= (tSides[tSide] = aBlock
- .shouldSideBeRendered(aWorld, aX + OFFX[tSide], aY + OFFY[tSide], aZ + OFFZ[tSide], tSide));
+ for (byte tSide : ALL_VALID_SIDES) rReturn |= (tSides[tSide] = aBlock.shouldSideBeRendered(
+ aWorld,
+ aX + OFFX[tSide],
+ aY + OFFY[tSide],
+ aZ + OFFZ[tSide],
+ tSide));
}
for (int i = 0, j = tRenderer.getRenderPasses(aBlock); i < j; i++) {
if (tRenderer.usesRenderPass(i)) {
diff --git a/src/main/java/gregtech/common/render/GT_TextureBuilder.java b/src/main/java/gregtech/common/render/GT_TextureBuilder.java
index d3941bea24..1cb613b32e 100644
--- a/src/main/java/gregtech/common/render/GT_TextureBuilder.java
+++ b/src/main/java/gregtech/common/render/GT_TextureBuilder.java
@@ -137,8 +137,10 @@ public class GT_TextureBuilder implements ITextureBuilder {
}
private boolean isCTMBlock(Block fromBlock, int fromMeta) {
- return GT_Mod.gregtechproxy.mCTMBlockCache
- .computeIfAbsent(fromBlock, (byte) fromMeta, GT_TextureBuilder::apply);
+ return GT_Mod.gregtechproxy.mCTMBlockCache.computeIfAbsent(
+ fromBlock,
+ (byte) fromMeta,
+ GT_TextureBuilder::apply);
}
private static Boolean apply(Block b, Byte m) {
diff --git a/src/main/java/gregtech/common/render/items/GT_GeneratedItem_Renderer.java b/src/main/java/gregtech/common/render/items/GT_GeneratedItem_Renderer.java
index 2484cf1c1f..398465d586 100644
--- a/src/main/java/gregtech/common/render/items/GT_GeneratedItem_Renderer.java
+++ b/src/main/java/gregtech/common/render/items/GT_GeneratedItem_Renderer.java
@@ -148,8 +148,10 @@ public class GT_GeneratedItem_Renderer implements IItemRenderer {
FluidStack fluidStack = GT_Utility.getFluidForFilledItem(stack, true);
if (fluidStack != null && fluidStack.getFluid() != null) {
- IIcon fluidIcon = fluidStack.getFluid().getIcon(fluidStack);
- int fluidColor = fluidStack.getFluid().getColor(fluidStack);
+ IIcon fluidIcon = fluidStack.getFluid()
+ .getIcon(fluidStack);
+ int fluidColor = fluidStack.getFluid()
+ .getColor(fluidStack);
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
markNeedsAnimationUpdate(fluidIcon);
diff --git a/src/main/java/gregtech/common/render/items/GT_GeneratedMaterial_Renderer.java b/src/main/java/gregtech/common/render/items/GT_GeneratedMaterial_Renderer.java
index faa0d70c7c..4e8a85cace 100644
--- a/src/main/java/gregtech/common/render/items/GT_GeneratedMaterial_Renderer.java
+++ b/src/main/java/gregtech/common/render/items/GT_GeneratedMaterial_Renderer.java
@@ -72,7 +72,8 @@ public class GT_GeneratedMaterial_Renderer implements IItemRenderer {
}
if (tOverlay != null && aFluid != null && aFluid.getFluid() != null) {
- IIcon fluidIcon = aFluid.getFluid().getIcon(aFluid);
+ IIcon fluidIcon = aFluid.getFluid()
+ .getIcon(aFluid);
if (fluidIcon != null) {
markNeedsAnimationUpdate(fluidIcon);
// Adds colour to a cells fluid. Does not colour full fluid icons as shown in NEI etc.
diff --git a/src/main/java/gregtech/common/render/items/InfinityRenderer.java b/src/main/java/gregtech/common/render/items/InfinityRenderer.java
index 7450ff8fdb..0441ab2272 100644
--- a/src/main/java/gregtech/common/render/items/InfinityRenderer.java
+++ b/src/main/java/gregtech/common/render/items/InfinityRenderer.java
@@ -61,7 +61,8 @@ public class InfinityRenderer extends GT_GeneratedMaterial_Renderer {
}
if (tOverlay != null && aFluid != null && aFluid.getFluid() != null) {
- IIcon fluidIcon = aFluid.getFluid().getIcon(aFluid);
+ IIcon fluidIcon = aFluid.getFluid()
+ .getIcon(aFluid);
if (fluidIcon != null) {
markNeedsAnimationUpdate(fluidIcon);
// Adds colour to a cells fluid. Does not colour full fluid icons as shown in NEI etc.
diff --git a/src/main/java/gregtech/common/render/items/UniversiumRenderer.java b/src/main/java/gregtech/common/render/items/UniversiumRenderer.java
index b5caa6f59e..a2369128b0 100644
--- a/src/main/java/gregtech/common/render/items/UniversiumRenderer.java
+++ b/src/main/java/gregtech/common/render/items/UniversiumRenderer.java
@@ -35,7 +35,8 @@ public class UniversiumRenderer extends GT_GeneratedMaterial_Renderer {
magicRenderMethod(
type,
ItemList.Emitter_UEV.get(1), // hack to make it render correctly
- aStack.getItem().getIconFromDamage(aStack.getItemDamage()),
+ aStack.getItem()
+ .getIconFromDamage(aStack.getItemDamage()),
true,
data);
return true;
@@ -114,8 +115,9 @@ public class UniversiumRenderer extends GT_GeneratedMaterial_Renderer {
if (fluidDisplay) {
// this somehow makes shader render correctly
ResourceLocation resourcelocation = mc.getTextureManager()
- .getResourceLocation(aStack.getItemSpriteNumber());
- mc.getTextureManager().bindTexture(resourcelocation);
+ .getResourceLocation(aStack.getItemSpriteNumber());
+ mc.getTextureManager()
+ .bindTexture(resourcelocation);
} else {
r.renderItemIntoGUI(mc.fontRenderer, mc.getTextureManager(), aStack, 0, 0, true);
}
@@ -185,8 +187,15 @@ public class UniversiumRenderer extends GT_GeneratedMaterial_Renderer {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
// RENDER ITEM IN HAND
- ItemRenderer
- .renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), scale);
+ ItemRenderer.renderItemIn2D(
+ Tessellator.instance,
+ f1,
+ f2,
+ f,
+ f3,
+ icon.getIconWidth(),
+ icon.getIconHeight(),
+ scale);
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glDepthFunc(GL11.GL_EQUAL);
diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java
index 52cc1b1b96..f1641bda0b 100644
--- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java
+++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java
@@ -65,7 +65,10 @@ public class GT_MetaTileEntity_ChestBuffer extends GT_MetaTileEntity_Buffer impl
public ITexture getOverlayIcon() {
return TextureFactory.of(
TextureFactory.of(AUTOMATION_CHESTBUFFER),
- TextureFactory.builder().addIcon(AUTOMATION_CHESTBUFFER_GLOW).glow().build());
+ TextureFactory.builder()
+ .addIcon(AUTOMATION_CHESTBUFFER_GLOW)
+ .glow()
+ .build());
}
@Override
@@ -122,8 +125,9 @@ public class GT_MetaTileEntity_ChestBuffer extends GT_MetaTileEntity_Buffer impl
addInvertRedstoneButton(builder);
addStockingModeButton(builder);
builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_22_RED.apply(69, true)).setPos(80, 60)
- .setSize(69, 22));
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_22_RED.apply(69, true))
+ .setPos(80, 60)
+ .setSize(69, 22));
addMainUI(builder);
}
diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java
index 70e2673421..6fc2b45289 100644
--- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java
+++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java
@@ -61,7 +61,10 @@ public class GT_MetaTileEntity_Filter extends GT_MetaTileEntity_Buffer implement
public ITexture getOverlayIcon() {
return TextureFactory.of(
TextureFactory.of(AUTOMATION_FILTER),
- TextureFactory.builder().addIcon(AUTOMATION_FILTER_GLOW).glow().build());
+ TextureFactory.builder()
+ .addIcon(AUTOMATION_FILTER_GLOW)
+ .glow()
+ .build());
}
@Override
@@ -119,45 +122,70 @@ public class GT_MetaTileEntity_Filter extends GT_MetaTileEntity_Buffer implement
builder.widget(new ButtonWidget().setOnClick((clickData, widget) -> {
bInvertFilter = !bInvertFilter;
if (bInvertFilter) {
- GT_Utility.sendChatToPlayer(widget.getContext().getPlayer(), GT_Utility.trans("124", "Invert Filter"));
+ GT_Utility.sendChatToPlayer(
+ widget.getContext()
+ .getPlayer(),
+ GT_Utility.trans("124", "Invert Filter"));
} else {
GT_Utility.sendChatToPlayer(
- widget.getContext().getPlayer(),
+ widget.getContext()
+ .getPlayer(),
GT_Utility.trans("125", "Don't invert Filter"));
}
- }).setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_INVERT_FILTER).setPos(61, 62)
- .setSize(18, 18)).widget(new ButtonWidget().setOnClick((clickData, widget) -> {
- bIgnoreNBT = !bIgnoreNBT;
- if (bIgnoreNBT) {
- GT_Utility.sendChatToPlayer(
- widget.getContext().getPlayer(),
- GT_Utility.trans("126", "Ignore NBT"));
- } else {
- GT_Utility.sendChatToPlayer(
- widget.getContext().getPlayer(),
- GT_Utility.trans("127", "NBT has to match"));
- }
- }).setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_NBT).setPos(79, 62)
- .setSize(18, 18))
- .widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_24_WHITE.apply(9, false))
- .setPos(6, 19).setSize(9, 24))
- .widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_24_BLUE.apply(24, true))
- .setPos(71, 19).setSize(24, 24))
- .widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_24_RED.apply(19, true))
- .setPos(152, 19).setSize(19, 24))
- .widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SLOTS_HOLO_3BY3).setPos(16, 4)
- .setSize(54, 54))
- .widget(
- SlotGroup.ofItemHandler(inventoryHandler, 3).startFromSlot(9).endAtSlot(17).phantom(true)
+ })
+ .setBackground(
+ GT_UITextures.BUTTON_STANDARD,
+ GT_UITextures.OVERLAY_BUTTON_INVERT_FILTER)
+ .setPos(61, 62)
+ .setSize(18, 18))
+ .widget(new ButtonWidget().setOnClick((clickData, widget) -> {
+ bIgnoreNBT = !bIgnoreNBT;
+ if (bIgnoreNBT) {
+ GT_Utility.sendChatToPlayer(
+ widget.getContext()
+ .getPlayer(),
+ GT_Utility.trans("126", "Ignore NBT"));
+ } else {
+ GT_Utility.sendChatToPlayer(
+ widget.getContext()
+ .getPlayer(),
+ GT_Utility.trans("127", "NBT has to match"));
+ }
+ })
+ .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_NBT)
+ .setPos(79, 62)
+ .setSize(18, 18))
+ .widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_24_WHITE.apply(9, false))
+ .setPos(6, 19)
+ .setSize(9, 24))
+ .widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_24_BLUE.apply(24, true))
+ .setPos(71, 19)
+ .setSize(24, 24))
+ .widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_24_RED.apply(19, true))
+ .setPos(152, 19)
+ .setSize(19, 24))
+ .widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SLOTS_HOLO_3BY3)
+ .setPos(16, 4)
+ .setSize(54, 54))
+ .widget(
+ SlotGroup.ofItemHandler(inventoryHandler, 3)
+ .startFromSlot(9)
+ .endAtSlot(17)
+ .phantom(true)
.applyForWidget(
- widget -> widget.disableShiftInsert().setBackground(GT_UITextures.TRANSPARENT))
- .build().setPos(16, 4))
- .widget(
- SlotGroup.ofItemHandler(inventoryHandler, 3).startFromSlot(0).endAtSlot(8).build()
+ widget -> widget.disableShiftInsert()
+ .setBackground(GT_UITextures.TRANSPARENT))
+ .build()
+ .setPos(16, 4))
+ .widget(
+ SlotGroup.ofItemHandler(inventoryHandler, 3)
+ .startFromSlot(0)
+ .endAtSlot(8)
+ .build()
.setPos(97, 4));
}
}
diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java
index e601847a72..97bf8190b0 100644
--- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java
+++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java
@@ -68,7 +68,10 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer
public ITexture getOverlayIcon() {
return TextureFactory.of(
TextureFactory.of(AUTOMATION_ITEMDISTRIBUTOR),
- TextureFactory.builder().addIcon(AUTOMATION_ITEMDISTRIBUTOR_GLOW).glow().build());
+ TextureFactory.builder()
+ .addIcon(AUTOMATION_ITEMDISTRIBUTOR_GLOW)
+ .glow()
+ .build());
}
@Override
@@ -188,8 +191,9 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer
addEmitRedstoneButton(builder);
addInvertRedstoneButton(builder);
builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_22_RED.apply(87, true)).setPos(62, 60)
- .setSize(87, 22));
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_22_RED.apply(87, true))
+ .setPos(62, 60)
+ .setSize(87, 22));
addInventorySlots(builder);
}
}
diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_RecipeFilter.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_RecipeFilter.java
index 7502ae73de..00f1700d98 100644
--- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_RecipeFilter.java
+++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_RecipeFilter.java
@@ -76,7 +76,10 @@ public class GT_MetaTileEntity_RecipeFilter extends GT_MetaTileEntity_SpecialFil
public ITexture getOverlayIcon() {
return TextureFactory.of(
TextureFactory.of(AUTOMATION_RECIPEFILTER),
- TextureFactory.builder().addIcon(AUTOMATION_RECIPEFILTER_GLOW).glow().build());
+ TextureFactory.builder()
+ .addIcon(AUTOMATION_RECIPEFILTER_GLOW)
+ .glow()
+ .build());
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java
index af4426932a..e743dd47e4 100644
--- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java
+++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java
@@ -66,7 +66,10 @@ public class GT_MetaTileEntity_Regulator extends GT_MetaTileEntity_Buffer implem
public ITexture getOverlayIcon() {
return TextureFactory.of(
TextureFactory.of(AUTOMATION_REGULATOR),
- TextureFactory.builder().addIcon(AUTOMATION_REGULATOR_GLOW).glow().build());
+ TextureFactory.builder()
+ .addIcon(AUTOMATION_REGULATOR_GLOW)
+ .glow()
+ .build());
}
@Override
@@ -171,21 +174,33 @@ public class GT_MetaTileEntity_Regulator extends GT_MetaTileEntity_Buffer implem
addEmitEnergyButton(builder);
builder.widget(createChargerSlot(43, 62));
builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_22_RED.apply(84, true)).setPos(65, 60)
- .setSize(84, 22))
- .widget(SlotGroup.ofItemHandler(inventoryHandler, 3).startFromSlot(0).endAtSlot(8).build().setPos(7, 5))
- .widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SLOTS_HOLO_3BY3).setPos(62, 5)
- .setSize(54, 54))
- .widget(
- SlotGroup.ofItemHandler(inventoryHandler, 3).phantom(true).startFromSlot(9).endAtSlot(17)
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_22_RED.apply(84, true))
+ .setPos(65, 60)
+ .setSize(84, 22))
+ .widget(
+ SlotGroup.ofItemHandler(inventoryHandler, 3)
+ .startFromSlot(0)
+ .endAtSlot(8)
+ .build()
+ .setPos(7, 5))
+ .widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SLOTS_HOLO_3BY3)
+ .setPos(62, 5)
+ .setSize(54, 54))
+ .widget(
+ SlotGroup.ofItemHandler(inventoryHandler, 3)
+ .phantom(true)
+ .startFromSlot(9)
+ .endAtSlot(17)
.applyForWidget(
widget -> widget.setControlsAmount(true)
- .setBackground(GT_UITextures.TRANSPARENT))
- .build().setPos(62, 5))
- .widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SLOTS_HOLO_3BY3).setPos(117, 5)
- .setSize(54, 54));
+ .setBackground(GT_UITextures.TRANSPARENT))
+ .build()
+ .setPos(62, 5))
+ .widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SLOTS_HOLO_3BY3)
+ .setPos(117, 5)
+ .setSize(54, 54));
int xBase = 117, yBase = 5;
for (int i = 0; i < mTargetSlots.length; i++) {
@@ -202,10 +217,12 @@ public class GT_MetaTileEntity_Regulator extends GT_MetaTileEntity_Buffer implem
mTargetSlots[index]
+ (clickData.mouseButton == 0 ? -1 : 1) * (clickData.shift ? 16 : 1)));
}
- }.setBackground(GT_UITextures.TRANSPARENT).setPos(xPos, yPos)).widget(
- TextWidget.dynamicString(() -> String.valueOf(mTargetSlots[index]))
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setPos(xPos + 2 + (i % 3 == 0 ? 1 : 0), yPos + 3 + (i / 3 == 0 ? 1 : 0)));
+ }.setBackground(GT_UITextures.TRANSPARENT)
+ .setPos(xPos, yPos))
+ .widget(
+ TextWidget.dynamicString(() -> String.valueOf(mTargetSlots[index]))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(xPos + 2 + (i % 3 == 0 ? 1 : 0), yPos + 3 + (i / 3 == 0 ? 1 : 0)));
}
}
}
diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java
index cefd3152c1..1b913af896 100644
--- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java
+++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java
@@ -57,7 +57,10 @@ public class GT_MetaTileEntity_SuperBuffer extends GT_MetaTileEntity_ChestBuffer
public ITexture getOverlayIcon() {
return TextureFactory.of(
TextureFactory.of(AUTOMATION_SUPERBUFFER),
- TextureFactory.builder().addIcon(AUTOMATION_SUPERBUFFER_GLOW).glow().build());
+ TextureFactory.builder()
+ .addIcon(AUTOMATION_SUPERBUFFER_GLOW)
+ .glow()
+ .build());
}
@Override
@@ -82,7 +85,8 @@ public class GT_MetaTileEntity_SuperBuffer extends GT_MetaTileEntity_ChestBuffer
for (Map.Entry<GT_Utility.ItemId, Integer> entry : slots.entrySet()) {
do {
int slot = validSlots.get(i);
- mInventory[slot] = stacks.get(entry.getKey()).copy();
+ mInventory[slot] = stacks.get(entry.getKey())
+ .copy();
int toSet = Math.min(entry.getValue(), mInventory[slot].getMaxStackSize());
mInventory[slot].stackSize = toSet;
entry.setValue(entry.getValue() - toSet);
@@ -94,6 +98,8 @@ public class GT_MetaTileEntity_SuperBuffer extends GT_MetaTileEntity_ChestBuffer
@Override
protected void addMainUI(ModularWindow.Builder builder) {
builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SUPER_BUFFER).setPos(61, 4).setSize(54, 54));
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SUPER_BUFFER)
+ .setPos(61, 4)
+ .setSize(54, 54));
}
}
diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java
index 64b5a43ad8..609342ed82 100644
--- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java
+++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java
@@ -78,7 +78,10 @@ public class GT_MetaTileEntity_TypeFilter extends GT_MetaTileEntity_SpecialFilte
public ITexture getOverlayIcon() {
return TextureFactory.of(
TextureFactory.of(AUTOMATION_TYPEFILTER),
- TextureFactory.builder().addIcon(AUTOMATION_TYPEFILTER_GLOW).glow().build());
+ TextureFactory.builder()
+ .addIcon(AUTOMATION_TYPEFILTER_GLOW)
+ .glow()
+ .build());
}
@Override
@@ -128,8 +131,8 @@ public class GT_MetaTileEntity_TypeFilter extends GT_MetaTileEntity_SpecialFilte
}
this.mInventory[SPECIAL_SLOT_INDEX] = GT_Utility.copyAmount(
1L,
- this.mPrefix.mPrefixedItems
- .get(this.mRotationIndex = (this.mRotationIndex + 1) % this.mPrefix.mPrefixedItems.size()));
+ this.mPrefix.mPrefixedItems.get(
+ this.mRotationIndex = (this.mRotationIndex + 1) % this.mPrefix.mPrefixedItems.size()));
if (this.mInventory[SPECIAL_SLOT_INDEX] == null) return;
if (this.mInventory[SPECIAL_SLOT_INDEX].getItemDamage() == W) this.mInventory[9].setItemDamage(0);
this.mInventory[SPECIAL_SLOT_INDEX].setStackDisplayName(this.mPrefix.toString());
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java
index 2519afd4a5..ed22d41f70 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java
@@ -135,7 +135,8 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa
fill(Materials.Water.getFluid(1000L * (long) aPlayer.getCurrentEquippedItem().stackSize), true);
if (!aPlayer.capabilities.isCreativeMode) {
- aPlayer.getCurrentEquippedItem().func_150996_a(Items.bucket);
+ aPlayer.getCurrentEquippedItem()
+ .func_150996_a(Items.bucket);
}
} else {
GT_UIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer);
@@ -197,7 +198,8 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa
@Override
public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCover) {
- return GregTech_API.getCoverBehaviorNew(aCover.toStack()).isSimpleCover();
+ return GregTech_API.getCoverBehaviorNew(aCover.toStack())
+ .isSimpleCover();
}
@Override
@@ -328,13 +330,20 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa
if (mSteam == null || mSteam.amount == 0) return;
IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide((byte) aSide);
if (tTileEntity == null) return;
- FluidStack tDrained = aBaseMetaTileEntity
- .drain(ForgeDirection.getOrientation(aSide), Math.max(1, this.mSteam.amount / 2), false);
+ FluidStack tDrained = aBaseMetaTileEntity.drain(
+ ForgeDirection.getOrientation(aSide),
+ Math.max(1, this.mSteam.amount / 2),
+ false);
if (tDrained == null) return;
- int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tDrained, false);
+ int tFilledAmount = tTileEntity.fill(
+ ForgeDirection.getOrientation(aSide)
+ .getOpposite(),
+ tDrained,
+ false);
if (tFilledAmount <= 0) return;
tTileEntity.fill(
- ForgeDirection.getOrientation(aSide).getOpposite(),
+ ForgeDirection.getOrientation(aSide)
+ .getOpposite(),
aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(aSide), tFilledAmount, true),
true);
}
@@ -378,13 +387,16 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa
if (aIndex == GT_MetaTileEntity_Boiler.SOUND_EVENT_LET_OFF_EXCESS_STEAM) {
GT_Utility.doSoundAtClient(SoundResource.RANDOM_FIZZ, 2, 1.0F, aX, aY, aZ);
- new ParticleEventBuilder().setIdentifier(ParticleFX.CLOUD).setWorld(getBaseMetaTileEntity().getWorld())
- .setMotion(0D, 0D, 0D).<ParticleEventBuilder>times(
- 8,
- x -> x.setPosition(
- aX - 0.5D + XSTR_INSTANCE.nextFloat(),
- aY,
- aZ - 0.5D + XSTR_INSTANCE.nextFloat()).run());
+ new ParticleEventBuilder().setIdentifier(ParticleFX.CLOUD)
+ .setWorld(getBaseMetaTileEntity().getWorld())
+ .setMotion(0D, 0D, 0D)
+ .<ParticleEventBuilder>times(
+ 8,
+ x -> x.setPosition(
+ aX - 0.5D + XSTR_INSTANCE.nextFloat(),
+ aY,
+ aZ - 0.5D + XSTR_INSTANCE.nextFloat())
+ .run());
}
}
@@ -442,48 +454,58 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
new SlotWidget(inventoryHandler, 0).setPos(43, 25)
- .setBackground(getGUITextureSet().getItemSlot(), getOverlaySlotIn()))
- .widget(
- new SlotWidget(inventoryHandler, 1).setPos(
- 43,
- 61).setBackground(
- getGUITextureSet().getItemSlot(),
- getOverlaySlotOut()))
- .widget(createFuelSlot()).widget(
- createAshSlot())
- .widget(
- new ProgressBar().setProgress(() -> mSteam == null ? 0 : (float) mSteam.amount / getCapacity())
- .setTexture(
- getProgressbarEmpty(),
- 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(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_WATER, 10)
- .setDirection(ProgressBar.Direction.UP).setPos(83, 25).setSize(10, 54))
- .widget(
- new ProgressBar().setProgress(() -> (float) mTemperature / maxProgresstime())
- .setTexture(getProgressbarEmpty(), 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(getProgressbarFuel(), 14).setDirection(ProgressBar.Direction.UP)
- .setPos(116, 45).setSize(14, 14))
- .widget(new DrawableWidget().setDrawable(getOverlaySlotCanister()).setPos(43, 43).setSize(18, 18));
+ .setBackground(getGUITextureSet().getItemSlot(), getOverlaySlotIn()))
+ .widget(
+ new SlotWidget(inventoryHandler, 1).setPos(43, 61)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ getOverlaySlotOut()))
+ .widget(createFuelSlot())
+ .widget(createAshSlot())
+ .widget(
+ new ProgressBar().setProgress(() -> mSteam == null ? 0 : (float) mSteam.amount / getCapacity())
+ .setTexture(getProgressbarEmpty(), 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(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_WATER, 10)
+ .setDirection(ProgressBar.Direction.UP)
+ .setPos(83, 25)
+ .setSize(10, 54))
+ .widget(
+ new ProgressBar().setProgress(() -> (float) mTemperature / maxProgresstime())
+ .setTexture(getProgressbarEmpty(), 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(getProgressbarFuel(), 14)
+ .setDirection(ProgressBar.Direction.UP)
+ .setPos(116, 45)
+ .setSize(14, 14))
+ .widget(
+ new DrawableWidget().setDrawable(getOverlaySlotCanister())
+ .setPos(43, 43)
+ .setSize(18, 18));
}
protected SlotWidget createFuelSlot() {
- return (SlotWidget) new SlotWidget(inventoryHandler, 2).setPos(115, 61).setBackground(getFuelSlotBackground());
+ return (SlotWidget) new SlotWidget(inventoryHandler, 2).setPos(115, 61)
+ .setBackground(getFuelSlotBackground());
}
protected SlotWidget createAshSlot() {
- return (SlotWidget) new SlotWidget(inventoryHandler, 3).setAccess(true, false).setPos(115, 25)
- .setBackground(getAshSlotBackground());
+ return (SlotWidget) new SlotWidget(inventoryHandler, 3).setAccess(true, false)
+ .setPos(115, 25)
+ .setBackground(getAshSlotBackground());
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java
index e88a35c617..0e617312df 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java
@@ -62,9 +62,15 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler {
texTop = { TextureFactory.of(MACHINE_BRONZEBRICKS_TOP), TextureFactory.of(OVERLAY_PIPE) },
texSide = { TextureFactory.of(MACHINE_BRONZEBRICKS_SIDE), TextureFactory.of(OVERLAY_PIPE) },
texFront = { TextureFactory.of(MACHINE_BRONZEBRICKS_SIDE), TextureFactory.of(BOILER_FRONT),
- TextureFactory.builder().addIcon(BOILER_FRONT_GLOW).glow().build() },
+ TextureFactory.builder()
+ .addIcon(BOILER_FRONT_GLOW)
+ .glow()
+ .build() },
texFrontActive = { TextureFactory.of(MACHINE_BRONZEBRICKS_SIDE), TextureFactory.of(BOILER_FRONT_ACTIVE),
- TextureFactory.builder().addIcon(BOILER_FRONT_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(BOILER_FRONT_ACTIVE_GLOW)
+ .glow()
+ .build() };
for (int i = 0; i < 17; i++) {
rTextures[0][i] = texBottom;
rTextures[1][i] = texTop;
@@ -126,9 +132,13 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler {
}
ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder()).setMotion(0D, 0D, 0D)
- .setPosition(x, y, z).setWorld(getBaseMetaTileEntity().getWorld());
- particleEventBuilder.setIdentifier(ParticleFX.SMOKE).run();
- particleEventBuilder.setIdentifier(ParticleFX.FLAME).run();
+ .setPosition(x, y, z)
+ .setWorld(
+ getBaseMetaTileEntity().getWorld());
+ particleEventBuilder.setIdentifier(ParticleFX.SMOKE)
+ .run();
+ particleEventBuilder.setIdentifier(ParticleFX.FLAME)
+ .run();
}
}
}
@@ -206,38 +216,55 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler {
} else if (
// If its a block of the following materials
GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Coal))
- || GT_OreDictUnificator
- .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Lignite))
- || GT_OreDictUnificator
- .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Charcoal))
- || GT_OreDictUnificator
- .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Diamond))
+ || GT_OreDictUnificator.isItemStackInstanceOf(
+ this.mInventory[2],
+ OrePrefixes.block.get(Materials.Lignite))
+ || GT_OreDictUnificator.isItemStackInstanceOf(
+ this.mInventory[2],
+ OrePrefixes.block.get(Materials.Charcoal))
+ || GT_OreDictUnificator.isItemStackInstanceOf(
+ this.mInventory[2],
+ OrePrefixes.block.get(Materials.Diamond))
||
// if its either a Railcraft Coke Block or a custom GTNH compressed Coal/charcoal/lignite/coke block
(Block.getBlockFromItem(this.mInventory[2].getItem()) != null && // check if the block exists
- (Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase()
- .contains("tile") && // check if the block is a tile -> block
+ (Block.getBlockFromItem(this.mInventory[2].getItem())
+ .getUnlocalizedName()
+ .toLowerCase()
+ .contains("tile") && // check if the block is a tile -> block
(
// If the name of the block contains these names
- Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase()
- .contains("charcoal")
- || Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName()
- .toLowerCase().contains("coal")
- || Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName()
- .toLowerCase().contains("diamond")
- || Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName()
- .toLowerCase().contains("coke")
- || Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName()
- .toLowerCase().contains("railcraft.cube")
- || Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName()
- .toLowerCase().contains("lignite"))))) {
+ Block.getBlockFromItem(this.mInventory[2].getItem())
+ .getUnlocalizedName()
+ .toLowerCase()
+ .contains("charcoal")
+ || Block.getBlockFromItem(this.mInventory[2].getItem())
+ .getUnlocalizedName()
+ .toLowerCase()
+ .contains("coal")
+ || Block.getBlockFromItem(this.mInventory[2].getItem())
+ .getUnlocalizedName()
+ .toLowerCase()
+ .contains("diamond")
+ || Block.getBlockFromItem(this.mInventory[2].getItem())
+ .getUnlocalizedName()
+ .toLowerCase()
+ .contains("coke")
+ || Block.getBlockFromItem(this.mInventory[2].getItem())
+ .getUnlocalizedName()
+ .toLowerCase()
+ .contains("railcraft.cube")
+ || Block.getBlockFromItem(this.mInventory[2].getItem())
+ .getUnlocalizedName()
+ .toLowerCase()
+ .contains("lignite"))))) {
// try to add 10% of the burnvalue as Processing energy, no boost
// for coal coke here
if ((TileEntityFurnace.getItemBurnTime(this.mInventory[2]) / 10)
> 0) {
- this.mProcessingEnergy += (TileEntityFurnace
- .getItemBurnTime(this.mInventory[2]) / 10);
+ this.mProcessingEnergy += (TileEntityFurnace.getItemBurnTime(
+ this.mInventory[2]) / 10);
aBaseMetaTileEntity.decrStackSize(2, 1);
aBaseMetaTileEntity.addStackToSlot(
3,
@@ -252,7 +279,8 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler {
|| Block.getBlockFromItem(
this.mInventory[2].getItem())
.getUnlocalizedName()
- .toLowerCase().contains("coal")
+ .toLowerCase()
+ .contains("coal")
|| Block.getBlockFromItem(
this.mInventory[2].getItem())
.getUnlocalizedName()
@@ -268,22 +296,28 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler {
// same goes for lava
} else
if ((TileEntityFurnace.getItemBurnTime(this.mInventory[2])) >= 2000
- && !(this.mInventory[2].getUnlocalizedName().toLowerCase().contains("bucket")
- || this.mInventory[2].getUnlocalizedName().toLowerCase().contains("cell"))) {
- this.mProcessingEnergy += (TileEntityFurnace.getItemBurnTime(this.mInventory[2]) / 10);
- aBaseMetaTileEntity.decrStackSize(2, 1);
- // adds tiny pile of ash for burntime under 10k, small pile for under 100k and pile for
- // bigger values
- if (XSTR.XSTR_INSTANCE.nextInt(2) == 0) aBaseMetaTileEntity.addStackToSlot(
- 3,
- GT_OreDictUnificator.get(
- (TileEntityFurnace.getItemBurnTime(this.mInventory[2]) >= 10000
- ? TileEntityFurnace.getItemBurnTime(this.mInventory[2])
- >= 100000 ? OrePrefixes.dust : OrePrefixes.dustSmall
- : OrePrefixes.dustTiny),
- Materials.Ash,
- 1L));
- }
+ && !(this.mInventory[2].getUnlocalizedName()
+ .toLowerCase()
+ .contains("bucket")
+ || this.mInventory[2].getUnlocalizedName()
+ .toLowerCase()
+ .contains("cell"))) {
+ this.mProcessingEnergy += (TileEntityFurnace.getItemBurnTime(
+ this.mInventory[2]) / 10);
+ aBaseMetaTileEntity.decrStackSize(2, 1);
+ // adds tiny pile of ash for burntime under 10k, small pile for
+ // under 100k and pile for
+ // bigger values
+ if (XSTR.XSTR_INSTANCE.nextInt(2) == 0)
+ aBaseMetaTileEntity.addStackToSlot(
+ 3,
+ GT_OreDictUnificator.get(
+ (TileEntityFurnace.getItemBurnTime(
+ this.mInventory[2])
+ >= 10000 ? TileEntityFurnace.getItemBurnTime(this.mInventory[2]) >= 100000 ? OrePrefixes.dust : OrePrefixes.dustSmall : OrePrefixes.dustTiny),
+ Materials.Ash,
+ 1L));
+ }
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java
index 9e17dc12ee..b6b293d8d1 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java
@@ -124,8 +124,10 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler {
rTextures[3][i] = new ITexture[] { TextureFactory.of(MACHINE_STEELBRICKS_SIDE, colorModulation),
TextureFactory.of(BOILER_LAVA_FRONT, colorModulation), TextureFactory.of(BOILER_LAVA_FRONT_GLOW) };
rTextures[4][i] = new ITexture[] { TextureFactory.of(MACHINE_STEELBRICKS_SIDE, colorModulation),
- TextureFactory.of(BOILER_LAVA_FRONT_ACTIVE),
- TextureFactory.builder().addIcon(BOILER_LAVA_FRONT_ACTIVE_GLOW).glow().build() };
+ TextureFactory.of(BOILER_LAVA_FRONT_ACTIVE), TextureFactory.builder()
+ .addIcon(BOILER_LAVA_FRONT_ACTIVE_GLOW)
+ .glow()
+ .build() };
rTextures[5][i] = new ITexture[] { TextureFactory.of(MACHINE_STEELBRICKS_SIDE, colorModulation),
TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(FLUID_OUT_SIGN) };
}
@@ -222,13 +224,14 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler {
if (returnedItemStack != null && !aPlayer.capabilities.isCreativeMode) {
if (equippedItemStack.stackSize > 1) {
if (!aPlayer.inventory.addItemStackToInventory(returnedItemStack)) {
- aBaseMetaTileEntity.getWorld().spawnEntityInWorld(
- new EntityItem(
- aBaseMetaTileEntity.getWorld(),
- (double) aBaseMetaTileEntity.getXCoord() + 0.5D,
- (double) aBaseMetaTileEntity.getYCoord() + 1.5D,
- (double) aBaseMetaTileEntity.getZCoord() + 0.5D,
- equippedItemStack));
+ aBaseMetaTileEntity.getWorld()
+ .spawnEntityInWorld(
+ new EntityItem(
+ aBaseMetaTileEntity.getWorld(),
+ (double) aBaseMetaTileEntity.getXCoord() + 0.5D,
+ (double) aBaseMetaTileEntity.getYCoord() + 1.5D,
+ (double) aBaseMetaTileEntity.getZCoord() + 0.5D,
+ equippedItemStack));
} else if (aPlayer instanceof EntityPlayerMP) {
((EntityPlayerMP) aPlayer).sendContainerToPlayer(aPlayer.inventoryContainer);
}
@@ -243,7 +246,10 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler {
@Override
public void saveNBTData(NBTTagCompound aNBT) {
super.saveNBTData(aNBT);
- if (lavaTank.getFluid() != null) aNBT.setTag("mLava", lavaTank.getFluid().writeToNBT(new NBTTagCompound()));
+ if (lavaTank.getFluid() != null) aNBT.setTag(
+ "mLava",
+ lavaTank.getFluid()
+ .writeToNBT(new NBTTagCompound()));
aNBT.setInteger("mCooledLava", this.mCooledLava);
}
@@ -264,7 +270,9 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler {
if (mSteam == null || mSteam.amount == 0) return;
pushSteamToSide(
aBaseMetaTileEntity,
- ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()).getOpposite().ordinal());
+ ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())
+ .getOpposite()
+ .ordinal());
}
/**
@@ -352,9 +360,13 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler {
}
ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder()).setMotion(0D, 0D, 0D)
- .setPosition(x, y, z).setWorld(getBaseMetaTileEntity().getWorld());
- particleEventBuilder.setIdentifier(ParticleFX.SMOKE).run();
- particleEventBuilder.setIdentifier(ParticleFX.FLAME).run();
+ .setPosition(x, y, z)
+ .setWorld(
+ getBaseMetaTileEntity().getWorld());
+ particleEventBuilder.setIdentifier(ParticleFX.SMOKE)
+ .run();
+ particleEventBuilder.setIdentifier(ParticleFX.FLAME)
+ .run();
}
}
}
@@ -401,7 +413,7 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler {
if (aIndex != GT_MetaTileEntity_Boiler.SOUND_EVENT_LET_OFF_EXCESS_STEAM) return;
final ForgeDirection rearDirection = ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing())
- .getOpposite();
+ .getOpposite();
GT_Utility.doSoundAtClient(
SoundResource.RANDOM_FIZZ,
2,
@@ -411,12 +423,18 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler {
aY,
aZ + 0.5 * rearDirection.offsetZ);
- new ParticleEventBuilder().setIdentifier(ParticleFX.CLOUD).setWorld(getBaseMetaTileEntity().getWorld())
- // Particles emitted with a 1 block/s velocity toward rear
- .setMotion(rearDirection.offsetX / 20D, 0D, rearDirection.offsetZ / 20D).<ParticleEventBuilder>times(
- 8,
- // Particles emitted from center of rear face (Steam Output)
- x -> x.setPosition(aX + rearDirection.offsetX / 2D, aY, aZ + rearDirection.offsetZ / 2D).run());
+ new ParticleEventBuilder().setIdentifier(ParticleFX.CLOUD)
+ .setWorld(getBaseMetaTileEntity().getWorld())
+ // Particles emitted with a 1 block/s velocity toward rear
+ .setMotion(rearDirection.offsetX / 20D, 0D, rearDirection.offsetZ / 20D)
+ .<ParticleEventBuilder>times(
+ 8,
+ // Particles emitted from center of rear face (Steam Output)
+ x -> x.setPosition(
+ aX + rearDirection.offsetX / 2D,
+ aY,
+ aZ + rearDirection.offsetZ / 2D)
+ .run());
}
@Override
@@ -464,39 +482,53 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler {
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
new SlotWidget(inventoryHandler, 0).setPos(43, 25)
- .setBackground(getGUITextureSet().getItemSlot(), getOverlaySlotIn()))
- .widget(
- new SlotWidget(inventoryHandler, 1).setAccess(true, false).setPos(43, 61)
- .setBackground(getGUITextureSet().getItemSlot(), getOverlaySlotOut()))
- .widget(
- new FluidSlotWidget(lavaTank)
- .setBackground(getGUITextureSet().getFluidSlot(), getOverlaySlotIn()).setPos(115, 61))
- .widget(
- createAshSlot())
- .widget(
- new ProgressBar().setProgress(() -> mSteam == null ? 0 : (float) mSteam.amount / getCapacity())
- .setTexture(
- getProgressbarEmpty(),
- 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(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_WATER, 10)
- .setDirection(ProgressBar.Direction.UP).setPos(83, 25).setSize(10, 54))
- .widget(
- new ProgressBar().setProgress(() -> (float) mTemperature / maxProgresstime())
- .setTexture(getProgressbarEmpty(), 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(getProgressbarFuel(), 14).setDirection(ProgressBar.Direction.UP)
- .setPos(116, 45).setSize(14, 14))
- .widget(new DrawableWidget().setDrawable(getOverlaySlotCanister()).setPos(43, 43).setSize(18, 18));
+ .setBackground(getGUITextureSet().getItemSlot(), getOverlaySlotIn()))
+ .widget(
+ new SlotWidget(inventoryHandler, 1).setAccess(true, false)
+ .setPos(43, 61)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ getOverlaySlotOut()))
+ .widget(
+ new FluidSlotWidget(lavaTank)
+ .setBackground(
+ getGUITextureSet().getFluidSlot(),
+ getOverlaySlotIn())
+ .setPos(115, 61))
+ .widget(createAshSlot())
+ .widget(
+ new ProgressBar().setProgress(() -> mSteam == null ? 0 : (float) mSteam.amount / getCapacity())
+ .setTexture(getProgressbarEmpty(), 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(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_WATER, 10)
+ .setDirection(ProgressBar.Direction.UP)
+ .setPos(83, 25)
+ .setSize(10, 54))
+ .widget(
+ new ProgressBar().setProgress(() -> (float) mTemperature / maxProgresstime())
+ .setTexture(getProgressbarEmpty(), 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(getProgressbarFuel(), 14)
+ .setDirection(ProgressBar.Direction.UP)
+ .setPos(116, 45)
+ .setSize(14, 14))
+ .widget(
+ new DrawableWidget().setDrawable(getOverlaySlotCanister())
+ .setPos(43, 43)
+ .setSize(18, 18));
}
static class LavaTank extends FluidTank {
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java
index 746f0602d6..04fa676c16 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java
@@ -100,7 +100,8 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler {
return String.format(
localizedDescFormat,
GT_Utility.formatNumbers(getMaxOutputPerSecond()),
- GT_Utility.formatNumbers(getMinOutputPerSecond())).split("\\R");
+ GT_Utility.formatNumbers(getMinOutputPerSecond()))
+ .split("\\R");
}
public int getMinOutputPerSecond() {
@@ -278,7 +279,8 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler {
GT_Utility.formatNumbers(getHotTimeSeconds()),
GT_Utility.formatNumbers(getMinOutputPerSecond()),
GT_Utility.formatNumbers(getMaxOutputPerSecond()),
- GT_Utility.formatNumbers(getProductionPerSecond())).split("\\R");
+ GT_Utility.formatNumbers(getProductionPerSecond()))
+ .split("\\R");
}
public int getHeatCapacityPercent() {
@@ -368,9 +370,12 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler {
protected int get(final String aCategory, final String aKey, final int aDefaultValue,
final String... aComments) {
final StringBuilder tCommentBuilder = new StringBuilder();
- for (String tComment : aComments) tCommentBuilder.append(tComment).append('\n');
- tCommentBuilder.append("Default: ").append(aDefaultValue);
- return sMachineFile.mConfig.get(aCategory, aKey, aDefaultValue, tCommentBuilder.toString()).getInt();
+ for (String tComment : aComments) tCommentBuilder.append(tComment)
+ .append('\n');
+ tCommentBuilder.append("Default: ")
+ .append(aDefaultValue);
+ return sMachineFile.mConfig.get(aCategory, aKey, aDefaultValue, tCommentBuilder.toString())
+ .getInt();
}
public int getCalcificationTicks() {
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java
index 719fd13317..42e0fc6117 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java
@@ -43,9 +43,15 @@ public class GT_MetaTileEntity_Boiler_Steel extends GT_MetaTileEntity_Boiler_Bro
texTop = { TextureFactory.of(MACHINE_STEELBRICKS_TOP), TextureFactory.of(OVERLAY_PIPE) },
texSide = { TextureFactory.of(MACHINE_STEELBRICKS_SIDE), TextureFactory.of(OVERLAY_PIPE) },
texFront = { TextureFactory.of(MACHINE_STEELBRICKS_SIDE), TextureFactory.of(BOILER_FRONT),
- TextureFactory.builder().addIcon(BOILER_FRONT_GLOW).glow().build() },
+ TextureFactory.builder()
+ .addIcon(BOILER_FRONT_GLOW)
+ .glow()
+ .build() },
texFrontActive = { TextureFactory.of(MACHINE_STEELBRICKS_SIDE), TextureFactory.of(BOILER_FRONT_ACTIVE),
- TextureFactory.builder().addIcon(BOILER_FRONT_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(BOILER_FRONT_ACTIVE_GLOW)
+ .glow()
+ .build() };
for (int i = 0; i < 17; i++) {
rTextures[0][i] = texBottom;
rTextures[1][i] = texTop;
diff --git a/src/main/java/gregtech/common/tileentities/casings/upgrade/InventoryUpgrade.java b/src/main/java/gregtech/common/tileentities/casings/upgrade/InventoryUpgrade.java
index de144caf11..ef57f40e65 100644
--- a/src/main/java/gregtech/common/tileentities/casings/upgrade/InventoryUpgrade.java
+++ b/src/main/java/gregtech/common/tileentities/casings/upgrade/InventoryUpgrade.java
@@ -85,13 +85,20 @@ public class InventoryUpgrade extends UpgradeCasing {
@Override
public void addUIWidgets(Builder builder, UIBuildContext buildContext) {
- builder.widget(new TextFieldWidget().setGetter(() -> mInventoryName).setSetter((val) -> {
- mInventoryName = val;
- final IMultiBlockController controller = getTarget(false);
- if (controller != null) {
- controller.changeInventoryName(mInventoryName, mInventoryID.toString(), mType);
- }
- }).setSize(100, 25).setPos(50, 30));
+ builder.widget(
+ new TextFieldWidget().setGetter(() -> mInventoryName)
+ .setSetter((val) -> {
+ mInventoryName = val;
+ final IMultiBlockController controller = getTarget(false);
+ if (controller != null) {
+ controller.changeInventoryName(
+ mInventoryName,
+ mInventoryID.toString(),
+ mType);
+ }
+ })
+ .setSize(100, 25)
+ .setPos(50, 30));
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/debug/GT_MetaTileEntity_AdvDebugStructureWriter.java b/src/main/java/gregtech/common/tileentities/debug/GT_MetaTileEntity_AdvDebugStructureWriter.java
index fbc2e4af14..5f77c09e15 100644
--- a/src/main/java/gregtech/common/tileentities/debug/GT_MetaTileEntity_AdvDebugStructureWriter.java
+++ b/src/main/java/gregtech/common/tileentities/debug/GT_MetaTileEntity_AdvDebugStructureWriter.java
@@ -72,11 +72,17 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
- return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1],
- aSide != aFacing ? TextureFactory.of(
- TextureFactory.builder().addIcon(Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE).glow().build())
- : TextureFactory.of(
- TextureFactory.builder().addIcon(Textures.BlockIcons.STRUCTURE_MARK).glow().build()) };
+ return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], aSide != aFacing
+ ? TextureFactory.of(
+ TextureFactory.builder()
+ .addIcon(Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE)
+ .glow()
+ .build())
+ : TextureFactory.of(
+ TextureFactory.builder()
+ .addIcon(Textures.BlockIcons.STRUCTURE_MARK)
+ .glow()
+ .build()) };
}
@Override
@@ -126,8 +132,8 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity
@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
if (aBaseMetaTileEntity.isServerSide()) {
- ExtendedFacing writerFacing = ExtendedFacing
- .of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()));
+ ExtendedFacing writerFacing = ExtendedFacing.of(
+ ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()));
double[] abc = new double[3];
double[] xyz = new double[3];
boundingBox.dim = aBaseMetaTileEntity.getWorld().provider.dimensionId;
@@ -174,7 +180,8 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity
numbers[0],
numbers[1],
numbers[2],
- te -> te.getClass().getCanonicalName(),
+ te -> te.getClass()
+ .getCanonicalName(),
numbers[3],
numbers[4],
numbers[5],
@@ -233,56 +240,86 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setSize(90, 112).setPos(43, 4))
- .widget(new ButtonWidget().setOnClick((clickData, widget) -> {
- if (getBaseMetaTileEntity().isServerSide()) {
- printStructure(widget.getContext().getPlayer());
- }
- }).setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_PRINT).setSize(18, 18)
- .setPos(11, 128)
- .addTooltip(translateToLocal("GT5U.machines.advdebugstructurewriter.gui.print.tooltip")))
- .widget(
- new CycleButtonWidget().setToggle(() -> transpose, aBoolean -> transpose = aBoolean)
- .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_TRANSPOSE).setSize(18, 18)
- .setPos(32, 128).addTooltip(
- translateToLocal(
- "GT5U.machines.advdebugstructurewriter.gui.transpose.tooltip")))
- .widget(
- new CycleButtonWidget()
- .setToggle(() -> showHighlightBox, aBoolean -> showHighlightBox = aBoolean)
- .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_BOUNDING_BOX).setSize(18, 18)
- .setPos(53, 128).addTooltip(
- translateToLocal(
- "GT5U.machines.advdebugstructurewriter.gui.highlight.tooltip")))
- .widget(
- new MultiChildWidget().addChild(
- new TextWidget(translateToLocal("GT5U.machines.advdebugstructurewriter.gui.origin"))
- .setDefaultColor(0xf0f0ff).setPos(0, 0))
- .addChild(
- TextWidget.dynamicString(() -> "A: " + numbers[0]).setDefaultColor(0xf0f0ff)
- .setPos(0, 10))
- .addChild(
- TextWidget.dynamicString(() -> "B: " + numbers[1]).setDefaultColor(0xf0f0ff)
- .setPos(0, 18))
- .addChild(
- TextWidget.dynamicString(() -> "C: " + numbers[2]).setDefaultColor(0xf0f0ff)
- .setPos(0, 26))
- .addChild(
- new TextWidget(
- translateToLocal("GT5U.machines.advdebugstructurewriter.gui.size"))
- .setDefaultColor(0xf0f0ff).setPos(0, 52))
- .addChild(
- TextWidget.dynamicString(() -> "A: " + numbers[3]).setDefaultColor(0xf0f0ff)
- .setPos(0, 62))
- .addChild(
- TextWidget.dynamicString(() -> "B: " + numbers[4]).setDefaultColor(0xf0f0ff)
- .setPos(0, 70))
- .addChild(
- TextWidget.dynamicString(() -> "C: " + numbers[5]).setDefaultColor(0xf0f0ff)
- .setPos(0, 78))
- .setPos(46, 8));
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK)
+ .setSize(90, 112)
+ .setPos(43, 4))
+ .widget(new ButtonWidget().setOnClick((clickData, widget) -> {
+ if (getBaseMetaTileEntity().isServerSide()) {
+ printStructure(
+ widget.getContext()
+ .getPlayer());
+ }
+ })
+ .setBackground(
+ GT_UITextures.BUTTON_STANDARD,
+ GT_UITextures.OVERLAY_BUTTON_PRINT)
+ .setSize(18, 18)
+ .setPos(11, 128)
+ .addTooltip(
+ translateToLocal(
+ "GT5U.machines.advdebugstructurewriter.gui.print.tooltip")))
+ .widget(
+ new CycleButtonWidget().setToggle(() -> transpose, aBoolean -> transpose = aBoolean)
+ .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_TRANSPOSE)
+ .setSize(18, 18)
+ .setPos(32, 128)
+ .addTooltip(
+ translateToLocal(
+ "GT5U.machines.advdebugstructurewriter.gui.transpose.tooltip")))
+ .widget(
+ new CycleButtonWidget().setToggle(
+ () -> showHighlightBox,
+ aBoolean -> showHighlightBox = aBoolean)
+ .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_BOUNDING_BOX)
+ .setSize(18, 18)
+ .setPos(53, 128)
+ .addTooltip(
+ translateToLocal(
+ "GT5U.machines.advdebugstructurewriter.gui.highlight.tooltip")))
+ .widget(
+ new MultiChildWidget().addChild(
+ new TextWidget(
+ translateToLocal("GT5U.machines.advdebugstructurewriter.gui.origin"))
+ .setDefaultColor(
+ 0xf0f0ff)
+ .setPos(
+ 0,
+ 0))
+ .addChild(
+ TextWidget.dynamicString(() -> "A: " + numbers[0])
+ .setDefaultColor(0xf0f0ff)
+ .setPos(0, 10))
+ .addChild(
+ TextWidget.dynamicString(() -> "B: " + numbers[1])
+ .setDefaultColor(0xf0f0ff)
+ .setPos(0, 18))
+ .addChild(
+ TextWidget.dynamicString(() -> "C: " + numbers[2])
+ .setDefaultColor(0xf0f0ff)
+ .setPos(0, 26))
+ .addChild(
+ new TextWidget(
+ translateToLocal(
+ "GT5U.machines.advdebugstructurewriter.gui.size")).setDefaultColor(
+ 0xf0f0ff)
+ .setPos(
+ 0,
+ 52))
+ .addChild(
+ TextWidget.dynamicString(() -> "A: " + numbers[3])
+ .setDefaultColor(0xf0f0ff)
+ .setPos(0, 62))
+ .addChild(
+ TextWidget.dynamicString(() -> "B: " + numbers[4])
+ .setDefaultColor(0xf0f0ff)
+ .setPos(0, 70))
+ .addChild(
+ TextWidget.dynamicString(() -> "C: " + numbers[5])
+ .setDefaultColor(0xf0f0ff)
+ .setPos(0, 78))
+ .setPos(46, 8));
addChangeNumberButtons(builder, GT_UITextures.OVERLAY_BUTTON_MINUS_LARGE, -512, -64, 7);
addChangeNumberButtons(builder, GT_UITextures.OVERLAY_BUTTON_MINUS_SMALL, -16, -1, 25);
addChangeNumberButtons(builder, GT_UITextures.OVERLAY_BUTTON_PLUS_SMALL, 16, 1, 133);
@@ -297,8 +334,9 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity
builder.widget(
new ButtonWidget().setOnClick(
(clickData, widget) -> numbers[index] += clickData.shift ? addNumberShift : addNumber)
- .setBackground(GT_UITextures.BUTTON_STANDARD, overlay).setSize(18, 18)
- .setPos(xPos, yPos[index]));
+ .setBackground(GT_UITextures.BUTTON_STANDARD, overlay)
+ .setSize(18, 18)
+ .setPos(xPos, yPos[index]));
}
}
@@ -310,7 +348,9 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity
@Override
public void addGregTechLogo(ModularWindow.Builder builder) {
builder.widget(
- new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17).setPos(113, 96));
+ new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo())
+ .setSize(17, 17)
+ .setPos(113, 96));
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java
index d2304cc948..3db3a5eef9 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java
@@ -135,8 +135,11 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
final double z = aBaseMetaTileEntity.getOffsetZ(topFacing, 1) + 2D / 16D
+ XSTR_INSTANCE.nextFloat() * 14D / 16D;
- new ParticleEventBuilder().setMotion(0D, 0D, 0D).setPosition(x, y, z)
- .setWorld(getBaseMetaTileEntity().getWorld()).setIdentifier(ParticleFX.SMOKE).run();
+ new ParticleEventBuilder().setMotion(0D, 0D, 0D)
+ .setPosition(x, y, z)
+ .setWorld(getBaseMetaTileEntity().getWorld())
+ .setIdentifier(ParticleFX.SMOKE)
+ .run();
}
}
}
@@ -146,7 +149,10 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getFront(aColor)[0],
TextureFactory.of(
TextureFactory.of(DIESEL_GENERATOR_FRONT),
- TextureFactory.builder().addIcon(DIESEL_GENERATOR_FRONT_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(DIESEL_GENERATOR_FRONT_GLOW)
+ .glow()
+ .build()),
OVERLAYS_ENERGY_OUT[this.mTier] };
}
@@ -155,7 +161,10 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getBack(aColor)[0],
TextureFactory.of(
TextureFactory.of(DIESEL_GENERATOR_BACK),
- TextureFactory.builder().addIcon(DIESEL_GENERATOR_BACK_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(DIESEL_GENERATOR_BACK_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -163,7 +172,10 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getBottom(aColor)[0],
TextureFactory.of(
TextureFactory.of(DIESEL_GENERATOR_BOTTOM),
- TextureFactory.builder().addIcon(DIESEL_GENERATOR_BOTTOM_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(DIESEL_GENERATOR_BOTTOM_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -171,7 +183,10 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getTop(aColor)[0],
TextureFactory.of(
TextureFactory.of(DIESEL_GENERATOR_TOP),
- TextureFactory.builder().addIcon(DIESEL_GENERATOR_TOP_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(DIESEL_GENERATOR_TOP_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -179,7 +194,10 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getSides(aColor)[0],
TextureFactory.of(
TextureFactory.of(DIESEL_GENERATOR_SIDE),
- TextureFactory.builder().addIcon(DIESEL_GENERATOR_SIDE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(DIESEL_GENERATOR_SIDE_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -187,7 +205,10 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getFrontActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(DIESEL_GENERATOR_FRONT_ACTIVE),
- TextureFactory.builder().addIcon(DIESEL_GENERATOR_FRONT_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(DIESEL_GENERATOR_FRONT_ACTIVE_GLOW)
+ .glow()
+ .build()),
OVERLAYS_ENERGY_OUT[this.mTier] };
}
@@ -196,7 +217,10 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getBackActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(DIESEL_GENERATOR_BACK_ACTIVE),
- TextureFactory.builder().addIcon(DIESEL_GENERATOR_BACK_ACTIVE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(DIESEL_GENERATOR_BACK_ACTIVE_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -204,7 +228,10 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getBottomActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(DIESEL_GENERATOR_BOTTOM_ACTIVE),
- TextureFactory.builder().addIcon(DIESEL_GENERATOR_BOTTOM_ACTIVE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(DIESEL_GENERATOR_BOTTOM_ACTIVE_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -212,7 +239,10 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getTopActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(DIESEL_GENERATOR_TOP_ACTIVE),
- TextureFactory.builder().addIcon(DIESEL_GENERATOR_TOP_ACTIVE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(DIESEL_GENERATOR_TOP_ACTIVE_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -220,7 +250,10 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getSidesActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(DIESEL_GENERATOR_SIDE_ACTIVE),
- TextureFactory.builder().addIcon(DIESEL_GENERATOR_SIDE_ACTIVE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(DIESEL_GENERATOR_SIDE_ACTIVE_GLOW)
+ .glow()
+ .build()) };
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java
index 90b076abaa..2e0279552a 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java
@@ -94,8 +94,10 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
}
public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile
- .get(ConfigCategories.machineconfig, "GasTurbine.efficiency.tier." + this.mTier, this.mEfficiency);
+ this.mEfficiency = GregTech_API.sMachineFile.get(
+ ConfigCategories.machineconfig,
+ "GasTurbine.efficiency.tier." + this.mTier,
+ this.mEfficiency);
}
@Override
@@ -108,7 +110,10 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
return new ITexture[] { super.getFront(aColor)[0],
TextureFactory.of(
TextureFactory.of(GAS_TURBINE_FRONT),
- TextureFactory.builder().addIcon(GAS_TURBINE_FRONT_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(GAS_TURBINE_FRONT_GLOW)
+ .glow()
+ .build()),
OVERLAYS_ENERGY_OUT[this.mTier] };
}
@@ -117,7 +122,10 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
return new ITexture[] { super.getBack(aColor)[0],
TextureFactory.of(
TextureFactory.of(GAS_TURBINE_BACK),
- TextureFactory.builder().addIcon(GAS_TURBINE_BACK_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(GAS_TURBINE_BACK_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -125,7 +133,10 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
return new ITexture[] { super.getBottom(aColor)[0],
TextureFactory.of(
TextureFactory.of(GAS_TURBINE_BOTTOM),
- TextureFactory.builder().addIcon(GAS_TURBINE_BOTTOM_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(GAS_TURBINE_BOTTOM_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -133,7 +144,10 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
return new ITexture[] { super.getTop(aColor)[0],
TextureFactory.of(
TextureFactory.of(GAS_TURBINE_TOP),
- TextureFactory.builder().addIcon(GAS_TURBINE_TOP_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(GAS_TURBINE_TOP_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -141,7 +155,10 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
return new ITexture[] { super.getSides(aColor)[0],
TextureFactory.of(
TextureFactory.of(GAS_TURBINE_SIDE),
- TextureFactory.builder().addIcon(GAS_TURBINE_SIDE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(GAS_TURBINE_SIDE_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -149,7 +166,10 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
return new ITexture[] { super.getFrontActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(GAS_TURBINE_FRONT_ACTIVE),
- TextureFactory.builder().addIcon(GAS_TURBINE_FRONT_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(GAS_TURBINE_FRONT_ACTIVE_GLOW)
+ .glow()
+ .build()),
OVERLAYS_ENERGY_OUT[this.mTier] };
}
@@ -158,7 +178,10 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
return new ITexture[] { super.getBackActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(GAS_TURBINE_BACK_ACTIVE),
- TextureFactory.builder().addIcon(GAS_TURBINE_BACK_ACTIVE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(GAS_TURBINE_BACK_ACTIVE_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -166,7 +189,10 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
return new ITexture[] { super.getBottomActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(GAS_TURBINE_BOTTOM_ACTIVE),
- TextureFactory.builder().addIcon(GAS_TURBINE_BOTTOM_ACTIVE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(GAS_TURBINE_BOTTOM_ACTIVE_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -174,7 +200,10 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
return new ITexture[] { super.getTopActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(GAS_TURBINE_TOP_ACTIVE),
- TextureFactory.builder().addIcon(GAS_TURBINE_TOP_ACTIVE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(GAS_TURBINE_TOP_ACTIVE_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -182,7 +211,10 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
return new ITexture[] { super.getSidesActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(GAS_TURBINE_SIDE_ACTIVE),
- TextureFactory.builder().addIcon(GAS_TURBINE_SIDE_ACTIVE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(GAS_TURBINE_SIDE_ACTIVE_GLOW)
+ .glow()
+ .build()) };
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java
index 2436beba77..152a849d5a 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java
@@ -42,9 +42,13 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach
}
if (!aActive) return new ITexture[] { BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1],
TextureFactory.of(BlockIcons.MACHINE_CASING_FUSION_GLASS) };
- return new ITexture[] { BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1],
- TextureFactory.of(BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW),
- TextureFactory.builder().addIcon(BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build() };
+ return new ITexture[] {
+ BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(
+ BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW),
+ TextureFactory.builder()
+ .addIcon(BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW)
+ .glow()
+ .build() };
}
@Override
@@ -81,8 +85,9 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach
int aZ = aBaseMetaTileEntity.getZCoord();
for (int i = aBaseMetaTileEntity.getYCoord() + 1; i < aWorld.getHeight() - 1; i++) {
- if (isRodValid
- && aBaseMetaTileEntity.getBlock(aX, i, aZ).getUnlocalizedName().equals("blockFenceIron")) {
+ if (isRodValid && aBaseMetaTileEntity.getBlock(aX, i, aZ)
+ .getUnlocalizedName()
+ .equals("blockFenceIron")) {
aRodValue++;
} else {
isRodValid = false;
@@ -94,8 +99,9 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach
}
if (!aWorld.isThundering() && ((aY + aRodValue) < 128)) aRodValue = 0;
if (XSTR_INSTANCE.nextInt(4 * aWorld.getHeight()) < (aRodValue * (aY + aRodValue))) {
- aBaseMetaTileEntity
- .increaseStoredEnergyUnits(maxEUStore() - aBaseMetaTileEntity.getStoredEU(), false);
+ aBaseMetaTileEntity.increaseStoredEnergyUnits(
+ maxEUStore() - aBaseMetaTileEntity.getStoredEU(),
+ false);
aWorld.addWeatherEffect(new EntityLightningBolt(aWorld, aX, aY + aRodValue, aZ));
}
}
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java
index 6bc904d384..b67993770d 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java
@@ -79,63 +79,93 @@ public class GT_MetaTileEntity_MagicEnergyConverter extends GT_MetaTileEntity_Ba
@Override
public ITexture[] getFront(byte aColor) {
return new ITexture[] { super.getFront(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build(),
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_GLOW)
+ .glow()
+ .build(),
OVERLAYS_ENERGY_OUT[mTier] };
}
@Override
public ITexture[] getBack(byte aColor) {
return new ITexture[] { super.getBack(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_FRONT),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_FRONT_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_FRONT_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottom(byte aColor) {
return new ITexture[] { super.getBottom(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTop(byte aColor) {
return new ITexture[] { super.getTop(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSides(byte aColor) {
return new ITexture[] { super.getSides(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontActive(byte aColor) {
return new ITexture[] { super.getFrontActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build(),
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW)
+ .glow()
+ .build(),
OVERLAYS_ENERGY_OUT[mTier] };
}
@Override
public ITexture[] getBackActive(byte aColor) {
return new ITexture[] { super.getBackActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_FRONT_ACTIVE),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_FRONT_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_FRONT_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomActive(byte aColor) {
return new ITexture[] { super.getBottomActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopActive(byte aColor) {
return new ITexture[] { super.getTopActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSidesActive(byte aColor) {
return new ITexture[] { super.getSidesActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java
index d197c264c7..491eeea306 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java
@@ -119,8 +119,11 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
// noinspection UnstableApiUsage
sAspectsEnergy.put(
tAspect,
- Enums.getIfPresent(TC_Aspects.class, tAspect.getTag().toUpperCase(Locale.ENGLISH))
- .or(TC_Aspects.AER).mValue * sEnergyPerEssentia);
+ Enums.getIfPresent(
+ TC_Aspects.class,
+ tAspect.getTag()
+ .toUpperCase(Locale.ENGLISH))
+ .or(TC_Aspects.AER).mValue * sEnergyPerEssentia);
}
}
}
@@ -251,20 +254,29 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
@Override
public ITexture[] getFront(byte aColor) {
return new ITexture[] { super.getFront(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build(),
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_GLOW)
+ .glow()
+ .build(),
OVERLAYS_ENERGY_OUT[mTier] };
}
@Override
public ITexture[] getBack(byte aColor) {
return new ITexture[] { super.getBack(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_FRONT),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_FRONT_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_FRONT_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottom(byte aColor) {
return new ITexture[] { super.getBottom(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_GLOW)
+ .glow()
+ .build() };
}
@Override
@@ -275,38 +287,56 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
@Override
public ITexture[] getSides(byte aColor) {
return new ITexture[] { super.getSides(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontActive(byte aColor) {
return new ITexture[] { super.getFrontActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build(),
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW)
+ .glow()
+ .build(),
OVERLAYS_ENERGY_OUT[mTier] };
}
@Override
public ITexture[] getBackActive(byte aColor) {
return new ITexture[] { super.getBackActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_FRONT_ACTIVE),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_FRONT_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_FRONT_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomActive(byte aColor) {
return new ITexture[] { super.getBottomActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopActive(byte aColor) {
return new ITexture[] { super.getTopActive(aColor)[0], TextureFactory.of(MACHINE_CASING_DRAGONEGG),
- TextureFactory.builder().addIcon(MACHINE_CASING_DRAGONEGG_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_DRAGONEGG_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSidesActive(byte aColor) {
return new ITexture[] { super.getSidesActive(aColor)[0], TextureFactory.of(MACHINE_CASING_MAGIC_ACTIVE),
- TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
@@ -373,8 +403,10 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
final double oY = aBaseMetaTileEntity.getYCoord() + 17D / 32D;
final double oZ = aBaseMetaTileEntity.getZCoord() + 8D / 16D;
- final ParticleEventBuilder particleEventBuilder = new ParticleEventBuilder()
- .setWorld(getBaseMetaTileEntity().getWorld()).setIdentifier(ParticleFX.PORTAL);
+ final ParticleEventBuilder particleEventBuilder = new ParticleEventBuilder().setWorld(
+ getBaseMetaTileEntity().getWorld())
+ .setIdentifier(
+ ParticleFX.PORTAL);
for (int i = 0; i < 9; i++) {
final double dX = (XSTR_INSTANCE.nextFloat() - 0.5D) / 2D;
@@ -390,7 +422,9 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
final double mY = -(dXZ * dY) / 4D;
final double mZ = dZ * 4D;
- particleEventBuilder.setMotion(mX, mY, mZ).setPosition(x, y, z).run();
+ particleEventBuilder.setMotion(mX, mY, mZ)
+ .setPosition(x, y, z)
+ .run();
}
}
}
@@ -423,7 +457,9 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
}
private boolean isDisenchantableItem(ItemStack aStack) {
- return ((aStack.isItemEnchanted()) && (aStack.getItem().getItemEnchantability() > 0));
+ return ((aStack.isItemEnchanted()) && (aStack.getItem()
+ .getItemEnchantability()
+ > 0));
}
private boolean isEnchantedBook(ItemStack aStack) {
@@ -489,7 +525,8 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
if (!sAllowMultipleEggs) {
if (sActiveSiphon != null && sActiveSiphon != this
&& sActiveSiphon.getBaseMetaTileEntity() != null
- && !sActiveSiphon.getBaseMetaTileEntity().isInvalidTileEntity()
+ && !sActiveSiphon.getBaseMetaTileEntity()
+ .isInvalidTileEntity()
&& sActiveSiphon.isChunkLoaded()
&& sActiveSiphon.hasEgg()) {
getBaseMetaTileEntity().doExplosion(Integer.MAX_VALUE);
@@ -500,9 +537,10 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
Block egg = getBaseMetaTileEntity().getBlockOffset(0, 1, 0);
if (egg == Blocks.dragon_egg) {
return sDragonEggEnergyPerTick;
- } else if (egg.getUnlocalizedName().contains("creeperEgg")) {
- return sCreeperEggEnergyPerTick;
- }
+ } else if (egg.getUnlocalizedName()
+ .contains("creeperEgg")) {
+ return sCreeperEggEnergyPerTick;
+ }
return 0;
}
@@ -569,7 +607,8 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
if (aBlock == Blocks.air) return false;
if (aBlock == Blocks.dragon_egg) return true;
if (aBlock instanceof BlockDragonEgg) return true;
- return (aBlock.getUnlocalizedName().equals("tile.dragonEgg"));
+ return (aBlock.getUnlocalizedName()
+ .equals("tile.dragonEgg"));
}
private boolean isChunkLoaded() {
@@ -678,12 +717,18 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
double tX = tBaseMetaTileEntity.getXCoord();
double tY = tBaseMetaTileEntity.getYCoord();
double tZ = tBaseMetaTileEntity.getZCoord();
- return AxisAlignedBB
- .getBoundingBox(tX - tRange, tY - tRange, tZ - tRange, tX + tRange, tY + tRange, tZ + tRange);
+ return AxisAlignedBB.getBoundingBox(
+ tX - tRange,
+ tY - tRange,
+ tZ - tRange,
+ tX + tRange,
+ tY + tRange,
+ tZ + tRange);
}
private void scanLivingCrystals() {
- World tWorld = mAbsorber.getBaseMetaTileEntity().getWorld();
+ World tWorld = mAbsorber.getBaseMetaTileEntity()
+ .getWorld();
mLivingCrystalIDs.clear();
for (Object o : tWorld.getEntitiesWithinAABB(EntityEnderCrystal.class, getAxisAlignedBB())) {
if (((EntityEnderCrystal) o).isEntityAlive()) {
@@ -698,7 +743,9 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
if (tBaseMetaTileEntity.isInvalidTileEntity()) return;
int tRange = getRange();
int tY = tBaseMetaTileEntity.getYCoord();
- int tMaxY = tBaseMetaTileEntity.getWorld().getHeight() - 1;
+ int tMaxY = tBaseMetaTileEntity.getWorld()
+ .getHeight()
+ - 1;
// Make sure relative Y range stays between 0 and world max Y
int rYMin = (tY - tRange >= 0) ? -tRange : -(tY);
int rYMax = (((tY + tRange) <= tMaxY) ? tRange : tMaxY - tY);
@@ -739,8 +786,13 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
void update() {
if (mAbsorber == null) return;
if (mAbsorber.getBaseMetaTileEntity() == null) return;
- if (mAbsorber.getBaseMetaTileEntity().isInvalidTileEntity()) return;
- if (mAbsorber.getBaseMetaTileEntity().getWorld() == null) return;
+ if (mAbsorber.getBaseMetaTileEntity()
+ .isInvalidTileEntity())
+ return;
+ if (mAbsorber.getBaseMetaTileEntity()
+ .getWorld()
+ == null)
+ return;
scanLivingCrystals();
scanAvailableAspects();
if (mListener != null) {
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java
index 5fe5107dc4..615f512ff0 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java
@@ -90,8 +90,10 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe
}
public int onConfigLoad() {
- return mEfficiency = GregTech_API.sMachineFile
- .get(ConfigCategories.machineconfig, "SolidNaquadah.efficiency.tier." + mTier, getBaseEff());
+ return mEfficiency = GregTech_API.sMachineFile.get(
+ ConfigCategories.machineconfig,
+ "SolidNaquadah.efficiency.tier." + mTier,
+ getBaseEff());
}
@Override
@@ -99,7 +101,10 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getFront(aColor)[0],
TextureFactory.of(
TextureFactory.of(NAQUADAH_REACTOR_SOLID_FRONT),
- TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_FRONT_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(NAQUADAH_REACTOR_SOLID_FRONT_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -107,7 +112,10 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getBack(aColor)[0],
TextureFactory.of(
TextureFactory.of(NAQUADAH_REACTOR_SOLID_BACK),
- TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_BACK_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(NAQUADAH_REACTOR_SOLID_BACK_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -115,7 +123,10 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getBottom(aColor)[0],
TextureFactory.of(
TextureFactory.of(NAQUADAH_REACTOR_SOLID_BOTTOM),
- TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_BOTTOM_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(NAQUADAH_REACTOR_SOLID_BOTTOM_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -123,7 +134,10 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getTop(aColor)[0],
TextureFactory.of(
TextureFactory.of(NAQUADAH_REACTOR_SOLID_TOP),
- TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_TOP_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(NAQUADAH_REACTOR_SOLID_TOP_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -131,38 +145,56 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe
return new ITexture[] { super.getSides(aColor)[0],
TextureFactory.of(
TextureFactory.of(NAQUADAH_REACTOR_SOLID_SIDE),
- TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_SIDE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(NAQUADAH_REACTOR_SOLID_SIDE_GLOW)
+ .glow()
+ .build()) };
}
@Override
public ITexture[] getFrontActive(byte aColor) {
return new ITexture[] { super.getFrontActive(aColor)[0], TextureFactory.of(NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE),
- TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBackActive(byte aColor) {
return new ITexture[] { super.getBackActive(aColor)[0], TextureFactory.of(NAQUADAH_REACTOR_SOLID_BACK_ACTIVE),
- TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_BACK_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(NAQUADAH_REACTOR_SOLID_BACK_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomActive(byte aColor) {
- return new ITexture[] { super.getBottomActive(aColor)[0],
- TextureFactory.of(NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE),
- TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomActive(aColor)[0], TextureFactory.of(NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopActive(byte aColor) {
return new ITexture[] { super.getTopActive(aColor)[0], TextureFactory.of(NAQUADAH_REACTOR_SOLID_TOP_ACTIVE),
- TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_TOP_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(NAQUADAH_REACTOR_SOLID_TOP_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSidesActive(byte aColor) {
return new ITexture[] { super.getSidesActive(aColor)[0], TextureFactory.of(NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE),
- TextureFactory.builder().addIcon(NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java
index 6fbdf73189..6e4bbe2dc7 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java
@@ -62,32 +62,47 @@ public class GT_MetaTileEntity_PlasmaGenerator extends GT_MetaTileEntity_BasicGe
@Override
public ITexture[] getFrontActive(byte aColor) {
return new ITexture[] { super.getFrontActive(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW),
- TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build(),
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW)
+ .glow()
+ .build(),
OVERLAYS_ENERGY_OUT[mTier] };
}
@Override
public ITexture[] getBackActive(byte aColor) {
return new ITexture[] { super.getBackActive(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW),
- TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomActive(byte aColor) {
return new ITexture[] { super.getBottomActive(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW),
- TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopActive(byte aColor) {
return new ITexture[] { super.getTopActive(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW),
- TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSidesActive(byte aColor) {
return new ITexture[] { super.getSidesActive(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS_YELLOW),
- TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW)
+ .glow()
+ .build() };
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java
index fc0746f634..6d59c050d0 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java
@@ -71,8 +71,10 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
}
public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile
- .get(ConfigCategories.machineconfig, "SteamTurbine.efficiency.tier." + this.mTier, 6 + this.mTier);
+ this.mEfficiency = GregTech_API.sMachineFile.get(
+ ConfigCategories.machineconfig,
+ "SteamTurbine.efficiency.tier." + this.mTier,
+ 6 + this.mTier);
}
@Override
@@ -96,7 +98,10 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
return new ITexture[] { super.getFront(aColor)[0],
TextureFactory.of(
TextureFactory.of(STEAM_TURBINE_FRONT),
- TextureFactory.builder().addIcon(STEAM_TURBINE_FRONT_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(STEAM_TURBINE_FRONT_GLOW)
+ .glow()
+ .build()),
OVERLAYS_ENERGY_OUT[this.mTier] };
}
@@ -105,7 +110,10 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
return new ITexture[] { super.getBack(aColor)[0],
TextureFactory.of(
TextureFactory.of(STEAM_TURBINE_BACK),
- TextureFactory.builder().addIcon(STEAM_TURBINE_BACK_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(STEAM_TURBINE_BACK_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -113,7 +121,10 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
return new ITexture[] { super.getBottom(aColor)[0],
TextureFactory.of(
TextureFactory.of(STEAM_TURBINE_BOTTOM),
- TextureFactory.builder().addIcon(STEAM_TURBINE_BOTTOM_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(STEAM_TURBINE_BOTTOM_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -121,7 +132,10 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
return new ITexture[] { super.getTop(aColor)[0],
TextureFactory.of(
TextureFactory.of(STEAM_TURBINE_TOP),
- TextureFactory.builder().addIcon(STEAM_TURBINE_TOP_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(STEAM_TURBINE_TOP_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -129,7 +143,10 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
return new ITexture[] { super.getSides(aColor)[0],
TextureFactory.of(
TextureFactory.of(STEAM_TURBINE_SIDE),
- TextureFactory.builder().addIcon(STEAM_TURBINE_SIDE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(STEAM_TURBINE_SIDE_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -137,7 +154,10 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
return new ITexture[] { super.getFrontActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(STEAM_TURBINE_FRONT_ACTIVE),
- TextureFactory.builder().addIcon(STEAM_TURBINE_FRONT_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(STEAM_TURBINE_FRONT_ACTIVE_GLOW)
+ .glow()
+ .build()),
OVERLAYS_ENERGY_OUT[this.mTier] };
}
@@ -146,7 +166,10 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
return new ITexture[] { super.getBackActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(STEAM_TURBINE_BACK_ACTIVE),
- TextureFactory.builder().addIcon(STEAM_TURBINE_BACK_ACTIVE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(STEAM_TURBINE_BACK_ACTIVE_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -154,7 +177,10 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
return new ITexture[] { super.getBottomActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(STEAM_TURBINE_BOTTOM_ACTIVE),
- TextureFactory.builder().addIcon(STEAM_TURBINE_BOTTOM_ACTIVE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(STEAM_TURBINE_BOTTOM_ACTIVE_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -162,7 +188,10 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
return new ITexture[] { super.getTopActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(STEAM_TURBINE_TOP_ACTIVE),
- TextureFactory.builder().addIcon(STEAM_TURBINE_TOP_ACTIVE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(STEAM_TURBINE_TOP_ACTIVE_GLOW)
+ .glow()
+ .build()) };
}
@Override
@@ -170,7 +199,10 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
return new ITexture[] { super.getSidesActive(aColor)[0],
TextureFactory.of(
TextureFactory.of(STEAM_TURBINE_SIDE_ACTIVE),
- TextureFactory.builder().addIcon(STEAM_TURBINE_SIDE_ACTIVE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(STEAM_TURBINE_SIDE_ACTIVE_GLOW)
+ .glow()
+ .build()) };
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java
index 4a5cb72be9..bf027be770 100644
--- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java
@@ -33,12 +33,15 @@ public class GT_MetaTileEntity_BasicHull_Bronze extends GT_MetaTileEntity_BasicH
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
ITexture[][][] rTextures = new ITexture[3][17][];
for (byte i = -1; i < 16; i = (byte) (i + 1)) {
- rTextures[0][(i + 1)] = new ITexture[] { TextureFactory
- .of(Textures.BlockIcons.MACHINE_BRONZE_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
- rTextures[1][(i + 1)] = new ITexture[] { TextureFactory
- .of(Textures.BlockIcons.MACHINE_BRONZE_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
- rTextures[2][(i + 1)] = new ITexture[] { TextureFactory
- .of(Textures.BlockIcons.MACHINE_BRONZE_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ rTextures[0][(i + 1)] = new ITexture[] { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_BRONZE_BOTTOM,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ rTextures[1][(i + 1)] = new ITexture[] { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_BRONZE_TOP,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ rTextures[2][(i + 1)] = new ITexture[] { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_BRONZE_SIDE,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
}
return rTextures;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java
index 85e3218f9e..6be36f5798 100644
--- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java
+++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java
@@ -38,14 +38,17 @@ public class GT_MetaTileEntity_BasicHull_BronzeBricks extends GT_MetaTileEntity_
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
ITexture[][][] rTextures = new ITexture[3][17][];
for (byte i = -1; i < 16; i = (byte) (i + 1)) {
- ITexture[] tmp0 = { TextureFactory
- .of(Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ ITexture[] tmp0 = { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
rTextures[0][(i + 1)] = tmp0;
- ITexture[] tmp1 = { TextureFactory
- .of(Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ ITexture[] tmp1 = { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
rTextures[1][(i + 1)] = tmp1;
- ITexture[] tmp2 = { TextureFactory
- .of(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ ITexture[] tmp2 = { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
rTextures[2][(i + 1)] = tmp2;
}
return rTextures;
diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java
index 2ec1d32e36..72785918b6 100644
--- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java
@@ -32,14 +32,16 @@ public class GT_MetaTileEntity_BasicHull_Steel extends GT_MetaTileEntity_BasicHu
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
ITexture[][][] rTextures = new ITexture[3][17][];
for (byte i = -1; i < 16; i = (byte) (i + 1)) {
- ITexture[] tmp0 = { TextureFactory
- .of(Textures.BlockIcons.MACHINE_STEEL_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ ITexture[] tmp0 = { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_STEEL_BOTTOM,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
rTextures[0][(i + 1)] = tmp0;
ITexture[] tmp1 = {
TextureFactory.of(Textures.BlockIcons.MACHINE_STEEL_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
rTextures[1][(i + 1)] = tmp1;
- ITexture[] tmp2 = { TextureFactory
- .of(Textures.BlockIcons.MACHINE_STEEL_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ ITexture[] tmp2 = { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_STEEL_SIDE,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
rTextures[2][(i + 1)] = tmp2;
}
return rTextures;
diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java
index e31e793f03..39cd8fec3c 100644
--- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java
+++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java
@@ -38,14 +38,17 @@ public class GT_MetaTileEntity_BasicHull_SteelBricks extends GT_MetaTileEntity_B
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
ITexture[][][] rTextures = new ITexture[3][17][];
for (byte i = -1; i < 16; i = (byte) (i + 1)) {
- ITexture[] tmp0 = { TextureFactory
- .of(Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ ITexture[] tmp0 = { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
rTextures[0][(i + 1)] = tmp0;
- ITexture[] tmp1 = { TextureFactory
- .of(Textures.BlockIcons.MACHINE_STEELBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ ITexture[] tmp1 = { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_STEELBRICKS_TOP,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
rTextures[1][(i + 1)] = tmp1;
- ITexture[] tmp2 = { TextureFactory
- .of(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ ITexture[] tmp2 = { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
rTextures[2][(i + 1)] = tmp2;
}
return rTextures;
diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_InputBus_ME.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_InputBus_ME.java
index d2f116bd1b..6910fd9de5 100644
--- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_InputBus_ME.java
+++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_InputBus_ME.java
@@ -142,7 +142,7 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch
gridProxy.setFlags(GridFlags.REQUIRE_CHANNEL);
if (getBaseMetaTileEntity().getWorld() != null) gridProxy.setOwner(
getBaseMetaTileEntity().getWorld()
- .getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName()));
+ .getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName()));
}
}
return this.gridProxy;
@@ -331,7 +331,8 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch
return null;
}
try {
- IMEMonitor<IAEItemStack> sg = proxy.getStorage().getItemInventory();
+ IMEMonitor<IAEItemStack> sg = proxy.getStorage()
+ .getItemInventory();
IAEItemStack request = AEItemStack.create(mInventory[aIndex]);
request.setStackSize(Integer.MAX_VALUE);
IAEItemStack result = sg.extractItems(request, Actionable.SIMULATE, getRequestSource());
@@ -375,8 +376,10 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch
if (GregTech_API.mAE2) {
AENetworkProxy proxy = getProxy();
try {
- IMEMonitor<IAEItemStack> sg = proxy.getStorage().getItemInventory();
- Iterator<IAEItemStack> iterator = sg.getStorageList().iterator();
+ IMEMonitor<IAEItemStack> sg = proxy.getStorage()
+ .getItemInventory();
+ Iterator<IAEItemStack> iterator = sg.getStorageList()
+ .iterator();
int index = 0;
while (iterator.hasNext() && index < SLOT_COUNT) {
IAEItemStack currItem = iterator.next();
@@ -409,14 +412,13 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch
if (oldStack == null || oldStack.stackSize < savedStackSizes[i]) {
AENetworkProxy proxy = getProxy();
try {
- IMEMonitor<IAEItemStack> sg = proxy.getStorage().getItemInventory();
+ IMEMonitor<IAEItemStack> sg = proxy.getStorage()
+ .getItemInventory();
IAEItemStack request = AEItemStack.create(mInventory[i]);
request.setStackSize(savedStackSizes[i] - (oldStack == null ? 0 : oldStack.stackSize));
sg.extractItems(request, Actionable.MODULATE, getRequestSource());
- proxy.getEnergy().extractAEPower(
- request.getStackSize(),
- Actionable.MODULATE,
- PowerMultiplier.CONFIG);
+ proxy.getEnergy()
+ .extractAEPower(request.getStackSize(), Actionable.MODULATE, PowerMultiplier.CONFIG);
setInventorySlotContents(i + SLOT_COUNT, oldStack);
} catch (final GridAccessException ignored) {}
}
@@ -439,7 +441,8 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch
return null;
}
try {
- IMEMonitor<IAEItemStack> sg = proxy.getStorage().getItemInventory();
+ IMEMonitor<IAEItemStack> sg = proxy.getStorage()
+ .getItemInventory();
IAEItemStack request = AEItemStack.create(mInventory[aIndex]);
request.setStackSize(Integer.MAX_VALUE);
IAEItemStack result = sg.extractItems(request, Actionable.SIMULATE, getRequestSource());
@@ -462,61 +465,77 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch
final SlotWidget[] aeSlotWidgets = new SlotWidget[16];
buildContext.addSyncedWindow(CONFIG_WINDOW_ID, this::createStackSizeConfigurationWindow);
builder.widget(
- SlotGroup.ofItemHandler(inventoryHandler, 4).startFromSlot(0).endAtSlot(15).phantom(true)
- .background(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_ARROW_ME)
- .widgetCreator(slot -> new SlotWidget(slot) {
-
- @Override
- protected void phantomClick(ClickData clickData, ItemStack cursorStack) {
- if (clickData.mouseButton != 0 || autoPullItemList) return;
- final int aSlotIndex = getMcSlot().getSlotIndex();
- if (cursorStack == null) {
- getMcSlot().putStack(null);
- } else {
- if (containsSuchStack(cursorStack)) return;
- getMcSlot().putStack(GT_Utility.copyAmount(1L, cursorStack));
- }
- if (getBaseMetaTileEntity().isServerSide()) {
- final ItemStack newInfo = updateInformationSlot(aSlotIndex, cursorStack);
- aeSlotWidgets[getMcSlot().getSlotIndex()].getMcSlot().putStack(newInfo);
- }
- }
-
- private boolean containsSuchStack(ItemStack tStack) {
- for (int i = 0; i < 16; ++i) {
- if (GT_Utility.areStacksEqual(mInventory[i], tStack, false)) return true;
- }
- return false;
- }
- }).build().setPos(7, 9))
- .widget(
- SlotGroup.ofItemHandler(inventoryHandler, 4).startFromSlot(16).endAtSlot(31).phantom(true)
+ SlotGroup.ofItemHandler(inventoryHandler, 4)
+ .startFromSlot(0)
+ .endAtSlot(15)
+ .phantom(true)
+ .background(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_ARROW_ME)
+ .widgetCreator(slot -> new SlotWidget(slot) {
+
+ @Override
+ protected void phantomClick(ClickData clickData, ItemStack cursorStack) {
+ if (clickData.mouseButton != 0 || autoPullItemList) return;
+ final int aSlotIndex = getMcSlot().getSlotIndex();
+ if (cursorStack == null) {
+ getMcSlot().putStack(null);
+ } else {
+ if (containsSuchStack(cursorStack)) return;
+ getMcSlot().putStack(GT_Utility.copyAmount(1L, cursorStack));
+ }
+ if (getBaseMetaTileEntity().isServerSide()) {
+ final ItemStack newInfo = updateInformationSlot(aSlotIndex, cursorStack);
+ aeSlotWidgets[getMcSlot().getSlotIndex()].getMcSlot()
+ .putStack(newInfo);
+ }
+ }
+
+ private boolean containsSuchStack(ItemStack tStack) {
+ for (int i = 0; i < 16; ++i) {
+ if (GT_Utility.areStacksEqual(mInventory[i], tStack, false)) return true;
+ }
+ return false;
+ }
+ })
+ .build()
+ .setPos(7, 9))
+ .widget(
+ SlotGroup.ofItemHandler(inventoryHandler, 4)
+ .startFromSlot(16)
+ .endAtSlot(31)
+ .phantom(true)
.background(GT_UITextures.SLOT_DARK_GRAY)
.widgetCreator(
- slot -> aeSlotWidgets[slot.getSlotIndex() - 16] = new AESlotWidget(slot)
- .disableInteraction())
- .build().setPos(97, 9))
- .widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_DOUBLE).setPos(82, 40)
- .setSize(12, 12))
- .widget(new ButtonWidget().setOnClick((clickData, widget) -> {
- if (clickData.mouseButton == 0) {
- setAutoPullItemList(!autoPullItemList);
- } else if (clickData.mouseButton == 1 && !widget.isClient()) {
- widget.getContext().openSyncedWindow(CONFIG_WINDOW_ID);
- }
- }).setPlayClickSound(true).setBackground(() -> {
- List<UITexture> ret = new ArrayList<>();
- ret.add(GT_UITextures.BUTTON_STANDARD);
- if (autoPullItemList) ret.add(GT_UITextures.OVERLAY_BUTTON_AUTOPULL_ME);
- else ret.add(GT_UITextures.OVERLAY_BUTTON_AUTOPULL_ME_DISABLED);
- return ret.toArray(new IDrawable[0]);
- }).addTooltips(
- ImmutableList.of(
- "Click to toggle automatic item pulling from ME.",
- "Right-Click to edit minimum stack size for item pulling."))
- .setSize(16, 16).setPos(80, 10))
- .widget(new FakeSyncWidget.BooleanSyncer(() -> autoPullItemList, this::setAutoPullItemList));
+ slot -> aeSlotWidgets[slot.getSlotIndex()
+ - 16] = new AESlotWidget(slot).disableInteraction())
+ .build()
+ .setPos(97, 9))
+ .widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_ARROW_DOUBLE)
+ .setPos(82, 40)
+ .setSize(12, 12))
+ .widget(new ButtonWidget().setOnClick((clickData, widget) -> {
+ if (clickData.mouseButton == 0) {
+ setAutoPullItemList(!autoPullItemList);
+ } else if (clickData.mouseButton == 1 && !widget.isClient()) {
+ widget.getContext()
+ .openSyncedWindow(CONFIG_WINDOW_ID);
+ }
+ })
+ .setPlayClickSound(true)
+ .setBackground(() -> {
+ List<UITexture> ret = new ArrayList<>();
+ ret.add(GT_UITextures.BUTTON_STANDARD);
+ if (autoPullItemList) ret.add(GT_UITextures.OVERLAY_BUTTON_AUTOPULL_ME);
+ else ret.add(GT_UITextures.OVERLAY_BUTTON_AUTOPULL_ME_DISABLED);
+ return ret.toArray(new IDrawable[0]);
+ })
+ .addTooltips(
+ ImmutableList.of(
+ "Click to toggle automatic item pulling from ME.",
+ "Right-Click to edit minimum stack size for item pulling."))
+ .setSize(16, 16)
+ .setPos(80, 10))
+ .widget(new FakeSyncWidget.BooleanSyncer(() -> autoPullItemList, this::setAutoPullItemList));
}
protected ModularWindow createStackSizeConfigurationWindow(final EntityPlayer player) {
@@ -529,22 +548,34 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch
builder.setGuiTint(getGUIColorization());
builder.setDraggable(true);
builder.setPos(
- (size, window) -> Alignment.Center.getAlignedPos(size, new Size(PARENT_WIDTH, PARENT_HEIGHT)).add(
- Alignment.TopRight.getAlignedPos(new Size(PARENT_WIDTH, PARENT_HEIGHT), new Size(WIDTH, HEIGHT))
- .add(WIDTH - 3, 0)));
- builder.widget(new TextWidget("Min Stack Size").setPos(3, 2).setSize(74, 14)).widget(
- new TextFieldWidget().setSetterInt(val -> minAutoPullStackSize = val)
- .setGetterInt(() -> minAutoPullStackSize).setNumbers(1, Integer.MAX_VALUE)
- .setOnScrollNumbers(1, 4, 64).setTextAlignment(Alignment.Center)
- .setTextColor(Color.WHITE.normal).setSize(36, 18).setPos(19, 18)
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD));
+ (size, window) -> Alignment.Center.getAlignedPos(size, new Size(PARENT_WIDTH, PARENT_HEIGHT))
+ .add(
+ Alignment.TopRight.getAlignedPos(
+ new Size(PARENT_WIDTH, PARENT_HEIGHT),
+ new Size(WIDTH, HEIGHT))
+ .add(WIDTH - 3, 0)));
+ builder.widget(
+ new TextWidget("Min Stack Size").setPos(3, 2)
+ .setSize(74, 14))
+ .widget(
+ new TextFieldWidget().setSetterInt(val -> minAutoPullStackSize = val)
+ .setGetterInt(() -> minAutoPullStackSize)
+ .setNumbers(1, Integer.MAX_VALUE)
+ .setOnScrollNumbers(1, 4, 64)
+ .setTextAlignment(Alignment.Center)
+ .setTextColor(Color.WHITE.normal)
+ .setSize(36, 18)
+ .setPos(19, 18)
+ .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD));
return builder.build();
}
@Override
public void addGregTechLogo(ModularWindow.Builder builder) {
builder.widget(
- new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17).setPos(80, 63));
+ new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo())
+ .setSize(17, 17)
+ .setPos(80, 63));
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java
index 3e802b6304..70a03a9f03 100644
--- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java
+++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java
@@ -47,7 +47,10 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc
private BaseActionSource requestSource = null;
private AENetworkProxy gridProxy = null;
- IItemList<IAEItemStack> itemCache = GregTech_API.mAE2 ? AEApi.instance().storage().createItemList() : null;
+ IItemList<IAEItemStack> itemCache = GregTech_API.mAE2 ? AEApi.instance()
+ .storage()
+ .createItemList()
+ : null;
long lastOutputTick = 0;
long tickCounter = 0;
boolean lastOutputFailed = false;
@@ -104,7 +107,10 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc
*/
public int store(final ItemStack stack) {
if (!infiniteCache && lastOutputFailed) return stack.stackSize;
- itemCache.add(AEApi.instance().storage().createItemStack(stack));
+ itemCache.add(
+ AEApi.instance()
+ .storage()
+ .createItemStack(stack));
return 0;
}
@@ -125,10 +131,13 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc
@Override
public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- if (!getBaseMetaTileEntity().getCoverInfoAtSide(aSide).isGUIClickable()) return;
+ if (!getBaseMetaTileEntity().getCoverInfoAtSide(aSide)
+ .isGUIClickable())
+ return;
infiniteCache = !infiniteCache;
- GT_Utility
- .sendChatToPlayer(aPlayer, StatCollector.translateToLocal("GT5U.hatch.infiniteCache." + infiniteCache));
+ GT_Utility.sendChatToPlayer(
+ aPlayer,
+ StatCollector.translateToLocal("GT5U.hatch.infiniteCache." + infiniteCache));
}
@Override
@@ -143,7 +152,7 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc
gridProxy.setFlags(GridFlags.REQUIRE_CHANNEL);
if (getBaseMetaTileEntity().getWorld() != null) gridProxy.setOwner(
getBaseMetaTileEntity().getWorld()
- .getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName()));
+ .getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName()));
}
}
return this.gridProxy;
@@ -160,7 +169,8 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc
return;
}
try {
- IMEMonitor<IAEItemStack> sg = proxy.getStorage().getItemInventory();
+ IMEMonitor<IAEItemStack> sg = proxy.getStorage()
+ .getItemInventory();
for (IAEItemStack s : itemCache) {
if (s.getStackSize() == 0) continue;
IAEItemStack rest = Platform.poweredInsert(proxy.getEnergy(), sg, s, getRequest());
@@ -206,7 +216,8 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc
if (s.getStackSize() == 0) continue;
NBTTagCompound tag = new NBTTagCompound();
NBTTagCompound tagItemStack = new NBTTagCompound();
- s.getItemStack().writeToNBT(tagItemStack);
+ s.getItemStack()
+ .writeToNBT(tagItemStack);
tag.setTag("itemStack", tagItemStack);
tag.setLong("size", s.getStackSize());
items.appendTag(tag);
@@ -222,8 +233,10 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc
if (GregTech_API.mAE2) {
NBTBase t = aNBT.getTag("cachedStack"); // legacy
- if (t instanceof NBTTagCompound)
- itemCache.add(AEApi.instance().storage().createItemStack(GT_Utility.loadItem((NBTTagCompound) t)));
+ if (t instanceof NBTTagCompound) itemCache.add(
+ AEApi.instance()
+ .storage()
+ .createItemStack(GT_Utility.loadItem((NBTTagCompound) t)));
t = aNBT.getTag("cachedItems");
if (t instanceof NBTTagList) {
NBTTagList l = (NBTTagList) t;
@@ -231,12 +244,15 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc
NBTTagCompound tag = l.getCompoundTagAt(i);
if (!tag.hasKey("itemStack")) { // legacy #868
itemCache.add(
- AEApi.instance().storage().createItemStack(GT_Utility.loadItem(l.getCompoundTagAt(i))));
+ AEApi.instance()
+ .storage()
+ .createItemStack(GT_Utility.loadItem(l.getCompoundTagAt(i))));
continue;
}
NBTTagCompound tagItemStack = tag.getCompoundTag("itemStack");
- final IAEItemStack s = AEApi.instance().storage()
- .createItemStack(GT_Utility.loadItem(tagItemStack));
+ final IAEItemStack s = AEApi.instance()
+ .storage()
+ .createItemStack(GT_Utility.loadItem(tagItemStack));
if (s != null) {
s.setStackSize(tag.getLong("size"));
itemCache.add(s);
@@ -274,7 +290,8 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc
int counter = 0;
for (IAEItemStack s : itemCache) {
ss.add(
- s.getItem().getItemStackDisplayName(s.getItemStack()) + ": "
+ s.getItem()
+ .getItemStackDisplayName(s.getItemStack()) + ": "
+ EnumChatFormatting.GOLD
+ nc.toWideReadableForm(s.getStackSize())
+ EnumChatFormatting.RESET);
diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java
index 8ae9b395c1..edcbd21b16 100644
--- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java
+++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java
@@ -51,7 +51,10 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O
private BaseActionSource requestSource = null;
private AENetworkProxy gridProxy = null;
- IItemList<IAEFluidStack> fluidCache = GregTech_API.mAE2 ? AEApi.instance().storage().createFluidList() : null;
+ IItemList<IAEFluidStack> fluidCache = GregTech_API.mAE2 ? AEApi.instance()
+ .storage()
+ .createFluidList()
+ : null;
long lastOutputTick = 0;
long tickCounter = 0;
boolean lastOutputFailed = false;
@@ -111,7 +114,10 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O
*/
public int tryFillAE(final FluidStack aFluid) {
if ((!infiniteCache && lastOutputFailed) || aFluid == null) return 0;
- fluidCache.add(AEApi.instance().storage().createFluidStack(aFluid));
+ fluidCache.add(
+ AEApi.instance()
+ .storage()
+ .createFluidStack(aFluid));
return aFluid.amount;
}
@@ -146,7 +152,9 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O
@Override
public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
// Don't allow to lock fluid in me fluid hatch
- if (!getBaseMetaTileEntity().getCoverInfoAtSide(aSide).isGUIClickable()) return;
+ if (!getBaseMetaTileEntity().getCoverInfoAtSide(aSide)
+ .isGUIClickable())
+ return;
infiniteCache = !infiniteCache;
GT_Utility.sendChatToPlayer(
aPlayer,
@@ -165,7 +173,7 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O
gridProxy.setFlags(GridFlags.REQUIRE_CHANNEL);
if (getBaseMetaTileEntity().getWorld() != null) gridProxy.setOwner(
getBaseMetaTileEntity().getWorld()
- .getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName()));
+ .getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName()));
}
}
return this.gridProxy;
@@ -182,7 +190,8 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O
return;
}
try {
- IMEMonitor<IAEFluidStack> sg = proxy.getStorage().getFluidInventory();
+ IMEMonitor<IAEFluidStack> sg = proxy.getStorage()
+ .getFluidInventory();
for (IAEFluidStack s : fluidCache) {
if (s.getStackSize() == 0) continue;
IAEFluidStack rest = fluidAEInsert(proxy.getEnergy(), sg, s, getRequest());
@@ -227,7 +236,8 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O
if (s.getStackSize() == 0) continue;
NBTTagCompound tag = new NBTTagCompound();
NBTTagCompound tagFluidStack = new NBTTagCompound();
- s.getFluidStack().writeToNBT(tagFluidStack);
+ s.getFluidStack()
+ .writeToNBT(tagFluidStack);
tag.setTag("fluidStack", tagFluidStack);
tag.setLong("size", s.getStackSize());
fluids.appendTag(tag);
@@ -247,8 +257,9 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O
for (int i = 0; i < l.tagCount(); ++i) {
NBTTagCompound tag = l.getCompoundTagAt(i);
NBTTagCompound tagFluidStack = tag.getCompoundTag("fluidStack");
- final IAEFluidStack s = AEApi.instance().storage()
- .createFluidStack(GT_Utility.loadFluid(tagFluidStack));
+ final IAEFluidStack s = AEApi.instance()
+ .storage()
+ .createFluidStack(GT_Utility.loadFluid(tagFluidStack));
if (s != null) {
s.setStackSize(tag.getLong("size"));
fluidCache.add(s);
@@ -286,7 +297,8 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O
int counter = 0;
for (IAEFluidStack s : fluidCache) {
ss.add(
- s.getFluidStack().getLocalizedName() + ": "
+ s.getFluidStack()
+ .getLocalizedName() + ": "
+ EnumChatFormatting.GOLD
+ nc.toWideReadableForm(s.getStackSize())
+ " mB"
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java
index 34589d2c1c..ad55276576 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java
@@ -56,28 +56,52 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba
"", // NEI name
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_TOP_ROCK_BREAKER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_GLOW).glow().build()));
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()));
radius = aRadius;
step = aStep;
}
@@ -142,10 +166,14 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba
GT_Utility.ItemNBT.setAdvancedProspectionData(
mTier,
aStack,
- this.getBaseMetaTileEntity().getXCoord(),
- this.getBaseMetaTileEntity().getYCoord(),
- this.getBaseMetaTileEntity().getZCoord(),
- this.getBaseMetaTileEntity().getWorld().provider.dimensionId,
+ this.getBaseMetaTileEntity()
+ .getXCoord(),
+ this.getBaseMetaTileEntity()
+ .getYCoord(),
+ this.getBaseMetaTileEntity()
+ .getZCoord(),
+ this.getBaseMetaTileEntity()
+ .getWorld().provider.dimensionId,
tOils,
GT_Utility.sortByValueToList(tOres),
radius);
@@ -173,9 +201,10 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba
for (int i = 0; i < oilfieldSize; i++) {
for (int j = 0; j < oilfieldSize; j++) {
- Chunk tChunk = getBaseMetaTileEntity().getWorld().getChunkFromChunkCoords(
- xChunk + i + x * oilfieldSize,
- zChunk + j + z * oilfieldSize);
+ Chunk tChunk = getBaseMetaTileEntity().getWorld()
+ .getChunkFromChunkCoords(
+ xChunk + i + x * oilfieldSize,
+ zChunk + j + z * oilfieldSize);
FluidStack tFluid = undergroundOilReadInformation(tChunk);
if (tFluid != null) {
if (tFluid.amount > max) max = tFluid.amount;
@@ -187,17 +216,28 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba
}
}
- aOils.add(++oilFieldCount + "," + min + "-" + max + "," + tFluids.get(cInts).getLocalizedName());
+ aOils.add(
+ ++oilFieldCount + ","
+ + min
+ + "-"
+ + max
+ + ","
+ + tFluids.get(cInts)
+ .getLocalizedName());
}
}
} catch (Exception ignored) {}
}
private void prospectOres(Map<String, Integer> aOres) {
- int tLeftXBound = this.getBaseMetaTileEntity().getXCoord() - radius;
+ int tLeftXBound = this.getBaseMetaTileEntity()
+ .getXCoord()
+ - radius;
int tRightXBound = tLeftXBound + 2 * radius;
- int tLeftZBound = this.getBaseMetaTileEntity().getZCoord() - radius;
+ int tLeftZBound = this.getBaseMetaTileEntity()
+ .getZCoord()
+ - radius;
int tRightZBound = tLeftZBound + 2 * radius;
for (int i = tLeftXBound; i <= tRightXBound; i += step) {
@@ -217,17 +257,20 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba
private void prospectHole(int i, int k, Map<String, Integer> aOres) {
String tFoundOre;
- for (int j = this.getBaseMetaTileEntity().getYCoord(); j > 0; j--) {
+ for (int j = this.getBaseMetaTileEntity()
+ .getYCoord(); j > 0; j--) {
tFoundOre = checkForOre(i, j, k);
if (tFoundOre != null) countOre(aOres, tFoundOre, cX, cZ);
}
}
private String checkForOre(int x, int y, int z) {
- Block tBlock = this.getBaseMetaTileEntity().getBlock(x, y, z);
+ Block tBlock = this.getBaseMetaTileEntity()
+ .getBlock(x, y, z);
if (tBlock instanceof GT_Block_Ores_Abstract) {
- TileEntity tTileEntity = getBaseMetaTileEntity().getWorld().getTileEntity(x, y, z);
+ TileEntity tTileEntity = getBaseMetaTileEntity().getWorld()
+ .getTileEntity(x, y, z);
if ((tTileEntity instanceof GT_TileEntity_Ores) && (((GT_TileEntity_Ores) tTileEntity).mMetaData < 16000)) { // Filtering
// small
@@ -238,10 +281,12 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba
if ((tMaterial != null) && (tMaterial != Materials._NULL)) return tMaterial.mDefaultLocalName;
}
} else {
- int tMetaID = getBaseMetaTileEntity().getWorld().getBlockMetadata(x, y, z);
+ int tMetaID = getBaseMetaTileEntity().getWorld()
+ .getBlockMetadata(x, y, z);
ItemStack is = new ItemStack(tBlock, 1, tMetaID);
ItemData association = GT_OreDictUnificator.getAssociation(is);
- if ((association != null) && (association.mPrefix.toString().startsWith("ore")))
+ if ((association != null) && (association.mPrefix.toString()
+ .startsWith("ore")))
return association.mMaterial.mMaterial.mDefaultLocalName;
else if (GT_Utility.isOre(tBlock, tMetaID)) return tBlock.getLocalizedName();
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java
index f94b8404fa..1b30282781 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java
@@ -34,28 +34,52 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine
"",
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_BOXINATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_BOXINATOR_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_BOXINATOR_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_BOXINATOR),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_BOXINATOR_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_BOXINATOR_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_BOXINATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_BOXINATOR_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_BOXINATOR_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_BOXINATOR),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_BOXINATOR_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_BOXINATOR_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_BOXINATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_BOXINATOR_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_BOXINATOR_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_BOXINATOR),
- TextureFactory.builder().addIcon(OVERLAY_TOP_BOXINATOR_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_BOXINATOR_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_BOXINATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_BOXINATOR_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_BOXINATOR_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_BOXINATOR),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_BOXINATOR_GLOW).glow().build()));
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_BOXINATOR_GLOW)
+ .glow()
+ .build()));
}
public GT_MetaTileEntity_Boxinator(String aName, int aTier, String aDescription, ITexture[][][] aTextures,
@@ -203,8 +227,16 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine
&& GT_ModHandler.getRecipeOutput(aStack, aStack, null, aStack, aStack) != null) {
return true;
}
- return ItemList.Schematic_3by3.isStackEqual(getInputAt(1)) && (GT_ModHandler
- .getRecipeOutput(aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack, aStack) != null);
+ return ItemList.Schematic_3by3.isStackEqual(getInputAt(1)) && (GT_ModHandler.getRecipeOutput(
+ aStack,
+ aStack,
+ aStack,
+ aStack,
+ aStack,
+ aStack,
+ aStack,
+ aStack,
+ aStack) != null);
} else {
return GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.containsInput(aStack);
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java
index 2cab223249..fb0bbfb4c2 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java
@@ -31,16 +31,16 @@ public class GT_MetaTileEntity_CuringOven extends GT_MetaTileEntity_BasicMachine
1,
"E_Oven.png",
"",
- TextureFactory
- .of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE_ACTIVE")),
+ TextureFactory.of(
+ new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE_ACTIVE")),
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE")),
- TextureFactory
- .of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT_ACTIVE")),
+ TextureFactory.of(
+ new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT_ACTIVE")),
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT")),
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_TOP_ACTIVE")),
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_TOP")),
- TextureFactory
- .of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM_ACTIVE")),
+ TextureFactory.of(
+ new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM_ACTIVE")),
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM")));
}
@@ -86,7 +86,8 @@ public class GT_MetaTileEntity_CuringOven extends GT_MetaTileEntity_BasicMachine
NBTTagCompound aNBT = tStack.getTagCompound();
if (aNBT != null) {
int tHeat = 300;
- long tWorldTime = getBaseMetaTileEntity().getWorld().getTotalWorldTime();
+ long tWorldTime = getBaseMetaTileEntity().getWorld()
+ .getTotalWorldTime();
aNBT = aNBT.getCompoundTag("GT.ToolStats");
if (aNBT != null && aNBT.hasKey("Heat")) {
tHeat = aNBT.getInteger("Heat");
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java
index 595953c06f..a0d22efd5d 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java
@@ -58,28 +58,52 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
// Textures
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_DISASSEMBLER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_DISASSEMBLER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_DISASSEMBLER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_DISASSEMBLER),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_DISASSEMBLER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_DISASSEMBLER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_DISASSEMBLER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DISASSEMBLER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DISASSEMBLER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_DISASSEMBLER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DISASSEMBLER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DISASSEMBLER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_DISASSEMBLER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_DISASSEMBLER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_DISASSEMBLER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_DISASSEMBLER),
- TextureFactory.builder().addIcon(OVERLAY_TOP_DISASSEMBLER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_DISASSEMBLER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_DISASSEMBLER),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_DISASSEMBLER_GLOW).glow().build()));
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_DISASSEMBLER_GLOW)
+ .glow()
+ .build()));
}
public GT_MetaTileEntity_Disassembler(String aName, int aTier, String aDescription, ITexture[][][] aTextures,
@@ -184,7 +208,8 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
if (GT_Utility.isStackInvalid(is)) return DID_NOT_FIND_RECIPE;
if (is.getItem() instanceof GT_MetaGenerated_Tool || isCircuit(is)
- || blackList.stream().anyMatch(t -> GT_Utility.areStacksEqual(t.toStack(), is, true))
+ || blackList.stream()
+ .anyMatch(t -> GT_Utility.areStacksEqual(t.toStack(), is, true))
|| compareToUnpacker(is))
return DID_NOT_FIND_RECIPE;
@@ -200,9 +225,10 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
ItemStack in = is.copy();
in.stackSize = 1;
if (stack.isStackEqual(in) && stack.mStackSize <= is.stackSize) {
- return setOutputsAndTime(outputHardOverrides.get(stack).toArray(new ItemStack[0]), stack.mStackSize)
- ? FOUND_AND_SUCCESSFULLY_USED_RECIPE
- : DID_NOT_FIND_RECIPE;
+ return setOutputsAndTime(
+ outputHardOverrides.get(stack)
+ .toArray(new ItemStack[0]),
+ stack.mStackSize) ? FOUND_AND_SUCCESSFULLY_USED_RECIPE : DID_NOT_FIND_RECIPE;
}
}
return null;
@@ -250,8 +276,12 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
}
private int checkRecipeMap() {
- GT_Recipe gt_recipe = GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes
- .findRecipe(this.getBaseMetaTileEntity(), true, this.maxEUInput(), null, this.getAllInputs());
+ GT_Recipe gt_recipe = GT_Recipe.GT_Recipe_Map.sDisassemblerRecipes.findRecipe(
+ this.getBaseMetaTileEntity(),
+ true,
+ this.maxEUInput(),
+ null,
+ this.getAllInputs());
if (gt_recipe == null) return DID_NOT_FIND_RECIPE;
if (gt_recipe.isRecipeInputEqual(false, null, this.getAllInputs())) {
if (gt_recipe.mSpecialValue == -100) {
@@ -285,17 +315,27 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
}
private static DissassembleReference ensureDowncasting(Collection<? extends DissassembleReference> recipes) {
- ItemStack[] inputs = recipes.stream().findFirst().orElseThrow(NullPointerException::new).inputs;
- int EUt = recipes.stream().findFirst().orElseThrow(NullPointerException::new).EUt;
+ ItemStack[] inputs = recipes.stream()
+ .findFirst()
+ .orElseThrow(NullPointerException::new).inputs;
+ int EUt = recipes.stream()
+ .findFirst()
+ .orElseThrow(NullPointerException::new).EUt;
ItemStack[] output = new ItemStack[inputs.length];
List<GT_Recipe> recipesColl = null;
- if (recipes.size() > 1) recipesColl = recipes.stream().skip(1).map(x -> x.recipe).collect(Collectors.toList());
+ if (recipes.size() > 1) recipesColl = recipes.stream()
+ .skip(1)
+ .map(x -> x.recipe)
+ .collect(Collectors.toList());
handleRecipeTransformation(inputs, output, recipesColl);
return new DissassembleReference(
- recipes.stream().mapToInt(x -> x.stackSize).min().orElseThrow(NumberFormatException::new),
+ recipes.stream()
+ .mapToInt(x -> x.stackSize)
+ .min()
+ .orElseThrow(NumberFormatException::new),
output,
null,
EUt);
@@ -305,8 +345,9 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
List<? extends GT_Recipe> recipesColl) {
for (int i = 0, inputsLength = inputs.length; i < inputsLength; i++) {
Set<ItemStack[]> inputsStacks = null;
- if (recipesColl != null)
- inputsStacks = recipesColl.stream().map(x -> x.mInputs).collect(Collectors.toSet());
+ if (recipesColl != null) inputsStacks = recipesColl.stream()
+ .map(x -> x.mInputs)
+ .collect(Collectors.toSet());
handleRecipeTransformationInternal(inputs, output, inputsStacks, i);
}
addOthersAndHandleAlwaysReplace(inputs, output);
@@ -360,25 +401,29 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
private static ItemStack handleUnification(ItemStack stack) {
for (int oreID : OreDictionary.getOreIDs(stack)) {
- for (int i = 0; i < OreDictionaryOverride[0].length; i++)
- if (OreDictionary.getOreName(oreID).equals(OreDictionaryOverride[0][i])) {
- ItemStack ret = ((ItemStack) OreDictionaryOverride[1][i]).copy();
- ret.stackSize = stack.stackSize;
- return ret;
- }
+ for (int i = 0; i < OreDictionaryOverride[0].length; i++) if (OreDictionary.getOreName(oreID)
+ .equals(
+ OreDictionaryOverride[0][i])) {
+ ItemStack ret = ((ItemStack) OreDictionaryOverride[1][i]).copy();
+ ret.stackSize = stack.stackSize;
+ return ret;
+ }
}
return GT_OreDictUnificator.get(stack);
}
private static ItemStack handleWildcard(ItemStack stack) {
- if (stack != null && stack.getItemDamage() == OreDictionary.WILDCARD_VALUE && !stack.getItem().isDamageable()) {
+ if (stack != null && stack.getItemDamage() == OreDictionary.WILDCARD_VALUE
+ && !stack.getItem()
+ .isDamageable()) {
stack.setItemDamage(0);
}
return stack;
}
private static ItemStack handleContainerItem(ItemStack stack) {
- if (stack != null && stack.getItem().hasContainerItem(stack)) {
+ if (stack != null && stack.getItem()
+ .hasContainerItem(stack)) {
return null;
}
return stack;
@@ -421,14 +466,20 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
}
private static void handleAnyMaterials(Materials first, AtomicReference<? super Materials> toRpl) {
- if (first.mOreReRegistrations.stream().anyMatch(y -> y.equals(Materials.AnyIron))) toRpl.set(Materials.Iron);
- else if (first.mOreReRegistrations.stream().anyMatch(y -> y.equals(Materials.AnyCopper)))
+ if (first.mOreReRegistrations.stream()
+ .anyMatch(y -> y.equals(Materials.AnyIron)))
+ toRpl.set(Materials.Iron);
+ else if (first.mOreReRegistrations.stream()
+ .anyMatch(y -> y.equals(Materials.AnyCopper)))
toRpl.set(Materials.Copper);
- else if (first.mOreReRegistrations.stream().anyMatch(y -> y.equals(Materials.AnyRubber)))
+ else if (first.mOreReRegistrations.stream()
+ .anyMatch(y -> y.equals(Materials.AnyRubber)))
toRpl.set(Materials.Rubber);
- else if (first.mOreReRegistrations.stream().anyMatch(y -> y.equals(Materials.AnyBronze)))
+ else if (first.mOreReRegistrations.stream()
+ .anyMatch(y -> y.equals(Materials.AnyBronze)))
toRpl.set(Materials.Bronze);
- else if (first.mOreReRegistrations.stream().anyMatch(y -> y.equals(Materials.AnySyntheticRubber)))
+ else if (first.mOreReRegistrations.stream()
+ .anyMatch(y -> y.equals(Materials.AnySyntheticRubber)))
toRpl.set(Materials.Rubber);
}
@@ -515,13 +566,31 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
AtomicInteger stacksize = new AtomicInteger();
// Check Recipe Maps for creation of Item
List<DissassembleReference> possibleRecipes = GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.mRecipeList.stream()
- .filter(x -> Arrays.stream(x.mOutputs).anyMatch(y -> {
- ItemStack out = is.copy();
- out.stackSize = y.stackSize;
- boolean isDone = GT_Utility.areStacksEqual(y, out, true) && y.stackSize <= is.stackSize;
- if (isDone) stacksize.set(y.stackSize);
- return isDone;
- })).map(x -> new DissassembleReference(stacksize.get(), x.mInputs, x)).collect(Collectors.toList());
+ .filter(
+ x -> Arrays.stream(
+ x.mOutputs)
+ .anyMatch(
+ y -> {
+ ItemStack out = is.copy();
+ out.stackSize = y.stackSize;
+ boolean isDone = GT_Utility.areStacksEqual(
+ y,
+ out,
+ true)
+ && y.stackSize
+ <= is.stackSize;
+ if (isDone)
+ stacksize.set(
+ y.stackSize);
+ return isDone;
+ }))
+ .map(
+ x -> new DissassembleReference(
+ stacksize.get(),
+ x.mInputs,
+ x))
+ .collect(
+ Collectors.toList());
// Is there only one way to create it?
if (possibleRecipes.size() == 1) return possibleRecipes;
@@ -529,20 +598,26 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
// There are Multiple Ways -> Get recipe with cheapest inputs
// More Inputs should mean cheaper Materials
return possibleRecipes.stream()
- .sorted(Comparator.comparingDouble(GT_MetaTileEntity_Disassembler::getCheaperInputs))
- .collect(Collectors.toList());
+ .sorted(Comparator.comparingDouble(GT_MetaTileEntity_Disassembler::getCheaperInputs))
+ .collect(Collectors.toList());
}
private static double getCheaperInputs(GT_MetaTileEntity_Disassembler.DissassembleReference x) {
- double fluidInputValueRaw = Arrays.stream(x.recipe.mFluidInputs).flatMapToInt(f -> IntStream.of(f.amount))
- .sum();
+ double fluidInputValueRaw = Arrays.stream(x.recipe.mFluidInputs)
+ .flatMapToInt(f -> IntStream.of(f.amount))
+ .sum();
fluidInputValueRaw = fluidInputValueRaw > 0 ? fluidInputValueRaw : 144D;
- double inputValue = Arrays.stream(x.inputs).flatMapToInt(f -> IntStream.of(f.stackSize)).sum()
+ double inputValue = Arrays.stream(x.inputs)
+ .flatMapToInt(f -> IntStream.of(f.stackSize))
+ .sum()
+ (fluidInputValueRaw / 144D);
- double fluidOutputValueRaw = Arrays.stream(x.recipe.mFluidOutputs).flatMapToInt(f -> IntStream.of(f.amount))
- .sum();
+ double fluidOutputValueRaw = Arrays.stream(x.recipe.mFluidOutputs)
+ .flatMapToInt(f -> IntStream.of(f.amount))
+ .sum();
fluidOutputValueRaw = fluidOutputValueRaw > 0 ? fluidOutputValueRaw : 144D;
- double outputValue = Arrays.stream(x.recipe.mOutputs).flatMapToInt(f -> IntStream.of(f.stackSize)).sum()
+ double outputValue = Arrays.stream(x.recipe.mOutputs)
+ .flatMapToInt(f -> IntStream.of(f.stackSize))
+ .sum()
+ (fluidOutputValueRaw / 144D);
return outputValue / inputValue;
}
@@ -556,7 +631,9 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi
ItemStack aStack) {
return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack)
&& aStack.getTagCompound() != null
- && aStack.getTagCompound().getCompoundTag("GT.CraftingComponents") != null;
+ && aStack.getTagCompound()
+ .getCompoundTag("GT.CraftingComponents")
+ != null;
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java
index d9dc75822d..70b9ecbc22 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java
@@ -107,28 +107,52 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
"",
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_INDUSTRIAL_APIARY_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_INDUSTRIAL_APIARY_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_INDUSTRIAL_APIARY_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_INDUSTRIAL_APIARY),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_INDUSTRIAL_APIARY_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_INDUSTRIAL_APIARY_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_INDUSTRIAL_APIARY_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_INDUSTRIAL_APIARY_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_INDUSTRIAL_APIARY_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_INDUSTRIAL_APIARY),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_INDUSTRIAL_APIARY_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_INDUSTRIAL_APIARY_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_INDUSTRIAL_APIARY_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_INDUSTRIAL_APIARY_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_INDUSTRIAL_APIARY_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_INDUSTRIAL_APIARY),
- TextureFactory.builder().addIcon(OVERLAY_TOP_INDUSTRIAL_APIARY_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_INDUSTRIAL_APIARY_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_INDUSTRIAL_APIARY_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_INDUSTRIAL_APIARY_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_INDUSTRIAL_APIARY_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_INDUSTRIAL_APIARY),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_INDUSTRIAL_APIARY_GLOW).glow().build()));
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_INDUSTRIAL_APIARY_GLOW)
+ .glow()
+ .build()));
}
public GT_MetaTileEntity_IndustrialApiary(String aName, int aTier, String aDescription, ITexture[][][] aTextures,
@@ -236,8 +260,9 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
for (int z = 0; z < icycles; z++) {
final IIndividual p = bee.retrievePollen(this);
if (p != null) {
- final ItemStack s = p.getGenome().getSpeciesRoot()
- .getMemberStack(p, EnumGermlingType.POLLEN.ordinal());
+ final ItemStack s = p.getGenome()
+ .getSpeciesRoot()
+ .getMemberStack(p, EnumGermlingType.POLLEN.ordinal());
if (s != null) {
final GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(s);
pollen.computeIfAbsent(id, k -> {
@@ -264,7 +289,8 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
final HashMap<GT_Utility.ItemId, Float> drops = new HashMap<>();
final HashMap<GT_Utility.ItemId, ItemStack> dropstacks = new HashMap<>();
- for (Map.Entry<ItemStack, Float> entry : primary.getProductChances().entrySet()) {
+ for (Map.Entry<ItemStack, Float> entry : primary.getProductChances()
+ .entrySet()) {
final GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(entry.getKey());
drops.merge(
id,
@@ -273,7 +299,8 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
Float::sum);
dropstacks.computeIfAbsent(id, k -> entry.getKey());
}
- for (Map.Entry<ItemStack, Float> entry : secondary.getProductChances().entrySet()) {
+ for (Map.Entry<ItemStack, Float> entry : secondary.getProductChances()
+ .entrySet()) {
final GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(entry.getKey());
drops.merge(
id,
@@ -284,16 +311,24 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
dropstacks.computeIfAbsent(id, k -> entry.getKey());
}
if (primary.isJubilant(genome, this) && secondary.isJubilant(genome, this))
- for (Map.Entry<ItemStack, Float> entry : primary.getSpecialtyChances().entrySet()) {
- final GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(entry.getKey());
- drops.merge(
- id,
- Bee.getFinalChance(entry.getValue(), speed, prodMod, 8f)
- * (float) entry.getKey().stackSize
- * cycles,
- Float::sum);
- dropstacks.computeIfAbsent(id, k -> entry.getKey());
- }
+ for (Map.Entry<ItemStack, Float> entry : primary.getSpecialtyChances()
+ .entrySet()) {
+ final GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(
+ entry.getKey());
+ drops.merge(
+ id,
+ Bee.getFinalChance(
+ entry.getValue(),
+ speed,
+ prodMod,
+ 8f)
+ * (float) entry.getKey().stackSize
+ * cycles,
+ Float::sum);
+ dropstacks.computeIfAbsent(
+ id,
+ k -> entry.getKey());
+ }
int i = 0;
final int imax = mOutputItems.length;
@@ -334,11 +369,12 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
setQueen(null);
for (Map.Entry<GT_Utility.ItemId, Float> entry : drops.entrySet()) {
- final ItemStack s = dropstacks.get(entry.getKey()).copy();
- s.stackSize = entry.getValue().intValue()
- + (getWorld().rand.nextFloat() < (entry.getValue() - (float) entry.getValue().intValue())
- ? 1
- : 0);
+ final ItemStack s = dropstacks.get(entry.getKey())
+ .copy();
+ s.stackSize = entry.getValue()
+ .intValue()
+ + (getWorld().rand.nextFloat() < (entry.getValue() - (float) entry.getValue()
+ .intValue()) ? 1 : 0);
if (s.stackSize > 0 && i < imax) while (true) {
if (s.stackSize <= s.getMaxStackSize()) {
this.mOutputItems[i++] = s;
@@ -389,7 +425,8 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
princess.writeToNBT(nbttagcompound);
this.mOutputItems[0] = new ItemStack(PluginApiculture.items.beeQueenGE);
this.mOutputItems[0].setTagCompound(nbttagcompound);
- beeRoot.getBreedingTracker(getWorld(), getOwner()).registerQueen(princess);
+ beeRoot.getBreedingTracker(getWorld(), getOwner())
+ .registerQueen(princess);
setQueen(null);
getDrone().stackSize -= 1;
@@ -569,8 +606,9 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
} else
if (i == 0 && j == 0 && beeRoot.isMember(mOutputItems[0], EnumBeeType.QUEEN.ordinal()))
if (aBaseMetaTileEntity.addStackToSlot(queen, mOutputItems[0])) break;
- if (aBaseMetaTileEntity
- .addStackToSlot(getOutputSlot() + ((j + i) % mOutputItems.length), mOutputItems[i]))
+ if (aBaseMetaTileEntity.addStackToSlot(
+ getOutputSlot() + ((j + i) % mOutputItems.length),
+ mOutputItems[i]))
break;
}
Arrays.fill(mOutputItems, null);
@@ -581,8 +619,8 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
aBaseMetaTileEntity.setActive(false);
if (doesAutoOutput() && !isOutputEmpty() && aBaseMetaTileEntity.getFrontFacing() != mMainFacing) {
- final TileEntity tTileEntity2 = aBaseMetaTileEntity
- .getTileEntityAtSide(aBaseMetaTileEntity.getFrontFacing());
+ final TileEntity tTileEntity2 = aBaseMetaTileEntity.getTileEntityAtSide(
+ aBaseMetaTileEntity.getFrontFacing());
final long tStoredEnergy = aBaseMetaTileEntity.getUniversalEnergyStored();
int tMaxStacks = (int) (tStoredEnergy / 64L);
if (tMaxStacks > mOutputItems.length) tMaxStacks = mOutputItems.length;
@@ -609,7 +647,10 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
}
public void cancelProcess() {
- if (this.getBaseMetaTileEntity().isActive() && this.getBaseMetaTileEntity().isServerSide()
+ if (this.getBaseMetaTileEntity()
+ .isActive()
+ && this.getBaseMetaTileEntity()
+ .isServerSide()
&& usedQueen != null
&& beeRoot.isMember(usedQueen, EnumBeeType.QUEEN.ordinal())) {
Arrays.fill(mOutputItems, null);
@@ -617,9 +658,11 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
mProgresstime = 0;
mMaxProgresstime = 0;
mStuttering = false;
- this.getBaseMetaTileEntity().setActive(false);
+ this.getBaseMetaTileEntity()
+ .setActive(false);
setQueen(usedQueen);
- this.getBaseMetaTileEntity().disableWorking();
+ this.getBaseMetaTileEntity()
+ .disableWorking();
}
}
@@ -638,9 +681,13 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
if (s == null) continue;
if (GT_Utility.areStacksEqual(getStackInSlot(i), aStack)) return false;
if (GT_ApiaryUpgrade.isUpgrade(aStack)) {
- if (!GT_ApiaryUpgrade.getUpgrade(aStack).isAllowedToWorkWith(getStackInSlot(i))) return false;
+ if (!GT_ApiaryUpgrade.getUpgrade(aStack)
+ .isAllowedToWorkWith(getStackInSlot(i)))
+ return false;
} else if (GT_ApiaryUpgrade.isUpgrade(s)) {
- if (!GT_ApiaryUpgrade.getUpgrade(s).isAllowedToWorkWith(aStack)) return false;
+ if (!GT_ApiaryUpgrade.getUpgrade(s)
+ .isAllowedToWorkWith(aStack))
+ return false;
}
}
return true;
@@ -687,17 +734,20 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
@Override
public int getBlockLightValue() {
- return this.getBaseMetaTileEntity().getLightLevelAtSide((byte) 1);
+ return this.getBaseMetaTileEntity()
+ .getLightLevelAtSide((byte) 1);
}
@Override
public boolean canBlockSeeTheSky() {
- return this.getBaseMetaTileEntity().getSkyAtSide((byte) 1);
+ return this.getBaseMetaTileEntity()
+ .getSkyAtSide((byte) 1);
}
@Override
public World getWorld() {
- return this.getBaseMetaTileEntity().getWorld();
+ return this.getBaseMetaTileEntity()
+ .getWorld();
}
GameProfile owner = null;
@@ -705,8 +755,10 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
@Override
public GameProfile getOwner() {
if (owner == null) owner = new GameProfile(
- this.getBaseMetaTileEntity().getOwnerUuid(),
- this.getBaseMetaTileEntity().getOwnerName());
+ this.getBaseMetaTileEntity()
+ .getOwnerUuid(),
+ this.getBaseMetaTileEntity()
+ .getOwnerName());
return owner;
}
@@ -720,7 +772,8 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
@Override
public BiomeGenBase getBiome() {
- if (biomeOverride == null) return this.getBaseMetaTileEntity().getBiome();
+ if (biomeOverride == null) return this.getBaseMetaTileEntity()
+ .getBiome();
return biomeOverride;
}
@@ -742,7 +795,8 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
@Override
public ChunkCoordinates getCoordinates() {
- return this.getBaseMetaTileEntity().getCoords();
+ return this.getBaseMetaTileEntity()
+ .getCoords();
}
// endregion
@@ -823,7 +877,9 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
private int flowerBlockMeta;
private boolean checkFlower(IBee bee) {
- final String flowerType = bee.getGenome().getFlowerProvider().getFlowerType();
+ final String flowerType = bee.getGenome()
+ .getFlowerProvider()
+ .getFlowerType();
if (!this.flowerType.equals(flowerType)) flowercoords = null;
if (flowercoords != null) {
if (getWorld().getBlock(flowercoords.posX, flowercoords.posY, flowercoords.posZ) != flowerBlock
@@ -838,8 +894,10 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
flowercoords = null;
else {
flowerBlock = getWorld().getBlock(flowercoords.posX, flowercoords.posY, flowercoords.posZ);
- flowerBlockMeta = getWorld()
- .getBlockMetadata(flowercoords.posX, flowercoords.posY, flowercoords.posZ);
+ flowerBlockMeta = getWorld().getBlockMetadata(
+ flowercoords.posX,
+ flowercoords.posY,
+ flowercoords.posZ);
}
}
if (flowercoords == null) {
@@ -1069,101 +1127,148 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
new SlotWidget(new ApiarySlot(inventoryHandler, queen))
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_BEE_QUEEN)
- .setPos(36, 21))
- .widget(
- new SlotWidget(new ApiarySlot(inventoryHandler, drone))
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_BEE_DRONE)
- .setPos(36, 41))
- .widget(
- SlotGroup.ofItemHandler(inventoryHandler, 2).startFromSlot(7).endAtSlot(10)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_BEE_QUEEN)
+ .setPos(36, 21))
+ .widget(
+ new SlotWidget(new ApiarySlot(inventoryHandler, drone)).setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_BEE_DRONE)
+ .setPos(36, 41))
+ .widget(
+ SlotGroup.ofItemHandler(inventoryHandler, 2)
+ .startFromSlot(7)
+ .endAtSlot(10)
.slotCreator(i -> new ApiarySlot(inventoryHandler, i))
.applyForWidget(
widget -> widget.setGTTooltip(() -> mTooltipCache.getData(UPGRADE_TOOLTIP))
- .setTooltipShowUpDelay(TOOLTIP_DELAY))
- .build().setPos(61, 23));
+ .setTooltipShowUpDelay(TOOLTIP_DELAY))
+ .build()
+ .setPos(61, 23));
super.addUIWidgets(builder, buildContext);
builder.widget(
new ProgressBar().setProgress(() -> (float) getProgresstime() / Math.max(maxProgresstime(), 1))
- .setTexture(GT_UITextures.PROGRESSBAR_ARROW, 20).setPos(70, 3).setSize(20, 18))
- .widget(
- new ButtonWidget().setOnClick((clickData, widget) -> cancelProcess())
- .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_CROSS)
- .setGTTooltip(() -> mTooltipCache.getData(CANCEL_PROCESS_TOOLTIP))
- .setTooltipShowUpDelay(TOOLTIP_DELAY).setPos(7, 26).setSize(18, 18))
- .widget(new DrawableWidget().setDrawable(GT_UITextures.PICTURE_INFORMATION).setGTTooltip(() -> {
- final String energyreq = GT_Utility.formatNumbers(
- (int) ((float) GT_MetaTileEntity_IndustrialApiary.baseEUtUsage * getEnergyModifier()
- * getAcceleration()) + getAdditionalEnergyUsage());
- final String Temp = StatCollector.translateToLocal(getTemperature().getName());
- final String Hum = StatCollector.translateToLocal(getHumidity().getName());
- if (getUsedQueen() != null
- && BeeManager.beeRoot.isMember(getUsedQueen(), EnumBeeType.QUEEN.ordinal())) {
- final IBee bee = BeeManager.beeRoot.getMember(getUsedQueen());
- if (bee.isAnalyzed()) {
- final IBeeGenome genome = bee.getGenome();
- final IBeeModifier mod = BeeManager.beeRoot.getBeekeepingMode(getWorld()).getBeeModifier();
- final float tmod = getTerritoryModifier(null, 1f) * mod.getTerritoryModifier(null, 1f);
- final int[] t = Arrays.stream(genome.getTerritory()).map(i -> (int) ((float) i * tmod))
- .toArray();
- return mTooltipCache.getUncachedTooltipData(
- INFO_WITH_BEE_TOOLTIP,
- energyreq,
- Temp,
- Hum,
- genome.getSpeed(),
- getProductionModifier(null, 1f) * mod.getProductionModifier(null, 1f),
- Math.round(
- getFloweringModifier(null, 1f) * genome.getFlowering()
- * mod.getFloweringModifier(null, 1f)),
- Math.round(
- getLifespanModifier(null, null, 1f) * genome.getLifespan()
- * mod.getLifespanModifier(null, null, 1f)),
- t[0],
- t[1],
- t[2]);
- }
- }
- return mTooltipCache.getUncachedTooltipData(INFO_TOOLTIP, energyreq, Temp, Hum);
- }).attachSyncer(
- new FakeSyncWidget.ItemStackSyncer(() -> usedQueen, val -> usedQueen = val),
- builder,
- (widget, val) -> widget.notifyTooltipChange()).setPos(163, 5).setSize(7, 18))
- .widget(new ButtonWidget().setOnClick((clickData, widget) -> {
- if (clickData.mouseButton == 0) {
- if (mLockedSpeed) return;
- if (!clickData.shift) {
- mSpeed++;
- if (mSpeed > getMaxSpeed()) mSpeed = 0;
- } else {
- mSpeed--;
- if (mSpeed < 0) mSpeed = getMaxSpeed();
- }
- } else if (clickData.mouseButton == 1) {
- mLockedSpeed = !mLockedSpeed;
- if (mLockedSpeed) mSpeed = getMaxSpeed();
- }
- }).setGTTooltip(
- () -> mTooltipCache.getUncachedTooltipData(
- mLockedSpeed ? SPEED_LOCKED_TOOLTIP : SPEED_TOOLTIP,
- getAcceleration(),
- GT_Utility.formatNumbers(getAdditionalEnergyUsage())))
- .attachSyncer(
- new FakeSyncWidget.IntegerSyncer(() -> mSpeed, val -> mSpeed = val),
- builder,
- (widget, val) -> widget.notifyTooltipChange())
- .attachSyncer(
- new FakeSyncWidget.BooleanSyncer(() -> mLockedSpeed, val -> mLockedSpeed = val),
- builder,
- (widget, val) -> widget.notifyTooltipChange())
- .setTooltipShowUpDelay(TOOLTIP_DELAY).setBackground(GT_UITextures.PICTURE_SQUARE_LIGHT_GRAY)
- .setPos(25, 62).setSize(18, 18))
- .widget(new TextWidget("x").setDefaultColor(COLOR_TEXT_GRAY.get()).setPos(30, 63)).widget(
- TextWidget.dynamicString(() -> String.valueOf(1 << mSpeed))
- // mSpeed is already synced
- .setSynced(false).setDefaultColor(COLOR_TEXT_GRAY.get()).setPos(26, 72));
+ .setTexture(GT_UITextures.PROGRESSBAR_ARROW, 20)
+ .setPos(70, 3)
+ .setSize(20, 18))
+ .widget(
+ new ButtonWidget().setOnClick((clickData, widget) -> cancelProcess())
+ .setBackground(
+ GT_UITextures.BUTTON_STANDARD,
+ GT_UITextures.OVERLAY_BUTTON_CROSS)
+ .setGTTooltip(() -> mTooltipCache.getData(CANCEL_PROCESS_TOOLTIP))
+ .setTooltipShowUpDelay(TOOLTIP_DELAY)
+ .setPos(7, 26)
+ .setSize(18, 18))
+ .widget(
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_INFORMATION)
+ .setGTTooltip(() -> {
+ final String energyreq = GT_Utility.formatNumbers(
+ (int) ((float) GT_MetaTileEntity_IndustrialApiary.baseEUtUsage
+ * getEnergyModifier()
+ * getAcceleration()) + getAdditionalEnergyUsage());
+ final String Temp = StatCollector.translateToLocal(
+ getTemperature().getName());
+ final String Hum = StatCollector.translateToLocal(
+ getHumidity().getName());
+ if (getUsedQueen() != null && BeeManager.beeRoot.isMember(
+ getUsedQueen(),
+ EnumBeeType.QUEEN.ordinal())) {
+ final IBee bee = BeeManager.beeRoot.getMember(getUsedQueen());
+ if (bee.isAnalyzed()) {
+ final IBeeGenome genome = bee.getGenome();
+ final IBeeModifier mod = BeeManager.beeRoot.getBeekeepingMode(
+ getWorld())
+ .getBeeModifier();
+ final float tmod = getTerritoryModifier(null, 1f)
+ * mod.getTerritoryModifier(null, 1f);
+ final int[] t = Arrays.stream(genome.getTerritory())
+ .map(i -> (int) ((float) i * tmod))
+ .toArray();
+ return mTooltipCache.getUncachedTooltipData(
+ INFO_WITH_BEE_TOOLTIP,
+ energyreq,
+ Temp,
+ Hum,
+ genome.getSpeed(),
+ getProductionModifier(null, 1f)
+ * mod.getProductionModifier(null, 1f),
+ Math.round(
+ getFloweringModifier(null, 1f)
+ * genome.getFlowering()
+ * mod.getFloweringModifier(null, 1f)),
+ Math.round(
+ getLifespanModifier(null, null, 1f)
+ * genome.getLifespan()
+ * mod.getLifespanModifier(
+ null,
+ null,
+ 1f)),
+ t[0],
+ t[1],
+ t[2]);
+ }
+ }
+ return mTooltipCache.getUncachedTooltipData(
+ INFO_TOOLTIP,
+ energyreq,
+ Temp,
+ Hum);
+ })
+ .attachSyncer(
+ new FakeSyncWidget.ItemStackSyncer(
+ () -> usedQueen,
+ val -> usedQueen = val),
+ builder,
+ (widget, val) -> widget.notifyTooltipChange())
+ .setPos(163, 5)
+ .setSize(7, 18))
+ .widget(new ButtonWidget().setOnClick((clickData, widget) -> {
+ if (clickData.mouseButton == 0) {
+ if (mLockedSpeed) return;
+ if (!clickData.shift) {
+ mSpeed++;
+ if (mSpeed > getMaxSpeed()) mSpeed = 0;
+ } else {
+ mSpeed--;
+ if (mSpeed < 0) mSpeed = getMaxSpeed();
+ }
+ } else if (clickData.mouseButton == 1) {
+ mLockedSpeed = !mLockedSpeed;
+ if (mLockedSpeed) mSpeed = getMaxSpeed();
+ }
+ })
+ .setGTTooltip(
+ () -> mTooltipCache.getUncachedTooltipData(
+ mLockedSpeed ? SPEED_LOCKED_TOOLTIP : SPEED_TOOLTIP,
+ getAcceleration(),
+ GT_Utility.formatNumbers(getAdditionalEnergyUsage())))
+ .attachSyncer(
+ new FakeSyncWidget.IntegerSyncer(() -> mSpeed, val -> mSpeed = val),
+ builder,
+ (widget, val) -> widget.notifyTooltipChange())
+ .attachSyncer(
+ new FakeSyncWidget.BooleanSyncer(
+ () -> mLockedSpeed,
+ val -> mLockedSpeed = val),
+ builder,
+ (widget, val) -> widget.notifyTooltipChange())
+ .setTooltipShowUpDelay(TOOLTIP_DELAY)
+ .setBackground(GT_UITextures.PICTURE_SQUARE_LIGHT_GRAY)
+ .setPos(25, 62)
+ .setSize(18, 18))
+ .widget(
+ new TextWidget("x").setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(30, 63))
+ .widget(
+ TextWidget.dynamicString(() -> String.valueOf(1 << mSpeed))
+ // mSpeed is already synced
+ .setSynced(false)
+ .setDefaultColor(COLOR_TEXT_GRAY.get())
+ .setPos(26, 72));
}
@Override
@@ -1189,26 +1294,38 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
@Override
protected DrawableWidget createErrorStatusArea(ModularWindow.Builder builder, IDrawable picture) {
- return (DrawableWidget) super.createErrorStatusArea(builder, picture).setPos(100, 62).attachSyncer(
- new FakeSyncWidget.ListSyncer<>(() -> Arrays.asList(mErrorStates.toArray(new IErrorState[0])), val -> {
- mErrorStates.clear();
- mErrorStates.addAll(new HashSet<>(val));
- },
- (buffer, val) -> buffer.writeShort(val.getID()),
- buffer -> ForestryAPI.errorStateRegistry.getErrorState(buffer.readShort())),
- builder,
- (widget, val) -> widget.notifyTooltipChange());
+ return (DrawableWidget) super.createErrorStatusArea(builder, picture).setPos(100, 62)
+ .attachSyncer(
+ new FakeSyncWidget.ListSyncer<>(
+ () -> Arrays.asList(
+ mErrorStates.toArray(
+ new IErrorState[0])),
+ val -> {
+ mErrorStates.clear();
+ mErrorStates.addAll(
+ new HashSet<>(
+ val));
+ },
+ (buffer, val) -> buffer.writeShort(
+ val.getID()),
+ buffer -> ForestryAPI.errorStateRegistry.getErrorState(
+ buffer.readShort())),
+ builder,
+ (widget, val) -> widget.notifyTooltipChange());
}
@Override
protected List<String> getErrorDescriptions() {
if (!mErrorStates.isEmpty()) {
- return mErrorStates.stream().map(
- state -> EnumChatFormatting.RED + StatCollector.translateToLocal("for." + state.getDescription()))
- .collect(Collectors.toList());
+ return mErrorStates.stream()
+ .map(
+ state -> EnumChatFormatting.RED
+ + StatCollector.translateToLocal("for." + state.getDescription()))
+ .collect(Collectors.toList());
} else if (mStuttering) {
- return mTooltipCache
- .getData(STALLED_STUTTERING_TOOLTIP, StatCollector.translateToLocal(POWER_SOURCE_POWER)).text;
+ return mTooltipCache.getData(
+ STALLED_STUTTERING_TOOLTIP,
+ StatCollector.translateToLocal(POWER_SOURCE_POWER)).text;
} else {
return Collections.emptyList();
}
@@ -1251,8 +1368,8 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
}
}
- private static final UIInfo<?, ?> IndustrialApiaryUI = GT_UIInfos.GTTileEntityUIFactory
- .apply(GT_ModularUIContainer_IndustrialApiary::new);
+ private static final UIInfo<?, ?> IndustrialApiaryUI = GT_UIInfos.GTTileEntityUIFactory.apply(
+ GT_ModularUIContainer_IndustrialApiary::new);
private static class GT_ModularUIContainer_IndustrialApiary extends ModularUIContainer {
@@ -1277,7 +1394,8 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
if (slotStack == null && !slot.isItemValid(s))
return super.slotClick(aSlotNumber, aMouseclick, aShifthold, aPlayer);
if (!GT_ApiaryUpgrade.isUpgrade(s)) return super.slotClick(aSlotNumber, aMouseclick, aShifthold, aPlayer);
- int max = GT_ApiaryUpgrade.getUpgrade(s).getMaxNumber();
+ int max = GT_ApiaryUpgrade.getUpgrade(s)
+ .getMaxNumber();
if (slotStack != null) max = Math.max(0, max - slotStack.stackSize);
max = Math.min(max, s.stackSize);
if (max == 0) return null;
@@ -1305,7 +1423,8 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM
} else {
if (!GT_Utility.areStacksEqual(aStack, iStack)) continue;
}
- int max = GT_ApiaryUpgrade.getUpgrade(aStack).getMaxNumber();
+ int max = GT_ApiaryUpgrade.getUpgrade(aStack)
+ .getMaxNumber();
if (iStack == null) {
max = Math.min(max, aStack.stackSize);
final ItemStack newstack = aStack.splitStack(max);
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java
index d1c03e1527..2c1e46ea9e 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java
@@ -44,28 +44,52 @@ public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMac
"",
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_MASSFAB_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_MASSFAB_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_MASSFAB_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_MASSFAB),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_MASSFAB_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_MASSFAB_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_MASSFAB_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_MASSFAB_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_MASSFAB_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_MASSFAB),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_MASSFAB_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_MASSFAB_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_MASSFAB_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_MASSFAB_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_MASSFAB_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_MASSFAB),
- TextureFactory.builder().addIcon(OVERLAY_TOP_MASSFAB_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_MASSFAB_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_MASSFAB_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_MASSFAB_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_MASSFAB_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_MASSFAB),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_MASSFAB_GLOW).glow().build()));
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_MASSFAB_GLOW)
+ .glow()
+ .build()));
EUt = V[1] * (long) Math.pow(2, mTier + 2);
}
@@ -105,8 +129,10 @@ public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMac
@Override
public void onConfigLoad(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);
@@ -139,9 +165,9 @@ public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMac
return FOUND_AND_SUCCESSFULLY_USED_RECIPE;
}
return sRequiresUUA || Arrays.stream(getAllInputs())
- .anyMatch(s -> ItemList.Circuit_Integrated.isStackEqual(s, true, true))
- ? FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS
- : FOUND_AND_SUCCESSFULLY_USED_RECIPE;
+ .anyMatch(s -> ItemList.Circuit_Integrated.isStackEqual(s, true, true))
+ ? FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS
+ : FOUND_AND_SUCCESSFULLY_USED_RECIPE;
}
return DID_NOT_FIND_RECIPE;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java
index 32a0ad8537..b72c456683 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java
@@ -120,10 +120,15 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt
boolean aActive, boolean aRedstone) {
if (aSide == 0) return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1] };
if (aActive) return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1],
- TextureFactory.of(OVERLAY_TELEPORTER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW).glow().build() };
+ TextureFactory.of(OVERLAY_TELEPORTER_ACTIVE), TextureFactory.builder()
+ .addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW)
+ .glow()
+ .build() };
return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_TELEPORTER),
- TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TELEPORTER_GLOW)
+ .glow()
+ .build() };
}
@Override
@@ -148,8 +153,10 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt
@Override
public void onConfigLoad(GT_Config aConfig) {
- sInterDimensionalTeleportAllowed = aConfig
- .get(ConfigCategories.machineconfig, "Teleporter.Interdimensional", true);
+ sInterDimensionalTeleportAllowed = aConfig.get(
+ ConfigCategories.machineconfig,
+ "Teleporter.Interdimensional",
+ true);
mMaxLoss = Math.max(aConfig.get(ConfigCategories.machineconfig, "MicrowaveTransmitter.MaxLoss", 50), 11);
mMaxLossDistance = aConfig.get(ConfigCategories.machineconfig, "MicrowaveTransmitter.MaxLossDistance", 10000);
mPassiveEnergyUse = aConfig.get(ConfigCategories.machineconfig, "MicrowaveTransmitter.PassiveEnergy", true);
@@ -241,8 +248,8 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt
}
long energyUse = 10;
if (mMaxLossDistance != 0) {
- energyUse = GT_Utility
- .safeInt(10L + (tDistance * Math.max(mMaxLoss - 10L, 0) / mMaxLossDistance));
+ energyUse = GT_Utility.safeInt(
+ 10L + (tDistance * Math.max(mMaxLoss - 10L, 0) / mMaxLossDistance));
}
energyUse = packetSize + ((V[mTier] * energyUse) / 100);
if (getBaseMetaTileEntity().isUniversalEnergyStored(energyUse)) {
@@ -408,26 +415,32 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setSize(90, 72).setPos(43, 4))
- .widget(
- TextWidget.dynamicString(() -> "X: " + GT_Utility.parseNumberToString(mTargetX))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 8))
- .widget(
- TextWidget.dynamicString(() -> "Y: " + GT_Utility.parseNumberToString(mTargetY))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 16))
- .widget(
- TextWidget.dynamicString(() -> "Z: " + GT_Utility.parseNumberToString(mTargetZ))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 24))
- .widget(
- TextWidget.dynamicString(() -> "Dim: " + GT_Utility.parseNumberToString(mTargetD))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 32))
- .widget(
- TextWidget
- .dynamicString(
- () -> "Dim Valid: " + (GT_Utility.isRealDimension(mTargetD) ? "Yes" : "No"))
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> hasDimensionalTeleportCapability()).setPos(46, 40))
- .widget(new FakeSyncWidget.FluidStackSyncer(() -> mFluid, val -> mFluid = val));
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK)
+ .setSize(90, 72)
+ .setPos(43, 4))
+ .widget(
+ TextWidget.dynamicString(() -> "X: " + GT_Utility.parseNumberToString(mTargetX))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(46, 8))
+ .widget(
+ TextWidget.dynamicString(() -> "Y: " + GT_Utility.parseNumberToString(mTargetY))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(46, 16))
+ .widget(
+ TextWidget.dynamicString(() -> "Z: " + GT_Utility.parseNumberToString(mTargetZ))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(46, 24))
+ .widget(
+ TextWidget.dynamicString(() -> "Dim: " + GT_Utility.parseNumberToString(mTargetD))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(46, 32))
+ .widget(
+ TextWidget.dynamicString(
+ () -> "Dim Valid: " + (GT_Utility.isRealDimension(mTargetD) ? "Yes" : "No"))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setEnabled(widget -> hasDimensionalTeleportCapability())
+ .setPos(46, 40))
+ .widget(new FakeSyncWidget.FluidStackSyncer(() -> mFluid, val -> mFluid = val));
addChangeNumberButtons(builder, GT_UITextures.OVERLAY_BUTTON_MINUS_LARGE, -512, -64, 7);
addChangeNumberButtons(builder, GT_UITextures.OVERLAY_BUTTON_MINUS_SMALL, -16, -1, 25);
@@ -464,9 +477,11 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt
private void addChangeNumberButton(ModularWindow.Builder builder, IDrawable overlay, Consumer<Integer> setter,
int addNumberShift, int addNumber, int xPos, int yPos) {
builder.widget(
- new ButtonWidget()
- .setOnClick((clickData, widget) -> setter.accept(clickData.shift ? addNumberShift : addNumber))
- .setBackground(GT_UITextures.BUTTON_STANDARD, overlay).setSize(18, 18).setPos(xPos, yPos));
+ new ButtonWidget().setOnClick(
+ (clickData, widget) -> setter.accept(clickData.shift ? addNumberShift : addNumber))
+ .setBackground(GT_UITextures.BUTTON_STANDARD, overlay)
+ .setSize(18, 18)
+ .setPos(xPos, yPos));
}
@Override
@@ -477,6 +492,8 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt
@Override
public void addGregTechLogo(ModularWindow.Builder builder) {
builder.widget(
- new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17).setPos(113, 56));
+ new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo())
+ .setSize(17, 17)
+ .setPos(113, 56));
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java
index 7e4d5f8165..27dea9bd00 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java
@@ -74,48 +74,72 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine
"Miner.png",
"",
TextureFactory.of(
- TextureFactory
- .of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE_ACTIVE")),
- TextureFactory.builder().addIcon(
- new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE_ACTIVE_GLOW"))
- .glow().build()),
+ TextureFactory.of(
+ new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE_ACTIVE")),
+ TextureFactory.builder()
+ .addIcon(
+ new Textures.BlockIcons.CustomIcon(
+ "basicmachines/miner/OVERLAY_SIDE_ACTIVE_GLOW"))
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE")),
TextureFactory.builder()
- .addIcon(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE_GLOW"))
- .glow().build()),
+ .addIcon(
+ new Textures.BlockIcons.CustomIcon(
+ "basicmachines/miner/OVERLAY_SIDE_GLOW"))
+ .glow()
+ .build()),
TextureFactory.of(
- TextureFactory
- .of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_ACTIVE")),
- TextureFactory.builder().addIcon(
- new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_ACTIVE_GLOW"))
- .glow().build()),
+ TextureFactory.of(
+ new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_ACTIVE")),
+ TextureFactory.builder()
+ .addIcon(
+ new Textures.BlockIcons.CustomIcon(
+ "basicmachines/miner/OVERLAY_FRONT_ACTIVE_GLOW"))
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT")),
TextureFactory.builder()
- .addIcon(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_GLOW"))
- .glow().build()),
+ .addIcon(
+ new Textures.BlockIcons.CustomIcon(
+ "basicmachines/miner/OVERLAY_FRONT_GLOW"))
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP_ACTIVE")),
- TextureFactory.builder().addIcon(
- new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP_ACTIVE_GLOW"))
- .glow().build()),
+ TextureFactory.builder()
+ .addIcon(
+ new Textures.BlockIcons.CustomIcon(
+ "basicmachines/miner/OVERLAY_TOP_ACTIVE_GLOW"))
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP")),
TextureFactory.builder()
- .addIcon(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP_GLOW"))
- .glow().build()),
+ .addIcon(
+ new Textures.BlockIcons.CustomIcon(
+ "basicmachines/miner/OVERLAY_TOP_GLOW"))
+ .glow()
+ .build()),
TextureFactory.of(
- TextureFactory
- .of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_ACTIVE")),
- TextureFactory.builder().addIcon(
- new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_ACTIVE_GLOW"))
- .glow().build()),
+ TextureFactory.of(
+ new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_ACTIVE")),
+ TextureFactory.builder()
+ .addIcon(
+ new Textures.BlockIcons.CustomIcon(
+ "basicmachines/miner/OVERLAY_BOTTOM_ACTIVE_GLOW"))
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM")),
TextureFactory.builder()
- .addIcon(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_GLOW"))
- .glow().build()));
+ .addIcon(
+ new Textures.BlockIcons.CustomIcon(
+ "basicmachines/miner/OVERLAY_BOTTOM_GLOW"))
+ .glow()
+ .build()));
mSpeed = SPEED[aTier];
radiusConfig = RADIUS[mTier];
}
@@ -258,12 +282,17 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine
boolean isOre;
do {
ChunkPosition oreBlockPos = oreBlockPositions.remove(0);
- oreBlock = aBaseMetaTileEntity
- .getBlockOffset(oreBlockPos.chunkPosX, oreBlockPos.chunkPosY, oreBlockPos.chunkPosZ);
+ oreBlock = aBaseMetaTileEntity.getBlockOffset(
+ oreBlockPos.chunkPosX,
+ oreBlockPos.chunkPosY,
+ oreBlockPos.chunkPosZ);
x = aBaseMetaTileEntity.getXCoord() + oreBlockPos.chunkPosX;
y = aBaseMetaTileEntity.getYCoord() + oreBlockPos.chunkPosY;
z = aBaseMetaTileEntity.getZCoord() + oreBlockPos.chunkPosZ;
- isOre = GT_Utility.isOre(oreBlock, aBaseMetaTileEntity.getWorld().getBlockMetadata(x, y, z));
+ isOre = GT_Utility.isOre(
+ oreBlock,
+ aBaseMetaTileEntity.getWorld()
+ .getBlockMetadata(x, y, z));
} // someone else might have removed the block
while (!isOre && !oreBlockPositions.isEmpty());
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java
index 054ca1694a..7a786228e4 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java
@@ -64,10 +64,15 @@ public class GT_MetaTileEntity_MonsterRepellent extends GT_MetaTileEntity_Tiered
boolean aActive, boolean aRedstone) {
if (aSide != ForgeDirection.UP.ordinal()) return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1] };
if (aActive) return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1],
- TextureFactory.of(OVERLAY_TELEPORTER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW).glow().build() };
+ TextureFactory.of(OVERLAY_TELEPORTER_ACTIVE), TextureFactory.builder()
+ .addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW)
+ .glow()
+ .build() };
return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_TELEPORTER),
- TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TELEPORTER_GLOW)
+ .glow()
+ .build() };
}
@Override
@@ -96,9 +101,14 @@ public class GT_MetaTileEntity_MonsterRepellent extends GT_MetaTileEntity_Tiered
@Override
public void onRemoval() {
- int[] tCoords = { this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(),
- this.getBaseMetaTileEntity().getZCoord(),
- this.getBaseMetaTileEntity().getWorld().provider.dimensionId };
+ int[] tCoords = { this.getBaseMetaTileEntity()
+ .getXCoord(),
+ this.getBaseMetaTileEntity()
+ .getYCoord(),
+ this.getBaseMetaTileEntity()
+ .getZCoord(),
+ this.getBaseMetaTileEntity()
+ .getWorld().provider.dimensionId };
GT_SpawnEventHandler.mobReps.removeIf(coords -> Arrays.equals(coords, tCoords));
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java
index f905717c5a..bae01940f9 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java
@@ -34,28 +34,52 @@ public class GT_MetaTileEntity_PotionBrewer extends GT_MetaTileEntity_BasicMachi
"",
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_POTIONBREWER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_POTIONBREWER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_POTIONBREWER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_POTIONBREWER),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_POTIONBREWER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_POTIONBREWER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_POTIONBREWER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_POTIONBREWER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_POTIONBREWER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_POTIONBREWER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_POTIONBREWER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_POTIONBREWER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_POTIONBREWER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_POTIONBREWER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_POTIONBREWER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_POTIONBREWER),
- TextureFactory.builder().addIcon(OVERLAY_TOP_POTIONBREWER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_POTIONBREWER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_POTIONBREWER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_POTIONBREWER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_POTIONBREWER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_POTIONBREWER),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_POTIONBREWER_GLOW).glow().build()));
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_POTIONBREWER_GLOW)
+ .glow()
+ .build()));
}
public GT_MetaTileEntity_PotionBrewer(String aName, int aTier, String aDescription, ITexture[][][] aTextures,
@@ -98,7 +122,8 @@ public class GT_MetaTileEntity_PotionBrewer extends GT_MetaTileEntity_BasicMachi
FluidStack aFluid = getFillableStack();
if ((getDrainableStack() == null) && (aFluid != null) && (getInputAt(0) != null)) {
- String tInputName = aFluid.getFluid().getName();
+ String tInputName = aFluid.getFluid()
+ .getName();
if (tInputName.startsWith("potion.")) {
tInputName = tInputName.replaceFirst("potion.", "");
int tFirstDot = tInputName.indexOf('.') + 1;
@@ -194,7 +219,10 @@ public class GT_MetaTileEntity_PotionBrewer extends GT_MetaTileEntity_BasicMachi
@Override
public boolean isFluidInputAllowed(FluidStack aFluid) {
- return (aFluid.getFluid().getName().startsWith("potion.")) || (super.isFluidInputAllowed(aFluid));
+ return (aFluid.getFluid()
+ .getName()
+ .startsWith("potion."))
+ || (super.isFluidInputAllowed(aFluid));
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Printer.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Printer.java
index 7da1ec5e43..71b01f4cc2 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Printer.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Printer.java
@@ -41,8 +41,8 @@ public class GT_MetaTileEntity_Printer extends GT_MetaTileEntity_BasicMachine {
} else if ((GT_Utility.isStackValid(getInputAt(0))) && (getInputAt(0).stackSize > 0)
&& (GT_Utility.isStackInvalid(getSpecialSlot()))
&& (OrePrefixes.block.contains(getInputAt(0)))) {
- ArrayList<ItemStack> tList = GT_OreDictUnificator
- .getOres(GT_OreDictUnificator.getAssociation(getInputAt(0)));
+ ArrayList<ItemStack> tList = GT_OreDictUnificator.getOres(
+ GT_OreDictUnificator.getAssociation(getInputAt(0)));
if (tList.size() > 1) {
tList.add(tList.get(0));
int i = 0;
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java
index 012f6e547f..db9aedb9eb 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java
@@ -39,8 +39,8 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
private static final ItemStack MINING_PIPE = GT_ModHandler.getIC2Item("miningPipe", 0);
private static final Block MINING_PIPE_BLOCK = GT_Utility.getBlockFromStack(MINING_PIPE);
- private static final Block MINING_PIPE_TIP_BLOCK = GT_Utility
- .getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 0));
+ private static final Block MINING_PIPE_TIP_BLOCK = GT_Utility.getBlockFromStack(
+ GT_ModHandler.getIC2Item("miningPipeTip", 0));
public static int getMaxDistanceForTier(int aTier) {
return (10 * ((int) Math.pow(1.6D, aTier)));
@@ -366,13 +366,20 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
// 2. once per 5 tick
// 3. can hold retracted pipe in inventory
int tHeadY = getYOfPumpHead();
- if (tHeadY < this.getBaseMetaTileEntity().getYCoord()) {
- final int tXCoord = this.getBaseMetaTileEntity().getXCoord();
- final int tZCoord = this.getBaseMetaTileEntity().getZCoord();
- this.getBaseMetaTileEntity().getWorld().setBlockToAir(tXCoord, tHeadY, tZCoord);
- if (tHeadY < this.getBaseMetaTileEntity().getYCoord() - 1) {
+ if (tHeadY < this.getBaseMetaTileEntity()
+ .getYCoord()) {
+ final int tXCoord = this.getBaseMetaTileEntity()
+ .getXCoord();
+ final int tZCoord = this.getBaseMetaTileEntity()
+ .getZCoord();
+ this.getBaseMetaTileEntity()
+ .getWorld()
+ .setBlockToAir(tXCoord, tHeadY, tZCoord);
+ if (tHeadY < this.getBaseMetaTileEntity()
+ .getYCoord()
+ - 1) {
getBaseMetaTileEntity().getWorld()
- .setBlock(tXCoord, tHeadY + 1, tZCoord, MINING_PIPE_TIP_BLOCK);
+ .setBlock(tXCoord, tHeadY + 1, tZCoord, MINING_PIPE_TIP_BLOCK);
}
if (this.mInventory[0] == null) {
final ItemStack copy = MINING_PIPE.copy();
@@ -443,7 +450,11 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
int x = getBaseMetaTileEntity().getXCoord(), z = getBaseMetaTileEntity().getZCoord();
if ((!consumeFluid(x, yHead - 1, z)) && (!getBaseMetaTileEntity().getBlock(x, yHead - 1, z)
- .isAir(getBaseMetaTileEntity().getWorld(), x, yHead - 1, z))) {
+ .isAir(
+ getBaseMetaTileEntity().getWorld(),
+ x,
+ yHead - 1,
+ z))) {
// Either we didn't consume a fluid, or it's a non Air block
if (debugBlockPump) {
GT_Log.out.println("PUMP: Did not consume fluid, or non-airblock found");
@@ -466,7 +477,8 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
}
// And change the previous block to a pipe -- as long as it isn't the pump itself!
if (yHead != getBaseMetaTileEntity().getYCoord()) {
- getBaseMetaTileEntity().getWorld().setBlock(x, yHead, z, MINING_PIPE_BLOCK);
+ getBaseMetaTileEntity().getWorld()
+ .setBlock(x, yHead, z, MINING_PIPE_BLOCK);
}
getBaseMetaTileEntity().decrStackSize(0, 1);
if (debugBlockPump) {
@@ -491,7 +503,8 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
if (nextBlock == MINING_PIPE_BLOCK || nextBlock == MINING_PIPE_TIP_BLOCK) {
// We're running into an existing set of pipes -- Turn this block into a pipe and keep going
this.clearQueue(true);
- getBaseMetaTileEntity().getWorld().setBlock(x, y, z, MINING_PIPE_BLOCK);
+ getBaseMetaTileEntity().getWorld()
+ .setBlock(x, y, z, MINING_PIPE_BLOCK);
if (debugBlockPump) {
GT_Log.out.println("PUMP: Hit pipes already in place, trying to merge");
}
@@ -509,7 +522,8 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
// We're below the pump at the bottom of the pipes, we haven't found a tip; make the previous pipe a
// tip!
this.clearQueue(true);
- getBaseMetaTileEntity().getWorld().setBlock(x, y + 1, z, MINING_PIPE_TIP_BLOCK);
+ getBaseMetaTileEntity().getWorld()
+ .setBlock(x, y + 1, z, MINING_PIPE_TIP_BLOCK);
if (debugBlockPump) {
GT_Log.out.println("PUMP: Did not find a tip at bottom, setting last pipe as tip");
}
@@ -652,7 +666,9 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
((IFluidBlock) aBlock).drain(getBaseMetaTileEntity().getWorld(), aX, aY, aZ, false))) {
if (!isWaterOrLava) {
// Only set Block to Air for non lava/water fluids
- this.getBaseMetaTileEntity().getWorld().setBlockToAir(aX, aY, aZ);
+ this.getBaseMetaTileEntity()
+ .getWorld()
+ .setBlockToAir(aX, aY, aZ);
}
this.mFluid.amount += 1000;
@@ -665,7 +681,8 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
}
getBaseMetaTileEntity().decreaseStoredEnergyUnits(this.getEuUsagePerAction(), true);
- getBaseMetaTileEntity().getWorld().setBlock(aX, aY, aZ, Blocks.air, 0, 2);
+ getBaseMetaTileEntity().getWorld()
+ .setBlock(aX, aY, aZ, Blocks.air, 0, 2);
return true;
}
return false;
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java
index 6add532358..739db376c1 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java
@@ -52,28 +52,52 @@ public class GT_MetaTileEntity_Replicator extends GT_MetaTileEntity_BasicMachine
"",
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_REPLICATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_REPLICATOR_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_REPLICATOR_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_REPLICATOR),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_REPLICATOR_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_REPLICATOR_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_REPLICATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_REPLICATOR_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_REPLICATOR_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_REPLICATOR),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_REPLICATOR_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_REPLICATOR_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_REPLICATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_REPLICATOR_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_REPLICATOR_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_REPLICATOR),
- TextureFactory.builder().addIcon(OVERLAY_TOP_REPLICATOR_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_REPLICATOR_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_REPLICATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_REPLICATOR_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_REPLICATOR_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_REPLICATOR),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_REPLICATOR_GLOW).glow().build()));
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_REPLICATOR_GLOW)
+ .glow()
+ .build()));
}
public GT_MetaTileEntity_Replicator(String aName, int aTier, String aDescription, ITexture[][][] aTextures,
@@ -106,8 +130,9 @@ public class GT_MetaTileEntity_Replicator extends GT_MetaTileEntity_BasicMachine
FluidStack tFluid = getFillableStack();
if ((tFluid != null) && (tFluid.isFluidEqual(Materials.UUMatter.getFluid(1L)))) {
ItemStack tDataOrb = getSpecialSlot();
- if ((ItemList.Tool_DataOrb.isStackEqual(tDataOrb, false, true))
- && (Behaviour_DataOrb.getDataTitle(tDataOrb).equals("Elemental-Scan"))) {
+ if ((ItemList.Tool_DataOrb.isStackEqual(tDataOrb, false, true)) && (Behaviour_DataOrb.getDataTitle(tDataOrb)
+ .equals(
+ "Elemental-Scan"))) {
Materials tMaterial = Element.get(Behaviour_DataOrb.getDataName(tDataOrb)).mLinkedMaterials.get(0);
long tMass = cubicFluidMultiplier(MASS_OVERRIDES.getOrDefault(tMaterial, tMaterial.getMass()));
if ((tFluid.amount >= tMass) && (tMass > 0L)) {
@@ -169,9 +194,12 @@ public class GT_MetaTileEntity_Replicator extends GT_MetaTileEntity_BasicMachine
@Override
public int getCapacity() {
if ((sHeaviestElementMass == 0) && (GregTech_API.sPostloadFinished)) {
- sHeaviestElementMass = Materials.getMaterialsMap().values().stream()
- .mapToInt(material -> (int) cubicFluidMultiplier((int) material.getMass())).max()
- .orElseThrow(NoSuchElementException::new);
+ sHeaviestElementMass = Materials.getMaterialsMap()
+ .values()
+ .stream()
+ .mapToInt(material -> (int) cubicFluidMultiplier((int) material.getMass()))
+ .max()
+ .orElseThrow(NoSuchElementException::new);
// Make the Number nicer =)
sHeaviestElementMass = 1000 * (sHeaviestElementMass / 1000 + 1);
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java
index 584164fa94..ace1e90f71 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java
@@ -32,28 +32,52 @@ public class GT_MetaTileEntity_RockBreaker extends GT_MetaTileEntity_BasicMachin
"",
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_TOP_ROCK_BREAKER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_GLOW).glow().build()));
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()));
}
public GT_MetaTileEntity_RockBreaker(String aName, int aTier, String aDescription, ITexture[][][] aTextures,
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java
index 3f37effffa..dc3c4f7dc3 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java
@@ -50,28 +50,52 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine {
"",
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_SCANNER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_SCANNER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_SCANNER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_SCANNER),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_SCANNER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_SCANNER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_SCANNER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_SCANNER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_SCANNER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_SCANNER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_SCANNER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_SCANNER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_SCANNER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_SCANNER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_SCANNER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_SCANNER),
- TextureFactory.builder().addIcon(OVERLAY_TOP_SCANNER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_SCANNER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_SCANNER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_SCANNER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_SCANNER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_SCANNER),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_SCANNER_GLOW).glow().build()));
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_SCANNER_GLOW)
+ .glow()
+ .build()));
}
public GT_MetaTileEntity_Scanner(String aName, int aTier, String aDescription, ITexture[][][] aTextures,
@@ -221,9 +245,15 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine {
return 2;
}
- if ((aStack.getItem().getUnlocalizedName().contains("Schematic")
- || aStack.getItem().getUnlocalizedName().contains("schematic"))
- && !aStack.getItem().getUnlocalizedName().contains("Schematics")) {
+ if ((aStack.getItem()
+ .getUnlocalizedName()
+ .contains("Schematic")
+ || aStack.getItem()
+ .getUnlocalizedName()
+ .contains("schematic"))
+ && !aStack.getItem()
+ .getUnlocalizedName()
+ .contains("Schematics")) {
if (mTier < 3) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
String sTier = "";
@@ -232,39 +262,71 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine {
if (stackItemID == Item.getIdFromItem(
Objects.requireNonNull(
GT_ModHandler.getModItem(GalacticraftCore.modID, "item.schematic", 1L, 0))
- .getItem())) {
- if (stackItemDamage == 0 && aStack.toString().equals(
- Objects.requireNonNull(
- GT_ModHandler.getModItem(GalacticraftCore.modID, "item.schematic", 1L, 0))
- .copy().toString()))
+ .getItem())) {
+ if (stackItemDamage == 0 && aStack.toString()
+ .equals(
+ Objects.requireNonNull(
+ GT_ModHandler.getModItem(
+ GalacticraftCore.modID,
+ "item.schematic",
+ 1L,
+ 0))
+ .copy()
+ .toString()))
sTier = "100";
- else if (stackItemDamage == 1 && aStack.toString().equals(
- Objects.requireNonNull(
- GT_ModHandler.getModItem(GalacticraftCore.modID, "item.schematic", 1L, 1))
- .copy().toString()))
+ else if (stackItemDamage == 1 && aStack.toString()
+ .equals(
+ Objects.requireNonNull(
+ GT_ModHandler.getModItem(
+ GalacticraftCore.modID,
+ "item.schematic",
+ 1L,
+ 1))
+ .copy()
+ .toString()))
sTier = "2";
} else {
if (stackItemID == Item.getIdFromItem(
Objects.requireNonNull(
GT_ModHandler.getModItem(GalacticraftMars.modID, "item.schematic", 1L, 0))
- .getItem())) {
- if (stackItemDamage == 0 && aStack.toString().equals(
- Objects.requireNonNull(
- GT_ModHandler.getModItem(GalacticraftMars.modID, "item.schematic", 1L, 0))
- .copy().toString()))
+ .getItem())) {
+ if (stackItemDamage == 0 && aStack.toString()
+ .equals(
+ Objects.requireNonNull(
+ GT_ModHandler.getModItem(
+ GalacticraftMars.modID,
+ "item.schematic",
+ 1L,
+ 0))
+ .copy()
+ .toString()))
sTier = "3";
- else if (stackItemDamage == 1 && aStack.toString().equals(
- Objects.requireNonNull(
- GT_ModHandler.getModItem(GalacticraftMars.modID, "item.schematic", 1L, 1))
- .copy().toString()))
+ else if (stackItemDamage == 1 && aStack.toString()
+ .equals(
+ Objects.requireNonNull(
+ GT_ModHandler.getModItem(
+ GalacticraftMars.modID,
+ "item.schematic",
+ 1L,
+ 1))
+ .copy()
+ .toString()))
sTier = "101";
- else if (stackItemDamage == 2 && aStack.toString().equals(
- Objects.requireNonNull(
- GT_ModHandler.getModItem(GalacticraftMars.modID, "item.schematic", 1L, 2))
- .copy().toString()))
+ else if (stackItemDamage == 2 && aStack.toString()
+ .equals(
+ Objects.requireNonNull(
+ GT_ModHandler.getModItem(
+ GalacticraftMars.modID,
+ "item.schematic",
+ 1L,
+ 2))
+ .copy()
+ .toString()))
sTier = "102";
- } else if (aStack.getUnlocalizedName().matches(".*\\d+.*"))
- sTier = aStack.getUnlocalizedName().split("(?<=\\D)(?=\\d)")[1].substring(0, 1);
+ } else if (aStack.getUnlocalizedName()
+ .matches(".*\\d+.*"))
+ sTier = aStack.getUnlocalizedName()
+ .split("(?<=\\D)(?=\\d)")[1].substring(0, 1);
else sTier = "1";
}
@@ -287,7 +349,8 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine {
}
}
if (getSpecialSlot() == null && ItemList.Tool_DataStick.isStackEqual(aStack, false, true)) {
- if (GT_Utility.ItemNBT.getBookTitle(aStack).equals("Raw Prospection Data")) {
+ if (GT_Utility.ItemNBT.getBookTitle(aStack)
+ .equals("Raw Prospection Data")) {
GT_Utility.ItemNBT.setBookTitle(aStack, "Analyzed Prospection Data");
GT_Utility.ItemNBT.convertProspectionData(aStack);
aStack.stackSize -= 1;
@@ -336,10 +399,11 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine {
@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
if (mProgresstime >= (mMaxProgresstime - 1)) {
- if ((this.mOutputItems[0] != null)
- && (this.mOutputItems[0].getUnlocalizedName().equals("gt.metaitem.01.32707"))) {
+ if ((this.mOutputItems[0] != null) && (this.mOutputItems[0].getUnlocalizedName()
+ .equals("gt.metaitem.01.32707"))) {
GT_Mod.achievements.issueAchievement(
- aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()),
+ aBaseMetaTileEntity.getWorld()
+ .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()),
"scanning");
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java
index 4e8af7d283..18929fcb55 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java
@@ -47,28 +47,52 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic
"",
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_ROCK_BREAKER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_TOP_ROCK_BREAKER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW).glow().build()),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build()),
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_GLOW).glow().build()));
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_ROCK_BREAKER_GLOW)
+ .glow()
+ .build()));
}
public GT_MetaTileEntity_SeismicProspector(String aName, int aTier, String aDescription, ITexture[][][] aTextures,
@@ -104,7 +128,8 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic
|| (stackData != null && stackData.mMaterial.mMaterial == Materials.Glyceryl
&& aStack.stackSize >= 1)
|| (aStack.getItem() == ItemList.Block_Powderbarrel.getItem()
- && aStack.getItemDamage() == ItemList.Block_Powderbarrel.get(1).getItemDamage()
+ && aStack.getItemDamage() == ItemList.Block_Powderbarrel.get(1)
+ .getItemDamage()
&& aStack.stackSize >= 8))) {
if ((!aPlayer.capabilities.isCreativeMode) && (aStack.stackSize != 111)) {
if (aStack.getItem() == Item.getItemFromBlock(Blocks.tnt)) {
@@ -114,11 +139,12 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic
} else if (aStack.getItem() == Ic2Items.dynamite.getItem()) {
aStack.stackSize -= 4;
} else if (aStack.getItem() == ItemList.Block_Powderbarrel.getItem()
- && aStack.getItemDamage() == ItemList.Block_Powderbarrel.get(1).getItemDamage()) {
- aStack.stackSize -= 8;
- } else {
- aStack.stackSize -= 1;
- }
+ && aStack.getItemDamage() == ItemList.Block_Powderbarrel.get(1)
+ .getItemDamage()) {
+ aStack.stackSize -= 8;
+ } else {
+ aStack.stackSize -= 1;
+ }
}
this.ready = true;
this.mMaxProgresstime = 200;
@@ -135,15 +161,21 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic
int max = range();
int step = step();
- for (int i = this.getBaseMetaTileEntity().getYCoord(); i > 0; i--) {
+ for (int i = this.getBaseMetaTileEntity()
+ .getYCoord(); i > 0; i--) {
for (int f = min; f <= max; f += step) {
for (int g = min; g <= max; g += step) {
- Block tBlock = this.getBaseMetaTileEntity().getBlockOffset(f, -i, g);
+ Block tBlock = this.getBaseMetaTileEntity()
+ .getBlockOffset(f, -i, g);
if ((tBlock instanceof GT_Block_Ores_Abstract)) {
- TileEntity tTileEntity = getBaseMetaTileEntity().getWorld().getTileEntity(
- getBaseMetaTileEntity().getXCoord() + f,
- getBaseMetaTileEntity().getYCoord() + (-i),
- getBaseMetaTileEntity().getZCoord() + g);
+ TileEntity tTileEntity = getBaseMetaTileEntity().getWorld()
+ .getTileEntity(
+ getBaseMetaTileEntity().getXCoord()
+ + f,
+ getBaseMetaTileEntity().getYCoord()
+ + (-i),
+ getBaseMetaTileEntity().getZCoord()
+ + g);
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
if (((GT_TileEntity_Ores) tTileEntity).mMetaData < 16000) {
Materials tMaterial = GregTech_API.sGeneratedMaterials[(((GT_TileEntity_Ores) tTileEntity).mMetaData
@@ -156,16 +188,20 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic
}
}
} else {
- int tMetaID = getBaseMetaTileEntity().getWorld().getBlockMetadata(
- getBaseMetaTileEntity().getXCoord() + f,
- getBaseMetaTileEntity().getYCoord() + (-i),
- getBaseMetaTileEntity().getZCoord() + g);
- ItemData tAssotiation = GT_OreDictUnificator
- .getAssociation(new ItemStack(tBlock, 1, tMetaID));
- if ((tAssotiation != null)
- && (tAssotiation.mPrefix.toString().startsWith("ore"))) {
- if (!tStringList
- .contains(tAssotiation.mMaterial.mMaterial.mDefaultLocalName)) {
+ int tMetaID = getBaseMetaTileEntity().getWorld()
+ .getBlockMetadata(
+ getBaseMetaTileEntity().getXCoord()
+ + f,
+ getBaseMetaTileEntity().getYCoord()
+ + (-i),
+ getBaseMetaTileEntity().getZCoord()
+ + g);
+ ItemData tAssotiation = GT_OreDictUnificator.getAssociation(
+ new ItemStack(tBlock, 1, tMetaID));
+ if ((tAssotiation != null) && (tAssotiation.mPrefix.toString()
+ .startsWith("ore"))) {
+ if (!tStringList.contains(
+ tAssotiation.mMaterial.mMaterial.mDefaultLocalName)) {
tStringList.add(tAssotiation.mMaterial.mMaterial.mDefaultLocalName);
}
}
@@ -185,10 +221,14 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic
}
GT_Utility.ItemNBT.setProspectionData(
aPlayer.getCurrentEquippedItem(),
- this.getBaseMetaTileEntity().getXCoord(),
- this.getBaseMetaTileEntity().getYCoord(),
- this.getBaseMetaTileEntity().getZCoord(),
- this.getBaseMetaTileEntity().getWorld().provider.dimensionId,
+ this.getBaseMetaTileEntity()
+ .getXCoord(),
+ this.getBaseMetaTileEntity()
+ .getYCoord(),
+ this.getBaseMetaTileEntity()
+ .getZCoord(),
+ this.getBaseMetaTileEntity()
+ .getWorld().provider.dimensionId,
tFluid,
tStringArray);
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java
index 2b1f0fa349..210c55578f 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java
@@ -116,9 +116,9 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank
int tCount = 64;
for (int i = 0; i < 36; i++) {
if (tPlayer.inventory.getStackInSlot(i) != null) {
- tCount += (tPlayer.inventory.getStackInSlot(i).getMaxStackSize() > 1
- ? tPlayer.inventory.getStackInSlot(i).stackSize
- : 64);
+ tCount += (tPlayer.inventory.getStackInSlot(i)
+ .getMaxStackSize()
+ > 1 ? tPlayer.inventory.getStackInSlot(i).stackSize : 64);
}
}
for (int i = 0; i < 4; i++) {
@@ -128,10 +128,12 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank
}
return Math.min(5.0F, tCount / 666.6F);
}
- if (GT_Utility.getClassName(aEntity).equals("EntityItnt")) {
+ if (GT_Utility.getClassName(aEntity)
+ .equals("EntityItnt")) {
return 5.0F;
}
- if (GT_Utility.getClassName(aEntity).equals("EntityNuke")) {
+ if (GT_Utility.getClassName(aEntity)
+ .equals("EntityNuke")) {
return 50.0F;
}
if ((aEntity instanceof EntityArrow)) {
@@ -212,14 +214,23 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
- if (aSide != this.getBaseMetaTileEntity().getFrontFacing()) return new ITexture[] {
- MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_TELEPORTER_SIDES),
- TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_SIDES_GLOW).glow().build() };
+ if (aSide != this.getBaseMetaTileEntity()
+ .getFrontFacing())
+ return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1],
+ TextureFactory.of(OVERLAY_TELEPORTER_SIDES), TextureFactory.builder()
+ .addIcon(OVERLAY_TELEPORTER_SIDES_GLOW)
+ .glow()
+ .build() };
if (aActive) return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1],
- TextureFactory.of(OVERLAY_TELEPORTER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW).glow().build() };
+ TextureFactory.of(OVERLAY_TELEPORTER_ACTIVE), TextureFactory.builder()
+ .addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW)
+ .glow()
+ .build() };
return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_TELEPORTER),
- TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TELEPORTER_GLOW)
+ .glow()
+ .build() };
}
@Override
@@ -244,10 +255,14 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank
@Override
public void onConfigLoad(GT_Config aConfig) {
- sInterDimensionalTeleportAllowed = aConfig
- .get(ConfigCategories.machineconfig, "Teleporter.Interdimensional", true);
- sPassiveEnergyDrain = aConfig
- .get(ConfigCategories.machineconfig, "Teleporter.PassiveDrain", sPassiveEnergyDrain);
+ sInterDimensionalTeleportAllowed = aConfig.get(
+ ConfigCategories.machineconfig,
+ "Teleporter.Interdimensional",
+ true);
+ sPassiveEnergyDrain = aConfig.get(
+ ConfigCategories.machineconfig,
+ "Teleporter.PassiveDrain",
+ sPassiveEnergyDrain);
sPowerMultiplyer = aConfig.get(ConfigCategories.machineconfig, "Teleporter.PowerMultipler", sPowerMultiplyer);
sFPowerMultiplyer = sPowerMultiplyer / 100.0;
}
@@ -343,26 +358,36 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank
(byte) 64,
(byte) 1);
if (mInventory[0] == null || mInventory[0].stackSize < tStacksize) {
- getBaseMetaTileEntity()
- .decreaseStoredEnergyUnits(
- (long) (Math.pow(tDistance, 1.5) * tDistance
- * (tStacksize
- - (mInventory[0] == null ? 0 : mInventory[0].stackSize))
- * sFPowerMultiplyer),
- false);
+ getBaseMetaTileEntity().decreaseStoredEnergyUnits(
+ (long) (Math.pow(tDistance, 1.5) * tDistance
+ * (tStacksize - (mInventory[0] == null ? 0 : mInventory[0].stackSize))
+ * sFPowerMultiplyer),
+ false);
}
}
}
- List entities_in_box = getBaseMetaTileEntity().getWorld().getEntitiesWithinAABB(
- Entity.class,
- AxisAlignedBB.getBoundingBox(
- getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 2) - 1,
- getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 2) - 1,
- getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 2) - 1,
- getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 2) + 2,
- getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 2) + 2,
- getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 2)
- + 2));
+ List entities_in_box = getBaseMetaTileEntity().getWorld()
+ .getEntitiesWithinAABB(
+ Entity.class,
+ AxisAlignedBB.getBoundingBox(
+ getBaseMetaTileEntity().getOffsetX(
+ getBaseMetaTileEntity().getFrontFacing(),
+ 2) - 1,
+ getBaseMetaTileEntity().getOffsetY(
+ getBaseMetaTileEntity().getFrontFacing(),
+ 2) - 1,
+ getBaseMetaTileEntity().getOffsetZ(
+ getBaseMetaTileEntity().getFrontFacing(),
+ 2) - 1,
+ getBaseMetaTileEntity().getOffsetX(
+ getBaseMetaTileEntity().getFrontFacing(),
+ 2) + 2,
+ getBaseMetaTileEntity().getOffsetY(
+ getBaseMetaTileEntity().getFrontFacing(),
+ 2) + 2,
+ getBaseMetaTileEntity().getOffsetZ(
+ getBaseMetaTileEntity().getFrontFacing(),
+ 2) + 2));
for (Object tObject : entities_in_box) {
if (((tObject instanceof Entity)) && (!((Entity) tObject).isDead)) {
@@ -568,26 +593,32 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setSize(90, 72).setPos(43, 4))
- .widget(
- TextWidget.dynamicString(() -> "X: " + GT_Utility.parseNumberToString(mTargetX))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 8))
- .widget(
- TextWidget.dynamicString(() -> "Y: " + GT_Utility.parseNumberToString(mTargetY))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 16))
- .widget(
- TextWidget.dynamicString(() -> "Z: " + GT_Utility.parseNumberToString(mTargetZ))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 24))
- .widget(
- TextWidget.dynamicString(() -> "Dim: " + GT_Utility.parseNumberToString(mTargetD))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(46, 32))
- .widget(
- TextWidget
- .dynamicString(
- () -> "Dim Valid: " + (GT_Utility.isRealDimension(mTargetD) ? "Yes" : "No"))
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> hasDimensionalTeleportCapability()).setPos(46, 40))
- .widget(new FakeSyncWidget.FluidStackSyncer(() -> mFluid, val -> mFluid = val));
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK)
+ .setSize(90, 72)
+ .setPos(43, 4))
+ .widget(
+ TextWidget.dynamicString(() -> "X: " + GT_Utility.parseNumberToString(mTargetX))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(46, 8))
+ .widget(
+ TextWidget.dynamicString(() -> "Y: " + GT_Utility.parseNumberToString(mTargetY))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(46, 16))
+ .widget(
+ TextWidget.dynamicString(() -> "Z: " + GT_Utility.parseNumberToString(mTargetZ))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(46, 24))
+ .widget(
+ TextWidget.dynamicString(() -> "Dim: " + GT_Utility.parseNumberToString(mTargetD))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(46, 32))
+ .widget(
+ TextWidget.dynamicString(
+ () -> "Dim Valid: " + (GT_Utility.isRealDimension(mTargetD) ? "Yes" : "No"))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setEnabled(widget -> hasDimensionalTeleportCapability())
+ .setPos(46, 40))
+ .widget(new FakeSyncWidget.FluidStackSyncer(() -> mFluid, val -> mFluid = val));
addChangeNumberButtons(builder, GT_UITextures.OVERLAY_BUTTON_MINUS_LARGE, -512, -64, 7);
addChangeNumberButtons(builder, GT_UITextures.OVERLAY_BUTTON_MINUS_SMALL, -16, -1, 25);
@@ -624,9 +655,11 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank
private void addChangeNumberButton(ModularWindow.Builder builder, IDrawable overlay, Consumer<Integer> setter,
int addNumberShift, int addNumber, int xPos, int yPos) {
builder.widget(
- new ButtonWidget()
- .setOnClick((clickData, widget) -> setter.accept(clickData.shift ? addNumberShift : addNumber))
- .setBackground(GT_UITextures.BUTTON_STANDARD, overlay).setSize(18, 18).setPos(xPos, yPos));
+ new ButtonWidget().setOnClick(
+ (clickData, widget) -> setter.accept(clickData.shift ? addNumberShift : addNumber))
+ .setBackground(GT_UITextures.BUTTON_STANDARD, overlay)
+ .setSize(18, 18)
+ .setPos(xPos, yPos));
}
@Override
@@ -637,6 +670,8 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank
@Override
public void addGregTechLogo(ModularWindow.Builder builder) {
builder.widget(
- new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17).setPos(113, 56));
+ new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo())
+ .setSize(17, 17)
+ .setPos(113, 56));
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineBase.java b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineBase.java
index cae467c4a0..7d8ae980cd 100644
--- a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineBase.java
+++ b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineBase.java
@@ -136,8 +136,7 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta
TileEntity te = world.getTileEntity(mTargetPos.posX, mTargetPos.posY, mTargetPos.posZ);
final IMetaTileEntity tMeta;
if (te instanceof BaseMetaTileEntity
- && ((tMeta = ((BaseMetaTileEntity) te)
- .getMetaTileEntity()) instanceof GT_MetaTileEntity_LongDistancePipelineBase)
+ && ((tMeta = ((BaseMetaTileEntity) te).getMetaTileEntity()) instanceof GT_MetaTileEntity_LongDistancePipelineBase)
&& isSameClass((GT_MetaTileEntity_LongDistancePipelineBase) tMeta)) {
// It's the right type!
mTarget = (GT_MetaTileEntity_LongDistancePipelineBase) tMeta;
@@ -241,10 +240,8 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta
// It's not a block - let's see if it's a tile entity
TileEntity tTileEntity = world.getTileEntity(aCoords.posX, aCoords.posY, aCoords.posZ);
if (tTileEntity != gtTile && tTileEntity instanceof BaseMetaTileEntity
- && ((BaseMetaTileEntity) tTileEntity)
- .getMetaTileEntity() instanceof GT_MetaTileEntity_LongDistancePipelineBase) {
- final GT_MetaTileEntity_LongDistancePipelineBase tGtTile = (GT_MetaTileEntity_LongDistancePipelineBase) ((BaseMetaTileEntity) tTileEntity)
- .getMetaTileEntity();
+ && ((BaseMetaTileEntity) tTileEntity).getMetaTileEntity() instanceof GT_MetaTileEntity_LongDistancePipelineBase) {
+ final GT_MetaTileEntity_LongDistancePipelineBase tGtTile = (GT_MetaTileEntity_LongDistancePipelineBase) ((BaseMetaTileEntity) tTileEntity).getMetaTileEntity();
if (isSameClass(tGtTile) && tWires.contains(
tGtTile.getFacingOffset(
(BaseMetaTileEntity) tTileEntity,
@@ -315,7 +312,8 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta
IWailaConfigHandler config) {
final NBTTagCompound tag = accessor.getNBTData();
final int facing = getBaseMetaTileEntity().getFrontFacing();
- final int side = (byte) accessor.getSide().ordinal();
+ final int side = (byte) accessor.getSide()
+ .ordinal();
if (side == facing) currentTip.add(GOLD + "Pipeline Input" + RESET);
else if (side == ForgeDirection.OPPOSITES[facing]) currentTip.add(BLUE + "Pipeline Output" + RESET);
diff --git a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineFluid.java b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineFluid.java
index ce020560cb..2b4f4fe377 100644
--- a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineFluid.java
+++ b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineFluid.java
@@ -116,7 +116,9 @@ public class GT_MetaTileEntity_LongDistancePipelineFluid extends GT_MetaTileEnti
else if (aSide == GT_Utility.getOppositeSide(aFacing)) return new ITexture[] {
MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_PIPELINE_FLUID_BACK) };
else return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1],
- TextureFactory.of(OVERLAY_PIPELINE_FLUID_SIDE),
- TextureFactory.builder().addIcon(OVERLAY_PIPELINE_FLUID_SIDE_GLOW).glow().build() };
+ TextureFactory.of(OVERLAY_PIPELINE_FLUID_SIDE), TextureFactory.builder()
+ .addIcon(OVERLAY_PIPELINE_FLUID_SIDE_GLOW)
+ .glow()
+ .build() };
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineItem.java b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineItem.java
index d62e87c707..85c009b350 100644
--- a/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineItem.java
+++ b/src/main/java/gregtech/common/tileentities/machines/long_distance/GT_MetaTileEntity_LongDistancePipelineItem.java
@@ -195,7 +195,9 @@ public class GT_MetaTileEntity_LongDistancePipelineItem extends GT_MetaTileEntit
else if (aSide == GT_Utility.getOppositeSide(aFacing)) return new ITexture[] {
MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_PIPELINE_ITEM_BACK) };
else return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1],
- TextureFactory.of(OVERLAY_PIPELINE_ITEM_SIDE),
- TextureFactory.builder().addIcon(OVERLAY_PIPELINE_ITEM_SIDE_GLOW).glow().build() };
+ TextureFactory.of(OVERLAY_PIPELINE_ITEM_SIDE), TextureFactory.builder()
+ .addIcon(OVERLAY_PIPELINE_ITEM_SIDE_GLOW)
+ .glow()
+ .build() };
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java
index 0b47b93334..54551473f3 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java
@@ -51,59 +51,176 @@ public class GT_MetaTileEntity_AssemblyLine extends
private static final String STRUCTURE_PIECE_FIRST = "first";
private static final String STRUCTURE_PIECE_LATER = "later";
private static final String STRUCTURE_PIECE_LAST = "last";
- private static final IStructureDefinition<GT_MetaTileEntity_AssemblyLine> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_AssemblyLine>builder()
- .addShape(
- STRUCTURE_PIECE_FIRST,
- transpose(
- new String[][] { { " ", "e", " " }, { "~", "l", "G" }, { "g", "m", "g" },
- { "b", "i", "b" }, }))
- .addShape(
- STRUCTURE_PIECE_LATER,
- transpose(
- new String[][] { { " ", "e", " " }, { "d", "l", "d" }, { "g", "m", "g" },
- { "b", "I", "b" }, }))
- .addShape(
- STRUCTURE_PIECE_LAST,
- transpose(
- new String[][] { { " ", "e", " " }, { "d", "l", "d" }, { "g", "m", "g" },
- { "o", "i", "b" }, }))
- .addElement('G', ofBlock(GregTech_API.sBlockCasings3, 10)) // grate machine casing
- .addElement('l', ofBlock(GregTech_API.sBlockCasings2, 9)) // assembler machine casing
- .addElement('m', ofBlock(GregTech_API.sBlockCasings2, 5)) // assembling line casing
- .addElement(
- 'g',
- ofChain(
- ofBlockUnlocalizedName("IC2", "blockAlloyGlass", 0, true),
- ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks", 0, true),
- ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks2", 0, true),
- // warded glass
- ofBlockUnlocalizedName("Thaumcraft", "blockCosmeticOpaque", 2, false)))
- .addElement(
- 'e',
- ofChain(
- Energy.newAny(16, 1, ForgeDirection.UP, ForgeDirection.NORTH, ForgeDirection.SOUTH),
- ofBlock(GregTech_API.sBlockCasings2, 0)))
- .addElement(
- 'd',
- buildHatchAdder(GT_MetaTileEntity_AssemblyLine.class).atLeast(DataHatchElement.DataAccess).dot(2)
- .casingIndex(42).allowOnly(ForgeDirection.NORTH)
- .buildAndChain(GregTech_API.sBlockCasings3, 10))
- .addElement(
- 'b',
- buildHatchAdder(GT_MetaTileEntity_AssemblyLine.class)
- .atLeast(InputHatch, InputHatch, InputHatch, InputHatch, Maintenance).casingIndex(16).dot(3)
- .allowOnly(ForgeDirection.DOWN).buildAndChain(
- ofBlock(GregTech_API.sBlockCasings2, 0),
- ofHatchAdder(GT_MetaTileEntity_AssemblyLine::addOutputToMachineList, 16, 4)))
- .addElement(
- 'I',
- ofChain(
- // all blocks nearby use solid steel casing, so let's use the texture of that
- InputBus.newAny(16, 5, ForgeDirection.DOWN),
- ofHatchAdder(GT_MetaTileEntity_AssemblyLine::addOutputToMachineList, 16, 4)))
- .addElement('i', InputBus.newAny(16, 5, ForgeDirection.DOWN))
- .addElement('o', OutputBus.newAny(16, 4, ForgeDirection.DOWN)).build();
+ private static final IStructureDefinition<GT_MetaTileEntity_AssemblyLine> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_AssemblyLine>builder()
+ .addShape(
+ STRUCTURE_PIECE_FIRST,
+ transpose(
+ new String[][] {
+ { " ", "e",
+ " " },
+ { "~", "l",
+ "G" },
+ { "g", "m",
+ "g" },
+ { "b", "i",
+ "b" }, }))
+ .addShape(
+ STRUCTURE_PIECE_LATER,
+ transpose(
+ new String[][] {
+ { " ", "e",
+ " " },
+ { "d", "l",
+ "d" },
+ { "g", "m",
+ "g" },
+ { "b", "I",
+ "b" }, }))
+ .addShape(
+ STRUCTURE_PIECE_LAST,
+ transpose(
+ new String[][] {
+ { " ", "e",
+ " " },
+ { "d", "l",
+ "d" },
+ { "g", "m",
+ "g" },
+ { "o", "i",
+ "b" }, }))
+ .addElement(
+ 'G',
+ ofBlock(
+ GregTech_API.sBlockCasings3,
+ 10)) // grate
+ // machine
+ // casing
+ .addElement(
+ 'l',
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 9)) // assembler
+ // machine
+ // casing
+ .addElement(
+ 'm',
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 5)) // assembling
+ // line
+ // casing
+ .addElement(
+ 'g',
+ ofChain(
+ ofBlockUnlocalizedName(
+ "IC2",
+ "blockAlloyGlass",
+ 0,
+ true),
+ ofBlockUnlocalizedName(
+ "bartworks",
+ "BW_GlasBlocks",
+ 0,
+ true),
+ ofBlockUnlocalizedName(
+ "bartworks",
+ "BW_GlasBlocks2",
+ 0,
+ true),
+ // warded
+ // glass
+ ofBlockUnlocalizedName(
+ "Thaumcraft",
+ "blockCosmeticOpaque",
+ 2,
+ false)))
+ .addElement(
+ 'e',
+ ofChain(
+ Energy.newAny(
+ 16,
+ 1,
+ ForgeDirection.UP,
+ ForgeDirection.NORTH,
+ ForgeDirection.SOUTH),
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 0)))
+ .addElement(
+ 'd',
+ buildHatchAdder(
+ GT_MetaTileEntity_AssemblyLine.class).atLeast(
+ DataHatchElement.DataAccess)
+ .dot(
+ 2)
+ .casingIndex(
+ 42)
+ .allowOnly(
+ ForgeDirection.NORTH)
+ .buildAndChain(
+ GregTech_API.sBlockCasings3,
+ 10))
+ .addElement(
+ 'b',
+ buildHatchAdder(
+ GT_MetaTileEntity_AssemblyLine.class).atLeast(
+ InputHatch,
+ InputHatch,
+ InputHatch,
+ InputHatch,
+ Maintenance)
+ .casingIndex(
+ 16)
+ .dot(
+ 3)
+ .allowOnly(
+ ForgeDirection.DOWN)
+ .buildAndChain(
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 0),
+ ofHatchAdder(
+ GT_MetaTileEntity_AssemblyLine::addOutputToMachineList,
+ 16,
+ 4)))
+ .addElement(
+ 'I',
+ ofChain(
+ // all
+ // blocks
+ // nearby
+ // use
+ // solid
+ // steel
+ // casing,
+ // so
+ // let's
+ // use
+ // the
+ // texture
+ // of
+ // that
+ InputBus.newAny(
+ 16,
+ 5,
+ ForgeDirection.DOWN),
+ ofHatchAdder(
+ GT_MetaTileEntity_AssemblyLine::addOutputToMachineList,
+ 16,
+ 4)))
+ .addElement(
+ 'i',
+ InputBus.newAny(
+ 16,
+ 5,
+ ForgeDirection.DOWN))
+ .addElement(
+ 'o',
+ OutputBus.newAny(
+ 16,
+ 4,
+ ForgeDirection.DOWN))
+ .build();
public GT_MetaTileEntity_AssemblyLine(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
@@ -121,23 +238,28 @@ public class GT_MetaTileEntity_AssemblyLine extends
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Assembling Line").addInfo("Controller block for the Assembling Line")
- .addInfo("Used to make complex machine parts (LuV+)").addInfo("Does not make Assembler items")
- .addSeparator().beginVariableStructureBlock(5, 16, 4, 4, 3, 3, false) // ?
- .addStructureInfo("From Bottom to Top, Left to Right")
- .addStructureInfo(
- "Layer 1 - Solid Steel Machine Casing, Input Bus (last can be Output Bus), Solid Steel Machine Casing")
- .addStructureInfo(
- "Layer 2 - Borosilicate Glass(any)/Warded Glass/Reinforced Glass, Assembling Line Casing, Reinforced Glass")
- .addStructureInfo("Layer 3 - Grate Machine Casing, Assembler Machine Casing, Grate Machine Casing")
- .addStructureInfo("Layer 4 - Empty, Solid Steel Machine Casing, Empty")
- .addStructureInfo("Up to 16 repeating slices, each one allows for 1 more item in recipes")
- .addController("Either Grate on layer 3 of the first slice").addEnergyHatch("Any layer 4 casing", 1)
- .addMaintenanceHatch("Any layer 1 casing", 3).addInputBus("As specified on layer 1", 4, 5)
- .addInputHatch("Any layer 1 casing", 3)
- .addOutputBus("Replaces Input Bus on final slice or on any solid steel casing on layer 1", 4)
- .addOtherStructurePart("Data Access Hatch", "Optional, next to controller", 2)
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Assembling Line")
+ .addInfo("Controller block for the Assembling Line")
+ .addInfo("Used to make complex machine parts (LuV+)")
+ .addInfo("Does not make Assembler items")
+ .addSeparator()
+ .beginVariableStructureBlock(5, 16, 4, 4, 3, 3, false) // ?
+ .addStructureInfo("From Bottom to Top, Left to Right")
+ .addStructureInfo(
+ "Layer 1 - Solid Steel Machine Casing, Input Bus (last can be Output Bus), Solid Steel Machine Casing")
+ .addStructureInfo(
+ "Layer 2 - Borosilicate Glass(any)/Warded Glass/Reinforced Glass, Assembling Line Casing, Reinforced Glass")
+ .addStructureInfo("Layer 3 - Grate Machine Casing, Assembler Machine Casing, Grate Machine Casing")
+ .addStructureInfo("Layer 4 - Empty, Solid Steel Machine Casing, Empty")
+ .addStructureInfo("Up to 16 repeating slices, each one allows for 1 more item in recipes")
+ .addController("Either Grate on layer 3 of the first slice")
+ .addEnergyHatch("Any layer 4 casing", 1)
+ .addMaintenanceHatch("Any layer 1 casing", 3)
+ .addInputBus("As specified on layer 1", 4, 5)
+ .addInputHatch("Any layer 1 casing", 3)
+ .addOutputBus("Replaces Input Bus on final slice or on any solid steel casing on layer 1", 4)
+ .addOtherStructurePart("Data Access Hatch", "Optional, next to controller", 2)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -145,13 +267,26 @@ public class GT_MetaTileEntity_AssemblyLine extends
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { BlockIcons.casingTexturePages[0][16],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { BlockIcons.casingTexturePages[0][16],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { BlockIcons.casingTexturePages[0][16], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { BlockIcons.casingTexturePages[0][16], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_ASSEMBLY_LINE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { Textures.BlockIcons.casingTexturePages[0][16] };
}
@@ -185,8 +320,9 @@ public class GT_MetaTileEntity_AssemblyLine extends
boolean foundRecipe = false;
nextDataStick: for (ItemStack tDataStick : tDataStickList) {
- GT_AssemblyLineUtils.LookupResult tLookupResult = GT_AssemblyLineUtils
- .findAssemblyLineRecipeFromDataStick(tDataStick, false);
+ GT_AssemblyLineUtils.LookupResult tLookupResult = GT_AssemblyLineUtils.findAssemblyLineRecipeFromDataStick(
+ tDataStick,
+ false);
if (tLookupResult.getType() == GT_AssemblyLineUtils.LookupResultType.INVALID_STICK) continue;
@@ -244,8 +380,8 @@ public class GT_MetaTileEntity_AssemblyLine extends
continue nextDataStick;
} else {
if (mInputHatches.get(i) instanceof GT_MetaTileEntity_Hatch_MultiInput) {
- GT_MetaTileEntity_Hatch_MultiInput tMultiHatch = (GT_MetaTileEntity_Hatch_MultiInput) mInputHatches
- .get(i);
+ GT_MetaTileEntity_Hatch_MultiInput tMultiHatch = (GT_MetaTileEntity_Hatch_MultiInput) mInputHatches.get(
+ i);
if (!tMultiHatch.hasFluid(tRecipe.mFluidInputs[i])
|| tMultiHatch.getFluidAmount(tRecipe.mFluidInputs[i])
< tRecipe.mFluidInputs[i].amount) {
@@ -295,14 +431,15 @@ public class GT_MetaTileEntity_AssemblyLine extends
GT_FML_LOGGER.info("All checked start consuming inputs");
}
for (int i = 0; i < tStack.length; i++) {
- ItemStack stackInSlot = mInputBusses.get(i).getStackInSlot(0);
+ ItemStack stackInSlot = mInputBusses.get(i)
+ .getStackInSlot(0);
stackInSlot.stackSize -= tStack[i];
}
for (int i = 0; i < tFluids.length; i++) {
if (mInputHatches.get(i) instanceof GT_MetaTileEntity_Hatch_MultiInput) {
- GT_MetaTileEntity_Hatch_MultiInput tMultiHatch = (GT_MetaTileEntity_Hatch_MultiInput) mInputHatches
- .get(i);
+ GT_MetaTileEntity_Hatch_MultiInput tMultiHatch = (GT_MetaTileEntity_Hatch_MultiInput) mInputHatches.get(
+ i);
tMultiHatch.getFluid(tFluidSlot[i]).amount -= tFluids[i];
if (tMultiHatch.getFluid(tFluidSlot[i]).amount <= 0) {
tMultiHatch.setFluid(null, tFluidSlot[i]);
@@ -398,10 +535,18 @@ public class GT_MetaTileEntity_AssemblyLine extends
}
for (GT_MetaTileEntity_Hatch_DataAccess tHatch : mDataAccessHatches) {
if (isValidMetaTileEntity(tHatch)) {
- for (int i = 0; i < tHatch.getBaseMetaTileEntity().getSizeInventory(); i++) {
- if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null
- && isCorrectDataItem(tHatch.getBaseMetaTileEntity().getStackInSlot(i), state))
- rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i));
+ for (int i = 0; i < tHatch.getBaseMetaTileEntity()
+ .getSizeInventory(); i++) {
+ if (tHatch.getBaseMetaTileEntity()
+ .getStackInSlot(i)
+ != null
+ && isCorrectDataItem(
+ tHatch.getBaseMetaTileEntity()
+ .getStackInSlot(i),
+ state))
+ rList.add(
+ tHatch.getBaseMetaTileEntity()
+ .getStackInSlot(i));
}
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java
index 5babf4405d..96b4c19b93 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java
@@ -23,9 +23,12 @@ public class GT_MetaTileEntity_BrickedBlastFurnace extends GT_MetaTileEntity_Pri
private static final ITexture[] FACING_SIDE = { TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_DENSEBRICKS) };
private static final ITexture[] FACING_FRONT = {
TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_INACTIVE) };
- private static final ITexture[] FACING_ACTIVE = {
- TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE), TextureFactory.builder()
- .addIcon(BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE_GLOW).glow().build() };
+ private static final ITexture[] FACING_ACTIVE = { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE_GLOW)
+ .glow()
+ .build() };
private GT_Multiblock_Tooltip_Builder tooltipBuilder;
public GT_MetaTileEntity_BrickedBlastFurnace(int aID, String aName, String aNameRegional) {
@@ -57,15 +60,19 @@ public class GT_MetaTileEntity_BrickedBlastFurnace extends GT_MetaTileEntity_Pri
protected GT_Multiblock_Tooltip_Builder getTooltip() {
if (tooltipBuilder == null) {
tooltipBuilder = new GT_Multiblock_Tooltip_Builder();
- tooltipBuilder.addMachineType("Blast Furnace").addInfo("Controller Block for the Bricked Blast Furnace")
- .addInfo("Usable for Steel and general Pyrometallurgy")
- .addInfo("Has a useful interface, unlike other gregtech multis")
- .addPollutionAmount(GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond).addSeparator()
- .beginStructureBlock(3, 4, 3, true).addController("Front center")
- .addOtherStructurePart("Firebricks", "Everything except the controller")
- .addStructureInfo("The top block is also empty")
- .addStructureInfo("You can share the walls of GT multis, so")
- .addStructureInfo("each additional one costs less, up to 4").toolTipFinisher("Gregtech");
+ tooltipBuilder.addMachineType("Blast Furnace")
+ .addInfo("Controller Block for the Bricked Blast Furnace")
+ .addInfo("Usable for Steel and general Pyrometallurgy")
+ .addInfo("Has a useful interface, unlike other gregtech multis")
+ .addPollutionAmount(GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond)
+ .addSeparator()
+ .beginStructureBlock(3, 4, 3, true)
+ .addController("Front center")
+ .addOtherStructurePart("Firebricks", "Everything except the controller")
+ .addStructureInfo("The top block is also empty")
+ .addStructureInfo("You can share the walls of GT multis, so")
+ .addStructureInfo("each additional one costs less, up to 4")
+ .toolTipFinisher("Gregtech");
}
return tooltipBuilder;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java
index 8c22ab780f..1710b33513 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java
@@ -20,7 +20,10 @@ public class GT_MetaTileEntity_BronzeBlastFurnace extends GT_MetaTileEntity_Prim
private static final ITexture[] FACING_SIDE = { TextureFactory.of(MACHINE_BRONZEPLATEDBRICKS) };
private static final ITexture[] FACING_FRONT = { TextureFactory.of(MACHINE_BRONZEBLASTFURNACE) };
private static final ITexture[] FACING_ACTIVE = { TextureFactory.of(MACHINE_BRONZEBLASTFURNACE_ACTIVE),
- TextureFactory.builder().addIcon(MACHINE_BRONZEBLASTFURNACE_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_BRONZEBLASTFURNACE_ACTIVE_GLOW)
+ .glow()
+ .build() };
public GT_MetaTileEntity_BronzeBlastFurnace(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java
index 4f1aec7f4a..8780bdb038 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java
@@ -112,13 +112,14 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul
if (isWoodLog(
getBaseMetaTileEntity().getBlockOffset(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ),
getBaseMetaTileEntity().getMetaIDOffset(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ)))
- getBaseMetaTileEntity().getWorld().setBlock(
- getBaseMetaTileEntity().getXCoord() + tPos.chunkPosX,
- getBaseMetaTileEntity().getYCoord() + tPos.chunkPosY,
- getBaseMetaTileEntity().getZCoord() + tPos.chunkPosZ,
- GregTech_API.sBlockReinforced,
- 4,
- 3);
+ getBaseMetaTileEntity().getWorld()
+ .setBlock(
+ getBaseMetaTileEntity().getXCoord() + tPos.chunkPosX,
+ getBaseMetaTileEntity().getYCoord() + tPos.chunkPosY,
+ getBaseMetaTileEntity().getZCoord() + tPos.chunkPosZ,
+ GregTech_API.sBlockReinforced,
+ 4,
+ 3);
}
running = false;
return false;
@@ -131,7 +132,9 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul
private boolean isWoodLog(Block log, int meta) {
for (int id : OreDictionary.getOreIDs(new ItemStack(log, 1, meta))) {
- if (OreDictionary.getOreName(id).equals("logWood")) return true;
+ if (OreDictionary.getOreName(id)
+ .equals("logWood"))
+ return true;
}
String tTool = log.getHarvestTool(meta);
return OrePrefixes.log.contains(new ItemStack(log, 1, meta)) && ("axe".equals(tTool))
@@ -254,15 +257,19 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Charcoal Pile Igniter").addInfo("Controller for the Charcoal Pit")
- .addInfo("Converts Logs into Brittle Charcoal blocks").addInfo("Will automatically start when valid")
- .addPollutionAmount(getPollutionPerSecond(null)).addSeparator()
- .beginVariableStructureBlock(3, 11, 3, 6, 3, 11, false)
- .addStructureInfo("Can be up to 11x6x11 in size, shape doesn't matter")
- .addOtherStructurePart("Bricks", "Bottom layer, under all wood logs")
- .addOtherStructurePart("Dirt/Grass", "All logs must be covered by these, the controller, or bricks")
- .addOtherStructurePart("Wood Logs", "Inside the previously mentioned blocks")
- .addStructureInfo("No air between logs allowed").toolTipFinisher("Gregtech");
+ tt.addMachineType("Charcoal Pile Igniter")
+ .addInfo("Controller for the Charcoal Pit")
+ .addInfo("Converts Logs into Brittle Charcoal blocks")
+ .addInfo("Will automatically start when valid")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginVariableStructureBlock(3, 11, 3, 6, 3, 11, false)
+ .addStructureInfo("Can be up to 11x6x11 in size, shape doesn't matter")
+ .addOtherStructurePart("Bricks", "Bottom layer, under all wood logs")
+ .addOtherStructurePart("Dirt/Grass", "All logs must be covered by these, the controller, or bricks")
+ .addOtherStructurePart("Wood Logs", "Inside the previously mentioned blocks")
+ .addStructureInfo("No air between logs allowed")
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -272,9 +279,15 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul
if (aSide == 1) {
if (aActive)
return new ITexture[] { casingTexturePages[0][10], TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build() };
return new ITexture[] { casingTexturePages[0][10], TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW).glow().build(), };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW)
+ .glow()
+ .build(), };
}
return new ITexture[] { casingTexturePages[0][10] };
}
@@ -292,12 +305,15 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul
if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive())) {
new WorldSpawnedEventBuilder.ParticleEventBuilder().setMotion(0D, 0.3D, 0D)
- .setIdentifier(ParticleFX.LARGE_SMOKE)
- .setPosition(
- aBaseMetaTileEntity.getOffsetX((byte) 1, 1) + XSTR_INSTANCE.nextFloat(),
- aBaseMetaTileEntity.getOffsetY((byte) 1, 1),
- aBaseMetaTileEntity.getOffsetZ((byte) 1, 1) + XSTR_INSTANCE.nextFloat())
- .setWorld(getBaseMetaTileEntity().getWorld()).run();
+ .setIdentifier(ParticleFX.LARGE_SMOKE)
+ .setPosition(
+ aBaseMetaTileEntity.getOffsetX((byte) 1, 1)
+ + XSTR_INSTANCE.nextFloat(),
+ aBaseMetaTileEntity.getOffsetY((byte) 1, 1),
+ aBaseMetaTileEntity.getOffsetZ((byte) 1, 1)
+ + XSTR_INSTANCE.nextFloat())
+ .setWorld(getBaseMetaTileEntity().getWorld())
+ .run();
}
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java
index fd724c57ea..0d18ce040b 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java
@@ -53,25 +53,30 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Cleanroom").addInfo("Controller block for the Cleanroom")
- .addInfo("Consumes 40 EU/t when first turned on")
- .addInfo("and 4 EU/t once at 100% efficiency when not overclocked") // ?
- .addInfo("An energy hatch accepts up to 2A, so you can use 2A LV or 1A MV")
- .addInfo("2 LV batteries + 1 LV generator or 1 MV generator") // ?
- .addInfo("Time required to reach full efficiency is proportional to")
- .addInfo("the height of empty space within").addInfo("Make sure your Energy Hatch matches! ?")
- .addInfo("Machines that cause pollution aren't allowed to be put in.").addSeparator()
- .beginVariableStructureBlock(3, 15, 4, 15, 3, 15, true).addController("Top center")
- .addCasingInfoRange("Plascrete", 20, 1007, false)
- .addStructureInfo(GT_Values.cleanroomGlass + "% of the Plascrete can be replaced with Reinforced Glass") // check
- .addStructureInfo("Other material can be used in place of Plascrete. See config for detail") // check
- .addOtherStructurePart("Filter Machine Casing", "Top besides controller and edges")
- .addEnergyHatch("Any casing. Exactly one.") // check
- .addMaintenanceHatch("Any casing")
- .addStructureInfo("1x Reinforced Door (keep closed or efficiency will reduce)")
- .addStructureInfo("Up to 10 Machine Hulls for Item & Energy transfer through walls")
- .addStructureInfo("You can also use Diodes for more power")
- .addStructureInfo("Diodes also count towards 10 Machine Hulls count limit").toolTipFinisher("Gregtech");
+ tt.addMachineType("Cleanroom")
+ .addInfo("Controller block for the Cleanroom")
+ .addInfo("Consumes 40 EU/t when first turned on")
+ .addInfo("and 4 EU/t once at 100% efficiency when not overclocked") // ?
+ .addInfo("An energy hatch accepts up to 2A, so you can use 2A LV or 1A MV")
+ .addInfo("2 LV batteries + 1 LV generator or 1 MV generator") // ?
+ .addInfo("Time required to reach full efficiency is proportional to")
+ .addInfo("the height of empty space within")
+ .addInfo("Make sure your Energy Hatch matches! ?")
+ .addInfo("Machines that cause pollution aren't allowed to be put in.")
+ .addSeparator()
+ .beginVariableStructureBlock(3, 15, 4, 15, 3, 15, true)
+ .addController("Top center")
+ .addCasingInfoRange("Plascrete", 20, 1007, false)
+ .addStructureInfo(GT_Values.cleanroomGlass + "% of the Plascrete can be replaced with Reinforced Glass") // check
+ .addStructureInfo("Other material can be used in place of Plascrete. See config for detail") // check
+ .addOtherStructurePart("Filter Machine Casing", "Top besides controller and edges")
+ .addEnergyHatch("Any casing. Exactly one.") // check
+ .addMaintenanceHatch("Any casing")
+ .addStructureInfo("1x Reinforced Door (keep closed or efficiency will reduce)")
+ .addStructureInfo("Up to 10 Machine Hulls for Item & Energy transfer through walls")
+ .addStructureInfo("You can also use Diodes for more power")
+ .addStructureInfo("Diodes also count towards 10 Machine Hulls count limit")
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -193,8 +198,10 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB
} else if (tBlock == GregTech_API.sBlockReinforced && tMeta == 2) {
mPlascreteCount++;
} else {
- final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity
- .getIGregTechTileEntityOffset(dX, dY, dZ);
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(
+ dX,
+ dY,
+ dZ);
if ((!this.addMaintenanceToMachineList(tTileEntity, 210))
&& (!this.addEnergyInputToMachineList(tTileEntity, 210))) {
if (tBlock instanceof ic2.core.block.BlockIC2Door) {
@@ -318,13 +325,19 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == ForgeDirection.DOWN.ordinal() || aSide == ForgeDirection.UP.ordinal()) {
- return new ITexture[] { TextureFactory.of(BLOCK_PLASCRETE),
- aActive ? TextureFactory.of(
+ return new ITexture[] { TextureFactory.of(BLOCK_PLASCRETE), aActive
+ ? TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_CLEANROOM_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_CLEANROOM_ACTIVE_GLOW).glow().build())
- : TextureFactory.of(
- TextureFactory.of(OVERLAY_TOP_CLEANROOM),
- TextureFactory.builder().addIcon(OVERLAY_TOP_CLEANROOM_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_CLEANROOM_ACTIVE_GLOW)
+ .glow()
+ .build())
+ : TextureFactory.of(
+ TextureFactory.of(OVERLAY_TOP_CLEANROOM),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_CLEANROOM_GLOW)
+ .glow()
+ .build()) };
}
return new ITexture[] { TextureFactory.of(BLOCK_PLASCRETE) };
}
@@ -412,18 +425,46 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB
public static void loadConfig(Configuration cfg) {
if (!cfg.hasCategory(category)) setDefaultConfigValues(cfg);
- for (ConfigCategory cc : cfg.getCategory(category).getChildren()) {
- final String name = cc.get("Name").getString();
+ for (ConfigCategory cc : cfg.getCategory(category)
+ .getChildren()) {
+ final String name = cc.get("Name")
+ .getString();
if (cc.containsKey("Count")) {
if (cc.containsKey("Meta")) config.put(
- name + ":" + cc.get("Meta").getInt(),
- new ConfigEntry(0, cc.get("Count").getInt(), cc.get("Meta").getInt()));
- else config.put(name, new ConfigEntry(0, cc.get("Count").getInt(), wildcard_meta));
+ name + ":"
+ + cc.get("Meta")
+ .getInt(),
+ new ConfigEntry(
+ 0,
+ cc.get("Count")
+ .getInt(),
+ cc.get("Meta")
+ .getInt()));
+ else config.put(
+ name,
+ new ConfigEntry(
+ 0,
+ cc.get("Count")
+ .getInt(),
+ wildcard_meta));
} else if (cc.containsKey("Percentage")) {
if (cc.containsKey("Meta")) config.put(
- name + ":" + cc.get("Meta").getInt(),
- new ConfigEntry(cc.get("Percentage").getInt(), 0, cc.get("Meta").getInt()));
- else config.put(name, new ConfigEntry(cc.get("Percentage").getInt(), 0, wildcard_meta));
+ name + ":"
+ + cc.get("Meta")
+ .getInt(),
+ new ConfigEntry(
+ cc.get("Percentage")
+ .getInt(),
+ 0,
+ cc.get("Meta")
+ .getInt()));
+ else config.put(
+ name,
+ new ConfigEntry(
+ cc.get("Percentage")
+ .getInt(),
+ 0,
+ wildcard_meta));
}
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java
index dd2f54455a..2b902349bc 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java
@@ -29,21 +29,28 @@ public abstract class GT_MetaTileEntity_ConcreteBackfillerBase extends GT_MetaTi
}
protected GT_Multiblock_Tooltip_Builder createTooltip(String aStructureName) {
- String casings = getCasingBlockItem().get(0).getDisplayName();
+ String casings = getCasingBlockItem().get(0)
+ .getDisplayName();
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Concrete Backfiller").addInfo("Controller Block for the " + aStructureName)
- .addInfo("Will fill in areas below it with light concrete. This goes through walls")
- .addInfo("Use it to remove any spawning locations beneath your base to reduce lag")
- .addInfo("Will pull back the pipes after it finishes that layer")
- .addInfo("Radius is " + getRadius() + " blocks").addSeparator().beginStructureBlock(3, 7, 3, false)
- .addController("Front bottom").addOtherStructurePart(casings, "form the 3x1x3 Base")
- .addOtherStructurePart(casings, "1x3x1 pillar above the center of the base (2 minimum total)")
- .addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top")
- .addEnergyHatch(VN[getMinTier()] + "+, Any base casing", 1).addMaintenanceHatch("Any base casing", 1)
- .addInputBus("Mining Pipes, optional, any base casing", 1)
- .addInputHatch("GT Concrete, any base casing", 1)
- .addOutputBus("Mining Pipes, optional, any base casing", 1).toolTipFinisher("Gregtech");
+ tt.addMachineType("Concrete Backfiller")
+ .addInfo("Controller Block for the " + aStructureName)
+ .addInfo("Will fill in areas below it with light concrete. This goes through walls")
+ .addInfo("Use it to remove any spawning locations beneath your base to reduce lag")
+ .addInfo("Will pull back the pipes after it finishes that layer")
+ .addInfo("Radius is " + getRadius() + " blocks")
+ .addSeparator()
+ .beginStructureBlock(3, 7, 3, false)
+ .addController("Front bottom")
+ .addOtherStructurePart(casings, "form the 3x1x3 Base")
+ .addOtherStructurePart(casings, "1x3x1 pillar above the center of the base (2 minimum total)")
+ .addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top")
+ .addEnergyHatch(VN[getMinTier()] + "+, Any base casing", 1)
+ .addMaintenanceHatch("Any base casing", 1)
+ .addInputBus("Mining Pipes, optional, any base casing", 1)
+ .addInputHatch("GT Concrete, any base casing", 1)
+ .addOutputBus("Mining Pipes, optional, any base casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -103,18 +110,28 @@ public abstract class GT_MetaTileEntity_ConcreteBackfillerBase extends GT_MetaTi
private boolean isRefillableBlock(int aX, int aY, int aZ) {
IGregTechTileEntity aBaseTile = getBaseMetaTileEntity();
- if (!aBaseTile.getBlock(aX, aY, aZ).isAir(aBaseTile.getWorld(), aX, aY, aZ)
- || aBaseTile.getBlock(aX, aY, aZ).getMaterial().isSolid())
+ if (!aBaseTile.getBlock(aX, aY, aZ)
+ .isAir(aBaseTile.getWorld(), aX, aY, aZ)
+ || aBaseTile.getBlock(aX, aY, aZ)
+ .getMaterial()
+ .isSolid())
return false;
- if (!GT_Utility
- .setBlockByFakePlayer(getFakePlayer(aBaseTile), aX, aY, aZ, GregTech_API.sBlockConcretes, 8, true))
+ if (!GT_Utility.setBlockByFakePlayer(
+ getFakePlayer(aBaseTile),
+ aX,
+ aY,
+ aZ,
+ GregTech_API.sBlockConcretes,
+ 8,
+ true))
return false;
return true;
}
private boolean tryRefillBlock(int aX, int aY, int aZ) {
if (!tryConsumeFluid()) return false;
- getBaseMetaTileEntity().getWorld().setBlock(aX, aY, aZ, GregTech_API.sBlockConcretes, 8, 3);
+ getBaseMetaTileEntity().getWorld()
+ .setBlock(aX, aY, aZ, GregTech_API.sBlockConcretes, 8, 3);
return true;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java
index 381df634d2..f445d5fea1 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java
@@ -50,23 +50,34 @@ public class GT_MetaTileEntity_DieselEngine extends
@Override
protected IStructureDefinition<GT_MetaTileEntity_DieselEngine> computeValue(Class<?> type) {
- return StructureDefinition.<GT_MetaTileEntity_DieselEngine>builder().addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { "---", "iii", "chc", "chc", "ccc", },
- { "---", "i~i", "hgh", "hgh", "cdc", }, { "---", "iii", "chc", "chc", "ccc", }, }))
- .addElement('i', lazy(t -> ofBlock(t.getIntakeBlock(), t.getIntakeMeta())))
- .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMeta())))
- .addElement('g', lazy(t -> ofBlock(t.getGearboxBlock(), t.getGearboxMeta())))
- .addElement('d', lazy(t -> Dynamo.newAny(t.getCasingTextureIndex(), 2)))
- .addElement(
- 'h',
- lazy(
- t -> buildHatchAdder(GT_MetaTileEntity_DieselEngine.class)
- .atLeast(InputHatch, InputHatch, InputHatch, Muffler, Maintenance)
- .casingIndex(t.getCasingTextureIndex()).dot(1)
- .buildAndChain(t.getCasingBlock(), t.getCasingMeta())))
- .build();
+ return StructureDefinition.<GT_MetaTileEntity_DieselEngine>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] { { "---", "iii", "chc", "chc", "ccc", },
+ { "---", "i~i", "hgh", "hgh", "cdc", },
+ { "---", "iii", "chc", "chc", "ccc", }, }))
+ .addElement('i', lazy(t -> ofBlock(t.getIntakeBlock(), t.getIntakeMeta())))
+ .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMeta())))
+ .addElement('g', lazy(t -> ofBlock(t.getGearboxBlock(), t.getGearboxMeta())))
+ .addElement('d', lazy(t -> Dynamo.newAny(t.getCasingTextureIndex(), 2)))
+ .addElement(
+ 'h',
+ lazy(
+ t -> buildHatchAdder(
+ GT_MetaTileEntity_DieselEngine.class).atLeast(
+ InputHatch,
+ InputHatch,
+ InputHatch,
+ Muffler,
+ Maintenance)
+ .casingIndex(
+ t.getCasingTextureIndex())
+ .dot(1)
+ .buildAndChain(
+ t.getCasingBlock(),
+ t.getCasingMeta())))
+ .build();
}
};
protected int fuelConsumption = 0;
@@ -85,21 +96,28 @@ public class GT_MetaTileEntity_DieselEngine extends
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Combustion Generator").addInfo("Controller block for the Large Combustion Engine")
- .addInfo("Supply Diesel Fuels and 1000L of Lubricant per hour to run")
- .addInfo("Supply 40L/s of Oxygen to boost output (optional)")
- .addInfo("Default: Produces 2048EU/t at 100% fuel efficiency")
- .addInfo("Boosted: Produces 6144EU/t at 150% fuel efficiency")
- .addInfo("You need to wait for it to reach 300% to output full power")
- .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 4, false)
- .addController("Front center").addCasingInfoRange("Stable Titanium Machine Casing", 16, 22, false)
- .addOtherStructurePart("Titanium Gear Box Machine Casing", "Inner 2 blocks")
- .addOtherStructurePart("Engine Intake Machine Casing", "8x, ring around controller")
- .addStructureInfo("Engine Intake Casings must not be obstructed in front (only air blocks)")
- .addDynamoHatch("Back center", 2).addMaintenanceHatch("One of the casings next to a Gear Box", 1)
- .addMufflerHatch("Top middle back, above the rear Gear Box", 1)
- .addInputHatch("Diesel Fuel, next to a Gear Box", 1).addInputHatch("Lubricant, next to a Gear Box", 1)
- .addInputHatch("Oxygen, optional, next to a Gear Box", 1).toolTipFinisher("Gregtech");
+ tt.addMachineType("Combustion Generator")
+ .addInfo("Controller block for the Large Combustion Engine")
+ .addInfo("Supply Diesel Fuels and 1000L of Lubricant per hour to run")
+ .addInfo("Supply 40L/s of Oxygen to boost output (optional)")
+ .addInfo("Default: Produces 2048EU/t at 100% fuel efficiency")
+ .addInfo("Boosted: Produces 6144EU/t at 150% fuel efficiency")
+ .addInfo("You need to wait for it to reach 300% to output full power")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(3, 3, 4, false)
+ .addController("Front center")
+ .addCasingInfoRange("Stable Titanium Machine Casing", 16, 22, false)
+ .addOtherStructurePart("Titanium Gear Box Machine Casing", "Inner 2 blocks")
+ .addOtherStructurePart("Engine Intake Machine Casing", "8x, ring around controller")
+ .addStructureInfo("Engine Intake Casings must not be obstructed in front (only air blocks)")
+ .addDynamoHatch("Back center", 2)
+ .addMaintenanceHatch("One of the casings next to a Gear Box", 1)
+ .addMufflerHatch("Top middle back, above the rear Gear Box", 1)
+ .addInputHatch("Diesel Fuel, next to a Gear Box", 1)
+ .addInputHatch("Lubricant, next to a Gear Box", 1)
+ .addInputHatch("Oxygen, optional, next to a Gear Box", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -107,13 +125,25 @@ public class GT_MetaTileEntity_DieselEngine extends
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { casingTexturePages[0][50],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { casingTexturePages[0][50],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DIESEL_ENGINE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DIESEL_ENGINE_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { casingTexturePages[0][50], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][50], TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DIESEL_ENGINE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DIESEL_ENGINE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { casingTexturePages[0][50] };
}
@@ -318,8 +348,10 @@ public class GT_MetaTileEntity_DieselEngine extends
long maxEnergy = 0;
for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) {
if (isValidMetaTileEntity(tHatch)) {
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java
index 7302625406..eb5adfbd3c 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java
@@ -53,65 +53,104 @@ public class GT_MetaTileEntity_DistillationTower
private static final IStructureDefinition<GT_MetaTileEntity_DistillationTower> STRUCTURE_DEFINITION;
static {
- IHatchElement<GT_MetaTileEntity_DistillationTower> layeredOutputHatch = OutputHatch
- .withCount(GT_MetaTileEntity_DistillationTower::getCurrentLayerOutputHatchCount)
- .withAdder(GT_MetaTileEntity_DistillationTower::addLayerOutputHatch);
+ IHatchElement<GT_MetaTileEntity_DistillationTower> layeredOutputHatch = OutputHatch.withCount(
+ GT_MetaTileEntity_DistillationTower::getCurrentLayerOutputHatchCount)
+ .withAdder(
+ GT_MetaTileEntity_DistillationTower::addLayerOutputHatch);
STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_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[][] { { "LLL", "LLL", "LLL" }, }))
- .addElement(
- 'b',
- ofChain(
- buildHatchAdder(GT_MetaTileEntity_DistillationTower.class)
- .atLeast(Energy, OutputBus, InputHatch, InputBus, Maintenance)
- .casingIndex(CASING_INDEX).dot(1).build(),
- onElementPass(
- GT_MetaTileEntity_DistillationTower::onCasingFound,
- ofBlock(GregTech_API.sBlockCasings4, 1))))
- .addElement(
- 'l',
- ofChain(
- buildHatchAdder(GT_MetaTileEntity_DistillationTower.class).atLeast(layeredOutputHatch)
- .casingIndex(CASING_INDEX).dot(2)
- .disallowOnly(ForgeDirection.UP, ForgeDirection.DOWN).build(),
- ofHatchAdder(
- GT_MetaTileEntity_DistillationTower::addEnergyInputToMachineList,
- CASING_INDEX,
- 2),
- ofHatchAdder(GT_MetaTileEntity_DistillationTower::addLayerOutputHatch, CASING_INDEX, 2),
- ofHatchAdder(
- GT_MetaTileEntity_DistillationTower::addMaintenanceToMachineList,
- CASING_INDEX,
- 2),
- onElementPass(
- GT_MetaTileEntity_DistillationTower::onCasingFound,
- ofBlock(GregTech_API.sBlockCasings4, 1))))
- // hint element only used in top layer
- .addElement(
- 'L',
- buildHatchAdder(GT_MetaTileEntity_DistillationTower.class).atLeast(layeredOutputHatch)
- .casingIndex(CASING_INDEX).dot(2).disallowOnly(ForgeDirection.UP)
- .buildAndChain(GregTech_API.sBlockCasings4, 1))
- .addElement(
- 'c',
- ofChain(
- onElementPass(
- t -> t.onTopLayerFound(false),
- ofHatchAdder(
- GT_MetaTileEntity_DistillationTower::addOutputToMachineList,
- CASING_INDEX,
- 3)),
- onElementPass(
- t -> t.onTopLayerFound(false),
- ofHatchAdder(
- GT_MetaTileEntity_DistillationTower::addMaintenanceToMachineList,
- CASING_INDEX,
- 3)),
- onElementPass(t -> t.onTopLayerFound(true), ofBlock(GregTech_API.sBlockCasings4, 1)),
- isAir()))
- .build();
+ .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',
+ ofChain(
+ buildHatchAdder(
+ GT_MetaTileEntity_DistillationTower.class).atLeast(
+ Energy,
+ OutputBus,
+ InputHatch,
+ InputBus,
+ Maintenance)
+ .casingIndex(
+ CASING_INDEX)
+ .dot(
+ 1)
+ .build(),
+ onElementPass(
+ GT_MetaTileEntity_DistillationTower::onCasingFound,
+ ofBlock(GregTech_API.sBlockCasings4, 1))))
+ .addElement(
+ 'l',
+ ofChain(
+ buildHatchAdder(
+ GT_MetaTileEntity_DistillationTower.class).atLeast(
+ layeredOutputHatch)
+ .casingIndex(
+ CASING_INDEX)
+ .dot(
+ 2)
+ .disallowOnly(
+ ForgeDirection.UP,
+ ForgeDirection.DOWN)
+ .build(),
+ ofHatchAdder(
+ GT_MetaTileEntity_DistillationTower::addEnergyInputToMachineList,
+ CASING_INDEX,
+ 2),
+ ofHatchAdder(
+ GT_MetaTileEntity_DistillationTower::addLayerOutputHatch,
+ CASING_INDEX,
+ 2),
+ ofHatchAdder(
+ GT_MetaTileEntity_DistillationTower::addMaintenanceToMachineList,
+ CASING_INDEX,
+ 2),
+ onElementPass(
+ GT_MetaTileEntity_DistillationTower::onCasingFound,
+ ofBlock(GregTech_API.sBlockCasings4, 1))))
+ // hint element only used in top layer
+ .addElement(
+ 'L',
+ buildHatchAdder(
+ GT_MetaTileEntity_DistillationTower.class).atLeast(
+ layeredOutputHatch)
+ .casingIndex(
+ CASING_INDEX)
+ .dot(2)
+ .disallowOnly(
+ ForgeDirection.UP)
+ .buildAndChain(
+ GregTech_API.sBlockCasings4,
+ 1))
+ .addElement(
+ 'c',
+ ofChain(
+ onElementPass(
+ t -> t.onTopLayerFound(false),
+ ofHatchAdder(
+ GT_MetaTileEntity_DistillationTower::addOutputToMachineList,
+ CASING_INDEX,
+ 3)),
+ onElementPass(
+ t -> t.onTopLayerFound(false),
+ ofHatchAdder(
+ GT_MetaTileEntity_DistillationTower::addMaintenanceToMachineList,
+ CASING_INDEX,
+ 3)),
+ onElementPass(
+ t -> t.onTopLayerFound(true),
+ ofBlock(GregTech_API.sBlockCasings4, 1)),
+ isAir()))
+ .build();
}
protected final List<List<GT_MetaTileEntity_Hatch_Output>> mOutputHatchesByLayer = new ArrayList<>();
@@ -135,15 +174,20 @@ public class GT_MetaTileEntity_DistillationTower
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Distillery").addInfo("Controller block for the Distillation Tower")
- .addInfo("Fluids are only put out at the correct height")
- .addInfo("The correct height equals the slot number in the NEI recipe").addSeparator()
- .beginVariableStructureBlock(3, 3, 3, 12, 3, 3, true).addController("Front bottom")
- .addOtherStructurePart("Clean Stainless Steel Machine Casing", "7 x h - 5 (minimum)")
- .addEnergyHatch("Any casing", 1, 2).addMaintenanceHatch("Any casing", 1, 2, 3)
- .addInputHatch("Any bottom layer casing", 1).addOutputBus("Any bottom layer casing", 1)
- .addOutputHatch("2-11x Output Hatches (At least one per layer except bottom layer)", 2, 3)
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Distillery")
+ .addInfo("Controller block for the Distillation Tower")
+ .addInfo("Fluids are only put out at the correct height")
+ .addInfo("The correct height equals the slot number in the NEI recipe")
+ .addSeparator()
+ .beginVariableStructureBlock(3, 3, 3, 12, 3, 3, true)
+ .addController("Front bottom")
+ .addOtherStructurePart("Clean Stainless Steel Machine Casing", "7 x h - 5 (minimum)")
+ .addEnergyHatch("Any casing", 1, 2)
+ .addMaintenanceHatch("Any casing", 1, 2, 3)
+ .addInputHatch("Any bottom layer casing", 1)
+ .addOutputBus("Any bottom layer casing", 1)
+ .addOutputHatch("2-11x Output Hatches (At least one per layer except bottom layer)", 2, 3)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -152,13 +196,25 @@ public class GT_MetaTileEntity_DistillationTower
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
if (aActive) return new ITexture[] { BlockIcons.getCasingTextureForId(CASING_INDEX),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { BlockIcons.getCasingTextureForId(CASING_INDEX),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_GLOW).extFacing().glow()
- .build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { BlockIcons.getCasingTextureForId(CASING_INDEX), TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_DISTILLATION_TOWER)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX) };
}
@@ -254,7 +310,8 @@ public class GT_MetaTileEntity_DistillationTower
protected int getCurrentLayerOutputHatchCount() {
return mOutputHatchesByLayer.size() < mHeight || mHeight <= 0 ? 0
- : mOutputHatchesByLayer.get(mHeight - 1).size();
+ : mOutputHatchesByLayer.get(mHeight - 1)
+ .size();
}
protected boolean addLayerOutputHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
@@ -264,7 +321,8 @@ public class GT_MetaTileEntity_DistillationTower
while (mOutputHatchesByLayer.size() < mHeight) mOutputHatchesByLayer.add(new ArrayList<>());
GT_MetaTileEntity_Hatch_Output tHatch = (GT_MetaTileEntity_Hatch_Output) aTileEntity.getMetaTileEntity();
tHatch.updateTexture(aBaseCasingIndex);
- return mOutputHatchesByLayer.get(mHeight - 1).add(tHatch);
+ return mOutputHatchesByLayer.get(mHeight - 1)
+ .add(tHatch);
}
@Override
@@ -294,7 +352,8 @@ public class GT_MetaTileEntity_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) {
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java
index 55ccfd6230..a0c62ae2a7 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java
@@ -63,29 +63,41 @@ public abstract class GT_MetaTileEntity_DrillerBase
@Override
protected IStructureDefinition<GT_MetaTileEntity_DrillerBase> computeValue(Class<?> type) {
return StructureDefinition.<GT_MetaTileEntity_DrillerBase>builder()
- .addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { " ", " f ", " " }, { " ", " f ", " " },
- { " ", " f ", " " }, { " f ", "fcf", " f " }, { " f ", "fcf", " f " },
- { " f ", "fcf", " f " }, { "b~b", "bbb", "bbb" }, }))
- .addElement('f', lazy(t -> ofFrame(t.getFrameMaterial())))
- .addElement(
- 'c',
- lazy(
- t -> ofBlock(
- t.getCasingBlockItem().getBlock(),
- t.getCasingBlockItem().get(0).getItemDamage())))
- .addElement(
- 'b',
- lazy(
- t -> buildHatchAdder(GT_MetaTileEntity_DrillerBase.class)
- .atLeastList(t.getAllowedHatches())
- .adder(GT_MetaTileEntity_DrillerBase::addToMachineList)
- .casingIndex(t.casingTextureIndex).dot(1).buildAndChain(
- t.getCasingBlockItem().getBlock(),
- t.getCasingBlockItem().get(0).getItemDamage())))
- .build();
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] { { " ", " f ", " " }, { " ", " f ", " " },
+ { " ", " f ", " " }, { " f ", "fcf", " f " },
+ { " f ", "fcf", " f " }, { " f ", "fcf", " f " },
+ { "b~b", "bbb", "bbb" }, }))
+ .addElement('f', lazy(t -> ofFrame(t.getFrameMaterial())))
+ .addElement(
+ 'c',
+ lazy(
+ t -> ofBlock(
+ t.getCasingBlockItem()
+ .getBlock(),
+ t.getCasingBlockItem()
+ .get(0)
+ .getItemDamage())))
+ .addElement(
+ 'b',
+ lazy(
+ t -> buildHatchAdder(
+ GT_MetaTileEntity_DrillerBase.class).atLeastList(
+ t.getAllowedHatches())
+ .adder(
+ GT_MetaTileEntity_DrillerBase::addToMachineList)
+ .casingIndex(
+ t.casingTextureIndex)
+ .dot(1)
+ .buildAndChain(
+ t.getCasingBlockItem()
+ .getBlock(),
+ t.getCasingBlockItem()
+ .get(0)
+ .getItemDamage())))
+ .build();
}
};
@@ -126,7 +138,8 @@ public abstract class GT_MetaTileEntity_DrillerBase
private void initFields() {
casingBlock = getCasingBlockItem().getBlock();
- casingMeta = getCasingBlockItem().get(0).getItemDamage();
+ casingMeta = getCasingBlockItem().get(0)
+ .getItemDamage();
int frameId = 4096 + getFrameMaterial().mMetaItemSubID;
frameMeta = GregTech_API.METATILEENTITIES[frameId] != null
? GregTech_API.METATILEENTITIES[frameId].getTileEntityBaseType()
@@ -139,12 +152,26 @@ public abstract class GT_MetaTileEntity_DrillerBase
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { getCasingTextureForId(casingTextureIndex),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ORE_DRILL_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ORE_DRILL_ACTIVE_GLOW).extFacing().glow().build() };
- return new ITexture[] { getCasingTextureForId(casingTextureIndex),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ORE_DRILL).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ORE_DRILL_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { getCasingTextureForId(casingTextureIndex), TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_ORE_DRILL_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ORE_DRILL_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { getCasingTextureForId(casingTextureIndex), TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_ORE_DRILL)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ORE_DRILL_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { getCasingTextureForId(casingTextureIndex) };
}
@@ -210,9 +237,14 @@ public abstract class GT_MetaTileEntity_DrillerBase
protected boolean tryPickPipe() {
if (yHead == yDrill) return isPickingPipes = false;
if (tryOutputPipe()) {
- if (checkBlockAndMeta(xPipe, yHead + 1, zPipe, miningPipeBlock, W))
- getBaseMetaTileEntity().getWorld().setBlock(xPipe, yHead + 1, zPipe, miningPipeTipBlock);
- getBaseMetaTileEntity().getWorld().setBlockToAir(xPipe, yHead, zPipe);
+ if (checkBlockAndMeta(xPipe, yHead + 1, zPipe, miningPipeBlock, W)) getBaseMetaTileEntity().getWorld()
+ .setBlock(
+ xPipe,
+ yHead + 1,
+ zPipe,
+ miningPipeTipBlock);
+ getBaseMetaTileEntity().getWorld()
+ .setBlockToAir(xPipe, yHead, zPipe);
return isPickingPipes = true;
}
return isPickingPipes = false;
@@ -259,7 +291,8 @@ public abstract class GT_MetaTileEntity_DrillerBase
isSimulating))
return 3;
if (!isSimulating) {
- if (yHead != yDrill) getBaseMetaTileEntity().getWorld().setBlock(xPipe, yHead, zPipe, miningPipeBlock);
+ if (yHead != yDrill) getBaseMetaTileEntity().getWorld()
+ .setBlock(xPipe, yHead, zPipe, miningPipeBlock);
if (b != miningPipeBlock && b != miningPipeTipBlock) getBaseMetaTileEntity().decrStackSize(1, 1);
}
@@ -434,7 +467,8 @@ public abstract class GT_MetaTileEntity_DrillerBase
// is pipe tip OR is controller layer
if (checkBlockAndMeta(xPipe, yHead, zPipe, miningPipeTipBlock, W) || ++yHead == yDrill) return true;
// pipe column is broken - try fix
- getBaseMetaTileEntity().getWorld().setBlock(xPipe, yHead, zPipe, miningPipeTipBlock);
+ getBaseMetaTileEntity().getWorld()
+ .setBlock(xPipe, yHead, zPipe, miningPipeTipBlock);
return true;
}
@@ -534,10 +568,18 @@ public abstract class GT_MetaTileEntity_DrillerBase
}
for (GT_MetaTileEntity_Hatch_DataAccess tHatch : mDataAccessHatches) {
if (isValidMetaTileEntity(tHatch)) {
- for (int i = 0; i < tHatch.getBaseMetaTileEntity().getSizeInventory(); i++) {
- if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null
- && isCorrectDataItem(tHatch.getBaseMetaTileEntity().getStackInSlot(i), state))
- rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i));
+ for (int i = 0; i < tHatch.getBaseMetaTileEntity()
+ .getSizeInventory(); i++) {
+ if (tHatch.getBaseMetaTileEntity()
+ .getStackInSlot(i)
+ != null
+ && isCorrectDataItem(
+ tHatch.getBaseMetaTileEntity()
+ .getStackInSlot(i),
+ state))
+ rList.add(
+ tHatch.getBaseMetaTileEntity()
+ .getStackInSlot(i));
}
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java
index 79204817f5..3395ded360 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java
@@ -47,31 +47,62 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
protected static final int CASING_INDEX = 11;
protected static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_MetaTileEntity_ElectricBlastFurnace> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_ElectricBlastFurnace>builder()
- .addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { "ttt", "tmt", "ttt" }, { "CCC", "C-C", "CCC" }, { "CCC", "C-C", "CCC" },
- { "b~b", "bbb", "bbb" } }))
- .addElement(
- 't',
- buildHatchAdder(GT_MetaTileEntity_ElectricBlastFurnace.class).atLeast(
- OutputHatch.withAdder(GT_MetaTileEntity_ElectricBlastFurnace::addOutputHatchToTopList)
- .withCount(t -> t.mPollutionOutputHatches.size()))
- .casingIndex(CASING_INDEX).dot(1).buildAndChain(GregTech_API.sBlockCasings1, CASING_INDEX))
- .addElement('m', Muffler.newAny(CASING_INDEX, 2))
- .addElement(
- 'C',
- ofCoil(
- GT_MetaTileEntity_ElectricBlastFurnace::setCoilLevel,
- GT_MetaTileEntity_ElectricBlastFurnace::getCoilLevel))
- .addElement(
- 'b',
- buildHatchAdder(GT_MetaTileEntity_ElectricBlastFurnace.class)
- .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Maintenance, Energy)
- .casingIndex(CASING_INDEX).dot(1).buildAndChain(GregTech_API.sBlockCasings1, CASING_INDEX))
- .build();
+ private static final IStructureDefinition<GT_MetaTileEntity_ElectricBlastFurnace> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_ElectricBlastFurnace>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] {
+ { "ttt", "tmt",
+ "ttt" },
+ { "CCC", "C-C",
+ "CCC" },
+ { "CCC", "C-C",
+ "CCC" },
+ { "b~b", "bbb",
+ "bbb" } }))
+ .addElement(
+ 't',
+ buildHatchAdder(
+ GT_MetaTileEntity_ElectricBlastFurnace.class).atLeast(
+ OutputHatch.withAdder(
+ GT_MetaTileEntity_ElectricBlastFurnace::addOutputHatchToTopList)
+ .withCount(
+ t -> t.mPollutionOutputHatches.size()))
+ .casingIndex(
+ CASING_INDEX)
+ .dot(
+ 1)
+ .buildAndChain(
+ GregTech_API.sBlockCasings1,
+ CASING_INDEX))
+ .addElement(
+ 'm',
+ Muffler.newAny(
+ CASING_INDEX,
+ 2))
+ .addElement(
+ 'C',
+ ofCoil(
+ GT_MetaTileEntity_ElectricBlastFurnace::setCoilLevel,
+ GT_MetaTileEntity_ElectricBlastFurnace::getCoilLevel))
+ .addElement(
+ 'b',
+ buildHatchAdder(
+ GT_MetaTileEntity_ElectricBlastFurnace.class).atLeast(
+ InputHatch,
+ OutputHatch,
+ InputBus,
+ OutputBus,
+ Maintenance,
+ Energy)
+ .casingIndex(
+ CASING_INDEX)
+ .dot(
+ 1)
+ .buildAndChain(
+ GregTech_API.sBlockCasings1,
+ CASING_INDEX))
+ .build();
public GT_MetaTileEntity_ElectricBlastFurnace(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
@@ -89,22 +120,30 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Blast Furnace").addInfo("Controller block for the Electric Blast Furnace")
- .addInfo("You can use some fluids to reduce recipe time. Place the circuit in the Input Bus")
- .addInfo("Each 900K over the min. Heat required reduces power consumption by 5% (multiplicatively)")
- .addInfo("Each 1800K over the min. Heat required grants one perfect overclock")
- .addInfo(
- "For each perfect overclock the EBF will reduce recipe time 4 times (instead of 2) (100% efficiency)")
- .addInfo("Additionally gives +100K for every tier past MV")
- .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 4, 3, true)
- .addController("Front bottom").addCasingInfoRange("Heat Proof Machine Casing", 0, 15, false)
- .addOtherStructurePart("Heating Coils", "Two middle Layers")
- .addEnergyHatch("Any bottom layer casing", 3).addMaintenanceHatch("Any bottom layer casing", 3)
- .addMufflerHatch("Top middle", 2).addInputBus("Any bottom layer casing", 3)
- .addInputHatch("Any bottom layer casing", 3).addOutputBus("Any bottom layer casing", 3)
- .addOutputHatch("Liquid form of fluids, Any bottom layer casing")
- .addOutputHatch("Gas form of fluids, Any top layer casing", 1)
- .addStructureInfo("Recovery amount scales with Muffler Hatch tier").toolTipFinisher("Gregtech");
+ tt.addMachineType("Blast Furnace")
+ .addInfo("Controller block for the Electric Blast Furnace")
+ .addInfo("You can use some fluids to reduce recipe time. Place the circuit in the Input Bus")
+ .addInfo("Each 900K over the min. Heat required reduces power consumption by 5% (multiplicatively)")
+ .addInfo("Each 1800K over the min. Heat required grants one perfect overclock")
+ .addInfo(
+ "For each perfect overclock the EBF will reduce recipe time 4 times (instead of 2) (100% efficiency)")
+ .addInfo("Additionally gives +100K for every tier past MV")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(3, 4, 3, true)
+ .addController("Front bottom")
+ .addCasingInfoRange("Heat Proof Machine Casing", 0, 15, false)
+ .addOtherStructurePart("Heating Coils", "Two middle Layers")
+ .addEnergyHatch("Any bottom layer casing", 3)
+ .addMaintenanceHatch("Any bottom layer casing", 3)
+ .addMufflerHatch("Top middle", 2)
+ .addInputBus("Any bottom layer casing", 3)
+ .addInputHatch("Any bottom layer casing", 3)
+ .addOutputBus("Any bottom layer casing", 3)
+ .addOutputHatch("Liquid form of fluids, Any bottom layer casing")
+ .addOutputHatch("Gas form of fluids, Any top layer casing", 1)
+ .addStructureInfo("Recovery amount scales with Muffler Hatch tier")
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -112,14 +151,26 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW).extFacing()
- .glow().build() };
- return new ITexture[] { casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW).extFacing().glow()
- .build() };
+ if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { casingTexturePages[0][CASING_INDEX] };
}
@@ -153,9 +204,14 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
tBus.mRecipeMap = getRecipeMap();
if (isValidMetaTileEntity(tBus)) {
- for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) {
- if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null) {
- tInputs.add(tBus.getBaseMetaTileEntity().getStackInSlot(i));
+ for (int i = tBus.getBaseMetaTileEntity()
+ .getSizeInventory()
+ - 1; i >= 0; i--) {
+ if (tBus.getBaseMetaTileEntity()
+ .getStackInSlot(i) != null) {
+ tInputs.add(
+ tBus.getBaseMetaTileEntity()
+ .getStackInSlot(i));
}
}
}
@@ -176,8 +232,12 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
long tVoltage = getMaxInputVoltage();
byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBlastRecipes
- .findRecipe(getBaseMetaTileEntity(), false, V[tTier], tFluids, tItems);
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBlastRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ V[tTier],
+ tFluids,
+ tItems);
if (tRecipe == null) return false;
if (this.mHeatingCapacity < tRecipe.mSpecialValue) return false;
@@ -322,8 +382,10 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
long maxEnergy = 0;
for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) {
if (!isValidMetaTileEntity(tHatch)) continue;
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
return new String[] {
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java
index 78e059db2a..e9ed294fc2 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java
@@ -37,21 +37,28 @@ public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_Die
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Combustion Generator").addInfo("Controller block for the Extreme Combustion Engine")
- .addInfo("Supply high rating fuel and 8000L of Lubricant per hour to run")
- .addInfo("Supply 40L/s of Liquid Oxygen to boost output (optional)")
- .addInfo("Default: Produces 10900EU/t at 100% fuel efficiency")
- .addInfo("Boosted: Produces 32700EU/t at 150% fuel efficiency")
- .addInfo("You need to wait for it to reach 300% to output full power")
- .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 4, false)
- .addController("Front center").addCasingInfoRange("Robust Tungstensteel Machine Casing", 16, 22, false)
- .addOtherStructurePart("Titanium Gear Box Machine Casing", "Inner 2 blocks")
- .addOtherStructurePart("Extreme Engine Intake Machine Casing", "8x, ring around controller")
- .addStructureInfo("Extreme Engine Intake Casings must not be obstructed in front (only air blocks)")
- .addDynamoHatch("Back center", 2).addMaintenanceHatch("One of the casings next to a Gear Box", 1)
- .addMufflerHatch("Top middle back, above the rear Gear Box", 1)
- .addInputHatch("HOG, next to a Gear Box", 1).addInputHatch("Lubricant, next to a Gear Box", 1)
- .addInputHatch("Liquid Oxygen, optional, next to a Gear Box", 1).toolTipFinisher("Gregtech");
+ tt.addMachineType("Combustion Generator")
+ .addInfo("Controller block for the Extreme Combustion Engine")
+ .addInfo("Supply high rating fuel and 8000L of Lubricant per hour to run")
+ .addInfo("Supply 40L/s of Liquid Oxygen to boost output (optional)")
+ .addInfo("Default: Produces 10900EU/t at 100% fuel efficiency")
+ .addInfo("Boosted: Produces 32700EU/t at 150% fuel efficiency")
+ .addInfo("You need to wait for it to reach 300% to output full power")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(3, 3, 4, false)
+ .addController("Front center")
+ .addCasingInfoRange("Robust Tungstensteel Machine Casing", 16, 22, false)
+ .addOtherStructurePart("Titanium Gear Box Machine Casing", "Inner 2 blocks")
+ .addOtherStructurePart("Extreme Engine Intake Machine Casing", "8x, ring around controller")
+ .addStructureInfo("Extreme Engine Intake Casings must not be obstructed in front (only air blocks)")
+ .addDynamoHatch("Back center", 2)
+ .addMaintenanceHatch("One of the casings next to a Gear Box", 1)
+ .addMufflerHatch("Top middle back, above the rear Gear Box", 1)
+ .addInputHatch("HOG, next to a Gear Box", 1)
+ .addInputHatch("Lubricant, next to a Gear Box", 1)
+ .addInputHatch("Liquid Oxygen, optional, next to a Gear Box", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -64,14 +71,26 @@ public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_Die
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { casingTexturePages[0][60],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { casingTexturePages[0][60],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_GLOW).extFacing().glow()
- .build() };
+ if (aActive) return new ITexture[] { casingTexturePages[0][60], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][60], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_EXTREME_DIESEL_ENGINE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { casingTexturePages[0][60] };
}
@@ -164,8 +183,10 @@ public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_Die
long maxEnergy = 0;
for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) {
if (isValidMetaTileEntity(tHatch)) {
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
index 34da12c590..869e1b53f8 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
@@ -66,53 +66,85 @@ public abstract class GT_MetaTileEntity_FusionComputer
@Override
protected IStructureDefinition<GT_MetaTileEntity_FusionComputer> computeValue(Class<?> type) {
- return StructureDefinition.<GT_MetaTileEntity_FusionComputer>builder().addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] {
- { " ", " ihi ", " hh hh ", " h h ",
- " h h ", " h h ", " i i ", " h h ",
- " i i ", " h h ", " h h ", " h h ",
- " hh hh ", " ihi ", " ", },
- { " xhx ", " hhccchh ", " eccxhxcce ", " eceh hece ",
- " hce ech ", " hch hch ", "xcx xcx", "hch hch",
- "xcx xcx", " hch hch ", " hce ech ", " eceh hece ",
- " eccx~xcce ", " hhccchh ", " xhx ", },
- { " ", " ihi ", " hh hh ", " h h ",
- " h h ", " h h ", " i i ", " h h ",
- " i i ", " h h ", " h h ", " h h ",
- " hh hh ", " ihi ", " ", } }))
- .addElement('c', lazy(t -> ofBlock(t.getFusionCoil(), t.getFusionCoilMeta())))
- .addElement('h', lazy(t -> ofBlock(t.getCasing(), t.getCasingMeta())))
- .addElement(
- 'i',
- lazy(
- t -> buildHatchAdder(GT_MetaTileEntity_FusionComputer.class)
- .atLeast(
- ImmutableMap.of(
- InputHatch.withAdder(
- GT_MetaTileEntity_FusionComputer::addInjector),
- 2))
- .hatchItemFilterAnd(t2 -> filterByMTETier(t2.tier(), Integer.MAX_VALUE))
- .casingIndex(53).dot(1).buildAndChain(t.getCasing(), t.getCasingMeta())))
- .addElement(
- 'e',
- lazy(
- t -> buildHatchAdder(GT_MetaTileEntity_FusionComputer.class).atLeast(
- ImmutableMap.of(
- Energy.withAdder(
- GT_MetaTileEntity_FusionComputer::addEnergyInjector),
- 16))
- .hatchItemFilterAnd(t2 -> filterByMTETier(t2.tier(), Integer.MAX_VALUE))
- .casingIndex(53).dot(2).buildAndChain(t.getCasing(), t.getCasingMeta())))
- .addElement(
- 'x',
- lazy(
- t -> buildHatchAdder(GT_MetaTileEntity_FusionComputer.class).atLeast(
- OutputHatch.withAdder(GT_MetaTileEntity_FusionComputer::addExtractor))
- .hatchItemFilterAnd(t2 -> filterByMTETier(t2.tier(), Integer.MAX_VALUE))
- .casingIndex(53).dot(3).buildAndChain(t.getCasing(), t.getCasingMeta())))
- .build();
+ return StructureDefinition.<GT_MetaTileEntity_FusionComputer>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] { { " ", " ihi ",
+ " hh hh ", " h h ", " h h ",
+ " h h ", " i i ", " h h ",
+ " i i ", " h h ", " h h ",
+ " h h ", " hh hh ", " ihi ",
+ " ", },
+ { " xhx ", " hhccchh ", " eccxhxcce ",
+ " eceh hece ", " hce ech ",
+ " hch hch ", "xcx xcx",
+ "hch hch", "xcx xcx",
+ " hch hch ", " hce ech ",
+ " eceh hece ", " eccx~xcce ",
+ " hhccchh ", " xhx ", },
+ { " ", " ihi ", " hh hh ",
+ " h h ", " h h ",
+ " h h ", " i i ",
+ " h h ", " i i ",
+ " h h ", " h h ",
+ " h h ", " hh hh ",
+ " ihi ", " ", } }))
+ .addElement('c', lazy(t -> ofBlock(t.getFusionCoil(), t.getFusionCoilMeta())))
+ .addElement('h', lazy(t -> ofBlock(t.getCasing(), t.getCasingMeta())))
+ .addElement(
+ 'i',
+ lazy(
+ t -> buildHatchAdder(
+ GT_MetaTileEntity_FusionComputer.class).atLeast(
+ ImmutableMap.of(
+ InputHatch.withAdder(
+ GT_MetaTileEntity_FusionComputer::addInjector),
+ 2))
+ .hatchItemFilterAnd(
+ t2 -> filterByMTETier(
+ t2.tier(),
+ Integer.MAX_VALUE))
+ .casingIndex(53)
+ .dot(1)
+ .buildAndChain(
+ t.getCasing(),
+ t.getCasingMeta())))
+ .addElement(
+ 'e',
+ lazy(
+ t -> buildHatchAdder(
+ GT_MetaTileEntity_FusionComputer.class).atLeast(
+ ImmutableMap.of(
+ Energy.withAdder(
+ GT_MetaTileEntity_FusionComputer::addEnergyInjector),
+ 16))
+ .hatchItemFilterAnd(
+ t2 -> filterByMTETier(
+ t2.tier(),
+ Integer.MAX_VALUE))
+ .casingIndex(53)
+ .dot(2)
+ .buildAndChain(
+ t.getCasing(),
+ t.getCasingMeta())))
+ .addElement(
+ 'x',
+ lazy(
+ t -> buildHatchAdder(
+ GT_MetaTileEntity_FusionComputer.class).atLeast(
+ OutputHatch.withAdder(
+ GT_MetaTileEntity_FusionComputer::addExtractor))
+ .hatchItemFilterAnd(
+ t2 -> filterByMTETier(
+ t2.tier(),
+ Integer.MAX_VALUE))
+ .casingIndex(53)
+ .dot(3)
+ .buildAndChain(
+ t.getCasing(),
+ t.getCasingMeta())))
+ .build();
}
};
public GT_Recipe mLastRecipe;
@@ -122,9 +154,15 @@ public abstract class GT_MetaTileEntity_FusionComputer
Textures.BlockIcons.setCasingTextureForId(
52,
TextureFactory.of(
- TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW).extFacing().build(),
- TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).extFacing().glow()
- .build()));
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW)
+ .extFacing()
+ .glow()
+ .build()));
}
public GT_MetaTileEntity_FusionComputer(int aID, String aName, String aNameRegional, int tier) {
@@ -172,10 +210,13 @@ public abstract class GT_MetaTileEntity_FusionComputer
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addController("Fusion Reactor").addInfo("Some kind of fusion reactor, maybe").addSeparator()
- .addInfo("Some kind of fusion reactor, maybe")
- .addStructureInfo("Should probably be built similar to other fusions")
- .addStructureInfo("See controller tooltip for details").toolTipFinisher("Gregtech");
+ tt.addController("Fusion Reactor")
+ .addInfo("Some kind of fusion reactor, maybe")
+ .addSeparator()
+ .addInfo("Some kind of fusion reactor, maybe")
+ .addStructureInfo("Should probably be built similar to other fusions")
+ .addStructureInfo("See controller tooltip for details")
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -238,11 +279,16 @@ public abstract class GT_MetaTileEntity_FusionComputer
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
- if (aSide == aFacing)
- return new ITexture[] { TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS).extFacing().build(),
- getTextureOverlay() };
+ if (aSide == aFacing) return new ITexture[] { TextureFactory.builder()
+ .addIcon(MACHINE_CASING_FUSION_GLASS)
+ .extFacing()
+ .build(),
+ getTextureOverlay() };
if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(52) };
- return new ITexture[] { TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS).extFacing().build() };
+ return new ITexture[] { TextureFactory.builder()
+ .addIcon(MACHINE_CASING_FUSION_GLASS)
+ .extFacing()
+ .build() };
}
/**
@@ -290,8 +336,12 @@ public abstract class GT_MetaTileEntity_FusionComputer
FluidStack[] tFluids = tFluidList.toArray(new FluidStack[0]);
GT_Recipe tRecipe;
- tRecipe = GT_Recipe.GT_Recipe_Map.sFusionRecipes
- .findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, false, GT_Values.V[tier()], tFluids);
+ tRecipe = GT_Recipe.GT_Recipe_Map.sFusionRecipes.findRecipe(
+ this.getBaseMetaTileEntity(),
+ this.mLastRecipe,
+ false,
+ GT_Values.V[tier()],
+ tFluids);
if (tRecipe == null) {
tRecipe = GT_Recipe.GT_Recipe_Map.sComplexFusionRecipes.findRecipe(
this.getBaseMetaTileEntity(),
@@ -363,8 +413,9 @@ public abstract class GT_MetaTileEntity_FusionComputer
for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches)
if (isValidMetaTileEntity(tHatch)) {
long energyToMove = GT_Values.V[tier()] / 16;
- if (aBaseMetaTileEntity.getStoredEU() + energyToMove < maxEUStore() && tHatch
- .getBaseMetaTileEntity().decreaseStoredEnergyUnits(energyToMove, false)) {
+ if (aBaseMetaTileEntity.getStoredEU() + energyToMove < maxEUStore()
+ && tHatch.getBaseMetaTileEntity()
+ .decreaseStoredEnergyUnits(energyToMove, false)) {
aBaseMetaTileEntity.increaseStoredEnergyUnits(energyToMove, true);
}
}
@@ -373,7 +424,8 @@ public abstract class GT_MetaTileEntity_FusionComputer
criticalStopMachine();
}
if (mMaxProgresstime > 0) {
- this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(mEUt, true);
+ this.getBaseMetaTileEntity()
+ .decreaseStoredEnergyUnits(mEUt, true);
if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) {
if (mOutputItems != null)
for (ItemStack tStack : mOutputItems) if (tStack != null) addOutput(tStack);
@@ -390,7 +442,8 @@ public abstract class GT_MetaTileEntity_FusionComputer
try {
GT_Mod.achievements.issueAchivementHatchFluid(
aBaseMetaTileEntity.getWorld()
- .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()),
+ .getPlayerEntityByName(
+ aBaseMetaTileEntity.getOwnerName()),
mOutputFluids[0]);
} catch (Exception ignored) {}
}
@@ -420,8 +473,8 @@ public abstract class GT_MetaTileEntity_FusionComputer
stopMachine();
}
}
- aBaseMetaTileEntity
- .setErrorDisplayID((aBaseMetaTileEntity.getErrorDisplayID() & ~127) | (mMachine ? 0 : 64));
+ aBaseMetaTileEntity.setErrorDisplayID(
+ (aBaseMetaTileEntity.getErrorDisplayID() & ~127) | (mMachine ? 0 : 64));
aBaseMetaTileEntity.setActive(mMaxProgresstime > 0);
}
}
@@ -534,8 +587,9 @@ public abstract class GT_MetaTileEntity_FusionComputer
@Override
public void addGregTechLogo(ModularWindow.Builder builder) {
builder.widget(
- new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17)
- .setPos(155, 145));
+ new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo())
+ .setSize(17, 17)
+ .setPos(155, 145));
}
@Override
@@ -557,59 +611,77 @@ public abstract class GT_MetaTileEntity_FusionComputer
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
new TextWidget(GT_Utility.trans("138", "Incomplete Structure.")).setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> !mMachine).setPos(10, 8))
- .widget(new FakeSyncWidget.BooleanSyncer(() -> mMachine, val -> mMachine = val))
- .widget(
- new TextWidget("Hit with Soft Mallet to (re-)start the Machine if it doesn't start.")
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setTextAlignment(Alignment.Center)
- .setEnabled(
- widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0
- && !getBaseMetaTileEntity().isActive())
- .setPos(-getGUIWidth() / 2, 170).setSize(getGUIWidth() * 2, 9))
- .widget(
- new FakeSyncWidget.IntegerSyncer(
- () -> getBaseMetaTileEntity().getErrorDisplayID(),
- val -> getBaseMetaTileEntity().setErrorDisplayID(val)))
- .widget(
- new FakeSyncWidget.BooleanSyncer(
- () -> getBaseMetaTileEntity().isActive(),
- val -> getBaseMetaTileEntity().setActive(val)))
- .widget(
- new TextWidget("Running perfectly.").setDefaultColor(COLOR_TEXT_WHITE.get())
- .setTextAlignment(Alignment.Center)
- .setEnabled(
- widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0
- && getBaseMetaTileEntity().isActive())
- .setPos(0, 170).setSize(getGUIWidth(), 9))
- .widget(
- new FakeSyncWidget.IntegerSyncer(
- () -> getBaseMetaTileEntity().getErrorDisplayID(),
- val -> getBaseMetaTileEntity().setErrorDisplayID(val)))
- .widget(
- new ProgressBar()
- .setProgress(
- () -> (float) getBaseMetaTileEntity().getStoredEU()
- / getBaseMetaTileEntity().getEUCapacity())
- .setDirection(ProgressBar.Direction.RIGHT)
- .setTexture(GT_UITextures.PROGRESSBAR_STORED_EU, 147).setPos(5, 156).setSize(147, 5))
- .widget(TextWidget.dynamicString(() -> {
- long energy = getBaseMetaTileEntity().getStoredEU();
- if (energy > 160_000_000L && energy < 160_010_000L) {
- energy = 160_000_000L;
- }
- if (energy > 320_000_000L && energy < 320_010_000L) {
- energy = 320_000_000L;
- }
- if (energy > 640_000_000L && energy < 640_010_000L) {
- energy = 640_000_000L;
- }
- if (energy > 5_120_000_000L && energy < 5_120_080_000L) {
- energy = 5_120_000_000L;
- }
- return GT_Utility.formatNumbers(energy) + " EU";
- }).setDefaultColor(COLOR_TEXT_RED.get()).setPos(50, 155)).widget(
- new ButtonWidget().setNEITransferRect(GT_Recipe.GT_Recipe_Map.sFusionRecipes.mNEIName)
- .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_NEI)
- .setPos(154, 4).setSize(18, 18));
+ .setEnabled(widget -> !mMachine)
+ .setPos(10, 8))
+ .widget(new FakeSyncWidget.BooleanSyncer(() -> mMachine, val -> mMachine = val))
+ .widget(
+ new TextWidget(
+ "Hit with Soft Mallet to (re-)start the Machine if it doesn't start.").setDefaultColor(
+ COLOR_TEXT_WHITE.get())
+ .setTextAlignment(
+ Alignment.Center)
+ .setEnabled(
+ widget -> getBaseMetaTileEntity().getErrorDisplayID()
+ == 0
+ && !getBaseMetaTileEntity().isActive())
+ .setPos(
+ -getGUIWidth()
+ / 2,
+ 170)
+ .setSize(
+ getGUIWidth()
+ * 2,
+ 9))
+ .widget(
+ new FakeSyncWidget.IntegerSyncer(
+ () -> getBaseMetaTileEntity().getErrorDisplayID(),
+ val -> getBaseMetaTileEntity().setErrorDisplayID(val)))
+ .widget(
+ new FakeSyncWidget.BooleanSyncer(
+ () -> getBaseMetaTileEntity().isActive(),
+ val -> getBaseMetaTileEntity().setActive(val)))
+ .widget(
+ new TextWidget("Running perfectly.").setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setTextAlignment(Alignment.Center)
+ .setEnabled(
+ widget -> getBaseMetaTileEntity().getErrorDisplayID()
+ == 0 && getBaseMetaTileEntity().isActive())
+ .setPos(0, 170)
+ .setSize(getGUIWidth(), 9))
+ .widget(
+ new FakeSyncWidget.IntegerSyncer(
+ () -> getBaseMetaTileEntity().getErrorDisplayID(),
+ val -> getBaseMetaTileEntity().setErrorDisplayID(val)))
+ .widget(
+ new ProgressBar().setProgress(
+ () -> (float) getBaseMetaTileEntity().getStoredEU()
+ / getBaseMetaTileEntity().getEUCapacity())
+ .setDirection(ProgressBar.Direction.RIGHT)
+ .setTexture(GT_UITextures.PROGRESSBAR_STORED_EU, 147)
+ .setPos(5, 156)
+ .setSize(147, 5))
+ .widget(TextWidget.dynamicString(() -> {
+ long energy = getBaseMetaTileEntity().getStoredEU();
+ if (energy > 160_000_000L && energy < 160_010_000L) {
+ energy = 160_000_000L;
+ }
+ if (energy > 320_000_000L && energy < 320_010_000L) {
+ energy = 320_000_000L;
+ }
+ if (energy > 640_000_000L && energy < 640_010_000L) {
+ energy = 640_000_000L;
+ }
+ if (energy > 5_120_000_000L && energy < 5_120_080_000L) {
+ energy = 5_120_000_000L;
+ }
+ return GT_Utility.formatNumbers(energy) + " EU";
+ })
+ .setDefaultColor(COLOR_TEXT_RED.get())
+ .setPos(50, 155))
+ .widget(
+ new ButtonWidget().setNEITransferRect(GT_Recipe.GT_Recipe_Map.sFusionRecipes.mNEIName)
+ .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_NEI)
+ .setPos(154, 4)
+ .setSize(18, 18));
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java
index 7742af798a..382e2c6c6e 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java
@@ -16,8 +16,15 @@ import gregtech.common.power.FusionPower;
public class GT_MetaTileEntity_FusionComputer1 extends GT_MetaTileEntity_FusionComputer {
private static final ITexture textureOverlay = TextureFactory.of(
- TextureFactory.builder().addIcon(OVERLAY_FUSION1).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FUSION1_GLOW).extFacing().glow().build());
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FUSION1)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FUSION1_GLOW)
+ .extFacing()
+ .glow()
+ .build());
public GT_MetaTileEntity_FusionComputer1(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional, 6);
@@ -67,18 +74,23 @@ public class GT_MetaTileEntity_FusionComputer1 extends GT_MetaTileEntity_FusionC
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Fusion Reactor").addInfo("It's over 9000!!!")
- .addInfo("Controller block for the Fusion Reactor Mk I")
- .addInfo("2048EU/t and 10M EU capacity per Energy Hatch")
- .addInfo("If the recipe has a startup cost greater than the")
- .addInfo("number of energy hatches * cap, you can't do it").addSeparator()
- .beginStructureBlock(15, 3, 15, false).addController("See diagram when placed")
- .addCasingInfoRange("LuV Machine Casing", 79, 123, false)
- .addStructureInfo("Cover the coils with casing")
- .addOtherStructurePart("Superconducting Coil Block", "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 LuV or better")
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Fusion Reactor")
+ .addInfo("It's over 9000!!!")
+ .addInfo("Controller block for the Fusion Reactor Mk I")
+ .addInfo("2048EU/t and 10M EU capacity per Energy Hatch")
+ .addInfo("If the recipe has a startup cost greater than the")
+ .addInfo("number of energy hatches * cap, you can't do it")
+ .addSeparator()
+ .beginStructureBlock(15, 3, 15, false)
+ .addController("See diagram when placed")
+ .addCasingInfoRange("LuV Machine Casing", 79, 123, false)
+ .addStructureInfo("Cover the coils with casing")
+ .addOtherStructurePart("Superconducting Coil Block", "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 LuV or better")
+ .toolTipFinisher("Gregtech");
return tt;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java
index de7a54ae93..5a5e884cb8 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java
@@ -16,8 +16,15 @@ import gregtech.common.power.FusionPower;
public class GT_MetaTileEntity_FusionComputer2 extends GT_MetaTileEntity_FusionComputer {
private static final ITexture textureOverlay = TextureFactory.of(
- TextureFactory.builder().addIcon(OVERLAY_FUSION2).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FUSION2_GLOW).extFacing().glow().build());
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FUSION2)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FUSION2_GLOW)
+ .extFacing()
+ .glow()
+ .build());
public GT_MetaTileEntity_FusionComputer2(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional, 7);
@@ -67,18 +74,23 @@ public class GT_MetaTileEntity_FusionComputer2 extends GT_MetaTileEntity_FusionC
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Fusion Reactor").addInfo("It's over 9000!!!")
- .addInfo("Controller block for the Fusion Reactor Mk II")
- .addInfo("8192EU/t and 20M EU capacity per Energy Hatch")
- .addInfo("If the recipe has a startup cost greater than the")
- .addInfo("number of energy hatches * cap, you can't do it").addSeparator()
- .beginStructureBlock(15, 3, 15, false).addController("See diagram when placed")
- .addCasingInfoRange("Fusion Machine Casing", 79, 123, false)
- .addStructureInfo("Cover the coils with casing")
- .addOtherStructurePart("Fusion Coil Block", "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 ZPM or better")
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Fusion Reactor")
+ .addInfo("It's over 9000!!!")
+ .addInfo("Controller block for the Fusion Reactor Mk II")
+ .addInfo("8192EU/t and 20M EU capacity per Energy Hatch")
+ .addInfo("If the recipe has a startup cost greater than the")
+ .addInfo("number of energy hatches * cap, you can't do it")
+ .addSeparator()
+ .beginStructureBlock(15, 3, 15, false)
+ .addController("See diagram when placed")
+ .addCasingInfoRange("Fusion Machine Casing", 79, 123, false)
+ .addStructureInfo("Cover the coils with casing")
+ .addOtherStructurePart("Fusion Coil Block", "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 ZPM or better")
+ .toolTipFinisher("Gregtech");
return tt;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java
index 09d8a46c26..2d5c6111fd 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java
@@ -16,8 +16,15 @@ import gregtech.common.power.FusionPower;
public class GT_MetaTileEntity_FusionComputer3 extends GT_MetaTileEntity_FusionComputer {
private static final ITexture textureOverlay = TextureFactory.of(
- TextureFactory.builder().addIcon(OVERLAY_FUSION3).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FUSION3_GLOW).extFacing().glow().build());
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FUSION3)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FUSION3_GLOW)
+ .extFacing()
+ .glow()
+ .build());
public GT_MetaTileEntity_FusionComputer3(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional, 8);
@@ -67,18 +74,23 @@ public class GT_MetaTileEntity_FusionComputer3 extends GT_MetaTileEntity_FusionC
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Fusion Reactor").addInfo("A SUN DOWN ON EARTH")
- .addInfo("Controller block for the Fusion Reactor Mk III")
- .addInfo("32768EU/t and 40M EU capacity per Energy Hatch")
- .addInfo("If the recipe has a startup cost greater than the")
- .addInfo("number of energy hatches * cap, you can't do it").addSeparator()
- .beginStructureBlock(15, 3, 15, false).addController("See diagram when placed")
- .addCasingInfoRange("Fusion Machine Casing Mk II", 79, 123, false)
- .addStructureInfo("Cover the coils with casing")
- .addOtherStructurePart("Fusion Coil Block", "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 UV or better")
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Fusion Reactor")
+ .addInfo("A SUN DOWN ON EARTH")
+ .addInfo("Controller block for the Fusion Reactor Mk III")
+ .addInfo("32768EU/t and 40M EU capacity per Energy Hatch")
+ .addInfo("If the recipe has a startup cost greater than the")
+ .addInfo("number of energy hatches * cap, you can't do it")
+ .addSeparator()
+ .beginStructureBlock(15, 3, 15, false)
+ .addController("See diagram when placed")
+ .addCasingInfoRange("Fusion Machine Casing Mk II", 79, 123, false)
+ .addStructureInfo("Cover the coils with casing")
+ .addOtherStructurePart("Fusion Coil Block", "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 UV or better")
+ .toolTipFinisher("Gregtech");
return tt;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java
index 4405044703..ceb901c5ad 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java
@@ -42,33 +42,68 @@ public class GT_MetaTileEntity_HeatExchanger extends
private static final int dryHeatMaximum = 2000; // 2000 ticks = 100 seconds
private static final int CASING_INDEX = 50;
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_MetaTileEntity_HeatExchanger> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_HeatExchanger>builder()
- .addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { "ccc", "cCc", "ccc" }, { "ccc", "cPc", "ccc" }, { "ccc", "cPc", "ccc" },
- { "c~c", "cHc", "ccc" }, }))
- .addElement('P', ofBlock(GregTech_API.sBlockCasings2, 14))
- .addElement(
- 'C',
- OutputHatch.withAdder(GT_MetaTileEntity_HeatExchanger::addColdFluidOutputToMachineList)
- .withCount(t -> isValidMetaTileEntity(t.mOutputColdFluidHatch) ? 1 : 0)
- .newAny(CASING_INDEX, 3))
- .addElement(
- 'H',
- OutputHatch.withAdder(GT_MetaTileEntity_HeatExchanger::addHotFluidInputToMachineList)
- .withCount(t -> isValidMetaTileEntity(t.mInputHotFluidHatch) ? 1 : 0)
- .newAny(CASING_INDEX, 3))
- .addElement(
- 'c',
- buildHatchAdder(GT_MetaTileEntity_HeatExchanger.class)
- .atLeast(InputBus, InputHatch, OutputBus, OutputHatch, Maintenance)
- .casingIndex(CASING_INDEX).dot(1).buildAndChain(
- onElementPass(
- GT_MetaTileEntity_HeatExchanger::onCasingAdded,
- ofBlock(GregTech_API.sBlockCasings4, (byte) 2))))
- .build();
+ private static final IStructureDefinition<GT_MetaTileEntity_HeatExchanger> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_HeatExchanger>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] {
+ { "ccc", "cCc",
+ "ccc" },
+ { "ccc", "cPc",
+ "ccc" },
+ { "ccc", "cPc",
+ "ccc" },
+ { "c~c", "cHc",
+ "ccc" }, }))
+ .addElement(
+ 'P',
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 14))
+ .addElement(
+ 'C',
+ OutputHatch.withAdder(
+ GT_MetaTileEntity_HeatExchanger::addColdFluidOutputToMachineList)
+ .withCount(
+ t -> isValidMetaTileEntity(
+ t.mOutputColdFluidHatch)
+ ? 1
+ : 0)
+ .newAny(
+ CASING_INDEX,
+ 3))
+ .addElement(
+ 'H',
+ OutputHatch.withAdder(
+ GT_MetaTileEntity_HeatExchanger::addHotFluidInputToMachineList)
+ .withCount(
+ t -> isValidMetaTileEntity(
+ t.mInputHotFluidHatch)
+ ? 1
+ : 0)
+ .newAny(
+ CASING_INDEX,
+ 3))
+ .addElement(
+ 'c',
+ buildHatchAdder(
+ GT_MetaTileEntity_HeatExchanger.class).atLeast(
+ InputBus,
+ InputHatch,
+ OutputBus,
+ OutputHatch,
+ Maintenance)
+ .casingIndex(
+ CASING_INDEX)
+ .dot(
+ 1)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_HeatExchanger::onCasingAdded,
+ ofBlock(
+ GregTech_API.sBlockCasings4,
+ (byte) 2))))
+ .build();
public static float penalty_per_config = 0.015f; // penalize 1.5% efficiency per circuitry level (1-25)
private GT_MetaTileEntity_Hatch_Input mInputHotFluidHatch;
@@ -93,17 +128,24 @@ public class GT_MetaTileEntity_HeatExchanger extends
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Heat Exchanger").addInfo("Controller Block for the Large Heat Exchanger")
- .addInfo("More complicated than a Fusion Reactor. Seriously").addInfo("Inputs are Hot Coolant or Lava")
- .addInfo("Outputs Coolant or Pahoehoe Lava and SH Steam/Steam")
- .addInfo("Read the wiki article to understand how it works")
- .addInfo("Then go to the Discord to understand the wiki").addSeparator()
- .beginStructureBlock(3, 4, 3, false).addController("Front bottom")
- .addCasingInfoRange("Stable Titanium Machine Casing", 20, 32, false)
- .addOtherStructurePart("Titanium Pipe Casing", "Center 2 blocks").addMaintenanceHatch("Any casing", 1)
- .addInputHatch("Hot fluid, bottom center", 2).addInputHatch("Distilled water, any casing", 1)
- .addOutputHatch("Cold fluid, top center", 3).addOutputHatch("Steam/SH Steam, any casing", 1)
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Heat Exchanger")
+ .addInfo("Controller Block for the Large Heat Exchanger")
+ .addInfo("More complicated than a Fusion Reactor. Seriously")
+ .addInfo("Inputs are Hot Coolant or Lava")
+ .addInfo("Outputs Coolant or Pahoehoe Lava and SH Steam/Steam")
+ .addInfo("Read the wiki article to understand how it works")
+ .addInfo("Then go to the Discord to understand the wiki")
+ .addSeparator()
+ .beginStructureBlock(3, 4, 3, false)
+ .addController("Front bottom")
+ .addCasingInfoRange("Stable Titanium Machine Casing", 20, 32, false)
+ .addOtherStructurePart("Titanium Pipe Casing", "Center 2 blocks")
+ .addMaintenanceHatch("Any casing", 1)
+ .addInputHatch("Hot fluid, bottom center", 2)
+ .addInputHatch("Distilled water, any casing", 1)
+ .addOutputHatch("Cold fluid, top center", 3)
+ .addOutputHatch("Steam/SH Steam, any casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -125,13 +167,26 @@ public class GT_MetaTileEntity_HeatExchanger extends
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_HEAT_EXCHANGER)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { casingTexturePages[0][CASING_INDEX] };
}
@@ -162,7 +217,8 @@ public class GT_MetaTileEntity_HeatExchanger extends
boolean do_solarSalt = false;
// Do we have an integrated circuit with a valid configuration?
- if (mInventory[1] != null && mInventory[1].getUnlocalizedName().startsWith("gt.integrated_circuit")) {
+ if (mInventory[1] != null && mInventory[1].getUnlocalizedName()
+ .startsWith("gt.integrated_circuit")) {
int circuit_config = mInventory[1].getItemDamage();
if (circuit_config >= 1 && circuit_config <= 25) {
// If so, apply the penalty and reduced threshold.
@@ -177,19 +233,26 @@ public class GT_MetaTileEntity_HeatExchanger extends
steam_output_multiplier /= 5f; // lava is not boosted
superheated_threshold /= 4f; // unchanged
do_lava = true;
- } else if (mInputHotFluidHatch.getFluid().isFluidEqual(FluidRegistry.getFluidStack("ic2hotcoolant", 1))) {
- steam_output_multiplier /= 2f; // was boosted x2 on top of x5 -> total x10 -> nerf with this code back to 5x
- superheated_threshold /= 5f; // 10x smaller since the Hot Things production in reactor is the same.
- do_coolant = true;
- } else if (mInputHotFluidHatch.getFluid().isFluidEqual(FluidRegistry.getFluidStack("molten.solarsalthot", 1))) {
- steam_output_multiplier *= 2.5f; // Solar Salt:Steam value is 5x higher than Hot Coolant's value
- superheated_threshold /= 25f; // Given that, multiplier is 5x higher and threshold is 5x lower
- do_solarSalt = true;
- } else {
- // If we're working with neither, fail out
- superheated_threshold = 0;
- return false;
- }
+ } else if (mInputHotFluidHatch.getFluid()
+ .isFluidEqual(FluidRegistry.getFluidStack("ic2hotcoolant", 1))) {
+ steam_output_multiplier /= 2f; // was boosted x2 on top of x5 -> total x10 ->
+ // nerf with this code back to 5x
+ superheated_threshold /= 5f; // 10x smaller since the Hot Things production in
+ // reactor is the same.
+ do_coolant = true;
+ } else
+ if (mInputHotFluidHatch.getFluid()
+ .isFluidEqual(FluidRegistry.getFluidStack("molten.solarsalthot", 1))) {
+ steam_output_multiplier *= 2.5f; // Solar Salt:Steam value is 5x higher than Hot
+ // Coolant's value
+ superheated_threshold /= 25f; // Given that, multiplier is 5x higher and
+ // threshold is 5x lower
+ do_solarSalt = true;
+ } else {
+ // If we're working with neither, fail out
+ superheated_threshold = 0;
+ return false;
+ }
superheated = fluidAmountToConsume >= superheated_threshold; // set the internal superheated flag if we have
// enough hot fluid. Used in the
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java
index ca9c31f350..fede7c283d 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java
@@ -43,13 +43,21 @@ public class GT_MetaTileEntity_ImplosionCompressor
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Implosion Compressor").addInfo("Explosions are fun")
- .addInfo("Controller block for the Implosion Compressor")
- .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 3, true)
- .addController("Front center").addCasingInfoRange("Solid Steel Machine Casing", 16, 24, false)
- .addStructureInfo("Casings can be replaced with Explosion Warning Signs")
- .addEnergyHatch("Any casing", 1).addMaintenanceHatch("Any casing", 1).addMufflerHatch("Any casing", 1)
- .addInputBus("Any casing", 1).addOutputBus("Any casing", 1).toolTipFinisher("Gregtech");
+ tt.addMachineType("Implosion Compressor")
+ .addInfo("Explosions are fun")
+ .addInfo("Controller block for the Implosion Compressor")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(3, 3, 3, true)
+ .addController("Front center")
+ .addCasingInfoRange("Solid Steel Machine Casing", 16, 24, false)
+ .addStructureInfo("Casings can be replaced with Explosion Warning Signs")
+ .addEnergyHatch("Any casing", 1)
+ .addMaintenanceHatch("Any casing", 1)
+ .addMufflerHatch("Any casing", 1)
+ .addInputBus("Any casing", 1)
+ .addOutputBus("Any casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -63,14 +71,26 @@ public class GT_MetaTileEntity_ImplosionCompressor
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { BlockIcons.casingTexturePages[0][16],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { BlockIcons.casingTexturePages[0][16],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_GLOW).extFacing().glow()
- .build() };
+ if (aActive) return new ITexture[] { BlockIcons.casingTexturePages[0][16], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { BlockIcons.casingTexturePages[0][16], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_IMPLOSION_COMPRESSOR)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { Textures.BlockIcons.casingTexturePages[0][16] };
}
@@ -105,8 +125,12 @@ public class GT_MetaTileEntity_ImplosionCompressor
}
ItemStack[] tInputs = tInputList.toArray(new ItemStack[0]);
if (!tInputList.isEmpty()) {
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sImplosionRecipes
- .findRecipe(getBaseMetaTileEntity(), false, 9223372036854775807L, null, tInputs);
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sImplosionRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ 9223372036854775807L,
+ null,
+ tInputs);
if ((tRecipe != null) && (tRecipe.isRecipeInputEqual(true, null, tInputs))) {
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java
index dc186dadeb..832d376dc6 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java
@@ -54,65 +54,184 @@ public class GT_MetaTileEntity_IntegratedOreFactory
private static final int CASING_INDEX2 = 49;
private static final int MAX_PARA = 1024;
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_MetaTileEntity_IntegratedOreFactory> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_IntegratedOreFactory>builder()
- .addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] {
- { " ", " ", " WWW ", " WWW ", " ",
- " " },
- { " ", " sss ", " sppps", " sppps", " sss ",
- " " },
- { " ", " sss ", " s s", " s s", " sss ",
- " " },
- { " ", " sss ", " sppps", " sppps", " sss ",
- " " },
- { " ", " sss ", " s s", " s s", " sss ",
- " " },
- { " ", " sss ", " sppps", " sppps", " sss ",
- " " },
- { "iiiiii ", "iIIIIiisssi", "iIIIIis s", "iIIIIis s", "iIIIIiisssi",
- "iiiiii " },
- { "iggggi ", "gt t isssi", "g xx sppps", "g xx sppps", "gt t isssi",
- "iggggi " },
- { "iggggi ", "gt t isssi", "g xx s s", "g xx s s", "gt t isssi",
- "iggggi " },
- { "iggggi ", "gt t is~si", "g xx spppO", "g xx spppO", "gt t isssi",
- "iggggi " },
- { "iggggi ", "gt t isssi", "g xx s O", "g xx s O", "gt t isssi",
- "iggggi " },
- { "EEEEEE ", "EEEEEEEEEEE", "EEEEEEEEEEE", "EEEEEEEEEEE", "EEEEEEEEEEE",
- "EEEEEE " } }))
- .addElement('i', ofBlock(GregTech_API.sBlockCasings8, 7))
- .addElement('s', ofBlock(GregTech_API.sBlockCasings4, 1))
- .addElement(
- 'g',
- ofChain(
- ofBlockUnlocalizedName("IC2", "blockAlloyGlass", 0, true),
- ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks", 0, true),
- ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks2", 0, true),
- // warded glass
- ofBlockUnlocalizedName("Thaumcraft", "blockCosmeticOpaque", 2, false)))
- .addElement('x', ofBlock(GregTech_API.sBlockCasings2, 3))
- .addElement('p', ofBlock(GregTech_API.sBlockCasings2, 15)).addElement('t', ofFrame(Materials.TungstenSteel))
- .addElement(
- 'E',
- buildHatchAdder(GT_MetaTileEntity_IntegratedOreFactory.class).atLeast(Energy, Maintenance)
- .casingIndex(CASING_INDEX1).dot(1).buildAndChain(GregTech_API.sBlockCasings8, 7))
- .addElement(
- 'I',
- buildHatchAdder(GT_MetaTileEntity_IntegratedOreFactory.class).atLeast(InputBus)
- .casingIndex(CASING_INDEX1).dot(2).buildAndChain(GregTech_API.sBlockCasings8, 7))
- .addElement(
- 'W',
- buildHatchAdder(GT_MetaTileEntity_IntegratedOreFactory.class).atLeast(InputHatch, Muffler)
- .casingIndex(CASING_INDEX2).dot(3).buildAndChain(GregTech_API.sBlockCasings4, 1))
- .addElement(
- 'O',
- buildHatchAdder(GT_MetaTileEntity_IntegratedOreFactory.class).atLeast(OutputBus, OutputHatch)
- .casingIndex(CASING_INDEX2).dot(4).buildAndChain(GregTech_API.sBlockCasings4, 1))
- .build();
+ private static final IStructureDefinition<GT_MetaTileEntity_IntegratedOreFactory> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_IntegratedOreFactory>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] {
+ { " ",
+ " ",
+ " WWW ",
+ " WWW ",
+ " ",
+ " " },
+ { " ",
+ " sss ",
+ " sppps",
+ " sppps",
+ " sss ",
+ " " },
+ { " ",
+ " sss ",
+ " s s",
+ " s s",
+ " sss ",
+ " " },
+ { " ",
+ " sss ",
+ " sppps",
+ " sppps",
+ " sss ",
+ " " },
+ { " ",
+ " sss ",
+ " s s",
+ " s s",
+ " sss ",
+ " " },
+ { " ",
+ " sss ",
+ " sppps",
+ " sppps",
+ " sss ",
+ " " },
+ { "iiiiii ",
+ "iIIIIiisssi",
+ "iIIIIis s",
+ "iIIIIis s",
+ "iIIIIiisssi",
+ "iiiiii " },
+ { "iggggi ",
+ "gt t isssi",
+ "g xx sppps",
+ "g xx sppps",
+ "gt t isssi",
+ "iggggi " },
+ { "iggggi ",
+ "gt t isssi",
+ "g xx s s",
+ "g xx s s",
+ "gt t isssi",
+ "iggggi " },
+ { "iggggi ",
+ "gt t is~si",
+ "g xx spppO",
+ "g xx spppO",
+ "gt t isssi",
+ "iggggi " },
+ { "iggggi ",
+ "gt t isssi",
+ "g xx s O",
+ "g xx s O",
+ "gt t isssi",
+ "iggggi " },
+ { "EEEEEE ",
+ "EEEEEEEEEEE",
+ "EEEEEEEEEEE",
+ "EEEEEEEEEEE",
+ "EEEEEEEEEEE",
+ "EEEEEE " } }))
+ .addElement(
+ 'i',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 7))
+ .addElement(
+ 's',
+ ofBlock(
+ GregTech_API.sBlockCasings4,
+ 1))
+ .addElement(
+ 'g',
+ ofChain(
+ ofBlockUnlocalizedName(
+ "IC2",
+ "blockAlloyGlass",
+ 0,
+ true),
+ ofBlockUnlocalizedName(
+ "bartworks",
+ "BW_GlasBlocks",
+ 0,
+ true),
+ ofBlockUnlocalizedName(
+ "bartworks",
+ "BW_GlasBlocks2",
+ 0,
+ true),
+ // warded
+ // glass
+ ofBlockUnlocalizedName(
+ "Thaumcraft",
+ "blockCosmeticOpaque",
+ 2,
+ false)))
+ .addElement(
+ 'x',
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 3))
+ .addElement(
+ 'p',
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 15))
+ .addElement(
+ 't',
+ ofFrame(
+ Materials.TungstenSteel))
+ .addElement(
+ 'E',
+ buildHatchAdder(
+ GT_MetaTileEntity_IntegratedOreFactory.class).atLeast(
+ Energy,
+ Maintenance)
+ .casingIndex(
+ CASING_INDEX1)
+ .dot(
+ 1)
+ .buildAndChain(
+ GregTech_API.sBlockCasings8,
+ 7))
+ .addElement(
+ 'I',
+ buildHatchAdder(
+ GT_MetaTileEntity_IntegratedOreFactory.class).atLeast(
+ InputBus)
+ .casingIndex(
+ CASING_INDEX1)
+ .dot(
+ 2)
+ .buildAndChain(
+ GregTech_API.sBlockCasings8,
+ 7))
+ .addElement(
+ 'W',
+ buildHatchAdder(
+ GT_MetaTileEntity_IntegratedOreFactory.class).atLeast(
+ InputHatch,
+ Muffler)
+ .casingIndex(
+ CASING_INDEX2)
+ .dot(
+ 3)
+ .buildAndChain(
+ GregTech_API.sBlockCasings4,
+ 1))
+ .addElement(
+ 'O',
+ buildHatchAdder(
+ GT_MetaTileEntity_IntegratedOreFactory.class).atLeast(
+ OutputBus,
+ OutputHatch)
+ .casingIndex(
+ CASING_INDEX2)
+ .dot(
+ 4)
+ .buildAndChain(
+ GregTech_API.sBlockCasings4,
+ 1))
+ .build();
private static final HashSet<Integer> isCrushedOre = new HashSet<>();
private static final HashSet<Integer> isCrushedPureOre = new HashSet<>();
@@ -188,20 +307,31 @@ public class GT_MetaTileEntity_IntegratedOreFactory
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Ore Processor").addInfo("Controller Block for the Integrated Ore Factory")
- .addInfo("It is OP. I mean ore processor.").addInfo("Do all ore procession in one step.")
- .addInfo("Can process up to 1024 ores per time.")
- .addInfo("Every ore costs 30EU/t, 2L lubricant, 200L distilled water.")
- .addInfo("Process time is depend on mode.").addInfo("Use a screwdriver to switch mode.")
- .addInfo("Sneak click with screwdriver to void the stone dusts.").addSeparator()
- .beginStructureBlock(6, 12, 11, false).addController("The third layer")
- .addStructureInfo("128 advanced iridium plated machine casing")
- .addStructureInfo("105 clean stainless steel machine casing").addStructureInfo("48 reinforced glass")
- .addStructureInfo("30 tungstensteel pipe casing").addStructureInfo("16 tungstensteel frame box")
- .addStructureInfo("16 steel gear box casing").addEnergyHatch("Button Casing", 1)
- .addMaintenanceHatch("Button Casing", 1).addInputBus("Input ore/crushed ore", 2)
- .addInputHatch("Input lubricant/distilled water/washing chemicals", 3)
- .addMufflerHatch("Output Pollution", 3).addOutputBus("Output products", 4).toolTipFinisher("Gregtech");
+ tt.addMachineType("Ore Processor")
+ .addInfo("Controller Block for the Integrated Ore Factory")
+ .addInfo("It is OP. I mean ore processor.")
+ .addInfo("Do all ore procession in one step.")
+ .addInfo("Can process up to 1024 ores per time.")
+ .addInfo("Every ore costs 30EU/t, 2L lubricant, 200L distilled water.")
+ .addInfo("Process time is depend on mode.")
+ .addInfo("Use a screwdriver to switch mode.")
+ .addInfo("Sneak click with screwdriver to void the stone dusts.")
+ .addSeparator()
+ .beginStructureBlock(6, 12, 11, false)
+ .addController("The third layer")
+ .addStructureInfo("128 advanced iridium plated machine casing")
+ .addStructureInfo("105 clean stainless steel machine casing")
+ .addStructureInfo("48 reinforced glass")
+ .addStructureInfo("30 tungstensteel pipe casing")
+ .addStructureInfo("16 tungstensteel frame box")
+ .addStructureInfo("16 steel gear box casing")
+ .addEnergyHatch("Button Casing", 1)
+ .addMaintenanceHatch("Button Casing", 1)
+ .addInputBus("Input ore/crushed ore", 2)
+ .addInputHatch("Input lubricant/distilled water/washing chemicals", 3)
+ .addMufflerHatch("Output Pollution", 3)
+ .addOutputBus("Output products", 4)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -399,8 +529,12 @@ public class GT_MetaTileEntity_IntegratedOreFactory
for (ItemStack aStack : sMidProduct) {
int tID = GT_Utility.stackToInt(aStack);
if (checkTypes(tID, aTables)) {
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes
- .findRecipe(getBaseMetaTileEntity(), false, GT_Values.V[15], null, aStack);
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ GT_Values.V[15],
+ null,
+ aStack);
if (tRecipe != null) {
tProduct.addAll(getOutputStack(tRecipe, aStack.stackSize));
} else {
@@ -447,8 +581,12 @@ public class GT_MetaTileEntity_IntegratedOreFactory
for (ItemStack aStack : sMidProduct) {
int tID = GT_Utility.stackToInt(aStack);
if (checkTypes(tID, aTables)) {
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes
- .findRecipe(getBaseMetaTileEntity(), false, GT_Values.V[15], null, aStack);
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ GT_Values.V[15],
+ null,
+ aStack);
if (tRecipe != null) {
tProduct.addAll(getOutputStack(tRecipe, aStack.stackSize));
} else {
@@ -469,8 +607,12 @@ public class GT_MetaTileEntity_IntegratedOreFactory
for (ItemStack aStack : sMidProduct) {
int tID = GT_Utility.stackToInt(aStack);
if (checkTypes(tID, aTables)) {
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes
- .findRecipe(getBaseMetaTileEntity(), false, GT_Values.V[15], null, aStack);
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ GT_Values.V[15],
+ null,
+ aStack);
if (tRecipe != null) {
tProduct.addAll(getOutputStack(tRecipe, aStack.stackSize));
} else {
@@ -491,8 +633,12 @@ public class GT_MetaTileEntity_IntegratedOreFactory
for (ItemStack aStack : sMidProduct) {
int tID = GT_Utility.stackToInt(aStack);
if (checkTypes(tID, aTables)) {
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sSifterRecipes
- .findRecipe(getBaseMetaTileEntity(), false, GT_Values.V[15], null, aStack);
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sSifterRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ GT_Values.V[15],
+ null,
+ aStack);
if (tRecipe != null) {
tProduct.addAll(getOutputStack(tRecipe, aStack.stackSize));
} else {
@@ -520,7 +666,8 @@ public class GT_MetaTileEntity_IntegratedOreFactory
getStoredFluids().toArray(new FluidStack[0]),
aStack);
if (tRecipe != null && tRecipe.getRepresentativeFluidInput(0) != null) {
- FluidStack tInputFluid = tRecipe.getRepresentativeFluidInput(0).copy();
+ FluidStack tInputFluid = tRecipe.getRepresentativeFluidInput(0)
+ .copy();
int tStored = getFluidAmount(tInputFluid);
int tWashed = Math.min(tStored / tInputFluid.amount, aStack.stackSize);
depleteInput(new FluidStack(tInputFluid.getFluid(), tWashed * tInputFluid.amount));
@@ -569,7 +716,9 @@ public class GT_MetaTileEntity_IntegratedOreFactory
GT_Utility.copyAmountUnsafe(tAmount * aRecipe.getOutput(i).stackSize, aRecipe.getOutput(i)));
}
}
- return tOutput.stream().filter(i -> (i != null && i.stackSize > 0)).collect(Collectors.toList());
+ return tOutput.stream()
+ .filter(i -> (i != null && i.stackSize > 0))
+ .collect(Collectors.toList());
}
private void doCompress(List<ItemStack> aList) {
@@ -655,12 +804,25 @@ public class GT_MetaTileEntity_IntegratedOreFactory
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX2),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX2),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_GLOW).extFacing().glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX2), TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_PROCESSING_ARRAY)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX2) };
}
@@ -669,13 +831,13 @@ public class GT_MetaTileEntity_IntegratedOreFactory
final EnumChatFormatting AQUA = EnumChatFormatting.AQUA;
final String CRUSH = StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.Macerate");
final String WASH = StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.Ore_Washer")
- .replace(" ", " " + AQUA);
+ .replace(" ", " " + AQUA);
final String THERMAL = StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.Thermal_Centrifuge")
- .replace(" ", " " + AQUA);
+ .replace(" ", " " + AQUA);
final String CENTRIFUGE = StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.Centrifuge");
final String SIFTER = StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.Sifter");
final String CHEM_WASH = StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.Chemical_Bathing")
- .replace(" ", " " + AQUA);
+ .replace(" ", " " + AQUA);
final String ARROW = " " + AQUA + "-> ";
List<String> des = new ArrayList<>();
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
index 6bd2da57db..d6fdc56854 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
@@ -51,30 +51,47 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends
@Override
protected IStructureDefinition<GT_MetaTileEntity_LargeBoiler> computeValue(Class<?> type) {
- return StructureDefinition.<GT_MetaTileEntity_LargeBoiler>builder().addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { "ccc", "ccc", "ccc" }, { "ccc", "cPc", "ccc" }, { "ccc", "cPc", "ccc" },
- { "ccc", "cPc", "ccc" }, { "f~f", "fff", "fff" }, }))
- .addElement('P', lazy(t -> ofBlock(t.getPipeBlock(), t.getPipeMeta())))
- .addElement(
- 'c',
- lazy(
- t -> buildHatchAdder(GT_MetaTileEntity_LargeBoiler.class).atLeast(OutputHatch)
- .casingIndex(t.getCasingTextureIndex()).dot(2).buildAndChain(
- onElementPass(
- GT_MetaTileEntity_LargeBoiler::onCasingAdded,
- ofBlock(t.getCasingBlock(), t.getCasingMeta())))))
- .addElement(
- 'f',
- lazy(
- t -> buildHatchAdder(GT_MetaTileEntity_LargeBoiler.class)
- .atLeast(Maintenance, InputHatch, InputBus, Muffler)
- .casingIndex(t.getFireboxTextureIndex()).dot(1).buildAndChain(
- onElementPass(
- GT_MetaTileEntity_LargeBoiler::onFireboxAdded,
- ofBlock(t.getFireboxBlock(), t.getFireboxMeta())))))
- .build();
+ return StructureDefinition.<GT_MetaTileEntity_LargeBoiler>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] { { "ccc", "ccc", "ccc" }, { "ccc", "cPc", "ccc" },
+ { "ccc", "cPc", "ccc" }, { "ccc", "cPc", "ccc" },
+ { "f~f", "fff", "fff" }, }))
+ .addElement('P', lazy(t -> ofBlock(t.getPipeBlock(), t.getPipeMeta())))
+ .addElement(
+ 'c',
+ lazy(
+ t -> buildHatchAdder(
+ GT_MetaTileEntity_LargeBoiler.class).atLeast(OutputHatch)
+ .casingIndex(
+ t.getCasingTextureIndex())
+ .dot(2)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_LargeBoiler::onCasingAdded,
+ ofBlock(
+ t.getCasingBlock(),
+ t.getCasingMeta())))))
+ .addElement(
+ 'f',
+ lazy(
+ t -> buildHatchAdder(
+ GT_MetaTileEntity_LargeBoiler.class).atLeast(
+ Maintenance,
+ InputHatch,
+ InputBus,
+ Muffler)
+ .casingIndex(
+ t.getFireboxTextureIndex())
+ .dot(1)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_LargeBoiler::onFireboxAdded,
+ ofBlock(
+ t.getFireboxBlock(),
+ t.getFireboxMeta())))))
+ .build();
}
};
private boolean firstRun = true;
@@ -99,7 +116,8 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Boiler").addInfo("Controller block for the Large " + getCasingMaterial() + " Boiler");
+ tt.addMachineType("Boiler")
+ .addInfo("Controller block for the Large " + getCasingMaterial() + " Boiler");
// Tooltip differs between the boilers that output Superheated Steam (Titanium and Tungstensteel) and the ones
// that do not (Bronze and Steel)
if (isSuperheated()) {
@@ -108,31 +126,37 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends
+ "L of Superheated Steam with 1 Coal at "
+ formatNumbers((getEUt() * 40L) / superToNormalSteam)
+ "L/s") // ?
- .addInfo("A programmed circuit in the main block throttles the boiler (-1000L/s per config)")
- .addInfo("Only some solid fuels are allowed (check the NEI Large Boiler tab for details)")
- .addInfo("If there are any disallowed fuels in the input bus, the boiler won't run!");
+ .addInfo("A programmed circuit in the main block throttles the boiler (-1000L/s per config)")
+ .addInfo("Only some solid fuels are allowed (check the NEI Large Boiler tab for details)")
+ .addInfo("If there are any disallowed fuels in the input bus, the boiler won't run!");
} else {
tt.addInfo(
"Produces " + formatNumbers((getEUt() * 40) * (runtimeBoost(20) / 20f))
+ "L of Steam with 1 Coal at "
+ formatNumbers(getEUt() * 40)
+ "L/s") // ?
- .addInfo("A programmed circuit in the main block throttles the boiler (-1000L/s per config)")
- .addInfo("Solid Fuels with a burn value that is too high or too low will not work");
+ .addInfo("A programmed circuit in the main block throttles the boiler (-1000L/s per config)")
+ .addInfo("Solid Fuels with a burn value that is too high or too low will not work");
}
tt.addInfo(
String.format(
"Diesel fuels have 1/4 efficiency - Takes %s seconds to heat up",
formatNumbers(500.0 / getEfficiencyIncrease()))) // ? check semifluid again
- .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 5, 3, false)
- .addController("Front bottom")
- .addCasingInfoRange(getCasingMaterial() + " " + getCasingBlockType() + " Casing", 24, 31, false) // ?
- .addOtherStructurePart(getCasingMaterial() + " Fire Boxes", "Bottom layer, 3 minimum")
- .addOtherStructurePart(getCasingMaterial() + " Pipe Casing Blocks", "Inner 3 blocks")
- .addMaintenanceHatch("Any firebox", 1).addMufflerHatch("Any firebox", 1)
- .addInputBus("Solid fuel, Any firebox", 1).addInputHatch("Liquid fuel, Any firebox", 1)
- .addStructureInfo("You can use either, or both").addInputHatch("Water, Any firebox", 1)
- .addOutputHatch("Steam, any casing", 2).toolTipFinisher("Gregtech");
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(3, 5, 3, false)
+ .addController("Front bottom")
+ .addCasingInfoRange(getCasingMaterial() + " " + getCasingBlockType() + " Casing", 24, 31, false) // ?
+ .addOtherStructurePart(getCasingMaterial() + " Fire Boxes", "Bottom layer, 3 minimum")
+ .addOtherStructurePart(getCasingMaterial() + " Pipe Casing Blocks", "Inner 3 blocks")
+ .addMaintenanceHatch("Any firebox", 1)
+ .addMufflerHatch("Any firebox", 1)
+ .addInputBus("Solid fuel, Any firebox", 1)
+ .addInputHatch("Liquid fuel, Any firebox", 1)
+ .addStructureInfo("You can use either, or both")
+ .addInputHatch("Water, Any firebox", 1)
+ .addOutputHatch("Steam, any casing", 2)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -179,12 +203,25 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
if (aActive) return new ITexture[] { BlockIcons.getCasingTextureForId(getCasingTextureIndex()),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_BOILER_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_BOILER_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { BlockIcons.getCasingTextureForId(getCasingTextureIndex()),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_BOILER).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_BOILER_GLOW).extFacing().glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_LARGE_BOILER_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_LARGE_BOILER_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { BlockIcons.getCasingTextureForId(getCasingTextureIndex()), TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_LARGE_BOILER)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_LARGE_BOILER_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex()) };
}
@@ -379,7 +416,8 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends
if (mProgresstime > 0 && firstRun) {
firstRun = false;
GT_Mod.achievements.issueAchievement(
- aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()),
+ aBaseMetaTileEntity.getWorld()
+ .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()),
"extremepressure");
}
super.onPostTick(aBaseMetaTileEntity, aTick);
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java
index 70d9250206..4c717a85a8 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java
@@ -43,32 +43,64 @@ public class GT_MetaTileEntity_LargeChemicalReactor
private static final int CASING_INDEX = 176;
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_MetaTileEntity_LargeChemicalReactor> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_LargeChemicalReactor>builder()
- .addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { "ccc", "cxc", "ccc" }, { "c~c", "xPx", "cxc" },
- { "ccc", "cxc", "ccc" }, }))
- .addElement('P', ofBlock(GregTech_API.sBlockCasings8, 1))
- .addElement(
- 'c',
- buildHatchAdder(GT_MetaTileEntity_LargeChemicalReactor.class)
- .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Maintenance, Energy)
- .casingIndex(CASING_INDEX).dot(1).buildAndChain(
- onElementPass(
- GT_MetaTileEntity_LargeChemicalReactor::onCasingAdded,
- ofBlock(GregTech_API.sBlockCasings8, 0))))
- .addElement(
- 'x',
- buildHatchAdder(GT_MetaTileEntity_LargeChemicalReactor.class)
- .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Maintenance, Energy)
- .casingIndex(CASING_INDEX).dot(1).buildAndChain(
- CoilStructureElement.INSTANCE,
- onElementPass(
- GT_MetaTileEntity_LargeChemicalReactor::onCasingAdded,
- ofBlock(GregTech_API.sBlockCasings8, 0))))
- .build();
+ private static final IStructureDefinition<GT_MetaTileEntity_LargeChemicalReactor> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_LargeChemicalReactor>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] {
+ { "ccc", "cxc",
+ "ccc" },
+ { "c~c", "xPx",
+ "cxc" },
+ { "ccc", "cxc",
+ "ccc" }, }))
+ .addElement(
+ 'P',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 1))
+ .addElement(
+ 'c',
+ buildHatchAdder(
+ GT_MetaTileEntity_LargeChemicalReactor.class).atLeast(
+ InputHatch,
+ OutputHatch,
+ InputBus,
+ OutputBus,
+ Maintenance,
+ Energy)
+ .casingIndex(
+ CASING_INDEX)
+ .dot(
+ 1)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_LargeChemicalReactor::onCasingAdded,
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 0))))
+ .addElement(
+ 'x',
+ buildHatchAdder(
+ GT_MetaTileEntity_LargeChemicalReactor.class).atLeast(
+ InputHatch,
+ OutputHatch,
+ InputBus,
+ OutputBus,
+ Maintenance,
+ Energy)
+ .casingIndex(
+ CASING_INDEX)
+ .dot(
+ 1)
+ .buildAndChain(
+ CoilStructureElement.INSTANCE,
+ onElementPass(
+ GT_MetaTileEntity_LargeChemicalReactor::onCasingAdded,
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 0))))
+ .build();
private int mCasingAmount;
private int mCoilAmount;
@@ -89,16 +121,24 @@ public class GT_MetaTileEntity_LargeChemicalReactor
@Override
public GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Chemical Reactor").addInfo("Controller block for the Large Chemical Reactor")
- .addInfo("Does not lose efficiency when overclocked").addInfo("Accepts fluids instead of fluid cells")
- .addSeparator().beginStructureBlock(3, 3, 3, false).addController("Front center")
- .addCasingInfoRange("Chemically Inert Machine Casing", 8, 22, false)
- .addOtherStructurePart("PTFE Pipe Machine Casing", "Center")
- .addOtherStructurePart("Heating Coil", "Adjacent to the PTFE Pipe Machine Casing", 1)
- .addEnergyHatch("Any casing", 1, 2).addMaintenanceHatch("Any casing", 1, 2)
- .addInputBus("Any casing", 1, 2).addInputHatch("Any casing", 1, 2).addOutputBus("Any casing", 1, 2)
- .addOutputHatch("Any casing", 1, 2).addStructureInfo("You can have multiple hatches/busses")
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Chemical Reactor")
+ .addInfo("Controller block for the Large Chemical Reactor")
+ .addInfo("Does not lose efficiency when overclocked")
+ .addInfo("Accepts fluids instead of fluid cells")
+ .addSeparator()
+ .beginStructureBlock(3, 3, 3, false)
+ .addController("Front center")
+ .addCasingInfoRange("Chemically Inert Machine Casing", 8, 22, false)
+ .addOtherStructurePart("PTFE Pipe Machine Casing", "Center")
+ .addOtherStructurePart("Heating Coil", "Adjacent to the PTFE Pipe Machine Casing", 1)
+ .addEnergyHatch("Any casing", 1, 2)
+ .addMaintenanceHatch("Any casing", 1, 2)
+ .addInputBus("Any casing", 1, 2)
+ .addInputHatch("Any casing", 1, 2)
+ .addOutputBus("Any casing", 1, 2)
+ .addOutputHatch("Any casing", 1, 2)
+ .addStructureInfo("You can have multiple hatches/busses")
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -106,14 +146,26 @@ public class GT_MetaTileEntity_LargeChemicalReactor
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { casingTexturePages[1][48],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE_GLOW).extFacing()
- .glow().build() };
- return new ITexture[] { casingTexturePages[1][48],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_GLOW).extFacing().glow()
- .build() };
+ if (aActive) return new ITexture[] { casingTexturePages[1][48], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[1][48], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { casingTexturePages[1][48] };
}
@@ -159,7 +211,8 @@ public class GT_MetaTileEntity_LargeChemicalReactor
if (mLockedToSingleRecipe) {
// We're locked to a single recipe, but haven't built the recipe checker yet.
// Build the checker on next successful recipe.
- tSingleRecipeCheckBuilder = GT_Single_Recipe_Check.builder(this).setBefore();
+ tSingleRecipeCheckBuilder = GT_Single_Recipe_Check.builder(this)
+ .setBefore();
}
tRecipe = GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.findRecipe(
@@ -175,7 +228,9 @@ public class GT_MetaTileEntity_LargeChemicalReactor
}
if (mLockedToSingleRecipe) {
- mSingleRecipeCheck = tSingleRecipeCheckBuilder.setAfter().setRecipe(tRecipe).build();
+ mSingleRecipeCheck = tSingleRecipeCheckBuilder.setAfter()
+ .setRecipe(tRecipe)
+ .build();
}
}
@@ -288,8 +343,9 @@ public class GT_MetaTileEntity_LargeChemicalReactor
GT_MetaTileEntity_LargeChemicalReactor gt_metaTileEntity_largeChemicalReactor, World world, int x,
int y, int z, ItemStack trigger, AutoPlaceEnvironment env) {
return BlocksToPlace.create(
- IntStream.range(0, 8).mapToObj(i -> new ItemStack(GregTech_API.sBlockCasings5, 1, i))
- .collect(Collectors.toList()));
+ IntStream.range(0, 8)
+ .mapToObj(i -> new ItemStack(GregTech_API.sBlockCasings5, 1, i))
+ .collect(Collectors.toList()));
}
@Override
@@ -298,7 +354,8 @@ public class GT_MetaTileEntity_LargeChemicalReactor
if (t.mCoilAmount > 0) return PlaceResult.SKIP;
if (check(t, world, x, y, z)) return PlaceResult.SKIP;
if (!StructureLibAPI.isBlockTriviallyReplaceable(world, x, y, z, env.getActor())) return PlaceResult.REJECT;
- ItemStack result = env.getSource().takeOne(ItemStackPredicate.from(GregTech_API.sBlockCasings5), true);
+ ItemStack result = env.getSource()
+ .takeOne(ItemStackPredicate.from(GregTech_API.sBlockCasings5), true);
if (result == null) return PlaceResult.REJECT;
PlaceResult ret = StructureUtility.survivalPlaceBlock(
result,
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java
index 1c401a741e..38c3cc9af7 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java
@@ -49,24 +49,34 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends
@Override
protected IStructureDefinition<GT_MetaTileEntity_LargeTurbine> computeValue(Class<?> type) {
return StructureDefinition.<GT_MetaTileEntity_LargeTurbine>builder()
- .addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { " ", " ", " ", " ", " ", },
- { " --- ", " ccc ", " hhh ", " hhh ", " hhh ", },
- { " --- ", " c~c ", " h-h ", " h-h ", " hdh ", },
- { " --- ", " ccc ", " hhh ", " hhh ", " hhh ", },
- { " ", " ", " ", " ", " ", }, }))
- .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMeta())))
- .addElement('d', lazy(t -> Dynamo.newAny(t.getCasingTextureIndex(), 1)))
- .addElement(
- 'h',
- lazy(
- t -> buildHatchAdder(GT_MetaTileEntity_LargeTurbine.class)
- .atLeast(Maintenance, InputHatch, OutputHatch, OutputBus, InputBus, Muffler)
- .casingIndex(t.getCasingTextureIndex()).dot(2)
- .buildAndChain(t.getCasingBlock(), t.getCasingMeta())))
- .build();
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] { { " ", " ", " ", " ", " ", },
+ { " --- ", " ccc ", " hhh ", " hhh ", " hhh ", },
+ { " --- ", " c~c ", " h-h ", " h-h ", " hdh ", },
+ { " --- ", " ccc ", " hhh ", " hhh ", " hhh ", },
+ { " ", " ", " ", " ", " ", }, }))
+ .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMeta())))
+ .addElement('d', lazy(t -> Dynamo.newAny(t.getCasingTextureIndex(), 1)))
+ .addElement(
+ 'h',
+ lazy(
+ t -> buildHatchAdder(
+ GT_MetaTileEntity_LargeTurbine.class).atLeast(
+ Maintenance,
+ InputHatch,
+ OutputHatch,
+ OutputBus,
+ InputBus,
+ Muffler)
+ .casingIndex(
+ t.getCasingTextureIndex())
+ .dot(2)
+ .buildAndChain(
+ t.getCasingBlock(),
+ t.getCasingMeta())))
+ .build();
}
};
@@ -167,7 +177,8 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends
aX + tDirection.offsetX,
tY + tDirection.offsetY,
aZ + tDirection.offsetZ));
- tLighting.setupLighting(tBlock, tX, tY, tZ, tFacing).setupColor(tFacing, Dyes._NULL.mRGBa);
+ tLighting.setupLighting(tBlock, tX, tY, tZ, tFacing)
+ .setupColor(tFacing, Dyes._NULL.mRGBa);
GT_RenderUtil.renderBlockIcon(
aRenderer,
tBlock,
@@ -230,15 +241,18 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends
if (baseEff == 0 || optFlow == 0
|| counter >= 512
- || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled()
- || this.getBaseMetaTileEntity().hasInventoryBeenModified()) {
+ || this.getBaseMetaTileEntity()
+ .hasWorkJustBeenEnabled()
+ || this.getBaseMetaTileEntity()
+ .hasInventoryBeenModified()) {
counter = 0;
baseEff = GT_Utility.safeInt(
(long) ((5F + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolCombatDamage(aStack)) * 1000F));
optFlow = GT_Utility.safeInt(
(long) Math.max(
Float.MIN_NORMAL,
- ((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack).getSpeedMultiplier()
+ ((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack)
+ .getSpeedMultiplier()
* GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolSpeed
* 50));
@@ -368,8 +382,10 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends
long maxEnergy = 0;
for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) {
if (isValidMetaTileEntity(tHatch)) {
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
}
String[] ret = new String[] {
@@ -420,7 +436,9 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends
+ EnumChatFormatting.RESET
+ " %" /* 8 */
};
- if (!this.getClass().getName().contains("Steam"))
+ if (!this.getClass()
+ .getName()
+ .contains("Steam"))
ret[4] = StatCollector.translateToLocal("GT5U.turbine.flow") + ": "
+ EnumChatFormatting.YELLOW
+ GT_Utility.safeInt((long) realOptFlow)
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java
index 99eb312b76..3acf460d3f 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java
@@ -32,27 +32,38 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
- return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1],
- aFacing == aSide
- ? (aActive ? TextureFactory.builder().addIcon(LARGETURBINE_NEW_ACTIVE5).build()
- : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_NEW5).build()
- : TextureFactory.builder().addIcon(LARGETURBINE_NEW_EMPTY5).build())
+ return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1], aFacing
+ == aSide ? (aActive ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_ACTIVE5)
+ .build()
+ : hasTurbine() ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW5)
+ .build()
+ : TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_EMPTY5)
+ .build())
: casingTexturePages[0][58] };
}
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Gas Turbine").addInfo("Controller block for the Large Gas Turbine")
- .addInfo("Needs a Turbine, place inside controller")
- .addInfo("Warning: Will be capped at 8192 EU/t in a future update")
- .addInfo("See the Advanced Large Gas Turbine as the next, uncapped, option")
- // .addInfo("The excess fuel that gets consumed will be voided!")
- .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 4, true)
- .addController("Front center").addCasingInfoRange("Stainless Steel Turbine Casing", 8, 30, false)
- .addDynamoHatch("Back center", 1).addMaintenanceHatch("Side centered", 2)
- .addMufflerHatch("Side centered", 2).addInputHatch("Gas Fuel, Side centered", 2)
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Gas Turbine")
+ .addInfo("Controller block for the Large Gas Turbine")
+ .addInfo("Needs a Turbine, place inside controller")
+ .addInfo("Warning: Will be capped at 8192 EU/t in a future update")
+ .addInfo("See the Advanced Large Gas Turbine as the next, uncapped, option")
+ // .addInfo("The excess fuel that gets consumed will be voided!")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(3, 3, 4, true)
+ .addController("Front center")
+ .addCasingInfoRange("Stainless Steel Turbine Casing", 8, 30, false)
+ .addDynamoHatch("Back center", 1)
+ .addMaintenanceHatch("Side centered", 2)
+ .addMufflerHatch("Side centered", 2)
+ .addInputHatch("Gas Fuel, Side centered", 2)
+ .toolTipFinisher("Gregtech");
return tt;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_GasAdvanced.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_GasAdvanced.java
index f1a7427463..54787a1914 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_GasAdvanced.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_GasAdvanced.java
@@ -32,26 +32,38 @@ public class GT_MetaTileEntity_LargeTurbine_GasAdvanced extends GT_MetaTileEntit
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
- return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1],
- aFacing == aSide
- ? (aActive ? TextureFactory.builder().addIcon(LARGETURBINE_NEW_ACTIVE5).build()
- : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_NEW5).build()
- : TextureFactory.builder().addIcon(LARGETURBINE_NEW_EMPTY5).build())
+ return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1], aFacing
+ == aSide ? (aActive ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_ACTIVE5)
+ .build()
+ : hasTurbine() ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW5)
+ .build()
+ : TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_EMPTY5)
+ .build())
: casingTexturePages[1][57] };
}
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Gas Turbine").addInfo("Warning: This is an experimental multiblock, subject to changes ")
- .addInfo("Controller block for the Large Advanced Gas Turbine")
- .addInfo("Needs a Turbine, place inside controller").addInfo("Only accepts gases above 800k EU/bucket")
- .addInfo("Has no maximum EU/t output, only depends on the Dynamo Hatch")
- .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 4, true)
- .addController("Front center").addCasingInfoRange("Advanced Gas Turbine Casing", 8, 30, false)
- .addDynamoHatch("Back center", 1).addMaintenanceHatch("Side centered", 2)
- .addMufflerHatch("Side centered", 2).addInputHatch("Gas Fuel, Side centered", 2)
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Gas Turbine")
+ .addInfo("Warning: This is an experimental multiblock, subject to changes ")
+ .addInfo("Controller block for the Large Advanced Gas Turbine")
+ .addInfo("Needs a Turbine, place inside controller")
+ .addInfo("Only accepts gases above 800k EU/bucket")
+ .addInfo("Has no maximum EU/t output, only depends on the Dynamo Hatch")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(3, 3, 4, true)
+ .addController("Front center")
+ .addCasingInfoRange("Advanced Gas Turbine Casing", 8, 30, false)
+ .addDynamoHatch("Back center", 1)
+ .addMaintenanceHatch("Side centered", 2)
+ .addMufflerHatch("Side centered", 2)
+ .addInputHatch("Gas Fuel, Side centered", 2)
+ .toolTipFinisher("Gregtech");
return tt;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java
index d6e2f16a3d..ef288cf1ec 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java
@@ -38,25 +38,37 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
- return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1],
- aFacing == aSide
- ? (aActive ? TextureFactory.builder().addIcon(LARGETURBINE_NEW_ACTIVE5).build()
- : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_NEW5).build()
- : TextureFactory.builder().addIcon(LARGETURBINE_NEW_EMPTY5).build())
+ return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1], aFacing
+ == aSide ? (aActive ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_ACTIVE5)
+ .build()
+ : hasTurbine() ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW5)
+ .build()
+ : TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_EMPTY5)
+ .build())
: casingTexturePages[0][59] };
}
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Steam Turbine").addInfo("Controller block for the Large High Pressure Steam Turbine")
- .addInfo("Needs a Turbine, place inside controller").addInfo("Outputs Steam as well as producing power")
- .addInfo("Power output depends on turbine and fitting")
- .addInfo("Use screwdriver to adjust fitting of turbine").addSeparator()
- .beginStructureBlock(3, 3, 4, true).addController("Front center")
- .addCasingInfoRange("Titanium Turbine Casing", 8, 31, false).addDynamoHatch("Back center", 1)
- .addMaintenanceHatch("Side centered", 2).addInputHatch("Superheated Steam, Side centered", 2)
- .addOutputHatch("Steam, Side centered", 2).toolTipFinisher("Gregtech");
+ tt.addMachineType("Steam Turbine")
+ .addInfo("Controller block for the Large High Pressure Steam Turbine")
+ .addInfo("Needs a Turbine, place inside controller")
+ .addInfo("Outputs Steam as well as producing power")
+ .addInfo("Power output depends on turbine and fitting")
+ .addInfo("Use screwdriver to adjust fitting of turbine")
+ .addSeparator()
+ .beginStructureBlock(3, 3, 4, true)
+ .addController("Front center")
+ .addCasingInfoRange("Titanium Turbine Casing", 8, 31, false)
+ .addDynamoHatch("Back center", 1)
+ .addMaintenanceHatch("Side centered", 2)
+ .addInputHatch("Superheated Steam, Side centered", 2)
+ .addOutputHatch("Steam, Side centered", 2)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -121,8 +133,11 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La
if (!achievement) {
try {
GT_Mod.achievements.issueAchievement(
- this.getBaseMetaTileEntity().getWorld()
- .getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()),
+ this.getBaseMetaTileEntity()
+ .getWorld()
+ .getPlayerEntityByName(
+ this.getBaseMetaTileEntity()
+ .getOwnerName()),
"efficientsteam");
} catch (Exception ignored) {}
achievement = true;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java
index d778abbc36..22681138ea 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java
@@ -38,24 +38,35 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
- return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1],
- aFacing == aSide
- ? (aActive ? TextureFactory.builder().addIcon(LARGETURBINE_NEW_ACTIVE5).build()
- : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_NEW5).build()
- : TextureFactory.builder().addIcon(LARGETURBINE_NEW_EMPTY5).build())
+ return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1], aFacing
+ == aSide ? (aActive ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_ACTIVE5)
+ .build()
+ : hasTurbine() ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW5)
+ .build()
+ : TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_EMPTY5)
+ .build())
: casingTexturePages[0][60] };
}
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Plasma Turbine").addInfo("Controller block for the Large Plasma Generator")
- .addInfo("Needs a Turbine, place inside controller")
- .addInfo("Use your Fusion Reactor to produce the Plasma").addSeparator()
- .beginStructureBlock(3, 3, 4, true).addController("Front center")
- .addCasingInfoRange("Tungstensteel Turbine Casing", 8, 31, false).addDynamoHatch("Back center", 1)
- .addMaintenanceHatch("Side centered", 2).addInputHatch("Plasma Fluid, Side centered", 2)
- .addOutputHatch("Molten Fluid, optional, Side centered", 2).toolTipFinisher("Gregtech");
+ tt.addMachineType("Plasma Turbine")
+ .addInfo("Controller block for the Large Plasma Generator")
+ .addInfo("Needs a Turbine, place inside controller")
+ .addInfo("Use your Fusion Reactor to produce the Plasma")
+ .addSeparator()
+ .beginStructureBlock(3, 3, 4, true)
+ .addController("Front center")
+ .addCasingInfoRange("Tungstensteel Turbine Casing", 8, 31, false)
+ .addDynamoHatch("Back center", 1)
+ .addMaintenanceHatch("Side centered", 2)
+ .addInputHatch("Plasma Fluid, Side centered", 2)
+ .addOutputHatch("Molten Fluid, optional, Side centered", 2)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -103,8 +114,8 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
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 * flowMultipliers[2] / (double) fuelValue));
+ actualOptimalFlow = GT_Utility.safeInt(
+ (long) Math.ceil((double) aOptFlow * flowMultipliers[2] / (double) fuelValue));
this.realOptFlow = actualOptimalFlow; // For scanner info
// Allowed to use up to 550% optimal flow rate, depending on the value of overflowMultiplier.
@@ -199,17 +210,20 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
if (!tFluids.isEmpty()) {
if (baseEff == 0 || optFlow == 0
|| counter >= 512
- || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled()
- || this.getBaseMetaTileEntity().hasInventoryBeenModified()) {
+ || this.getBaseMetaTileEntity()
+ .hasWorkJustBeenEnabled()
+ || this.getBaseMetaTileEntity()
+ .hasInventoryBeenModified()) {
counter = 0;
baseEff = GT_Utility.safeInt(
(long) ((5F + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolCombatDamage(aStack)) * 1000F));
optFlow = GT_Utility.safeInt(
(long) Math.max(
Float.MIN_NORMAL,
- ((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack).getSpeedMultiplier()
- * ((GT_MetaGenerated_Tool) aStack.getItem())
- .getPrimaryMaterial(aStack).mToolSpeed
+ ((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack)
+ .getSpeedMultiplier()
+ * ((GT_MetaGenerated_Tool) aStack.getItem()).getPrimaryMaterial(
+ aStack).mToolSpeed
* 50));
overflowMultiplier = getOverflowMultiplier(aStack);
@@ -288,8 +302,10 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
long maxEnergy = 0;
for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) {
if (isValidMetaTileEntity(tHatch)) {
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
}
String[] ret = new String[] {
@@ -340,7 +356,9 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
+ EnumChatFormatting.RESET
+ " %" /* 8 */
};
- if (!this.getClass().getName().contains("Steam"))
+ if (!this.getClass()
+ .getName()
+ .contains("Steam"))
ret[4] = StatCollector.translateToLocal("GT5U.turbine.flow") + ": "
+ EnumChatFormatting.YELLOW
+ GT_Utility.safeInt((long) realOptFlow)
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java
index 3ccc635d92..1f5c7a5bb6 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java
@@ -39,26 +39,37 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
- return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1],
- aFacing == aSide
- ? (aActive ? TextureFactory.builder().addIcon(LARGETURBINE_NEW_ACTIVE5).build()
- : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_NEW5).build()
- : TextureFactory.builder().addIcon(LARGETURBINE_NEW_EMPTY5).build())
+ return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1], aFacing
+ == aSide ? (aActive ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_ACTIVE5)
+ .build()
+ : hasTurbine() ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW5)
+ .build()
+ : TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_EMPTY5)
+ .build())
: casingTexturePages[0][57] };
}
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Steam Turbine").addInfo("Controller block for the Large Steam Turbine")
- .addInfo("Needs a Turbine, place inside controller")
- .addInfo("Outputs Distilled Water as well as producing power")
- .addInfo("Power output depends on turbine and fitting")
- .addInfo("Use screwdriver to adjust fitting of turbine").addSeparator()
- .beginStructureBlock(3, 3, 4, true).addController("Front center")
- .addCasingInfoRange("Turbine Casing", 8, 31, false).addDynamoHatch("Back center", 1)
- .addMaintenanceHatch("Side centered", 2).addInputHatch("Steam, Side centered", 2)
- .addOutputHatch("Distilled Water, Side centered", 2).toolTipFinisher("Gregtech");
+ tt.addMachineType("Steam Turbine")
+ .addInfo("Controller block for the Large Steam Turbine")
+ .addInfo("Needs a Turbine, place inside controller")
+ .addInfo("Outputs Distilled Water as well as producing power")
+ .addInfo("Power output depends on turbine and fitting")
+ .addInfo("Use screwdriver to adjust fitting of turbine")
+ .addSeparator()
+ .beginStructureBlock(3, 3, 4, true)
+ .addController("Front center")
+ .addCasingInfoRange("Turbine Casing", 8, 31, false)
+ .addDynamoHatch("Back center", 1)
+ .addMaintenanceHatch("Side centered", 2)
+ .addInputHatch("Steam, Side centered", 2)
+ .addOutputHatch("Distilled Water, Side centered", 2)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -130,8 +141,11 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg
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;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java
index 95825c9eb0..0d90438020 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java
@@ -49,28 +49,50 @@ public class GT_MetaTileEntity_MultiFurnace extends
private static final int CASING_INDEX = 11;
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_MetaTileEntity_MultiFurnace> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_MultiFurnace>builder()
- .addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { "ccc", "cmc", "ccc" }, { "CCC", "C-C", "CCC" },
- { "b~b", "bbb", "bbb" } }))
- .addElement('c', ofBlock(GregTech_API.sBlockCasings1, CASING_INDEX))
- .addElement('m', Muffler.newAny(CASING_INDEX, 2))
- .addElement(
- 'C',
- GT_StructureUtility.ofCoil(
- GT_MetaTileEntity_MultiFurnace::setCoilLevel,
- GT_MetaTileEntity_MultiFurnace::getCoilLevel))
- .addElement(
- 'b',
- ofChain(
- GT_StructureUtility.<GT_MetaTileEntity_MultiFurnace>buildHatchAdder()
- .atLeast(Maintenance, InputBus, OutputBus, Energy).casingIndex(CASING_INDEX).dot(1)
- .build(),
- ofBlock(GregTech_API.sBlockCasings1, CASING_INDEX)))
- .build();
+ private static final IStructureDefinition<GT_MetaTileEntity_MultiFurnace> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_MultiFurnace>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] {
+ { "ccc", "cmc",
+ "ccc" },
+ { "CCC", "C-C",
+ "CCC" },
+ { "b~b", "bbb",
+ "bbb" } }))
+ .addElement(
+ 'c',
+ ofBlock(
+ GregTech_API.sBlockCasings1,
+ CASING_INDEX))
+ .addElement(
+ 'm',
+ Muffler.newAny(
+ CASING_INDEX,
+ 2))
+ .addElement(
+ 'C',
+ GT_StructureUtility.ofCoil(
+ GT_MetaTileEntity_MultiFurnace::setCoilLevel,
+ GT_MetaTileEntity_MultiFurnace::getCoilLevel))
+ .addElement(
+ 'b',
+ ofChain(
+ GT_StructureUtility.<GT_MetaTileEntity_MultiFurnace>buildHatchAdder()
+ .atLeast(
+ Maintenance,
+ InputBus,
+ OutputBus,
+ Energy)
+ .casingIndex(
+ CASING_INDEX)
+ .dot(
+ 1)
+ .build(),
+ ofBlock(
+ GregTech_API.sBlockCasings1,
+ CASING_INDEX)))
+ .build();
public GT_MetaTileEntity_MultiFurnace(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
@@ -88,13 +110,22 @@ public class GT_MetaTileEntity_MultiFurnace extends
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Furnace").addInfo("Controller Block for the Multi Smelter")
- .addInfo("Smelts up to 8-8192 items at once").addInfo("Items smelted increases with coil tier")
- .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 3, true)
- .addController("Front bottom").addCasingInfoRange("Heat Proof Machine Casing", 8, 14, false)
- .addOtherStructurePart("Heating Coils", "Middle layer").addEnergyHatch("Any bottom casing", 1)
- .addMaintenanceHatch("Any bottom casing", 1).addMufflerHatch("Top Middle", 2)
- .addInputBus("Any bottom casing", 1).addOutputBus("Any bottom casing", 1).toolTipFinisher("Gregtech");
+ tt.addMachineType("Furnace")
+ .addInfo("Controller Block for the Multi Smelter")
+ .addInfo("Smelts up to 8-8192 items at once")
+ .addInfo("Items smelted increases with coil tier")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(3, 3, 3, true)
+ .addController("Front bottom")
+ .addCasingInfoRange("Heat Proof Machine Casing", 8, 14, false)
+ .addOtherStructurePart("Heating Coils", "Middle layer")
+ .addEnergyHatch("Any bottom casing", 1)
+ .addMaintenanceHatch("Any bottom casing", 1)
+ .addMufflerHatch("Top Middle", 2)
+ .addInputBus("Any bottom casing", 1)
+ .addOutputBus("Any bottom casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -102,12 +133,25 @@ public class GT_MetaTileEntity_MultiFurnace extends
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide != aFacing) return new ITexture[] { casingTexturePages[0][CASING_INDEX] };
- if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_MULTI_SMELTER_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_MULTI_SMELTER_ACTIVE_GLOW).extFacing().glow().build() };
- return new ITexture[] { casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_MULTI_SMELTER).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_MULTI_SMELTER_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_MULTI_SMELTER_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_MULTI_SMELTER_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_MULTI_SMELTER)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_MULTI_SMELTER_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
@Override
@@ -214,7 +258,7 @@ public class GT_MetaTileEntity_MultiFurnace extends
if (tUsedMeta >= 12 && tUsedMeta <= 14
&& aBaseMetaTileEntity.getBlock(xPos, tY + 1, zPos) == GregTech_API.sBlockCasings1)
aBaseMetaTileEntity.getWorld()
- .setBlock(xPos, tY + 1, zPos, GregTech_API.sBlockCasings5, tUsedMeta - 12, 3);
+ .setBlock(xPos, tY + 1, zPos, GregTech_API.sBlockCasings5, tUsedMeta - 12, 3);
}
}
@@ -227,8 +271,10 @@ public class GT_MetaTileEntity_MultiFurnace extends
long storedEnergy = 0;
long maxEnergy = 0;
for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) if (isValidMetaTileEntity(tHatch)) {
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
return new String[] {
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_NanoForge.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_NanoForge.java
index 4a872e3833..4887c95930 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_NanoForge.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_NanoForge.java
@@ -51,9 +51,8 @@ public class GT_MetaTileEntity_NanoForge extends
private static final String STRUCTURE_PIECE_MAIN = "main";
private static final String STRUCTURE_PIECE_TIER2 = "tier2";
private static final String STRUCTURE_PIECE_TIER3 = "tier3";
- private static final IStructureDefinition<GT_MetaTileEntity_NanoForge> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_NanoForge>builder()
- // spotless:off
+ private static final IStructureDefinition<GT_MetaTileEntity_NanoForge> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_NanoForge>builder()
+ // spotless:off
.addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] {
{" "," "," F "," C "," C "," C "," C "," F "," "," "},
{" "," "," F "," C "," C "," C "," C "," F "," "," "},
@@ -141,15 +140,39 @@ public class GT_MetaTileEntity_NanoForge extends
{" CCCCCC ", "CCCCCCCC", "CCCCCCCC", "CCCCCCCC", "CCCCCCCC", "CCCCCCCC", "CCCCCCCC", " CCCCCC "}
}))
//spotless:on
- .addElement('F', ofFrame(Materials.StellarAlloy)).addElement('C', ofBlock(GregTech_API.sBlockCasings8, 10))
- .addElement('A', ofBlock(GregTech_API.sBlockCasings2, 5))
- .addElement(
- 'B',
- buildHatchAdder(GT_MetaTileEntity_NanoForge.class)
- .atLeast(InputHatch, OutputBus, InputBus, Maintenance, Energy.or(ExoticEnergy)).dot(1)
- .casingIndex(((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(10))
- .buildAndChain(GregTech_API.sBlockCasings8, 10))
- .build();
+ .addElement(
+ 'F',
+ ofFrame(
+ Materials.StellarAlloy))
+ .addElement(
+ 'C',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 10))
+ .addElement(
+ 'A',
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 5))
+ .addElement(
+ 'B',
+ buildHatchAdder(
+ GT_MetaTileEntity_NanoForge.class).atLeast(
+ InputHatch,
+ OutputBus,
+ InputBus,
+ Maintenance,
+ Energy.or(
+ ExoticEnergy))
+ .dot(
+ 1)
+ .casingIndex(
+ ((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(
+ 10))
+ .buildAndChain(
+ GregTech_API.sBlockCasings8,
+ 10))
+ .build();
private byte mSpecialTier = 0;
public GT_MetaTileEntity_NanoForge(int aID, String aName, String aNameRegional) {
@@ -187,13 +210,26 @@ public class GT_MetaTileEntity_NanoForge extends
if (aSide == aFacing) {
if (aActive) return new ITexture[] {
BlockIcons.getCasingTextureForId(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 10)),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW).extFacing().glow()
- .build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
return new ITexture[] {
BlockIcons.getCasingTextureForId(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 10)),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW).extFacing().glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] {
BlockIcons.getCasingTextureForId(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 10)) };
@@ -235,8 +271,15 @@ public class GT_MetaTileEntity_NanoForge extends
mOutputItems = null;
mOutputFluids = null;
long tTotalEU = getMaxInputEu();
- GT_Recipe tRecipe = map
- .findRecipe(getBaseMetaTileEntity(), null, false, false, tTotalEU, tFluidInputs, null, tItemInputs);
+ GT_Recipe tRecipe = map.findRecipe(
+ getBaseMetaTileEntity(),
+ null,
+ false,
+ false,
+ tTotalEU,
+ tFluidInputs,
+ null,
+ tItemInputs);
if (tRecipe == null) return false;
@@ -362,100 +405,112 @@ public class GT_MetaTileEntity_NanoForge extends
@Override
public IAlignmentLimits getAlignmentLimits() {
// The nano forge should only be buildable upright
- return IAlignmentLimits.Builder.allowAll().deny(ForgeDirection.DOWN).deny(ForgeDirection.UP)
- .deny(Rotation.UPSIDE_DOWN).deny(Rotation.CLOCKWISE).deny(Rotation.COUNTER_CLOCKWISE).build();
+ return IAlignmentLimits.Builder.allowAll()
+ .deny(ForgeDirection.DOWN)
+ .deny(ForgeDirection.UP)
+ .deny(Rotation.UPSIDE_DOWN)
+ .deny(Rotation.CLOCKWISE)
+ .deny(Rotation.COUNTER_CLOCKWISE)
+ .build();
}
@Override
protected void drawTexts(DynamicPositionedColumn screenElements, SlotWidget inventorySlot) {
super.drawTexts(screenElements, inventorySlot);
screenElements.widget(
- new TextWidget(StatCollector.translateToLocal("GT5U.gui.button.tier") + " " + mSpecialTier)
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0))
- .widget(
- new FakeSyncWidget.IntegerSyncer(
- () -> (int) mSpecialTier,
- val -> mSpecialTier = (byte) (val % Byte.MAX_VALUE)));
+ new TextWidget(
+ StatCollector.translateToLocal("GT5U.gui.button.tier") + " " + mSpecialTier).setDefaultColor(
+ COLOR_TEXT_WHITE.get())
+ .setEnabled(
+ widget -> getBaseMetaTileEntity().getErrorDisplayID()
+ == 0))
+ .widget(
+ new FakeSyncWidget.IntegerSyncer(
+ () -> (int) mSpecialTier,
+ val -> mSpecialTier = (byte) (val % Byte.MAX_VALUE)));
}
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Nanite Fabricator").addInfo("Controller block for the Nano Forge")
- .addInfo("Requires insane amounts of power to create nanites. Each tier")
- .addInfo("the multi gains a new building next to it. The nanite in the")
- .addInfo("controller slot controls the tier.").addInfo("--------------------------------------------")
- .addInfo("Requires a Carbon Nanite to use tier " + EnumChatFormatting.DARK_PURPLE + 1)
- .addInfo("Requires a Neutronium Nanite to use tier " + EnumChatFormatting.DARK_PURPLE + 2)
- .addInfo("Requires a Transcendent Metal Nanite to use tier " + EnumChatFormatting.DARK_PURPLE + 3)
- .addInfo("--------------------------------------------")
- .addInfo("If a recipe's tier is lower than the tier of the Nano Forge")
- .addInfo("it gains " + EnumChatFormatting.RED + "perfect overclock" + EnumChatFormatting.GRAY + ".")
- .addInfo(AuthorBlueWeabo).addSeparator().beginStructureBlock(30, 38, 13, false)
- .addStructureInfo("Nano Forge Structure is too complex! See schematic for details.")
- .addStructureInfo("--------------------------------------------")
- .addStructureInfo("Tier " + EnumChatFormatting.DARK_PURPLE + 1 + EnumChatFormatting.GRAY)
- .addStructureInfo(
- EnumChatFormatting.GOLD + "527" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "171" + EnumChatFormatting.GRAY + " Stellar Alloy Frame Box")
- .addStructureInfo("--------------------------------------------")
- .addStructureInfo("Tier " + EnumChatFormatting.DARK_PURPLE + 2 + EnumChatFormatting.GRAY)
- .addStructureInfo(
- EnumChatFormatting.GOLD + "148" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
- .addStructureInfo(EnumChatFormatting.GOLD + "16" + EnumChatFormatting.GRAY + " Assembling Line Casing")
- .addStructureInfo("--------------------------------------------")
- .addStructureInfo("Tier " + EnumChatFormatting.DARK_PURPLE + 3 + EnumChatFormatting.GRAY)
- .addStructureInfo(
- EnumChatFormatting.GOLD + "228" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
- .addStructureInfo(EnumChatFormatting.GOLD + "84" + EnumChatFormatting.GRAY + " Stellar Alloy Frame Box")
- .addStructureInfo(EnumChatFormatting.GOLD + "16" + EnumChatFormatting.GRAY + " Assembling Line Casing")
- .addStructureInfo("--------------------------------------------")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + "1"
- + EnumChatFormatting.GRAY
- + "-"
- + EnumChatFormatting.GOLD
- + "2"
- + EnumChatFormatting.GRAY
- + " energy hatches or "
- + EnumChatFormatting.GOLD
- + "1"
- + EnumChatFormatting.GRAY
- + " TT energy hatch.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " maintenance hatch.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + 1
- + EnumChatFormatting.GRAY
- + "+"
- + EnumChatFormatting.GRAY
- + " input hatches.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + 0
- + EnumChatFormatting.GRAY
- + "+"
- + EnumChatFormatting.GRAY
- + " output hatches.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + 1
- + EnumChatFormatting.GRAY
- + "+"
- + EnumChatFormatting.GRAY
- + " input busses.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + 1
- + EnumChatFormatting.GRAY
- + "+"
- + EnumChatFormatting.GRAY
- + " output busses.")
- .addStructureInfo("--------------------------------------------").toolTipFinisher("GregTech");
+ tt.addMachineType("Nanite Fabricator")
+ .addInfo("Controller block for the Nano Forge")
+ .addInfo("Requires insane amounts of power to create nanites. Each tier")
+ .addInfo("the multi gains a new building next to it. The nanite in the")
+ .addInfo("controller slot controls the tier.")
+ .addInfo("--------------------------------------------")
+ .addInfo("Requires a Carbon Nanite to use tier " + EnumChatFormatting.DARK_PURPLE + 1)
+ .addInfo("Requires a Neutronium Nanite to use tier " + EnumChatFormatting.DARK_PURPLE + 2)
+ .addInfo("Requires a Transcendent Metal Nanite to use tier " + EnumChatFormatting.DARK_PURPLE + 3)
+ .addInfo("--------------------------------------------")
+ .addInfo("If a recipe's tier is lower than the tier of the Nano Forge")
+ .addInfo("it gains " + EnumChatFormatting.RED + "perfect overclock" + EnumChatFormatting.GRAY + ".")
+ .addInfo(AuthorBlueWeabo)
+ .addSeparator()
+ .beginStructureBlock(30, 38, 13, false)
+ .addStructureInfo("Nano Forge Structure is too complex! See schematic for details.")
+ .addStructureInfo("--------------------------------------------")
+ .addStructureInfo("Tier " + EnumChatFormatting.DARK_PURPLE + 1 + EnumChatFormatting.GRAY)
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "527" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "171" + EnumChatFormatting.GRAY + " Stellar Alloy Frame Box")
+ .addStructureInfo("--------------------------------------------")
+ .addStructureInfo("Tier " + EnumChatFormatting.DARK_PURPLE + 2 + EnumChatFormatting.GRAY)
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "148" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "16" + EnumChatFormatting.GRAY + " Assembling Line Casing")
+ .addStructureInfo("--------------------------------------------")
+ .addStructureInfo("Tier " + EnumChatFormatting.DARK_PURPLE + 3 + EnumChatFormatting.GRAY)
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "228" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "84" + EnumChatFormatting.GRAY + " Stellar Alloy Frame Box")
+ .addStructureInfo(EnumChatFormatting.GOLD + "16" + EnumChatFormatting.GRAY + " Assembling Line Casing")
+ .addStructureInfo("--------------------------------------------")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + "1"
+ + EnumChatFormatting.GRAY
+ + "-"
+ + EnumChatFormatting.GOLD
+ + "2"
+ + EnumChatFormatting.GRAY
+ + " energy hatches or "
+ + EnumChatFormatting.GOLD
+ + "1"
+ + EnumChatFormatting.GRAY
+ + " TT energy hatch.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " maintenance hatch.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + 1
+ + EnumChatFormatting.GRAY
+ + "+"
+ + EnumChatFormatting.GRAY
+ + " input hatches.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + 0
+ + EnumChatFormatting.GRAY
+ + "+"
+ + EnumChatFormatting.GRAY
+ + " output hatches.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + 1
+ + EnumChatFormatting.GRAY
+ + "+"
+ + EnumChatFormatting.GRAY
+ + " input busses.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + 1
+ + EnumChatFormatting.GRAY
+ + "+"
+ + EnumChatFormatting.GRAY
+ + " output busses.")
+ .addStructureInfo("--------------------------------------------")
+ .toolTipFinisher("GregTech");
return tt;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java
index f2be5d276d..c35f387fd1 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java
@@ -42,52 +42,82 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult
private static final byte CASING_INDEX = 49;
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_MetaTileEntity_OilCracker> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_OilCracker>builder()
- .addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { "lcmcr", "lcmcr", "lcmcr" }, { "lc~cr", "l---r", "lcmcr" },
- { "lcmcr", "lcmcr", "lcmcr" }, }))
- .addElement(
- 'c',
- ofCoil(GT_MetaTileEntity_OilCracker::setCoilLevel, GT_MetaTileEntity_OilCracker::getCoilLevel))
- .addElement(
- 'l',
- buildHatchAdder(GT_MetaTileEntity_OilCracker.class).atLeast(
- GT_HatchElement.InputHatch
- .withAdder(GT_MetaTileEntity_OilCracker::addLeftHatchToMachineList),
- GT_HatchElement.Energy,
- GT_HatchElement.Maintenance).dot(2).casingIndex(CASING_INDEX).buildAndChain(
- onElementPass(
- GT_MetaTileEntity_OilCracker::onCasingAdded,
- ofBlock(GregTech_API.sBlockCasings4, 1))))
- .addElement(
- 'r',
- buildHatchAdder(GT_MetaTileEntity_OilCracker.class).atLeast(
- GT_HatchElement.OutputHatch
- .withAdder(GT_MetaTileEntity_OilCracker::addRightHatchToMachineList),
- GT_HatchElement.Energy,
- GT_HatchElement.Maintenance).dot(3).casingIndex(CASING_INDEX).buildAndChain(
- onElementPass(
- GT_MetaTileEntity_OilCracker::onCasingAdded,
- ofBlock(GregTech_API.sBlockCasings4, 1))))
- .addElement(
- 'm',
- buildHatchAdder(
- GT_MetaTileEntity_OilCracker.class)
- .atLeast(
- GT_HatchElement.InputHatch
- .withAdder(
- GT_MetaTileEntity_OilCracker::addMiddleInputToMachineList)
- .withCount(t -> t.mMiddleInputHatches.size()),
- GT_HatchElement.Energy,
- GT_HatchElement.Maintenance)
- .dot(1).casingIndex(CASING_INDEX).buildAndChain(
- onElementPass(
- GT_MetaTileEntity_OilCracker::onCasingAdded,
- ofBlock(GregTech_API.sBlockCasings4, 1))))
- .build();
+ private static final IStructureDefinition<GT_MetaTileEntity_OilCracker> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_OilCracker>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] {
+ { "lcmcr",
+ "lcmcr",
+ "lcmcr" },
+ { "lc~cr",
+ "l---r",
+ "lcmcr" },
+ { "lcmcr",
+ "lcmcr",
+ "lcmcr" }, }))
+ .addElement(
+ 'c',
+ ofCoil(
+ GT_MetaTileEntity_OilCracker::setCoilLevel,
+ GT_MetaTileEntity_OilCracker::getCoilLevel))
+ .addElement(
+ 'l',
+ buildHatchAdder(
+ GT_MetaTileEntity_OilCracker.class).atLeast(
+ GT_HatchElement.InputHatch.withAdder(
+ GT_MetaTileEntity_OilCracker::addLeftHatchToMachineList),
+ GT_HatchElement.Energy,
+ GT_HatchElement.Maintenance)
+ .dot(
+ 2)
+ .casingIndex(
+ CASING_INDEX)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_OilCracker::onCasingAdded,
+ ofBlock(
+ GregTech_API.sBlockCasings4,
+ 1))))
+ .addElement(
+ 'r',
+ buildHatchAdder(
+ GT_MetaTileEntity_OilCracker.class).atLeast(
+ GT_HatchElement.OutputHatch.withAdder(
+ GT_MetaTileEntity_OilCracker::addRightHatchToMachineList),
+ GT_HatchElement.Energy,
+ GT_HatchElement.Maintenance)
+ .dot(
+ 3)
+ .casingIndex(
+ CASING_INDEX)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_OilCracker::onCasingAdded,
+ ofBlock(
+ GregTech_API.sBlockCasings4,
+ 1))))
+ .addElement(
+ 'm',
+ buildHatchAdder(
+ GT_MetaTileEntity_OilCracker.class).atLeast(
+ GT_HatchElement.InputHatch.withAdder(
+ GT_MetaTileEntity_OilCracker::addMiddleInputToMachineList)
+ .withCount(
+ t -> t.mMiddleInputHatches.size()),
+ GT_HatchElement.Energy,
+ GT_HatchElement.Maintenance)
+ .dot(
+ 1)
+ .casingIndex(
+ CASING_INDEX)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_OilCracker::onCasingAdded,
+ ofBlock(
+ GregTech_API.sBlockCasings4,
+ 1))))
+ .build();
private HeatingCoilLevel heatLevel;
protected final List<GT_MetaTileEntity_Hatch_Input> mMiddleInputHatches = new ArrayList<>();
// 0 -> left, 1 -> right, any other -> not found
@@ -106,23 +136,29 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Cracker").addInfo("Controller block for the Oil Cracking Unit")
- .addInfo("Thermally cracks heavy hydrocarbons into lighter fractions")
- .addInfo("More efficient than the Chemical Reactor")
- .addInfo("Gives different benefits whether it hydro or steam-cracks:")
- .addInfo("Hydro - Consumes 20% less Hydrogen and outputs 25% more cracked fluid")
- .addInfo("Steam - Outputs 50% more cracked fluid")
- .addInfo("(Values compared to cracking in the Chemical Reactor)")
- .addInfo("Place the appropriate circuit in the controller").addSeparator()
- .beginStructureBlock(5, 3, 3, true).addController("Front center")
- .addCasingInfoRange("Clean Stainless Steel Machine Casing", 18, 21, false)
- .addOtherStructurePart("2 Rings of 8 Coils", "Each side of the controller")
- .addInfo("Gets 10% EU/t reduction per coil tier, up to a maximum of 50%")
- .addEnergyHatch("Any casing", 1, 2, 3).addMaintenanceHatch("Any casing", 1, 2, 3)
- .addInputHatch("Steam/Hydrogen ONLY, Any middle ring casing", 1)
- .addInputHatch("Any left/right side casing", 2, 3).addOutputHatch("Any right/left side casing", 2, 3)
- .addStructureInfo("Input/Output Hatches must be on opposite sides!")
- .addStructureHint("GT5U.cracker.io_side").toolTipFinisher("Gregtech");
+ tt.addMachineType("Cracker")
+ .addInfo("Controller block for the Oil Cracking Unit")
+ .addInfo("Thermally cracks heavy hydrocarbons into lighter fractions")
+ .addInfo("More efficient than the Chemical Reactor")
+ .addInfo("Gives different benefits whether it hydro or steam-cracks:")
+ .addInfo("Hydro - Consumes 20% less Hydrogen and outputs 25% more cracked fluid")
+ .addInfo("Steam - Outputs 50% more cracked fluid")
+ .addInfo("(Values compared to cracking in the Chemical Reactor)")
+ .addInfo("Place the appropriate circuit in the controller")
+ .addSeparator()
+ .beginStructureBlock(5, 3, 3, true)
+ .addController("Front center")
+ .addCasingInfoRange("Clean Stainless Steel Machine Casing", 18, 21, false)
+ .addOtherStructurePart("2 Rings of 8 Coils", "Each side of the controller")
+ .addInfo("Gets 10% EU/t reduction per coil tier, up to a maximum of 50%")
+ .addEnergyHatch("Any casing", 1, 2, 3)
+ .addMaintenanceHatch("Any casing", 1, 2, 3)
+ .addInputHatch("Steam/Hydrogen ONLY, Any middle ring casing", 1)
+ .addInputHatch("Any left/right side casing", 2, 3)
+ .addOutputHatch("Any right/left side casing", 2, 3)
+ .addStructureInfo("Input/Output Hatches must be on opposite sides!")
+ .addStructureHint("GT5U.cracker.io_side")
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -130,13 +166,26 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_CRACKER_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_CRACKER_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_CRACKER).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_CRACKER_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_OIL_CRACKER_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_OIL_CRACKER_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_OIL_CRACKER)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_OIL_CRACKER_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { casingTexturePages[0][CASING_INDEX] };
}
@@ -318,7 +367,7 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult
if (aBaseMetaTileEntity.getBlock(xPos, yPos, zPos) != GregTech_API.sBlockCasings1) continue;
aBaseMetaTileEntity.getWorld()
- .setBlock(xPos, yPos, zPos, GregTech_API.sBlockCasings5, tUsedMeta - 12, 3);
+ .setBlock(xPos, yPos, zPos, GregTech_API.sBlockCasings5, tUsedMeta - 12, 3);
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java
index fa8619492f..f8eb8c7670 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java
@@ -57,12 +57,26 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { getCasingTextureForId(casingTextureIndex),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_DRILL_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_DRILL_ACTIVE_GLOW).extFacing().glow().build() };
- return new ITexture[] { getCasingTextureForId(casingTextureIndex),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_DRILL).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_DRILL_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { getCasingTextureForId(casingTextureIndex), TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_OIL_DRILL_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_OIL_DRILL_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { getCasingTextureForId(casingTextureIndex), TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_OIL_DRILL)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_OIL_DRILL_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { getCasingTextureForId(casingTextureIndex) };
}
@@ -82,24 +96,28 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D
}
protected GT_Multiblock_Tooltip_Builder createTooltip(String tierSuffix) {
- String casings = getCasingBlockItem().get(0).getDisplayName();
+ String casings = getCasingBlockItem().get(0)
+ .getDisplayName();
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
tt.addMachineType("Pump")
- .addInfo(
- "Controller Block for the Oil/Gas/Fluid Drilling Rig " + (tierSuffix != null ? tierSuffix : ""))
- .addInfo("Works on " + getRangeInChunks() + "x" + getRangeInChunks() + " chunks")
- .addInfo("Use a Screwdriver to configure range")
- .addInfo("Use Programmed Circuits to ignore near exhausted oil field")
- .addInfo("If total circuit # is greater than output amount it will halt. If it worked right.") // doesn't
- // work
- .addSeparator().beginStructureBlock(3, 7, 3, false).addController("Front bottom")
- .addOtherStructurePart(casings, "form the 3x1x3 Base")
- .addOtherStructurePart(casings, "1x3x1 pillar above the center of the base (2 minimum total)")
- .addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top")
- .addEnergyHatch(VN[getMinTier()] + "+, Any base casing", 1).addMaintenanceHatch("Any base casing", 1)
- .addInputBus("Mining Pipes or Circuits, optional, any base casing", 1)
- .addOutputHatch("Any base casing", 1).toolTipFinisher("Gregtech");
+ .addInfo("Controller Block for the Oil/Gas/Fluid Drilling Rig " + (tierSuffix != null ? tierSuffix : ""))
+ .addInfo("Works on " + getRangeInChunks() + "x" + getRangeInChunks() + " chunks")
+ .addInfo("Use a Screwdriver to configure range")
+ .addInfo("Use Programmed Circuits to ignore near exhausted oil field")
+ .addInfo("If total circuit # is greater than output amount it will halt. If it worked right.") // doesn't
+ // work
+ .addSeparator()
+ .beginStructureBlock(3, 7, 3, false)
+ .addController("Front bottom")
+ .addOtherStructurePart(casings, "form the 3x1x3 Base")
+ .addOtherStructurePart(casings, "1x3x1 pillar above the center of the base (2 minimum total)")
+ .addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top")
+ .addEnergyHatch(VN[getMinTier()] + "+, Any base casing", 1)
+ .addMaintenanceHatch("Any base casing", 1)
+ .addInputBus("Mining Pipes or Circuits, optional, any base casing", 1)
+ .addOutputHatch("Any base casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -202,7 +220,9 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D
if (mOilFieldChunks.isEmpty()) {
Chunk tChunk = getBaseMetaTileEntity().getWorld()
- .getChunkFromBlockCoords(getBaseMetaTileEntity().getXCoord(), getBaseMetaTileEntity().getZCoord());
+ .getChunkFromBlockCoords(
+ getBaseMetaTileEntity().getXCoord(),
+ getBaseMetaTileEntity().getZCoord());
int range = chunkRangeConfig;
int xChunk = Math.floorDiv(tChunk.xPosition, range) * range; // Java was written by idiots. For negative
// values, / returns rounded towards zero.
@@ -223,10 +243,13 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D
if (debugDriller) {
GT_Log.out.println(" getChunkX = " + (xChunk + i) + " getChunkZ = " + (zChunk + j));
}
- tChunk = getBaseMetaTileEntity().getWorld().getChunkFromChunkCoords(xChunk + i, zChunk + j);
+ tChunk = getBaseMetaTileEntity().getWorld()
+ .getChunkFromChunkCoords(xChunk + i, zChunk + j);
tFluid = undergroundOilReadInformation(tChunk);
if (debugDriller) {
- GT_Log.out.println(" Fluid in chunk = " + tFluid.getFluid().getID());
+ GT_Log.out.println(
+ " Fluid in chunk = " + tFluid.getFluid()
+ .getID());
}
if (tOil.isFluidEqual(tFluid) && tFluid.amount > 0) {
mOilFieldChunks.add(tChunk);
@@ -296,7 +319,9 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D
+ " "
+ StatCollector.translateToLocal("GT5U.machines.chunks"),
"Drilling fluid: " + EnumChatFormatting.GREEN
- + (mOilId > 0 ? FluidRegistry.getFluid(mOilId).getName() : "None")
+ + (mOilId > 0 ? FluidRegistry.getFluid(mOilId)
+ .getName()
+ : "None")
+ EnumChatFormatting.RESET,
"Drilling flow: " + EnumChatFormatting.GREEN
+ GT_Utility.formatNumbers(
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillInfinite.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillInfinite.java
index e54fcbbd28..b92fcfae7f 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillInfinite.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillInfinite.java
@@ -23,18 +23,24 @@ public class GT_MetaTileEntity_OilDrillInfinite extends GT_MetaTileEntity_OilDri
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
- String casings = getCasingBlockItem().get(0).getDisplayName();
+ String casings = getCasingBlockItem().get(0)
+ .getDisplayName();
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Pump").addInfo("Controller Block for the Infinite Oil/Gas/Fluid Drilling Rig ")
- .addInfo("Works on " + getRangeInChunks() + "x" + getRangeInChunks() + " chunks").addSeparator()
- .beginStructureBlock(3, 7, 3, false).addController("Front bottom")
- .addOtherStructurePart(casings, "form the 3x1x3 Base")
- .addOtherStructurePart(casings, "1x3x1 pillar above the center of the base (2 minimum total)")
- .addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top")
- .addEnergyHatch(VN[getMinTier()] + "+, Any base casing", 1).addMaintenanceHatch("Any base casing", 1)
- .addInputBus("Mining Pipes or Circuits, optional, any base casing", 1)
- .addOutputHatch("Any base casing", 1).toolTipFinisher("Gregtech");
+ tt.addMachineType("Pump")
+ .addInfo("Controller Block for the Infinite Oil/Gas/Fluid Drilling Rig ")
+ .addInfo("Works on " + getRangeInChunks() + "x" + getRangeInChunks() + " chunks")
+ .addSeparator()
+ .beginStructureBlock(3, 7, 3, false)
+ .addController("Front bottom")
+ .addOtherStructurePart(casings, "form the 3x1x3 Base")
+ .addOtherStructurePart(casings, "1x3x1 pillar above the center of the base (2 minimum total)")
+ .addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top")
+ .addEnergyHatch(VN[getMinTier()] + "+, Any base casing", 1)
+ .addMaintenanceHatch("Any base casing", 1)
+ .addInputBus("Mining Pipes or Circuits, optional, any base casing", 1)
+ .addOutputHatch("Any base casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java
index 46b91ec2cf..c058c8880f 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java
@@ -142,7 +142,8 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile
z = oreBlockPos.chunkPosZ;
if (GT_Utility.eraseBlockByFakePlayer(getFakePlayer(getBaseMetaTileEntity()), x, y, z, true))
oreBlock = getBaseMetaTileEntity().getBlock(x, y, z);
- oreBlockMetadata = getBaseMetaTileEntity().getWorld().getBlockMetadata(x, y, z);
+ oreBlockMetadata = getBaseMetaTileEntity().getWorld()
+ .getBlockMetadata(x, y, z);
}
if (!tryConsumeDrillingFluid()) {
@@ -160,10 +161,19 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile
ItemStack cobble = GT_Utility.getCobbleForOre(oreBlock, metaData);
if (replaceWithCobblestone) {
getBaseMetaTileEntity().getWorld()
- .setBlock(x, y, z, Block.getBlockFromItem(cobble.getItem()), cobble.getItemDamage(), 3);
+ .setBlock(
+ x,
+ y,
+ z,
+ Block.getBlockFromItem(cobble.getItem()),
+ cobble.getItemDamage(),
+ 3);
} else {
getBaseMetaTileEntity().getWorld()
- .setBlockToAir(oreBlockPos.chunkPosX, oreBlockPos.chunkPosY, oreBlockPos.chunkPosZ);
+ .setBlockToAir(
+ oreBlockPos.chunkPosX,
+ oreBlockPos.chunkPosY,
+ oreBlockPos.chunkPosZ);
}
mOutputItems = getOutputByDrops(oreBlockDrops);
}
@@ -250,8 +260,9 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile
return false;
}
mCurrentChunk = new ChunkCoordIntPair(nextChunkX, nextChunkZ);
- GT_ChunkManager
- .requestChunkLoad((TileEntity) getBaseMetaTileEntity(), new ChunkCoordIntPair(nextChunkX, nextChunkZ));
+ GT_ChunkManager.requestChunkLoad(
+ (TileEntity) getBaseMetaTileEntity(),
+ new ChunkCoordIntPair(nextChunkX, nextChunkZ));
return true;
}
@@ -286,8 +297,12 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile
outputItems.add(multiplyStackSize(currentItem));
return;
}
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes
- .findRecipe(getBaseMetaTileEntity(), false, voltage, null, currentItem);
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ voltage,
+ null,
+ currentItem);
if (tRecipe == null) {
outputItems.add(currentItem);
return;
@@ -380,26 +395,31 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile
protected abstract int getBaseProgressTime();
protected GT_Multiblock_Tooltip_Builder createTooltip(String tierSuffix) {
- String casings = getCasingBlockItem().get(0).getDisplayName();
+ String casings = getCasingBlockItem().get(0)
+ .getDisplayName();
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
tt.addMachineType("Miner")
- .addInfo("Controller Block for the Ore Drilling Plant " + (tierSuffix != null ? tierSuffix : ""))
- .addInfo("Use a Screwdriver to configure block radius")
- .addInfo("Maximum radius is " + (getRadiusInChunks() << 4) + " blocks")
- .addInfo("Use Soldering iron to turn off chunk mode")
- .addInfo("Use Wire Cutter to toggle replacing mined blocks with cobblestone")
- .addInfo("In chunk mode, working area center is the chunk corner nearest to the drill")
- .addInfo("Gives ~3x as much crushed ore vs normal processing")
- .addInfo("Fortune bonus of " + (mTier + 3) + ". Only works on small ores").addSeparator()
- .beginStructureBlock(3, 7, 3, false).addController("Front bottom")
- .addOtherStructurePart(casings, "form the 3x1x3 Base")
- .addOtherStructurePart(casings, "1x3x1 pillar above the center of the base (2 minimum total)")
- .addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top")
- .addEnergyHatch(VN[getMinTier()] + "+, Any base casing", 1).addMaintenanceHatch("Any base casing", 1)
- .addInputBus("Mining Pipes, optional, any base casing", 1)
- .addInputHatch("Drilling Fluid, any base casing", 1).addOutputBus("Any base casing", 1)
- .toolTipFinisher("Gregtech");
+ .addInfo("Controller Block for the Ore Drilling Plant " + (tierSuffix != null ? tierSuffix : ""))
+ .addInfo("Use a Screwdriver to configure block radius")
+ .addInfo("Maximum radius is " + (getRadiusInChunks() << 4) + " blocks")
+ .addInfo("Use Soldering iron to turn off chunk mode")
+ .addInfo("Use Wire Cutter to toggle replacing mined blocks with cobblestone")
+ .addInfo("In chunk mode, working area center is the chunk corner nearest to the drill")
+ .addInfo("Gives ~3x as much crushed ore vs normal processing")
+ .addInfo("Fortune bonus of " + (mTier + 3) + ". Only works on small ores")
+ .addSeparator()
+ .beginStructureBlock(3, 7, 3, false)
+ .addController("Front bottom")
+ .addOtherStructurePart(casings, "form the 3x1x3 Base")
+ .addOtherStructurePart(casings, "1x3x1 pillar above the center of the base (2 minimum total)")
+ .addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top")
+ .addEnergyHatch(VN[getMinTier()] + "+, Any base casing", 1)
+ .addMaintenanceHatch("Any base casing", 1)
+ .addInputBus("Mining Pipes, optional, any base casing", 1)
+ .addInputHatch("Drilling Fluid, any base casing", 1)
+ .addOutputBus("Any base casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java
index df878d8050..7ad3c1b4bf 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java
@@ -95,12 +95,12 @@ public class GT_MetaTileEntity_PCBFactory extends
private static final int mTier2BitMap = 0b10;
private static final int mTier1BitMap = 0b1;
private static final int COOLANT_CONSUMED_PER_SEC = 10;
- private static final IStructureDefinition<GT_MetaTileEntity_PCBFactory> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_PCBFactory>builder().addShape(
- tier1,
- transpose(
- new String[][] {
- // spotless:off
+ private static final IStructureDefinition<GT_MetaTileEntity_PCBFactory> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_PCBFactory>builder()
+ .addShape(
+ tier1,
+ transpose(
+ new String[][] {
+ // spotless:off
{" ","E E","E E","EEEEEEE","E E","E E"," "},
{"EEEEEEE","CAAAAAC","CAAAAAC","CCCCCCC","CCCCCCC","CCCCCCC","E E"},
{"EAAAAAE","C-----C","C-----C","C-----C","C-----C","C-----C","ECCCCCE"},
@@ -108,11 +108,12 @@ public class GT_MetaTileEntity_PCBFactory extends
{"EAAAAAE","C-----C","B-FFF-B","B-FFF-B","B-FFF-B","C-----C","EPPPPPE"},
{"ECC~CCE","CDDDDDC","CDDDDDC","CDDDDDC","CDDDDDC","CDDDDDC","EPPPPPE"}
//spotless:on
- })).addShape(
- tier2,
- transpose(
- new String[][] {
- // spotless:off
+ }))
+ .addShape(
+ tier2,
+ transpose(
+ new String[][] {
+ // spotless:off
{" "," "," ","HGGH","HGGH","HGGH","HGGH","HGGH"," "," "," "},
{" "," ","HGGH","GGGG","GGGG","GGGG","GGGG","GGGG","HGGH"," "," "},
{" ","HGGH","GGGG","G G","G G","G G","G G","G G","GGGG","HGGH"," "},
@@ -121,11 +122,12 @@ public class GT_MetaTileEntity_PCBFactory extends
{"HGGH","G G","G G","G G","G G","G G","G G","G G","G G","G G","HGGH"},
{"HGGH","GGGG","GGGG","GGGG","GGGG","GGGG","GGGG","GGGG","GGGG","GGGG","HGGH"}
//spotless:on
- })).addShape(
- tier3,
- transpose(
- new String[][] {
- // spotless:off
+ }))
+ .addShape(
+ tier3,
+ transpose(
+ new String[][] {
+ // spotless:off
{" "," "," "," "," I "," I "," "," "," "," "},
{" "," "," "," I "," I "," I "," I "," "," "," "},
{" "," "," KKK "," KIK "," K K "," K K "," I "," "," "," "},
@@ -149,11 +151,12 @@ public class GT_MetaTileEntity_PCBFactory extends
{" "," III "," I I "," I I "," I I "," I I "," I I "," I I "," III "," "},
{" II~II ","IIJJJII","IJJJJJI","IJJJJJI","IJJJJJI","IJJJJJI","IJJJJJI","IJJJJJI","IIJJJII"," IIIII "}
//spotless:on
- })).addShape(
- bioUpgrade,
- transpose(
- new String[][] {
- // spotless:off
+ }))
+ .addShape(
+ bioUpgrade,
+ transpose(
+ new String[][] {
+ // spotless:off
{" "," "," LLLLLL "," "," "},
{" "," "," L L "," "," "},
{"E E E E"," LLL LLL "," LLL LLL "," LLL LLL ","E E E E"},
@@ -162,12 +165,12 @@ public class GT_MetaTileEntity_PCBFactory extends
{"EAAAE EAAAE","A A A A","A A A A","A A A A","EAAAE EAAAE"},
{"ELLLE ELLLE","LLLLL LLLLL","LLLLL LLLLL","LLLLL LLLLL","ELLLE ELLLE"}
//spotless:on
- }))
- .addShape(
- ocTier1Upgrade,
- transpose(
- new String[][] {
- // spotless:off
+ }))
+ .addShape(
+ ocTier1Upgrade,
+ transpose(
+ new String[][] {
+ // spotless:off
{"EKKKE","K K","K K","K K","EKKKE"},
{"E E"," KKK "," K K "," KKK ","E E"},
{"E E"," NNN "," N N "," NNN ","E E"},
@@ -179,11 +182,12 @@ public class GT_MetaTileEntity_PCBFactory extends
{"ENNNE","NKKKN","NK KN","NKKKN","ENNNE"},
{"EGGGE","GGGGG","GGMGG","GGGGG","EGGGE"}
//spotless:on
- })).addShape(
- ocTier2Upgrade,
- transpose(
- new String[][] {
- // spotless:off
+ }))
+ .addShape(
+ ocTier2Upgrade,
+ transpose(
+ new String[][] {
+ // spotless:off
{"RGGGR","G G","G G","G G","RGGGR"},
{"R R"," GGG "," GTG "," GGG ","R R"},
{"R R"," NNN "," NTN "," NNN ","R R"},
@@ -195,50 +199,172 @@ public class GT_MetaTileEntity_PCBFactory extends
{"RNNNR","NQQQN","NQTQN","NQQQN","RNNNR"},
{"RGGGR","GGGGG","GGSGG","GGGGG","RGGGR"}
//spotless:on
- })).addElement('E', ofFrame(Materials.DamascusSteel))
- .addElement('C', ofBlock(GregTech_API.sBlockCasings8, 11))
- .addElement('D', ofBlock(GregTech_API.sBlockReinforced, 2))
- .addElement(
- 'A',
- ofChain(
- ofBlockUnlocalizedName("IC2", "blockAlloyGlass", 0, true),
- ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks", 0, true),
- ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks2", 0, true),
- // warded glass
- ofBlockUnlocalizedName("Thaumcraft", "blockCosmeticOpaque", 2, false)))
- .addElement('B', ofBlock(GregTech_API.sBlockCasings3, 10)).addElement('F', ofFrame(Materials.VibrantAlloy))
- .addElement(
- 'P',
- buildHatchAdder(GT_MetaTileEntity_PCBFactory.class)
- .atLeast(InputHatch, OutputBus, InputBus, Maintenance, Energy.or(ExoticEnergy)).dot(1)
- .casingIndex(((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(11))
- .buildAndChain(GregTech_API.sBlockCasings8, 11))
- .addElement('H', ofFrame(Materials.Duranium)).addElement('G', ofBlock(GregTech_API.sBlockCasings8, 12))
- .addElement('I', ofBlock(GregTech_API.sBlockCasings8, 13))
- .addElement('K', ofBlock(GregTech_API.sBlockCasings8, 10))
- .addElement(
- 'J',
- buildHatchAdder(GT_MetaTileEntity_PCBFactory.class)
- .atLeast(InputHatch, OutputBus, InputBus, Maintenance, Energy.or(ExoticEnergy)).dot(1)
- .casingIndex(((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(13))
- .buildAndChain(GregTech_API.sBlockCasings8, 13))
- .addElement('L', ofBlock(GregTech_API.sBlockCasings4, 1))
- .addElement(
- 'M',
- buildHatchAdder(GT_MetaTileEntity_PCBFactory.class).hatchClass(GT_MetaTileEntity_Hatch_Input.class)
- .adder(GT_MetaTileEntity_PCBFactory::addCoolantInputToMachineList)
- .casingIndex(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 12)).dot(2)
- .buildAndChain(GregTech_API.sBlockCasings8, 12))
- .addElement('N', ofBlock(GregTech_API.sBlockCasings2, 15))
- .addElement('O', ofBlock(GregTech_API.sBlockCasings8, 4))
- .addElement(
- 'S',
- buildHatchAdder(GT_MetaTileEntity_PCBFactory.class).hatchClass(GT_MetaTileEntity_Hatch_Input.class)
- .adder(GT_MetaTileEntity_PCBFactory::addCoolantInputToMachineList)
- .casingIndex(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 12)).dot(2)
- .buildAndChain(GregTech_API.sBlockCasings8, 12))
- .addElement('R', ofFrame(Materials.Americium)).addElement('Q', ofBlock(GregTech_API.sBlockCasings8, 14))
- .addElement('T', ofBlock(GregTech_API.sBlockCasings1, 15)).build();
+ }))
+ .addElement(
+ 'E',
+ ofFrame(
+ Materials.DamascusSteel))
+ .addElement(
+ 'C',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 11))
+ .addElement(
+ 'D',
+ ofBlock(
+ GregTech_API.sBlockReinforced,
+ 2))
+ .addElement(
+ 'A',
+ ofChain(
+ ofBlockUnlocalizedName(
+ "IC2",
+ "blockAlloyGlass",
+ 0,
+ true),
+ ofBlockUnlocalizedName(
+ "bartworks",
+ "BW_GlasBlocks",
+ 0,
+ true),
+ ofBlockUnlocalizedName(
+ "bartworks",
+ "BW_GlasBlocks2",
+ 0,
+ true),
+ // warded
+ // glass
+ ofBlockUnlocalizedName(
+ "Thaumcraft",
+ "blockCosmeticOpaque",
+ 2,
+ false)))
+ .addElement(
+ 'B',
+ ofBlock(
+ GregTech_API.sBlockCasings3,
+ 10))
+ .addElement(
+ 'F',
+ ofFrame(
+ Materials.VibrantAlloy))
+ .addElement(
+ 'P',
+ buildHatchAdder(
+ GT_MetaTileEntity_PCBFactory.class).atLeast(
+ InputHatch,
+ OutputBus,
+ InputBus,
+ Maintenance,
+ Energy.or(
+ ExoticEnergy))
+ .dot(
+ 1)
+ .casingIndex(
+ ((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(
+ 11))
+ .buildAndChain(
+ GregTech_API.sBlockCasings8,
+ 11))
+ .addElement(
+ 'H',
+ ofFrame(
+ Materials.Duranium))
+ .addElement(
+ 'G',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 12))
+ .addElement(
+ 'I',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 13))
+ .addElement(
+ 'K',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 10))
+ .addElement(
+ 'J',
+ buildHatchAdder(
+ GT_MetaTileEntity_PCBFactory.class).atLeast(
+ InputHatch,
+ OutputBus,
+ InputBus,
+ Maintenance,
+ Energy.or(
+ ExoticEnergy))
+ .dot(
+ 1)
+ .casingIndex(
+ ((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(
+ 13))
+ .buildAndChain(
+ GregTech_API.sBlockCasings8,
+ 13))
+ .addElement(
+ 'L',
+ ofBlock(
+ GregTech_API.sBlockCasings4,
+ 1))
+ .addElement(
+ 'M',
+ buildHatchAdder(
+ GT_MetaTileEntity_PCBFactory.class).hatchClass(
+ GT_MetaTileEntity_Hatch_Input.class)
+ .adder(
+ GT_MetaTileEntity_PCBFactory::addCoolantInputToMachineList)
+ .casingIndex(
+ GT_Utility.getCasingTextureIndex(
+ GregTech_API.sBlockCasings8,
+ 12))
+ .dot(
+ 2)
+ .buildAndChain(
+ GregTech_API.sBlockCasings8,
+ 12))
+ .addElement(
+ 'N',
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 15))
+ .addElement(
+ 'O',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 4))
+ .addElement(
+ 'S',
+ buildHatchAdder(
+ GT_MetaTileEntity_PCBFactory.class).hatchClass(
+ GT_MetaTileEntity_Hatch_Input.class)
+ .adder(
+ GT_MetaTileEntity_PCBFactory::addCoolantInputToMachineList)
+ .casingIndex(
+ GT_Utility.getCasingTextureIndex(
+ GregTech_API.sBlockCasings8,
+ 12))
+ .dot(
+ 2)
+ .buildAndChain(
+ GregTech_API.sBlockCasings8,
+ 12))
+ .addElement(
+ 'R',
+ ofFrame(
+ Materials.Americium))
+ .addElement(
+ 'Q',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 14))
+ .addElement(
+ 'T',
+ ofBlock(
+ GregTech_API.sBlockCasings1,
+ 15))
+ .build();
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
@@ -374,15 +500,28 @@ public class GT_MetaTileEntity_PCBFactory extends
BlockIcons.getCasingTextureForId(
getTier() < 3 ? GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 11)
: GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 13)),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW).extFacing().glow()
- .build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
return new ITexture[] {
BlockIcons.getCasingTextureForId(
getTier() < 3 ? GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 11)
: GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 13)),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW).extFacing().glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { BlockIcons.getCasingTextureForId(
mSetTier < 3 ? ((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(11)
@@ -518,8 +657,15 @@ public class GT_MetaTileEntity_PCBFactory extends
long amps = getMaxInputAmps();
int tier = GT_Utility.getTier(voltage);
- GT_Recipe tRecipe = aMap
- .findRecipe(getBaseMetaTileEntity(), null, true, false, V[tier], aFluidInputs, aStack, aItemInputs);
+ GT_Recipe tRecipe = aMap.findRecipe(
+ getBaseMetaTileEntity(),
+ null,
+ true,
+ false,
+ V[tier],
+ aFluidInputs,
+ aStack,
+ aItemInputs);
if (tRecipe == null) {
return false;
@@ -552,9 +698,14 @@ public class GT_MetaTileEntity_PCBFactory extends
&& ((recipeBitMap & mBioBitMap) == 0 || ((recipeBitMap & mBioBitMap) == mBioBitMap && mBioUpgrade));
if (recipeAllowed) {
- GT_ParallelHelper helper = new GT_ParallelHelper().setRecipe(tRecipe).setItemInputs(aItemInputs)
- .setFluidInputs(aFluidInputs).setMaxParallel(aMaxParallel).setAvailableEUt(getMaxInputEu())
- .setEUtModifier(aExtraPower).enableConsumption().build();
+ GT_ParallelHelper helper = new GT_ParallelHelper().setRecipe(tRecipe)
+ .setItemInputs(aItemInputs)
+ .setFluidInputs(aFluidInputs)
+ .setMaxParallel(aMaxParallel)
+ .setAvailableEUt(getMaxInputEu())
+ .setEUtModifier(aExtraPower)
+ .enableConsumption()
+ .build();
mCurrentParallel = helper.getCurrentParallel();
if (mCurrentParallel > 0) {
@@ -565,8 +716,14 @@ public class GT_MetaTileEntity_PCBFactory extends
if (mOCTier1 || mOCTier2) {
GT_OverclockCalculator calc = new GT_OverclockCalculator().setRecipeEUt(tRecipe.mEUt)
- .setDuration(tRecipe.mDuration).setEUt(voltage).setAmperage(amps)
- .setEUtDiscount(aExtraPower).setSpeedBoost((float) Math.pow(mRoughnessMultiplier, 2));
+ .setDuration(tRecipe.mDuration)
+ .setEUt(voltage)
+ .setAmperage(amps)
+ .setEUtDiscount(aExtraPower)
+ .setSpeedBoost(
+ (float) Math.pow(
+ mRoughnessMultiplier,
+ 2));
if (mOCTier2) {
calc.enablePerfectOC();
}
@@ -849,8 +1006,10 @@ public class GT_MetaTileEntity_PCBFactory extends
long maxEnergy = 0;
for (GT_MetaTileEntity_Hatch tHatch : getExoticAndNormalEnergyHatchList()) {
if (isValidMetaTileEntity(tHatch)) {
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
}
long voltage = getAverageInputVoltage();
@@ -919,120 +1078,110 @@ public class GT_MetaTileEntity_PCBFactory extends
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Circuit Board Fabricator").addInfo("Controller for the PCB Factory")
- .addInfo(
- EnumChatFormatting.GOLD.toString() + EnumChatFormatting.BOLD
- + "IMPORTANT!"
- + " Check the configuration menu before building.")
- .addInfo("Tier of the machine determines the available recipes.")
- .addInfo("Machine tier (1-3) is set in the controller GUI.")
- .addInfo("The configuration menu can be used to add upgrades.")
- .addInfo("Each tier and upgrade requires additional structures.")
- .addInfo("Power consumption is multiplied by Sqrt(structures).")
- .addInfo("Tier 2 and 3 allow parallel by using extra nanites.")
- .addInfo("Every doubling of nanites adds one parallel.")
- .addInfo("1x->1, 2x->2, 4x->3, 8x->4 with no limit.")
- .addInfo("Recipes require a cooling upgrade to be overclocked.")
- .addInfo("Liquid Cooling uses 10 L/s of distilled water and enables default overclocks.")
- .addInfo("Thermosink uses 10 L/s of Space Coolant and enables perfect overclocks.")
- .addInfo("Trace size can be changed to modify the material usage and machine speed.")
- .addInfo(AuthorBlueWeabo).beginStructureBlock(30, 38, 13, false).addSeparator()
- .addMaintenanceHatch(EnumChatFormatting.GOLD + "1", 1)
- .addEnergyHatch(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1)
- .addInputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1)
- .addOutputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1)
- .addInputHatch(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1)
- .addStructureInfo(
- "Coolant Hatch (Input Hatch): " + EnumChatFormatting.GOLD
- + "1"
- + EnumChatFormatting.GRAY
- + "Center of the Liquid Cooling/Thermosink")
- .addStructureInfo(
- EnumChatFormatting.BLUE + "Base Multi (Tier "
- + EnumChatFormatting.DARK_PURPLE
- + 1
- + EnumChatFormatting.BLUE
- + "):")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Damascus Steel Frame Box")
- .addStructureInfo(EnumChatFormatting.GOLD + "9" + EnumChatFormatting.GRAY + " Vibrant Alloy Frame Box")
- .addStructureInfo(EnumChatFormatting.GOLD + "25" + EnumChatFormatting.GRAY + " Reinforced Glass")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "77"
- + EnumChatFormatting.GRAY
- + " Basic Photolithography Framework Casing")
- .addStructureInfo(EnumChatFormatting.GOLD + "12" + EnumChatFormatting.GRAY + " Grate Machine Casing")
- .addStructureInfo(EnumChatFormatting.GOLD + "25" + EnumChatFormatting.GRAY + " Plascrete Block")
- .addStructureInfo(
- EnumChatFormatting.BLUE + "Tier "
- + EnumChatFormatting.DARK_PURPLE
- + 2
- + EnumChatFormatting.BLUE
- + " (Adds to Tier "
- + EnumChatFormatting.DARK_PURPLE
- + 1
- + EnumChatFormatting.BLUE
- + "):")
- .addStructureInfo(EnumChatFormatting.GOLD + "34" + EnumChatFormatting.GRAY + " Duranium Frame Box")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "158"
- + EnumChatFormatting.GRAY
- + " Reinforced Photolithography Framework Casing")
- .addStructureInfo(
- EnumChatFormatting.BLUE + "Tier "
- + EnumChatFormatting.DARK_PURPLE
- + 3
- + EnumChatFormatting.BLUE
- + ":")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "292"
- + EnumChatFormatting.GRAY
- + " Radiation Proof Photolithography Framework Casing")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "76" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
- .addStructureInfo(EnumChatFormatting.BLUE + "Biochamber Upgrade")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "68"
- + EnumChatFormatting.GRAY
- + " Clean Stainless Steel Machine Casing")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Damascus Steel Frame Box")
- .addStructureInfo(EnumChatFormatting.GOLD + "72" + EnumChatFormatting.GRAY + " Reinforced Glass")
- .addStructureInfo(
- EnumChatFormatting.BLUE + "Liquid Cooling Tower (Tier "
- + EnumChatFormatting.DARK_PURPLE
- + 1
- + EnumChatFormatting.BLUE
- + "):")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Damascus Steel Frame Box")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "68" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "12" + EnumChatFormatting.GRAY + " Extreme Engine Intake Casing")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "20" + EnumChatFormatting.GRAY + " Tungstensteel Pipe Casing")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "21"
- + EnumChatFormatting.GRAY
- + " Reinforced Photolithography Framework Casing")
- .addStructureInfo(
- EnumChatFormatting.BLUE + "Thermosink Radiator(Tier "
- + EnumChatFormatting.DARK_PURPLE
- + 2
- + EnumChatFormatting.BLUE
- + "):")
- .addStructureInfo(EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Americium Frame Box")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "41"
- + EnumChatFormatting.GRAY
- + " Reinforced Photolithography Framework Casing")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "8" + EnumChatFormatting.GRAY + " Superconducting Coil Block")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "20" + EnumChatFormatting.GRAY + " Tungstensteel Pipe Casing")
- .addStructureInfo(EnumChatFormatting.GOLD + "48" + EnumChatFormatting.GRAY + " Infinity Cooled Casing")
- .toolTipFinisher("GregTech");
+ tt.addMachineType("Circuit Board Fabricator")
+ .addInfo("Controller for the PCB Factory")
+ .addInfo(
+ EnumChatFormatting.GOLD.toString() + EnumChatFormatting.BOLD
+ + "IMPORTANT!"
+ + " Check the configuration menu before building.")
+ .addInfo("Tier of the machine determines the available recipes.")
+ .addInfo("Machine tier (1-3) is set in the controller GUI.")
+ .addInfo("The configuration menu can be used to add upgrades.")
+ .addInfo("Each tier and upgrade requires additional structures.")
+ .addInfo("Power consumption is multiplied by Sqrt(structures).")
+ .addInfo("Tier 2 and 3 allow parallel by using extra nanites.")
+ .addInfo("Every doubling of nanites adds one parallel.")
+ .addInfo("1x->1, 2x->2, 4x->3, 8x->4 with no limit.")
+ .addInfo("Recipes require a cooling upgrade to be overclocked.")
+ .addInfo("Liquid Cooling uses 10 L/s of distilled water and enables default overclocks.")
+ .addInfo("Thermosink uses 10 L/s of Space Coolant and enables perfect overclocks.")
+ .addInfo("Trace size can be changed to modify the material usage and machine speed.")
+ .addInfo(AuthorBlueWeabo)
+ .beginStructureBlock(30, 38, 13, false)
+ .addSeparator()
+ .addMaintenanceHatch(EnumChatFormatting.GOLD + "1", 1)
+ .addEnergyHatch(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1)
+ .addInputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1)
+ .addOutputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1)
+ .addInputHatch(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1)
+ .addStructureInfo(
+ "Coolant Hatch (Input Hatch): " + EnumChatFormatting.GOLD
+ + "1"
+ + EnumChatFormatting.GRAY
+ + "Center of the Liquid Cooling/Thermosink")
+ .addStructureInfo(
+ EnumChatFormatting.BLUE + "Base Multi (Tier "
+ + EnumChatFormatting.DARK_PURPLE
+ + 1
+ + EnumChatFormatting.BLUE
+ + "):")
+ .addStructureInfo(EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Damascus Steel Frame Box")
+ .addStructureInfo(EnumChatFormatting.GOLD + "9" + EnumChatFormatting.GRAY + " Vibrant Alloy Frame Box")
+ .addStructureInfo(EnumChatFormatting.GOLD + "25" + EnumChatFormatting.GRAY + " Reinforced Glass")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "77" + EnumChatFormatting.GRAY + " Basic Photolithography Framework Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "12" + EnumChatFormatting.GRAY + " Grate Machine Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "25" + EnumChatFormatting.GRAY + " Plascrete Block")
+ .addStructureInfo(
+ EnumChatFormatting.BLUE + "Tier "
+ + EnumChatFormatting.DARK_PURPLE
+ + 2
+ + EnumChatFormatting.BLUE
+ + " (Adds to Tier "
+ + EnumChatFormatting.DARK_PURPLE
+ + 1
+ + EnumChatFormatting.BLUE
+ + "):")
+ .addStructureInfo(EnumChatFormatting.GOLD + "34" + EnumChatFormatting.GRAY + " Duranium Frame Box")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "158"
+ + EnumChatFormatting.GRAY
+ + " Reinforced Photolithography Framework Casing")
+ .addStructureInfo(
+ EnumChatFormatting.BLUE + "Tier "
+ + EnumChatFormatting.DARK_PURPLE
+ + 3
+ + EnumChatFormatting.BLUE
+ + ":")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "292"
+ + EnumChatFormatting.GRAY
+ + " Radiation Proof Photolithography Framework Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "76" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
+ .addStructureInfo(EnumChatFormatting.BLUE + "Biochamber Upgrade")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "68" + EnumChatFormatting.GRAY + " Clean Stainless Steel Machine Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Damascus Steel Frame Box")
+ .addStructureInfo(EnumChatFormatting.GOLD + "72" + EnumChatFormatting.GRAY + " Reinforced Glass")
+ .addStructureInfo(
+ EnumChatFormatting.BLUE + "Liquid Cooling Tower (Tier "
+ + EnumChatFormatting.DARK_PURPLE
+ + 1
+ + EnumChatFormatting.BLUE
+ + "):")
+ .addStructureInfo(EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Damascus Steel Frame Box")
+ .addStructureInfo(EnumChatFormatting.GOLD + "68" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "12" + EnumChatFormatting.GRAY + " Extreme Engine Intake Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "20" + EnumChatFormatting.GRAY + " Tungstensteel Pipe Casing")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "21"
+ + EnumChatFormatting.GRAY
+ + " Reinforced Photolithography Framework Casing")
+ .addStructureInfo(
+ EnumChatFormatting.BLUE + "Thermosink Radiator(Tier "
+ + EnumChatFormatting.DARK_PURPLE
+ + 2
+ + EnumChatFormatting.BLUE
+ + "):")
+ .addStructureInfo(EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Americium Frame Box")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "41"
+ + EnumChatFormatting.GRAY
+ + " Reinforced Photolithography Framework Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "8" + EnumChatFormatting.GRAY + " Superconducting Coil Block")
+ .addStructureInfo(EnumChatFormatting.GOLD + "20" + EnumChatFormatting.GRAY + " Tungstensteel Pipe Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "48" + EnumChatFormatting.GRAY + " Infinity Cooled Casing")
+ .toolTipFinisher("GregTech");
return tt;
}
@@ -1124,21 +1273,34 @@ public class GT_MetaTileEntity_PCBFactory extends
buildContext.addSyncedWindow(10, this::createConfigurationWindow);
builder.widget(
new ButtonWidget().setOnClick(
- (clickData, widget) -> { if (!widget.isClient()) widget.getContext().openSyncedWindow(10); })
- .setSize(16, 16).setBackground(() -> {
- List<UITexture> ret = new ArrayList<>();
- ret.add(GT_UITextures.BUTTON_STANDARD);
- ret.add(GT_UITextures.OVERLAY_BUTTON_CYCLIC);
- return ret.toArray(new IDrawable[0]);
- }).addTooltip("Configuration Menu").setPos(174, 130))
- .widget(
- new TextWidget(new Text("Tier")).setTextAlignment(Alignment.Center).setScale(0.91f)
- .setSize(20, 16).setPos(173, 98))
- .widget(
- new TextFieldWidget().setGetterInt(() -> mSetTier).setSetterInt(val -> { mSetTier = val; })
- .setNumbers(1, 3).setTextColor(Color.WHITE.normal).setTextAlignment(Alignment.Center)
- .addTooltip("PCB Factory Tier").setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)
- .setSize(18, 18).setPos(173, 110));
+ (clickData, widget) -> {
+ if (!widget.isClient()) widget.getContext()
+ .openSyncedWindow(10);
+ })
+ .setSize(16, 16)
+ .setBackground(() -> {
+ List<UITexture> ret = new ArrayList<>();
+ ret.add(GT_UITextures.BUTTON_STANDARD);
+ ret.add(GT_UITextures.OVERLAY_BUTTON_CYCLIC);
+ return ret.toArray(new IDrawable[0]);
+ })
+ .addTooltip("Configuration Menu")
+ .setPos(174, 130))
+ .widget(
+ new TextWidget(new Text("Tier")).setTextAlignment(Alignment.Center)
+ .setScale(0.91f)
+ .setSize(20, 16)
+ .setPos(173, 98))
+ .widget(
+ new TextFieldWidget().setGetterInt(() -> mSetTier)
+ .setSetterInt(val -> { mSetTier = val; })
+ .setNumbers(1, 3)
+ .setTextColor(Color.WHITE.normal)
+ .setTextAlignment(Alignment.Center)
+ .addTooltip("PCB Factory Tier")
+ .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)
+ .setSize(18, 18)
+ .setPos(173, 110));
}
protected ModularWindow createConfigurationWindow(final EntityPlayer player) {
@@ -1146,192 +1308,364 @@ public class GT_MetaTileEntity_PCBFactory extends
builder.setBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT);
builder.setGuiTint(getGUIColorization());
builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC).setPos(5, 5).setSize(16, 16))
- .widget(new TextWidget("Configuration Menu").setPos(25, 9))
- .widget(ButtonWidget.closeWindowButton(true).setPos(185, 3))
- .widget(
- new DynamicPositionedColumn().setSynced(false)
- .widget(
- new MultiChildWidget()
- .addChild(new CycleButtonWidget().setToggle(() -> mBioUpgrade, val -> {
- mBioUpgrade = val;
- if (!mBioUpgrade) {
- GT_Utility.sendChatToPlayer(
- player,
- GT_Utility
- .trans("339.1", "Biochamber Upgrade Disabled"));
- } else {
- GT_Utility.sendChatToPlayer(
- player,
- GT_Utility.trans("339", "Biochamber Upgrade Enabled"));
- }
- }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setSize(90, 18).addTooltip(
- "Enables nanites to construct organic circuitry. Required for Bioware and Wetware boards."))
- .addChild(
- new DrawableWidget()
- .setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC)
- .setSize(18, 18))
- .addChild(
- new TextWidget("Biochamber").setTextAlignment(Alignment.Center)
- .setPos(23, 5))
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new MultiChildWidget()
- .addChild(new CycleButtonWidget().setToggle(() -> mBioRotate, val -> {
- mBioRotate = val;
- if (!mBioRotate) {
- GT_Utility.sendChatToPlayer(
- player,
- GT_Utility
- .trans("340.1", "Rotated biochamber disabled"));
- } else {
- GT_Utility.sendChatToPlayer(
- player,
- GT_Utility.trans("340", "Rotated biochamber enabled"));
- }
- }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setSize(90, 18)
- .addTooltip("Rotates the biochamber by 90 degrees."))
- .addChild(
- new DrawableWidget()
- .setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC)
- .setSize(18, 18))
- .addChild(
- new TextWidget("Bio Rotation")
- .setTextAlignment(Alignment.Center).setPos(23, 5))
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new MultiChildWidget()
- .addChild(new CycleButtonWidget().setToggle(() -> mOCTier1, val -> {
- mOCTier1 = val;
- if (!mOCTier1) {
- GT_Utility.sendChatToPlayer(
- player,
- GT_Utility.trans("341.1", "Tier 1 cooling disabled"));
- } else {
- GT_Utility.sendChatToPlayer(
- player,
- GT_Utility.trans("341", "Tier 1 cooling enabled"));
- }
- }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setSize(90, 18).addTooltip(
- "Allows for overclocking. Requires 10 L/s of distilled water. Cooling upgrades are mutually exclusive."))
- .addChild(
- new DrawableWidget()
- .setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC)
- .setSize(18, 18))
- .addChild(
- new TextWidget("Liquid Cooling")
- .setTextAlignment(Alignment.Center).setPos(20, 5))
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new MultiChildWidget()
- .addChild(new CycleButtonWidget().setToggle(() -> mOCTier2, val -> {
- mOCTier2 = val;
- if (!mOCTier2) {
- GT_Utility.sendChatToPlayer(
- player,
- GT_Utility.trans("342.1", "Tier 2 cooling disabled"));
- } else {
- GT_Utility.sendChatToPlayer(
- player,
- GT_Utility.trans("342", "Tier 2 cooling enabled"));
- }
- }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setSize(90, 18).addTooltip(
- "Enables perfect overclocking by allowing nanites to work with extreme speed and efficiency. Uses 10 L/s of space coolant."))
- .addChild(
- new DrawableWidget()
- .setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC)
- .setSize(18, 18))
- .addChild(
- new TextWidget("Thermosink").setTextAlignment(Alignment.Center)
- .setPos(20, 5))
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new TextWidget(new Text("Trace Size")).setSize(90, 18)
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()).setPos(0, 4))
- .widget(
- new TextFieldWidget()
- .setGetterInt(() -> (int) ((1f / mRoughnessMultiplier) * 100f))
- .setSetterInt(val -> { mRoughnessMultiplier = 100f / val; })
- .setNumbers(50, 200).setTextColor(Color.WHITE.normal)
- .setTextAlignment(Alignment.Center)
- .addTooltip(
- "Set the trace size. Smaller traces allow material savings but take longer to fabricate. Larger traces waste material but are fast. 50-200 μm.")
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD).setSize(90, 16))
- .widget(
- new DrawableWidget().setDrawable(GT_UITextures.OVERLAY_BUTTON_CROSS)
- .setSize(18, 18)
- .addTooltip(
- new Text("Can't change configuration when running !")
- .color(Color.RED.dark(3)))
- .setEnabled(widget -> getBaseMetaTileEntity().isActive()))
- .setPos(10, 25))
- .widget(
- new DynamicPositionedColumn().setSynced(false)
- .widget(
- new TextWidget(new Text("Bio Upgrade Offsets")).setSize(72, 18)
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new DynamicPositionedRow().setSynced(false).widget(
- new TextFieldWidget().setGetterInt(() -> mBioOffsets[0])
- .setSetterInt(val -> { mBioOffsets[0] = val; })
- .setNumbers(-16, 16).setTextColor(Color.WHITE.normal)
- .setTextAlignment(Alignment.Center).addTooltip("X Offset")
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)
- .setSize(36, 18))
- .widget(
- new TextFieldWidget().setGetterInt(() -> mBioOffsets[1])
- .setSetterInt(val -> { mBioOffsets[1] = val; })
- .setNumbers(-16, 16).setTextColor(Color.WHITE.normal)
- .setTextAlignment(Alignment.Center)
- .addTooltip("Z Offset")
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)
- .setSize(36, 18))
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new TextWidget(new Text("Cooler Tier 1 Offsets")).setSize(72, 18)
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new DynamicPositionedRow().setSynced(false).widget(
- new TextFieldWidget().setGetterInt(() -> mOCTier1Offsets[0])
- .setSetterInt(val -> { mOCTier1Offsets[0] = val; })
- .setNumbers(-16, 16).setTextColor(Color.WHITE.normal)
- .setTextAlignment(Alignment.Center).addTooltip("X Offset")
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)
- .setSize(36, 18))
- .widget(
- new TextFieldWidget().setGetterInt(() -> mOCTier1Offsets[1])
- .setSetterInt(val -> { mOCTier1Offsets[1] = val; })
- .setNumbers(-16, 16).setTextColor(Color.WHITE.normal)
- .setTextAlignment(Alignment.Center)
- .addTooltip("Z Offset")
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)
- .setSize(36, 18))
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new TextWidget(new Text("Cooler Tier 2 Offsets")).setSize(72, 18)
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new DynamicPositionedRow().setSynced(false).widget(
- new TextFieldWidget().setGetterInt(() -> mOCTier2Offsets[0])
- .setSetterInt(val -> { mOCTier2Offsets[0] = val; })
- .setNumbers(-16, 16).setTextColor(Color.WHITE.normal)
- .setTextAlignment(Alignment.Center).addTooltip("X Offset")
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)
- .setSize(36, 18))
- .widget(
- new TextFieldWidget().setGetterInt(() -> mOCTier2Offsets[1])
- .setSetterInt(val -> { mOCTier2Offsets[1] = val; })
- .setNumbers(-16, 16).setTextColor(Color.WHITE.normal)
- .setTextAlignment(Alignment.Center)
- .addTooltip("Z Offset")
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)
- .setSize(36, 18))
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .setPos(110, 25));
+ new DrawableWidget().setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC)
+ .setPos(5, 5)
+ .setSize(16, 16))
+ .widget(new TextWidget("Configuration Menu").setPos(25, 9))
+ .widget(
+ ButtonWidget.closeWindowButton(true)
+ .setPos(185, 3))
+ .widget(
+ new DynamicPositionedColumn().setSynced(false)
+ .widget(
+ new MultiChildWidget().addChild(
+ new CycleButtonWidget().setToggle(
+ () -> mBioUpgrade,
+ val -> {
+ mBioUpgrade = val;
+ if (!mBioUpgrade) {
+ GT_Utility.sendChatToPlayer(
+ player,
+ GT_Utility.trans(
+ "339.1",
+ "Biochamber Upgrade Disabled"));
+ } else {
+ GT_Utility.sendChatToPlayer(
+ player,
+ GT_Utility.trans(
+ "339",
+ "Biochamber Upgrade Enabled"));
+ }
+ })
+ .setVariableBackground(
+ GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setSize(90, 18)
+ .addTooltip(
+ "Enables nanites to construct organic circuitry. Required for Bioware and Wetware boards."))
+ .addChild(
+ new DrawableWidget().setDrawable(
+ GT_UITextures.OVERLAY_BUTTON_CYCLIC)
+ .setSize(
+ 18,
+ 18))
+ .addChild(
+ new TextWidget(
+ "Biochamber").setTextAlignment(
+ Alignment.Center)
+ .setPos(
+ 23,
+ 5))
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new MultiChildWidget().addChild(
+ new CycleButtonWidget().setToggle(
+ () -> mBioRotate,
+ val -> {
+ mBioRotate = val;
+ if (!mBioRotate) {
+ GT_Utility.sendChatToPlayer(
+ player,
+ GT_Utility.trans(
+ "340.1",
+ "Rotated biochamber disabled"));
+ } else {
+ GT_Utility.sendChatToPlayer(
+ player,
+ GT_Utility.trans(
+ "340",
+ "Rotated biochamber enabled"));
+ }
+ })
+ .setVariableBackground(
+ GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setSize(90, 18)
+ .addTooltip(
+ "Rotates the biochamber by 90 degrees."))
+ .addChild(
+ new DrawableWidget().setDrawable(
+ GT_UITextures.OVERLAY_BUTTON_CYCLIC)
+ .setSize(
+ 18,
+ 18))
+ .addChild(
+ new TextWidget(
+ "Bio Rotation").setTextAlignment(
+ Alignment.Center)
+ .setPos(
+ 23,
+ 5))
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new MultiChildWidget().addChild(
+ new CycleButtonWidget().setToggle(
+ () -> mOCTier1,
+ val -> {
+ mOCTier1 = val;
+ if (!mOCTier1) {
+ GT_Utility.sendChatToPlayer(
+ player,
+ GT_Utility.trans(
+ "341.1",
+ "Tier 1 cooling disabled"));
+ } else {
+ GT_Utility.sendChatToPlayer(
+ player,
+ GT_Utility.trans(
+ "341",
+ "Tier 1 cooling enabled"));
+ }
+ })
+ .setVariableBackground(
+ GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setSize(90, 18)
+ .addTooltip(
+ "Allows for overclocking. Requires 10 L/s of distilled water. Cooling upgrades are mutually exclusive."))
+ .addChild(
+ new DrawableWidget().setDrawable(
+ GT_UITextures.OVERLAY_BUTTON_CYCLIC)
+ .setSize(
+ 18,
+ 18))
+ .addChild(
+ new TextWidget(
+ "Liquid Cooling").setTextAlignment(
+ Alignment.Center)
+ .setPos(
+ 20,
+ 5))
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new MultiChildWidget().addChild(
+ new CycleButtonWidget().setToggle(
+ () -> mOCTier2,
+ val -> {
+ mOCTier2 = val;
+ if (!mOCTier2) {
+ GT_Utility.sendChatToPlayer(
+ player,
+ GT_Utility.trans(
+ "342.1",
+ "Tier 2 cooling disabled"));
+ } else {
+ GT_Utility.sendChatToPlayer(
+ player,
+ GT_Utility.trans(
+ "342",
+ "Tier 2 cooling enabled"));
+ }
+ })
+ .setVariableBackground(
+ GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setSize(90, 18)
+ .addTooltip(
+ "Enables perfect overclocking by allowing nanites to work with extreme speed and efficiency. Uses 10 L/s of space coolant."))
+ .addChild(
+ new DrawableWidget().setDrawable(
+ GT_UITextures.OVERLAY_BUTTON_CYCLIC)
+ .setSize(
+ 18,
+ 18))
+ .addChild(
+ new TextWidget(
+ "Thermosink").setTextAlignment(
+ Alignment.Center)
+ .setPos(
+ 20,
+ 5))
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new TextWidget(new Text("Trace Size")).setSize(90, 18)
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive())
+ .setPos(0, 4))
+ .widget(
+ new TextFieldWidget().setGetterInt(
+ () -> (int) ((1f / mRoughnessMultiplier) * 100f))
+ .setSetterInt(
+ val -> {
+ mRoughnessMultiplier = 100f
+ / val;
+ })
+ .setNumbers(50, 200)
+ .setTextColor(Color.WHITE.normal)
+ .setTextAlignment(Alignment.Center)
+ .addTooltip(
+ "Set the trace size. Smaller traces allow material savings but take longer to fabricate. Larger traces waste material but are fast. 50-200 μm.")
+ .setBackground(
+ GT_UITextures.BACKGROUND_TEXT_FIELD)
+ .setSize(90, 16))
+ .widget(
+ new DrawableWidget().setDrawable(
+ GT_UITextures.OVERLAY_BUTTON_CROSS)
+ .setSize(18, 18)
+ .addTooltip(
+ new Text(
+ "Can't change configuration when running !").color(
+ Color.RED.dark(
+ 3)))
+ .setEnabled(
+ widget -> getBaseMetaTileEntity().isActive()))
+ .setPos(10, 25))
+ .widget(
+ new DynamicPositionedColumn().setSynced(false)
+ .widget(
+ new TextWidget(
+ new Text("Bio Upgrade Offsets")).setSize(72, 18)
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new DynamicPositionedRow().setSynced(false)
+ .widget(
+ new TextFieldWidget().setGetterInt(
+ () -> mBioOffsets[0])
+ .setSetterInt(
+ val -> {
+ mBioOffsets[0] = val;
+ })
+ .setNumbers(
+ -16,
+ 16)
+ .setTextColor(
+ Color.WHITE.normal)
+ .setTextAlignment(
+ Alignment.Center)
+ .addTooltip(
+ "X Offset")
+ .setBackground(
+ GT_UITextures.BACKGROUND_TEXT_FIELD)
+ .setSize(
+ 36,
+ 18))
+ .widget(
+ new TextFieldWidget().setGetterInt(
+ () -> mBioOffsets[1])
+ .setSetterInt(
+ val -> {
+ mBioOffsets[1] = val;
+ })
+ .setNumbers(
+ -16,
+ 16)
+ .setTextColor(
+ Color.WHITE.normal)
+ .setTextAlignment(
+ Alignment.Center)
+ .addTooltip(
+ "Z Offset")
+ .setBackground(
+ GT_UITextures.BACKGROUND_TEXT_FIELD)
+ .setSize(
+ 36,
+ 18))
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new TextWidget(
+ new Text("Cooler Tier 1 Offsets")).setSize(72, 18)
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new DynamicPositionedRow().setSynced(false)
+ .widget(
+ new TextFieldWidget().setGetterInt(
+ () -> mOCTier1Offsets[0])
+ .setSetterInt(
+ val -> {
+ mOCTier1Offsets[0] = val;
+ })
+ .setNumbers(
+ -16,
+ 16)
+ .setTextColor(
+ Color.WHITE.normal)
+ .setTextAlignment(
+ Alignment.Center)
+ .addTooltip(
+ "X Offset")
+ .setBackground(
+ GT_UITextures.BACKGROUND_TEXT_FIELD)
+ .setSize(
+ 36,
+ 18))
+ .widget(
+ new TextFieldWidget().setGetterInt(
+ () -> mOCTier1Offsets[1])
+ .setSetterInt(
+ val -> {
+ mOCTier1Offsets[1] = val;
+ })
+ .setNumbers(
+ -16,
+ 16)
+ .setTextColor(
+ Color.WHITE.normal)
+ .setTextAlignment(
+ Alignment.Center)
+ .addTooltip(
+ "Z Offset")
+ .setBackground(
+ GT_UITextures.BACKGROUND_TEXT_FIELD)
+ .setSize(
+ 36,
+ 18))
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new TextWidget(
+ new Text("Cooler Tier 2 Offsets")).setSize(72, 18)
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new DynamicPositionedRow().setSynced(false)
+ .widget(
+ new TextFieldWidget().setGetterInt(
+ () -> mOCTier2Offsets[0])
+ .setSetterInt(
+ val -> {
+ mOCTier2Offsets[0] = val;
+ })
+ .setNumbers(
+ -16,
+ 16)
+ .setTextColor(
+ Color.WHITE.normal)
+ .setTextAlignment(
+ Alignment.Center)
+ .addTooltip(
+ "X Offset")
+ .setBackground(
+ GT_UITextures.BACKGROUND_TEXT_FIELD)
+ .setSize(
+ 36,
+ 18))
+ .widget(
+ new TextFieldWidget().setGetterInt(
+ () -> mOCTier2Offsets[1])
+ .setSetterInt(
+ val -> {
+ mOCTier2Offsets[1] = val;
+ })
+ .setNumbers(
+ -16,
+ 16)
+ .setTextColor(
+ Color.WHITE.normal)
+ .setTextAlignment(
+ Alignment.Center)
+ .addTooltip(
+ "Z Offset")
+ .setBackground(
+ GT_UITextures.BACKGROUND_TEXT_FIELD)
+ .setSize(
+ 36,
+ 18))
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .setPos(110, 25));
return builder.build();
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java
index d058bf1f42..25c3b7157e 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java
@@ -480,19 +480,44 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul
private boolean isMultiChunkloaded = true;
protected static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_MetaTileEntity_PlasmaForge> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_PlasmaForge>builder().addShape(STRUCTURE_PIECE_MAIN, structure_string)
- .addElement(
- 'C',
- ofCoil(GT_MetaTileEntity_PlasmaForge::setCoilLevel, GT_MetaTileEntity_PlasmaForge::getCoilLevel))
- .addElement(
- 'b',
- buildHatchAdder(GT_MetaTileEntity_PlasmaForge.class)
- .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Energy, ExoticEnergy, Maintenance)
- .casingIndex(DIM_INJECTION_CASING).dot(3)
- .buildAndChain(GregTech_API.sBlockCasings1, DIM_INJECTION_CASING))
- .addElement('N', ofBlock(GregTech_API.sBlockCasings1, DIM_TRANS_CASING))
- .addElement('s', ofBlock(GregTech_API.sBlockCasings1, DIM_BRIDGE_CASING)).build();
+ private static final IStructureDefinition<GT_MetaTileEntity_PlasmaForge> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_PlasmaForge>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ structure_string)
+ .addElement(
+ 'C',
+ ofCoil(
+ GT_MetaTileEntity_PlasmaForge::setCoilLevel,
+ GT_MetaTileEntity_PlasmaForge::getCoilLevel))
+ .addElement(
+ 'b',
+ buildHatchAdder(
+ GT_MetaTileEntity_PlasmaForge.class).atLeast(
+ InputHatch,
+ OutputHatch,
+ InputBus,
+ OutputBus,
+ Energy,
+ ExoticEnergy,
+ Maintenance)
+ .casingIndex(
+ DIM_INJECTION_CASING)
+ .dot(
+ 3)
+ .buildAndChain(
+ GregTech_API.sBlockCasings1,
+ DIM_INJECTION_CASING))
+ .addElement(
+ 'N',
+ ofBlock(
+ GregTech_API.sBlockCasings1,
+ DIM_TRANS_CASING))
+ .addElement(
+ 's',
+ ofBlock(
+ GregTech_API.sBlockCasings1,
+ DIM_BRIDGE_CASING))
+ .build();
@Override
protected boolean addBottomHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
@@ -517,87 +542,87 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
tt.addInfo("Transcending Dimensional Boundaries.")
- .addInfo(
- "Takes " + EnumChatFormatting.RED
- + GT_Utility.formatNumbers(max_efficiency_time_in_ticks / (3600 * 20))
- + EnumChatFormatting.GRAY
- + " hours of continuous run time to fully breach dimensional")
- .addInfo("boundaries and achieve maximum efficiency. This reduces fuel")
- .addInfo(
- "consumption by up to " + EnumChatFormatting.RED
- + GT_Utility.formatNumbers(100 * maximum_discount)
- + "%"
- + EnumChatFormatting.GRAY
- + ". Supports overclocking beyond MAX voltage.")
- .addInfo(AuthorColen).addSeparator().beginStructureBlock(33, 24, 33, false)
- .addStructureInfo("DTPF Structure is too complex! See schematic for details.")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "2,112" + EnumChatFormatting.GRAY + " Heating coils required.")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "120"
- + EnumChatFormatting.GRAY
- + " Dimensional bridge blocks required.")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "1,270"
- + EnumChatFormatting.GRAY
- + " Dimensional injection casings required.")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "2,121"
- + EnumChatFormatting.GRAY
- + " Dimensionally transcendent casings required.")
- .addStructureInfo("--------------------------------------------")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + "1"
- + EnumChatFormatting.GRAY
- + "-"
- + EnumChatFormatting.GOLD
- + "2"
- + EnumChatFormatting.GRAY
- + " energy hatches or "
- + EnumChatFormatting.GOLD
- + "1"
- + EnumChatFormatting.GRAY
- + " TT energy hatch.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " maintenance hatch.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + min_input_hatch
- + EnumChatFormatting.GRAY
- + "-"
- + EnumChatFormatting.GOLD
- + max_input_hatch
- + EnumChatFormatting.GRAY
- + " input hatches.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + min_output_hatch
- + EnumChatFormatting.GRAY
- + "-"
- + EnumChatFormatting.GOLD
- + max_output_hatch
- + EnumChatFormatting.GRAY
- + " output hatches.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + min_input_bus
- + EnumChatFormatting.GRAY
- + "-"
- + EnumChatFormatting.GOLD
- + max_input_bus
- + EnumChatFormatting.GRAY
- + " input busses.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + min_output_bus
- + EnumChatFormatting.GRAY
- + "-"
- + EnumChatFormatting.GOLD
- + max_input_bus
- + EnumChatFormatting.GRAY
- + " output busses.")
- .addStructureInfo("--------------------------------------------").toolTipFinisher("Gregtech");
+ .addInfo(
+ "Takes " + EnumChatFormatting.RED
+ + GT_Utility.formatNumbers(max_efficiency_time_in_ticks / (3600 * 20))
+ + EnumChatFormatting.GRAY
+ + " hours of continuous run time to fully breach dimensional")
+ .addInfo("boundaries and achieve maximum efficiency. This reduces fuel")
+ .addInfo(
+ "consumption by up to " + EnumChatFormatting.RED
+ + GT_Utility.formatNumbers(100 * maximum_discount)
+ + "%"
+ + EnumChatFormatting.GRAY
+ + ". Supports overclocking beyond MAX voltage.")
+ .addInfo(AuthorColen)
+ .addSeparator()
+ .beginStructureBlock(33, 24, 33, false)
+ .addStructureInfo("DTPF Structure is too complex! See schematic for details.")
+ .addStructureInfo(EnumChatFormatting.GOLD + "2,112" + EnumChatFormatting.GRAY + " Heating coils required.")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "120" + EnumChatFormatting.GRAY + " Dimensional bridge blocks required.")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "1,270"
+ + EnumChatFormatting.GRAY
+ + " Dimensional injection casings required.")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "2,121"
+ + EnumChatFormatting.GRAY
+ + " Dimensionally transcendent casings required.")
+ .addStructureInfo("--------------------------------------------")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + "1"
+ + EnumChatFormatting.GRAY
+ + "-"
+ + EnumChatFormatting.GOLD
+ + "2"
+ + EnumChatFormatting.GRAY
+ + " energy hatches or "
+ + EnumChatFormatting.GOLD
+ + "1"
+ + EnumChatFormatting.GRAY
+ + " TT energy hatch.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " maintenance hatch.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + min_input_hatch
+ + EnumChatFormatting.GRAY
+ + "-"
+ + EnumChatFormatting.GOLD
+ + max_input_hatch
+ + EnumChatFormatting.GRAY
+ + " input hatches.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + min_output_hatch
+ + EnumChatFormatting.GRAY
+ + "-"
+ + EnumChatFormatting.GOLD
+ + max_output_hatch
+ + EnumChatFormatting.GRAY
+ + " output hatches.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + min_input_bus
+ + EnumChatFormatting.GRAY
+ + "-"
+ + EnumChatFormatting.GOLD
+ + max_input_bus
+ + EnumChatFormatting.GRAY
+ + " input busses.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + min_output_bus
+ + EnumChatFormatting.GRAY
+ + "-"
+ + EnumChatFormatting.GOLD
+ + max_input_bus
+ + EnumChatFormatting.GRAY
+ + " output busses.")
+ .addStructureInfo("--------------------------------------------")
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -611,11 +636,20 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { casingTexturePages[0][DIM_BRIDGE_CASING],
- TextureFactory.builder().addIcon(OVERLAY_DTPF_ON).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FUSION1_GLOW).extFacing().glow().build() };
- return new ITexture[] { casingTexturePages[0][DIM_BRIDGE_CASING],
- TextureFactory.builder().addIcon(OVERLAY_DTPF_OFF).extFacing().build() };
+ if (aActive) return new ITexture[] { casingTexturePages[0][DIM_BRIDGE_CASING], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_DTPF_ON)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FUSION1_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][DIM_BRIDGE_CASING], TextureFactory.builder()
+ .addIcon(OVERLAY_DTPF_OFF)
+ .extFacing()
+ .build() };
}
return new ITexture[] { casingTexturePages[0][DIM_BRIDGE_CASING] };
}
@@ -658,8 +692,12 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul
long tTotalEU = GT_ExoticEnergyInputHelper.getTotalEuMulti(getExoticAndNormalEnergyHatchList());
// Look up recipe. If not found it will return null.
- GT_Recipe tRecipe_0 = GT_Recipe.GT_Recipe_Map.sPlasmaForgeRecipes
- .findRecipe(getBaseMetaTileEntity(), false, tTotalEU, tFluids, tItems);
+ GT_Recipe tRecipe_0 = GT_Recipe.GT_Recipe_Map.sPlasmaForgeRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ tTotalEU,
+ tFluids,
+ tItems);
// Check if recipe found.
if (tRecipe_0 == null) return false;
@@ -808,8 +846,10 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul
for (GT_MetaTileEntity_Hatch tHatch : mExoticEnergyHatches) {
if (isValidMetaTileEntity(tHatch)) {
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
}
@@ -840,14 +880,14 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul
StatCollector.translateToLocal("GT5U.multiblock.mei") + ": "
+ EnumChatFormatting.YELLOW
+ GT_Utility.formatNumbers(
- GT_ExoticEnergyInputHelper
- .getAverageInputVoltageMulti(getExoticAndNormalEnergyHatchList()))
+ GT_ExoticEnergyInputHelper.getAverageInputVoltageMulti(
+ getExoticAndNormalEnergyHatchList()))
+ EnumChatFormatting.RESET
+ " EU/t(*"
+ EnumChatFormatting.YELLOW
+ GT_Utility.formatNumbers(
- GT_ExoticEnergyInputHelper
- .getMaxWorkingInputAmpsMulti(getExoticAndNormalEnergyHatchList()))
+ GT_ExoticEnergyInputHelper.getMaxWorkingInputAmpsMulti(
+ getExoticAndNormalEnergyHatchList()))
+ EnumChatFormatting.RESET
+ "A) "
+ StatCollector.translateToLocal("GT5U.machines.tier")
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java
index 67afa63df8..04811bb5d4 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java
@@ -52,16 +52,20 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
@Override
protected IStructureDefinition<GT_MetaTileEntity_PrimitiveBlastFurnace> computeValue(Class<?> type) {
return IStructureDefinition.<GT_MetaTileEntity_PrimitiveBlastFurnace>builder()
- .addShape(
- "main",
- transpose(
- new String[][] { { "ccc", "c-c", "ccc" }, { "ccc", "clc", "ccc" },
- { "c~c", "clc", "ccc" }, { "ccc", "ccc", "ccc" }, }))
- .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMetaID())))
- .addElement(
- 'l',
- ofChain(isAir(), ofBlockAnyMeta(Blocks.lava, 1), ofBlockAnyMeta(Blocks.flowing_lava, 1)))
- .build();
+ .addShape(
+ "main",
+ transpose(
+ new String[][] { { "ccc", "c-c", "ccc" },
+ { "ccc", "clc", "ccc" }, { "c~c", "clc", "ccc" },
+ { "ccc", "ccc", "ccc" }, }))
+ .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMetaID())))
+ .addElement(
+ 'l',
+ ofChain(
+ isAir(),
+ ofBlockAnyMeta(Blocks.lava, 1),
+ ofBlockAnyMeta(Blocks.flowing_lava, 1)))
+ .build();
}
};
@@ -155,7 +159,8 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
@Override
public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) {
- return (GregTech_API.getCoverBehaviorNew(aCoverID.toStack()).isSimpleCover())
+ return (GregTech_API.getCoverBehaviorNew(aCoverID.toStack())
+ .isSimpleCover())
&& (super.allowCoverOnSide(aSide, aCoverID));
}
@@ -201,7 +206,9 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
@Override
public void setExtendedFacing(ExtendedFacing alignment) {
- getBaseMetaTileEntity().setFrontFacing((byte) alignment.getDirection().ordinal());
+ getBaseMetaTileEntity().setFrontFacing(
+ (byte) alignment.getDirection()
+ .ordinal());
}
@Override
@@ -210,18 +217,19 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
}
private boolean checkMachine() {
- return STRUCTURE_DEFINITION.get(this.getClass()).check(
- this,
- "main",
- getBaseMetaTileEntity().getWorld(),
- getExtendedFacing(),
- getBaseMetaTileEntity().getXCoord(),
- getBaseMetaTileEntity().getYCoord(),
- getBaseMetaTileEntity().getZCoord(),
- 1,
- 2,
- 0,
- !mMachine);
+ return STRUCTURE_DEFINITION.get(this.getClass())
+ .check(
+ this,
+ "main",
+ getBaseMetaTileEntity().getWorld(),
+ getExtendedFacing(),
+ getBaseMetaTileEntity().getXCoord(),
+ getBaseMetaTileEntity().getYCoord(),
+ getBaseMetaTileEntity().getZCoord(),
+ 1,
+ 2,
+ 0,
+ !mMachine);
}
protected abstract Block getCasingBlock();
@@ -240,12 +248,15 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive())) {
new WorldSpawnedEventBuilder.ParticleEventBuilder().setMotion(0D, 0.3D, 0D)
- .setIdentifier(ParticleFX.LARGE_SMOKE)
- .setPosition(
- lavaX + XSTR_INSTANCE.nextFloat(),
- aBaseMetaTileEntity.getOffsetY(aBaseMetaTileEntity.getBackFacing(), 1),
- lavaZ + XSTR_INSTANCE.nextFloat())
- .setWorld(getBaseMetaTileEntity().getWorld()).run();
+ .setIdentifier(ParticleFX.LARGE_SMOKE)
+ .setPosition(
+ lavaX + XSTR_INSTANCE.nextFloat(),
+ aBaseMetaTileEntity.getOffsetY(
+ aBaseMetaTileEntity.getBackFacing(),
+ 1),
+ lavaZ + XSTR_INSTANCE.nextFloat())
+ .setWorld(getBaseMetaTileEntity().getWorld())
+ .run();
}
if (aBaseMetaTileEntity.isServerSide()) {
if (mUpdated) {
@@ -265,7 +276,7 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
this.mMaxProgresstime = 0;
GT_Mod.achievements.issueAchievement(
aBaseMetaTileEntity.getWorld()
- .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()),
+ .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()),
"steel");
}
} else if (aBaseMetaTileEntity.isAllowedToWork()) {
@@ -282,22 +293,26 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
final short lavaY = aBaseMetaTileEntity.getYCoord();
if (aBaseMetaTileEntity.isActive()) {
if (aBaseMetaTileEntity.getAir(lavaX, lavaY, lavaZ)) {
- aBaseMetaTileEntity.getWorld().setBlock(lavaX, lavaY, lavaZ, Blocks.lava, 1, 2);
+ aBaseMetaTileEntity.getWorld()
+ .setBlock(lavaX, lavaY, lavaZ, Blocks.lava, 1, 2);
this.mUpdate = 1;
}
if (aBaseMetaTileEntity.getAir(lavaX, lavaY + 1, lavaZ)) {
- aBaseMetaTileEntity.getWorld().setBlock(lavaX, lavaY + 1, lavaZ, Blocks.lava, 1, 2);
+ aBaseMetaTileEntity.getWorld()
+ .setBlock(lavaX, lavaY + 1, lavaZ, Blocks.lava, 1, 2);
this.mUpdate = 1;
}
} else {
Block lowerLava = aBaseMetaTileEntity.getBlock(lavaX, lavaY, lavaZ);
Block upperLava = aBaseMetaTileEntity.getBlock(lavaX, lavaY + 1, lavaZ);
if (lowerLava == Blocks.lava) {
- aBaseMetaTileEntity.getWorld().setBlock(lavaX, lavaY, lavaZ, Blocks.air, 0, 2);
+ aBaseMetaTileEntity.getWorld()
+ .setBlock(lavaX, lavaY, lavaZ, Blocks.air, 0, 2);
this.mUpdate = 1;
}
if (upperLava == Blocks.lava) {
- aBaseMetaTileEntity.getWorld().setBlock(lavaX, lavaY + 1, lavaZ, Blocks.air, 0, 2);
+ aBaseMetaTileEntity.getWorld()
+ .setBlock(lavaX, lavaY + 1, lavaZ, Blocks.air, 0, 2);
this.mUpdate = 1;
}
}
@@ -349,9 +364,13 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
}
ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder()).setMotion(0D, 0D, 0D)
- .setPosition(x, y, z).setWorld(getBaseMetaTileEntity().getWorld());
- particleEventBuilder.setIdentifier(ParticleFX.SMOKE).run();
- particleEventBuilder.setIdentifier(ParticleFX.FLAME).run();
+ .setPosition(x, y, z)
+ .setWorld(
+ getBaseMetaTileEntity().getWorld());
+ particleEventBuilder.setIdentifier(ParticleFX.SMOKE)
+ .run();
+ particleEventBuilder.setIdentifier(ParticleFX.FLAME)
+ .run();
}
}
@@ -449,21 +468,22 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
@Override
public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBuildEnvironment env) {
if (mMachine) return -1;
- return STRUCTURE_DEFINITION.get(getClass()).survivalBuild(
- this,
- stackSize,
- "main",
- getBaseMetaTileEntity().getWorld(),
- getExtendedFacing(),
- getBaseMetaTileEntity().getXCoord(),
- getBaseMetaTileEntity().getYCoord(),
- getBaseMetaTileEntity().getZCoord(),
- 1,
- 2,
- 0,
- elementBudget,
- env,
- false);
+ return STRUCTURE_DEFINITION.get(getClass())
+ .survivalBuild(
+ this,
+ stackSize,
+ "main",
+ getBaseMetaTileEntity().getWorld(),
+ getExtendedFacing(),
+ getBaseMetaTileEntity().getXCoord(),
+ getBaseMetaTileEntity().getYCoord(),
+ getBaseMetaTileEntity().getZCoord(),
+ 1,
+ 2,
+ 0,
+ elementBudget,
+ env,
+ false);
}
@Override
@@ -473,19 +493,20 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- STRUCTURE_DEFINITION.get(getClass()).buildOrHints(
- this,
- stackSize,
- "main",
- getBaseMetaTileEntity().getWorld(),
- getExtendedFacing(),
- getBaseMetaTileEntity().getXCoord(),
- getBaseMetaTileEntity().getYCoord(),
- getBaseMetaTileEntity().getZCoord(),
- 1,
- 2,
- 0,
- hintsOnly);
+ STRUCTURE_DEFINITION.get(getClass())
+ .buildOrHints(
+ this,
+ stackSize,
+ "main",
+ getBaseMetaTileEntity().getWorld(),
+ getExtendedFacing(),
+ getBaseMetaTileEntity().getXCoord(),
+ getBaseMetaTileEntity().getYCoord(),
+ getBaseMetaTileEntity().getZCoord(),
+ 1,
+ 2,
+ 0,
+ hintsOnly);
}
@Override
@@ -496,39 +517,53 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
- new SlotWidget(inventoryHandler, 0).setBackground(
- getGUITextureSet().getItemSlot(),
- GT_UITextures.OVERLAY_SLOT_INGOT_STEAM.get(getSteamVariant())).setPos(33, 15))
- .widget(
- new SlotWidget(inventoryHandler, 1).setBackground(
- getGUITextureSet().getItemSlot(),
- GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(getSteamVariant())).setPos(33, 33))
- .widget(
- new SlotWidget(inventoryHandler, 2).setBackground(
- getGUITextureSet().getItemSlot(),
- GT_UITextures.OVERLAY_SLOT_FURNACE_STEAM.get(getSteamVariant())).setPos(33, 51))
- .widget(
- new SlotWidget(inventoryHandler, 3).setAccess(true, false)
- .setBackground(
- getGUITextureSet().getItemSlot(),
- GT_UITextures.OVERLAY_SLOT_INGOT_STEAM.get(getSteamVariant()))
- .setPos(85, 24))
- .widget(
- new SlotWidget(inventoryHandler, 4).setAccess(true, false)
- .setBackground(
- getGUITextureSet().getItemSlot(),
- GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(getSteamVariant()))
- .setPos(103, 24))
- .widget(
- new SlotWidget(inventoryHandler, 5).setAccess(true, false)
- .setBackground(
- getGUITextureSet().getItemSlot(),
- GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(getSteamVariant()))
- .setPos(121, 24))
- .widget(
- new ProgressBar().setTexture(GT_UITextures.PROGRESSBAR_ARROW_2_STEAM.get(getSteamVariant()), 20)
- .setProgress(() -> (float) mProgresstime / mMaxProgresstime)
- .setNEITransferRect(getRecipeMap().mNEIName).setPos(58, 24).setSize(20, 18));
+ new SlotWidget(inventoryHandler, 0)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_INGOT_STEAM.get(
+ getSteamVariant()))
+ .setPos(33, 15))
+ .widget(
+ new SlotWidget(inventoryHandler, 1)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(
+ getSteamVariant()))
+ .setPos(33, 33))
+ .widget(
+ new SlotWidget(inventoryHandler, 2)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_FURNACE_STEAM.get(
+ getSteamVariant()))
+ .setPos(33, 51))
+ .widget(
+ new SlotWidget(inventoryHandler, 3).setAccess(true, false)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_INGOT_STEAM.get(
+ getSteamVariant()))
+ .setPos(85, 24))
+ .widget(
+ new SlotWidget(inventoryHandler, 4).setAccess(true, false)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(
+ getSteamVariant()))
+ .setPos(103, 24))
+ .widget(
+ new SlotWidget(inventoryHandler, 5).setAccess(true, false)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(
+ getSteamVariant()))
+ .setPos(121, 24))
+ .widget(
+ new ProgressBar().setTexture(GT_UITextures.PROGRESSBAR_ARROW_2_STEAM.get(getSteamVariant()), 20)
+ .setProgress(() -> (float) mProgresstime / mMaxProgresstime)
+ .setNEITransferRect(getRecipeMap().mNEIName)
+ .setPos(58, 24)
+ .setSize(20, 18));
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
index b988f1f7a5..d50b7debfa 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
@@ -86,18 +86,25 @@ public class GT_MetaTileEntity_ProcessingArray
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Processing Array").addInfo("Runs supplied machines as if placed in the world")
- .addInfo("Place up to 64 singleblock GT machines into the controller")
- .addInfo("Note that you still need to supply power to them all")
- .addInfo("Use a screwdriver to enable separate input busses")
- .addInfo("Use a wire cutter to disable UEV+ downtiering")
- .addInfo("Doesn't work on certain machines, deal with it")
- .addInfo("Use it if you hate GT++, or want even more speed later on").addSeparator()
- .beginStructureBlock(3, 3, 3, true).addController("Front center")
- .addCasingInfoRange("Robust Tungstensteel Machine Casing", 14, 24, false)
- .addEnergyHatch("Any casing", 1).addMaintenanceHatch("Any casing", 1).addInputBus("Any casing", 1)
- .addInputHatch("Any casing", 1).addOutputBus("Any casing", 1).addOutputHatch("Any casing", 1)
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Processing Array")
+ .addInfo("Runs supplied machines as if placed in the world")
+ .addInfo("Place up to 64 singleblock GT machines into the controller")
+ .addInfo("Note that you still need to supply power to them all")
+ .addInfo("Use a screwdriver to enable separate input busses")
+ .addInfo("Use a wire cutter to disable UEV+ downtiering")
+ .addInfo("Doesn't work on certain machines, deal with it")
+ .addInfo("Use it if you hate GT++, or want even more speed later on")
+ .addSeparator()
+ .beginStructureBlock(3, 3, 3, true)
+ .addController("Front center")
+ .addCasingInfoRange("Robust Tungstensteel Machine Casing", 14, 24, false)
+ .addEnergyHatch("Any casing", 1)
+ .addMaintenanceHatch("Any casing", 1)
+ .addInputBus("Any casing", 1)
+ .addInputHatch("Any casing", 1)
+ .addOutputBus("Any casing", 1)
+ .addOutputHatch("Any casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -111,13 +118,26 @@ public class GT_MetaTileEntity_ProcessingArray
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { BlockIcons.casingTexturePages[0][48],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { BlockIcons.casingTexturePages[0][48],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { BlockIcons.casingTexturePages[0][48], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { BlockIcons.casingTexturePages[0][48], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_PROCESSING_ARRAY)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { Textures.BlockIcons.casingTexturePages[0][48] };
}
@@ -135,8 +155,10 @@ public class GT_MetaTileEntity_ProcessingArray
@Override
public GT_Recipe_Map getRecipeMap() {
if (isCorrectMachinePart(mInventory[1])) {
- int length = mInventory[1].getUnlocalizedName().length();
- String aMachineName = mInventory[1].getUnlocalizedName().substring(17, length - 8);
+ int length = mInventory[1].getUnlocalizedName()
+ .length();
+ String aMachineName = mInventory[1].getUnlocalizedName()
+ .substring(17, length - 8);
return GT_ProcessingArray_Manager.giveRecipeMap(aMachineName);
}
return null;
@@ -144,7 +166,8 @@ public class GT_MetaTileEntity_ProcessingArray
@Override
public boolean isCorrectMachinePart(ItemStack aStack) {
- return aStack != null && aStack.getUnlocalizedName().startsWith("gt.blockmachines.");
+ return aStack != null && aStack.getUnlocalizedName()
+ .startsWith("gt.blockmachines.");
}
@Override
@@ -166,8 +189,10 @@ public class GT_MetaTileEntity_ProcessingArray
startRecipeProcessing();
boolean result = checkRecipe(mInventory[1]);
if (result) {
- int length = mInventory[1].getUnlocalizedName().length();
- String aMachineName = mInventory[1].getUnlocalizedName().substring(17, length - 8);
+ int length = mInventory[1].getUnlocalizedName()
+ .length();
+ String aMachineName = mInventory[1].getUnlocalizedName()
+ .substring(17, length - 8);
SoundResource sound = GT_ProcessingArray_Manager.getSoundResource(aMachineName);
if (sound != null) {
sendLoopStart((byte) sound.id);
@@ -265,7 +290,7 @@ public class GT_MetaTileEntity_ProcessingArray
// We're locked to a single recipe, but haven't built the recipe checker yet.
// Build the checker on next successful recipe.
tSingleRecipeCheckBuilder = GT_Single_Recipe_Check_Processing_Array.processingArrayBuilder(this)
- .setBefore(tInputs, tFluids);
+ .setBefore(tInputs, tFluids);
}
boolean recipeLocked = false;
@@ -277,8 +302,10 @@ public class GT_MetaTileEntity_ProcessingArray
break;
} else if (mLockedToSingleRecipe && !recipeLocked) {
// We want to lock to a single run of the recipe.
- mSingleRecipeCheck = tSingleRecipeCheckBuilder.setAfter(tInputs, tFluids).setRecipe(tRecipe)
- .setRecipeAmperage(map.mAmperage).build();
+ mSingleRecipeCheck = tSingleRecipeCheckBuilder.setAfter(tInputs, tFluids)
+ .setRecipe(tRecipe)
+ .setRecipeAmperage(map.mAmperage)
+ .build();
recipeLocked = true;
}
}
@@ -324,13 +351,15 @@ public class GT_MetaTileEntity_ProcessingArray
ItemStack[] tOut = new ItemStack[aRecipe.mOutputs.length];
for (int h = 0; h < aRecipe.mOutputs.length; h++) {
if (aRecipe.getOutput(h) != null) {
- tOut[h] = aRecipe.getOutput(h).copy();
+ tOut[h] = aRecipe.getOutput(h)
+ .copy();
tOut[h].stackSize = 0;
}
}
FluidStack[] tFOut = new FluidStack[aRecipe.mFluidOutputs.length];
for (int i = 0; i < aRecipe.mFluidOutputs.length; i++)
- if (aRecipe.getFluidOutput(i) != null) tFOut[i] = aRecipe.getFluidOutput(i).copy();
+ if (aRecipe.getFluidOutput(i) != null) tFOut[i] = aRecipe.getFluidOutput(i)
+ .copy();
for (int f = 0; f < tOut.length; f++) {
if (aRecipe.mOutputs[f] != null && tOut[f] != null) {
for (int g = 0; g < parallel * multiplier; g++) {
@@ -348,9 +377,11 @@ public class GT_MetaTileEntity_ProcessingArray
oNumber++;
}
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
- this.mOutputItems = Arrays.stream(tOut).filter(Objects::nonNull)
- .flatMap(GT_MetaTileEntity_ProcessingArray::splitOversizedStack).filter(is -> is.stackSize > 0)
- .toArray(ItemStack[]::new);
+ this.mOutputItems = Arrays.stream(tOut)
+ .filter(Objects::nonNull)
+ .flatMap(GT_MetaTileEntity_ProcessingArray::splitOversizedStack)
+ .filter(is -> is.stackSize > 0)
+ .toArray(ItemStack[]::new);
this.mOutputFluids = tFOut;
updateSlots();
return true;
@@ -473,8 +504,15 @@ public class GT_MetaTileEntity_ProcessingArray
@Override
protected List<IHatchElement<? super GT_MetaTileEntity_CubicMultiBlockBase<?>>> getAllowedHatches() {
- return ImmutableList
- .of(InputHatch, OutputHatch, InputBus, OutputBus, Muffler, Maintenance, Energy, ExoticEnergy);
+ return ImmutableList.of(
+ InputHatch,
+ OutputHatch,
+ InputBus,
+ OutputBus,
+ Muffler,
+ Maintenance,
+ Energy,
+ ExoticEnergy);
}
@Override
@@ -494,8 +532,10 @@ public class GT_MetaTileEntity_ProcessingArray
long maxEnergy = 0;
for (GT_MetaTileEntity_Hatch tHatch : mExoticEnergyHatches) {
if (isValidMetaTileEntity(tHatch)) {
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
}
@@ -536,8 +576,8 @@ public class GT_MetaTileEntity_ProcessingArray
+ ": "
+ EnumChatFormatting.YELLOW
+ VN[GT_Utility.getTier(
- GT_ExoticEnergyInputHelper
- .getMaxInputVoltageMulti(getExoticAndNormalEnergyHatchList()))]
+ GT_ExoticEnergyInputHelper.getMaxInputVoltageMulti(
+ getExoticAndNormalEnergyHatchList()))]
+ EnumChatFormatting.RESET,
StatCollector.translateToLocal("GT5U.multiblock.problems") + ": "
+ EnumChatFormatting.RED
@@ -649,19 +689,22 @@ public class GT_MetaTileEntity_ProcessingArray
super.addUIWidgets(builder, buildContext);
builder.widget(
- new ButtonWidget().setOnClick((clickData, widget) -> downtierUEV = !downtierUEV).setPlayClickSound(true)
- .setBackground(() -> {
- List<UITexture> ret = new ArrayList<>();
- ret.add(GT_UITextures.BUTTON_STANDARD);
- if (downtierUEV) {
- ret.add(GT_UITextures.OVERLAY_BUTTON_DOWN_TIERING_ON);
- } else {
- ret.add(GT_UITextures.OVERLAY_BUTTON_DOWN_TIERING_OFF);
- }
- return ret.toArray(new IDrawable[0]);
- }).setPos(80, 91).setSize(16, 16)
- .addTooltip(StatCollector.translateToLocal("GT5U.gui.button.down_tier"))
- .setTooltipShowUpDelay(TOOLTIP_DELAY))
- .widget(new FakeSyncWidget.BooleanSyncer(() -> downtierUEV, val -> downtierUEV = val));
+ new ButtonWidget().setOnClick((clickData, widget) -> downtierUEV = !downtierUEV)
+ .setPlayClickSound(true)
+ .setBackground(() -> {
+ List<UITexture> ret = new ArrayList<>();
+ ret.add(GT_UITextures.BUTTON_STANDARD);
+ if (downtierUEV) {
+ ret.add(GT_UITextures.OVERLAY_BUTTON_DOWN_TIERING_ON);
+ } else {
+ ret.add(GT_UITextures.OVERLAY_BUTTON_DOWN_TIERING_OFF);
+ }
+ return ret.toArray(new IDrawable[0]);
+ })
+ .setPos(80, 91)
+ .setSize(16, 16)
+ .addTooltip(StatCollector.translateToLocal("GT5U.gui.button.down_tier"))
+ .setTooltipShowUpDelay(TOOLTIP_DELAY))
+ .widget(new FakeSyncWidget.BooleanSyncer(() -> downtierUEV, val -> downtierUEV = val));
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java
index a1e85f9b25..2644f9f49e 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java
@@ -54,31 +54,49 @@ public class GT_MetaTileEntity_PyrolyseOven extends
: ofBlock(GregTech_API.sBlockCasings1, 0);
return StructureDefinition.<GT_MetaTileEntity_PyrolyseOven>builder()
- .addShape(
- "main",
- transpose(
- new String[][] { { "ccccc", "ctttc", "ctttc", "ctttc", "ccccc" },
- { "ccccc", "c---c", "c---c", "c---c", "ccccc" },
- { "ccccc", "c---c", "c---c", "c---c", "ccccc" },
- { "bb~bb", "bCCCb", "bCCCb", "bCCCb", "bbbbb" }, }))
- .addElement('c', onElementPass(GT_MetaTileEntity_PyrolyseOven::onCasingAdded, tCasingElement))
- .addElement(
- 'C',
- ofCoil(
- GT_MetaTileEntity_PyrolyseOven::setCoilLevel,
- GT_MetaTileEntity_PyrolyseOven::getCoilLevel))
- .addElement(
- 'b',
- buildHatchAdder(GT_MetaTileEntity_PyrolyseOven.class)
- .atLeast(OutputBus, OutputHatch, Energy, Maintenance).casingIndex(CASING_INDEX).dot(1)
- .buildAndChain(
- onElementPass(GT_MetaTileEntity_PyrolyseOven::onCasingAdded, tCasingElement)))
- .addElement(
- 't',
- buildHatchAdder(GT_MetaTileEntity_PyrolyseOven.class).atLeast(InputBus, InputHatch, Muffler)
- .casingIndex(CASING_INDEX).dot(1).buildAndChain(
- onElementPass(GT_MetaTileEntity_PyrolyseOven::onCasingAdded, tCasingElement)))
- .build();
+ .addShape(
+ "main",
+ transpose(
+ new String[][] { { "ccccc", "ctttc", "ctttc", "ctttc", "ccccc" },
+ { "ccccc", "c---c", "c---c", "c---c", "ccccc" },
+ { "ccccc", "c---c", "c---c", "c---c", "ccccc" },
+ { "bb~bb", "bCCCb", "bCCCb", "bCCCb", "bbbbb" }, }))
+ .addElement(
+ 'c',
+ onElementPass(GT_MetaTileEntity_PyrolyseOven::onCasingAdded, tCasingElement))
+ .addElement(
+ 'C',
+ ofCoil(
+ GT_MetaTileEntity_PyrolyseOven::setCoilLevel,
+ GT_MetaTileEntity_PyrolyseOven::getCoilLevel))
+ .addElement(
+ 'b',
+ buildHatchAdder(
+ GT_MetaTileEntity_PyrolyseOven.class).atLeast(
+ OutputBus,
+ OutputHatch,
+ Energy,
+ Maintenance)
+ .casingIndex(CASING_INDEX)
+ .dot(1)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_PyrolyseOven::onCasingAdded,
+ tCasingElement)))
+ .addElement(
+ 't',
+ buildHatchAdder(
+ GT_MetaTileEntity_PyrolyseOven.class).atLeast(
+ InputBus,
+ InputHatch,
+ Muffler)
+ .casingIndex(CASING_INDEX)
+ .dot(1)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_PyrolyseOven::onCasingAdded,
+ tCasingElement)))
+ .build();
}
private int mCasingAmount;
@@ -94,17 +112,26 @@ public class GT_MetaTileEntity_PyrolyseOven extends
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Coke Oven").addInfo("Controller block for the Pyrolyse Oven")
- .addInfo("Industrial Charcoal producer").addInfo("Processing speed scales linearly with Coil tier:")
- .addInfo("CuNi: 50%, FeAlCr: 100%, Ni4Cr: 150%, TPV: 200%, etc.")
- .addInfo("EU/t is not affected by Coil tier").addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator().beginStructureBlock(5, 4, 5, true).addController("Front center")
- .addCasingInfoRange("Pyrolyse Oven Casing", 60, 80, false)
- .addOtherStructurePart("Heating Coils", "Center 3x1x3 of the bottom layer")
- .addEnergyHatch("Any bottom layer casing", 1).addMaintenanceHatch("Any bottom layer casing", 1)
- .addMufflerHatch("Center 3x1x3 area in top layer", 2).addInputBus("Center 3x1x3 area in top layer", 2)
- .addInputHatch("Center 3x1x3 area in top layer", 2).addOutputBus("Any bottom layer casing", 1)
- .addOutputHatch("Any bottom layer casing", 1).toolTipFinisher("Gregtech");
+ tt.addMachineType("Coke Oven")
+ .addInfo("Controller block for the Pyrolyse Oven")
+ .addInfo("Industrial Charcoal producer")
+ .addInfo("Processing speed scales linearly with Coil tier:")
+ .addInfo("CuNi: 50%, FeAlCr: 100%, Ni4Cr: 150%, TPV: 200%, etc.")
+ .addInfo("EU/t is not affected by Coil tier")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(5, 4, 5, true)
+ .addController("Front center")
+ .addCasingInfoRange("Pyrolyse Oven Casing", 60, 80, false)
+ .addOtherStructurePart("Heating Coils", "Center 3x1x3 of the bottom layer")
+ .addEnergyHatch("Any bottom layer casing", 1)
+ .addMaintenanceHatch("Any bottom layer casing", 1)
+ .addMufflerHatch("Center 3x1x3 area in top layer", 2)
+ .addInputBus("Center 3x1x3 area in top layer", 2)
+ .addInputHatch("Center 3x1x3 area in top layer", 2)
+ .addOutputBus("Any bottom layer casing", 1)
+ .addOutputHatch("Any bottom layer casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -112,13 +139,26 @@ public class GT_MetaTileEntity_PyrolyseOven extends
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { BlockIcons.casingTexturePages[8][66],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { BlockIcons.casingTexturePages[8][66],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PYROLYSE_OVEN).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { BlockIcons.casingTexturePages[8][66], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { BlockIcons.casingTexturePages[8][66], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_PYROLYSE_OVEN)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { Textures.BlockIcons.casingTexturePages[8][66] };
}
@@ -155,7 +195,8 @@ public class GT_MetaTileEntity_PyrolyseOven extends
if (mLockedToSingleRecipe) {
// We're locked to a single recipe, but haven't built the recipe checker yet.
// Build the checker on next successful recipe.
- tSingleRecipeCheckBuilder = GT_Single_Recipe_Check.builder(this).setBefore();
+ tSingleRecipeCheckBuilder = GT_Single_Recipe_Check.builder(this)
+ .setBefore();
}
tRecipe = GT_Recipe.GT_Recipe_Map.sPyrolyseRecipes.findRecipe(
@@ -168,7 +209,9 @@ public class GT_MetaTileEntity_PyrolyseOven extends
if (tRecipe == null || !tRecipe.isRecipeInputEqual(true, tFluids, tInputs)) return false;
if (mLockedToSingleRecipe) {
- mSingleRecipeCheck = tSingleRecipeCheckBuilder.setAfter().setRecipe(tRecipe).build();
+ mSingleRecipeCheck = tSingleRecipeCheckBuilder.setAfter()
+ .setRecipe(tRecipe)
+ .build();
}
}
@@ -253,7 +296,8 @@ public class GT_MetaTileEntity_PyrolyseOven extends
for (int zPos = tZ - 1; zPos <= tZ + 1; zPos++) {
if (aBaseMetaTileEntity.getBlock(xPos, tY, zPos) == GregTech_API.sBlockCasings1
&& aBaseMetaTileEntity.getMetaID(xPos, tY, zPos) == 13) {
- aBaseMetaTileEntity.getWorld().setBlock(xPos, tY, zPos, GregTech_API.sBlockCasings5, 1, 3);
+ aBaseMetaTileEntity.getWorld()
+ .setBlock(xPos, tY, zPos, GregTech_API.sBlockCasings5, 1, 3);
}
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_TranscendentPlasmaMixer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_TranscendentPlasmaMixer.java
index 16c417e8de..e60e999e0c 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_TranscendentPlasmaMixer.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_TranscendentPlasmaMixer.java
@@ -43,15 +43,36 @@ public class GT_MetaTileEntity_TranscendentPlasmaMixer
{ " CAC ", " ABA ", " ABA ", " ABA ", " ABA ", " ABA ", " CAC " } };
private static final String STRUCTURE_PIECE_MAIN = "MAIN";
- private static final IStructureDefinition<GT_MetaTileEntity_TranscendentPlasmaMixer> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_TranscendentPlasmaMixer>builder().addShape(STRUCTURE_PIECE_MAIN, structure)
- .addElement(
- 'B',
- buildHatchAdder(GT_MetaTileEntity_TranscendentPlasmaMixer.class)
- .atLeast(InputHatch, OutputHatch, InputBus, Maintenance).casingIndex(DIM_INJECTION_CASING)
- .dot(1).buildAndChain(GregTech_API.sBlockCasings1, DIM_INJECTION_CASING))
- .addElement('A', ofBlock(GregTech_API.sBlockCasings1, DIM_TRANS_CASING))
- .addElement('C', ofBlock(GregTech_API.sBlockCasings1, DIM_BRIDGE_CASING)).build();
+ private static final IStructureDefinition<GT_MetaTileEntity_TranscendentPlasmaMixer> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_TranscendentPlasmaMixer>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ structure)
+ .addElement(
+ 'B',
+ buildHatchAdder(
+ GT_MetaTileEntity_TranscendentPlasmaMixer.class).atLeast(
+ InputHatch,
+ OutputHatch,
+ InputBus,
+ Maintenance)
+ .casingIndex(
+ DIM_INJECTION_CASING)
+ .dot(
+ 1)
+ .buildAndChain(
+ GregTech_API.sBlockCasings1,
+ DIM_INJECTION_CASING))
+ .addElement(
+ 'A',
+ ofBlock(
+ GregTech_API.sBlockCasings1,
+ DIM_TRANS_CASING))
+ .addElement(
+ 'C',
+ ofBlock(
+ GregTech_API.sBlockCasings1,
+ DIM_BRIDGE_CASING))
+ .build();
private String ownerUUID;
@@ -71,15 +92,20 @@ public class GT_MetaTileEntity_TranscendentPlasmaMixer
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Transcendent Mixer").addInfo("Assisting in all your DTPF needs.")
- .addInfo("This multiblock will run in parallel according to the circuit provided to the")
- .addInfo("controller slot. E.g. 3x Circuit #16 = 48x parallel. All inputs will scale,")
- .addInfo("except time. All EU is deducted from wireless EU networks only.").addInfo(AuthorColen)
- .addInfo("Controller slot and circuit slot are separate.").addSeparator()
- .beginStructureBlock(5, 7, 5, false).addStructureInfo(GOLD + "1+ " + GRAY + "Input Hatch")
- .addStructureInfo(GOLD + "1+ " + GRAY + "Output Hatch")
- .addStructureInfo(GOLD + "1+ " + GRAY + "Input Bus")
- .addStructureInfo(GOLD + "1 " + GRAY + "Maintenance Hatch").toolTipFinisher("Gregtech");
+ tt.addMachineType("Transcendent Mixer")
+ .addInfo("Assisting in all your DTPF needs.")
+ .addInfo("This multiblock will run in parallel according to the circuit provided to the")
+ .addInfo("controller slot. E.g. 3x Circuit #16 = 48x parallel. All inputs will scale,")
+ .addInfo("except time. All EU is deducted from wireless EU networks only.")
+ .addInfo(AuthorColen)
+ .addInfo("Controller slot and circuit slot are separate.")
+ .addSeparator()
+ .beginStructureBlock(5, 7, 5, false)
+ .addStructureInfo(GOLD + "1+ " + GRAY + "Input Hatch")
+ .addStructureInfo(GOLD + "1+ " + GRAY + "Output Hatch")
+ .addStructureInfo(GOLD + "1+ " + GRAY + "Input Bus")
+ .addStructureInfo(GOLD + "1 " + GRAY + "Maintenance Hatch")
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -92,11 +118,20 @@ public class GT_MetaTileEntity_TranscendentPlasmaMixer
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { casingTexturePages[0][DIM_TRANS_CASING],
- TextureFactory.builder().addIcon(OVERLAY_DTPF_ON).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FUSION1_GLOW).extFacing().glow().build() };
- return new ITexture[] { casingTexturePages[0][DIM_TRANS_CASING],
- TextureFactory.builder().addIcon(OVERLAY_DTPF_OFF).extFacing().build() };
+ if (aActive) return new ITexture[] { casingTexturePages[0][DIM_TRANS_CASING], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_DTPF_ON)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FUSION1_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][DIM_TRANS_CASING], TextureFactory.builder()
+ .addIcon(OVERLAY_DTPF_OFF)
+ .extFacing()
+ .build() };
}
return new ITexture[] { casingTexturePages[0][DIM_TRANS_CASING] };
@@ -121,8 +156,12 @@ public class GT_MetaTileEntity_TranscendentPlasmaMixer
boolean processRecipe(ItemStack[] items, FluidStack[] fluids) {
- GT_Recipe originalRecipe = GT_Recipe.GT_Recipe_Map.sTranscendentPlasmaMixerRecipes
- .findRecipe(getBaseMetaTileEntity(), false, Long.MAX_VALUE, fluids, items);
+ GT_Recipe originalRecipe = GT_Recipe.GT_Recipe_Map.sTranscendentPlasmaMixerRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ Long.MAX_VALUE,
+ fluids,
+ items);
if (originalRecipe == null) {
return false;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java
index 463e00f7cd..eabdd8ee35 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java
@@ -41,12 +41,20 @@ public class GT_MetaTileEntity_VacuumFreezer
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Vacuum Freezer").addInfo("Controller Block for the Vacuum Freezer")
- .addInfo("Cools hot ingots and cells").addSeparator().beginStructureBlock(3, 3, 3, true)
- .addController("Front center").addCasingInfoRange("Frost Proof Machine Casing", 16, 24, false)
- .addEnergyHatch("Any casing", 1).addMaintenanceHatch("Any casing", 1).addInputHatch("Any casing", 1)
- .addOutputHatch("Any casing", 1).addInputBus("Any casing", 1).addOutputBus("Any casing", 1)
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Vacuum Freezer")
+ .addInfo("Controller Block for the Vacuum Freezer")
+ .addInfo("Cools hot ingots and cells")
+ .addSeparator()
+ .beginStructureBlock(3, 3, 3, true)
+ .addController("Front center")
+ .addCasingInfoRange("Frost Proof Machine Casing", 16, 24, false)
+ .addEnergyHatch("Any casing", 1)
+ .addMaintenanceHatch("Any casing", 1)
+ .addInputHatch("Any casing", 1)
+ .addOutputHatch("Any casing", 1)
+ .addInputBus("Any casing", 1)
+ .addOutputBus("Any casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -56,15 +64,27 @@ public class GT_MetaTileEntity_VacuumFreezer
ITexture[] rTexture;
if (aSide == aFacing) {
if (aActive) {
- rTexture = new ITexture[] { casingTexturePages[0][17],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE_GLOW).extFacing().glow()
- .build() };
+ rTexture = new ITexture[] { casingTexturePages[0][17], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
} else {
- rTexture = new ITexture[] { casingTexturePages[0][17],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_VACUUM_FREEZER).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_VACUUM_FREEZER_GLOW).extFacing().glow()
- .build() };
+ rTexture = new ITexture[] { casingTexturePages[0][17], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_VACUUM_FREEZER)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_VACUUM_FREEZER_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
} else {
rTexture = new ITexture[] { casingTexturePages[0][17] };
diff --git a/src/main/java/gregtech/common/tileentities/machines/multiblock/MultiBlock_CokeOven.java b/src/main/java/gregtech/common/tileentities/machines/multiblock/MultiBlock_CokeOven.java
index b69909d9fb..4114ee5564 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multiblock/MultiBlock_CokeOven.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multiblock/MultiBlock_CokeOven.java
@@ -78,9 +78,12 @@ public class MultiBlock_CokeOven extends MultiBlockController<MultiBlock_CokeOve
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Coke Oven").addInfo("Used for charcoal").beginStructureBlock(3, 3, 3, true)
- .addCasingInfoExactly("Coke Oven Bricks", 25, false)
- .addPollutionAmount(POLLUTION_LOGIC.getPollutionAmount()).toolTipFinisher(GT_Values.AuthorBlueWeabo);
+ tt.addMachineType("Coke Oven")
+ .addInfo("Used for charcoal")
+ .beginStructureBlock(3, 3, 3, true)
+ .addCasingInfoExactly("Coke Oven Bricks", 25, false)
+ .addPollutionAmount(POLLUTION_LOGIC.getPollutionAmount())
+ .toolTipFinisher(GT_Values.AuthorBlueWeabo);
return tt;
}
@@ -92,13 +95,19 @@ public class MultiBlock_CokeOven extends MultiBlockController<MultiBlock_CokeOve
@Override
public IStructureDefinition<MultiBlock_CokeOven> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
- STRUCTURE_DEFINITION = StructureDefinition.<MultiBlock_CokeOven>builder().addShape(
- MAIN,
- new String[][] { { "AAA", "A~A", "AAA" }, { "AAA", "A-A", "AAA" }, { "AAA", "AAA", "AAA" } })
- .addElement(
- 'A',
- addMultiTileCasing("gt.multitileentity.casings", getCasingMeta(), ITEM_IN | ITEM_OUT))
- .build();
+ STRUCTURE_DEFINITION = StructureDefinition.<MultiBlock_CokeOven>builder()
+ .addShape(
+ MAIN,
+ new String[][] { { "AAA", "A~A", "AAA" },
+ { "AAA", "A-A", "AAA" },
+ { "AAA", "AAA", "AAA" } })
+ .addElement(
+ 'A',
+ addMultiTileCasing(
+ "gt.multitileentity.casings",
+ getCasingMeta(),
+ ITEM_IN | ITEM_OUT))
+ .build();
}
return STRUCTURE_DEFINITION;
}
@@ -110,8 +119,12 @@ public class MultiBlock_CokeOven extends MultiBlockController<MultiBlock_CokeOve
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
- builder.widget(new SlotWidget(inputInventory, 0).setPos(18, 18).setSize(18, 18));
- builder.widget(new SlotWidget(outputInventory, 0).setPos(36, 36).setSize(18, 18));
+ builder.widget(
+ new SlotWidget(inputInventory, 0).setPos(18, 18)
+ .setSize(18, 18));
+ builder.widget(
+ new SlotWidget(outputInventory, 0).setPos(36, 36)
+ .setSize(18, 18));
builder.widget(createButtons());
}
@@ -123,8 +136,9 @@ public class MultiBlock_CokeOven extends MultiBlockController<MultiBlock_CokeOve
if (NetworkUtils.isClient()) {
final FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer;
// noinspection unchecked
- final List<String> titleLines = fontRenderer
- .listFormattedStringToWidth(title, getGUIWidth() - (TAB_PADDING + TITLE_PADDING) * 2);
+ final List<String> titleLines = fontRenderer.listFormattedStringToWidth(
+ title,
+ getGUIWidth() - (TAB_PADDING + TITLE_PADDING) * 2);
titleWidth = titleLines.size() > 1 ? getGUIWidth() - (TAB_PADDING + TITLE_PADDING) * 2
: fontRenderer.getStringWidth(title);
// noinspection PointlessArithmeticExpression
@@ -133,17 +147,21 @@ public class MultiBlock_CokeOven extends MultiBlockController<MultiBlock_CokeOve
final DrawableWidget tab = new DrawableWidget();
final TextWidget text = new TextWidget(title).setDefaultColor(getTitleColor())
- .setTextAlignment(Alignment.CenterLeft).setMaxWidth(titleWidth);
+ .setTextAlignment(Alignment.CenterLeft)
+ .setMaxWidth(titleWidth);
if (GT_Mod.gregtechproxy.mTitleTabStyle == 1) {
- tab.setDrawable(getGUITextureSet().getTitleTabAngular()).setPos(0, -(titleHeight + TAB_PADDING) + 1)
- .setSize(getGUIWidth(), titleHeight + TAB_PADDING * 2);
+ tab.setDrawable(getGUITextureSet().getTitleTabAngular())
+ .setPos(0, -(titleHeight + TAB_PADDING) + 1)
+ .setSize(getGUIWidth(), titleHeight + TAB_PADDING * 2);
text.setPos(TAB_PADDING + TITLE_PADDING, -titleHeight + TAB_PADDING);
} else {
- tab.setDrawable(getGUITextureSet().getTitleTabDark()).setPos(0, -(titleHeight + TAB_PADDING * 2) + 1)
- .setSize(titleWidth + (TAB_PADDING + TITLE_PADDING) * 2, titleHeight + TAB_PADDING * 2 - 1);
+ tab.setDrawable(getGUITextureSet().getTitleTabDark())
+ .setPos(0, -(titleHeight + TAB_PADDING * 2) + 1)
+ .setSize(titleWidth + (TAB_PADDING + TITLE_PADDING) * 2, titleHeight + TAB_PADDING * 2 - 1);
text.setPos(TAB_PADDING + TITLE_PADDING, -titleHeight);
}
- builder.widget(tab).widget(text);
+ builder.widget(tab)
+ .widget(text);
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/multiblock/MultiBlock_Macerator.java b/src/main/java/gregtech/common/tileentities/machines/multiblock/MultiBlock_Macerator.java
index 3c0619e667..acd611ab12 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multiblock/MultiBlock_Macerator.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multiblock/MultiBlock_Macerator.java
@@ -50,33 +50,67 @@ public class MultiBlock_Macerator extends MultiBlock_Stackable<MultiBlock_Macera
public IStructureDefinition<MultiBlock_Macerator> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<MultiBlock_Macerator>builder()
- .addShape(
- STACKABLE_TOP,
- transpose(new String[][] { { " CCC ", "CCCCC", "CCCCC", "CCCCC", " CCC " }, }))
- .addShape(
- STACKABLE_MIDDLE,
- transpose(new String[][] { { " BBB ", " B---B ", "DC---CD", " B---B ", " BBB " }, }))
- .addShape(
- STACKABLE_BOTTOM,
- transpose(new String[][] { { " G~F ", "AAAAA", "AAAAA", "AAAAA", " AAA " }, }))
- .addElement(
- 'A',
- ofChain(addMultiTileCasing("gt.multitileentity.casings", getCasingMeta(), ENERGY_IN)))
- .addElement(
- 'B',
- ofChain(
- addMultiTileCasing(
- "gt.multitileentity.casings",
- getCasingMeta(),
- FLUID_IN | ITEM_IN | FLUID_OUT | ITEM_OUT)))
- .addElement('C', addMultiTileCasing("gt.multitileentity.casings", getCasingMeta(), NOTHING))
- .addElement('D', addMultiTileCasing("gt.multitileentity.casings", getCasingMeta(), NOTHING))
- .addElement(
- 'F',
- ofChain(
- addMultiTileCasing("gt.multitileentity.casings", 20001, NOTHING),
- addMultiTileCasing("gt.multitileentity.casings", 20002, NOTHING)))
- .addElement('G', addMultiTileCasing("gt.multitileentity.casings", 10000, NOTHING)).build();
+ .addShape(
+ STACKABLE_TOP,
+ transpose(
+ new String[][] { { " CCC ", "CCCCC", "CCCCC",
+ "CCCCC", " CCC " }, }))
+ .addShape(
+ STACKABLE_MIDDLE,
+ transpose(
+ new String[][] { { " BBB ", " B---B ",
+ "DC---CD", " B---B ", " BBB " }, }))
+ .addShape(
+ STACKABLE_BOTTOM,
+ transpose(
+ new String[][] { { " G~F ", "AAAAA", "AAAAA",
+ "AAAAA", " AAA " }, }))
+ .addElement(
+ 'A',
+ ofChain(
+ addMultiTileCasing(
+ "gt.multitileentity.casings",
+ getCasingMeta(),
+ ENERGY_IN)))
+ .addElement(
+ 'B',
+ ofChain(
+ addMultiTileCasing(
+ "gt.multitileentity.casings",
+ getCasingMeta(),
+ FLUID_IN | ITEM_IN
+ | FLUID_OUT
+ | ITEM_OUT)))
+ .addElement(
+ 'C',
+ addMultiTileCasing(
+ "gt.multitileentity.casings",
+ getCasingMeta(),
+ NOTHING))
+ .addElement(
+ 'D',
+ addMultiTileCasing(
+ "gt.multitileentity.casings",
+ getCasingMeta(),
+ NOTHING))
+ .addElement(
+ 'F',
+ ofChain(
+ addMultiTileCasing(
+ "gt.multitileentity.casings",
+ 20001,
+ NOTHING),
+ addMultiTileCasing(
+ "gt.multitileentity.casings",
+ 20002,
+ NOTHING)))
+ .addElement(
+ 'G',
+ addMultiTileCasing(
+ "gt.multitileentity.casings",
+ 10000,
+ NOTHING))
+ .build();
}
return STRUCTURE_DEFINITION;
}
@@ -99,17 +133,20 @@ public class MultiBlock_Macerator extends MultiBlock_Stackable<MultiBlock_Macera
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Macerator").addInfo("Controller for the Macerator").addSeparator()
- .beginVariableStructureBlock(7, 9, 2 + getMinStacks(), 2 + getMaxStacks(), 7, 9, true)
- .addController("Bottom Front Center").addCasingInfoExactly("Test Casing", 60, false)
- .addEnergyHatch("Any bottom layer casing")
- .addInputHatch("Any non-optional external facing casing on the stacks")
- .addInputBus("Any non-optional external facing casing on the stacks")
- .addOutputHatch("Any non-optional external facing casing on the stacks")
- .addOutputBus("Any non-optional external facing casing on the stacks")
- .addStructureInfo(
- String.format("Stackable middle stacks between %d-%d time(s).", getMinStacks(), getMaxStacks()))
- .toolTipFinisher("Wildcard");
+ tt.addMachineType("Macerator")
+ .addInfo("Controller for the Macerator")
+ .addSeparator()
+ .beginVariableStructureBlock(7, 9, 2 + getMinStacks(), 2 + getMaxStacks(), 7, 9, true)
+ .addController("Bottom Front Center")
+ .addCasingInfoExactly("Test Casing", 60, false)
+ .addEnergyHatch("Any bottom layer casing")
+ .addInputHatch("Any non-optional external facing casing on the stacks")
+ .addInputBus("Any non-optional external facing casing on the stacks")
+ .addOutputHatch("Any non-optional external facing casing on the stacks")
+ .addOutputBus("Any non-optional external facing casing on the stacks")
+ .addStructureInfo(
+ String.format("Stackable middle stacks between %d-%d time(s).", getMinStacks(), getMaxStacks()))
+ .toolTipFinisher("Wildcard");
return tt;
}
@@ -151,17 +188,25 @@ public class MultiBlock_Macerator extends MultiBlock_Stackable<MultiBlock_Macera
// Base Texture
MACHINE_CASINGS[1][0],
// Active
- isActive()
- ? TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE).extFacing()
- .build()
- : TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE).extFacing()
- .build(),
+ isActive() ? TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE)
+ .extFacing()
+ .build()
+ : TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)
+ .extFacing()
+ .build(),
// Active Glow
- isActive()
- ? TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW)
- .extFacing().glow().build()
- : TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW).extFacing()
- .glow().build() };
+ isActive() ? TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build()
+ : TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
// Base Texture
return new ITexture[] { MACHINE_CASINGS[1][0] };
@@ -177,7 +222,8 @@ public class MultiBlock_Macerator extends MultiBlock_Stackable<MultiBlock_Macera
}
return false;
} else {
- ItemStack[] tItemInputs = getInventoriesForInput().getStacks().toArray(new ItemStack[0]);
+ ItemStack[] tItemInputs = getInventoriesForInput().getStacks()
+ .toArray(new ItemStack[0]);
return processRecipe(tItemInputs, null);
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java
index 4f9677eda6..bfbe56a665 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java
@@ -55,57 +55,81 @@ public class GT_MetaTileEntity_AlloySmelter_Bronze extends GT_MetaTileEntity_Bas
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] { super.getSideFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
- return new ITexture[] { super.getSideFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_ALLOY_SMELTER),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_ALLOY_SMELTER),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] { super.getFrontFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[] { super.getFrontFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_ALLOY_SMELTER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_ALLOY_SMELTER),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[] { super.getTopFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
- return new ITexture[] { super.getTopFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_TOP_STEAM_ALLOY_SMELTER),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_ALLOY_SMELTER_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_ALLOY_SMELTER),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_ALLOY_SMELTER_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] { super.getBottomFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[] { super.getBottomFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_GLOW)
+ .glow()
+ .build() };
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java
index ca08d647a1..c84e6a05d5 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java
@@ -55,57 +55,81 @@ public class GT_MetaTileEntity_AlloySmelter_Steel extends GT_MetaTileEntity_Basi
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] { super.getSideFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
- return new ITexture[] { super.getSideFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_ALLOY_SMELTER),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_ALLOY_SMELTER),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_ALLOY_SMELTER_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] { super.getFrontFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[] { super.getFrontFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_ALLOY_SMELTER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_ALLOY_SMELTER),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_ALLOY_SMELTER_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[] { super.getTopFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
- return new ITexture[] { super.getTopFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_TOP_STEAM_ALLOY_SMELTER),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_ALLOY_SMELTER_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_ALLOY_SMELTER),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_ALLOY_SMELTER_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] { super.getBottomFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[] { super.getBottomFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_GLOW)
+ .glow()
+ .build() };
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java
index 3f7eed2c99..26a8e1056c 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java
@@ -50,56 +50,80 @@ public class GT_MetaTileEntity_Compressor_Bronze extends GT_MetaTileEntity_Basic
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] { super.getSideFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
- return new ITexture[] { super.getSideFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] { super.getFrontFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[] { super.getFrontFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[] { super.getTopFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_COMPRESSOR),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] { super.getBottomFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[] { super.getBottomFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_GLOW)
+ .glow()
+ .build() };
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java
index 3f6e318284..060826b966 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java
@@ -50,56 +50,80 @@ public class GT_MetaTileEntity_Compressor_Steel extends GT_MetaTileEntity_BasicM
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] { super.getSideFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
- return new ITexture[] { super.getSideFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_COMPRESSOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_COMPRESSOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] { super.getFrontFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[] { super.getFrontFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_COMPRESSOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_COMPRESSOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[] { super.getTopFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_COMPRESSOR),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_COMPRESSOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] { super.getBottomFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[] { super.getBottomFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_COMPRESSOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_COMPRESSOR_GLOW)
+ .glow()
+ .build() };
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java
index d9597663da..1f03faca48 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java
@@ -50,55 +50,79 @@ public class GT_MetaTileEntity_Extractor_Bronze extends GT_MetaTileEntity_BasicM
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] { super.getSideFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_EXTRACTOR),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] { super.getFrontFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[] { super.getFrontFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[] { super.getTopFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_EXTRACTOR),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] { super.getBottomFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[] { super.getBottomFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_GLOW)
+ .glow()
+ .build() };
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java
index f90e0044bd..83f2899259 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java
@@ -50,55 +50,79 @@ public class GT_MetaTileEntity_Extractor_Steel extends GT_MetaTileEntity_BasicMa
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] { super.getSideFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_EXTRACTOR),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_EXTRACTOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] { super.getFrontFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[] { super.getFrontFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_EXTRACTOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_EXTRACTOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[] { super.getTopFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_EXTRACTOR),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_EXTRACTOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] { super.getBottomFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[] { super.getBottomFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_EXTRACTOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_EXTRACTOR_GLOW)
+ .glow()
+ .build() };
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java
index 3f25499dd8..d648c6a41d 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java
@@ -58,54 +58,77 @@ public class GT_MetaTileEntity_ForgeHammer_Bronze extends GT_MetaTileEntity_Basi
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] { super.getSideFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_HAMMER),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_HAMMER_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_HAMMER_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] { super.getFrontFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
return new ITexture[] { super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_HAMMER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_HAMMER_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_HAMMER_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
return new ITexture[] { super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_HAMMER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_HAMMER_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_HAMMER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_HAMMER),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_HAMMER_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_HAMMER_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] { super.getBottomFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
return new ITexture[] { super.getBottomFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_GLOW).glow().build() };
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER), TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_GLOW)
+ .glow()
+ .build() };
}
/**
@@ -159,8 +182,11 @@ public class GT_MetaTileEntity_ForgeHammer_Bronze extends GT_MetaTileEntity_Basi
}
ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder()).setMotion(mX, 0, mZ)
- .setPosition(x, y, z).setWorld(getBaseMetaTileEntity().getWorld());
- particleEventBuilder.setIdentifier(ParticleFX.LAVA).run();
+ .setPosition(x, y, z)
+ .setWorld(
+ getBaseMetaTileEntity().getWorld());
+ particleEventBuilder.setIdentifier(ParticleFX.LAVA)
+ .run();
}
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java
index acfd8e6b28..22292c814b 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java
@@ -58,54 +58,77 @@ public class GT_MetaTileEntity_ForgeHammer_Steel extends GT_MetaTileEntity_Basic
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] { super.getSideFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_HAMMER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_HAMMER),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_HAMMER_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_HAMMER_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] { super.getFrontFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_HAMMER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
return new ITexture[] { super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_HAMMER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_HAMMER_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_HAMMER_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
return new ITexture[] { super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_HAMMER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_HAMMER_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_HAMMER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_HAMMER),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_HAMMER_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_HAMMER_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] { super.getBottomFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
return new ITexture[] { super.getBottomFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_GLOW).glow().build() };
+ TextureFactory.of(OVERLAY_BOTTOM_STEAM_HAMMER), TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_HAMMER_GLOW)
+ .glow()
+ .build() };
}
/**
@@ -159,8 +182,11 @@ public class GT_MetaTileEntity_ForgeHammer_Steel extends GT_MetaTileEntity_Basic
}
ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder()).setMotion(mX, 0, mZ)
- .setPosition(x, y, z).setWorld(getBaseMetaTileEntity().getWorld());
- particleEventBuilder.setIdentifier(ParticleFX.LAVA).run();
+ .setPosition(x, y, z)
+ .setWorld(
+ getBaseMetaTileEntity().getWorld());
+ particleEventBuilder.setIdentifier(ParticleFX.LAVA)
+ .run();
}
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java
index e102d797e8..deb0d6c2d8 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java
@@ -75,48 +75,69 @@ public class GT_MetaTileEntity_Furnace_Bronze extends GT_MetaTileEntity_BasicMac
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] { super.getSideFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_FURNACE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_FURNACE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] { super.getFrontFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
return new ITexture[] { super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_FURNACE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_FURNACE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[] { super.getTopFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_FURNACE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_FURNACE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] { super.getBottomFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
@@ -124,6 +145,9 @@ public class GT_MetaTileEntity_Furnace_Bronze extends GT_MetaTileEntity_BasicMac
return new ITexture[] { super.getBottomFacingInactive(aColor)[0],
TextureFactory.of(
TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_GLOW)
+ .glow()
+ .build()) };
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java
index 8d0414103e..285e85943f 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java
@@ -75,54 +75,78 @@ public class GT_MetaTileEntity_Furnace_Steel extends GT_MetaTileEntity_BasicMach
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] { super.getSideFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_FURNACE_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_FURNACE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_FURNACE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_FURNACE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] { super.getFrontFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_FURNACE_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
return new ITexture[] { super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_FURNACE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_FURNACE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_FURNACE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[] { super.getTopFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_FURNACE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_FURNACE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_FURNACE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] { super.getBottomFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[] { super.getBottomFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_FURNACE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_FURNACE_GLOW)
+ .glow()
+ .build() };
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java
index def8af9fe3..936b75bc8c 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java
@@ -50,12 +50,17 @@ public class GT_MetaTileEntity_Macerator_Bronze extends GT_MetaTileEntity_BasicM
&& aBaseMetaTileEntity.getCoverIDAtSide(topFacing) == 0
&& !aBaseMetaTileEntity.getOpacityAtSide(topFacing)) {
- new ParticleEventBuilder().setMotion(0.0D, 0.0D, 0.0D).setIdentifier(ParticleFX.SMOKE)
- .setPosition(
- aBaseMetaTileEntity.getXCoord() + 0.8F - XSTR_INSTANCE.nextFloat() * 0.6F,
- aBaseMetaTileEntity.getYCoord() + 0.9F + XSTR_INSTANCE.nextFloat() * 0.2F,
- aBaseMetaTileEntity.getZCoord() + 0.8F - XSTR_INSTANCE.nextFloat() * 0.6F)
- .setWorld(getBaseMetaTileEntity().getWorld()).run();
+ new ParticleEventBuilder().setMotion(0.0D, 0.0D, 0.0D)
+ .setIdentifier(ParticleFX.SMOKE)
+ .setPosition(
+ aBaseMetaTileEntity.getXCoord() + 0.8F
+ - XSTR_INSTANCE.nextFloat() * 0.6F,
+ aBaseMetaTileEntity.getYCoord() + 0.9F
+ + XSTR_INSTANCE.nextFloat() * 0.2F,
+ aBaseMetaTileEntity.getZCoord() + 0.8F
+ - XSTR_INSTANCE.nextFloat() * 0.6F)
+ .setWorld(getBaseMetaTileEntity().getWorld())
+ .run();
}
}
}
@@ -67,8 +72,14 @@ public class GT_MetaTileEntity_Macerator_Bronze extends GT_MetaTileEntity_BasicM
@Override
public int checkRecipe() {
- GT_Recipe tRecipe = getRecipeList()
- .findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[mTier], null, null, getAllInputs());
+ GT_Recipe tRecipe = getRecipeList().findRecipe(
+ getBaseMetaTileEntity(),
+ mLastRecipe,
+ false,
+ V[mTier],
+ null,
+ null,
+ getAllInputs());
if (tRecipe == null) return DID_NOT_FIND_RECIPE;
if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe;
if (!canOutput(tRecipe)) {
@@ -105,55 +116,79 @@ public class GT_MetaTileEntity_Macerator_Bronze extends GT_MetaTileEntity_BasicM
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] { super.getSideFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_MACERATOR),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_MACERATOR_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_MACERATOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] { super.getFrontFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[] { super.getFrontFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_MACERATOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_MACERATOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[] { super.getTopFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_MACERATOR),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_MACERATOR_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_MACERATOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] { super.getBottomFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[] { super.getBottomFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_GLOW)
+ .glow()
+ .build() };
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java
index 81027ca069..64b44a5510 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java
@@ -51,12 +51,16 @@ public class GT_MetaTileEntity_Macerator_Steel extends GT_MetaTileEntity_BasicMa
&& !aBaseMetaTileEntity.getOpacityAtSide(topFacing)) {
new WorldSpawnedEventBuilder.ParticleEventBuilder().setMotion(0.0D, 0.0D, 0.0D)
- .setIdentifier(ParticleFX.SMOKE)
- .setPosition(
- aBaseMetaTileEntity.getXCoord() + 0.8F - XSTR_INSTANCE.nextFloat() * 0.6F,
- aBaseMetaTileEntity.getYCoord() + 0.9F + XSTR_INSTANCE.nextFloat() * 0.2F,
- aBaseMetaTileEntity.getZCoord() + 0.8F - XSTR_INSTANCE.nextFloat() * 0.6F)
- .setWorld(getBaseMetaTileEntity().getWorld()).run();
+ .setIdentifier(ParticleFX.SMOKE)
+ .setPosition(
+ aBaseMetaTileEntity.getXCoord() + 0.8F
+ - XSTR_INSTANCE.nextFloat() * 0.6F,
+ aBaseMetaTileEntity.getYCoord() + 0.9F
+ + XSTR_INSTANCE.nextFloat() * 0.2F,
+ aBaseMetaTileEntity.getZCoord() + 0.8F
+ - XSTR_INSTANCE.nextFloat() * 0.6F)
+ .setWorld(getBaseMetaTileEntity().getWorld())
+ .run();
}
}
}
@@ -68,8 +72,14 @@ public class GT_MetaTileEntity_Macerator_Steel extends GT_MetaTileEntity_BasicMa
@Override
public int checkRecipe() {
- GT_Recipe tRecipe = getRecipeList()
- .findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[mTier], null, null, getAllInputs());
+ GT_Recipe tRecipe = getRecipeList().findRecipe(
+ getBaseMetaTileEntity(),
+ mLastRecipe,
+ false,
+ V[mTier],
+ null,
+ null,
+ getAllInputs());
if (tRecipe == null) return DID_NOT_FIND_RECIPE;
if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe;
if (!canOutput(tRecipe)) {
@@ -106,55 +116,79 @@ public class GT_MetaTileEntity_Macerator_Steel extends GT_MetaTileEntity_BasicMa
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[] { super.getSideFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getSideFacingActive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
return new ITexture[] { super.getSideFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_SIDE_STEAM_MACERATOR),
- TextureFactory.builder().addIcon(OVERLAY_SIDE_STEAM_MACERATOR_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SIDE_STEAM_MACERATOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[] { super.getFrontFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingActive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[] { super.getFrontFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_STEAM_MACERATOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getFrontFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_FRONT_STEAM_MACERATOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_STEAM_MACERATOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[] { super.getTopFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getTopFacingActive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_MACERATOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
return new ITexture[] { super.getTopFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_TOP_STEAM_MACERATOR),
- TextureFactory.builder().addIcon(OVERLAY_TOP_STEAM_MACERATOR_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_STEAM_MACERATOR_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[] { super.getBottomFacingActive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingActive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE_GLOW)
+ .glow()
+ .build() };
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[] { super.getBottomFacingInactive(aColor)[0],
- TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR),
- TextureFactory.builder().addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_GLOW).glow().build() };
+ return new ITexture[] {
+ super.getBottomFacingInactive(aColor)[0], TextureFactory.of(OVERLAY_BOTTOM_STEAM_MACERATOR),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_BOTTOM_STEAM_MACERATOR_GLOW)
+ .glow()
+ .build() };
}
}
diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java
index ce434bc371..cee78c3fa4 100644
--- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java
+++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java
@@ -95,8 +95,10 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti
}
public static void registerAEIntegration() {
- appeng.api.AEApi.instance().registries().externalStorage()
- .addExternalStorageInterface(new AE2DigitalChestHandler());
+ appeng.api.AEApi.instance()
+ .registries()
+ .externalStorage()
+ .addExternalStorageInterface(new AE2DigitalChestHandler());
}
@Override
@@ -417,8 +419,7 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti
private boolean hasActiveMEConnection() {
if (listeners == null || listeners.isEmpty()) return false;
- for (Map.Entry<appeng.api.storage.IMEMonitorHandlerReceiver<appeng.api.storage.data.IAEItemStack>, Object> e : listeners
- .entrySet()) {
+ for (Map.Entry<appeng.api.storage.IMEMonitorHandlerReceiver<appeng.api.storage.data.IAEItemStack>, Object> e : listeners.entrySet()) {
if ((e.getKey() instanceof appeng.api.parts.IPart)) {
appeng.api.networking.IGridNode n = ((appeng.api.parts.IPart) e.getKey()).getGridNode();
if (n != null && n.isActive()) return true;
@@ -467,7 +468,10 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti
boolean aActive, boolean aRedstone) {
if (aSide != aFacing) return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1] };
return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_SCHEST),
- TextureFactory.builder().addIcon(OVERLAY_SCHEST_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_SCHEST_GLOW)
+ .glow()
+ .build() };
}
@Override
@@ -478,7 +482,8 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti
if (tag.hasKey("itemType", Constants.NBT.TAG_COMPOUND)) {
currenttip.add("Item Count: " + GT_Utility.parseNumberToString(tag.getInteger("itemCount")));
currenttip.add(
- "Item Type: " + ItemStack.loadItemStackFromNBT(tag.getCompoundTag("itemType")).getDisplayName());
+ "Item Type: " + ItemStack.loadItemStackFromNBT(tag.getCompoundTag("itemType"))
+ .getDisplayName());
} else {
currenttip.add("Chest Empty");
}
@@ -505,26 +510,36 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti
@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(
- this instanceof GT_MetaTileEntity_QuantumChest
- ? ((GT_MetaTileEntity_QuantumChest) this).mItemCount
- : 0))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 30));
+ 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(
+ this instanceof GT_MetaTileEntity_QuantumChest
+ ? ((GT_MetaTileEntity_QuantumChest) this).mItemCount
+ : 0))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(10, 30));
}
}
diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java
index 9a4727941f..e374658871 100644
--- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java
+++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java
@@ -171,7 +171,10 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit
@Override
public boolean isFluidInputAllowed(FluidStack aFluid) {
- return !mLockFluid || lockedFluidName == null || lockedFluidName.equals(aFluid.getFluid().getName());
+ return !mLockFluid || lockedFluidName == null
+ || lockedFluidName.equals(
+ aFluid.getFluid()
+ .getName());
}
@Override
@@ -182,7 +185,8 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit
@Override
public void onEmptyingContainerWhenEmpty() {
if (this.lockedFluidName == null && this.mFluid != null) {
- this.lockedFluidName = this.mFluid.getFluid().getName();
+ this.lockedFluidName = this.mFluid.getFluid()
+ .getName();
}
}
@@ -266,7 +270,10 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit
} else return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1] };
}
return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_QTANK),
- TextureFactory.builder().addIcon(OVERLAY_QTANK_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_QTANK_GLOW)
+ .glow()
+ .build() };
}
@Override
@@ -343,8 +350,9 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit
getOutputSlot(),
GT_Utility.getContainerForFilledItem(mInventory[getInputSlot()], true),
1)) {
- getFillableStack().amount += Math
- .min(tFluid.amount, getRealCapacity() - getFillableStack().amount);
+ getFillableStack().amount += Math.min(
+ tFluid.amount,
+ getRealCapacity() - getFillableStack().amount);
aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1);
}
}
@@ -354,8 +362,11 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit
}
if (doesFillContainers()) {
- ItemStack tOutput = GT_Utility
- .fillFluidContainer(getDrainableStack(), mInventory[getInputSlot()], false, true);
+ ItemStack tOutput = GT_Utility.fillFluidContainer(
+ getDrainableStack(),
+ mInventory[getInputSlot()],
+ false,
+ true);
if (tOutput != null && aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), tOutput, 1)) {
FluidStack tFluid = GT_Utility.getFluidForFilledItem(tOutput, true);
aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1);
@@ -368,10 +379,9 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit
@Override
public int fill(FluidStack aFluid, boolean doFill) {
- if (aFluid == null || aFluid.getFluid().getID() <= 0
- || aFluid.amount <= 0
- || !canTankBeFilled()
- || !isFluidInputAllowed(aFluid))
+ if (aFluid == null || aFluid.getFluid()
+ .getID()
+ <= 0 || aFluid.amount <= 0 || !canTankBeFilled() || !isFluidInputAllowed(aFluid))
return 0;
if (getFillableStack() != null && !getFillableStack().isFluidEqual(aFluid)) {
return 0;
@@ -483,8 +493,9 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit
FluidStack fluid = tag.hasKey("mFluid") ? FluidStack.loadFluidStackFromNBT(tag.getCompoundTag("mFluid")) : null;
if (fluid != null && fluid.amount > 0) {
currenttip.remove(0);
- currenttip
- .add(0, String.format("%d / %d mB %s", fluid.amount, getRealCapacity(), fluid.getLocalizedName()));
+ currenttip.add(
+ 0,
+ String.format("%d / %d mB %s", fluid.amount, getRealCapacity(), fluid.getLocalizedName()));
} else {
currenttip.add(0, "Tank Empty");
}
@@ -507,116 +518,161 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit
@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, getInputSlot())
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_IN)
- .setPos(79, 16))
- .widget(
- new SlotWidget(inventoryHandler, getOutputSlot()).setAccess(true, false)
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_OUT)
- .setPos(79, 43))
- .widget(
- new FluidDisplaySlotWidget(inventoryHandler, getStackDisplaySlot())
- .setFluidAccessConstructor(() -> constructFluidAccess(false)).setIHasFluidDisplay(this)
- .setCanDrain(true).setCanFill(!isDrainableStackSeparate())
- .setActionRealClick(FluidDisplaySlotWidget.Action.TRANSFER)
- .setActionDragAndDrop(FluidDisplaySlotWidget.Action.LOCK)
- .setBeforeRealClick((clickData, widget) -> {
- if (NetworkUtils.isClient()) {
- // propagate display item content to actual fluid stored in this tank
- setDrainableStack(
- GT_Utility.getFluidFromDisplayStack(widget.getMcSlot().getStack()));
- }
- return true;
- }).setBackground(GT_UITextures.TRANSPARENT).setPos(58, 41))
- .widget(new TextWidget("Liquid Amount").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 20))
- .widget(
- TextWidget
- .dynamicString(() -> GT_Utility.parseNumberToString(mFluid != null ? mFluid.amount : 0))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 30))
- .widget(new CycleButtonWidget().setToggle(() -> mOutputFluid, val -> {
- mOutputFluid = val;
- if (!mOutputFluid) {
- GT_Utility.sendChatToPlayer(
- buildContext.getPlayer(),
- GT_Utility.trans("262", "Fluid Auto Output Disabled"));
- } else {
- GT_Utility.sendChatToPlayer(
- buildContext.getPlayer(),
- GT_Utility.trans("263", "Fluid Auto Output Enabled"));
- }
- }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_AUTOOUTPUT_FLUID)
- .setGTTooltip(() -> mTooltipCache.getData("GT5U.machines.digitaltank.autooutput.tooltip"))
- .setTooltipShowUpDelay(TOOLTIP_DELAY).setPos(7, 63).setSize(18, 18))
- .widget(new CycleButtonWidget().setToggle(() -> mLockFluid, val -> {
- mLockFluid = val;
-
- String inBrackets;
- if (mLockFluid) {
- if (mFluid == null) {
- setLockedFluidName(null);
- inBrackets = GT_Utility
- .trans("264", "currently none, will be locked to the next that is put in");
- } else {
- setLockedFluidName(getDrainableStack().getFluid().getName());
- inBrackets = getDrainableStack().getLocalizedName();
- }
- GT_Utility.sendChatToPlayer(
- buildContext.getPlayer(),
- String.format("%s (%s)", GT_Utility.trans("265", "1 specific Fluid"), inBrackets));
- } else {
- setLockedFluidName(null);
- GT_Utility.sendChatToPlayer(
- buildContext.getPlayer(),
- GT_Utility.trans("266", "Lock Fluid Mode Disabled"));
- }
- }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_LOCK)
- .setGTTooltip(() -> mTooltipCache.getData("GT5U.machines.digitaltank.lockfluid.tooltip"))
- .setTooltipShowUpDelay(TOOLTIP_DELAY).setPos(25, 63).setSize(18, 18))
- .widget(new CycleButtonWidget().setToggle(() -> mAllowInputFromOutputSide, val -> {
- mAllowInputFromOutputSide = val;
- if (!mAllowInputFromOutputSide) {
- GT_Utility.sendChatToPlayer(buildContext.getPlayer(), GT_Utility.getTrans("096"));
- } else {
- GT_Utility.sendChatToPlayer(buildContext.getPlayer(), GT_Utility.getTrans("095"));
- }
- }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_INPUT_FROM_OUTPUT_SIDE)
- .setGTTooltip(() -> mTooltipCache.getData("GT5U.machines.digitaltank.inputfromoutput.tooltip"))
- .setTooltipShowUpDelay(TOOLTIP_DELAY).setPos(43, 63).setSize(18, 18))
- .widget(new CycleButtonWidget().setToggle(() -> mVoidFluidPart, val -> {
- mVoidFluidPart = val;
- if (!mVoidFluidPart) {
- GT_Utility.sendChatToPlayer(
- buildContext.getPlayer(),
- GT_Utility.trans("267", "Overflow Voiding Mode Disabled"));
- } else {
- GT_Utility.sendChatToPlayer(
- buildContext.getPlayer(),
- GT_Utility.trans("268", "Overflow Voiding Mode Enabled"));
- }
- }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_VOID_EXCESS)
- .setGTTooltip(() -> mTooltipCache.getData("GT5U.machines.digitaltank.voidoverflow.tooltip"))
- .setTooltipShowUpDelay(TOOLTIP_DELAY).setPos(151, 7).setSize(18, 18))
- .widget(new CycleButtonWidget().setToggle(() -> mVoidFluidFull, val -> {
- mVoidFluidFull = val;
- if (!mVoidFluidFull) {
- GT_Utility.sendChatToPlayer(
- buildContext.getPlayer(),
- GT_Utility.trans("269", "Void Full Mode Disabled"));
- } else {
- GT_Utility.sendChatToPlayer(
- buildContext.getPlayer(),
- GT_Utility.trans("270", "Void Full Mode Enabled"));
- }
- }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_VOID_ALL)
- .setGTTooltip(() -> mTooltipCache.getData("GT5U.machines.digitaltank.voidfull.tooltip"))
- .setTooltipShowUpDelay(TOOLTIP_DELAY).setPos(151, 25).setSize(18, 18));
+ new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK)
+ .setPos(7, 16)
+ .setSize(71, 45))
+ .widget(
+ new SlotWidget(inventoryHandler, getInputSlot())
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_IN)
+ .setPos(79, 16))
+ .widget(
+ new SlotWidget(inventoryHandler, getOutputSlot()).setAccess(true, false)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_OUT)
+ .setPos(79, 43))
+ .widget(
+ new FluidDisplaySlotWidget(
+ inventoryHandler,
+ getStackDisplaySlot()).setFluidAccessConstructor(() -> constructFluidAccess(false))
+ .setIHasFluidDisplay(this)
+ .setCanDrain(true)
+ .setCanFill(!isDrainableStackSeparate())
+ .setActionRealClick(FluidDisplaySlotWidget.Action.TRANSFER)
+ .setActionDragAndDrop(FluidDisplaySlotWidget.Action.LOCK)
+ .setBeforeRealClick((clickData, widget) -> {
+ if (NetworkUtils.isClient()) {
+ // propagate display item content to actual fluid stored in
+ // this tank
+ setDrainableStack(
+ GT_Utility.getFluidFromDisplayStack(
+ widget.getMcSlot()
+ .getStack()));
+ }
+ return true;
+ })
+ .setBackground(GT_UITextures.TRANSPARENT)
+ .setPos(58, 41))
+ .widget(
+ new TextWidget("Liquid Amount").setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(10, 20))
+ .widget(
+ TextWidget.dynamicString(
+ () -> GT_Utility.parseNumberToString(mFluid != null ? mFluid.amount : 0))
+ .setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setPos(10, 30))
+ .widget(new CycleButtonWidget().setToggle(() -> mOutputFluid, val -> {
+ mOutputFluid = val;
+ if (!mOutputFluid) {
+ GT_Utility.sendChatToPlayer(
+ buildContext.getPlayer(),
+ GT_Utility.trans("262", "Fluid Auto Output Disabled"));
+ } else {
+ GT_Utility.sendChatToPlayer(
+ buildContext.getPlayer(),
+ GT_Utility.trans("263", "Fluid Auto Output Enabled"));
+ }
+ })
+ .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_AUTOOUTPUT_FLUID)
+ .setGTTooltip(
+ () -> mTooltipCache.getData(
+ "GT5U.machines.digitaltank.autooutput.tooltip"))
+ .setTooltipShowUpDelay(TOOLTIP_DELAY)
+ .setPos(7, 63)
+ .setSize(18, 18))
+ .widget(new CycleButtonWidget().setToggle(() -> mLockFluid, val -> {
+ mLockFluid = val;
+
+ String inBrackets;
+ if (mLockFluid) {
+ if (mFluid == null) {
+ setLockedFluidName(null);
+ inBrackets = GT_Utility.trans(
+ "264",
+ "currently none, will be locked to the next that is put in");
+ } else {
+ setLockedFluidName(
+ getDrainableStack().getFluid()
+ .getName());
+ inBrackets = getDrainableStack().getLocalizedName();
+ }
+ GT_Utility.sendChatToPlayer(
+ buildContext.getPlayer(),
+ String.format("%s (%s)", GT_Utility.trans("265", "1 specific Fluid"), inBrackets));
+ } else {
+ setLockedFluidName(null);
+ GT_Utility.sendChatToPlayer(
+ buildContext.getPlayer(),
+ GT_Utility.trans("266", "Lock Fluid Mode Disabled"));
+ }
+ })
+ .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_LOCK)
+ .setGTTooltip(
+ () -> mTooltipCache.getData(
+ "GT5U.machines.digitaltank.lockfluid.tooltip"))
+ .setTooltipShowUpDelay(TOOLTIP_DELAY)
+ .setPos(25, 63)
+ .setSize(18, 18))
+ .widget(new CycleButtonWidget().setToggle(() -> mAllowInputFromOutputSide, val -> {
+ mAllowInputFromOutputSide = val;
+ if (!mAllowInputFromOutputSide) {
+ GT_Utility.sendChatToPlayer(buildContext.getPlayer(), GT_Utility.getTrans("096"));
+ } else {
+ GT_Utility.sendChatToPlayer(buildContext.getPlayer(), GT_Utility.getTrans("095"));
+ }
+ })
+ .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_INPUT_FROM_OUTPUT_SIDE)
+ .setGTTooltip(
+ () -> mTooltipCache.getData(
+ "GT5U.machines.digitaltank.inputfromoutput.tooltip"))
+ .setTooltipShowUpDelay(TOOLTIP_DELAY)
+ .setPos(43, 63)
+ .setSize(18, 18))
+ .widget(new CycleButtonWidget().setToggle(() -> mVoidFluidPart, val -> {
+ mVoidFluidPart = val;
+ if (!mVoidFluidPart) {
+ GT_Utility.sendChatToPlayer(
+ buildContext.getPlayer(),
+ GT_Utility.trans("267", "Overflow Voiding Mode Disabled"));
+ } else {
+ GT_Utility.sendChatToPlayer(
+ buildContext.getPlayer(),
+ GT_Utility.trans("268", "Overflow Voiding Mode Enabled"));
+ }
+ })
+ .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_VOID_EXCESS)
+ .setGTTooltip(
+ () -> mTooltipCache.getData(
+ "GT5U.machines.digitaltank.voidoverflow.tooltip"))
+ .setTooltipShowUpDelay(TOOLTIP_DELAY)
+ .setPos(151, 7)
+ .setSize(18, 18))
+ .widget(new CycleButtonWidget().setToggle(() -> mVoidFluidFull, val -> {
+ mVoidFluidFull = val;
+ if (!mVoidFluidFull) {
+ GT_Utility.sendChatToPlayer(
+ buildContext.getPlayer(),
+ GT_Utility.trans("269", "Void Full Mode Disabled"));
+ } else {
+ GT_Utility.sendChatToPlayer(
+ buildContext.getPlayer(),
+ GT_Utility.trans("270", "Void Full Mode Enabled"));
+ }
+ })
+ .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_VOID_ALL)
+ .setGTTooltip(
+ () -> mTooltipCache.getData(
+ "GT5U.machines.digitaltank.voidfull.tooltip"))
+ .setTooltipShowUpDelay(TOOLTIP_DELAY)
+ .setPos(151, 25)
+ .setSize(18, 18));
}
@Override
diff --git a/src/main/java/gregtech/common/tools/GT_Tool.java b/src/main/java/gregtech/common/tools/GT_Tool.java
index 15bbaf976d..178005c6c5 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool.java
@@ -136,8 +136,8 @@ public abstract class GT_Tool implements IToolStats {
}
public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new EntityDamageSource((aPlayer instanceof EntityPlayer) ? "player" : "mob", aPlayer)
- .func_151519_b(aEntity);
+ return new EntityDamageSource((aPlayer instanceof EntityPlayer) ? "player" : "mob", aPlayer).func_151519_b(
+ aEntity);
}
@Override
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Axe.java b/src/main/java/gregtech/common/tools/GT_Tool_Axe.java
index 94c4681aa3..bb5649a453 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Axe.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Axe.java
@@ -145,10 +145,10 @@ public class GT_Tool_Axe extends GT_Tool {
@Override
public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
return aIsToolHead
- ? GT_MetaGenerated_Tool
- .getPrimaryMaterial(aStack).mIconSet.mTextures[OrePrefixes.toolHeadAxe.mTextureIndex]
- : GT_MetaGenerated_Tool
- .getSecondaryMaterial(aStack).mIconSet.mTextures[OrePrefixes.stick.mTextureIndex];
+ ? GT_MetaGenerated_Tool.getPrimaryMaterial(
+ aStack).mIconSet.mTextures[OrePrefixes.toolHeadAxe.mTextureIndex]
+ : GT_MetaGenerated_Tool.getSecondaryMaterial(
+ aStack).mIconSet.mTextures[OrePrefixes.stick.mTextureIndex];
}
@Override
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java b/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java
index a4ea2f701d..833f169e61 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java
@@ -47,8 +47,12 @@ public class GT_Tool_BranchCutter extends GT_Tool {
public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX,
int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
if (aBlock.getMaterial() == Material.leaves) {
- aEvent.dropChance = Math
- .min(1.0F, Math.max(aEvent.dropChance, (aStack.getItem().getHarvestLevel(aStack, "") + 1) * 0.2F));
+ aEvent.dropChance = Math.min(
+ 1.0F,
+ Math.max(
+ aEvent.dropChance,
+ (aStack.getItem()
+ .getHarvestLevel(aStack, "") + 1) * 0.2F));
if (aBlock == Blocks.leaves) {
aDrops.clear();
if (((aMetaData & 0x3) == 0) && (aPlayer.worldObj.rand.nextInt(9) <= aFortune * 2)) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_LV.java b/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_LV.java
index 5ed7647859..56f623f771 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_LV.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_LV.java
@@ -112,8 +112,13 @@ public class GT_Tool_Chainsaw_LV extends GT_Tool_Saw {
if ((aBlock.getMaterial() == Material.leaves) && ((aBlock instanceof IShearable))) {
aPlayer.worldObj.setBlock(aX, aY, aZ, aBlock, aMetaData, 0);
if (((IShearable) aBlock).isShearable(aStack, aPlayer.worldObj, aX, aY, aZ)) {
- ArrayList<ItemStack> tDrops = ((IShearable) aBlock)
- .onSheared(aStack, aPlayer.worldObj, aX, aY, aZ, aFortune);
+ ArrayList<ItemStack> tDrops = ((IShearable) aBlock).onSheared(
+ aStack,
+ aPlayer.worldObj,
+ aX,
+ aY,
+ aZ,
+ aFortune);
aDrops.clear();
}
aPlayer.worldObj.setBlock(aX, aY, aZ, Blocks.air, 0, 0);
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Crowbar.java b/src/main/java/gregtech/common/tools/GT_Tool_Crowbar.java
index a774ab7856..3a9bb289ad 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Crowbar.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Crowbar.java
@@ -97,8 +97,8 @@ public class GT_Tool_Crowbar extends GT_Tool {
}
String tTool = aBlock.getHarvestTool(aMetaData);
if ((tTool == null) || (tTool.equals(""))) {
- for (Iterator i$ = GT_MetaGenerated_Tool_01.INSTANCE.mToolStats.values().iterator(); i$.hasNext(); i$
- .next()) {
+ for (Iterator i$ = GT_MetaGenerated_Tool_01.INSTANCE.mToolStats.values()
+ .iterator(); i$.hasNext(); i$.next()) {
if (((i$ instanceof GT_Tool_Crowbar)) && (!((IToolStats) i$).isMinableBlock(aBlock, aMetaData))) {
return false;
}
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java b/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java
index c8ebcf14f2..ac1ea88cc9 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java
@@ -28,13 +28,15 @@ import gregtech.common.items.behaviors.Behaviour_Prospecting;
public class GT_Tool_HardHammer extends GT_Tool {
- public static final List<String> mEffectiveList = Arrays
- .asList(EntityIronGolem.class.getName(), "EntityTowerGuardian");
+ public static final List<String> mEffectiveList = Arrays.asList(
+ EntityIronGolem.class.getName(),
+ "EntityTowerGuardian");
@Override
public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack,
EntityPlayer aPlayer) {
- String tName = aEntity.getClass().getName();
+ String tName = aEntity.getClass()
+ .getName();
tName = tName.substring(tName.lastIndexOf('.') + 1);
return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage;
}
@@ -122,8 +124,12 @@ public class GT_Tool_HardHammer extends GT_Tool {
@Override
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "hammer", "pickaxe")
- || GT_ToolHarvestHelper
- .isAppropriateMaterial(aBlock, Material.rock, Material.glass, Material.ice, Material.packedIce)
+ || GT_ToolHarvestHelper.isAppropriateMaterial(
+ aBlock,
+ Material.rock,
+ Material.glass,
+ Material.ice,
+ Material.packedIce)
|| GT_Recipe.GT_Recipe_Map.sHammerRecipes.containsInput(new ItemStack(aBlock, 1, aMetaData));
}
@@ -131,12 +137,20 @@ public class GT_Tool_HardHammer extends GT_Tool {
public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX,
int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
int rConversions = 0;
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes
- .findRecipe(null, true, MAX_IC2, null, new ItemStack(aBlock, 1, aMetaData));
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(
+ null,
+ true,
+ MAX_IC2,
+ null,
+ new ItemStack(aBlock, 1, aMetaData));
if ((tRecipe == null) || (aBlock.hasTileEntity(aMetaData))) {
for (ItemStack tDrop : aDrops) {
- tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes
- .findRecipe(null, true, MAX_IC2, null, GT_Utility.copyAmount(1L, tDrop));
+ tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(
+ null,
+ true,
+ MAX_IC2,
+ null,
+ GT_Utility.copyAmount(1L, tDrop));
if (tRecipe != null) {
ItemStack tHammeringOutput = tRecipe.getOutput(0);
if (tHammeringOutput != null) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_JackHammer.java b/src/main/java/gregtech/common/tools/GT_Tool_JackHammer.java
index aad96098fa..51b4abe4af 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_JackHammer.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_JackHammer.java
@@ -77,12 +77,20 @@ public class GT_Tool_JackHammer extends GT_Tool_Drill_LV {
public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX,
int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
int rConversions = 0;
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes
- .findRecipe(null, true, 2147483647L, null, new ItemStack(aBlock, 1, aMetaData));
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(
+ null,
+ true,
+ 2147483647L,
+ null,
+ new ItemStack(aBlock, 1, aMetaData));
if ((tRecipe == null) || (aBlock.hasTileEntity(aMetaData))) {
for (ItemStack tDrop : aDrops) {
- tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes
- .findRecipe(null, true, 2147483647L, null, GT_Utility.copyAmount(1L, new Object[] { tDrop }));
+ tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(
+ null,
+ true,
+ 2147483647L,
+ null,
+ GT_Utility.copyAmount(1L, new Object[] { tDrop }));
if (tRecipe != null) {
ItemStack tHammeringOutput = tRecipe.getOutput(0);
if (tHammeringOutput != null) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Plow.java b/src/main/java/gregtech/common/tools/GT_Tool_Plow.java
index 97b7092e36..1ffb26df59 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Plow.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Plow.java
@@ -49,13 +49,22 @@ public class GT_Tool_Plow extends GT_Tool {
for (int i = -1; i < 2; i++) {
for (int j = -1; j < 2; j++) {
for (int k = -1; k < 2; k++) {
- if (((i != 0) || (j != 0) || (k != 0))
- && (aStack.getItem().getDigSpeed(
- aStack,
- aPlayer.worldObj.getBlock(aX + i, aY + j, aZ + k),
- aPlayer.worldObj.getBlockMetadata(aX + i, aY + j, aZ + k)) > 0.0F)
- && (((EntityPlayerMP) aPlayer).theItemInWorldManager
- .tryHarvestBlock(aX + i, aY + j, aZ + k))) {
+ if (((i != 0) || (j != 0) || (k != 0)) && (aStack.getItem()
+ .getDigSpeed(
+ aStack,
+ aPlayer.worldObj.getBlock(
+ aX + i,
+ aY + j,
+ aZ + k),
+ aPlayer.worldObj.getBlockMetadata(
+ aX + i,
+ aY + j,
+ aZ + k))
+ > 0.0F)
+ && (((EntityPlayerMP) aPlayer).theItemInWorldManager.tryHarvestBlock(
+ aX + i,
+ aY + j,
+ aZ + k))) {
rConversions++;
}
}
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Saw.java b/src/main/java/gregtech/common/tools/GT_Tool_Saw.java
index 8fa1494a7e..124127c28c 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Saw.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Saw.java
@@ -83,8 +83,13 @@ public class GT_Tool_Saw extends GT_Tool {
if ((aBlock.getMaterial() == Material.leaves) && ((aBlock instanceof IShearable))) {
aPlayer.worldObj.setBlock(aX, aY, aZ, aBlock, aMetaData, 0);
if (((IShearable) aBlock).isShearable(aStack, aPlayer.worldObj, aX, aY, aZ)) {
- ArrayList<ItemStack> tDrops = ((IShearable) aBlock)
- .onSheared(aStack, aPlayer.worldObj, aX, aY, aZ, aFortune);
+ ArrayList<ItemStack> tDrops = ((IShearable) aBlock).onSheared(
+ aStack,
+ aPlayer.worldObj,
+ aX,
+ aY,
+ aZ,
+ aFortune);
aDrops.clear();
aDrops.addAll(tDrops);
aEvent.dropChance = 1.0F;
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java b/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java
index 42542bb75d..f300abf5aa 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java
@@ -35,7 +35,8 @@ public class GT_Tool_Screwdriver extends GT_Tool {
@Override
public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack,
EntityPlayer aPlayer) {
- String tName = aEntity.getClass().getName();
+ String tName = aEntity.getClass()
+ .getName();
tName = tName.substring(tName.lastIndexOf('.') + 1);
return mEffectiveList.contains(tName) ? aOriginalDamage * 2.0F : aOriginalDamage;
}
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Sense.java b/src/main/java/gregtech/common/tools/GT_Tool_Sense.java
index dd6cae9aaf..081f167bf1 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Sense.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Sense.java
@@ -47,13 +47,22 @@ public class GT_Tool_Sense extends GT_Tool {
for (int i = -2; i < 3; i++) {
for (int j = -2; j < 3; j++) {
for (int k = -2; k < 3; k++) {
- if (((i != 0) || (j != 0) || (k != 0))
- && (aStack.getItem().getDigSpeed(
- aStack,
- aPlayer.worldObj.getBlock(aX + i, aY + j, aZ + k),
- aPlayer.worldObj.getBlockMetadata(aX + i, aY + j, aZ + k)) > 0.0F)
- && (((EntityPlayerMP) aPlayer).theItemInWorldManager
- .tryHarvestBlock(aX + i, aY + j, aZ + k))) {
+ if (((i != 0) || (j != 0) || (k != 0)) && (aStack.getItem()
+ .getDigSpeed(
+ aStack,
+ aPlayer.worldObj.getBlock(
+ aX + i,
+ aY + j,
+ aZ + k),
+ aPlayer.worldObj.getBlockMetadata(
+ aX + i,
+ aY + j,
+ aZ + k))
+ > 0.0F)
+ && (((EntityPlayerMP) aPlayer).theItemInWorldManager.tryHarvestBlock(
+ aX + i,
+ aY + j,
+ aZ + k))) {
rConversions++;
}
}
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Soldering_Iron.java b/src/main/java/gregtech/common/tools/GT_Tool_Soldering_Iron.java
index d9ffb86059..98a3820106 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Soldering_Iron.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Soldering_Iron.java
@@ -35,7 +35,8 @@ public class GT_Tool_Soldering_Iron extends GT_Tool {
@Override
public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack,
EntityPlayer aPlayer) {
- String tName = aEntity.getClass().getName();
+ String tName = aEntity.getClass()
+ .getName();
tName = tName.substring(tName.lastIndexOf('.') + 1);
return mEffectiveList.contains(tName) ? aOriginalDamage * 2.0F : aOriginalDamage;
}
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java b/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java
index 955765287f..71e35372ce 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java
@@ -24,13 +24,15 @@ import gregtech.common.items.behaviors.Behaviour_Wrench;
public class GT_Tool_Wrench extends GT_Tool {
- public static final List<String> mEffectiveList = Arrays
- .asList(EntityIronGolem.class.getName(), "EntityTowerGuardian");
+ public static final List<String> mEffectiveList = Arrays.asList(
+ EntityIronGolem.class.getName(),
+ "EntityTowerGuardian");
@Override
public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack,
EntityPlayer aPlayer) {
- String tName = aEntity.getClass().getName();
+ String tName = aEntity.getClass()
+ .getName();
tName = tName.substring(tName.lastIndexOf('.') + 1);
return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage;
}