From 8ac58626bd4caa9e49f58acc6b97ac031f6c2107 Mon Sep 17 00:00:00 2001 From: Raven Szewczyk Date: Mon, 10 Apr 2023 17:49:16 +0100 Subject: Update spotless config to 0.2.2 --- src/main/java/gregtech/common/GT_Client.java | 495 +- src/main/java/gregtech/common/GT_DummyWorld.java | 2 +- src/main/java/gregtech/common/GT_Network.java | 88 +- src/main/java/gregtech/common/GT_Pollution.java | 114 +- src/main/java/gregtech/common/GT_Proxy.java | 2160 +++---- src/main/java/gregtech/common/GT_RecipeAdder.java | 2640 ++++---- .../java/gregtech/common/GT_ThaumcraftCompat.java | 131 +- .../java/gregtech/common/GT_UndergroundOil.java | 53 +- .../gregtech/common/GT_Worldgen_GT_Ore_Layer.java | 511 +- .../common/GT_Worldgen_GT_Ore_SmallPieces.java | 78 +- .../java/gregtech/common/GT_Worldgen_Stone.java | 224 +- .../java/gregtech/common/GT_Worldgenerator.java | 378 +- .../gregtech/common/bees/GT_AlleleBeeSpecies.java | 22 +- .../java/gregtech/common/bees/GT_AlleleHelper.java | 152 +- .../java/gregtech/common/bees/GT_Bee_Mutation.java | 6 +- .../gregtech/common/blocks/GT_Block_Casings1.java | 10 +- .../gregtech/common/blocks/GT_Block_Casings2.java | 16 +- .../gregtech/common/blocks/GT_Block_Casings3.java | 6 +- .../gregtech/common/blocks/GT_Block_Casings4.java | 86 +- .../gregtech/common/blocks/GT_Block_Casings6.java | 4 +- .../gregtech/common/blocks/GT_Block_Casings8.java | 63 +- .../gregtech/common/blocks/GT_Block_Casings9.java | 5 +- .../common/blocks/GT_Block_Casings_Abstract.java | 7 +- .../gregtech/common/blocks/GT_Block_Concretes.java | 4 +- .../gregtech/common/blocks/GT_Block_Machines.java | 104 +- .../gregtech/common/blocks/GT_Block_Metal.java | 4 +- .../java/gregtech/common/blocks/GT_Block_Ores.java | 34 +- .../common/blocks/GT_Block_Ores_Abstract.java | 58 +- .../gregtech/common/blocks/GT_Block_Ores_UB1.java | 14 +- .../gregtech/common/blocks/GT_Block_Ores_UB2.java | 14 +- .../gregtech/common/blocks/GT_Block_Ores_UB3.java | 14 +- .../common/blocks/GT_Block_Reinforced.java | 174 +- .../gregtech/common/blocks/GT_Block_Stones.java | 16 +- .../common/blocks/GT_Block_Stones_Abstract.java | 102 +- .../gregtech/common/blocks/GT_Block_Storage.java | 3 +- .../gregtech/common/blocks/GT_Cyclotron_Coils.java | 5 +- .../gregtech/common/blocks/GT_Item_Casings5.java | 10 +- .../common/blocks/GT_Item_Casings_Abstract.java | 60 +- .../gregtech/common/blocks/GT_Item_Concretes.java | 5 +- .../common/blocks/GT_Item_LongDistancePipe.java | 10 +- .../gregtech/common/blocks/GT_Item_Machines.java | 161 +- .../java/gregtech/common/blocks/GT_Item_Ores.java | 24 +- .../common/blocks/GT_Item_Stones_Abstract.java | 5 +- .../gregtech/common/blocks/GT_TileEntity_Ores.java | 203 +- .../java/gregtech/common/covers/CoverInfo.java | 43 +- .../java/gregtech/common/covers/GT_Cover_Arm.java | 330 +- .../common/covers/GT_Cover_ControlsWork.java | 139 +- .../gregtech/common/covers/GT_Cover_Conveyor.java | 207 +- .../gregtech/common/covers/GT_Cover_Crafting.java | 16 +- .../gregtech/common/covers/GT_Cover_DoesWork.java | 100 +- .../gregtech/common/covers/GT_Cover_Drain.java | 87 +- .../gregtech/common/covers/GT_Cover_EUMeter.java | 183 +- .../common/covers/GT_Cover_FacadeBase.java | 185 +- .../common/covers/GT_Cover_FluidLimiter.java | 38 +- .../common/covers/GT_Cover_FluidRegulator.java | 357 +- .../covers/GT_Cover_FluidStorageMonitor.java | 90 +- .../common/covers/GT_Cover_Fluidfilter.java | 251 +- .../common/covers/GT_Cover_ItemFilter.java | 127 +- .../gregtech/common/covers/GT_Cover_ItemMeter.java | 168 +- .../java/gregtech/common/covers/GT_Cover_Lens.java | 2 +- .../common/covers/GT_Cover_LiquidMeter.java | 142 +- .../common/covers/GT_Cover_NeedMaintainance.java | 251 +- .../common/covers/GT_Cover_PlayerDetector.java | 103 +- .../java/gregtech/common/covers/GT_Cover_Pump.java | 223 +- .../common/covers/GT_Cover_RedstoneConductor.java | 12 +- .../covers/GT_Cover_RedstoneReceiverExternal.java | 12 +- .../covers/GT_Cover_RedstoneReceiverInternal.java | 8 +- .../common/covers/GT_Cover_RedstoneSignalizer.java | 20 +- .../GT_Cover_RedstoneTransmitterExternal.java | 4 +- .../GT_Cover_RedstoneTransmitterInternal.java | 6 +- .../covers/GT_Cover_RedstoneWirelessBase.java | 94 +- .../gregtech/common/covers/GT_Cover_Screen.java | 10 +- .../gregtech/common/covers/GT_Cover_Shutter.java | 141 +- .../common/covers/GT_Cover_SolarPanel.java | 32 +- .../common/covers/GT_Cover_SteamValve.java | 2 +- .../java/gregtech/common/covers/GT_Cover_Vent.java | 6 +- .../GT_Cover_AdvancedRedstoneReceiverBase.java | 106 +- .../GT_Cover_AdvancedRedstoneReceiverExternal.java | 10 +- .../GT_Cover_AdvancedRedstoneReceiverInternal.java | 6 +- .../GT_Cover_AdvancedRedstoneTransmitterBase.java | 42 +- ..._Cover_AdvancedRedstoneTransmitterExternal.java | 8 +- ..._Cover_AdvancedRedstoneTransmitterInternal.java | 8 +- .../GT_Cover_AdvancedWirelessRedstoneBase.java | 114 +- .../redstone/GT_Cover_WirelessFluidDetector.java | 38 +- .../redstone/GT_Cover_WirelessItemDetector.java | 102 +- .../GT_Cover_WirelessMaintenanceDetector.java | 48 +- .../gregtech/common/entities/GT_Entity_Arrow.java | 219 +- .../common/entities/GT_Entity_Arrow_Potion.java | 28 +- src/main/java/gregtech/common/fluid/GT_Fluid.java | 18 +- .../gregtech/common/fluid/GT_FluidBuilder.java | 2 +- .../gregtech/common/gui/modularui/UIHelper.java | 69 +- .../modularui/uifactory/SelectItemUIFactory.java | 92 +- .../modularui/widget/CoverCycleButtonWidget.java | 21 +- .../widget/CoverDataControllerWidget.java | 36 +- .../CoverDataFollower_CycleButtonWidget.java | 2 +- .../widget/CoverDataFollower_SlotWidget.java | 2 +- .../widget/CoverDataFollower_TextFieldWidget.java | 8 +- .../CoverDataFollower_ToggleButtonWidget.java | 19 +- .../gui/modularui/widget/DataControllerWidget.java | 2 +- .../modularui/widget/FluidDisplaySlotWidget.java | 33 +- src/main/java/gregtech/common/items/CombType.java | 24 +- src/main/java/gregtech/common/items/DropType.java | 12 +- .../common/items/GT_DepletetCell_Item.java | 6 +- .../gregtech/common/items/GT_FluidDisplayItem.java | 44 +- .../common/items/GT_IntegratedCircuit_Item.java | 224 +- .../common/items/GT_MetaGenerated_Item_01.java | 6807 ++++++++++---------- .../common/items/GT_MetaGenerated_Item_02.java | 4779 +++++++------- .../common/items/GT_MetaGenerated_Item_03.java | 1324 ++-- .../common/items/GT_MetaGenerated_Item_98.java | 22 +- .../common/items/GT_MetaGenerated_Item_99.java | 36 +- .../common/items/GT_MetaGenerated_Tool_01.java | 1123 ++-- .../common/items/GT_NeutronReflector_Item.java | 13 +- .../gregtech/common/items/GT_SensorCard_Item.java | 12 +- .../gregtech/common/items/GT_VolumetricFlask.java | 71 +- src/main/java/gregtech/common/items/ItemComb.java | 2573 ++++---- src/main/java/gregtech/common/items/ItemDrop.java | 126 +- .../java/gregtech/common/items/ItemPropolis.java | 33 +- .../java/gregtech/common/items/PollenType.java | 8 +- .../java/gregtech/common/items/PropolisType.java | 10 +- .../common/items/behaviors/Behaviour_Arrow.java | 48 +- .../items/behaviors/Behaviour_Arrow_Potion.java | 16 +- .../items/behaviors/Behaviour_Cover_Tool.java | 65 +- .../common/items/behaviors/Behaviour_Crowbar.java | 2 +- .../items/behaviors/Behaviour_DataStick.java | 4 +- .../common/items/behaviors/Behaviour_Hoe.java | 19 +- .../common/items/behaviors/Behaviour_Lighter.java | 39 +- .../common/items/behaviors/Behaviour_None.java | 10 +- .../behaviors/Behaviour_Plunger_Essentia.java | 15 +- .../items/behaviors/Behaviour_Plunger_Fluid.java | 33 +- .../items/behaviors/Behaviour_Plunger_Item.java | 46 +- .../items/behaviors/Behaviour_Prospecting.java | 75 +- .../common/items/behaviors/Behaviour_Scanner.java | 13 +- .../common/items/behaviors/Behaviour_Scoop.java | 33 +- .../items/behaviors/Behaviour_Screwdriver.java | 2 +- .../common/items/behaviors/Behaviour_Sense.java | 13 +- .../items/behaviors/Behaviour_SensorKit.java | 8 +- .../items/behaviors/Behaviour_SoftHammer.java | 105 +- .../items/behaviors/Behaviour_Sonictron.java | 14 +- .../items/behaviors/Behaviour_Spray_Color.java | 48 +- .../items/behaviors/Behaviour_Switch_Metadata.java | 2 +- .../common/items/behaviors/Behaviour_Wrench.java | 77 +- .../items/behaviors/Behaviour_WrittenBook.java | 6 +- src/main/java/gregtech/common/misc/GT_Command.java | 224 +- .../common/misc/GT_DrillingLogicDelegate.java | 62 +- .../misc/spaceprojects/SpaceProjectManager.java | 38 +- .../spaceprojects/SpaceProjectWorldSavedData.java | 128 +- .../common/misc/spaceprojects/base/SP_Upgrade.java | 28 +- .../misc/spaceprojects/base/SpaceProject.java | 20 +- .../misc/spaceprojects/commands/SPM_Command.java | 46 +- .../misc/spaceprojects/commands/SP_Command.java | 22 +- .../java/gregtech/common/power/FusionPower.java | 6 +- .../redstonecircuits/GT_Circuit_BasicLogic.java | 38 +- .../common/redstonecircuits/GT_Circuit_BitAnd.java | 9 +- .../common/redstonecircuits/GT_Circuit_Equals.java | 7 +- .../common/redstonecircuits/GT_Circuit_Pulser.java | 8 +- .../redstonecircuits/GT_Circuit_Randomizer.java | 5 +- .../redstonecircuits/GT_Circuit_RedstoneMeter.java | 5 +- .../common/redstonecircuits/GT_Circuit_Timer.java | 4 +- .../gregtech/common/render/GT_CapeRenderer.java | 66 +- .../common/render/GT_CopiedBlockTexture.java | 12 +- .../common/render/GT_CopiedCTMBlockTexture.java | 24 +- .../gregtech/common/render/GT_FlaskRenderer.java | 20 +- .../render/GT_FluidDisplayStackRenderer.java | 16 +- .../render/GT_MetaGenerated_Tool_Renderer.java | 148 +- .../common/render/GT_PollutionRenderer.java | 34 +- .../java/gregtech/common/render/GT_RenderUtil.java | 4 +- .../gregtech/common/render/GT_RenderedTexture.java | 119 +- .../gregtech/common/render/GT_Renderer_Block.java | 740 ++- .../gregtech/common/render/GT_SidedTexture.java | 8 +- .../gregtech/common/render/GT_TextureBuilder.java | 22 +- .../render/items/CosmicNeutroniumRenderer.java | 16 +- .../render/items/GT_GeneratedItem_Renderer.java | 58 +- .../items/GT_GeneratedMaterial_Renderer.java | 56 +- .../items/GT_MetaGenerated_Item_Renderer.java | 4 +- .../common/render/items/GaiaSpiritRenderer.java | 16 +- .../common/render/items/InfinityRenderer.java | 2 +- .../render/items/TranscendentMetalRenderer.java | 46 +- .../common/render/items/UniversiumRenderer.java | 61 +- .../automation/GT_MetaTileEntity_ChestBuffer.java | 48 +- .../automation/GT_MetaTileEntity_Filter.java | 156 +- .../GT_MetaTileEntity_ItemDistributor.java | 69 +- .../automation/GT_MetaTileEntity_RecipeFilter.java | 36 +- .../automation/GT_MetaTileEntity_Regulator.java | 135 +- .../automation/GT_MetaTileEntity_SuperBuffer.java | 46 +- .../automation/GT_MetaTileEntity_TypeFilter.java | 78 +- .../boilers/GT_MetaTileEntity_Boiler.java | 142 +- .../boilers/GT_MetaTileEntity_Boiler_Bronze.java | 281 +- .../boilers/GT_MetaTileEntity_Boiler_Lava.java | 232 +- .../boilers/GT_MetaTileEntity_Boiler_Solar.java | 116 +- .../GT_MetaTileEntity_Boiler_Solar_Steel.java | 24 +- .../boilers/GT_MetaTileEntity_Boiler_Steel.java | 35 +- .../casings/upgrade/InventoryUpgrade.java | 23 +- .../GT_MetaTileEntity_AdvDebugStructureWriter.java | 241 +- .../GT_MetaTileEntity_DieselGenerator.java | 178 +- .../generators/GT_MetaTileEntity_GasTurbine.java | 180 +- .../generators/GT_MetaTileEntity_LightningRod.java | 41 +- .../GT_MetaTileEntity_MagicEnergyConverter.java | 102 +- .../GT_MetaTileEntity_MagicalEnergyAbsorber.java | 227 +- .../GT_MetaTileEntity_NaquadahReactor.java | 113 +- .../GT_MetaTileEntity_PlasmaGenerator.java | 50 +- .../generators/GT_MetaTileEntity_SteamTurbine.java | 145 +- .../GT_MetaTileEntity_BasicHull_Bronze.java | 19 +- .../GT_MetaTileEntity_BasicHull_BronzeBricks.java | 29 +- .../GT_MetaTileEntity_BasicHull_Steel.java | 14 +- .../GT_MetaTileEntity_BasicHull_SteelBricks.java | 29 +- .../GT_MetaTileEntity_Hatch_InputBus_ME.java | 241 +- .../GT_MetaTileEntity_Hatch_OutputBus_ME.java | 83 +- .../GT_MetaTileEntity_Hatch_Output_ME.java | 70 +- .../GT_MetaTileEntity_AdvSeismicProspector.java | 245 +- .../basic/GT_MetaTileEntity_Boxinator.java | 185 +- .../machines/basic/GT_MetaTileEntity_Charger.java | 53 +- .../basic/GT_MetaTileEntity_CuringOven.java | 107 +- .../basic/GT_MetaTileEntity_IndustrialApiary.java | 651 +- .../basic/GT_MetaTileEntity_Massfabricator.java | 148 +- ..._MetaTileEntity_MicrowaveEnergyTransmitter.java | 197 +- .../machines/basic/GT_MetaTileEntity_Miner.java | 225 +- .../basic/GT_MetaTileEntity_MonsterRepellent.java | 74 +- .../basic/GT_MetaTileEntity_PotionBrewer.java | 159 +- .../machines/basic/GT_MetaTileEntity_Printer.java | 56 +- .../machines/basic/GT_MetaTileEntity_Pump.java | 285 +- .../basic/GT_MetaTileEntity_Replicator.java | 157 +- .../basic/GT_MetaTileEntity_RockBreaker.java | 156 +- .../machines/basic/GT_MetaTileEntity_Scanner.java | 271 +- .../basic/GT_MetaTileEntity_SeismicProspector.java | 301 +- .../basic/GT_MetaTileEntity_Teleporter.java | 294 +- ...GT_MetaTileEntity_LongDistancePipelineBase.java | 72 +- ...T_MetaTileEntity_LongDistancePipelineFluid.java | 16 +- ...GT_MetaTileEntity_LongDistancePipelineItem.java | 16 +- .../GT_MetaTileEntity_AbstractMultiFurnace.java | 8 +- .../multi/GT_MetaTileEntity_AssemblyLine.java | 363 +- .../GT_MetaTileEntity_BrickedBlastFurnace.java | 41 +- .../GT_MetaTileEntity_BronzeBlastFurnace.java | 10 +- .../multi/GT_MetaTileEntity_Charcoal_Pit.java | 112 +- .../multi/GT_MetaTileEntity_Cleanroom.java | 161 +- .../GT_MetaTileEntity_ConcreteBackfillerBase.java | 57 +- .../multi/GT_MetaTileEntity_DieselEngine.java | 228 +- .../multi/GT_MetaTileEntity_DistillationTower.java | 271 +- .../multi/GT_MetaTileEntity_DrillerBase.java | 200 +- .../GT_MetaTileEntity_ElectricBlastFurnace.java | 308 +- .../GT_MetaTileEntity_ExtremeDieselEngine.java | 170 +- .../multi/GT_MetaTileEntity_FusionComputer.java | 411 +- .../multi/GT_MetaTileEntity_FusionComputer1.java | 50 +- .../multi/GT_MetaTileEntity_FusionComputer2.java | 50 +- .../multi/GT_MetaTileEntity_FusionComputer3.java | 50 +- .../multi/GT_MetaTileEntity_HeatExchanger.java | 276 +- .../GT_MetaTileEntity_ImplosionCompressor.java | 76 +- .../GT_MetaTileEntity_IntegratedOreFactory.java | 429 +- .../multi/GT_MetaTileEntity_LargeBoiler.java | 217 +- .../GT_MetaTileEntity_LargeChemicalReactor.java | 229 +- .../multi/GT_MetaTileEntity_LargeTurbine.java | 242 +- .../multi/GT_MetaTileEntity_LargeTurbine_Gas.java | 58 +- ...GT_MetaTileEntity_LargeTurbine_GasAdvanced.java | 58 +- .../GT_MetaTileEntity_LargeTurbine_HPSteam.java | 82 +- .../GT_MetaTileEntity_LargeTurbine_Plasma.java | 210 +- .../GT_MetaTileEntity_LargeTurbine_Steam.java | 82 +- .../multi/GT_MetaTileEntity_MultiFurnace.java | 260 +- .../multi/GT_MetaTileEntity_NanoForge.java | 316 +- .../multi/GT_MetaTileEntity_OilCracker.java | 227 +- .../multi/GT_MetaTileEntity_OilDrillBase.java | 162 +- .../multi/GT_MetaTileEntity_OilDrillInfinite.java | 28 +- .../GT_MetaTileEntity_OreDrillingPlantBase.java | 132 +- .../multi/GT_MetaTileEntity_PCBFactory.java | 1442 ++--- .../multi/GT_MetaTileEntity_PlasmaForge.java | 1194 ++-- .../GT_MetaTileEntity_PrimitiveBlastFurnace.java | 253 +- .../multi/GT_MetaTileEntity_ProcessingArray.java | 325 +- .../multi/GT_MetaTileEntity_PyrolyseOven.java | 172 +- .../GT_MetaTileEntity_TranscendentPlasmaMixer.java | 134 +- .../multi/GT_MetaTileEntity_VacuumFreezer.java | 72 +- .../machines/multiblock/MultiBlock_CokeOven.java | 58 +- .../machines/multiblock/MultiBlock_Macerator.java | 157 +- .../GT_MetaTileEntity_AlloySmelter_Bronze.java | 88 +- .../GT_MetaTileEntity_AlloySmelter_Steel.java | 88 +- .../steam/GT_MetaTileEntity_Compressor_Bronze.java | 85 +- .../steam/GT_MetaTileEntity_Compressor_Steel.java | 85 +- .../steam/GT_MetaTileEntity_Extractor_Bronze.java | 82 +- .../steam/GT_MetaTileEntity_Extractor_Steel.java | 82 +- .../GT_MetaTileEntity_ForgeHammer_Bronze.java | 82 +- .../steam/GT_MetaTileEntity_ForgeHammer_Steel.java | 82 +- .../steam/GT_MetaTileEntity_Furnace_Bronze.java | 84 +- .../steam/GT_MetaTileEntity_Furnace_Steel.java | 83 +- .../steam/GT_MetaTileEntity_Macerator_Bronze.java | 117 +- .../steam/GT_MetaTileEntity_Macerator_Steel.java | 117 +- .../GT_MetaTileEntity_DigitalChestBase.java | 205 +- .../storage/GT_MetaTileEntity_DigitalTankBase.java | 418 +- .../storage/GT_MetaTileEntity_Locker.java | 6 +- .../storage/GT_MetaTileEntity_QuantumTank.java | 36 +- .../storage/GT_MetaTileEntity_SuperTank.java | 34 +- src/main/java/gregtech/common/tools/GT_Tool.java | 18 +- .../java/gregtech/common/tools/GT_Tool_Axe.java | 38 +- .../common/tools/GT_Tool_BranchCutter.java | 28 +- .../common/tools/GT_Tool_ButcheryKnife.java | 14 +- .../gregtech/common/tools/GT_Tool_BuzzSaw.java | 20 +- .../gregtech/common/tools/GT_Tool_Chainsaw_HV.java | 6 +- .../gregtech/common/tools/GT_Tool_Chainsaw_LV.java | 57 +- .../gregtech/common/tools/GT_Tool_Chainsaw_MV.java | 6 +- .../gregtech/common/tools/GT_Tool_Crowbar.java | 14 +- .../gregtech/common/tools/GT_Tool_Drill_HV.java | 6 +- .../gregtech/common/tools/GT_Tool_Drill_LV.java | 44 +- .../gregtech/common/tools/GT_Tool_Drill_MV.java | 6 +- .../java/gregtech/common/tools/GT_Tool_File.java | 20 +- .../gregtech/common/tools/GT_Tool_HardHammer.java | 59 +- .../java/gregtech/common/tools/GT_Tool_Hoe.java | 24 +- .../gregtech/common/tools/GT_Tool_JackHammer.java | 44 +- .../java/gregtech/common/tools/GT_Tool_Knife.java | 24 +- .../java/gregtech/common/tools/GT_Tool_Mortar.java | 12 +- .../gregtech/common/tools/GT_Tool_Pickaxe.java | 34 +- .../java/gregtech/common/tools/GT_Tool_Plow.java | 50 +- .../gregtech/common/tools/GT_Tool_Plunger.java | 24 +- .../gregtech/common/tools/GT_Tool_RollingPin.java | 12 +- .../java/gregtech/common/tools/GT_Tool_Saw.java | 59 +- .../java/gregtech/common/tools/GT_Tool_Scoop.java | 16 +- .../gregtech/common/tools/GT_Tool_Screwdriver.java | 40 +- .../common/tools/GT_Tool_Screwdriver_LV.java | 8 +- .../java/gregtech/common/tools/GT_Tool_Sense.java | 48 +- .../java/gregtech/common/tools/GT_Tool_Shovel.java | 36 +- .../gregtech/common/tools/GT_Tool_SoftHammer.java | 22 +- .../common/tools/GT_Tool_Soldering_Iron.java | 36 +- .../java/gregtech/common/tools/GT_Tool_Sword.java | 34 +- .../gregtech/common/tools/GT_Tool_Turbine.java | 16 +- .../common/tools/GT_Tool_UniversalSpade.java | 62 +- .../gregtech/common/tools/GT_Tool_WireCutter.java | 14 +- .../java/gregtech/common/tools/GT_Tool_Wrench.java | 25 +- .../gregtech/common/tools/GT_Tool_Wrench_HV.java | 8 +- .../gregtech/common/tools/GT_Tool_Wrench_LV.java | 10 +- .../gregtech/common/tools/GT_Tool_Wrench_MV.java | 8 +- 325 files changed, 24431 insertions(+), 27336 deletions(-) (limited to 'src/main/java/gregtech/common') diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index af7a4a6c00..2874bde726 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -97,47 +97,47 @@ public class GT_Client extends GT_Proxy implements Runnable { private static final List ROTATABLE_VANILLA_BLOCKS; private static final int[][] GRID_SWITCH_TABLE = new int[][] { { 0, 5, 3, 1, 2, 4 }, { 5, 0, 1, 3, 2, 4 }, - { 1, 3, 0, 5, 2, 4 }, { 3, 1, 5, 0, 2, 4 }, { 4, 2, 3, 1, 0, 5 }, { 2, 4, 3, 1, 5, 0 }, }; + { 1, 3, 0, 5, 2, 4 }, { 3, 1, 5, 0, 2, 4 }, { 4, 2, 3, 1, 0, 5 }, { 2, 4, 3, 1, 5, 0 }, }; // 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 }; + -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; static { ROTATABLE_VANILLA_BLOCKS = Arrays.asList( - Blocks.piston, - Blocks.sticky_piston, - Blocks.furnace, - Blocks.lit_furnace, - Blocks.dropper, - Blocks.dispenser, - Blocks.chest, - Blocks.trapped_chest, - Blocks.ender_chest, - Blocks.hopper, - Blocks.pumpkin, - Blocks.lit_pumpkin); + Blocks.piston, + Blocks.sticky_piston, + Blocks.furnace, + Blocks.lit_furnace, + Blocks.dropper, + Blocks.dispenser, + Blocks.chest, + Blocks.trapped_chest, + Blocks.ender_chest, + Blocks.hopper, + Blocks.pumpkin, + Blocks.lit_pumpkin); } private final HashSet mCapeList = new HashSet<>(); @@ -181,103 +181,103 @@ public class GT_Client extends GT_Proxy implements Runnable { mAnimationTick = 0L; mAnimationDirection = false; mPosR = Arrays.asList( - Materials.Enderium, - Materials.Vinteum, - Materials.Uranium235, - Materials.InfusedGold, - Materials.Plutonium241, - Materials.NaquadahEnriched, - Materials.Naquadria, - Materials.InfusedOrder, - Materials.Force, - Materials.Pyrotheum, - Materials.Sunnarium, - Materials.Glowstone, - Materials.Thaumium, - Materials.InfusedVis, - Materials.InfusedAir, - Materials.InfusedFire, - Materials.FierySteel, - Materials.Firestone); + Materials.Enderium, + Materials.Vinteum, + Materials.Uranium235, + Materials.InfusedGold, + Materials.Plutonium241, + Materials.NaquadahEnriched, + Materials.Naquadria, + Materials.InfusedOrder, + Materials.Force, + Materials.Pyrotheum, + Materials.Sunnarium, + Materials.Glowstone, + Materials.Thaumium, + Materials.InfusedVis, + Materials.InfusedAir, + Materials.InfusedFire, + Materials.FierySteel, + Materials.Firestone); mPosG = Arrays.asList( - Materials.Enderium, - Materials.Vinteum, - Materials.Uranium235, - Materials.InfusedGold, - Materials.Plutonium241, - Materials.NaquadahEnriched, - Materials.Naquadria, - Materials.InfusedOrder, - Materials.Force, - Materials.Pyrotheum, - Materials.Sunnarium, - Materials.Glowstone, - Materials.InfusedAir, - Materials.InfusedEarth); + Materials.Enderium, + Materials.Vinteum, + Materials.Uranium235, + Materials.InfusedGold, + Materials.Plutonium241, + Materials.NaquadahEnriched, + Materials.Naquadria, + Materials.InfusedOrder, + Materials.Force, + Materials.Pyrotheum, + Materials.Sunnarium, + Materials.Glowstone, + Materials.InfusedAir, + Materials.InfusedEarth); mPosB = Arrays.asList( - Materials.Enderium, - Materials.Vinteum, - Materials.Uranium235, - Materials.InfusedGold, - Materials.Plutonium241, - Materials.NaquadahEnriched, - Materials.Naquadria, - Materials.InfusedOrder, - Materials.InfusedVis, - Materials.InfusedWater, - Materials.Thaumium); + Materials.Enderium, + Materials.Vinteum, + Materials.Uranium235, + Materials.InfusedGold, + Materials.Plutonium241, + Materials.NaquadahEnriched, + Materials.Naquadria, + Materials.InfusedOrder, + Materials.InfusedVis, + Materials.InfusedWater, + Materials.Thaumium); mNegR = Arrays.asList(Materials.InfusedEntropy, Materials.NetherStar); mNegG = Arrays.asList(Materials.InfusedEntropy, Materials.NetherStar); mNegB = Arrays.asList(Materials.InfusedEntropy, Materials.NetherStar); mMoltenPosR = Arrays.asList( - Materials.Enderium, - Materials.NetherStar, - Materials.Vinteum, - Materials.Uranium235, - Materials.InfusedGold, - Materials.Plutonium241, - Materials.NaquadahEnriched, - Materials.Naquadria, - Materials.InfusedOrder, - Materials.Force, - Materials.Pyrotheum, - Materials.Sunnarium, - Materials.Glowstone, - Materials.Thaumium, - Materials.InfusedVis, - Materials.InfusedAir, - Materials.InfusedFire, - Materials.FierySteel, - Materials.Firestone); + Materials.Enderium, + Materials.NetherStar, + Materials.Vinteum, + Materials.Uranium235, + Materials.InfusedGold, + Materials.Plutonium241, + Materials.NaquadahEnriched, + Materials.Naquadria, + Materials.InfusedOrder, + Materials.Force, + Materials.Pyrotheum, + Materials.Sunnarium, + Materials.Glowstone, + Materials.Thaumium, + Materials.InfusedVis, + Materials.InfusedAir, + Materials.InfusedFire, + Materials.FierySteel, + Materials.Firestone); mMoltenPosG = Arrays.asList( - Materials.Enderium, - Materials.NetherStar, - Materials.Vinteum, - Materials.Uranium235, - Materials.InfusedGold, - Materials.Plutonium241, - Materials.NaquadahEnriched, - Materials.Naquadria, - Materials.InfusedOrder, - Materials.Force, - Materials.Pyrotheum, - Materials.Sunnarium, - Materials.Glowstone, - Materials.InfusedAir, - Materials.InfusedEarth); + Materials.Enderium, + Materials.NetherStar, + Materials.Vinteum, + Materials.Uranium235, + Materials.InfusedGold, + Materials.Plutonium241, + Materials.NaquadahEnriched, + Materials.Naquadria, + Materials.InfusedOrder, + Materials.Force, + Materials.Pyrotheum, + Materials.Sunnarium, + Materials.Glowstone, + Materials.InfusedAir, + Materials.InfusedEarth); mMoltenPosB = Arrays.asList( - Materials.Enderium, - Materials.NetherStar, - Materials.Vinteum, - Materials.Uranium235, - Materials.InfusedGold, - Materials.Plutonium241, - Materials.NaquadahEnriched, - Materials.Naquadria, - Materials.InfusedOrder, - Materials.InfusedVis, - Materials.InfusedWater, - Materials.Thaumium); + Materials.Enderium, + Materials.NetherStar, + Materials.Vinteum, + Materials.Uranium235, + Materials.InfusedGold, + Materials.Plutonium241, + Materials.NaquadahEnriched, + Materials.Naquadria, + Materials.InfusedOrder, + Materials.InfusedVis, + Materials.InfusedWater, + Materials.Thaumium); mMoltenNegR = Collections.singletonList(Materials.InfusedEntropy); mMoltenNegG = Collections.singletonList(Materials.InfusedEntropy); mMoltenNegB = Collections.singletonList(Materials.InfusedEntropy); @@ -286,7 +286,7 @@ public class GT_Client extends GT_Proxy implements Runnable { private static boolean checkedForChicken = false; private static void drawGrid(DrawBlockHighlightEvent aEvent, boolean showCoverConnections, boolean aIsWrench, - boolean aIsSneaking) { + boolean aIsSneaking) { if (!checkedForChicken) { try { Class.forName("codechicken.lib.vec.Rotation"); @@ -298,16 +298,16 @@ public class GT_Client extends GT_Proxy implements Runnable { GL11.glPushMatrix(); GL11.glTranslated( - -(aEvent.player.lastTickPosX - + (aEvent.player.posX - aEvent.player.lastTickPosX) * (double) aEvent.partialTicks), - -(aEvent.player.lastTickPosY - + (aEvent.player.posY - aEvent.player.lastTickPosY) * (double) aEvent.partialTicks), - -(aEvent.player.lastTickPosZ - + (aEvent.player.posZ - aEvent.player.lastTickPosZ) * (double) aEvent.partialTicks)); + -(aEvent.player.lastTickPosX + + (aEvent.player.posX - aEvent.player.lastTickPosX) * (double) aEvent.partialTicks), + -(aEvent.player.lastTickPosY + + (aEvent.player.posY - aEvent.player.lastTickPosY) * (double) aEvent.partialTicks), + -(aEvent.player.lastTickPosZ + + (aEvent.player.posZ - aEvent.player.lastTickPosZ) * (double) aEvent.partialTicks)); GL11.glTranslated( - (float) aEvent.target.blockX + 0.5F, - (float) aEvent.target.blockY + 0.5F, - (float) aEvent.target.blockZ + 0.5F); + (float) aEvent.target.blockX + 0.5F, + (float) aEvent.target.blockY + 0.5F, + (float) aEvent.target.blockZ + 0.5F); final int tSideHit = aEvent.target.sideHit; Rotation.sideRotations[tSideHit].glApply(); // draw grid @@ -323,10 +323,8 @@ 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; @@ -404,18 +402,17 @@ public class GT_Client extends GT_Proxy implements Runnable { 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); + .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 @@ -443,15 +440,15 @@ public class GT_Client extends GT_Proxy implements Runnable { GL11.glBegin(GL_LINE_LOOP); for (int i = 0; i <= ROTATION_MARKER_RESOLUTION; i++) { GL11.glVertex3d( - Math.cos(i * Math.PI * 1.75 / ROTATION_MARKER_RESOLUTION) * 0.4, - 0, - Math.sin(i * Math.PI * 1.75 / ROTATION_MARKER_RESOLUTION) * 0.4); + Math.cos(i * Math.PI * 1.75 / ROTATION_MARKER_RESOLUTION) * 0.4, + 0, + Math.sin(i * Math.PI * 1.75 / ROTATION_MARKER_RESOLUTION) * 0.4); } for (int i = ROTATION_MARKER_RESOLUTION; i >= 0; i--) { GL11.glVertex3d( - Math.cos(i * Math.PI * 1.75 / ROTATION_MARKER_RESOLUTION) * 0.24, - 0, - Math.sin(i * Math.PI * 1.75 / ROTATION_MARKER_RESOLUTION) * 0.24); + Math.cos(i * Math.PI * 1.75 / ROTATION_MARKER_RESOLUTION) * 0.24, + 0, + Math.sin(i * Math.PI * 1.75 / ROTATION_MARKER_RESOLUTION) * 0.24); } GL11.glVertex3d(0.141114561800, 0, 0); GL11.glVertex3d(0.32, 0, -0.178885438199); @@ -532,30 +529,28 @@ public class GT_Client extends GT_Proxy implements Runnable { MinecraftForge.EVENT_BUS.register(new ExtraIcons()); Minecraft.getMinecraft() - .getResourcePackRepository().rprMetadataSerializer.registerMetadataSectionType( - new ColorsMetadataSectionSerializer(), - ColorsMetadataSection.class); + .getResourcePackRepository().rprMetadataSerializer + .registerMetadataSectionType(new ColorsMetadataSectionSerializer(), ColorsMetadataSection.class); new GT_MetaTileEntity_AdvDebugStructureWriter.ForgeEventHandler(); final String[] arr = { "renadi", "hanakocz", "MysteryDump", "Flaver4", "x_Fame", "Peluche321", - "Goshen_Ithilien", "manf", "Bimgo", "leagris", "IAmMinecrafter02", "Cerous", "Devilin_Pixy", - "Bkarlsson87", "BadAlchemy", "CaballoCraft", "melanclock", "Resursator", "demanzke", "AndrewAmmerlaan", - "Deathlycraft", "Jirajha", "Axlegear", "kei_kouma", "Dracion", "dungi", "Dorfschwein", "Zero Tw0", - "mattiagraz85", "sebastiank30", "Plem", "invultri", "grillo126", "malcanteth", "Malevolence_", - "Nicholas_Manuel", "Sirbab", "kehaan", "bpgames123", "semig0d", "9000bowser", "Sovereignty89", - "Kris1432", "xander_cage_", "samuraijp", "bsaa", "SpwnX", "tworf", "Kadah", "kanni", "Stute", "Hegik", - "Onlyme", "t3hero", "Hotchi", "jagoly", "Nullav", "BH5432", "Sibmer", "inceee", "foxxx0", "Hartok", - "TMSama", "Shlnen", "Carsso", "zessirb", "meep310", "Seldron", "yttr1um", "hohounk", "freebug", - "Sylphio", "jmarler", "Saberawr", "r00teniy", "Neonbeta", "yinscape", "voooon24", "Quintine", - "peach774", "lepthymo", "bildeman", "Kremnari", "Aerosalo", "OndraSter", "oscares91", "mr10movie", - "Daxx367x2", "EGERTRONx", "aka13_404", "Abouttabs", "Johnstaal", "djshiny99", "megatronp", "DZCreeper", - "Kane_Hart", "Truculent", "vidplace7", "simon6689", "MomoNasty", "UnknownXLV", "goreacraft", - "Fluttermine", "Daddy_Cecil", "MrMaleficus", "TigersFangs", "cublikefoot", "chainman564", "NikitaBuker", - "Misha999777", "25FiveDetail", "AntiCivilBoy", "michaelbrady", "xXxIceFirexXx", "Speedynutty68", - "GarretSidzaka", "HallowCharm977", "mastermind1919", "The_Hypersonic", "diamondguy2798", - "zF4ll3nPr3d4t0r", "CrafterOfMines57", "XxELIT3xSNIP3RxX", "SuterusuKusanagi", "xavier0014", "adamros", - "alexbegt" }; + "Goshen_Ithilien", "manf", "Bimgo", "leagris", "IAmMinecrafter02", "Cerous", "Devilin_Pixy", "Bkarlsson87", + "BadAlchemy", "CaballoCraft", "melanclock", "Resursator", "demanzke", "AndrewAmmerlaan", "Deathlycraft", + "Jirajha", "Axlegear", "kei_kouma", "Dracion", "dungi", "Dorfschwein", "Zero Tw0", "mattiagraz85", + "sebastiank30", "Plem", "invultri", "grillo126", "malcanteth", "Malevolence_", "Nicholas_Manuel", "Sirbab", + "kehaan", "bpgames123", "semig0d", "9000bowser", "Sovereignty89", "Kris1432", "xander_cage_", "samuraijp", + "bsaa", "SpwnX", "tworf", "Kadah", "kanni", "Stute", "Hegik", "Onlyme", "t3hero", "Hotchi", "jagoly", + "Nullav", "BH5432", "Sibmer", "inceee", "foxxx0", "Hartok", "TMSama", "Shlnen", "Carsso", "zessirb", + "meep310", "Seldron", "yttr1um", "hohounk", "freebug", "Sylphio", "jmarler", "Saberawr", "r00teniy", + "Neonbeta", "yinscape", "voooon24", "Quintine", "peach774", "lepthymo", "bildeman", "Kremnari", "Aerosalo", + "OndraSter", "oscares91", "mr10movie", "Daxx367x2", "EGERTRONx", "aka13_404", "Abouttabs", "Johnstaal", + "djshiny99", "megatronp", "DZCreeper", "Kane_Hart", "Truculent", "vidplace7", "simon6689", "MomoNasty", + "UnknownXLV", "goreacraft", "Fluttermine", "Daddy_Cecil", "MrMaleficus", "TigersFangs", "cublikefoot", + "chainman564", "NikitaBuker", "Misha999777", "25FiveDetail", "AntiCivilBoy", "michaelbrady", + "xXxIceFirexXx", "Speedynutty68", "GarretSidzaka", "HallowCharm977", "mastermind1919", "The_Hypersonic", + "diamondguy2798", "zF4ll3nPr3d4t0r", "CrafterOfMines57", "XxELIT3xSNIP3RxX", "SuterusuKusanagi", + "xavier0014", "adamros", "alexbegt" }; for (String tName : arr) { mCapeList.add(tName.toLowerCase()); } @@ -596,7 +591,7 @@ public class GT_Client extends GT_Proxy implements Runnable { try { if (GregTech_API.METATILEENTITIES[i] != null) { GregTech_API.METATILEENTITIES[i].getStackForm(1L) - .getTooltip(null, true); + .getTooltip(null, true); GT_Log.out.println("META " + i + " " + GregTech_API.METATILEENTITIES[i].getMetaName()); } } catch (Throwable e) { @@ -611,18 +606,16 @@ 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); - } - }); + .getResourceManager()).registerReloadListener(new IResourceManagerReloadListener() { + + @Override + public void onResourceManagerReload(IResourceManager l) { + GT_GUIColorOverride.onResourceManagerReload(); + FallbackableSteamTexture.reload(); + GregTech_API.sCoverBehaviors.values() + .forEach(GT_CoverBehaviorBase::reloadColorOverride); + } + }); } @Override @@ -631,8 +624,8 @@ public class GT_Client extends GT_Proxy implements Runnable { try (final Scanner tScanner = new Scanner(new URL(GT_CAPE_LIST_URL).openStream())) { while (tScanner.hasNextLine()) { this.mCapeList.add( - tScanner.nextLine() - .toLowerCase()); + tScanner.nextLine() + .toLowerCase()); } } catch (Throwable e) { e.printStackTrace(GT_Log.err); @@ -641,7 +634,7 @@ public class GT_Client extends GT_Proxy implements Runnable { try (final Scanner tScanner = new Scanner(new URL(GTNH_CAPE_LIST_URL).openStream())) { while (tScanner.hasNextLine()) { final String tName = tScanner.nextLine() - .toLowerCase(); + .toLowerCase(); if (tName.contains(":")) { if (!this.mCapeList.contains(tName.substring(0, tName.indexOf(":")))) { this.mCapeList.add(tName); @@ -682,38 +675,38 @@ public class GT_Client extends GT_Proxy implements Runnable { GT_Values.NW.sendToServer(new GT_Packet_ClientPreference(mPreference)); if (!Minecraft.getMinecraft() - .isSingleplayer()) { + .isSingleplayer()) { // Check for more IC2 recipes to also catch MineTweaker additions GT_ModHandler.addIC2RecipesToGT( - GT_ModHandler.getMaceratorRecipeList(), - GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, - true, - true, - true); + GT_ModHandler.getMaceratorRecipeList(), + GT_Recipe.GT_Recipe_Map.sMaceratorRecipes, + true, + true, + true); GT_ModHandler.addIC2RecipesToGT( - GT_ModHandler.getCompressorRecipeList(), - GT_Recipe.GT_Recipe_Map.sCompressorRecipes, - true, - true, - true); + GT_ModHandler.getCompressorRecipeList(), + GT_Recipe.GT_Recipe_Map.sCompressorRecipes, + true, + true, + true); GT_ModHandler.addIC2RecipesToGT( - GT_ModHandler.getExtractorRecipeList(), - GT_Recipe.GT_Recipe_Map.sExtractorRecipes, - true, - true, - true); + GT_ModHandler.getExtractorRecipeList(), + GT_Recipe.GT_Recipe_Map.sExtractorRecipes, + true, + true, + true); GT_ModHandler.addIC2RecipesToGT( - GT_ModHandler.getOreWashingRecipeList(), - GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, - false, - true, - true); + GT_ModHandler.getOreWashingRecipeList(), + GT_Recipe.GT_Recipe_Map.sOreWasherRecipes, + false, + true, + true); GT_ModHandler.addIC2RecipesToGT( - GT_ModHandler.getThermalCentrifugeRecipeList(), - GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, - true, - true, - true); + GT_ModHandler.getThermalCentrifugeRecipeList(), + GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes, + true, + true, + true); } } afterSomeTime++; @@ -724,7 +717,7 @@ public class GT_Client extends GT_Proxy implements Runnable { } } for (Iterator> iterator = GT_Utility.sPlayedSoundMap.entrySet() - .iterator(); iterator.hasNext();) { + .iterator(); iterator.hasNext();) { Map.Entry tEntry = iterator.next(); if (tEntry.getValue() < 0) { iterator.remove(); @@ -736,23 +729,21 @@ public class GT_Client extends GT_Proxy implements Runnable { if (GT_Values.updateFluidDisplayItems) { final MovingObjectPosition trace = Minecraft.getMinecraft().objectMouseOver; if (trace != null && trace.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK - && (mLastUpdatedBlockX != trace.blockX && mLastUpdatedBlockY != trace.blockY - && mLastUpdatedBlockZ != trace.blockZ || afterSomeTime % 10 == 0)) { + && (mLastUpdatedBlockX != trace.blockX && mLastUpdatedBlockY != trace.blockY + && mLastUpdatedBlockZ != trace.blockZ || afterSomeTime % 10 == 0)) { 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 gtTile) { if (gtTile.getMetaTileEntity() instanceof IHasFluidDisplayItem) { GT_Values.NW.sendToServer( - new MessageUpdateFluidDisplayItem( - trace.blockX, - trace.blockY, - trace.blockZ, - gtTile.getWorld().provider.dimensionId)); + new MessageUpdateFluidDisplayItem( + trace.blockX, + trace.blockY, + trace.blockZ, + gtTile.getWorld().provider.dimensionId)); } } } @@ -773,34 +764,29 @@ 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) - || aTileEntity instanceof IWrenchable) - drawGrid(aEvent, false, true, aEvent.player.isSneaking()); + || aTileEntity instanceof IWrenchable) drawGrid(aEvent, false, true, aEvent.player.isSneaking()); return; } if (!(aTileEntity instanceof ICoverable)) return; if (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sWireCutterList) - || GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sSolderingToolList)) { + || GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sSolderingToolList)) { if (((ICoverable) aTileEntity).getCoverIDAtSide((byte) aEvent.target.sideHit) == 0) drawGrid(aEvent, false, false, aEvent.player.isSneaking()); return; } if ((aEvent.currentItem == null && aEvent.player.isSneaking()) - || GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sCrowbarList) - || GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sScrewdriverList)) { + || GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sCrowbarList) + || GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sScrewdriverList)) { if (((ICoverable) aTileEntity).getCoverIDAtSide((byte) aEvent.target.sideHit) == 0) for (byte tSide : ALL_VALID_SIDES) if (((ICoverable) aTileEntity).getCoverIDAtSide(tSide) > 0) { drawGrid(aEvent, true, false, true); @@ -977,20 +963,15 @@ 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(); + .setPitch( + tString.startsWith("note.") ? (float) Math.pow(2D, (double) (aStack.stackSize - 13) / 12D) : 1.0F) + .setIdentifier(tString) + .setPosition(aX, aY, aZ) + .run(); } } @@ -1017,19 +998,19 @@ public class GT_Client extends GT_Proxy implements Runnable { int hide = 0; for (int i : ids) { if (OreDictionary.getOreName(i) - .equals("craftingToolSolderingIron")) { + .equals("craftingToolSolderingIron")) { hide |= 0x1; break; } } if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWrenchList) - || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList) - || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sHardHammerList) - || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSoftHammerList) - || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWireCutterList) - || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSolderingToolList) - || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sCrowbarList) - || GregTech_API.sCovers.containsKey(new GT_ItemStack(tCurrentItem))) { + || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList) + || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sHardHammerList) + || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSoftHammerList) + || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWireCutterList) + || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSolderingToolList) + || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sCrowbarList) + || GregTech_API.sCovers.containsKey(new GT_ItemStack(tCurrentItem))) { hide |= 0x2; } return hide; diff --git a/src/main/java/gregtech/common/GT_DummyWorld.java b/src/main/java/gregtech/common/GT_DummyWorld.java index 321e0688ce..d394ad3703 100644 --- a/src/main/java/gregtech/common/GT_DummyWorld.java +++ b/src/main/java/gregtech/common/GT_DummyWorld.java @@ -24,7 +24,7 @@ public class GT_DummyWorld extends World { public ItemStack mLastSetBlock = null; public GT_DummyWorld(ISaveHandler saveHandler, String name, WorldProvider worldProvider, - WorldSettings worldSettings, Profiler profiler) { + WorldSettings worldSettings, Profiler profiler) { super(saveHandler, name, worldSettings, worldProvider, profiler); this.rand = this.mRandom; } diff --git a/src/main/java/gregtech/common/GT_Network.java b/src/main/java/gregtech/common/GT_Network.java index b6d44be85b..6ab0ed4f02 100644 --- a/src/main/java/gregtech/common/GT_Network.java +++ b/src/main/java/gregtech/common/GT_Network.java @@ -39,26 +39,26 @@ public class GT_Network extends MessageToMessageCodec public GT_Network() { this( - "GregTech", - new GT_Packet_TileEntity(), // 0 - new GT_Packet_Sound(), // 1 - new GT_Packet_Block_Event(), // 2 - new GT_Packet_Ores(), // 3 - new GT_Packet_Pollution(), // 4 - new MessageSetFlaskCapacity(), // 5 - new GT_Packet_TileEntityCover(), // 6 - new GT_Packet_TileEntityCoverGUI(), // 7 - new MessageUpdateFluidDisplayItem(), // 8 - new GT_Packet_ClientPreference(), // 9 - new GT_Packet_WirelessRedstoneCover(), // 10 - new GT_Packet_TileEntityCoverNew(), // 11 - new GT_Packet_SetConfigurationCircuit(), // 12 - new GT_Packet_UpdateItem(), // 13 - new GT_Packet_SetLockedFluid(), // 14 - new GT_Packet_GtTileEntityGuiRequest(), // 15 - new GT_Packet_SendCoverData(), // 16 - new GT_Packet_RequestCoverData(), // 17 - new GT_Packet_MultiTileEntity() // 18 + "GregTech", + new GT_Packet_TileEntity(), // 0 + new GT_Packet_Sound(), // 1 + new GT_Packet_Block_Event(), // 2 + new GT_Packet_Ores(), // 3 + new GT_Packet_Pollution(), // 4 + new MessageSetFlaskCapacity(), // 5 + new GT_Packet_TileEntityCover(), // 6 + new GT_Packet_TileEntityCoverGUI(), // 7 + new MessageUpdateFluidDisplayItem(), // 8 + new GT_Packet_ClientPreference(), // 9 + new GT_Packet_WirelessRedstoneCover(), // 10 + new GT_Packet_TileEntityCoverNew(), // 11 + new GT_Packet_SetConfigurationCircuit(), // 12 + new GT_Packet_UpdateItem(), // 13 + new GT_Packet_SetLockedFluid(), // 14 + new GT_Packet_GtTileEntityGuiRequest(), // 15 + new GT_Packet_SendCoverData(), // 16 + new GT_Packet_RequestCoverData(), // 17 + new GT_Packet_MultiTileEntity() // 18 ); } @@ -75,22 +75,22 @@ public class GT_Network extends MessageToMessageCodec @Override protected void encode(ChannelHandlerContext aContext, GT_Packet aPacket, List aOutput) throws Exception { final ByteBuf tBuf = Unpooled.buffer() - .writeByte(aPacket.getPacketID()); + .writeByte(aPacket.getPacketID()); aPacket.encode(tBuf); aOutput.add( - new FMLProxyPacket( - tBuf, - aContext.channel() - .attr(NetworkRegistry.FML_CHANNEL) - .get())); + new FMLProxyPacket( + tBuf, + aContext.channel() + .attr(NetworkRegistry.FML_CHANNEL) + .get())); } @Override protected void decode(ChannelHandlerContext aContext, FMLProxyPacket aPacket, List aOutput) - throws Exception { + throws Exception { final ByteArrayDataInput aData = ByteStreams.newDataInput( - aPacket.payload() - .array()); + aPacket.payload() + .array()); final GT_Packet tPacket = this.mSubChannels[aData.readByte()].decode(aData); tPacket.setINetHandler(aPacket.handler()); aOutput.add(tPacket); @@ -107,34 +107,34 @@ public class GT_Network extends MessageToMessageCodec return; } this.mChannel.get(Side.SERVER) - .attr(FMLOutboundHandler.FML_MESSAGETARGET) - .set(FMLOutboundHandler.OutboundTarget.PLAYER); + .attr(FMLOutboundHandler.FML_MESSAGETARGET) + .set(FMLOutboundHandler.OutboundTarget.PLAYER); this.mChannel.get(Side.SERVER) - .attr(FMLOutboundHandler.FML_MESSAGETARGETARGS) - .set(aPlayer); + .attr(FMLOutboundHandler.FML_MESSAGETARGETARGS) + .set(aPlayer); this.mChannel.get(Side.SERVER) - .writeAndFlush(aPacket); + .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); + .attr(FMLOutboundHandler.FML_MESSAGETARGET) + .set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT); this.mChannel.get(Side.SERVER) - .attr(FMLOutboundHandler.FML_MESSAGETARGETARGS) - .set(aPosition); + .attr(FMLOutboundHandler.FML_MESSAGETARGETARGS) + .set(aPosition); this.mChannel.get(Side.SERVER) - .writeAndFlush(aPacket); + .writeAndFlush(aPacket); } @Override public void sendToServer(GT_Packet aPacket) { this.mChannel.get(Side.CLIENT) - .attr(FMLOutboundHandler.FML_MESSAGETARGET) - .set(FMLOutboundHandler.OutboundTarget.TOSERVER); + .attr(FMLOutboundHandler.FML_MESSAGETARGET) + .set(FMLOutboundHandler.OutboundTarget.TOSERVER); this.mChannel.get(Side.CLIENT) - .writeAndFlush(aPacket); + .writeAndFlush(aPacket); } @Override @@ -146,8 +146,8 @@ public class GT_Network extends MessageToMessageCodec } Chunk tChunk = aWorld.getChunkFromBlockCoords(aX, aZ); if (tPlayer.getServerForPlayer() - .getPlayerManager() - .isPlayerWatchingChunk(tPlayer, tChunk.xPosition, tChunk.zPosition)) { + .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 ad2da33259..dede2599e8 100644 --- a/src/main/java/gregtech/common/GT_Pollution.java +++ b/src/main/java/gregtech/common/GT_Pollution.java @@ -144,12 +144,12 @@ public class GT_Pollution { // Smog filter TODO if (tPollution > GT_Mod.gregtechproxy.mPollutionSmogLimit) { AxisAlignedBB chunk = AxisAlignedBB.getBoundingBox( - actualPos.chunkXPos << 4, - 0, - actualPos.chunkZPos << 4, - (actualPos.chunkXPos << 4) + 16, - 256, - (actualPos.chunkZPos << 4) + 16); + actualPos.chunkXPos << 4, + 0, + actualPos.chunkZPos << 4, + (actualPos.chunkXPos << 4) + 16, + 256, + (actualPos.chunkZPos << 4) + 16); List tEntitys = world.getEntitiesWithinAABB(EntityLivingBase.class, chunk); for (EntityLivingBase tEnt : tEntitys) { if (tEnt instanceof EntityPlayerMP && ((EntityPlayerMP) tEnt).capabilities.isCreativeMode) @@ -158,22 +158,22 @@ public class GT_Pollution { switch (XSTR_INSTANCE.nextInt(3)) { default: tEnt.addPotionEffect( - new PotionEffect( - Potion.digSlowdown.id, - Math.min(tPollution / 1000, 1000), - tPollution / 400000)); + new PotionEffect( + Potion.digSlowdown.id, + Math.min(tPollution / 1000, 1000), + tPollution / 400000)); case 1: tEnt.addPotionEffect( - new PotionEffect( - Potion.weakness.id, - Math.min(tPollution / 1000, 1000), - tPollution / 400000)); + new PotionEffect( + Potion.weakness.id, + Math.min(tPollution / 1000, 1000), + tPollution / 400000)); case 2: tEnt.addPotionEffect( - new PotionEffect( - Potion.moveSlowdown.id, - Math.min(tPollution / 1000, 1000), - tPollution / 400000)); + new PotionEffect( + Potion.moveSlowdown.id, + Math.min(tPollution / 1000, 1000), + tPollution / 400000)); } } } @@ -192,22 +192,22 @@ public class GT_Pollution { tEnt.addPotionEffect(new PotionEffect(Potion.hunger.id, tPollution / 500000)); case 1: tEnt.addPotionEffect( - new PotionEffect( - Potion.confusion.id, - Math.min(tPollution / 2000, 1000), - 1)); + new PotionEffect( + Potion.confusion.id, + Math.min(tPollution / 2000, 1000), + 1)); case 2: tEnt.addPotionEffect( - new PotionEffect( - Potion.poison.id, - Math.min(tPollution / 4000, 1000), - tPollution / 500000)); + new PotionEffect( + Potion.poison.id, + Math.min(tPollution / 4000, 1000), + tPollution / 500000)); case 3: tEnt.addPotionEffect( - new PotionEffect( - Potion.blindness.id, - Math.min(tPollution / 2000, 1000), - 1)); + new PotionEffect( + Potion.blindness.id, + Math.min(tPollution / 2000, 1000), + 1)); } } } @@ -231,11 +231,11 @@ public class GT_Pollution { // Send new value to players nearby if (tPollution > POLLUTIONPACKET_MINVALUE) { NetworkRegistry.TargetPoint point = new NetworkRegistry.TargetPoint( - world.provider.dimensionId, - (actualPos.chunkXPos << 4), - 64, - (actualPos.chunkZPos << 4), - 256); + world.provider.dimensionId, + (actualPos.chunkXPos << 4), + 64, + (actualPos.chunkZPos << 4), + 256); GT_Values.NW.sendToAllAround(new GT_Packet_Pollution(actualPos, tPollution), point); } } @@ -264,18 +264,18 @@ public class GT_Pollution { world.setBlockToAir(x, y, z); } if (tBlock == Blocks.waterlily || tBlock == Blocks.wheat - || tBlock == Blocks.cactus - || tBlock.getMaterial() == Material.cactus - || tBlock == Blocks.melon_block - || tBlock == Blocks.melon_stem) { + || tBlock == Blocks.cactus + || tBlock.getMaterial() == Material.cactus + || tBlock == Blocks.melon_block + || tBlock == Blocks.melon_stem) { tBlock.dropBlockAsItem(world, x, y, z, tMeta, 0); world.setBlockToAir(x, y, z); } if (tBlock == Blocks.red_flower || tBlock == Blocks.yellow_flower - || tBlock == Blocks.carrots - || tBlock == Blocks.potatoes - || tBlock == Blocks.pumpkin - || tBlock == Blocks.pumpkin_stem) { + || tBlock == Blocks.carrots + || tBlock == Blocks.potatoes + || tBlock == Blocks.pumpkin + || tBlock == Blocks.pumpkin_stem) { tBlock.dropBlockAsItem(world, x, y, z, tMeta, 0); world.setBlockToAir(x, y, z); } @@ -292,9 +292,9 @@ public class GT_Pollution { } if (sourRain && world.isRaining() - && (tBlock == Blocks.stone || tBlock == Blocks.gravel || tBlock == Blocks.cobblestone) - && world.getBlock(x, y + 1, z) == Blocks.air - && world.canBlockSeeTheSky(x, y, z)) { + && (tBlock == Blocks.stone || tBlock == Blocks.gravel || tBlock == Blocks.cobblestone) + && world.getBlock(x, y + 1, z) == Blocks.air + && world.canBlockSeeTheSky(x, y, z)) { if (tBlock == Blocks.stone) { world.setBlock(x, y, z, Blocks.cobblestone); } else if (tBlock == Blocks.cobblestone) { @@ -318,7 +318,8 @@ 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(); } } } @@ -347,7 +348,7 @@ public class GT_Pollution { } private static void mutatePollution(World world, int x, int z, Consumer mutator, - @Nullable Set chunks) { + @Nullable Set chunks) { ChunkData data = STORAGE.get(world, x, z); boolean hadPollution = data.getAmount() > 0; mutator.accept(data); @@ -384,7 +385,7 @@ public class GT_Pollution { // 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(); + .getAmount(); } @Deprecated @@ -395,8 +396,7 @@ 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; + .getAmount() > 0; } // Add compatibility with old code @@ -409,9 +409,9 @@ public class GT_Pollution { static void migrate(ChunkDataEvent.Load e) { addPollution( - e.getChunk(), - e.getData() - .getInteger("GTPOLLUTION")); + e.getChunk(), + e.getData() + .getInteger("GTPOLLUTION")); } public static class GT_PollutionEventHandler { @@ -422,7 +422,7 @@ public class GT_Pollution { World world = event.player.worldObj; if (STORAGE.isCreated(world, event.chunk)) { int pollution = STORAGE.get(world, event.chunk) - .getAmount(); + .getAmount(); if (pollution > POLLUTIONPACKET_MINVALUE) GT_Values.NW.sendToPlayer(new GT_Packet_Pollution(event.chunk, pollution), event.player); } @@ -444,13 +444,13 @@ public class GT_Pollution { @Override protected void writeElement(DataOutput output, ChunkData element, World world, int chunkX, int chunkZ) - throws IOException { + throws IOException { output.writeInt(element.getAmount()); } @Override protected ChunkData readElement(DataInput input, int version, World world, int chunkX, int chunkZ) - throws IOException { + throws IOException { if (version != 0) throw new IOException("Region file corrupted"); ChunkData data = new ChunkData(input.readInt()); if (data.getAmount() > 0) diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 2678d01cef..f25240f8bc 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -145,359 +145,359 @@ import gregtech.common.misc.spaceprojects.SpaceProjectWorldSavedData; public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IGlobalWirelessEnergy { private static final EnumSet PREVENTED_ORES = EnumSet.of( - OreGenEvent.GenerateMinable.EventType.COAL, - OreGenEvent.GenerateMinable.EventType.IRON, - OreGenEvent.GenerateMinable.EventType.GOLD, - OreGenEvent.GenerateMinable.EventType.DIAMOND, - OreGenEvent.GenerateMinable.EventType.REDSTONE, - OreGenEvent.GenerateMinable.EventType.LAPIS, - OreGenEvent.GenerateMinable.EventType.QUARTZ); + OreGenEvent.GenerateMinable.EventType.COAL, + OreGenEvent.GenerateMinable.EventType.IRON, + OreGenEvent.GenerateMinable.EventType.GOLD, + OreGenEvent.GenerateMinable.EventType.DIAMOND, + OreGenEvent.GenerateMinable.EventType.REDSTONE, + OreGenEvent.GenerateMinable.EventType.LAPIS, + OreGenEvent.GenerateMinable.EventType.QUARTZ); public final HashSet mRegisteredOres = new HashSet<>(10000); public final ArrayList mSoundNames = new ArrayList<>(); public final ArrayList mSoundItems = new ArrayList<>(); public final ArrayList mSoundCounts = new ArrayList<>(); private final Collection mEvents = new HashSet<>(); private final Collection mIgnoredItems = new HashSet<>( - Arrays.asList( - "itemGhastTear", - "itemFlint", - "itemClay", - "itemBucketSaltWater", - "itemBucketFreshWater", - "itemBucketWater", - "itemRock", - "itemReed", - "itemArrow", - "itemSaw", - "itemKnife", - "itemHammer", - "itemChisel", - "itemRubber", - "itemEssence", - "itemIlluminatedPanel", - "itemSkull", - "itemRawRubber", - "itemBacon", - "itemJetpackAccelerator", - "itemLazurite", - "itemIridium", - "itemTear", - "itemClaw", - "itemFertilizer", - "itemTar", - "itemSlimeball", - "itemCoke", - "itemBeeswax", - "itemBeeQueen", - "itemForcicium", - "itemForcillium", - "itemRoyalJelly", - "itemHoneydew", - "itemHoney", - "itemPollen", - "itemReedTypha", - "itemSulfuricAcid", - "itemPotash", - "itemCompressedCarbon", - "itemBitumen", - "itemBioFuel", - "itemCokeSugar", - "itemCokeCactus", - "itemCharcoalSugar", - "itemCharcoalCactus", - "itemSludge", - "itemEnrichedAlloy", - "itemQuicksilver", - "itemMercury", - "itemOsmium", - "itemUltimateCircuit", - "itemEnergizedStar", - "itemAntimatterMolecule", - "itemAntimatterGlob", - "itemCoal", - "itemBoat", - "itemHerbalMedicineCake", - "itemCakeSponge", - "itemFishandPumpkinCakeSponge", - "itemSoulCleaver", - "itemInstantCake", - "itemWhippingCream", - "itemGlisteningWhippingCream", - "itemCleaver", - "itemHerbalMedicineWhippingCream", - "itemStrangeWhippingCream", - "itemBlazeCleaver", - "itemBakedCakeSponge", - "itemMagmaCake", - "itemGlisteningCake", - "itemOgreCleaver", - "itemFishandPumpkinCake", - "itemMagmaWhippingCream", - "itemMultimeter", - "itemSuperconductor")); + Arrays.asList( + "itemGhastTear", + "itemFlint", + "itemClay", + "itemBucketSaltWater", + "itemBucketFreshWater", + "itemBucketWater", + "itemRock", + "itemReed", + "itemArrow", + "itemSaw", + "itemKnife", + "itemHammer", + "itemChisel", + "itemRubber", + "itemEssence", + "itemIlluminatedPanel", + "itemSkull", + "itemRawRubber", + "itemBacon", + "itemJetpackAccelerator", + "itemLazurite", + "itemIridium", + "itemTear", + "itemClaw", + "itemFertilizer", + "itemTar", + "itemSlimeball", + "itemCoke", + "itemBeeswax", + "itemBeeQueen", + "itemForcicium", + "itemForcillium", + "itemRoyalJelly", + "itemHoneydew", + "itemHoney", + "itemPollen", + "itemReedTypha", + "itemSulfuricAcid", + "itemPotash", + "itemCompressedCarbon", + "itemBitumen", + "itemBioFuel", + "itemCokeSugar", + "itemCokeCactus", + "itemCharcoalSugar", + "itemCharcoalCactus", + "itemSludge", + "itemEnrichedAlloy", + "itemQuicksilver", + "itemMercury", + "itemOsmium", + "itemUltimateCircuit", + "itemEnergizedStar", + "itemAntimatterMolecule", + "itemAntimatterGlob", + "itemCoal", + "itemBoat", + "itemHerbalMedicineCake", + "itemCakeSponge", + "itemFishandPumpkinCakeSponge", + "itemSoulCleaver", + "itemInstantCake", + "itemWhippingCream", + "itemGlisteningWhippingCream", + "itemCleaver", + "itemHerbalMedicineWhippingCream", + "itemStrangeWhippingCream", + "itemBlazeCleaver", + "itemBakedCakeSponge", + "itemMagmaCake", + "itemGlisteningCake", + "itemOgreCleaver", + "itemFishandPumpkinCake", + "itemMagmaWhippingCream", + "itemMultimeter", + "itemSuperconductor")); private final Collection mIgnoredNames = new HashSet<>( - Arrays.asList( - "grubBee", - "chainLink", - "candyCane", - "bRedString", - "bVial", - "bFlask", - "anorthositeSmooth", - "migmatiteSmooth", - "slateSmooth", - "travertineSmooth", - "limestoneSmooth", - "orthogneissSmooth", - "marbleSmooth", - "honeyDrop", - "lumpClay", - "honeyEqualssugar", - "flourEqualswheat", - "bluestoneInsulated", - "blockWaterstone", - "blockSand", - "blockTorch", - "blockPumpkin", - "blockClothRock", - "blockStainedHardenedClay", - "blockQuartzPillar", - "blockQuartzChiselled", - "blockSpawner", - "blockCloth", - "mobHead", - "mobEgg", - "enderFlower", - "enderChest", - "clayHardened", - "dayGemMaterial", - "nightGemMaterial", - "snowLayer", - "bPlaceholder", - "hardenedClay", - "eternalLifeEssence", - "sandstone", - "wheatRice", - "transdimBlock", - "bambooBasket", - "lexicaBotania", - "livingwoodTwig", - "redstoneCrystal", - "pestleAndMortar", - "glowstone", - "whiteStone", - "stoneSlab", - "transdimBlock", - "clayBowl", - "clayPlate", - "ceramicBowl", - "ceramicPlate", - "ovenRack", - "clayCup", - "ceramicCup", - "batteryBox", - "transmutationStone", - "torchRedstoneActive", - "coal", - "charcoal", - "cloth", - "cobblestoneSlab", - "stoneBrickSlab", - "cobblestoneWall", - "stoneBrickWall", - "cobblestoneStair", - "stoneBrickStair", - "blockCloud", - "blockDirt", - "blockTyrian", - "blockCarpet", - "blockFft", - "blockLavastone", - "blockHolystone", - "blockConcrete", - "sunnariumPart", - "brSmallMachineCyaniteProcessor", - "meteoriteCoal", - "blockCobble", - "pressOreProcessor", - "crusherOreProcessor", - "grinderOreProcessor", - "blockRubber", - "blockHoney", - "blockHoneydew", - "blockPeat", - "blockRadioactive", - "blockSlime", - "blockCocoa", - "blockSugarCane", - "blockLeather", - "blockClayBrick", - "solarPanelHV", - "cableRedNet", - "stoneBowl", - "crafterWood", - "taintedSoil", - "brickXyEngineering", - "breederUranium", - "wireMill", - "chunkLazurite", - "aluminumNatural", - "aluminiumNatural", - "naturalAluminum", - "naturalAluminium", - "antimatterMilligram", - "antimatterGram", - "strangeMatter", - "coalGenerator", - "electricFurnace", - "unfinishedTank", - "valvePart", - "aquaRegia", - "leatherSeal", - "leatherSlimeSeal", - "hambone", - "slimeball", - "clay", - "enrichedUranium", - "camoPaste", - "antiBlock", - "burntQuartz", - "salmonRaw", - "blockHopper", - "blockEnderObsidian", - "blockIcestone", - "blockMagicWood", - "blockEnderCore", - "blockHeeEndium", - "oreHeeEndPowder", - "oreHeeStardust", - "oreHeeIgneousRock", - "oreHeeInstabilityOrb", - "crystalPureFluix", - "shardNether", - "gemFluorite", - "stickObsidian", - "caveCrystal", - "shardCrystal", - "dyeCrystal", - "shardFire", - "shardWater", - "shardAir", - "shardEarth", - "ingotRefinedIron", - "blockMarble", - "ingotUnstable")); + Arrays.asList( + "grubBee", + "chainLink", + "candyCane", + "bRedString", + "bVial", + "bFlask", + "anorthositeSmooth", + "migmatiteSmooth", + "slateSmooth", + "travertineSmooth", + "limestoneSmooth", + "orthogneissSmooth", + "marbleSmooth", + "honeyDrop", + "lumpClay", + "honeyEqualssugar", + "flourEqualswheat", + "bluestoneInsulated", + "blockWaterstone", + "blockSand", + "blockTorch", + "blockPumpkin", + "blockClothRock", + "blockStainedHardenedClay", + "blockQuartzPillar", + "blockQuartzChiselled", + "blockSpawner", + "blockCloth", + "mobHead", + "mobEgg", + "enderFlower", + "enderChest", + "clayHardened", + "dayGemMaterial", + "nightGemMaterial", + "snowLayer", + "bPlaceholder", + "hardenedClay", + "eternalLifeEssence", + "sandstone", + "wheatRice", + "transdimBlock", + "bambooBasket", + "lexicaBotania", + "livingwoodTwig", + "redstoneCrystal", + "pestleAndMortar", + "glowstone", + "whiteStone", + "stoneSlab", + "transdimBlock", + "clayBowl", + "clayPlate", + "ceramicBowl", + "ceramicPlate", + "ovenRack", + "clayCup", + "ceramicCup", + "batteryBox", + "transmutationStone", + "torchRedstoneActive", + "coal", + "charcoal", + "cloth", + "cobblestoneSlab", + "stoneBrickSlab", + "cobblestoneWall", + "stoneBrickWall", + "cobblestoneStair", + "stoneBrickStair", + "blockCloud", + "blockDirt", + "blockTyrian", + "blockCarpet", + "blockFft", + "blockLavastone", + "blockHolystone", + "blockConcrete", + "sunnariumPart", + "brSmallMachineCyaniteProcessor", + "meteoriteCoal", + "blockCobble", + "pressOreProcessor", + "crusherOreProcessor", + "grinderOreProcessor", + "blockRubber", + "blockHoney", + "blockHoneydew", + "blockPeat", + "blockRadioactive", + "blockSlime", + "blockCocoa", + "blockSugarCane", + "blockLeather", + "blockClayBrick", + "solarPanelHV", + "cableRedNet", + "stoneBowl", + "crafterWood", + "taintedSoil", + "brickXyEngineering", + "breederUranium", + "wireMill", + "chunkLazurite", + "aluminumNatural", + "aluminiumNatural", + "naturalAluminum", + "naturalAluminium", + "antimatterMilligram", + "antimatterGram", + "strangeMatter", + "coalGenerator", + "electricFurnace", + "unfinishedTank", + "valvePart", + "aquaRegia", + "leatherSeal", + "leatherSlimeSeal", + "hambone", + "slimeball", + "clay", + "enrichedUranium", + "camoPaste", + "antiBlock", + "burntQuartz", + "salmonRaw", + "blockHopper", + "blockEnderObsidian", + "blockIcestone", + "blockMagicWood", + "blockEnderCore", + "blockHeeEndium", + "oreHeeEndPowder", + "oreHeeStardust", + "oreHeeIgneousRock", + "oreHeeInstabilityOrb", + "crystalPureFluix", + "shardNether", + "gemFluorite", + "stickObsidian", + "caveCrystal", + "shardCrystal", + "dyeCrystal", + "shardFire", + "shardWater", + "shardAir", + "shardEarth", + "ingotRefinedIron", + "blockMarble", + "ingotUnstable")); private final Collection mInvalidNames = new HashSet<>( - Arrays.asList( - "diamondShard", - "redstoneRoot", - "obsidianStick", - "bloodstoneOre", - "universalCable", - "bronzeTube", - "ironTube", - "netherTube", - "obbyTube", - "infiniteBattery", - "eliteBattery", - "advancedBattery", - "10kEUStore", - "blueDye", - "MonazitOre", - "quartzCrystal", - "whiteLuminiteCrystal", - "darkStoneIngot", - "invisiumIngot", - "demoniteOrb", - "enderGem", - "starconiumGem", - "osmoniumIngot", - "tapaziteGem", - "zectiumIngot", - "foolsRubyGem", - "rubyGem", - "meteoriteGem", - "adamiteShard", - "sapphireGem", - "copperIngot", - "ironStick", - "goldStick", - "diamondStick", - "reinforcedStick", - "draconicStick", - "emeraldStick", - "copperStick", - "tinStick", - "silverStick", - "bronzeStick", - "steelStick", - "leadStick", - "manyullynStick", - "arditeStick", - "cobaltStick", - "aluminiumStick", - "alumiteStick", - "oilsandsOre", - "copperWire", - "superconductorWire", - "sulfuricAcid", - "conveyorBelt", - "ironWire", - "aluminumWire", - "aluminiumWire", - "silverWire", - "tinWire", - "dustSiliconSmall", - "AluminumOre", - "plateHeavyT2", - "blockWool", - "alloyPlateEnergizedHardened", - "gasWood", - "alloyPlateEnergized", - "SilverOre", - "LeadOre", - "TinOre", - "CopperOre", - "silverOre", - "leadOre", - "tinOre", - "copperOre", - "bauxiteOre", - "HSLivingmetalIngot", - "oilMoving", - "oilStill", - "oilBucket", - "petroleumOre", - "dieselFuel", - "diamondNugget", - "planks", - "wood", - "stick", - "sticks", - "naquadah", - "obsidianRod", - "stoneRod", - "thaumiumRod", - "steelRod", - "netherrackRod", - "woodRod", - "ironRod", - "cactusRod", - "flintRod", - "copperRod", - "cobaltRod", - "alumiteRod", - "blueslimeRod", - "arditeRod", - "manyullynRod", - "bronzeRod", - "boneRod", - "slimeRod", - "redalloyBundled", - "bluestoneBundled", - "infusedteslatiteInsulated", - "redalloyInsulated", - "infusedteslatiteBundled")); + Arrays.asList( + "diamondShard", + "redstoneRoot", + "obsidianStick", + "bloodstoneOre", + "universalCable", + "bronzeTube", + "ironTube", + "netherTube", + "obbyTube", + "infiniteBattery", + "eliteBattery", + "advancedBattery", + "10kEUStore", + "blueDye", + "MonazitOre", + "quartzCrystal", + "whiteLuminiteCrystal", + "darkStoneIngot", + "invisiumIngot", + "demoniteOrb", + "enderGem", + "starconiumGem", + "osmoniumIngot", + "tapaziteGem", + "zectiumIngot", + "foolsRubyGem", + "rubyGem", + "meteoriteGem", + "adamiteShard", + "sapphireGem", + "copperIngot", + "ironStick", + "goldStick", + "diamondStick", + "reinforcedStick", + "draconicStick", + "emeraldStick", + "copperStick", + "tinStick", + "silverStick", + "bronzeStick", + "steelStick", + "leadStick", + "manyullynStick", + "arditeStick", + "cobaltStick", + "aluminiumStick", + "alumiteStick", + "oilsandsOre", + "copperWire", + "superconductorWire", + "sulfuricAcid", + "conveyorBelt", + "ironWire", + "aluminumWire", + "aluminiumWire", + "silverWire", + "tinWire", + "dustSiliconSmall", + "AluminumOre", + "plateHeavyT2", + "blockWool", + "alloyPlateEnergizedHardened", + "gasWood", + "alloyPlateEnergized", + "SilverOre", + "LeadOre", + "TinOre", + "CopperOre", + "silverOre", + "leadOre", + "tinOre", + "copperOre", + "bauxiteOre", + "HSLivingmetalIngot", + "oilMoving", + "oilStill", + "oilBucket", + "petroleumOre", + "dieselFuel", + "diamondNugget", + "planks", + "wood", + "stick", + "sticks", + "naquadah", + "obsidianRod", + "stoneRod", + "thaumiumRod", + "steelRod", + "netherrackRod", + "woodRod", + "ironRod", + "cactusRod", + "flintRod", + "copperRod", + "cobaltRod", + "alumiteRod", + "blueslimeRod", + "arditeRod", + "manyullynRod", + "bronzeRod", + "boneRod", + "slimeRod", + "redalloyBundled", + "bluestoneBundled", + "infusedteslatiteInsulated", + "redalloyInsulated", + "infusedteslatiteBundled")); private final DateFormat mDateFormat = DateFormat.getInstance(); public final BlockingQueue mBufferedPlayerActivity = new LinkedBlockingQueue<>(); public final GT_BlockMap mCTMBlockCache = new GT_BlockMap<>(); @@ -749,25 +749,19 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG 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()) { + .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))) { + .iterator(); i$.hasNext(); registerOre(new OreDictionary.OreRegisterEvent(tOreName, tOreStack))) { tOreStack = i$.next(); } } @@ -784,7 +778,8 @@ 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; @@ -833,11 +828,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG ItemList.FR_Bee_Princess.set(GT_ModHandler.getModItem(Forestry.ID, "beePrincessGE", 1L)); ItemList.FR_Bee_Queen.set(GT_ModHandler.getModItem(Forestry.ID, "beeQueenGE", 1L)); ItemList.FR_Tree_Sapling.set( - GT_ModHandler.getModItem( - Forestry.ID, - "sapling", - 1L, - GT_ModHandler.getModItem(Forestry.ID, "saplingGE", 1L))); + GT_ModHandler + .getModItem(Forestry.ID, "sapling", 1L, GT_ModHandler.getModItem(Forestry.ID, "saplingGE", 1L))); ItemList.FR_Butterfly.set(GT_ModHandler.getModItem(Forestry.ID, "butterflyGE", 1L)); ItemList.FR_Larvae.set(GT_ModHandler.getModItem(Forestry.ID, "beeLarvaeGE", 1L)); ItemList.FR_Serum.set(GT_ModHandler.getModItem(Forestry.ID, "serumGE", 1L)); @@ -852,17 +844,17 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG ItemList.Cell_Universal_Fluid.set(GT_ModHandler.getIC2Item("FluidCell", 1L)); ItemList.Cell_Empty.set( - GT_ModHandler.getIC2Item( - "cell", - 1L, - GT_ModHandler.getIC2Item("cellEmpty", 1L, GT_ModHandler.getIC2Item("emptyCell", 1L)))); + GT_ModHandler.getIC2Item( + "cell", + 1L, + GT_ModHandler.getIC2Item("cellEmpty", 1L, GT_ModHandler.getIC2Item("emptyCell", 1L)))); ItemList.Cell_Water.set(GT_ModHandler.getIC2Item("waterCell", 1L, GT_ModHandler.getIC2Item("cellWater", 1L))); ItemList.Cell_Lava.set(GT_ModHandler.getIC2Item("lavaCell", 1L, GT_ModHandler.getIC2Item("cellLava", 1L))); ItemList.Cell_Air.set( - GT_ModHandler.getIC2Item( - "airCell", - 1L, - GT_ModHandler.getIC2Item("cellAir", 1L, GT_ModHandler.getIC2Item("cellOxygen", 1L)))); + GT_ModHandler.getIC2Item( + "airCell", + 1L, + GT_ModHandler.getIC2Item("cellAir", 1L, GT_ModHandler.getIC2Item("cellOxygen", 1L)))); ItemList.IC2_Item_Casing_Iron.set(GT_ModHandler.getIC2Item("casingiron", 1L)); ItemList.IC2_Item_Casing_Gold.set(GT_ModHandler.getIC2Item("casinggold", 1L)); @@ -879,8 +871,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)); @@ -890,8 +882,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)); @@ -973,27 +965,27 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(Railcraft.ID, "borehead.diamond", 1L, 32767)); GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(Railcraft.ID, "borehead.steel", 1L, 32767)); GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(Railcraft.ID, "borehead.iron", 1L, 32767)); - GT_ModHandler.sNonReplaceableItems.add( - GT_ModHandler.getModItem(TwilightForest.ID, "item.plateNaga", 1L, 32767)); + GT_ModHandler.sNonReplaceableItems + .add(GT_ModHandler.getModItem(TwilightForest.ID, "item.plateNaga", 1L, 32767)); GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(TwilightForest.ID, "item.legsNaga", 1L, 32767)); - GT_ModHandler.sNonReplaceableItems.add( - GT_ModHandler.getModItem(TwilightForest.ID, "item.arcticHelm", 1L, 32767)); - GT_ModHandler.sNonReplaceableItems.add( - GT_ModHandler.getModItem(TwilightForest.ID, "item.arcticPlate", 1L, 32767)); - GT_ModHandler.sNonReplaceableItems.add( - GT_ModHandler.getModItem(TwilightForest.ID, "item.arcticLegs", 1L, 32767)); - GT_ModHandler.sNonReplaceableItems.add( - GT_ModHandler.getModItem(TwilightForest.ID, "item.arcticBoots", 1L, 32767)); + GT_ModHandler.sNonReplaceableItems + .add(GT_ModHandler.getModItem(TwilightForest.ID, "item.arcticHelm", 1L, 32767)); + GT_ModHandler.sNonReplaceableItems + .add(GT_ModHandler.getModItem(TwilightForest.ID, "item.arcticPlate", 1L, 32767)); + GT_ModHandler.sNonReplaceableItems + .add(GT_ModHandler.getModItem(TwilightForest.ID, "item.arcticLegs", 1L, 32767)); + GT_ModHandler.sNonReplaceableItems + .add(GT_ModHandler.getModItem(TwilightForest.ID, "item.arcticBoots", 1L, 32767)); GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(TwilightForest.ID, "item.yetiHelm", 1L, 32767)); - GT_ModHandler.sNonReplaceableItems.add( - GT_ModHandler.getModItem(TwilightForest.ID, "item.yetiPlate", 1L, 32767)); + GT_ModHandler.sNonReplaceableItems + .add(GT_ModHandler.getModItem(TwilightForest.ID, "item.yetiPlate", 1L, 32767)); GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(TwilightForest.ID, "item.yetiLegs", 1L, 32767)); - GT_ModHandler.sNonReplaceableItems.add( - GT_ModHandler.getModItem(TwilightForest.ID, "item.yetiBoots", 1L, 32767)); - GT_ModHandler.sNonReplaceableItems.add( - GT_ModHandler.getModItem(AppliedEnergistics2.ID, "item.ToolCertusQuartzCuttingKnife", 1L, 32767)); - GT_ModHandler.sNonReplaceableItems.add( - GT_ModHandler.getModItem(AppliedEnergistics2.ID, "item.ToolNetherQuartzCuttingKnife", 1L, 32767)); + GT_ModHandler.sNonReplaceableItems + .add(GT_ModHandler.getModItem(TwilightForest.ID, "item.yetiBoots", 1L, 32767)); + GT_ModHandler.sNonReplaceableItems + .add(GT_ModHandler.getModItem(AppliedEnergistics2.ID, "item.ToolCertusQuartzCuttingKnife", 1L, 32767)); + GT_ModHandler.sNonReplaceableItems + .add(GT_ModHandler.getModItem(AppliedEnergistics2.ID, "item.ToolNetherQuartzCuttingKnife", 1L, 32767)); GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(Forestry.ID, "apiaristHelmet", 1L, 32767)); GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(Forestry.ID, "apiaristChest", 1L, 32767)); GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(Forestry.ID, "apiaristLegs", 1L, 32767)); @@ -1002,21 +994,21 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(Forestry.ID, "frameImpregnated", 1L, 32767)); GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(Forestry.ID, "frameProven", 1L, 32767)); GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(Forestry.ID, "waxCast", 1L, 32767)); - GT_ModHandler.sNonReplaceableItems.add( - GT_ModHandler.getModItem(GalacticraftCore.ID, "item.sensorGlasses", 1L, 32767)); - GT_ModHandler.sNonReplaceableItems.add( - GT_ModHandler.getModItem(IC2NuclearControl.ID, "ItemToolThermometer", 1L, 32767)); + GT_ModHandler.sNonReplaceableItems + .add(GT_ModHandler.getModItem(GalacticraftCore.ID, "item.sensorGlasses", 1L, 32767)); + GT_ModHandler.sNonReplaceableItems + .add(GT_ModHandler.getModItem(IC2NuclearControl.ID, "ItemToolThermometer", 1L, 32767)); RecipeSorter.register( - "gregtech:shaped", - GT_Shaped_Recipe.class, - RecipeSorter.Category.SHAPED, - "after:minecraft:shaped before:minecraft:shapeless"); + "gregtech:shaped", + GT_Shaped_Recipe.class, + RecipeSorter.Category.SHAPED, + "after:minecraft:shaped before:minecraft:shapeless"); RecipeSorter.register( - "gregtech:shapeless", - GT_Shapeless_Recipe.class, - RecipeSorter.Category.SHAPELESS, - "after:minecraft:shapeless"); + "gregtech:shapeless", + GT_Shapeless_Recipe.class, + RecipeSorter.Category.SHAPELESS, + "after:minecraft:shapeless"); // Register chunk manager with Forge GT_ChunkManager.init(); @@ -1026,45 +1018,40 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG GT_Log.out.println("GT_Mod: Beginning Load-Phase."); GT_Log.ore.println("GT_Mod: Beginning Load-Phase."); GT_OreDictUnificator.registerOre( - "cropChilipepper", - GT_ModHandler.getModItem(MagicalCrops.ID, "magicalcrops_CropProduce", 1L, 2)); - GT_OreDictUnificator.registerOre( - "cropTomato", - GT_ModHandler.getModItem(MagicalCrops.ID, "magicalcrops_CropProduce", 1L, 8)); - GT_OreDictUnificator.registerOre( - "cropGrape", - GT_ModHandler.getModItem(MagicalCrops.ID, "magicalcrops_CropProduce", 1L, 4)); + "cropChilipepper", + GT_ModHandler.getModItem(MagicalCrops.ID, "magicalcrops_CropProduce", 1L, 2)); + GT_OreDictUnificator + .registerOre("cropTomato", GT_ModHandler.getModItem(MagicalCrops.ID, "magicalcrops_CropProduce", 1L, 8)); + GT_OreDictUnificator + .registerOre("cropGrape", GT_ModHandler.getModItem(MagicalCrops.ID, "magicalcrops_CropProduce", 1L, 4)); GT_OreDictUnificator.registerOre("cropTea", GT_ModHandler.getModItem(GanysSurface.ID, "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.ID, - "clayBucketFired", - 1L, - 0); + OrePrefixes.bucketClay.mContainerItem = GT_ModHandler + .getModItem(IguanaTweaksTinkerConstruct.ID, "clayBucketFired", 1L, 0); GT_OreDictUnificator.set( - OrePrefixes.bucketClay, - Materials.Empty, - GT_ModHandler.getModItem(IguanaTweaksTinkerConstruct.ID, "clayBucketFired", 1L, 0)); + OrePrefixes.bucketClay, + Materials.Empty, + GT_ModHandler.getModItem(IguanaTweaksTinkerConstruct.ID, "clayBucketFired", 1L, 0)); GT_OreDictUnificator.set( - OrePrefixes.bucketClay, - Materials.Water, - GT_ModHandler.getModItem(IguanaTweaksTinkerConstruct.ID, "clayBucketWater", 1L, 0)); + OrePrefixes.bucketClay, + Materials.Water, + GT_ModHandler.getModItem(IguanaTweaksTinkerConstruct.ID, "clayBucketWater", 1L, 0)); GT_OreDictUnificator.set( - OrePrefixes.bucketClay, - Materials.Lava, - GT_ModHandler.getModItem(IguanaTweaksTinkerConstruct.ID, "clayBucketLava", 1L, 0)); + OrePrefixes.bucketClay, + Materials.Lava, + GT_ModHandler.getModItem(IguanaTweaksTinkerConstruct.ID, "clayBucketLava", 1L, 0)); GT_OreDictUnificator.set( - OrePrefixes.bucketClay, - Materials.Milk, - GT_ModHandler.getModItem(IguanaTweaksTinkerConstruct.ID, "clayBucketMilk", 1L, 0)); + OrePrefixes.bucketClay, + Materials.Milk, + GT_ModHandler.getModItem(IguanaTweaksTinkerConstruct.ID, "clayBucketMilk", 1L, 0)); FluidContainerRegistry.registerFluidContainer( - new FluidContainerRegistry.FluidContainerData( - Materials.Milk.getFluid(1000L), - GT_OreDictUnificator.get(OrePrefixes.bucketClay, Materials.Milk, 1L), - GT_OreDictUnificator.get(OrePrefixes.bucketClay, Materials.Empty, 1L))); + new FluidContainerRegistry.FluidContainerData( + Materials.Milk.getFluid(1000L), + GT_OreDictUnificator.get(OrePrefixes.bucketClay, Materials.Milk, 1L), + GT_OreDictUnificator.get(OrePrefixes.bucketClay, Materials.Empty, 1L))); } MinecraftForge.EVENT_BUS.register(new GlobalEnergyWorldSavedData("")); @@ -1173,7 +1160,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG addFullHazmatToGeneralItem(EnderIO.ID, "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; @@ -1183,8 +1171,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } public static long tBits = GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED - | GT_ModHandler.RecipeBits.ONLY_ADD_IF_RESULT_IS_NOT_NULL - | GT_ModHandler.RecipeBits.NOT_REMOVABLE; + | GT_ModHandler.RecipeBits.ONLY_ADD_IF_RESULT_IS_NOT_NULL + | GT_ModHandler.RecipeBits.NOT_REMOVABLE; public void onPostLoad() { GT_Log.out.println("GT_Mod: Beginning PostLoad-Phase."); @@ -1202,10 +1190,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; @@ -1227,61 +1215,61 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG for (Materials aMaterial : Materials.values()) { if ((aMaterial.mUnificatable) && (aMaterial.mMaterialInto == aMaterial)) { GT_ModHandler.addCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), - tBits, - new Object[] { "h", "X", 'X', OrePrefixes.crushedCentrifuged.get(aMaterial) }); + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), + tBits, + new Object[] { "h", "X", 'X', OrePrefixes.crushedCentrifuged.get(aMaterial) }); GT_ModHandler.addCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), - tBits, - new Object[] { "h", "X", 'X', OrePrefixes.crystalline.get(aMaterial) }); + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), + tBits, + new Object[] { "h", "X", 'X', OrePrefixes.crystalline.get(aMaterial) }); GT_ModHandler.addCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), - tBits, - new Object[] { "h", "X", 'X', OrePrefixes.crystal.get(aMaterial) }); + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), + tBits, + new Object[] { "h", "X", 'X', OrePrefixes.crystal.get(aMaterial) }); GT_ModHandler.addCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, 1L), - tBits, - new Object[] { "h", "X", 'X', OrePrefixes.crushedPurified.get(aMaterial) }); + GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, 1L), + tBits, + new Object[] { "h", "X", 'X', OrePrefixes.crushedPurified.get(aMaterial) }); GT_ModHandler.addCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, 1L), - tBits, - new Object[] { "h", "X", 'X', OrePrefixes.cleanGravel.get(aMaterial) }); + GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, 1L), + tBits, + new Object[] { "h", "X", 'X', OrePrefixes.cleanGravel.get(aMaterial) }); GT_ModHandler.addCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, 1L), - tBits, - new Object[] { "h", "X", 'X', OrePrefixes.reduced.get(aMaterial) }); + GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, 1L), + tBits, + new Object[] { "h", "X", 'X', OrePrefixes.reduced.get(aMaterial) }); GT_ModHandler.addCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L), - tBits, - new Object[] { "h", "X", 'X', OrePrefixes.clump.get(aMaterial) }); + GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L), + tBits, + new Object[] { "h", "X", 'X', OrePrefixes.clump.get(aMaterial) }); GT_ModHandler.addCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L), - tBits, - new Object[] { "h", "X", 'X', OrePrefixes.shard.get(aMaterial) }); + GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L), + tBits, + new Object[] { "h", "X", 'X', OrePrefixes.shard.get(aMaterial) }); GT_ModHandler.addCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L), - tBits, - new Object[] { "h", "X", 'X', OrePrefixes.crushed.get(aMaterial) }); + GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L), + tBits, + new Object[] { "h", "X", 'X', OrePrefixes.crushed.get(aMaterial) }); GT_ModHandler.addCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L), - tBits, - new Object[] { "h", "X", 'X', OrePrefixes.dirtyGravel.get(aMaterial) }); + GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L), + tBits, + new Object[] { "h", "X", 'X', OrePrefixes.dirtyGravel.get(aMaterial) }); GT_ModHandler.addCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 4L), - tBits, - new Object[] { " X ", 'X', OrePrefixes.dust.get(aMaterial) }); + GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 4L), + tBits, + new Object[] { " X ", 'X', OrePrefixes.dust.get(aMaterial) }); GT_ModHandler.addCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 9L), - tBits, - new Object[] { "X ", 'X', OrePrefixes.dust.get(aMaterial) }); + GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 9L), + tBits, + new Object[] { "X ", 'X', OrePrefixes.dust.get(aMaterial) }); GT_ModHandler.addCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), - tBits, - new Object[] { "XX", "XX", 'X', OrePrefixes.dustSmall.get(aMaterial) }); + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), + tBits, + new Object[] { "XX", "XX", 'X', OrePrefixes.dustSmall.get(aMaterial) }); GT_ModHandler.addCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), - tBits, - new Object[] { "XXX", "XXX", "XXX", 'X', OrePrefixes.dustTiny.get(aMaterial) }); + GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), + tBits, + new Object[] { "XXX", "XXX", "XXX", 'X', OrePrefixes.dustTiny.get(aMaterial) }); } } } @@ -1297,7 +1285,8 @@ 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; @@ -1321,9 +1310,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG GT_FluidStack.fixAllThoseFuckingFluidIDs(); 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."); + "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(); + .getRecipeList(); for (int i = 0; i < tList.size(); i++) { if ((tList.get(i) instanceof ShapedOreRecipe)) { for (Object tObject : ((ShapedOreRecipe) tList.get(i)).getInput()) { @@ -1374,11 +1363,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG @SubscribeEvent public void onArrowNockEvent(ArrowNockEvent aEvent) { if ((!aEvent.isCanceled()) && (GT_Utility.isStackValid(aEvent.result)) - && (GT_Utility.getProjectile(SubTag.PROJECTILE_ARROW, aEvent.entityPlayer.inventory) != null)) { + && (GT_Utility.getProjectile(SubTag.PROJECTILE_ARROW, aEvent.entityPlayer.inventory) != null)) { aEvent.entityPlayer.setItemInUse( - aEvent.result, - aEvent.result.getItem() - .getMaxItemUseDuration(aEvent.result)); + aEvent.result, + aEvent.result.getItem() + .getMaxItemUseDuration(aEvent.result)); aEvent.setCanceled(true); } } @@ -1387,8 +1376,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG public void onArrowLooseEvent(ArrowLooseEvent aEvent) { ItemStack aArrow = GT_Utility.getProjectile(SubTag.PROJECTILE_ARROW, aEvent.entityPlayer.inventory); if ((!aEvent.isCanceled()) && (GT_Utility.isStackValid(aEvent.bow)) - && (aArrow != null) - && ((aEvent.bow.getItem() instanceof ItemBow))) { + && (aArrow != null) + && ((aEvent.bow.getItem() instanceof ItemBow))) { float tSpeed = aEvent.charge / 20.0F; tSpeed = (tSpeed * tSpeed + tSpeed * 2.0F) / 3.0F; if (tSpeed < 0.1D) { @@ -1398,11 +1387,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG tSpeed = 1.0F; } EntityArrow tArrowEntity = ((IProjectileItem) aArrow.getItem()).getProjectile( - SubTag.PROJECTILE_ARROW, - aArrow, - aEvent.entityPlayer.worldObj, - aEvent.entityPlayer, - tSpeed * 2.0F); + SubTag.PROJECTILE_ARROW, + aArrow, + aEvent.entityPlayer.worldObj, + aEvent.entityPlayer, + tSpeed * 2.0F); if (tSpeed >= 1.0F) { tArrowEntity.setIsCritical(true); } @@ -1422,11 +1411,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) { @@ -1445,7 +1434,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG @SubscribeEvent public void onEndermanTeleportEvent(EnderTeleportEvent aEvent) { if (((aEvent.entityLiving instanceof EntityEnderman)) - && (aEvent.entityLiving.getActivePotionEffect(Potion.weakness) != null)) { + && (aEvent.entityLiving.getActivePotionEffect(Potion.weakness) != null)) { aEvent.setCanceled(true); } } @@ -1455,17 +1444,16 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG if ((aEvent.entity != null) && (!aEvent.entity.worldObj.isRemote)) { if ((aEvent.entity instanceof EntityItem)) { ((EntityItem) aEvent.entity).setEntityItemStack( - GT_OreDictUnificator.get(true, ((EntityItem) aEvent.entity).getEntityItem(), true)); + GT_OreDictUnificator.get(true, ((EntityItem) aEvent.entity).getEntityItem(), true)); } if ((this.mSkeletonsShootGTArrows > 0) && (aEvent.entity.getClass() == EntityArrow.class) - && (aEvent.entity.worldObj.rand.nextInt(this.mSkeletonsShootGTArrows) == 0) - && ((((EntityArrow) aEvent.entity).shootingEntity instanceof EntitySkeleton))) { + && (aEvent.entity.worldObj.rand.nextInt(this.mSkeletonsShootGTArrows) == 0) + && ((((EntityArrow) aEvent.entity).shootingEntity instanceof EntitySkeleton))) { aEvent.entity.worldObj.spawnEntityInWorld( - new GT_Entity_Arrow( - (EntityArrow) aEvent.entity, - OrePrefixes.arrowGtWood.mPrefixedItems.get( - aEvent.entity.worldObj.rand.nextInt( - OrePrefixes.arrowGtWood.mPrefixedItems.size())))); + new GT_Entity_Arrow( + (EntityArrow) aEvent.entity, + OrePrefixes.arrowGtWood.mPrefixedItems + .get(aEvent.entity.worldObj.rand.nextInt(OrePrefixes.arrowGtWood.mPrefixedItems.size())))); aEvent.entity.setDead(); } } @@ -1474,7 +1462,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG @SubscribeEvent public void onOreGenEvent(OreGenEvent.GenerateMinable aGenerator) { if ((this.mDisableVanillaOres) && ((aGenerator.generator instanceof WorldGenMinable)) - && (PREVENTED_ORES.contains(aGenerator.type))) { + && (PREVENTED_ORES.contains(aGenerator.type))) { aGenerator.setResult(Result.DENY); } } @@ -1486,37 +1474,37 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG @SubscribeEvent public void onPlayerInteraction(PlayerInteractEvent aEvent) { if ((aEvent.entityPlayer == null) || (aEvent.entityPlayer.worldObj == null) - || (aEvent.action == null) - || (aEvent.world.provider == null)) { + || (aEvent.action == null) + || (aEvent.world.provider == null)) { return; } if ((!aEvent.entityPlayer.worldObj.isRemote) && (aEvent.action != PlayerInteractEvent.Action.RIGHT_CLICK_AIR) - && (GT_Log.pal != null)) { + && (GT_Log.pal != null)) { this.mBufferedPlayerActivity.offer( - getDataAndTime() + ";" - + aEvent.action.name() - + ";" - + aEvent.entityPlayer.getDisplayName() - + ";DIM:" - + aEvent.world.provider.dimensionId - + ";" - + aEvent.x - + ";" - + aEvent.y - + ";" - + aEvent.z - + ";|;" - + aEvent.x / 10 - + ";" - + aEvent.y / 10 - + ";" - + aEvent.z / 10); + getDataAndTime() + ";" + + aEvent.action.name() + + ";" + + aEvent.entityPlayer.getDisplayName() + + ";DIM:" + + aEvent.world.provider.dimensionId + + ";" + + aEvent.x + + ";" + + aEvent.y + + ";" + + aEvent.z + + ";|;" + + aEvent.x / 10 + + ";" + + aEvent.y / 10 + + ";" + + aEvent.z / 10); } ItemStack aStack = aEvent.entityPlayer.getCurrentEquippedItem(); if ((aStack != null) && (aEvent.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) - && (aStack.getItem() == Items.flint_and_steel)) { + && (aStack.getItem() == Items.flint_and_steel)) { if ((!aEvent.world.isRemote) && (!aEvent.entityPlayer.capabilities.isCreativeMode) - && (aEvent.world.rand.nextInt(100) >= this.mFlintChance)) { + && (aEvent.world.rand.nextInt(100) >= this.mFlintChance)) { aEvent.setCanceled(true); aStack.damageItem(1, aEvent.entityPlayer); if (aStack.getItemDamage() >= aStack.getMaxDamage()) { @@ -1535,38 +1523,38 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG if (aEvent.harvester != null) { if ((!aEvent.world.isRemote) && (GT_Log.pal != null)) { this.mBufferedPlayerActivity.offer( - getDataAndTime() + ";HARVEST_BLOCK;" - + aEvent.harvester.getDisplayName() - + ";DIM:" - + aEvent.world.provider.dimensionId - + ";" - + aEvent.x - + ";" - + aEvent.y - + ";" - + aEvent.z - + ";|;" - + aEvent.x / 10 - + ";" - + aEvent.y / 10 - + ";" - + aEvent.z / 10); + getDataAndTime() + ";HARVEST_BLOCK;" + + aEvent.harvester.getDisplayName() + + ";DIM:" + + aEvent.world.provider.dimensionId + + ";" + + aEvent.x + + ";" + + aEvent.y + + ";" + + aEvent.z + + ";|;" + + aEvent.x / 10 + + ";" + + aEvent.y / 10 + + ";" + + aEvent.z / 10); } ItemStack aStack = aEvent.harvester.getCurrentEquippedItem(); if (aStack != null) { if ((aStack.getItem() instanceof GT_MetaGenerated_Tool)) { ((GT_MetaGenerated_Tool) aStack.getItem()).onHarvestBlockEvent( - aEvent.drops, - aStack, - aEvent.harvester, - aEvent.block, - aEvent.x, - aEvent.y, - aEvent.z, - (byte) aEvent.blockMetadata, - aEvent.fortuneLevel, - aEvent.isSilkTouching, - aEvent); + aEvent.drops, + aStack, + aEvent.harvester, + aEvent.block, + aEvent.x, + aEvent.y, + aEvent.z, + (byte) aEvent.blockMetadata, + aEvent.fortuneLevel, + aEvent.isSilkTouching, + aEvent); } if (EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, aStack) > 2) { try { @@ -1589,7 +1577,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG @SubscribeEvent public void registerOre(OreDictionary.OreRegisterEvent aEvent) { ModContainer tContainer = Loader.instance() - .activeModContainer(); + .activeModContainer(); String aMod = tContainer == null ? "UNKNOWN" : tContainer.getModId(); String aOriginalMod = aMod; if (GT_OreDictUnificator.isRegisteringOres()) { @@ -1598,34 +1586,33 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG aMod = "UNKNOWN"; } if ((aEvent == null) || (aEvent.Ore == null) - || (aEvent.Ore.getItem() == null) - || (aEvent.Name == null) - || (aEvent.Name.isEmpty()) - || (aEvent.Name.replaceAll("_", "") - .length() - - aEvent.Name.length() == 9)) { + || (aEvent.Ore.getItem() == null) + || (aEvent.Name == null) + || (aEvent.Name.isEmpty()) + || (aEvent.Name.replaceAll("_", "") + .length() - aEvent.Name.length() == 9)) { if (aOriginalMod.equals(GregTech.ID)) { aOriginalMod = "UNKNOWN"; } GT_Log.ore.println( - aOriginalMod - + " did something very bad! The registration is too invalid to even be shown properly. This happens only if you register null, invalid Items, empty Strings or even nonexisting Events to the OreDict."); + aOriginalMod + + " did something very bad! The registration is too invalid to even be shown properly. This happens only if you register null, invalid Items, empty Strings or even nonexisting Events to the OreDict."); throw new IllegalArgumentException( - aOriginalMod - + " did something very bad! The registration is too invalid to even be shown properly. This happens only if you register null, invalid Items, empty Strings or even nonexisting Events to the OreDict."); + aOriginalMod + + " did something very bad! The registration is too invalid to even be shown properly. This happens only if you register null, invalid Items, empty Strings or even nonexisting Events to the OreDict."); } try { aEvent.Ore.stackSize = 1; if (this.mIgnoreTcon || aEvent.Ore.getUnlocalizedName() - .startsWith("item.oreberry")) { + .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")))) { + .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"); } @@ -1634,11 +1621,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } String tModToName = aMod + " -> " + aEvent.Name; if ((this.mOreDictActivated) || (GregTech_API.sPostloadStarted) - || ((this.mSortToTheEnd) && (GregTech_API.sLoadFinished))) { + || ((this.mSortToTheEnd) && (GregTech_API.sLoadFinished))) { tModToName = aOriginalMod + " --Late--> " + aEvent.Name; } if (((aEvent.Ore.getItem() instanceof ItemBlock)) - || (GT_Utility.getBlockFromStack(aEvent.Ore) != Blocks.air)) { + || (GT_Utility.getBlockFromStack(aEvent.Ore) != Blocks.air)) { GT_OreDictUnificator.addToBlacklist(aEvent.Ore); } this.mRegisteredOres.add(aEvent.Ore); @@ -1663,14 +1650,13 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG GT_OreDictUnificator.registerOre("stoneCobble", aEvent.Ore); return; } else if ((aEvent.Name.contains("|")) || (aEvent.Name.contains("*")) - || (aEvent.Name.contains(":")) - || (aEvent.Name.contains(".")) - || (aEvent.Name.contains("$"))) { - GT_Log.ore.println( - tModToName + " is using a private Prefix and is therefor getting ignored properly."); - return; - } else - if (aEvent.Name.equals("copperWire")) { + || (aEvent.Name.contains(":")) + || (aEvent.Name.contains(".")) + || (aEvent.Name.contains("$"))) { + GT_Log.ore + .println(tModToName + " is using a private Prefix and is therefor getting ignored properly."); + return; + } else if (aEvent.Name.equals("copperWire")) { GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper, aEvent.Ore); } else if (aEvent.Name.equals("oreHeeEndrium")) { GT_OreDictUnificator.registerOre(OrePrefixes.ore, Materials.HeeEndium, aEvent.Ore); @@ -1720,11 +1706,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG return; } else if (aEvent.Name.contains(" ")) { 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)); + tModToName + " is getting re-registered because the OreDict Name containing invalid spaces."); + 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)) { @@ -1735,23 +1719,21 @@ 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.ID)) - && (aEvent.Ore.getItem() - .getUnlocalizedName() - .contains("ItemResource"))) { + && (aEvent.Ore.getItem() + .getUnlocalizedName() + .contains("ItemResource"))) { return; } if (aPrefix == null) { if (aEvent.Name.toLowerCase() - .equals(aEvent.Name)) { + .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))) { + .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 { @@ -1762,7 +1744,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG String tNewName = aEvent.Name.replaceFirst(aPrefix.toString(), aPrefix.mPrefixInto.toString()); if (!GT_OreDictUnificator.isRegisteringOres()) { GT_Log.ore.println( - tModToName + " uses a depricated Prefix, and is getting re-registered as " + tNewName); + tModToName + " uses a depricated Prefix, and is getting re-registered as " + tNewName); } GT_OreDictUnificator.registerOre(tNewName, aEvent.Ore); return; @@ -1771,16 +1753,16 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG if (tName.length() > 0) { char firstChar = tName.charAt(0); if (Character.isUpperCase(firstChar) || Character.isLowerCase(firstChar) - || firstChar == '_' - || Character.isDigit(firstChar)) { + || firstChar == '_' + || Character.isDigit(firstChar)) { if (aPrefix.mIsMaterialBased) { aMaterial = Materials.get(tName); if (aMaterial != aMaterial.mMaterialInto) { GT_OreDictUnificator.registerOre(aPrefix, aMaterial.mMaterialInto, aEvent.Ore); if (!GT_OreDictUnificator.isRegisteringOres()) { GT_Log.ore.println( - tModToName + " uses a deprecated Material and is getting re-registered as " - + aPrefix.get(aMaterial.mMaterialInto)); + tModToName + " uses a deprecated Material and is getting re-registered as " + + aPrefix.get(aMaterial.mMaterialInto)); } return; } @@ -1789,32 +1771,31 @@ 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 = i$.next(); } aMaterial.add(GT_Utility.copyAmount(1L, aEvent.Ore)); if (GregTech_API.sThaumcraftCompat != null && aPrefix.doGenerateItem(aMaterial) - && !aPrefix.isIgnored(aMaterial)) { + && !aPrefix.isIgnored(aMaterial)) { List tAspects = new ArrayList<>(); for (TC_AspectStack tAspect : aPrefix.mAspects) tAspect.addToAspectList(tAspects); if (aPrefix.mMaterialAmount >= 3628800 || aPrefix.mMaterialAmount < 0) for (TC_AspectStack tAspect : aMaterial.mAspects) tAspect.addToAspectList(tAspects); GregTech_API.sThaumcraftCompat.registerThaumcraftAspectsToItem( - GT_Utility.copyAmount(1, aEvent.Ore), - tAspects, - aEvent.Name); + GT_Utility.copyAmount(1, aEvent.Ore), + tAspects, + aEvent.Name); } switch (aPrefix) { case crystal -> { if ((aMaterial == Materials.CertusQuartz) - || (aMaterial == Materials.NetherQuartz) - || (aMaterial == Materials.Fluix)) { + || (aMaterial == Materials.NetherQuartz) + || (aMaterial == Materials.Fluix)) { GT_OreDictUnificator.registerOre(OrePrefixes.gem, aMaterial, aEvent.Ore); } } @@ -1825,47 +1806,40 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG GT_OreDictUnificator.registerOre(Dyes.dyeCyan, aEvent.Ore); } else if (aMaterial == Materials.InfusedAir || aMaterial == Materials.InfusedWater - || aMaterial == Materials.InfusedFire - || aMaterial == Materials.InfusedEarth - || aMaterial == Materials.InfusedOrder - || aMaterial == Materials.InfusedEntropy) { - GT_OreDictUnificator.registerOre( - aMaterial.mName.replaceFirst("Infused", "shard"), - aEvent.Ore); - } else - if (aMaterial == Materials.Chocolate) { + || aMaterial == Materials.InfusedFire + || aMaterial == Materials.InfusedEarth + || aMaterial == Materials.InfusedOrder + || aMaterial == Materials.InfusedEntropy) { + GT_OreDictUnificator.registerOre( + aMaterial.mName.replaceFirst("Infused", "shard"), + aEvent.Ore); + } else if (aMaterial == Materials.Chocolate) { GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore); } else if (aMaterial == Materials.CertusQuartz - || aMaterial == Materials.NetherQuartz) { - GT_OreDictUnificator.registerOre( - OrePrefixes.item.get(aMaterial), - aEvent.Ore); - GT_OreDictUnificator.registerOre( - OrePrefixes.crystal, - aMaterial, - aEvent.Ore); - GT_OreDictUnificator.registerOre( - OreDictNames.craftingQuartz, - aEvent.Ore); - } else + || aMaterial == Materials.NetherQuartz) { + GT_OreDictUnificator + .registerOre(OrePrefixes.item.get(aMaterial), aEvent.Ore); + GT_OreDictUnificator + .registerOre(OrePrefixes.crystal, aMaterial, aEvent.Ore); + GT_OreDictUnificator + .registerOre(OreDictNames.craftingQuartz, aEvent.Ore); + } else if (aMaterial == Materials.Fluix || aMaterial == Materials.Quartz - || aMaterial == Materials.Quartzite) { - GT_OreDictUnificator.registerOre( - OrePrefixes.crystal, - aMaterial, - aEvent.Ore); - GT_OreDictUnificator.registerOre( - OreDictNames.craftingQuartz, - aEvent.Ore); - } + || aMaterial == Materials.Quartzite) { + GT_OreDictUnificator.registerOre( + OrePrefixes.crystal, + aMaterial, + aEvent.Ore); + GT_OreDictUnificator + .registerOre(OreDictNames.craftingQuartz, aEvent.Ore); + } } case cableGt01 -> { 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) { @@ -1874,11 +1848,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } case lens -> { if ((aMaterial.contains(SubTag.TRANSPARENT)) - && (aMaterial.mColor != Dyes._NULL)) { + && (aMaterial.mColor != Dyes._NULL)) { GT_OreDictUnificator.registerOre( - "craftingLens" + aMaterial.mColor.toString() - .replaceFirst("dye", ""), - aEvent.Ore); + "craftingLens" + aMaterial.mColor.toString() + .replaceFirst("dye", ""), + aEvent.Ore); } } case plate -> { @@ -1896,21 +1870,18 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG GT_OreDictUnificator.addToBlacklist(aEvent.Ore); } } - case gearGt -> GT_OreDictUnificator.registerOre( - OrePrefixes.gear, - aMaterial, - aEvent.Ore); + case gearGt -> GT_OreDictUnificator + .registerOre(OrePrefixes.gear, aMaterial, aEvent.Ore); case stick -> { if (!GT_RecipeRegistrator.sRodMaterialList.contains(aMaterial)) { GT_RecipeRegistrator.sRodMaterialList.add(aMaterial); } else if (aMaterial == Materials.Wood) { GT_OreDictUnificator.addToBlacklist(aEvent.Ore); } else if ((aMaterial == Materials.Tin) || (aMaterial == Materials.Lead) - || (aMaterial == Materials.SolderingAlloy)) { - GT_OreDictUnificator.registerOre( - ToolDictNames.craftingToolSolderingMetal, - aEvent.Ore); - } + || (aMaterial == Materials.SolderingAlloy)) { + GT_OreDictUnificator + .registerOre(ToolDictNames.craftingToolSolderingMetal, aEvent.Ore); + } } case dust -> { if (aMaterial == Materials.Salt) { @@ -1948,66 +1919,41 @@ 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")) - && (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); - } + && (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); + } } default -> {} } @@ -2017,12 +1963,12 @@ 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", ""))) { + tDye.name() + .replaceFirst("dye", ""))) { GT_OreDictUnificator.addToBlacklist(aEvent.Ore); GT_Log.ore.println( - tModToName - + " Oh man, why the fuck would anyone need a OreDictified Color for this, that is even too much for GregTech... do not report this, this is just a random Comment about how ridiculous this is."); + tModToName + + " Oh man, why the fuck would anyone need a OreDictified Color for this, that is even too much for GregTech... do not report this, this is just a random Comment about how ridiculous this is."); return; } } @@ -2074,10 +2020,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG switch (tName) { case "ToolSolderingMetal" -> GregTech_API.registerSolderingMetal(aEvent.Ore); case "IndustrialDiamond" -> GT_OreDictUnificator.addToBlacklist(aEvent.Ore); - case "WireCopper" -> GT_OreDictUnificator.registerOre( - OrePrefixes.wire, - Materials.Copper, - aEvent.Ore); + case "WireCopper" -> GT_OreDictUnificator + .registerOre(OrePrefixes.wire, Materials.Copper, aEvent.Ore); } } case wood -> { @@ -2111,12 +2055,12 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG @SuppressWarnings("deprecated") public static void stepMaterialsVanilla(Collection mEvents, - ProgressManager.ProgressBar progressBar) { + ProgressManager.ProgressBar progressBar) { int size = 5; int sizeStep = mEvents.size() / 20 - 1; GT_Proxy.OreDictEventContainer tEvent; - for (Iterator i$ = mEvents.iterator(); i$.hasNext(); GT_Proxy.registerRecipes( - tEvent)) { + for (Iterator i$ = mEvents.iterator(); i$.hasNext(); GT_Proxy + .registerRecipes(tEvent)) { tEvent = i$.next(); sizeStep--; if (sizeStep == 0) { @@ -2133,8 +2077,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG public void onLivingUpdate(LivingUpdateEvent aEvent) { if (aEvent.entityLiving.onGround) { int tX = MathHelper.floor_double(aEvent.entityLiving.posX), - tY = MathHelper.floor_double(aEvent.entityLiving.boundingBox.minY - 0.001F), - tZ = MathHelper.floor_double(aEvent.entityLiving.posZ); + tY = MathHelper.floor_double(aEvent.entityLiving.boundingBox.minY - 0.001F), + tZ = MathHelper.floor_double(aEvent.entityLiving.posZ); Block tBlock = aEvent.entityLiving.worldObj.getBlock(tX, tY, tZ); if (tBlock instanceof IBlockOnWalkOver) ((IBlockOnWalkOver) tBlock).onWalkOver(aEvent.entityLiving, aEvent.entityLiving.worldObj, tX, tY, tZ); @@ -2144,7 +2088,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG @SubscribeEvent public void onFluidContainerRegistration(FluidContainerRegistry.FluidContainerRegisterEvent aFluidEvent) { if ((aFluidEvent.data.filledContainer.getItem() == Items.potionitem) - && (aFluidEvent.data.filledContainer.getItemDamage() == 0)) { + && (aFluidEvent.data.filledContainer.getItemDamage() == 0)) { aFluidEvent.data.fluid.amount = 0; } GT_OreDictUnificator.addToBlacklist(aFluidEvent.data.emptyContainer); @@ -2195,7 +2139,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } } if ((aEvent.world.getTotalWorldTime() % 100L == 0L) - && ((this.mItemDespawnTime != 6000) || (this.mMaxEqualEntitiesAtOneSpot > 0))) { + && ((this.mItemDespawnTime != 6000) || (this.mMaxEqualEntitiesAtOneSpot > 0))) { long startTime = System.nanoTime(); double oldX = 0, oldY = 0, oldZ = 0; if (debugEntityCramming && (aEvent.world.loadedEntityList.size() != 0)) { @@ -2205,55 +2149,52 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG if ((aEvent.world.loadedEntityList.get(i) instanceof Entity)) { Entity tEntity = aEvent.world.loadedEntityList.get(i); if (((tEntity instanceof EntityItem)) && (this.mItemDespawnTime != 6000) - && (((EntityItem) tEntity).lifespan == 6000)) { + && (((EntityItem) tEntity).lifespan == 6000)) { ((EntityItem) tEntity).lifespan = this.mItemDespawnTime; } else if (((tEntity instanceof EntityLivingBase)) && (this.mMaxEqualEntitiesAtOneSpot > 0) - && (!(tEntity instanceof EntityPlayer)) - && (tEntity.canBePushed()) - && (((EntityLivingBase) tEntity).getHealth() > 0.0F)) { - List tList = tEntity.worldObj.getEntitiesWithinAABBExcludingEntity( - tEntity, - tEntity.boundingBox.expand( - 0.20000000298023224D, - 0.0D, - 0.20000000298023224D)); - Class tClass = tEntity.getClass(); - int tEntityCount = 1; - if (tList != null) { - for (Object o : tList) { - if ((o != null) && (o.getClass() == tClass)) { - tEntityCount++; - } + && (!(tEntity instanceof EntityPlayer)) + && (tEntity.canBePushed()) + && (((EntityLivingBase) tEntity).getHealth() > 0.0F)) { + List tList = tEntity.worldObj.getEntitiesWithinAABBExcludingEntity( + tEntity, + tEntity.boundingBox.expand(0.20000000298023224D, 0.0D, 0.20000000298023224D)); + Class tClass = tEntity.getClass(); + int tEntityCount = 1; + if (tList != null) { + for (Object o : tList) { + if ((o != null) && (o.getClass() == tClass)) { + tEntityCount++; } } - if (tEntityCount > this.mMaxEqualEntitiesAtOneSpot) { - if (debugEntityCramming) { - // Cheeseball way of not receiving a bunch of spam caused by 1 location - // obviously fails if there are crammed entities in more than one spot. - if (tEntity.posX != oldX && tEntity.posY != oldY && tEntity.posZ != oldZ) { - GT_Log.out.println( - "CRAM: Excess entities: " + tEntityCount - + " at X " - + tEntity.posX - + " Y " - + tEntity.posY - + " Z " - + tEntity.posZ); - oldX = tEntity.posX; - oldY = tEntity.posY; - oldZ = tEntity.posZ; - } + } + if (tEntityCount > this.mMaxEqualEntitiesAtOneSpot) { + if (debugEntityCramming) { + // Cheeseball way of not receiving a bunch of spam caused by 1 location + // obviously fails if there are crammed entities in more than one spot. + if (tEntity.posX != oldX && tEntity.posY != oldY && tEntity.posZ != oldZ) { + GT_Log.out.println( + "CRAM: Excess entities: " + tEntityCount + + " at X " + + tEntity.posX + + " Y " + + tEntity.posY + + " Z " + + tEntity.posZ); + oldX = tEntity.posX; + oldY = tEntity.posY; + oldZ = tEntity.posZ; } - tEntity.attackEntityFrom( - DamageSource.inWall, - tEntityCount - this.mMaxEqualEntitiesAtOneSpot); } + tEntity.attackEntityFrom( + DamageSource.inWall, + tEntityCount - this.mMaxEqualEntitiesAtOneSpot); } + } } } if (debugEntityCramming && (aEvent.world.loadedEntityList.size() != 0)) { GT_Log.out.println( - "CRAM: Time spent checking " + (System.nanoTime() - startTime) / 1000 + " microseconds"); + "CRAM: Time spent checking " + (System.nanoTime() - startTime) / 1000 + " microseconds"); } } @@ -2271,10 +2212,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG if (aOre.mPrefix != null) { if (!aOre.mPrefix.isIgnored(aOre.mMaterial)) { aOre.mPrefix.processOre( - aOre.mMaterial == null ? Materials._NULL : aOre.mMaterial, - aOre.mEvent.Name, - aOre.mModID, - GT_Utility.copyAmount(1L, aOre.mEvent.Ore)); + aOre.mMaterial == null ? Materials._NULL : aOre.mMaterial, + aOre.mEvent.Name, + aOre.mModID, + GT_Utility.copyAmount(1L, aOre.mEvent.Ore)); } } else { // GT_FML_LOGGER.info("Thingy Name: "+ aOre.mEvent.Name+ " !!!Unknown 'Thingy' detected!!! This @@ -2288,29 +2229,29 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG public void onPlayerTickEventServer(TickEvent.PlayerTickEvent aEvent) { if ((aEvent.side.isServer()) && (aEvent.phase == TickEvent.Phase.END) && (!aEvent.player.isDead)) { if ((aEvent.player.ticksExisted % 200 == 0) && (aEvent.player.capabilities.allowEdit) - && (!aEvent.player.capabilities.isCreativeMode) - && (this.mSurvivalIntoAdventure)) { + && (!aEvent.player.capabilities.isCreativeMode) + && (this.mSurvivalIntoAdventure)) { aEvent.player.setGameType(GameType.ADVENTURE); aEvent.player.capabilities.allowEdit = false; if (this.mAxeWhenAdventure) { GT_Utility.sendChatToPlayer( - aEvent.player, - GT_LanguageManager.addStringLocalization( - "Interaction_DESCRIPTION_Index_097", - "It's dangerous to go alone! Take this.", - false)); + aEvent.player, + GT_LanguageManager.addStringLocalization( + "Interaction_DESCRIPTION_Index_097", + "It's dangerous to go alone! Take this.", + false)); aEvent.player.worldObj.spawnEntityInWorld( - new EntityItem( - aEvent.player.worldObj, - aEvent.player.posX, - aEvent.player.posY, - aEvent.player.posZ, - GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( - GT_MetaGenerated_Tool_01.AXE, - 1, - Materials.Flint, - Materials.Wood, - null))); + new EntityItem( + aEvent.player.worldObj, + aEvent.player.posX, + aEvent.player.posY, + aEvent.player.posZ, + GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats( + GT_MetaGenerated_Tool_01.AXE, + 1, + Materials.Flint, + Materials.Wood, + null))); } } final boolean tHungerEffect = (this.mHungerEffect) && (aEvent.player.ticksExisted % 2400 == 1200); @@ -2321,9 +2262,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG if ((tStack = aEvent.player.inventory.getStackInSlot(i)) != null) { if (!aEvent.player.capabilities.isCreativeMode) { GT_Utility.applyRadioactivity( - aEvent.player, - GT_Utility.getRadioactivityLevel(tStack), - tStack.stackSize); + aEvent.player, + GT_Utility.getRadioactivityLevel(tStack), + tStack.stackSize); final float tHeat = GT_Utility.getHeatDamageFromItem(tStack); if (tHeat != 0.0F) { if (tHeat > 0.0F) { @@ -2346,9 +2287,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG if ((tStack = aEvent.player.inventory.armorInventory[i]) != null) { if (!aEvent.player.capabilities.isCreativeMode) { GT_Utility.applyRadioactivity( - aEvent.player, - GT_Utility.getRadioactivityLevel(tStack), - tStack.stackSize); + aEvent.player, + GT_Utility.getRadioactivityLevel(tStack), + tStack.stackSize); final float tHeat = GT_Utility.getHeatDamageFromItem(tStack); if (tHeat != 0.0F) { if (tHeat > 0.0F) { @@ -2410,12 +2351,12 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG if (cover.hasCoverGUI() && !cover.useModularUI()) { return cover.getClientGUI( - side, - tile.getCoverIDAtSide(side), - tile.getComplexCoverDataAtSide(side), - tile, - aPlayer, - aWorld); + side, + tile.getCoverIDAtSide(side), + tile.getComplexCoverDataAtSide(side), + tile, + aPlayer, + aWorld); } return null; } @@ -2429,8 +2370,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG private static List getOreDictNames(ItemStack stack) { return Arrays.stream(OreDictionary.getOreIDs(stack)) - .mapToObj(OreDictionary::getOreName) - .collect(Collectors.toList()); + .mapToObj(OreDictionary::getOreName) + .collect(Collectors.toList()); } @Override @@ -2440,8 +2381,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); } @@ -2454,11 +2395,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } else { // If not check the ore dict rFuelValue = Math.max( - rFuelValue, - getOreDictNames(aFuel).stream() - .mapToInt(f -> oreDictBurnTimes.getOrDefault(f, 0)) - .max() - .orElse(0)); + rFuelValue, + 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 @@ -2482,19 +2423,17 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG // textures go to blocks/fluids and place the .png. File should be called fluid.fluid.{unlocalised_name}.png. // All lower case. final String fluidTexture = aMaterial.mIconSet.is_custom ? "fluid." + aMaterial.mName.toLowerCase() - : "autogenerated"; + : "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) { @@ -2502,19 +2441,17 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG // textures go to blocks/fluids and place the .png. File should be called fluid.gas.{unlocalised_name}.png. All // lower case. final String fluidTexture = aMaterial.mIconSet.is_custom ? ("gas." + aMaterial.mName.toLowerCase()) - : "autogenerated"; + : "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) { @@ -2522,20 +2459,20 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG // textures go to blocks/fluids and place the .png. File should be called fluid.plasma.{unlocalised_name}.png. // All lower case. final String fluidTexture = aMaterial.mIconSet.is_custom ? ("plasma." + aMaterial.mName.toLowerCase()) - : "plasma.autogenerated"; + : "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) { @@ -2543,22 +2480,20 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG // textures go to blocks/fluids and place the .png. File should be called fluid.molten.{unlocalised_name}.png. // All lower case. final String fluidTexture = aMaterial.mIconSet.is_custom ? ("molten." + aMaterial.mName.toLowerCase()) - : "molten.autogenerated"; + : "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(); } // ------------------------------------------------------------------------------------------------------------ @@ -2567,7 +2502,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG Fluid[] crackedFluids = new Fluid[3]; String[] namePrefixes = { "lightlyhydrocracked.", "moderatelyhydrocracked.", "severelyhydrocracked." }; OrePrefixes[] orePrefixes = { OrePrefixes.cellHydroCracked1, OrePrefixes.cellHydroCracked2, - OrePrefixes.cellHydroCracked3 }; + OrePrefixes.cellHydroCracked3 }; final Fluid uncrackedFluid; if (aMaterial.mFluid != null) { uncrackedFluid = aMaterial.mFluid; @@ -2576,42 +2511,40 @@ 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( - i + 1, - new FluidStack(uncrackedFluid, 1000), - Materials.Hydrogen.getGas(hydrogenAmount * 800), - new FluidStack(crackedFluids[i], 1000), - 20 + 20 * i, - 240); + i + 1, + new FluidStack(uncrackedFluid, 1000), + Materials.Hydrogen.getGas(hydrogenAmount * 800), + new FluidStack(crackedFluids[i], 1000), + 20 + 20 * i, + 240); GT_Values.RA.addChemicalRecipe( - Materials.Hydrogen.getCells(hydrogenAmount), - GT_Utility.getIntegratedCircuit(i + 1), - new FluidStack(uncrackedFluid, 1000), - new FluidStack(crackedFluids[i], 800), - Materials.Empty.getCells(hydrogenAmount), - 160 + 80 * i, - 30); + Materials.Hydrogen.getCells(hydrogenAmount), + GT_Utility.getIntegratedCircuit(i + 1), + new FluidStack(uncrackedFluid, 1000), + new FluidStack(crackedFluids[i], 800), + Materials.Empty.getCells(hydrogenAmount), + 160 + 80 * i, + 30); GT_Values.RA.addChemicalRecipe( - aMaterial.getCells(1), - GT_Utility.getIntegratedCircuit(i + 1), - Materials.Hydrogen.getGas(hydrogenAmount * 1000), - new FluidStack(crackedFluids[i], 800), - Materials.Empty.getCells(1), - 160 + 80 * i, - 30); + aMaterial.getCells(1), + GT_Utility.getIntegratedCircuit(i + 1), + Materials.Hydrogen.getGas(hydrogenAmount * 1000), + new FluidStack(crackedFluids[i], 800), + Materials.Empty.getCells(1), + 160 + 80 * i, + 30); } aMaterial.setHydroCrackedFluids(crackedFluids); } @@ -2620,7 +2553,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG Fluid[] crackedFluids = new Fluid[3]; String[] namePrefixes = { "lightlysteamcracked.", "moderatelysteamcracked.", "severelysteamcracked." }; OrePrefixes[] orePrefixes = { OrePrefixes.cellSteamCracked1, OrePrefixes.cellSteamCracked2, - OrePrefixes.cellSteamCracked3 }; + OrePrefixes.cellSteamCracked3 }; final Fluid uncrackedFluid; if (aMaterial.mFluid != null) { uncrackedFluid = aMaterial.mFluid; @@ -2629,41 +2562,39 @@ 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, - new FluidStack(uncrackedFluid, 1000), - GT_ModHandler.getSteam(1000), - new FluidStack(crackedFluids[i], 1200), - 20 + 20 * i, - 240); + i + 1, + new FluidStack(uncrackedFluid, 1000), + GT_ModHandler.getSteam(1000), + new FluidStack(crackedFluids[i], 1200), + 20 + 20 * i, + 240); GT_Values.RA.addChemicalRecipe( - GT_ModHandler.getIC2Item("steamCell", 1L), - GT_Utility.getIntegratedCircuit(i + 1), - new FluidStack(uncrackedFluid, 1000), - new FluidStack(crackedFluids[i], 800), - Materials.Empty.getCells(1), - 160 + 80 * i, - 30); + GT_ModHandler.getIC2Item("steamCell", 1L), + GT_Utility.getIntegratedCircuit(i + 1), + new FluidStack(uncrackedFluid, 1000), + new FluidStack(crackedFluids[i], 800), + Materials.Empty.getCells(1), + 160 + 80 * i, + 30); GT_Values.RA.addChemicalRecipe( - aMaterial.getCells(1), - GT_Utility.getIntegratedCircuit(i + 1), - GT_ModHandler.getSteam(1000), - new FluidStack(crackedFluids[i], 800), - Materials.Empty.getCells(1), - 160 + 80 * i, - 30); + aMaterial.getCells(1), + GT_Utility.getIntegratedCircuit(i + 1), + GT_ModHandler.getSteam(1000), + new FluidStack(crackedFluids[i], 800), + Materials.Empty.getCells(1), + 160 + 80 * i, + 30); } aMaterial.setSteamCrackedFluids(crackedFluids); } @@ -2684,14 +2615,14 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG @SuppressWarnings({ "MethodWithTooManyParameters" }) // Deprecated method @Deprecated public Fluid addFluid(String aName, String aLocalized, Materials aMaterial, int aState, int aTemperatureK, - ItemStack aFullContainer, ItemStack aEmptyContainer, int aFluidAmount) { + 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(); + .withLocalizedName(aLocalized) + .withStateAndTemperature(FluidState.fromValue(aState), aTemperatureK) + .buildAndRegister() + .configureMaterials(aMaterial) + .registerContainers(aFullContainer, aEmptyContainer, aFluidAmount) + .asFluid(); } /** @@ -2700,23 +2631,22 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG @Deprecated @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) { + int aState, int aTemperatureK, ItemStack aFullContainer, ItemStack aEmptyContainer, int aFluidAmount) { return GT_FluidFactory.builder(aName) - .withLocalizedName(aLocalized) - .withStillIconResourceLocation( - new ResourceLocation(GregTech.ID, "fluids/fluid." + aTexture)) - .withColorRGBA(aRGBa) - .withStateAndTemperature(FluidState.fromValue(aState), aTemperatureK) - .buildAndRegister() - .configureMaterials(aMaterial) - .registerContainers(aFullContainer, aEmptyContainer, aFluidAmount) - .asFluid(); + .withLocalizedName(aLocalized) + .withStillIconResourceLocation(new ResourceLocation(GregTech.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(); + : this.mUniverse.getSaveHandler() + .getWorldDirectory(); } public long getAnimationTicks() { @@ -2733,200 +2663,167 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG GT_OreDictUnificator.resetUnificationEntries(); for (OreDictEventContainer tOre : this.mEvents) { if ((!(tOre.mEvent.Ore.getItem() instanceof GT_MetaGenerated_Item)) && (tOre.mPrefix != null) - && (tOre.mPrefix.mIsUnificatable) - && (tOre.mMaterial != null)) { + && (tOre.mPrefix.mIsUnificatable) + && (tOre.mMaterial != null)) { boolean checkModID = tOre.mModID != null; if (checkModID) { switch (tOre.mModID) { case Names.ENDER_I_O -> { if (tOre.mPrefix == OrePrefixes.ingot && tOre.mMaterial == Materials.DarkSteel) { - 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( - ConfigCategories.specialunificationtargets + "." + tOre.mModID, - tOre.mEvent.Name, - true)), - true); + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (GregTech_API.sUnification.get( + ConfigCategories.specialunificationtargets + "." + tOre.mModID, + tOre.mEvent.Name, + true)), + true); continue; } } case Names.THERMAL_FONDATION -> { if (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( - ConfigCategories.specialunificationtargets + "." + tOre.mModID, - tOre.mEvent.Name, - true)), - true); + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (GregTech_API.sUnification.get( + ConfigCategories.specialunificationtargets + "." + tOre.mModID, + tOre.mEvent.Name, + true)), + true); continue; } else if (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( - ConfigCategories.specialunificationtargets + "." + tOre.mModID, - tOre.mEvent.Name, - true)), - true); + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (GregTech_API.sUnification.get( + ConfigCategories.specialunificationtargets + "." + tOre.mModID, + tOre.mEvent.Name, + true)), + true); continue; } } case Names.ARS_MAGICA2 -> { if (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( - ConfigCategories.specialunificationtargets + "." + tOre.mModID, - tOre.mEvent.Name, - true)), - true); + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (GregTech_API.sUnification.get( + ConfigCategories.specialunificationtargets + "." + tOre.mModID, + tOre.mEvent.Name, + true)), + true); continue; } else if (tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.BlueTopaz) { - 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( - ConfigCategories.specialunificationtargets + "." + tOre.mModID, - tOre.mEvent.Name, - true)), - true); + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (GregTech_API.sUnification.get( + ConfigCategories.specialunificationtargets + "." + tOre.mModID, + tOre.mEvent.Name, + true)), + true); continue; } else if (tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.Chimerite) { - 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( - ConfigCategories.specialunificationtargets + "." + tOre.mModID, - tOre.mEvent.Name, - true)), - true); + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (GregTech_API.sUnification.get( + ConfigCategories.specialunificationtargets + "." + tOre.mModID, + tOre.mEvent.Name, + true)), + true); continue; } else if (tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.Moonstone) { - 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( - ConfigCategories.specialunificationtargets + "." + tOre.mModID, - tOre.mEvent.Name, - true)), - true); + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (GregTech_API.sUnification.get( + ConfigCategories.specialunificationtargets + "." + tOre.mModID, + tOre.mEvent.Name, + true)), + true); continue; } else if (tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.Sunstone) { - 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( - ConfigCategories.specialunificationtargets + "." + tOre.mModID, - tOre.mEvent.Name, - true)), - true); + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (GregTech_API.sUnification.get( + ConfigCategories.specialunificationtargets + "." + tOre.mModID, + tOre.mEvent.Name, + true)), + true); continue; } } case Names.ROTARY_CRAFT -> { if (tOre.mPrefix == OrePrefixes.ingot && tOre.mMaterial == Materials.HSLA) { - 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( - ConfigCategories.specialunificationtargets + "." + tOre.mModID, - tOre.mEvent.Name, - true)), - true); + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (GregTech_API.sUnification.get( + ConfigCategories.specialunificationtargets + "." + tOre.mModID, + tOre.mEvent.Name, + true)), + true); continue; } } case Names.APPLIED_ENERGISTICS2 -> { if (tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.CertusQuartz) { - 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( - ConfigCategories.specialunificationtargets + "." + tOre.mModID, - tOre.mEvent.Name, - true)), - true); + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (GregTech_API.sUnification.get( + ConfigCategories.specialunificationtargets + "." + tOre.mModID, + tOre.mEvent.Name, + true)), + true); continue; } else if (tOre.mPrefix == OrePrefixes.dust && tOre.mMaterial == Materials.CertusQuartz) { - 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( - ConfigCategories.specialunificationtargets + "." + tOre.mModID, - tOre.mEvent.Name, - true)), - true); + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (GregTech_API.sUnification.get( + ConfigCategories.specialunificationtargets + "." + tOre.mModID, + tOre.mEvent.Name, + true)), + true); continue; } } @@ -2938,37 +2835,37 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } else { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); GT_OreDictUnificator.set( - tOre.mPrefix, - tOre.mMaterial, - tOre.mEvent.Ore, - (checkModID) && (GregTech_API.sUnification.get( - ConfigCategories.specialunificationtargets + "." + tOre.mModID, - tOre.mEvent.Name, - false)), - true); + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (checkModID) && (GregTech_API.sUnification.get( + ConfigCategories.specialunificationtargets + "." + tOre.mModID, + tOre.mEvent.Name, + false)), + true); } } } for (OreDictEventContainer tOre : this.mEvents) { if (((tOre.mEvent.Ore.getItem() instanceof GT_MetaGenerated_Item)) && (tOre.mPrefix != null) - && (tOre.mPrefix.mIsUnificatable) - && (tOre.mMaterial != null)) { + && (tOre.mPrefix.mIsUnificatable) + && (tOre.mMaterial != null)) { if (GT_OreDictUnificator.isBlacklisted(tOre.mEvent.Ore)) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, true); } else { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); GT_OreDictUnificator.set( - tOre.mPrefix, - tOre.mMaterial, - tOre.mEvent.Ore, - (tOre.mModID != null) && (GregTech_API.sUnification.get( - new StringBuilder().append(ConfigCategories.specialunificationtargets) - .append(".") - .append(tOre.mModID), - tOre.mEvent.Name, - false)), - true); + tOre.mPrefix, + tOre.mMaterial, + tOre.mEvent.Ore, + (tOre.mModID != null) && (GregTech_API.sUnification.get( + new StringBuilder().append(ConfigCategories.specialunificationtargets) + .append(".") + .append(tOre.mModID), + tOre.mEvent.Name, + false)), + true); } } } @@ -3029,15 +2926,15 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG ItemStack aStack = aEvent.entityPlayer.getCurrentEquippedItem(); if ((aStack != null) && ((aStack.getItem() instanceof GT_MetaGenerated_Tool))) { aEvent.newSpeed = ((GT_MetaGenerated_Tool) aStack.getItem()).onBlockBreakSpeedEvent( - aEvent.newSpeed, - aStack, - aEvent.entityPlayer, - aEvent.block, - aEvent.x, - aEvent.y, - aEvent.z, - (byte) aEvent.metadata, - aEvent); + aEvent.newSpeed, + aStack, + aEvent.entityPlayer, + aEvent.block, + aEvent.x, + aEvent.y, + aEvent.z, + (byte) aEvent.metadata, + aEvent); } } } @@ -3051,7 +2948,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG public final String mModID; public OreDictEventContainer(OreDictionary.OreRegisterEvent aEvent, OrePrefixes aPrefix, Materials aMaterial, - String aModID) { + String aModID) { this.mEvent = aEvent; this.mPrefix = aPrefix; this.mMaterial = aMaterial; @@ -3062,8 +2959,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG @SubscribeEvent public void onBlockEvent(BlockEvent event) { if (event.block.getUnlocalizedName() - .equals("blockAlloyGlass")) - GregTech_API.causeMachineUpdate(event.world, event.x, event.y, event.z); + .equals("blockAlloyGlass")) GregTech_API.causeMachineUpdate(event.world, event.x, event.y, event.z); } public static void addFullHazmatToGeneralItem(String aModID, String aItem, long aAmount, int aMeta) { diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java index 89d56baaef..65ff60e9c3 100644 --- a/src/main/java/gregtech/common/GT_RecipeAdder.java +++ b/src/main/java/gregtech/common/GT_RecipeAdder.java @@ -41,36 +41,36 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override @Deprecated public boolean addFusionReactorRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, - int aEUt, int aStartEU) { + int aEUt, int aStartEU) { return false; } @Override // Really? public boolean addFusionReactorRecipe(FluidStack aInput1, FluidStack aInput2, FluidStack aOutput1, int aDuration, - int aEUt, int aStartEU) { + int aEUt, int aStartEU) { 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) { + "fusion", + aOutput1.getFluid() + .getName(), + aDuration)) <= 0) { return false; } GT_Recipe.GT_Recipe_Map.sFusionRecipes.addRecipe( - null, - new FluidStack[] { aInput1, aInput2 }, - new FluidStack[] { aOutput1 }, - aDuration, - aEUt, - aStartEU); + null, + new FluidStack[] { aInput1, aInput2 }, + new FluidStack[] { aOutput1 }, + aDuration, + aEUt, + aStartEU); return true; } @Override public boolean addFusionReactorRecipe(FluidStack[] FluidInputArray, FluidStack[] FluidOutputArray, - int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion) { + int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion) { if (FluidInputArray.length == 0) return false; if (FluidOutputArray.length == 0) return false; @@ -79,88 +79,88 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { // This is so NEI can function properly and understand the recipe. Otherwise, it gets cut off. if ((FluidInputArray.length > 2) || (FluidOutputArray.length > 2)) { GT_Recipe.GT_Recipe_Map.sComplexFusionRecipes.addRecipe( - null, - FluidInputArray, - FluidOutputArray, - aFusionDurationInTicks, - aFusionEnergyPerTick, - aEnergyNeededForStartingFusion); - return true; - } - - GT_Recipe.GT_Recipe_Map.sFusionRecipes.addRecipe( null, FluidInputArray, FluidOutputArray, aFusionDurationInTicks, aFusionEnergyPerTick, aEnergyNeededForStartingFusion); + return true; + } + + GT_Recipe.GT_Recipe_Map.sFusionRecipes.addRecipe( + null, + FluidInputArray, + FluidOutputArray, + aFusionDurationInTicks, + aFusionEnergyPerTick, + aEnergyNeededForStartingFusion); return true; } @Override public boolean addCentrifugeRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, - ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration) { + ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration) { return addCentrifugeRecipe( - aInput1, - aInput2 < 0 ? null : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2) : null, - null, - null, - aOutput1, - aOutput2, - aOutput3, - aOutput4, - aOutput5, - aOutput6, - null, - aDuration, - 5); + aInput1, + aInput2 < 0 ? null : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2) : null, + null, + null, + aOutput1, + aOutput2, + aOutput3, + aOutput4, + aOutput5, + aOutput6, + null, + aDuration, + 5); } @Override public boolean addCentrifugeRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, - ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration, int aEUt) { + ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration, int aEUt) { return addCentrifugeRecipe( - aInput1, - aInput2 < 0 ? null : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2) : null, - null, - null, - aOutput1, - aOutput2, - aOutput3, - aOutput4, - aOutput5, - aOutput6, - null, - aDuration, - aEUt); + aInput1, + aInput2 < 0 ? null : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2) : null, + null, + null, + aOutput1, + aOutput2, + aOutput3, + aOutput4, + aOutput5, + aOutput6, + null, + aDuration, + aEUt); } @Override public boolean addCentrifugeRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, - FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, - ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt) { + FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, + ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt) { return addCentrifugeRecipe( - aInput1, - aInput2, - aFluidInput, - aFluidOutput, - aOutput1, - aOutput2, - aOutput3, - aOutput4, - aOutput5, - aOutput6, - aChances, - aDuration, - aEUt, - false); + aInput1, + aInput2, + aFluidInput, + aFluidOutput, + aOutput1, + aOutput2, + aOutput3, + aOutput4, + aOutput5, + aOutput6, + aChances, + aDuration, + aEUt, + false); } @Override public boolean addCentrifugeRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, - FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, - ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt, boolean aCleanroom) { + FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, + ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt, boolean aCleanroom) { if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) { return false; } @@ -168,26 +168,26 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } if ((aFluidInput != null) && ((aDuration = GregTech_API.sRecipeFile.get( - "centrifuge", - aFluidInput.getFluid() - .getName(), - aDuration)) <= 0)) { + "centrifuge", + aFluidInput.getFluid() + .getName(), + aDuration)) <= 0)) { return false; } if (!GT_Mod.gregtechproxy.mEnableCleanroom) { aCleanroom = false; } GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2 }, - new ItemStack[] { aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6, }, - null, - aChances, - new FluidStack[] { aFluidInput }, - new FluidStack[] { aFluidOutput }, - aDuration, - aEUt, - aCleanroom ? -100 : 0); + true, + new ItemStack[] { aInput1, aInput2 }, + new ItemStack[] { aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6, }, + null, + aChances, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, + aDuration, + aEUt, + aCleanroom ? -100 : 0); ItemStack[] itemInputs = { aInput1, aInput2 }; ItemStack[] itemOutputs = { aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6 }; FluidStack[] fluidInputs = { aFluidInput, null, null }; @@ -217,16 +217,16 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sMultiblockCentrifugeRecipes.addRecipe( - false, - itemInputs, - itemOutputs, - null, - aChances, - fluidInputs, - fluidOutputs, - aDuration, - aEUt, - aCleanroom ? -100 : 0); + false, + itemInputs, + itemOutputs, + null, + aChances, + fluidInputs, + fluidOutputs, + aDuration, + aEUt, + aCleanroom ? -100 : 0); return true; } @@ -239,66 +239,66 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sCompressorRecipes.addRecipe( - true, - new ItemStack[] { aInput1 }, - new ItemStack[] { aOutput1 }, - null, - null, - null, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aInput1 }, + new ItemStack[] { aOutput1 }, + null, + null, + null, + aDuration, + aEUt, + 0); return true; } @Override public boolean addElectrolyzerRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, - ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration, int aEUt) { + ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration, int aEUt) { return addElectrolyzerRecipe( - aInput1, - aInput2 < 0 ? null : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2) : null, - null, - null, - aOutput1, - aOutput2, - aOutput3, - aOutput4, - aOutput5, - aOutput6, - null, - aDuration, - aEUt); + aInput1, + aInput2 < 0 ? null : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2) : null, + null, + null, + aOutput1, + aOutput2, + aOutput3, + aOutput4, + aOutput5, + aOutput6, + null, + aDuration, + aEUt); } @Override public boolean addElectrolyzerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, - FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, - ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt) { + FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, + ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt) { if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) { return false; } if ((aInput1 != null) - && ((aDuration = GregTech_API.sRecipeFile.get("electrolyzer", aInput1, aDuration)) <= 0)) { + && ((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)) { + "electrolyzer", + aFluidInput.getFluid() + .getName(), + aDuration)) <= 0)) { return false; } GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2 }, - new ItemStack[] { aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6 }, - null, - aChances, - new FluidStack[] { aFluidInput }, - new FluidStack[] { aFluidOutput }, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aInput1, aInput2 }, + new ItemStack[] { aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6 }, + null, + aChances, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, + aDuration, + aEUt, + 0); ItemStack[] itemInputs = { aInput1, aInput2 }; ItemStack[] itemOutputs = { aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6 }; FluidStack[] fluidInputs = { aFluidInput, null, null }; @@ -310,7 +310,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { for (ItemStack item : itemInputs) { if (item != null) { if (GT_Utility.getFluidForFilledItem(item, true) != null || GT_Utility.isCellEmpty(item) - || GT_Utility.isAnyIntegratedCircuit(item)) { + || GT_Utility.isAnyIntegratedCircuit(item)) { fluidInputs[iNumber + 1] = GT_Utility.convertCellToFluid(item); itemInputs[iNumber] = null; } @@ -328,17 +328,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { oNumber++; } - GT_Recipe.GT_Recipe_Map.sMultiblockElectrolyzerRecipes.addRecipe( - false, - itemInputs, - itemOutputs, - null, - aChances, - fluidInputs, - fluidOutputs, - aDuration, - aEUt, - 0); + GT_Recipe.GT_Recipe_Map.sMultiblockElectrolyzerRecipes + .addRecipe(false, itemInputs, itemOutputs, null, aChances, fluidInputs, fluidOutputs, aDuration, aEUt, 0); return true; } @@ -354,62 +345,62 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, - FluidStack aFluidOutput, ItemStack aOutput, int aDuration) { + FluidStack aFluidOutput, ItemStack aOutput, int aDuration) { return addChemicalRecipe(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aDuration, 30); } @Override public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, - FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration) { + FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration) { return addChemicalRecipe(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aOutput2, aDuration, 30); } @Override public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, - FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUTick) { + FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUTick) { return addChemicalRecipe( - aInput1, - aInput2, - aFluidInput, - aFluidOutput, - aOutput, - GT_Values.NI, - aDuration, - aEUTick); + aInput1, + aInput2, + aFluidInput, + aFluidOutput, + aOutput, + GT_Values.NI, + aDuration, + aEUTick); } @Override public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, - FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick) { + FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick) { return addChemicalRecipe( - aInput1, - aInput2, - aFluidInput, - aFluidOutput, - aOutput, - aOutput2, - aDuration, - aEUtick, - false); + aInput1, + aInput2, + aFluidInput, + aFluidOutput, + aOutput, + aOutput2, + aDuration, + aEUtick, + false); } @Override public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, - FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick, - boolean aCleanroom) { + FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick, + boolean aCleanroom) { if (((aInput1 == null) && (aFluidInput == null)) - || ((aOutput == null) && (aOutput2 == null) && (aFluidOutput == null))) { + || ((aOutput == null) && (aOutput2 == null) && (aFluidOutput == null))) { return false; } if ((aOutput != null || aOutput2 != null) - && ((aDuration = GregTech_API.sRecipeFile.get("chemicalreactor", aOutput, aDuration)) <= 0)) { + && ((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)) { + "chemicalreactor", + aFluidOutput.getFluid() + .getName(), + aDuration)) <= 0)) { return false; } if (aEUtick <= 0) { @@ -419,7 +410,22 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { aCleanroom = false; } GT_Recipe.GT_Recipe_Map.sChemicalRecipes.addRecipe( - true, + true, + new ItemStack[] { aInput1, aInput2 }, + new ItemStack[] { aOutput, aOutput2 }, + null, + null, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, + aDuration, + aEUtick, + aCleanroom ? -200 : 0); + if (!(aInput1 != null && aInput1.getItem() instanceof GT_IntegratedCircuit_Item + && aInput1.getItemDamage() >= 10) + && !(aInput2 != null && aInput2.getItem() instanceof GT_IntegratedCircuit_Item + && aInput2.getItemDamage() >= 10)) { + GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.addRecipe( + false, new ItemStack[] { aInput1, aInput2 }, new ItemStack[] { aOutput, aOutput2 }, null, @@ -428,81 +434,57 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { new FluidStack[] { aFluidOutput }, aDuration, aEUtick, - aCleanroom ? -200 : 0); - if (!(aInput1 != null && aInput1.getItem() instanceof GT_IntegratedCircuit_Item - && aInput1.getItemDamage() >= 10) - && !(aInput2 != null && aInput2.getItem() instanceof GT_IntegratedCircuit_Item - && aInput2.getItemDamage() >= 10)) { - GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.addRecipe( - false, - new ItemStack[] { aInput1, aInput2 }, - new ItemStack[] { aOutput, aOutput2 }, - null, - null, - new FluidStack[] { aFluidInput }, - new FluidStack[] { aFluidOutput }, - aDuration, - aEUtick, - 0); + 0); } return true; } @Override public boolean addMultiblockChemicalRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, - FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUtick) { + FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUtick) { if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs)) { return false; } 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; } @Override public boolean addChemicalRecipeForBasicMachineOnly(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, - FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick) { + FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick) { if (((aInput1 == null) && (aFluidInput == null)) - || ((aOutput == null) && (aOutput2 == null) && (aFluidOutput == null))) { + || ((aOutput == null) && (aOutput2 == null) && (aFluidOutput == null))) { return false; } if ((aOutput != null || aOutput2 != null) - && ((aDuration = GregTech_API.sRecipeFile.get("chemicalreactor", aOutput, aDuration)) <= 0)) { + && ((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)) { + "chemicalreactor", + aFluidOutput.getFluid() + .getName(), + aDuration)) <= 0)) { return false; } if (aEUtick <= 0) { return false; } GT_Recipe.GT_Recipe_Map.sChemicalRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2 }, - new ItemStack[] { aOutput, aOutput2 }, - null, - null, - new FluidStack[] { aFluidInput }, - new FluidStack[] { aFluidOutput }, - aDuration, - aEUtick, - 0); + true, + new ItemStack[] { aInput1, aInput2 }, + new ItemStack[] { aOutput, aOutput2 }, + null, + null, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, + aDuration, + aEUtick, + 0); return true; } @@ -510,60 +492,60 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { public void addDefaultPolymerizationRecipes(Fluid aBasicMaterial, ItemStack aBasicMaterialCell, Fluid aPolymer) { // Oxygen/Titaniumtetrafluoride -> +50% Output each addChemicalRecipe( - ItemList.Cell_Air.get(1), - GT_Utility.getIntegratedCircuit(1), - new GT_FluidStack(aBasicMaterial, 144), - new GT_FluidStack(aPolymer, 144), - Materials.Empty.getCells(1), - 160); + ItemList.Cell_Air.get(1), + GT_Utility.getIntegratedCircuit(1), + new GT_FluidStack(aBasicMaterial, 144), + new GT_FluidStack(aPolymer, 144), + Materials.Empty.getCells(1), + 160); addChemicalRecipe( - Materials.Oxygen.getCells(1), - GT_Utility.getIntegratedCircuit(1), - new GT_FluidStack(aBasicMaterial, 144), - new GT_FluidStack(aPolymer, 216), - Materials.Empty.getCells(1), - 160); + Materials.Oxygen.getCells(1), + GT_Utility.getIntegratedCircuit(1), + new GT_FluidStack(aBasicMaterial, 144), + new GT_FluidStack(aPolymer, 216), + Materials.Empty.getCells(1), + 160); addChemicalRecipe( - aBasicMaterialCell, - GT_Utility.getIntegratedCircuit(1), - Materials.Air.getGas(14000), - new GT_FluidStack(aPolymer, 1000), - Materials.Empty.getCells(1), - 1120); + aBasicMaterialCell, + GT_Utility.getIntegratedCircuit(1), + Materials.Air.getGas(14000), + new GT_FluidStack(aPolymer, 1000), + Materials.Empty.getCells(1), + 1120); addChemicalRecipe( - aBasicMaterialCell, - GT_Utility.getIntegratedCircuit(1), - Materials.Oxygen.getGas(7000), - new GT_FluidStack(aPolymer, 1500), - Materials.Empty.getCells(1), - 1120); + aBasicMaterialCell, + GT_Utility.getIntegratedCircuit(1), + Materials.Oxygen.getGas(7000), + new GT_FluidStack(aPolymer, 1500), + Materials.Empty.getCells(1), + 1120); addMultiblockChemicalRecipe( - new ItemStack[] { GT_Utility.getIntegratedCircuit(2) }, - new FluidStack[] { new GT_FluidStack(aBasicMaterial, 2160), Materials.Air.getGas(7500), - Materials.Titaniumtetrachloride.getFluid(100) }, - new FluidStack[] { new GT_FluidStack(aPolymer, 3240) }, - null, - 800, - 30); + new ItemStack[] { GT_Utility.getIntegratedCircuit(2) }, + new FluidStack[] { new GT_FluidStack(aBasicMaterial, 2160), Materials.Air.getGas(7500), + Materials.Titaniumtetrachloride.getFluid(100) }, + new FluidStack[] { new GT_FluidStack(aPolymer, 3240) }, + null, + 800, + 30); addMultiblockChemicalRecipe( - new ItemStack[] { GT_Utility.getIntegratedCircuit(2) }, - new FluidStack[] { new GT_FluidStack(aBasicMaterial, 2160), Materials.Oxygen.getGas(7500), - Materials.Titaniumtetrachloride.getFluid(100) }, - new FluidStack[] { new GT_FluidStack(aPolymer, 4320) }, - null, - 800, - 30); + new ItemStack[] { GT_Utility.getIntegratedCircuit(2) }, + new FluidStack[] { new GT_FluidStack(aBasicMaterial, 2160), Materials.Oxygen.getGas(7500), + Materials.Titaniumtetrachloride.getFluid(100) }, + new FluidStack[] { new GT_FluidStack(aPolymer, 4320) }, + null, + 800, + 30); } @Override public boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, - int aDuration, int aEUt, int aLevel) { + int aDuration, int aEUt, int aLevel) { return addBlastRecipe(aInput1, aInput2, null, null, aOutput1, aOutput2, aDuration, aEUt, aLevel); } @Override public boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, - ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, int aLevel) { + ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, int aLevel) { if ((aInput1 == null) || (aOutput1 == null)) { return false; } @@ -571,22 +553,22 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sBlastRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2 }, - new ItemStack[] { aOutput1, aOutput2 }, - null, - null, - new FluidStack[] { aFluidInput }, - new FluidStack[] { aFluidOutput }, - aDuration, - aEUt, - aLevel); + true, + new ItemStack[] { aInput1, aInput2 }, + new ItemStack[] { aOutput1, aOutput2 }, + null, + null, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, + aDuration, + aEUt, + aLevel); return true; } public boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, - FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, - ItemStack aOutput4, int aDuration, int aEUt, int aLevel) { + FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, + ItemStack aOutput4, int aDuration, int aEUt, int aLevel) { if ((aInput1 == null) || (aOutput1 == null)) { return false; } @@ -594,39 +576,39 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sBlastRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2, aInput3, aInput4 }, - new ItemStack[] { aOutput1, aOutput2, aOutput3, aOutput4 }, - null, - null, - new FluidStack[] { aFluidInput }, - new FluidStack[] { aFluidOutput }, - aDuration, - aEUt, - aLevel); + true, + new ItemStack[] { aInput1, aInput2, aInput3, aInput4 }, + new ItemStack[] { aOutput1, aOutput2, aOutput3, aOutput4 }, + null, + null, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, + aDuration, + aEUt, + aLevel); return true; } @Override public boolean addPlasmaForgeRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, - ItemStack[] OutputItemArray, FluidStack[] FluidOutputArray, int aDuration, int aEUt, int coil_heat_level) { + ItemStack[] OutputItemArray, FluidStack[] FluidOutputArray, int aDuration, int aEUt, int coil_heat_level) { GT_Recipe.GT_Recipe_Map.sPlasmaForgeRecipes.addRecipe( - false, - ItemInputArray, - OutputItemArray, - null, - null, - FluidInputArray, - FluidOutputArray, - aDuration, - aEUt, - coil_heat_level); + false, + ItemInputArray, + OutputItemArray, + null, + null, + FluidInputArray, + FluidOutputArray, + aDuration, + aEUt, + coil_heat_level); return true; } @Override public boolean addPrimitiveBlastRecipe(ItemStack aInput1, ItemStack aInput2, int aCoalAmount, ItemStack aOutput1, - ItemStack aOutput2, int aDuration) { + ItemStack aOutput2, int aDuration) { if ((aInput1 == null && aInput2 == null) || (aOutput1 == null && aOutput2 == null)) { return false; } @@ -639,110 +621,110 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { Materials[] coals = new Materials[] { Materials.Coal, Materials.Charcoal }; for (Materials coal : coals) { GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2, coal.getGems(aCoalAmount) }, - new ItemStack[] { aOutput1, aOutput2, Materials.DarkAsh.getDustTiny(aCoalAmount) }, - null, - null, - null, - null, - aDuration, - 0, - 0); + true, + new ItemStack[] { aInput1, aInput2, coal.getGems(aCoalAmount) }, + new ItemStack[] { aOutput1, aOutput2, Materials.DarkAsh.getDustTiny(aCoalAmount) }, + null, + null, + null, + null, + aDuration, + 0, + 0); GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2, coal.getDust(aCoalAmount) }, - new ItemStack[] { aOutput1, aOutput2, Materials.DarkAsh.getDustTiny(aCoalAmount) }, - null, - null, - null, - null, - aDuration, - 0, - 0); + true, + new ItemStack[] { aInput1, aInput2, coal.getDust(aCoalAmount) }, + new ItemStack[] { aOutput1, aOutput2, Materials.DarkAsh.getDustTiny(aCoalAmount) }, + null, + null, + null, + null, + aDuration, + 0, + 0); } if (Railcraft.isModLoaded()) { GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( + true, + new ItemStack[] { aInput1, aInput2, RailcraftToolItems.getCoalCoke(aCoalAmount / 2) }, + new ItemStack[] { aOutput1, aOutput2, Materials.Ash.getDustTiny(aCoalAmount / 2) }, + null, + null, + null, + null, + aDuration * 2 / 3, + 0, + 0); + } + if (GTPlusPlus.isModLoaded()) { + GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( + true, + new ItemStack[] { aInput1, aInput2, + GT_ModHandler.getModItem(GTPlusPlus.ID, "itemCactusCoke", (aCoalAmount * 2L)) }, + new ItemStack[] { aOutput1, aOutput2, Materials.Ash.getDustTiny(aCoalAmount * 2) }, + null, + null, + null, + null, + aDuration * 2 / 3, + 0, + 0); + GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( + true, + new ItemStack[] { aInput1, aInput2, + GT_ModHandler.getModItem(GTPlusPlus.ID, "itemSugarCoke", (aCoalAmount * 2L)) }, + new ItemStack[] { aOutput1, aOutput2, Materials.Ash.getDustTiny(aCoalAmount * 2) }, + null, + null, + null, + null, + aDuration * 2 / 3, + 0, + 0); + } + if ((aInput1 == null || aInput1.stackSize <= 6) && (aInput2 == null || aInput2.stackSize <= 6) + && (aOutput1 == null || aOutput1.stackSize <= 6) + && (aOutput2 == null || aOutput2.stackSize <= 6)) { + aInput1 = aInput1 == null ? null : GT_Utility.copyAmount(aInput1.stackSize * 10L, aInput1); + aInput2 = aInput2 == null ? null : GT_Utility.copyAmount(aInput2.stackSize * 10L, aInput2); + aOutput1 = aOutput1 == null ? null : GT_Utility.copyAmount(aOutput1.stackSize * 10L, aOutput1); + aOutput2 = aOutput2 == null ? null : GT_Utility.copyAmount(aOutput2.stackSize * 10L, aOutput2); + for (Materials coal : coals) { + GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( true, - new ItemStack[] { aInput1, aInput2, RailcraftToolItems.getCoalCoke(aCoalAmount / 2) }, - new ItemStack[] { aOutput1, aOutput2, Materials.Ash.getDustTiny(aCoalAmount / 2) }, + new ItemStack[] { aInput1, aInput2, coal.getBlocks(aCoalAmount) }, + new ItemStack[] { aOutput1, aOutput2, Materials.DarkAsh.getDust(aCoalAmount) }, null, null, null, null, - aDuration * 2 / 3, + aDuration * 10, 0, 0); - } - if (GTPlusPlus.isModLoaded()) { - GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( + GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( true, - new ItemStack[] { aInput1, aInput2, - GT_ModHandler.getModItem(GTPlusPlus.ID, "itemCactusCoke", (aCoalAmount * 2L)) }, - new ItemStack[] { aOutput1, aOutput2, Materials.Ash.getDustTiny(aCoalAmount * 2) }, + new ItemStack[] { aInput1, aInput2, coal.getBlocks(aCoalAmount) }, + new ItemStack[] { aOutput1, aOutput2, Materials.DarkAsh.getDust(aCoalAmount) }, null, null, null, null, - aDuration * 2 / 3, + aDuration * 10, 0, 0); - GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( + } + if (Railcraft.isModLoaded()) { + GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( true, - new ItemStack[] { aInput1, aInput2, - GT_ModHandler.getModItem(GTPlusPlus.ID, "itemSugarCoke", (aCoalAmount * 2L)) }, - new ItemStack[] { aOutput1, aOutput2, Materials.Ash.getDustTiny(aCoalAmount * 2) }, + new ItemStack[] { aInput1, aInput2, EnumCube.COKE_BLOCK.getItem(aCoalAmount / 2) }, + new ItemStack[] { aOutput1, aOutput2, Materials.Ash.getDust(aCoalAmount / 2) }, null, null, null, null, - aDuration * 2 / 3, + aDuration * 20 / 3, 0, 0); - } - if ((aInput1 == null || aInput1.stackSize <= 6) && (aInput2 == null || aInput2.stackSize <= 6) - && (aOutput1 == null || aOutput1.stackSize <= 6) - && (aOutput2 == null || aOutput2.stackSize <= 6)) { - aInput1 = aInput1 == null ? null : GT_Utility.copyAmount(aInput1.stackSize * 10L, aInput1); - aInput2 = aInput2 == null ? null : GT_Utility.copyAmount(aInput2.stackSize * 10L, aInput2); - aOutput1 = aOutput1 == null ? null : GT_Utility.copyAmount(aOutput1.stackSize * 10L, aOutput1); - aOutput2 = aOutput2 == null ? null : GT_Utility.copyAmount(aOutput2.stackSize * 10L, aOutput2); - for (Materials coal : coals) { - GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2, coal.getBlocks(aCoalAmount) }, - new ItemStack[] { aOutput1, aOutput2, Materials.DarkAsh.getDust(aCoalAmount) }, - null, - null, - null, - null, - aDuration * 10, - 0, - 0); - GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2, coal.getBlocks(aCoalAmount) }, - new ItemStack[] { aOutput1, aOutput2, Materials.DarkAsh.getDust(aCoalAmount) }, - null, - null, - null, - null, - aDuration * 10, - 0, - 0); - } - if (Railcraft.isModLoaded()) { - GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2, EnumCube.COKE_BLOCK.getItem(aCoalAmount / 2) }, - new ItemStack[] { aOutput1, aOutput2, Materials.Ash.getDust(aCoalAmount / 2) }, - null, - null, - null, - null, - aDuration * 20 / 3, - 0, - 0); } } return true; @@ -750,7 +732,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override public boolean addCannerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, - int aDuration, int aEUt) { + int aDuration, int aEUt) { if ((aInput1 == null) || (aOutput1 == null)) { return false; } @@ -763,22 +745,22 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override public boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, - int aEUt) { + int aEUt) { return addAlloySmelterRecipe(aInput1, aInput2, aOutput1, aDuration, aEUt, false); } @Override public boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, - int aEUt, boolean hidden) { + int aEUt, boolean hidden) { if ((aInput1 == null) || (aOutput1 == null || Materials.Graphite.contains(aInput1))) { return false; } if ((aInput2 == null) && ((OrePrefixes.ingot.contains(aInput1)) || (OrePrefixes.dust.contains(aInput1)) - || (OrePrefixes.gem.contains(aInput1)))) { + || (OrePrefixes.gem.contains(aInput1)))) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("alloysmelting", aInput2 == null ? aInput1 : aOutput1, aDuration)) - <= 0) { + <= 0) { return false; } GT_Recipe tRecipe = new GT_Recipe(aInput1, aInput2, aEUt, aDuration, aOutput1); @@ -811,7 +793,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override public boolean addCutterRecipe(ItemStack aInput, FluidStack aLubricant, ItemStack aOutput1, ItemStack aOutput2, - int aDuration, int aEUt) { + int aDuration, int aEUt) { if ((aInput == null) || (aLubricant == null) || (aOutput1 == null)) { return false; } @@ -819,39 +801,39 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sCutterRecipes.addRecipe( - true, - new ItemStack[] { aInput }, - new ItemStack[] { aOutput1, aOutput2 }, - null, - new FluidStack[] { aLubricant }, - null, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput1, aOutput2 }, + null, + new FluidStack[] { aLubricant }, + null, + aDuration, + aEUt, + 0); return true; } @Override public boolean addCutterRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, - boolean aCleanroom) { + boolean aCleanroom) { return addCutterRecipe(aInput, null, aOutput1, aOutput2, aDuration, aEUt, aCleanroom); } public boolean addCutterRecipe(ItemStack aInput, int aCircuit, ItemStack aOutput1, ItemStack aOutput2, - int aDuration, int aEUt) { + int aDuration, int aEUt) { return addCutterRecipe(aInput, aCircuit, aOutput1, aOutput2, aDuration, aEUt, false); } public boolean addCutterRecipe(ItemStack aInput, int aCircuit, ItemStack aOutput1, ItemStack aOutput2, - int aDuration, int aEUt, boolean aCleanroom) { + int aDuration, int aEUt, boolean aCleanroom) { return addCutterRecipe( - aInput, - GT_Utility.getIntegratedCircuit(aCircuit), - aOutput1, - aOutput2, - aDuration, - aEUt, - aCleanroom); + aInput, + GT_Utility.getIntegratedCircuit(aCircuit), + aOutput1, + aOutput2, + aDuration, + aEUt, + aCleanroom); } @Override @@ -861,23 +843,23 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override public boolean addCutterRecipe(ItemStack aInput, ItemStack aCircuit, ItemStack aOutput1, ItemStack aOutput2, - int aDuration, int aEUt) { + int aDuration, int aEUt) { return addCutterRecipe(aInput, aCircuit, aOutput1, aOutput2, aDuration, aEUt, false); } @Override public boolean addCutterRecipe(ItemStack aInput, ItemStack aCircuit, ItemStack aOutput1, ItemStack aOutput2, - int aDuration, int aEUt, boolean aCleanroom) { + int aDuration, int aEUt, boolean aCleanroom) { return addCutterRecipe( - new ItemStack[] { aInput, aCircuit }, - new ItemStack[] { aOutput1, aOutput2 }, - aDuration, - aEUt, - aCleanroom ? -200 : 0); + new ItemStack[] { aInput, aCircuit }, + new ItemStack[] { aOutput1, aOutput2 }, + aDuration, + aEUt, + aCleanroom ? -200 : 0); } public boolean addCutterRecipe(ItemStack[] aInputs, ItemStack[] aOutputs, int aDuration, int aEUt, - boolean aCleanroom) { + boolean aCleanroom) { return addCutterRecipe(aInputs, aOutputs, aDuration, aEUt, aCleanroom ? -200 : 0); } @@ -887,7 +869,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } if (Arrays.stream(aOutputs) - .noneMatch(Objects::nonNull)) { + .noneMatch(Objects::nonNull)) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("cutting", aInputs[0], aDuration)) <= 0) { @@ -897,57 +879,56 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { aSpecial = 0; } GT_Recipe.GT_Recipe_Map.sCutterRecipes.addRecipe( - true, - aInputs, - aOutputs, - null, - new FluidStack[] { Materials.Water.getFluid(Math.max(4, Math.min(1000, aDuration * aEUt / 320))) }, - null, - aDuration * 2, - aEUt, - aSpecial); + true, + aInputs, + aOutputs, + null, + new FluidStack[] { Materials.Water.getFluid(Math.max(4, Math.min(1000, aDuration * aEUt / 320))) }, + null, + aDuration * 2, + aEUt, + aSpecial); GT_Recipe.GT_Recipe_Map.sCutterRecipes.addRecipe( - true, - aInputs, - aOutputs, - null, - new FluidStack[] { - GT_ModHandler.getDistilledWater(Math.max(3, Math.min(750, aDuration * aEUt / 426))) }, - null, - aDuration * 2, - aEUt, - aSpecial); + true, + aInputs, + aOutputs, + null, + new FluidStack[] { GT_ModHandler.getDistilledWater(Math.max(3, Math.min(750, aDuration * aEUt / 426))) }, + null, + aDuration * 2, + aEUt, + aSpecial); GT_Recipe.GT_Recipe_Map.sCutterRecipes.addRecipe( - true, - aInputs, - aOutputs, - null, - new FluidStack[] { Materials.Lubricant.getFluid(Math.max(1, Math.min(250, aDuration * aEUt / 1280))) }, - null, - aDuration, - aEUt, - aSpecial); + true, + aInputs, + aOutputs, + null, + new FluidStack[] { Materials.Lubricant.getFluid(Math.max(1, Math.min(250, aDuration * aEUt / 1280))) }, + null, + aDuration, + aEUt, + aSpecial); return true; } @Override public boolean addAssemblerRecipe(ItemStack aInput1, Object aOreDict, int aAmount, FluidStack aFluidInput, - ItemStack aOutput1, int aDuration, int aEUt) { + ItemStack aOutput1, int aDuration, int aEUt) { for (ItemStack tStack : GT_OreDictUnificator.getOresImmutable(aOreDict)) { if (GT_Utility.isStackValid(tStack)) addAssemblerRecipe( - aInput1, - GT_Utility.copyAmount(aAmount, tStack), - aFluidInput, - aOutput1, - aDuration, - aEUt); + aInput1, + GT_Utility.copyAmount(aAmount, tStack), + aFluidInput, + aOutput1, + aDuration, + aEUt); } return true; } @Override public boolean addAssemblerRecipe(ItemStack[] aInputs, Object aOreDict, int aAmount, FluidStack aFluidInput, - ItemStack aOutput1, int aDuration, int aEUt) { + ItemStack aOutput1, int aDuration, int aEUt) { for (ItemStack tStack : GT_OreDictUnificator.getOresImmutable(aOreDict)) { if (GT_Utility.isStackValid(tStack)) { ItemStack[] extendedInputs = new ItemStack[aInputs.length + 1]; @@ -961,45 +942,45 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, - int aEUt) { + int aEUt) { return addAssemblerRecipe( - new ItemStack[] { aInput1, aInput2 == null ? aInput1 : aInput2 }, - null, - aOutput1, - aDuration, - aEUt, - false); + new ItemStack[] { aInput1, aInput2 == null ? aInput1 : aInput2 }, + null, + aOutput1, + aDuration, + aEUt, + false); } @Override public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack aOutput1, - int aDuration, int aEUt) { + int aDuration, int aEUt) { return addAssemblerRecipe(new ItemStack[] { aInput1, aInput2 }, aFluidInput, aOutput1, aDuration, aEUt); } @Override public boolean addAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, - int aEUt) { + int aEUt) { return addAssemblerRecipe(aInputs, aFluidInput, aOutput1, aDuration, aEUt, false); } @Override public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack aOutput1, - int aDuration, int aEUt, boolean aCleanroom) { + int aDuration, int aEUt, boolean aCleanroom) { if (aInput2 == null) return addAssemblerRecipe(new ItemStack[] { aInput1 }, aFluidInput, aOutput1, aDuration, aEUt, aCleanroom); return addAssemblerRecipe( - new ItemStack[] { aInput1, aInput2 }, - aFluidInput, - aOutput1, - aDuration, - aEUt, - aCleanroom); + new ItemStack[] { aInput1, aInput2 }, + aFluidInput, + aOutput1, + aDuration, + aEUt, + aCleanroom); } @Override public boolean addAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, - int aEUt, boolean aCleanroom) { + int aEUt, boolean aCleanroom) { if (areItemsAndFluidsBothNull(aInputs, new FluidStack[] { aFluidInput })) { return false; @@ -1019,7 +1000,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { for (int oreID : OreDictionary.getOreIDs(aOutput1)) { if (OreDictionary.getOreName(oreID) - .startsWith("circuit")) { + .startsWith("circuit")) { return this.addAssemblerRecipeNonOD(aInputs, aFluidInput, aOutput1, aDuration, aEUt, aCleanroom); } } @@ -1031,21 +1012,21 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.addRecipe( - true, - aInputs, - new ItemStack[] { aOutput1 }, - null, - new FluidStack[] { aFluidInput }, - null, - aDuration, - aEUt, - aCleanroom ? -200 : 0); + true, + aInputs, + new ItemStack[] { aOutput1 }, + null, + new FluidStack[] { aFluidInput }, + null, + aDuration, + aEUt, + aCleanroom ? -200 : 0); return true; } public boolean addAssemblerRecipeNonOD(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, - int aDuration, int aEUt, boolean aCleanroom) { + int aDuration, int aEUt, boolean aCleanroom) { if (areItemsAndFluidsBothNull(aInputs, new FluidStack[] { aFluidInput })) { return false; } @@ -1063,15 +1044,15 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.addRecipe( - true, - aInputs, - new ItemStack[] { aOutput1 }, - null, - new FluidStack[] { aFluidInput }, - null, - aDuration, - aEUt, - aCleanroom ? -200 : 0); + true, + aInputs, + new ItemStack[] { aOutput1 }, + null, + new FluidStack[] { aFluidInput }, + null, + aDuration, + aEUt, + aCleanroom ? -200 : 0); return true; } @@ -1084,15 +1065,15 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sWiremillRecipes.addRecipe( - true, - new ItemStack[] { aInput }, - new ItemStack[] { aOutput }, - null, - null, - null, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput }, + null, + null, + null, + aDuration, + aEUt, + 0); return true; } @@ -1105,15 +1086,15 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sWiremillRecipes.addRecipe( - true, - new ItemStack[] { aInput, aCircuit }, - new ItemStack[] { aOutput }, - null, - null, - null, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aInput, aCircuit }, + new ItemStack[] { aOutput }, + null, + null, + null, + aDuration, + aEUt, + 0); return true; } @@ -1126,15 +1107,15 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sPolarizerRecipes.addRecipe( - true, - new ItemStack[] { aInput }, - new ItemStack[] { aOutput }, - null, - null, - null, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput }, + null, + null, + null, + aDuration, + aEUt, + 0); return true; } @@ -1159,15 +1140,15 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe tRecipe = new GT_Recipe( - new ItemStack[] { aInput1, aCircuit }, - new ItemStack[] { aOutput1 }, - null, - null, - null, - null, - aDuration, - Math.max(aEUt, 1), - 0); + new ItemStack[] { aInput1, aCircuit }, + new ItemStack[] { aOutput1 }, + null, + null, + null, + null, + aDuration, + Math.max(aEUt, 1), + 0); GT_Recipe.GT_Recipe_Map.sBenderRecipes.addRecipe(tRecipe); return true; } @@ -1181,15 +1162,15 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sExtruderRecipes.addRecipe( - true, - new ItemStack[] { aInput, aShape }, - new ItemStack[] { aOutput }, - null, - null, - null, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aInput, aShape }, + new ItemStack[] { aOutput }, + null, + null, + null, + aDuration, + aEUt, + 0); return true; } @@ -1202,62 +1183,62 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sSlicerRecipes.addRecipe( - true, - new ItemStack[] { aInput, aShape }, - new ItemStack[] { aOutput }, - null, - null, - null, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aInput, aShape }, + new ItemStack[] { aOutput }, + null, + null, + null, + aDuration, + aEUt, + 0); return true; } @Override public boolean addOreWasherRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, - FluidStack aFluidInput, int aDuration, int aEUt) { + FluidStack aFluidInput, int aDuration, int aEUt) { if ((aInput == null) || (aFluidInput == null) - || ((aOutput1 == null) || (aOutput2 == null) || (aOutput3 == null))) { + || ((aOutput1 == null) || (aOutput2 == null) || (aOutput3 == null))) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("orewasher", aInput, aDuration)) <= 0) { return false; } GT_Recipe.GT_Recipe_Map.sOreWasherRecipes.addRecipe( - true, - new ItemStack[] { aInput }, - new ItemStack[] { aOutput1, aOutput2, aOutput3 }, - null, - new FluidStack[] { aFluidInput }, - null, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput1, aOutput2, aOutput3 }, + null, + new FluidStack[] { aFluidInput }, + null, + aDuration, + aEUt, + 0); return true; } @Override public boolean addOreWasherRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, - FluidStack aFluidInput, int[] aChances, int aDuration, int aEUt) { + FluidStack aFluidInput, int[] aChances, int aDuration, int aEUt) { if ((aInput == null) || (aFluidInput == null) - || ((aOutput1 == null) || (aOutput2 == null) || (aOutput3 == null))) { + || ((aOutput1 == null) || (aOutput2 == null) || (aOutput3 == null))) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("orewasher", aInput, aDuration)) <= 0) { return false; } GT_Recipe.GT_Recipe_Map.sOreWasherRecipes.addRecipe( - true, - new ItemStack[] { aInput }, - new ItemStack[] { aOutput1, aOutput2, aOutput3 }, - null, - aChances, - new FluidStack[] { aFluidInput }, - null, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput1, aOutput2, aOutput3 }, + null, + aChances, + new FluidStack[] { aFluidInput }, + null, + aDuration, + aEUt, + 0); return true; } @@ -1277,33 +1258,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { // new GT_Recipe(aInput1, aInput2, aOutput1, aOutput2); if (tGunpowder < 65) { GT_Recipe.GT_Recipe_Map.sImplosionRecipes.addRecipe( - true, - new ItemStack[] { aInput1, ItemList.Block_Powderbarrel.get(tGunpowder) }, - new ItemStack[] { aOutput1, aOutput2 }, - null, - null, - null, - null, - 20, - 30, - 0); - } - if (tDynamite < 17) { - GT_Recipe.GT_Recipe_Map.sImplosionRecipes.addRecipe( - true, - new ItemStack[] { aInput1, GT_ModHandler.getIC2Item("dynamite", tDynamite, null) }, - new ItemStack[] { aOutput1, aOutput2 }, - null, - null, - null, - null, - 20, - 30, - 0); - } - GT_Recipe.GT_Recipe_Map.sImplosionRecipes.addRecipe( true, - new ItemStack[] { aInput1, new ItemStack(Blocks.tnt, tTNT) }, + new ItemStack[] { aInput1, ItemList.Block_Powderbarrel.get(tGunpowder) }, new ItemStack[] { aOutput1, aOutput2 }, null, null, @@ -1312,9 +1268,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { 20, 30, 0); - GT_Recipe.GT_Recipe_Map.sImplosionRecipes.addRecipe( + } + if (tDynamite < 17) { + GT_Recipe.GT_Recipe_Map.sImplosionRecipes.addRecipe( true, - new ItemStack[] { aInput1, GT_ModHandler.getIC2Item("industrialTnt", tITNT, null) }, + new ItemStack[] { aInput1, GT_ModHandler.getIC2Item("dynamite", tDynamite, null) }, new ItemStack[] { aOutput1, aOutput2 }, null, null, @@ -1323,6 +1281,29 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { 20, 30, 0); + } + GT_Recipe.GT_Recipe_Map.sImplosionRecipes.addRecipe( + true, + new ItemStack[] { aInput1, new ItemStack(Blocks.tnt, tTNT) }, + new ItemStack[] { aOutput1, aOutput2 }, + null, + null, + null, + null, + 20, + 30, + 0); + GT_Recipe.GT_Recipe_Map.sImplosionRecipes.addRecipe( + true, + new ItemStack[] { aInput1, GT_ModHandler.getIC2Item("industrialTnt", tITNT, null) }, + new ItemStack[] { aOutput1, aOutput2 }, + null, + null, + null, + null, + 20, + 30, + 0); return true; } @@ -1330,13 +1311,13 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override @Deprecated public boolean addDistillationRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, - ItemStack aOutput3, ItemStack aOutput4, int aDuration, int aEUt) { + ItemStack aOutput3, ItemStack aOutput4, int aDuration, int aEUt) { return false; } @Override public boolean addUniversalDistillationRecipe(FluidStack aInput, FluidStack[] aOutputs, ItemStack aOutput2, - int aDuration, int aEUt) { + int aDuration, int aEUt) { for (int i = 0; i < Math.min(aOutputs.length, 11); i++) { addDistilleryRecipe(i + 1, aInput, aOutputs[i], aOutput2, aDuration * 2, aEUt / 4, false); } @@ -1346,7 +1327,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override public boolean addDistillationTowerRecipe(FluidStack aInput, FluidStack[] aOutputs, ItemStack aOutput2, - int aDuration, int aEUt) { + int aDuration, int aEUt) { if (aInput == null || aOutputs == null || aOutputs.length < 1 || aOutputs.length > 11) { return false; } @@ -1354,21 +1335,21 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sDistillationRecipes.addRecipe( - false, - null, - new ItemStack[] { aOutput2 }, - null, - new FluidStack[] { aInput }, - aOutputs, - aDuration, - Math.max(1, aEUt), - 0); + false, + null, + new ItemStack[] { aOutput2 }, + null, + new FluidStack[] { aInput }, + aOutputs, + aDuration, + Math.max(1, aEUt), + 0); return false; } @Override public boolean addDistillationTowerRecipe(FluidStack aInput, ItemStack[] aCircuit, FluidStack[] aOutputs, - ItemStack aOutput2, int aDuration, int aEUt) { + ItemStack aOutput2, int aDuration, int aEUt) { if (aInput == null || aOutputs == null || aOutputs.length < 1 || aOutputs.length > 11) { return false; } @@ -1376,21 +1357,21 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sDistillationRecipes.addRecipe( - false, - aCircuit, - new ItemStack[] { aOutput2 }, - null, - new FluidStack[] { aInput }, - aOutputs, - aDuration, - Math.max(1, aEUt), - 0); + false, + aCircuit, + new ItemStack[] { aOutput2 }, + null, + new FluidStack[] { aInput }, + aOutputs, + aDuration, + Math.max(1, aEUt), + 0); return false; } @Override public boolean addUniversalDistillationRecipewithCircuit(FluidStack aInput, ItemStack[] aCircuit, - FluidStack[] aOutputs, ItemStack aOutput2, int aDuration, int aEUt) { + FluidStack[] aOutputs, ItemStack aOutput2, int aDuration, int aEUt) { for (int i = 0; i < Math.min(aOutputs.length, 11); i++) { addDistilleryRecipe(i + 1, aInput, aOutputs[i], aOutput2, aDuration * 2, aEUt / 4, false); } @@ -1443,24 +1424,24 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override public boolean addVacuumFreezerRecipe(ItemStack[] aItemInput, FluidStack[] aFluidInput, ItemStack[] aItemOutput, - FluidStack[] aFluidOutput, int aDuration, int aEUt) { + FluidStack[] aFluidOutput, int aDuration, int aEUt) { GT_Recipe.GT_Recipe_Map.sVacuumRecipes.addRecipe( - false, - aItemInput, - aItemOutput, - null, - aFluidInput, - aFluidOutput, - Math.max(1, aDuration), - Math.max(1, aEUt), - 0); + false, + aItemInput, + aItemOutput, + null, + aFluidInput, + aFluidOutput, + Math.max(1, aDuration), + Math.max(1, aEUt), + 0); return true; } @Override @Deprecated public boolean addGrinderRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, - ItemStack aOutput3, ItemStack aOutput4) { + ItemStack aOutput3, ItemStack aOutput4) { return false; } @@ -1490,7 +1471,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override public boolean addChemicalBathRecipe(ItemStack aInput, FluidStack aBathingFluid, ItemStack aOutput1, - ItemStack aOutput2, ItemStack aOutput3, FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt) { + ItemStack aOutput2, ItemStack aOutput3, FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt) { return false; } @@ -1503,38 +1484,38 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sHammerRecipes.addRecipe( - true, - new ItemStack[] { aInput1 }, - new ItemStack[] { aOutput1 }, - null, - null, - null, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aInput1 }, + new ItemStack[] { aOutput1 }, + null, + null, + null, + aDuration, + aEUt, + 0); return true; } @Override public boolean addForgeHammerRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, - ItemStack[] ItemOutputArray, FluidStack[] FluidOutputArray, int aDuration, int aEUt) { + ItemStack[] ItemOutputArray, FluidStack[] FluidOutputArray, int aDuration, int aEUt) { GT_Recipe.GT_Recipe_Map.sHammerRecipes.addRecipe( - true, - ItemInputArray, - ItemOutputArray, - null, - FluidInputArray, - FluidOutputArray, - aDuration, - aEUt, - 0); + true, + ItemInputArray, + ItemOutputArray, + null, + FluidInputArray, + FluidOutputArray, + aDuration, + aEUt, + 0); return true; } @Override public boolean addBoxingRecipe(ItemStack aContainedItem, ItemStack aEmptyBox, ItemStack aFullBox, int aDuration, - int aEUt) { + int aEUt) { if ((aContainedItem == null) || (aFullBox == null)) { return false; } @@ -1542,21 +1523,21 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.addRecipe( - true, - new ItemStack[] { aContainedItem, aEmptyBox }, - new ItemStack[] { aFullBox }, - null, - null, - null, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aContainedItem, aEmptyBox }, + new ItemStack[] { aFullBox }, + null, + null, + null, + aDuration, + aEUt, + 0); return true; } @Override public boolean addUnboxingRecipe(ItemStack aFullBox, ItemStack aContainedItem, ItemStack aEmptyBox, int aDuration, - int aEUt) { + int aEUt) { if ((aFullBox == null) || (aContainedItem == null)) { return false; } @@ -1564,21 +1545,21 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes.addRecipe( - true, - new ItemStack[] { aFullBox }, - new ItemStack[] { aContainedItem, aEmptyBox }, - null, - null, - null, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aFullBox }, + new ItemStack[] { aContainedItem, aEmptyBox }, + null, + null, + null, + aDuration, + aEUt, + 0); return true; } @Override public boolean addThermalCentrifugeRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, - ItemStack aOutput3, int aDuration, int aEUt) { + ItemStack aOutput3, int aDuration, int aEUt) { if ((aInput == null) || (aOutput1 == null)) { return false; } @@ -1586,21 +1567,21 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes.addRecipe( - true, - new ItemStack[] { aInput }, - new ItemStack[] { aOutput1, aOutput2, aOutput3 }, - null, - null, - null, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput1, aOutput2, aOutput3 }, + null, + null, + null, + aDuration, + aEUt, + 0); return true; } @Override public boolean addThermalCentrifugeRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, - ItemStack aOutput3, int[] aChances, int aDuration, int aEUt) { + ItemStack aOutput3, int[] aChances, int aDuration, int aEUt) { if ((aInput == null) || (aOutput1 == null)) { return false; } @@ -1608,16 +1589,16 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes.addRecipe( - true, - new ItemStack[] { aInput }, - new ItemStack[] { aOutput1, aOutput2, aOutput3 }, - null, - aChances, - null, - null, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput1, aOutput2, aOutput3 }, + null, + aChances, + null, + null, + aDuration, + aEUt, + 0); return true; } @@ -1630,21 +1611,21 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sAmplifiers.addRecipe( - true, - new ItemStack[] { aAmplifierItem }, - null, - null, - null, - new FluidStack[] { Materials.UUAmplifier.getFluid(aAmplifierAmountOutputted) }, - aDuration, - 30, - 0); + true, + new ItemStack[] { aAmplifierItem }, + null, + null, + null, + new FluidStack[] { Materials.UUAmplifier.getFluid(aAmplifierAmountOutputted) }, + aDuration, + 30, + 0); return true; } @Override public boolean addBrewingRecipe(ItemStack aIngredient, Fluid aInput, Fluid aOutput, int aDuration, int aEUt, - boolean aHidden) { + boolean aHidden) { if ((aIngredient == null) || (aInput == null) || (aOutput == null)) { return false; } @@ -1652,15 +1633,15 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBrewingRecipes.addRecipe( - false, - new ItemStack[] { aIngredient }, - null, - null, - new FluidStack[] { new FluidStack(aInput, 750) }, - new FluidStack[] { new FluidStack(aOutput, 750) }, - aDuration, - aEUt, - 0); + false, + new ItemStack[] { aIngredient }, + null, + null, + new FluidStack[] { new FluidStack(aInput, 750) }, + new FluidStack[] { new FluidStack(aOutput, 750) }, + aDuration, + aEUt, + 0); if ((aHidden) && (tRecipe != null)) { tRecipe.mHidden = true; } @@ -1674,7 +1655,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override public boolean addBrewingRecipeCustom(ItemStack aIngredient, FluidStack aInput, FluidStack aOutput, int aDuration, - int aEUt, boolean aHidden) { + int aEUt, boolean aHidden) { if ((aInput == null) || (aOutput == null)) { return false; } @@ -1682,15 +1663,15 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBrewingRecipes.addRecipe( - false, - new ItemStack[] { aIngredient }, - null, - null, - new FluidStack[] { aInput }, - new FluidStack[] { aOutput }, - aDuration, - aEUt, - 0); + false, + new ItemStack[] { aIngredient }, + null, + null, + new FluidStack[] { aInput }, + new FluidStack[] { aOutput }, + aDuration, + aEUt, + 0); if ((aHidden) && (tRecipe != null)) { tRecipe.mHidden = true; } @@ -1699,27 +1680,27 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override public boolean addFermentingRecipe(FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, - boolean aHidden) { + boolean aHidden) { if ((aInput == null) || (aOutput == null)) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get( - "fermenting", - aOutput.getFluid() - .getUnlocalizedName(), - aDuration)) <= 0) { + "fermenting", + aOutput.getFluid() + .getUnlocalizedName(), + aDuration)) <= 0) { return false; } GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sFermentingRecipes.addRecipe( - false, - null, - null, - null, - new FluidStack[] { aInput }, - new FluidStack[] { aOutput }, - aDuration, - aEUt, - 0); + false, + null, + null, + null, + new FluidStack[] { aInput }, + new FluidStack[] { aOutput }, + aDuration, + aEUt, + 0); if ((aHidden) && (tRecipe != null)) { tRecipe.mHidden = true; } @@ -1733,15 +1714,15 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override public boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, - ItemStack aSolidOutput, int aDuration, int aEUt, boolean aHidden) { + ItemStack aSolidOutput, int aDuration, int aEUt, boolean aHidden) { if ((aInput == null) || (aOutput == null)) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get( - "distillery", - aOutput.getFluid() - .getUnlocalizedName(), - aDuration)) <= 0) { + "distillery", + aOutput.getFluid() + .getUnlocalizedName(), + aDuration)) <= 0) { return false; } // reduce the batch size if fluid amount is exceeding @@ -1766,10 +1747,9 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if (aSolidOutput != null) { ItemData tData = GT_OreDictUnificator.getItemData(aSolidOutput); if (tData != null && (tData.mPrefix == OrePrefixes.dust - || OrePrefixes.dust.mFamiliarPrefixes.contains(tData.mPrefix))) { - aSolidOutput = GT_OreDictUnificator.getDust( - tData.mMaterial.mMaterial, - tData.mMaterial.mAmount * aSolidOutput.stackSize / tScale); + || OrePrefixes.dust.mFamiliarPrefixes.contains(tData.mPrefix))) { + aSolidOutput = GT_OreDictUnificator + .getDust(tData.mMaterial.mMaterial, tData.mMaterial.mAmount * aSolidOutput.stackSize / tScale); } else { if (aSolidOutput.stackSize / tScale == 0) aSolidOutput = GT_Values.NI; else aSolidOutput = new ItemStack(aSolidOutput.getItem(), aSolidOutput.stackSize / tScale); @@ -1779,15 +1759,15 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sDistilleryRecipes.addRecipe( - true, - new ItemStack[] { aCircuit }, - new ItemStack[] { aSolidOutput }, - null, - new FluidStack[] { aInput }, - new FluidStack[] { aOutput }, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aCircuit }, + new ItemStack[] { aSolidOutput }, + null, + new FluidStack[] { aInput }, + new FluidStack[] { aOutput }, + aDuration, + aEUt, + 0); if ((aHidden) && (tRecipe != null)) { tRecipe.mHidden = true; } @@ -1796,55 +1776,47 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override public boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, - int aEUt, boolean aHidden) { + int aEUt, boolean aHidden) { return addDistilleryRecipe(aCircuit, aInput, aOutput, null, aDuration, aEUt, aHidden); } @Override public boolean addDistilleryRecipe(int circuitConfig, FluidStack aInput, FluidStack aOutput, ItemStack aSolidOutput, - int aDuration, int aEUt, boolean aHidden) { + int aDuration, int aEUt, boolean aHidden) { return addDistilleryRecipe( - GT_Utility.getIntegratedCircuit(circuitConfig), - aInput, - aOutput, - aSolidOutput, - aDuration, - aEUt, - aHidden); + GT_Utility.getIntegratedCircuit(circuitConfig), + aInput, + aOutput, + aSolidOutput, + aDuration, + aEUt, + aHidden); } @Override public boolean addDistilleryRecipe(int circuitConfig, FluidStack aInput, FluidStack aOutput, int aDuration, - int aEUt, boolean aHidden) { + int aEUt, boolean aHidden) { return addDistilleryRecipe( - GT_Utility.getIntegratedCircuit(circuitConfig), - aInput, - aOutput, - aDuration, - aEUt, - aHidden); + GT_Utility.getIntegratedCircuit(circuitConfig), + aInput, + aOutput, + aDuration, + aEUt, + aHidden); } @Override public boolean addFluidSolidifierRecipe(final ItemStack[] itemInputs, final FluidStack[] fluidInputs, - final ItemStack[] itemOutputs, final FluidStack[] fluidOutputs, final int EUPerTick, - final int aDurationInTicks) { - GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes.addRecipe( - true, - itemInputs, - itemOutputs, - null, - fluidInputs, - fluidOutputs, - aDurationInTicks, - EUPerTick, - 0); + final ItemStack[] itemOutputs, final FluidStack[] fluidOutputs, final int EUPerTick, + final int aDurationInTicks) { + GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes + .addRecipe(true, itemInputs, itemOutputs, null, fluidInputs, fluidOutputs, aDurationInTicks, EUPerTick, 0); return true; } @Override public boolean addFluidSolidifierRecipe(ItemStack aMold, FluidStack aInput, ItemStack aOutput, int aDuration, - int aEUt) { + int aEUt) { if ((aMold == null) || (aInput == null) || (aOutput == null)) { return false; } @@ -1858,27 +1830,27 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes.addRecipe( - true, - new ItemStack[] { aMold }, - new ItemStack[] { aOutput }, - null, - new FluidStack[] { aInput }, - null, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aMold }, + new ItemStack[] { aOutput }, + null, + new FluidStack[] { aInput }, + null, + aDuration, + aEUt, + 0); return true; } @Override public boolean addFluidSmelterRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, - int aDuration, int aEUt) { + int aDuration, int aEUt) { return addFluidSmelterRecipe(aInput, aRemains, aOutput, aChance, aDuration, aEUt, false); } @Override public boolean addFluidSmelterRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, - int aDuration, int aEUt, boolean hidden) { + int aDuration, int aEUt, boolean hidden) { if ((aInput == null) || (aOutput == null)) { return false; } @@ -1892,16 +1864,16 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes.addRecipe( - true, - new ItemStack[] { aInput }, - new ItemStack[] { aRemains }, - null, - new int[] { aChance }, - null, - new FluidStack[] { aOutput }, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aInput }, + new ItemStack[] { aRemains }, + null, + new int[] { aChance }, + null, + new FluidStack[] { aOutput }, + aDuration, + aEUt, + 0); if ((hidden) && (tRecipe != null)) { tRecipe.mHidden = true; } @@ -1910,7 +1882,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override public boolean addFluidExtractionRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, - int aDuration, int aEUt) { + int aDuration, int aEUt) { if ((aInput == null) || (aOutput == null)) { return false; } @@ -1924,22 +1896,22 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes.addRecipe( - true, - new ItemStack[] { aInput }, - new ItemStack[] { aRemains }, - null, - new int[] { aChance }, - null, - new FluidStack[] { aOutput }, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aInput }, + new ItemStack[] { aRemains }, + null, + new int[] { aChance }, + null, + new FluidStack[] { aOutput }, + aDuration, + aEUt, + 0); return true; } @Override public boolean addFluidCannerRecipe(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, - FluidStack aFluidOutput) { + FluidStack aFluidOutput) { int aDuration = aFluidOutput == null ? aFluidInput.amount / 62 : aFluidOutput.amount / 62; if (aInput == null || aOutput == null) { @@ -1952,21 +1924,21 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe( - true, - new ItemStack[] { aInput }, - new ItemStack[] { aOutput }, - null, - new FluidStack[] { aFluidInput }, - new FluidStack[] { aFluidOutput }, - aDuration, - 1, - 0); + true, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput }, + null, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, + aDuration, + 1, + 0); return true; } @Override public boolean addFluidCannerRecipe(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, - FluidStack aFluidOutput, int aDuration, int aEUt) { + FluidStack aFluidOutput, int aDuration, int aEUt) { if (aInput == null || aOutput == null) { return false; } @@ -1977,44 +1949,44 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe( - true, - new ItemStack[] { aInput }, - new ItemStack[] { aOutput }, - null, - new FluidStack[] { aFluidInput }, - new FluidStack[] { aFluidOutput }, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput }, + null, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, + aDuration, + aEUt, + 0); return true; } @Override public boolean addChemicalBathRecipe(ItemStack aInput, FluidStack aBathingFluid, ItemStack aOutput1, - ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt) { + ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt) { if ((aInput == null) || (aBathingFluid == null) || (aOutput1 == null)) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("chemicalbath", aInput, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes.addRecipe( - true, - new ItemStack[] { aInput }, - new ItemStack[] { aOutput1, aOutput2, aOutput3 }, - null, - aChances, - new FluidStack[] { aBathingFluid }, - null, - aDuration, - aEUt, - 0); + GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes.addRecipe( + true, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput1, aOutput2, aOutput3 }, + null, + aChances, + new FluidStack[] { aBathingFluid }, + null, + aDuration, + aEUt, + 0); return true; } @Override public boolean addChemicalBathRecipe(ItemStack aInput, FluidStack aBathingFluid, FluidStack aFluidOutput, - ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt) { + ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt) { if ((aInput == null) || (aBathingFluid == null) || (aOutput1 == null)) { return false; } @@ -2022,22 +1994,22 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes.addRecipe( - true, - new ItemStack[] { aInput }, - new ItemStack[] { aOutput1, aOutput2, aOutput3 }, - null, - aChances, - new FluidStack[] { aBathingFluid }, - new FluidStack[] { aFluidOutput }, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput1, aOutput2, aOutput3 }, + null, + aChances, + new FluidStack[] { aBathingFluid }, + new FluidStack[] { aFluidOutput }, + aDuration, + aEUt, + 0); return true; } @Override public boolean addElectromagneticSeparatorRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, - ItemStack aOutput3, int[] aChances, int aDuration, int aEUt) { + ItemStack aOutput3, int[] aChances, int aDuration, int aEUt) { if ((aInput == null) || (aOutput1 == null)) { return false; } @@ -2045,16 +2017,16 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sElectroMagneticSeparatorRecipes.addRecipe( - true, - new ItemStack[] { aInput }, - new ItemStack[] { aOutput1, aOutput2, aOutput3 }, - null, - aChances, - null, - null, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput1, aOutput2, aOutput3 }, + null, + aChances, + null, + null, + aDuration, + aEUt, + 0); return true; } @@ -2067,21 +2039,21 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sExtractorRecipes.addRecipe( - true, - new ItemStack[] { aInput }, - new ItemStack[] { aOutput }, - null, - null, - null, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput }, + null, + null, + null, + aDuration, + aEUt, + 0); return true; } @Override public boolean addPrinterRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aSpecialSlot, ItemStack aOutput, - int aDuration, int aEUt) { + int aDuration, int aEUt) { if ((aInput == null) || (aFluid == null) || (aOutput == null)) { return false; } @@ -2089,45 +2061,45 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sPrinterRecipes.addRecipe( - true, - new ItemStack[] { aInput }, - new ItemStack[] { aOutput }, - aSpecialSlot, - null, - new FluidStack[] { aFluid }, - null, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aInput }, + new ItemStack[] { aOutput }, + aSpecialSlot, + null, + new FluidStack[] { aFluid }, + null, + aDuration, + aEUt, + 0); return true; } @Override public boolean addAutoclaveRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, - int aDuration, int aEUt, boolean aCleanroom) { + int aDuration, int aEUt, boolean aCleanroom) { return addAutoclaveRecipe(aInput, aFluid, aOutput, aChance, aDuration, aEUt); } @Override public boolean addAutoclaveRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, - int aDuration, int aEUt) { + int aDuration, int aEUt) { return addAutoclaveRecipe(aInput, null, aFluid, aOutput, aChance, aDuration, aEUt, false); } public boolean addAutoclaveRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluid, ItemStack aOutput, - int aChance, int aDuration, int aEUt) { + int aChance, int aDuration, int aEUt) { return addAutoclaveRecipe(aInput, aCircuit, aFluid, aOutput, aChance, aDuration, aEUt, false); } @Override public boolean addAutoclaveRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluidIn, ItemStack aOutput, - int aChance, int aDuration, int aEUt, boolean aCleanroom) { + int aChance, int aDuration, int aEUt, boolean aCleanroom) { return addAutoclaveRecipe(aInput, aCircuit, aFluidIn, null, aOutput, aChance, aDuration, aEUt, aCleanroom); } @Override public boolean addAutoclaveRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluidIn, FluidStack aFluidOut, - ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom) { + ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom) { if ((aInput == null) || (aFluidIn == null) || (aOutput == null)) { return false; } @@ -2138,28 +2110,28 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { aCleanroom = false; } GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.addRecipe( - true, - new ItemStack[] { aInput, aCircuit }, - new ItemStack[] { aOutput }, - null, - new int[] { aChance }, - new FluidStack[] { aFluidIn }, - new FluidStack[] { aFluidOut }, - aDuration, - aEUt, - aCleanroom ? -200 : 0); + true, + new ItemStack[] { aInput, aCircuit }, + new ItemStack[] { aOutput }, + null, + new int[] { aChance }, + new FluidStack[] { aFluidIn }, + new FluidStack[] { aFluidOut }, + aDuration, + aEUt, + aCleanroom ? -200 : 0); return true; } @Override public boolean addAutoclaveSpaceRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, - int aDuration, int aEUt, boolean aCleanroom) { + int aDuration, int aEUt, boolean aCleanroom) { return addAutoclaveRecipe(aInput, aFluid, aOutput, aChance, aDuration, aEUt, aCleanroom); } @Override public boolean addAutoclaveSpaceRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluid, ItemStack aOutput, - int aChance, int aDuration, int aEUt, boolean aCleanroom) { + int aChance, int aDuration, int aEUt, boolean aCleanroom) { if ((aInput == null) || (aFluid == null) || (aOutput == null)) { return false; } @@ -2170,22 +2142,22 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { aCleanroom = false; } GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.addRecipe( - true, - new ItemStack[] { aInput, aCircuit }, - new ItemStack[] { aOutput }, - null, - new int[] { aChance }, - new FluidStack[] { aFluid }, - null, - aDuration, - aEUt, - aCleanroom ? -100 : 0); + true, + new ItemStack[] { aInput, aCircuit }, + new ItemStack[] { aOutput }, + null, + new int[] { aChance }, + new FluidStack[] { aFluid }, + null, + aDuration, + aEUt, + aCleanroom ? -100 : 0); return true; } @Override public boolean addAutoclave4Recipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluidIn, FluidStack aFluidOut, - ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean aCleanroom) { + ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean aCleanroom) { if ((aInput == null) || (aFluidIn == null) || (aOutputs == null)) { return false; } @@ -2196,67 +2168,67 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { aCleanroom = false; } GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.addRecipe( - true, - new ItemStack[] { aInput, aCircuit }, - aOutputs, - null, - aChances, - new FluidStack[] { aFluidIn }, - new FluidStack[] { aFluidOut }, - aDuration, - aEUt, - aCleanroom ? -200 : 0); + true, + new ItemStack[] { aInput, aCircuit }, + aOutputs, + null, + aChances, + new FluidStack[] { aFluidIn }, + new FluidStack[] { aFluidOut }, + aDuration, + aEUt, + aCleanroom ? -200 : 0); return true; } @Deprecated @Override public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, - FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt) { + FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt) { return addMixerRecipe( - aInput1, - aInput2, - aInput3, - aInput4, - null, - null, - null, - null, - null, - aFluidInput, - aFluidOutput, - aOutput, - aDuration, - aEUt); + aInput1, + aInput2, + aInput3, + aInput4, + null, + null, + null, + null, + null, + aFluidInput, + aFluidOutput, + aOutput, + aDuration, + aEUt); } @Deprecated @Override public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, - ItemStack aInput5, ItemStack aInput6, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, - int aDuration, int aEUt) { + ItemStack aInput5, ItemStack aInput6, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, + int aDuration, int aEUt) { return addMixerRecipe( - aInput1, - aInput2, - aInput3, - aInput4, - aInput5, - aInput6, - null, - null, - null, - aFluidInput, - aFluidOutput, - aOutput, - aDuration, - aEUt); + aInput1, + aInput2, + aInput3, + aInput4, + aInput5, + aInput6, + null, + null, + null, + aFluidInput, + aFluidOutput, + aOutput, + aDuration, + aEUt); } @Deprecated @Override public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, - ItemStack aInput5, ItemStack aInput6, ItemStack aInput7, ItemStack aInput8, ItemStack aInput9, - FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt) { + ItemStack aInput5, ItemStack aInput6, ItemStack aInput7, ItemStack aInput8, ItemStack aInput9, + FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt) { if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput == null) && (aFluidOutput == null))) { return false; } @@ -2264,23 +2236,23 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get( - "mixer", - aFluidOutput.getFluid() - .getName(), - aDuration)) <= 0)) { + "mixer", + aFluidOutput.getFluid() + .getName(), + aDuration)) <= 0)) { return false; } GT_Recipe.GT_Recipe_Map.sMixerRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9 }, - new ItemStack[] { aOutput }, - null, - null, - new FluidStack[] { aFluidInput }, - new FluidStack[] { aFluidOutput }, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9 }, + new ItemStack[] { aOutput }, + null, + null, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, + aDuration, + aEUt, + 0); ItemStack[] itemInputs = { aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9 }; ItemStack[] itemOutputs = { aOutput }; FluidStack[] fluidInputs = { aFluidInput, null, null, null, null, null, null, null, null, null }; @@ -2309,34 +2281,25 @@ 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; } @Override public boolean addMixerRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, ItemStack[] ItemOutputArray, - FluidStack[] FluidOutputArray, int aDuration, int aEUt) { + FluidStack[] FluidOutputArray, int aDuration, int aEUt) { GT_Recipe.GT_Recipe_Map.sMixerRecipes.addRecipe( - false, - ItemInputArray, - ItemOutputArray, - null, - null, - FluidInputArray, - FluidOutputArray, - aDuration, - aEUt, - 0); + false, + ItemInputArray, + ItemOutputArray, + null, + null, + FluidInputArray, + FluidOutputArray, + aDuration, + aEUt, + 0); List tItemInputList; if (ItemInputArray == null) { tItemInputList = new ArrayList<>(1); @@ -2352,7 +2315,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { for (int i = 0; i < tItemInputList.size(); i++) { if (tItemInputList.get(i) != null) { if (GT_Utility.getFluidForFilledItem(tItemInputList.get(i), true) != null - || GT_Utility.isCellEmpty(tItemInputList.get(i))) { + || GT_Utility.isCellEmpty(tItemInputList.get(i))) { tFluidInputList.add(GT_Utility.convertCellToFluid(tItemInputList.get(i))); tItemInputList.set(i, null); } @@ -2373,7 +2336,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { for (int i = 0; i < tItemOutputList.size(); i++) { if (tItemOutputList.get(i) != null) { if (GT_Utility.getFluidForFilledItem(tItemOutputList.get(i), true) != null - || GT_Utility.isCellEmpty(tItemOutputList.get(i))) { + || GT_Utility.isCellEmpty(tItemOutputList.get(i))) { tFluidInputList.add(GT_Utility.convertCellToFluid(tItemOutputList.get(i))); tItemOutputList.set(i, null); } @@ -2393,25 +2356,25 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { for (int i = 0; i < tFluidOutputArray.length; i++) tFluidOutputArray[i] = tFluidOutputList.get(i); GT_Recipe.GT_Recipe_Map.sMultiblockMixerRecipes.addRecipe( - false, - tItemInputArray, - tItemOutputArray, - null, - null, - tFluidInputArray, - tFluidOutputArray, - aDuration, - aEUt, - 0); + false, + tItemInputArray, + tItemOutputArray, + null, + null, + tFluidInputArray, + tFluidOutputArray, + aDuration, + aEUt, + 0); return true; } @Deprecated @Override public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, - ItemStack aInput5, ItemStack aInput6, ItemStack aInput7, ItemStack aInput8, ItemStack aInput9, - FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, - ItemStack aOutput4, int aDuration, int aEUt) { + ItemStack aInput5, ItemStack aInput6, ItemStack aInput7, ItemStack aInput8, ItemStack aInput9, + FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, + ItemStack aOutput4, int aDuration, int aEUt) { if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) { return false; } @@ -2419,23 +2382,23 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get( - "mixer", - aFluidOutput.getFluid() - .getName(), - aDuration)) <= 0)) { + "mixer", + aFluidOutput.getFluid() + .getName(), + aDuration)) <= 0)) { return false; } GT_Recipe.GT_Recipe_Map.sMixerRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9 }, - new ItemStack[] { aOutput1, aOutput2, aOutput3, aOutput4 }, - null, - null, - new FluidStack[] { aFluidInput }, - new FluidStack[] { aFluidOutput }, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9 }, + new ItemStack[] { aOutput1, aOutput2, aOutput3, aOutput4 }, + null, + null, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, + aDuration, + aEUt, + 0); ItemStack[] itemInputs = { aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9 }; ItemStack[] itemOutputs = { aOutput1, aOutput2, aOutput3, aOutput4 }; FluidStack[] fluidInputs = { aFluidInput, null, null, null, null, null, null, null, null, null }; @@ -2464,31 +2427,22 @@ 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; } @Deprecated @Override public boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, - int aDuration, int aEUt) { + int aDuration, int aEUt) { return addLaserEngraverRecipe(aItemToEngrave, aLens, aEngravedItem, aDuration, aEUt, false); } @Deprecated @Override public boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, - int aDuration, int aEUt, boolean aCleanroom) { + int aDuration, int aEUt, boolean aCleanroom) { if ((aItemToEngrave == null) || (aLens == null) || (aEngravedItem == null)) { return false; } @@ -2499,38 +2453,38 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { aCleanroom = false; } GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes.addRecipe( - true, - new ItemStack[] { aItemToEngrave, aLens }, - new ItemStack[] { aEngravedItem }, - null, - null, - null, - aDuration, - aEUt, - aCleanroom ? -200 : 0); + true, + new ItemStack[] { aItemToEngrave, aLens }, + new ItemStack[] { aEngravedItem }, + null, + null, + null, + aDuration, + aEUt, + aCleanroom ? -200 : 0); return true; } @Override public boolean addLaserEngraverRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, - ItemStack[] OutputItemArray, FluidStack[] FluidOutputArray, int aDuration, int aEUt, boolean aCleanroom) { + ItemStack[] OutputItemArray, FluidStack[] FluidOutputArray, int aDuration, int aEUt, boolean aCleanroom) { GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes.addRecipe( - false, - ItemInputArray, - OutputItemArray, - null, - null, - FluidInputArray, - FluidOutputArray, - aDuration, - aEUt, - aCleanroom ? -200 : 0); + false, + ItemInputArray, + OutputItemArray, + null, + null, + FluidInputArray, + FluidOutputArray, + aDuration, + aEUt, + aCleanroom ? -200 : 0); return true; } @Override public boolean addFormingPressRecipe(ItemStack aItemToImprint, ItemStack aForm, ItemStack aImprintedItem, - int aDuration, int aEUt) { + int aDuration, int aEUt) { if ((aItemToImprint == null) || (aForm == null) || (aImprintedItem == null)) { return false; } @@ -2538,34 +2492,26 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sPressRecipes.addRecipe( - true, - new ItemStack[] { aItemToImprint, aForm }, - new ItemStack[] { aImprintedItem }, - null, - null, - null, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aItemToImprint, aForm }, + new ItemStack[] { aImprintedItem }, + null, + null, + null, + aDuration, + aEUt, + 0); return true; } @Override public boolean addFormingPressRecipe(ItemStack[] ItemInputArray, ItemStack[] OutputItemArray, int aDuration, - int aEUt) { + int aEUt) { 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; } @@ -2575,54 +2521,54 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } if ((aDuration = GregTech_API.sRecipeFile.get( - "fluidheater", - aOutput.getFluid() - .getUnlocalizedName(), - aDuration)) <= 0) { + "fluidheater", + aOutput.getFluid() + .getUnlocalizedName(), + aDuration)) <= 0) { return false; } GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes.addRecipe( - true, - new ItemStack[] { aItem }, - null, - null, - null, - new FluidStack[] { aOutput }, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aItem }, + null, + null, + null, + new FluidStack[] { aOutput }, + aDuration, + aEUt, + 0); return true; } @Override public boolean addFluidHeaterRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, - int aEUt) { + int aEUt) { if ((aInput == null) || (aOutput == null)) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get( - "fluidheater", - aOutput.getFluid() - .getUnlocalizedName(), - aDuration)) <= 0) { + "fluidheater", + aOutput.getFluid() + .getUnlocalizedName(), + aDuration)) <= 0) { return false; } GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes.addRecipe( - true, - new ItemStack[] { aCircuit }, - null, - null, - new FluidStack[] { aInput }, - new FluidStack[] { aOutput }, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aCircuit }, + null, + null, + new FluidStack[] { aInput }, + new FluidStack[] { aOutput }, + aDuration, + aEUt, + 0); return true; } @Override public boolean addSifterRecipe(ItemStack aItemToSift, ItemStack[] aSiftedItems, int[] aChances, int aDuration, - int aEUt) { + int aEUt) { if ((aItemToSift == null) || (aSiftedItems == null)) { return false; } @@ -2632,16 +2578,16 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sSifterRecipes.addRecipe( - true, - new ItemStack[] { aItemToSift }, - aSiftedItems, - null, - aChances, - null, - null, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aItemToSift }, + aSiftedItems, + null, + aChances, + null, + null, + aDuration, + aEUt, + 0); return true; } } @@ -2650,31 +2596,31 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override public boolean addSifterRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, - ItemStack[] OutputItemArray, FluidStack[] FluidOutputArray, int[] aChances, int aDuration, int aEUt, - boolean aCleanroom) { + ItemStack[] OutputItemArray, FluidStack[] FluidOutputArray, int[] aChances, int aDuration, int aEUt, + boolean aCleanroom) { GT_Recipe.GT_Recipe_Map.sSifterRecipes.addRecipe( - false, - ItemInputArray, - OutputItemArray, - null, - aChances, - FluidInputArray, - FluidOutputArray, - aDuration, - aEUt, - aCleanroom ? -200 : 0); + false, + ItemInputArray, + OutputItemArray, + null, + aChances, + FluidInputArray, + FluidOutputArray, + aDuration, + aEUt, + aCleanroom ? -200 : 0); return true; } @Override public boolean addArcFurnaceRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, - int aEUt) { + int aEUt) { return addArcFurnaceRecipe(aInput, aOutputs, aChances, aDuration, aEUt, false); } @Override public boolean addArcFurnaceRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, - boolean hidden) { + boolean hidden) { if ((aInput == null) || (aOutputs == null)) { return false; } @@ -2684,16 +2630,16 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe sRecipe = GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes.addRecipe( - true, - new ItemStack[] { aInput }, - aOutputs, - null, - aChances, - new FluidStack[] { Materials.Oxygen.getGas(aDuration) }, - null, - aDuration, - Math.max(1, aEUt), - 0); + true, + new ItemStack[] { aInput }, + aOutputs, + null, + aChances, + new FluidStack[] { Materials.Oxygen.getGas(aDuration) }, + null, + aDuration, + Math.max(1, aEUt), + 0); if ((hidden) && (sRecipe != null)) { sRecipe.mHidden = true; } @@ -2701,16 +2647,16 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if (tMaterial.mPlasma != null) { int tPlasmaAmount = (int) Math.max(1L, aDuration / (tMaterial.getMass() * 16L)); GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes.addRecipe( - true, - new ItemStack[] { aInput }, - aOutputs, - null, - aChances, - new FluidStack[] { tMaterial.getPlasma(tPlasmaAmount) }, - new FluidStack[] { tMaterial.getGas(tPlasmaAmount) }, - Math.max(1, aDuration / 16), - Math.max(1, aEUt / 3), - 0); + true, + new ItemStack[] { aInput }, + aOutputs, + null, + aChances, + new FluidStack[] { tMaterial.getPlasma(tPlasmaAmount) }, + new FluidStack[] { tMaterial.getGas(tPlasmaAmount) }, + Math.max(1, aDuration / 16), + Math.max(1, aEUt / 3), + 0); if ((hidden) && (tRecipe != null)) { tRecipe.mHidden = true; } @@ -2724,7 +2670,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override public boolean addSimpleArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, - int[] aChances, int aDuration, int aEUt) { + int[] aChances, int aDuration, int aEUt) { if ((aInput == null) || (aOutputs == null) || aFluidInput == null) { return false; } @@ -2734,16 +2680,16 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes.addRecipe( - true, - new ItemStack[] { aInput }, - aOutputs, - null, - aChances, - new FluidStack[] { aFluidInput }, - null, - aDuration, - Math.max(1, aEUt), - 0); + true, + new ItemStack[] { aInput }, + aOutputs, + null, + aChances, + new FluidStack[] { aFluidInput }, + null, + aDuration, + Math.max(1, aEUt), + 0); return true; } } @@ -2752,7 +2698,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override public boolean addPlasmaArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, - int[] aChances, int aDuration, int aEUt) { + int[] aChances, int aDuration, int aEUt) { if ((aInput == null) || (aOutputs == null) || aFluidInput == null) { return false; } @@ -2762,16 +2708,16 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes.addRecipe( - true, - new ItemStack[] { aInput }, - aOutputs, - null, - aChances, - new FluidStack[] { aFluidInput }, - null, - aDuration, - Math.max(1, aEUt), - 0); + true, + new ItemStack[] { aInput }, + aOutputs, + null, + aChances, + new FluidStack[] { aFluidInput }, + null, + aDuration, + Math.max(1, aEUt), + 0); return true; } } @@ -2780,7 +2726,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override public boolean addPlasmaArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, - FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt) { + FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt) { if ((aInput == null) || (aOutputs == null) || aFluidInput == null) { return false; } @@ -2790,16 +2736,16 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes.addRecipe( - true, - new ItemStack[] { aInput }, - aOutputs, - null, - aChances, - new FluidStack[] { aFluidInput }, - new FluidStack[] { aFluidOutput }, - aDuration, - Math.max(1, aEUt), - 0); + true, + new ItemStack[] { aInput }, + aOutputs, + null, + aChances, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, + aDuration, + Math.max(1, aEUt), + 0); return true; } } @@ -2808,13 +2754,13 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override public boolean addPulveriserRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, - int aEUt) { + int aEUt) { return addPulveriserRecipe(aInput, aOutputs, aChances, aDuration, aEUt, false); } @Override public boolean addPulveriserRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, - boolean hidden) { + boolean hidden) { if ((aInput == null) || (aOutputs == null)) { return false; } @@ -2824,16 +2770,16 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.addRecipe( - true, - new ItemStack[] { aInput }, - aOutputs, - null, - aChances, - null, - null, - aDuration, - aEUt, - 0); + true, + new ItemStack[] { aInput }, + aOutputs, + null, + aChances, + null, + null, + aDuration, + aEUt, + 0); if ((hidden) && (tRecipe != null)) { tRecipe.mHidden = true; } @@ -2845,7 +2791,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override public boolean addPyrolyseRecipe(ItemStack aInput, FluidStack aFluidInput, int intCircuit, ItemStack aOutput, - FluidStack aFluidOutput, int aDuration, int aEUt) { + FluidStack aFluidOutput, int aDuration, int aEUt) { if (aInput == null) { return false; } @@ -2853,16 +2799,16 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sPyrolyseRecipes.addRecipe( - false, - new ItemStack[] { aInput, ItemList.Circuit_Integrated.getWithDamage(0L, intCircuit) }, - new ItemStack[] { aOutput }, - null, - null, - new FluidStack[] { aFluidInput }, - new FluidStack[] { aFluidOutput }, - aDuration, - aEUt, - 0); + false, + new ItemStack[] { aInput, ItemList.Circuit_Integrated.getWithDamage(0L, intCircuit) }, + new ItemStack[] { aOutput }, + null, + null, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, + aDuration, + aEUt, + 0); return true; } @@ -2874,7 +2820,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override public boolean addCrackingRecipe(int circuitConfig, FluidStack aInput, FluidStack aInput2, FluidStack aOutput, - int aDuration, int aEUt) { + int aDuration, int aEUt) { if ((aInput == null && aInput2 == null) || (aOutput == null)) { return false; } @@ -2882,27 +2828,27 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } GT_Recipe.GT_Recipe_Map.sCrackingRecipes.addRecipe( - false, - new ItemStack[] { GT_Utility.getIntegratedCircuit(circuitConfig) }, - null, - null, - null, - new FluidStack[] { aInput, aInput2 }, - new FluidStack[] { aOutput }, - aDuration, - aEUt, - 0); + false, + new ItemStack[] { GT_Utility.getIntegratedCircuit(circuitConfig) }, + null, + null, + null, + new FluidStack[] { aInput, aInput2 }, + new FluidStack[] { aOutput }, + aDuration, + aEUt, + 0); return true; } @Override public boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, ItemStack[] aInputs, - FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt) { + FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt) { if ((aResearchItem == null) || (aResearchTime <= 0) - || (aInputs == null) - || (aOutput == null) - || aInputs.length > 15 - || aInputs.length < 4) { + || (aInputs == null) + || (aOutput == null) + || aInputs.length > 15 + || aInputs.length < 4) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("assemblingline", aOutput, aDuration)) <= 0) { @@ -2911,41 +2857,41 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { for (ItemStack tItem : aInputs) { if (tItem == null) { GT_FML_LOGGER.info( - "addAssemblingLineRecipe " + aResearchItem.getDisplayName() - + " --> " - + aOutput.getUnlocalizedName() - + " there is some null item in that recipe"); + "addAssemblingLineRecipe " + aResearchItem.getDisplayName() + + " --> " + + aOutput.getUnlocalizedName() + + " there is some null item in that recipe"); } } GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe( - false, - new ItemStack[] { aResearchItem }, - new ItemStack[] { aOutput }, - new ItemStack[] { ItemList.Tool_DataStick.getWithName(1L, "Writes Research result") }, - null, - null, - aResearchTime, - 30, - -201); + false, + new ItemStack[] { aResearchItem }, + new ItemStack[] { aOutput }, + new ItemStack[] { ItemList.Tool_DataStick.getWithName(1L, "Writes Research result") }, + null, + null, + aResearchTime, + 30, + -201); GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.addFakeRecipe( - false, - aInputs, - new ItemStack[] { aOutput }, - new ItemStack[] { ItemList.Tool_DataStick.getWithName(1L, "Reads Research result") }, - aFluidInputs, - null, - aDuration, - aEUt, - 0, - false); + false, + aInputs, + new ItemStack[] { aOutput }, + new ItemStack[] { ItemList.Tool_DataStick.getWithName(1L, "Reads Research result") }, + aFluidInputs, + null, + aDuration, + aEUt, + 0, + false); GT_Recipe_AssemblyLine tRecipe = new GT_Recipe_AssemblyLine( - aResearchItem, - aResearchTime, - aInputs, - aFluidInputs, - aOutput, - aDuration, - aEUt); + aResearchItem, + aResearchTime, + aInputs, + aFluidInputs, + aOutput, + aDuration, + aEUt); GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.add(tRecipe); GT_AssemblyLineUtils.addRecipeToCache(tRecipe); return true; @@ -2953,12 +2899,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override public boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, Object[] aInputs, - FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt) { + FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt) { if ((aResearchItem == null) || (aResearchTime <= 0) - || (aInputs == null) - || (aOutput == null) - || aInputs.length > 15 - || aInputs.length < 4) { + || (aInputs == null) + || (aOutput == null) + || aInputs.length > 15 + || aInputs.length < 4) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("assemblingline", aOutput, aDuration)) <= 0) { @@ -2990,11 +2936,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { try { // sort the output, so the hash code is stable across launches tList.sort( - Comparator.comparing( - s -> GameRegistry.findUniqueIdentifierFor(s.getItem()).modId) - .thenComparing(s -> GameRegistry.findUniqueIdentifierFor(s.getItem()).name) - .thenComparingInt(Items.feather::getDamage) - .thenComparingInt(s -> s.stackSize)); + Comparator + .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 uList = new ArrayList<>(); for (ItemStack tStack : tList) { @@ -3012,10 +2959,10 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } } GT_FML_LOGGER.info( - "addAssemblingLineRecipe " + aResearchItem.getDisplayName() - + " --> " - + aOutput.getUnlocalizedName() - + " there is some null item in that recipe"); + "addAssemblingLineRecipe " + aResearchItem.getDisplayName() + + " --> " + + aOutput.getUnlocalizedName() + + " there is some null item in that recipe"); } tPersistentHash = tPersistentHash * 31 + GT_Utility.persistentHash(aResearchItem, true, false); tPersistentHash = tPersistentHash * 31 + GT_Utility.persistentHash(aOutput, true, false); @@ -3027,36 +2974,36 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { tPersistentHash = tPersistentHash * 31 + aDuration; tPersistentHash = tPersistentHash * 31 + aEUt; GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe( - false, - new ItemStack[] { aResearchItem }, - new ItemStack[] { aOutput }, - new ItemStack[] { ItemList.Tool_DataStick.getWithName(1L, "Writes Research result") }, - null, - null, - aResearchTime, - 30, - -201); + false, + new ItemStack[] { aResearchItem }, + new ItemStack[] { aOutput }, + new ItemStack[] { ItemList.Tool_DataStick.getWithName(1L, "Writes Research result") }, + null, + null, + aResearchTime, + 30, + -201); GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.addFakeRecipe( - false, - tInputs, - new ItemStack[] { aOutput }, - new ItemStack[] { ItemList.Tool_DataStick.getWithName(1L, "Reads Research result") }, - aFluidInputs, - null, - aDuration, - aEUt, - 0, - tAlts, - false); + false, + tInputs, + new ItemStack[] { aOutput }, + new ItemStack[] { ItemList.Tool_DataStick.getWithName(1L, "Reads Research result") }, + aFluidInputs, + null, + aDuration, + aEUt, + 0, + tAlts, + false); GT_Recipe_AssemblyLine tRecipe = new GT_Recipe_AssemblyLine( - aResearchItem, - aResearchTime, - tInputs, - aFluidInputs, - aOutput, - aDuration, - aEUt, - tAlts); + aResearchItem, + aResearchTime, + tInputs, + aFluidInputs, + aOutput, + aDuration, + aEUt, + tAlts); tRecipe.setPersistentHash(tPersistentHash); GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.add(tRecipe); GT_AssemblyLineUtils.addRecipeToCache(tRecipe); @@ -3065,13 +3012,13 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { @Override public boolean addCircuitAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput, - int aDuration, int aEUt) { + int aDuration, int aEUt) { return addCircuitAssemblerRecipe(aInputs, aFluidInput, aOutput, aDuration, aEUt, false); } @Override public boolean addCircuitAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput, - int aDuration, int aEUt, boolean aCleanroom) { + int aDuration, int aEUt, boolean aCleanroom) { if (this.areItemsAndFluidsBothNull(aInputs, new FluidStack[] { aFluidInput })) { return false; @@ -3091,32 +3038,27 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { for (int oreID : OreDictionary.getOreIDs(aOutput)) { if (OreDictionary.getOreName(oreID) - .startsWith("circuit")) { - return this.addCircuitAssemblerRecipeNonOredicted( - aInputs, - aFluidInput, - aOutput, - aDuration, - aEUt, - aCleanroom); + .startsWith("circuit")) { + return this + .addCircuitAssemblerRecipeNonOredicted(aInputs, aFluidInput, aOutput, aDuration, aEUt, aCleanroom); } } GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes.addRecipe( - true, - aInputs, - new ItemStack[] { aOutput }, - null, - new FluidStack[] { aFluidInput }, - null, - aDuration, - aEUt, - aCleanroom ? -200 : 0); + true, + aInputs, + new ItemStack[] { aOutput }, + null, + new FluidStack[] { aFluidInput }, + null, + aDuration, + aEUt, + aCleanroom ? -200 : 0); return true; } public boolean addCircuitAssemblerRecipeNonOredicted(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput, - int aDuration, int aEUt, boolean aCleanroom) { + int aDuration, int aEUt, boolean aCleanroom) { if ((aInputs == null) || (aOutput == null) || aInputs.length > 6 || aInputs.length < 1) { return false; } @@ -3127,42 +3069,42 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { aCleanroom = false; } GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes.addRecipe( - true, - aInputs, - new ItemStack[] { aOutput }, - null, - null, - new FluidStack[] { aFluidInput }, - null, - aDuration, - aEUt, - aCleanroom ? -200 : 0); + true, + aInputs, + new ItemStack[] { aOutput }, + null, + null, + new FluidStack[] { aFluidInput }, + null, + aDuration, + aEUt, + aCleanroom ? -200 : 0); return true; } @Override public boolean addNanoForgeRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack[] aOutputs, - FluidStack[] aFluidOutputs, int[] aChances, int aDuration, int aEUt, int aSpecialValue) { + FluidStack[] aFluidOutputs, int[] aChances, int aDuration, int aEUt, int aSpecialValue) { if (aInputs == null || aOutputs == null || aSpecialValue == 0) return false; GT_Recipe.GT_Recipe_Map.sNanoForge.addRecipe( - new GT_Recipe( - false, - aInputs, - aOutputs, - null, - aChances, - aFluidInputs, - aFluidOutputs, - aDuration, - aEUt, - aSpecialValue)); + new GT_Recipe( + false, + aInputs, + aOutputs, + null, + aChances, + aFluidInputs, + aFluidOutputs, + aDuration, + aEUt, + aSpecialValue)); return true; } @Override public boolean addPCBFactoryRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack[] aOutputs, - int aDuration, int aEUt, int aSpecialValue) { + int aDuration, int aEUt, int aSpecialValue) { if (aInputs == null || aFluidInputs == null || aOutputs == null) { return false; @@ -3173,52 +3115,42 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } GT_Recipe.GT_Recipe_Map.sPCBFactory.addRecipe( - new GT_Recipe( - false, - aInputs, - aOutputs, - null, - null, - aFluidInputs, - null, - aDuration, - aEUt, - aSpecialValue)); + new GT_Recipe(false, aInputs, aOutputs, null, null, aFluidInputs, null, aDuration, aEUt, aSpecialValue)); return true; } @Override public GT_Recipe addIC2ReactorBreederCell(ItemStack input, ItemStack output, boolean reflector, int heatStep, - int heatMultiplier, int requiredPulses) { + int heatMultiplier, int requiredPulses) { return GT_Recipe.GT_Recipe_Map.sIC2NuclearFakeRecipe.addFakeRecipe( - input, - output, - reflector ? "Neutron reflecting Breeder" : "Heat neutral Breeder", - String.format("Every %d reactor hull heat", heatStep), - String.format("increase speed by %d00%%", heatMultiplier), - String.format("Required pulses: %d", requiredPulses)); + input, + output, + reflector ? "Neutron reflecting Breeder" : "Heat neutral Breeder", + String.format("Every %d reactor hull heat", heatStep), + String.format("increase speed by %d00%%", heatMultiplier), + String.format("Required pulses: %d", requiredPulses)); } @Override public GT_Recipe addIC2ReactorFuelCell(ItemStack input, ItemStack output, boolean aMox, float aHeat, float aEnergy, - int aCells) { + int aCells) { // for the mysterious constant 5.0f, // see ic2.core.block.reactor.tileentity.TileEntityNuclearReactorElectric.getOfferedEnergy // don't ask, just accept int pulses = aCells / 2 + 1; float nukePowerMult = 5.0f * ConfigUtil.getFloat(MainConfig.get(), "balance/energy/generator/nuclear"); return GT_Recipe.GT_Recipe_Map.sIC2NuclearFakeRecipe.addFakeRecipe( - input, - output, - aMox ? "MOX Model" : "Uranium Model", - "Neutron Pulse: " + aCells, - aCells == 1 ? String.format("Heat: %.1f * n1 * (n1 + 1)", aHeat / 2f) - : String.format("Heat: %.1f * (%d + n1) * (%d + n1)", aHeat * aCells / 2f, aCells, aCells + 1), - String.format( - "Energy: %.1f + n2 * %.1f EU/t", - aEnergy * aCells * pulses * nukePowerMult, - aEnergy * nukePowerMult)); + input, + output, + aMox ? "MOX Model" : "Uranium Model", + "Neutron Pulse: " + aCells, + aCells == 1 ? String.format("Heat: %.1f * n1 * (n1 + 1)", aHeat / 2f) + : String.format("Heat: %.1f * (%d + n1) * (%d + n1)", aHeat * aCells / 2f, aCells, aCells + 1), + String.format( + "Energy: %.1f + n2 * %.1f EU/t", + aEnergy * aCells * pulses * nukePowerMult, + aEnergy * nukePowerMult)); } private boolean areItemsAndFluidsBothNull(ItemStack[] items, FluidStack[] fluids) { diff --git a/src/main/java/gregtech/common/GT_ThaumcraftCompat.java b/src/main/java/gregtech/common/GT_ThaumcraftCompat.java index 9c7eeb8f09..268f23bfe7 100644 --- a/src/main/java/gregtech/common/GT_ThaumcraftCompat.java +++ b/src/main/java/gregtech/common/GT_ThaumcraftCompat.java @@ -83,35 +83,35 @@ public class GT_ThaumcraftCompat implements IThaumcraftCompat { TC_Aspects.VOLATUS.mAspect = Aspect.FLIGHT; TC_Aspects.STRONTIO.mAspect = new Aspect( - "strontio", - 15647411, - new Aspect[] { Aspect.MIND, Aspect.ENTROPY }, - new ResourceLocation("gregtech:textures/aspects/" + TC_Aspects.STRONTIO.name() + ".png"), - 1); + "strontio", + 15647411, + new Aspect[] { Aspect.MIND, Aspect.ENTROPY }, + new ResourceLocation("gregtech:textures/aspects/" + TC_Aspects.STRONTIO.name() + ".png"), + 1); TC_Aspects.NEBRISUM.mAspect = new Aspect( - "nebrisum", - 15658622, - new Aspect[] { Aspect.MINE, Aspect.GREED }, - new ResourceLocation("gregtech:textures/aspects/" + TC_Aspects.NEBRISUM.name() + ".png"), - 1); + "nebrisum", + 15658622, + new Aspect[] { Aspect.MINE, Aspect.GREED }, + new ResourceLocation("gregtech:textures/aspects/" + TC_Aspects.NEBRISUM.name() + ".png"), + 1); TC_Aspects.ELECTRUM.mAspect = new Aspect( - "electrum", - 12644078, - new Aspect[] { Aspect.ENERGY, Aspect.MECHANISM }, - new ResourceLocation("gregtech:textures/aspects/" + TC_Aspects.ELECTRUM.name() + ".png"), - 1); + "electrum", + 12644078, + new Aspect[] { Aspect.ENERGY, Aspect.MECHANISM }, + new ResourceLocation("gregtech:textures/aspects/" + TC_Aspects.ELECTRUM.name() + ".png"), + 1); TC_Aspects.MAGNETO.mAspect = new Aspect( - "magneto", - 12632256, - new Aspect[] { Aspect.METAL, Aspect.TRAVEL }, - new ResourceLocation("gregtech:textures/aspects/" + TC_Aspects.MAGNETO.name() + ".png"), - 1); + "magneto", + 12632256, + new Aspect[] { Aspect.METAL, Aspect.TRAVEL }, + new ResourceLocation("gregtech:textures/aspects/" + TC_Aspects.MAGNETO.name() + ".png"), + 1); TC_Aspects.RADIO.mAspect = new Aspect( - "radio", - 12648384, - new Aspect[] { Aspect.LIGHT, Aspect.ENERGY }, - new ResourceLocation("gregtech:textures/aspects/" + TC_Aspects.RADIO.name() + ".png"), - 1); + "radio", + 12648384, + new Aspect[] { Aspect.LIGHT, Aspect.ENERGY }, + new ResourceLocation("gregtech:textures/aspects/" + TC_Aspects.RADIO.name() + ".png"), + 1); GT_LanguageManager.addStringLocalization("tc.aspect.strontio", "Stupidness, Incompetence"); GT_LanguageManager.addStringLocalization("tc.aspect.nebrisum", "Cheatyness, Raiding"); @@ -123,9 +123,8 @@ public class GT_ThaumcraftCompat implements IThaumcraftCompat { private static final AspectList getAspectList(List 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 = i$.next(); } return rAspects; @@ -133,8 +132,8 @@ public class GT_ThaumcraftCompat implements IThaumcraftCompat { @Override public Object addResearch(String aResearch, String aName, String aText, String[] aParentResearches, - String aCategory, ItemStack aIcon, int aComplexity, int aType, int aX, int aY, - List aAspects, ItemStack[] aResearchTriggers, Object[] aPages) { + String aCategory, ItemStack aIcon, int aComplexity, int aType, int aX, int aY, + List aAspects, ItemStack[] aResearchTriggers, Object[] aPages) { if (!GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.researches, aResearch, true)) { return null; } @@ -149,13 +148,13 @@ public class GT_ThaumcraftCompat implements IThaumcraftCompat { } } ResearchItem rResearch = new ResearchItem( - aResearch, - aCategory, - getAspectList(aAspects), - aX, - aY, - aComplexity, - aIcon); + aResearch, + aCategory, + getAspectList(aAspects), + aX, + aY, + aComplexity, + aIcon); ArrayList tPages = new ArrayList<>(aPages.length); GT_LanguageManager.addStringLocalization("tc.research_name." + aResearch, aName); GT_LanguageManager.addStringLocalization("tc.research_text." + aResearch, "[GT] " + aText); @@ -217,59 +216,55 @@ public class GT_ThaumcraftCompat implements IThaumcraftCompat { @Override public Object addCrucibleRecipe(String aResearch, Object aInput, ItemStack aOutput, - List aAspects) { + List aAspects) { if ((GT_Utility.isStringInvalid(aResearch)) || (aInput == null) - || (aOutput == null) - || (aAspects == null) - || (aAspects.isEmpty())) { + || (aOutput == null) + || (aAspects == null) + || (aAspects.isEmpty())) { return null; } return ThaumcraftApi.addCrucibleRecipe( - aResearch, - GT_Utility.copyOrNull(aOutput), - ((aInput instanceof ItemStack)) || ((aInput instanceof ArrayList)) ? aInput : aInput.toString(), - getAspectList(aAspects)); + aResearch, + GT_Utility.copyOrNull(aOutput), + ((aInput instanceof ItemStack)) || ((aInput instanceof ArrayList)) ? aInput : aInput.toString(), + getAspectList(aAspects)); } @Override public Object addInfusionRecipe(String aResearch, ItemStack aMainInput, ItemStack[] aSideInputs, ItemStack aOutput, - int aInstability, List aAspects) { + int aInstability, List aAspects) { if ((GT_Utility.isStringInvalid(aResearch)) || (aMainInput == null) - || (aSideInputs == null) - || (aOutput == null) - || (aAspects == null) - || (aAspects.isEmpty())) { + || (aSideInputs == null) + || (aOutput == null) + || (aAspects == null) + || (aAspects.isEmpty())) { return null; } return ThaumcraftApi.addInfusionCraftingRecipe( - aResearch, - GT_Utility.copyOrNull(aOutput), - aInstability, - getAspectList(aAspects), - aMainInput, - aSideInputs); + aResearch, + GT_Utility.copyOrNull(aOutput), + aInstability, + getAspectList(aAspects), + aMainInput, + aSideInputs); } @Override public Object addInfusionEnchantmentRecipe(String aResearch, Enchantment aEnchantment, int aInstability, - List aAspects, ItemStack[] aSideInputs) { + List aAspects, ItemStack[] aSideInputs) { if ((GT_Utility.isStringInvalid(aResearch)) || (aSideInputs == null) - || (aAspects == null) - || (aEnchantment == null) - || (aAspects.isEmpty())) { + || (aAspects == null) + || (aEnchantment == null) + || (aAspects.isEmpty())) { return null; } - return ThaumcraftApi.addInfusionEnchantmentRecipe( - aResearch, - aEnchantment, - aInstability, - getAspectList(aAspects), - aSideInputs); + return ThaumcraftApi + .addInfusionEnchantmentRecipe(aResearch, aEnchantment, aInstability, getAspectList(aAspects), aSideInputs); } @Override public boolean registerThaumcraftAspectsToItem(ItemStack aExampleStack, List aAspects, - String aOreDict) { + String aOreDict) { if (aAspects.isEmpty()) return false; ThaumcraftApi.registerObjectTag(aOreDict, getAspectList(aAspects)); return true; @@ -277,7 +272,7 @@ public class GT_ThaumcraftCompat implements IThaumcraftCompat { @Override public boolean registerThaumcraftAspectsToItem(ItemStack aStack, List aAspects, - boolean aAdditive) { + boolean aAdditive) { if (aAspects.isEmpty()) return false; if (aAdditive) { ThaumcraftApi.registerComplexObjectTag(aStack, getAspectList(aAspects)); diff --git a/src/main/java/gregtech/common/GT_UndergroundOil.java b/src/main/java/gregtech/common/GT_UndergroundOil.java index 1372855926..f522ff5895 100644 --- a/src/main/java/gregtech/common/GT_UndergroundOil.java +++ b/src/main/java/gregtech/common/GT_UndergroundOil.java @@ -42,9 +42,9 @@ public class GT_UndergroundOil { */ public static FluidStack undergroundOilReadInformation(IGregTechTileEntity te) { return undergroundOil( - te.getWorld() - .getChunkFromBlockCoords(te.getXCoord(), te.getZCoord()), - -1); + te.getWorld() + .getChunkFromBlockCoords(te.getXCoord(), te.getZCoord()), + -1); } /** @@ -59,9 +59,9 @@ 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()), - readOrDrainCoefficient); + te.getWorld() + .getChunkFromBlockCoords(te.getXCoord(), te.getZCoord()), + readOrDrainCoefficient); } // Returns whole content for information purposes -> when drainSpeedCoefficient < 0 @@ -112,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; @@ -145,18 +145,17 @@ public class GT_UndergroundOil { static void migrate(ChunkDataEvent.Load e) { if (e.getData() - .hasKey("GTOIL") - && e.getData() - .hasKey("GTOILFLUID")) { + .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"))); + .getInteger("GTOILFLUID")) chunkData.setAmount( + Math.min( + chunkData.getAmount(), + e.getData() + .getInteger("GTOIL"))); } } @@ -199,7 +198,7 @@ public class GT_UndergroundOil { @Override protected void writeElement(DataOutput output, ChunkData element, World world, int chunkX, int chunkZ) - throws IOException { + throws IOException { /* see class javadoc for explanation */ output.writeInt(element.getVeinHash()); if (element.getVeinKey() == null) return; @@ -213,7 +212,7 @@ public class GT_UndergroundOil { @Override protected GT_UndergroundOil.ChunkData readElement(DataInput input, int version, World world, int chunkX, - int chunkZ) throws IOException { + int chunkZ) throws IOException { /* see class javadoc for explanation */ if (version != 0) throw new IOException("Region file corrupted"); GT_UndergroundOil.ChunkData pristine = createElement(world, chunkX, chunkZ); @@ -226,10 +225,10 @@ 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), - veinKey); + amount, + GT_Mod.gregtechproxy.mUndergroundOil.GetDimension(world.provider.dimensionId) + .getUOFluid(veinKey), + veinKey); } @Override @@ -239,10 +238,10 @@ public class GT_UndergroundOil { int dimensionId = world.provider.dimensionId; GT_UO_Dimension dimension = GT_Mod.gregtechproxy.mUndergroundOil.GetDimension(dimensionId); return new GT_UndergroundOil.ChunkData( - pristine.getRight(), - pristine.getLeft(), - dimension.getUOFluidKey(pristine.getLeft()), - false); + pristine.getRight(), + pristine.getLeft(), + dimension.getUOFluidKey(pristine.getLeft()), + false); } private static int hash(@Nullable GT_UO_Fluid fluid) { 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 0b10523f1a..3b64655f05 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 @@ -50,8 +50,8 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { @Deprecated public GT_Worldgen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, - int aSize, boolean aOverworld, boolean aNether, boolean aEnd, boolean GC_UNUSED1, boolean GC_UNUSED2, - boolean GC_UNUSED3, int aPrimary, int aSecondary, int aBetween, int aSporadic) { + int aSize, boolean aOverworld, boolean aNether, boolean aEnd, boolean GC_UNUSED1, boolean GC_UNUSED2, + boolean GC_UNUSED3, int aPrimary, int aSecondary, int aBetween, int aSporadic) { super(aName, sList, aDefault); this.mOverworld = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld); this.mNether = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether); @@ -67,37 +67,22 @@ 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; @@ -106,28 +91,28 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { @Deprecated public GT_Worldgen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, - int aSize, boolean aOverworld, boolean aNether, boolean aEnd, boolean GC_UNUSED1, boolean GC_UNUSED2, - boolean GC_UNUSED3, Materials aPrimary, Materials aSecondary, Materials aBetween, Materials aSporadic) { + int aSize, boolean aOverworld, boolean aNether, boolean aEnd, boolean GC_UNUSED1, boolean GC_UNUSED2, + boolean GC_UNUSED3, Materials aPrimary, Materials aSecondary, Materials aBetween, Materials aSporadic) { this( - aName, - aDefault, - aMinY, - aMaxY, - aWeight, - aDensity, - aSize, - aOverworld, - aNether, - aEnd, - aPrimary, - aSecondary, - aBetween, - aSporadic); + aName, + aDefault, + aMinY, + aMaxY, + aWeight, + aDensity, + aSize, + aOverworld, + aNether, + aEnd, + aPrimary, + aSecondary, + aBetween, + aSporadic); } public GT_Worldgen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, - int aSize, boolean aOverworld, boolean aNether, boolean aEnd, Materials aPrimary, Materials aSecondary, - Materials aBetween, Materials aSporadic) { + int aSize, boolean aOverworld, boolean aNether, boolean aEnd, Materials aPrimary, Materials aSecondary, + Materials aBetween, Materials aSporadic) { super(aName, sList, aDefault); this.mOverworld = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld); this.mNether = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether); @@ -140,37 +125,22 @@ 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; @@ -179,17 +149,17 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { @Override public int executeWorldgenChunkified(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, - int aChunkZ, int aSeedX, int aSeedZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { + int aChunkZ, int aSeedX, int aSeedZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { if (mWorldGenName.equals("NoOresInVein")) { if (debugOrevein) GT_Log.out.println(" NoOresInVein"); // This is a special empty orevein return ORE_PLACED; } if (!isGenerationAllowed( - aWorld, - aDimensionType, - ((aDimensionType == -1) && (this.mNether)) || ((aDimensionType == 0) && (this.mOverworld)) - || ((aDimensionType == 1) && (this.mEnd)) ? aDimensionType : aDimensionType ^ 0xFFFFFFFF)) { + aWorld, + aDimensionType, + ((aDimensionType == -1) && (this.mNether)) || ((aDimensionType == 0) && (this.mOverworld)) + || ((aDimensionType == 1) && (this.mEnd)) ? aDimensionType : aDimensionType ^ 0xFFFFFFFF)) { /* * // Debug code, but spams log if (debugOrevein) { GT_Log.out.println( "Wrong dimension" ); } */ @@ -225,10 +195,10 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { if (wX >= eX) { // No overlap between orevein and this chunk exists in X if (tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, Blocks.stone) - || tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, Blocks.netherrack) - || tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, Blocks.end_stone) - || tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, GregTech_API.sBlockGranites) - || tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, GregTech_API.sBlockStones)) { + || tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, Blocks.netherrack) + || tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, Blocks.end_stone) + || tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, GregTech_API.sBlockGranites) + || tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, GregTech_API.sBlockStones)) { // Didn't reach, but could have placed. Save orevein for future use. return NO_OVERLAP; } else { @@ -244,10 +214,10 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { int sZ = Math.min(sZVein, aChunkZ + 2 + 16); if (nZ >= sZ) { // No overlap between orevein and this chunk exists in Z if (tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, Blocks.stone) - || tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, Blocks.netherrack) - || tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, Blocks.end_stone) - || tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, GregTech_API.sBlockGranites) - || tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, GregTech_API.sBlockStones)) { + || tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, Blocks.netherrack) + || tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, Blocks.end_stone) + || tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, GregTech_API.sBlockGranites) + || tBlock.isReplaceableOreGen(aWorld, aChunkX + 7, tMinY, aChunkZ + 9, GregTech_API.sBlockStones)) { // Didn't reach, but could have placed. Save orevein for future use. return NO_OVERLAP; } else { @@ -258,26 +228,26 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { if (debugOrevein) { GT_Log.out.print( - "Trying Orevein:" + this.mWorldGenName - + " Dimension=" - + tDimensionName - + " mX=" - + aChunkX / 16 - + " mZ=" - + aChunkZ / 16 - + " oreseedX=" - + aSeedX / 16 - + " oreseedZ=" - + aSeedZ / 16 - + " cY=" - + tMinY); + "Trying Orevein:" + this.mWorldGenName + + " Dimension=" + + tDimensionName + + " mX=" + + aChunkX / 16 + + " mZ=" + + aChunkZ / 16 + + " oreseedX=" + + aSeedX / 16 + + " oreseedZ=" + + aSeedZ / 16 + + " cY=" + + tMinY); } // Adjust the density down the more chunks we are away from the oreseed. The 5 chunks surrounding the seed // 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)))); + 1, + 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 @@ -285,37 +255,23 @@ 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); + 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)) - placeCount[3]++; - } + && (this.mSporadicMeta > 0)) { // Sporadics are reduce by 1/7 to compensate + if (GT_TileEntity_Ores + .setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark)) + placeCount[3]++; + } } } if ((placeCount[1] + placeCount[3]) == 0) { @@ -325,252 +281,173 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { // Layers 0 & 1 Secondary and Sporadic for (level = tMinY; level < (tMinY + 2); level++) { 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); + 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)) { + && (this.mSecondaryMeta > 0)) { + 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)) - placeCount[3]++; - } + && ((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)) + placeCount[3]++; + } } } } // 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, - Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ)) / localDensity); + int placeZ = Math + .max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ)) / localDensity); if ((aRandom.nextInt(2) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) - && (this.mBetweenMeta > 0)) { // Between are reduce by 1/2 to compensate + && (this.mBetweenMeta > 0)) { // Between are reduce by 1/2 to compensate if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, isUnderdark)) { placeCount[2]++; } } 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)) { - placeCount[1]++; - } - } else + && (this.mSecondaryMeta > 0)) { + 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)) - placeCount[3]++; - } + && (this.mSporadicMeta > 0)) { // Sporadics are reduce by 1/7 to compensate + if (GT_TileEntity_Ores + .setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark)) + placeCount[3]++; + } } } 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, - Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ)) / localDensity); + int placeZ = Math + .max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ)) / localDensity); if ((aRandom.nextInt(2) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) - && (this.mBetweenMeta > 0)) { // Between are reduce by 1/2 to compensate + && (this.mBetweenMeta > 0)) { // Between are reduce by 1/2 to compensate if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, isUnderdark)) { placeCount[2]++; } } 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)) - placeCount[3]++; - } + && (this.mSporadicMeta > 0)) { // Sporadics are reduce by 1/7 to compensate + if (GT_TileEntity_Ores + .setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark)) + placeCount[3]++; + } } } 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, - Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ)) / localDensity); + int placeZ = Math + .max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ)) / localDensity); if ((aRandom.nextInt(2) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) - && (this.mBetweenMeta > 0)) { // Between are reduce by 1/2 to compensate + && (this.mBetweenMeta > 0)) { // Between are reduce by 1/2 to compensate if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, isUnderdark)) { placeCount[2]++; } } 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)) - placeCount[3]++; - } + && ((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)) + placeCount[3]++; + } } } 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, - Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ)) / localDensity); + int placeZ = Math + .max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ)) / localDensity); if ((aRandom.nextInt(2) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) - && (this.mBetweenMeta > 0)) { // Between are reduce by 1/2 to compensate + && (this.mBetweenMeta > 0)) { // Between are reduce by 1/2 to compensate if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, isUnderdark)) { placeCount[2]++; } } 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)) - placeCount[3]++; - } + && ((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)) + placeCount[3]++; + } } } 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, - Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ)) / localDensity); + 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.mPrimaryMeta > 0)) { 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)) - placeCount[3]++; - } + && (this.mSporadicMeta > 0)) { // Sporadics are reduce by 1/7 to compensate + if (GT_TileEntity_Ores + .setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark)) + placeCount[3]++; + } } } 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, - Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ)) / localDensity); + 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.mPrimaryMeta > 0)) { 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)) - placeCount[3]++; - } + && (this.mSporadicMeta > 0)) { // Sporadics are reduce by 1/7 to compensate + if (GT_TileEntity_Ores + .setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, isUnderdark)) + placeCount[3]++; + } } } // Place small ores for the vein @@ -602,25 +479,25 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { } if (debugOrevein) { GT_Log.out.println( - " wXVein" + wXVein - + " eXVein" - + eXVein - + " nZVein" - + nZVein - + " sZVein" - + sZVein - + " locDen=" - + localDensity - + " Den=" - + this.mDensity - + " Sec=" - + placeCount[1] - + " Spo=" - + placeCount[3] - + " Bet=" - + placeCount[2] - + " Pri=" - + placeCount[0]); + " wXVein" + wXVein + + " eXVein" + + eXVein + + " nZVein" + + nZVein + + " sZVein" + + sZVein + + " locDen=" + + localDensity + + " Den=" + + this.mDensity + + " Sec=" + + placeCount[1] + + " Spo=" + + placeCount[3] + + " Bet=" + + placeCount[2] + + " Pri=" + + placeCount[0]); } // Something (at least the bottom layer must have 1 block) must have been placed, return true return ORE_PLACED; 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 fb44948805..5a461dab9c 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 @@ -30,59 +30,53 @@ public class GT_Worldgen_GT_Ore_SmallPieces extends GT_Worldgen { // TODO CHECK IF INSTANTIATION IS CORRECT public GT_Worldgen_GT_Ore_SmallPieces(String aName, boolean aDefault, int aMinY, int aMaxY, int aAmount, - boolean aOverworld, boolean aNether, boolean aEnd, Materials aPrimary) { + boolean aOverworld, boolean aNether, boolean aEnd, Materials aPrimary) { super(aName, GregTech_API.sWorldgenList, aDefault); this.mOverworld = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld); this.mNether = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether); this.mEnd = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "TheEnd", aEnd); this.mMinY = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MinHeight", aMinY)); 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.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.mBiome = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "BiomeName", "None"); sList.add(this); } public GT_Worldgen_GT_Ore_SmallPieces(String aName, boolean aDefault, int aMinY, int aMaxY, int aAmount, - boolean aOverworld, boolean aNether, boolean aEnd, boolean GC_UNUSED1, boolean GC_UNUSED2, - boolean GC_UNUSED3, Materials aPrimary) { + boolean aOverworld, boolean aNether, boolean aEnd, boolean GC_UNUSED1, boolean GC_UNUSED2, boolean GC_UNUSED3, + Materials aPrimary) { super(aName, GregTech_API.sWorldgenList, aDefault); this.mOverworld = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld); this.mNether = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether); this.mEnd = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "TheEnd", aEnd); this.mMinY = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MinHeight", aMinY)); 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.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.mBiome = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "BiomeName", "None"); sList.add(this); } @Override public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, - int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { + int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { if (!this.mBiome.equals("None") && !(this.mBiome.equals(aBiome))) { return false; // Not the correct biome for ore mix } if (!isGenerationAllowed( - aWorld, - aDimensionType, - ((aDimensionType == -1) && (this.mNether)) || ((aDimensionType == 0) && (this.mOverworld)) - || ((aDimensionType == 1) && (this.mEnd)) ? aDimensionType : aDimensionType ^ 0xFFFFFFFF)) { + aWorld, + aDimensionType, + ((aDimensionType == -1) && (this.mNether)) || ((aDimensionType == 0) && (this.mOverworld)) + || ((aDimensionType == 1) && (this.mEnd)) ? aDimensionType : aDimensionType ^ 0xFFFFFFFF)) { return false; } int count = 0; @@ -94,27 +88,27 @@ public class GT_Worldgen_GT_Ore_SmallPieces extends GT_Worldgen { int j = Math.max(1, this.mAmount / 2 + aRandom.nextInt(this.mAmount) / 2); for (int i = 0; i < j; i++) { GT_TileEntity_Ores.setOreBlock( - aWorld, - aChunkX + 8 + aRandom.nextInt(16), - this.mMinY + aRandom.nextInt(Math.max(1, this.mMaxY - this.mMinY)), - aChunkZ + 8 + aRandom.nextInt(16), - this.mMeta, - true, - isUnderdark); + aWorld, + aChunkX + 8 + aRandom.nextInt(16), + this.mMinY + aRandom.nextInt(Math.max(1, this.mMaxY - this.mMinY)), + aChunkZ + 8 + aRandom.nextInt(16), + this.mMeta, + true, + isUnderdark); count++; } } if (debugSmallOres) { GT_Log.out.println( - "Small Ore:" + this.mWorldGenName - + " @ dim=" - + aDimensionType - + " mX=" - + aChunkX / 16 - + " mZ=" - + aChunkZ / 16 - + " ore=" - + count); + "Small Ore:" + this.mWorldGenName + + " @ dim=" + + aDimensionType + + " mX=" + + aChunkX / 16 + + " mZ=" + + aChunkZ / 16 + + " ore=" + + count); } return true; } diff --git a/src/main/java/gregtech/common/GT_Worldgen_Stone.java b/src/main/java/gregtech/common/GT_Worldgen_Stone.java index 94b529c1e5..1996b77349 100644 --- a/src/main/java/gregtech/common/GT_Worldgen_Stone.java +++ b/src/main/java/gregtech/common/GT_Worldgen_Stone.java @@ -59,26 +59,26 @@ public class GT_Worldgen_Stone extends GT_Worldgen_Ore { } public GT_Worldgen_Stone(String aName, boolean aDefault, Block aBlock, int aBlockMeta, int aDimensionType, - int aAmount, int aSize, int aProbability, int aMinY, int aMaxY, Collection aBiomeList, - boolean aAllowToGenerateinVoid) { + int aAmount, int aSize, int aProbability, int aMinY, int aMaxY, Collection aBiomeList, + boolean aAllowToGenerateinVoid) { super( - aName, - aDefault, - aBlock, - aBlockMeta, - aDimensionType, - aAmount, - aSize, - aProbability, - aMinY, - aMaxY, - aBiomeList, - aAllowToGenerateinVoid); + aName, + aDefault, + aBlock, + aBlockMeta, + aDimensionType, + aAmount, + aSize, + aProbability, + aMinY, + aMaxY, + aBiomeList, + aAllowToGenerateinVoid); } @Override public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, - int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { + int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { XSTR stoneRNG = new XSTR(); ArrayList stones = new ArrayList<>(); @@ -97,24 +97,24 @@ public class GT_Worldgen_Stone extends GT_Worldgen_Ore { for (int x = aChunkX / 16 - windowWidth; x < (aChunkX / 16 + windowWidth + 1); x++) { for (int z = aChunkZ / 16 - windowWidth; z < (aChunkZ / 16 + windowWidth + 1); z++) { long hash = (((aWorld.provider.dimensionId & 0xffL) << 56) | (((long) x & 0x000000000fffffffL) << 28) - | ((long) z & 0x000000000fffffffL)); + | ((long) z & 0x000000000fffffffL)); if (!validStoneSeeds.containsKey(hash)) { // Determine if RNG says to add stone at this chunk stoneRNG.setSeed( - aWorld.getSeed() ^ hash + Math.abs(mBlockMeta) - + Math.abs(mSize) - + ((GregTech_API.sBlockGranites == mBlock) ? (32768) : (0))); // Don't judge me. - // Want different - // values for - // different block - // types + aWorld.getSeed() ^ hash + Math.abs(mBlockMeta) + + Math.abs(mSize) + + ((GregTech_API.sBlockGranites == mBlock) ? (32768) : (0))); // Don't judge me. + // Want different + // values for + // different block + // types if ((this.mProbability <= 1) || (stoneRNG.nextInt(this.mProbability) == 0)) { // Add stone at this chunk validStoneSeeds.put(hash, new StoneSeeds(true)); // Add to generation list stones.add(new ValidSeeds(x, z)); if (debugStones) GT_Log.out.println( - "New stoneseed=" + mWorldGenName + " x=" + x + " z=" + z + " realSize=" + realSize); + "New stoneseed=" + mWorldGenName + " x=" + x + " z=" + z + " realSize=" + realSize); } else { validStoneSeeds.put(hash, new StoneSeeds(false)); } @@ -138,11 +138,11 @@ public class GT_Worldgen_Stone extends GT_Worldgen_Ore { int z = stones.get(0).mZ * 16; stoneRNG.setSeed( - aWorld.getSeed() - ^ (((aWorld.provider.dimensionId & 0xffL) << 56) | (((long) x & 0x000000000fffffffL) << 28) - | ((long) z & 0x000000000fffffffL)) + Math.abs(mBlockMeta) - + Math.abs(mSize) - + ((GregTech_API.sBlockGranites == mBlock) ? (32768) : (0))); // Don't judge me + aWorld.getSeed() + ^ (((aWorld.provider.dimensionId & 0xffL) << 56) | (((long) x & 0x000000000fffffffL) << 28) + | ((long) z & 0x000000000fffffffL)) + Math.abs(mBlockMeta) + + Math.abs(mSize) + + ((GregTech_API.sBlockGranites == mBlock) ? (32768) : (0))); // Don't judge me for (int i = 0; i < this.mAmount; i++) { // Not sure why you would want more than one in a chunk! Left alone // though. // Locate the stoneseed XYZ. Original code would request an isAir at the seed location, causing a chunk @@ -176,30 +176,30 @@ public class GT_Worldgen_Stone extends GT_Worldgen_Ore { // 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)) { + .isAir(aWorld, aChunkX + 8, tMinY, aChunkZ + 8)) { if (debugStones) GT_Log.out.println( - mWorldGenName + " tX=" - + tX - + " tY=" - + tY - + " tZ=" - + tZ - + " realSize=" - + realSize - + " xSize=" - + realSize / xSize - + " ySize=" - + realSize / ySize - + " zSize=" - + realSize / zSize - + " tMinY=" - + tMinY - + " tMaxY=" - + tMaxY - + " - Skipped because first requesting chunk would not contain this stone"); + mWorldGenName + " tX=" + + tX + + " tY=" + + tY + + " tZ=" + + tZ + + " realSize=" + + realSize + + " xSize=" + + realSize / xSize + + " ySize=" + + realSize / ySize + + " zSize=" + + realSize / zSize + + " tMinY=" + + tMinY + + " tMaxY=" + + tMaxY + + " - Skipped because first requesting chunk would not contain this stone"); long hash = (((aWorld.provider.dimensionId & 0xffL) << 56) - | (((long) x & 0x000000000fffffffL) << 28) - | ((long) z & 0x000000000fffffffL)); + | (((long) x & 0x000000000fffffffL) << 28) + | ((long) z & 0x000000000fffffffL)); validStoneSeeds.remove(hash); validStoneSeeds.put(hash, new StoneSeeds(false)); } @@ -212,32 +212,32 @@ public class GT_Worldgen_Stone extends GT_Worldgen_Ore { int nZ = Math.min(tMaxZ, aChunkZ + 8 + 16); if (debugStones) GT_Log.out.println( - mWorldGenName + " tX=" - + tX - + " tY=" - + tY - + " tZ=" - + tZ - + " realSize=" - + realSize - + " xSize=" - + realSize / xSize - + " ySize=" - + realSize / ySize - + " zSize=" - + realSize / zSize - + " wX=" - + wX - + " eX=" - + eX - + " tMinY=" - + tMinY - + " tMaxY=" - + tMaxY - + " sZ=" - + sZ - + " nZ=" - + nZ); + mWorldGenName + " tX=" + + tX + + " tY=" + + tY + + " tZ=" + + tZ + + " realSize=" + + realSize + + " xSize=" + + realSize / xSize + + " ySize=" + + realSize / ySize + + " zSize=" + + realSize / zSize + + " wX=" + + wX + + " eX=" + + eX + + " tMinY=" + + tMinY + + " tMaxY=" + + tMaxY + + " sZ=" + + sZ + + " nZ=" + + nZ); double rightHandSide = realSize * realSize + 1; // Precalc the right hand side for (int iY = tMinY; iY < tMaxY; iY++) { // Do placement from the bottom up layer up. Maybe better on @@ -271,62 +271,24 @@ 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)) - || (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, - GregTech_API.sBlockGranites)) - || (tTargetedBlock.isReplaceableOreGen( - aWorld, - iX, - iY, - iZ, - GregTech_API.sBlockStones))))) { - aWorld.setBlock( - iX, - iY, - iZ, - this.mBlock, - this.mBlockMeta, - 0); - } + .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, GregTech_API.sBlockGranites)) + || (tTargetedBlock + .isReplaceableOreGen(aWorld, iX, iY, iZ, GregTech_API.sBlockStones))))) { + aWorld.setBlock(iX, iY, iZ, this.mBlock, this.mBlockMeta, 0); + } } } } diff --git a/src/main/java/gregtech/common/GT_Worldgenerator.java b/src/main/java/gregtech/common/GT_Worldgenerator.java index 37b917e8c5..be0eb4e9ea 100644 --- a/src/main/java/gregtech/common/GT_Worldgenerator.java +++ b/src/main/java/gregtech/common/GT_Worldgenerator.java @@ -39,20 +39,20 @@ public class GT_Worldgenerator implements IWorldGenerator { // This is probably not going to work. Trying to create a fake orevein to put into hashtable when there will be no // ores in a vein. public static GT_Worldgen_GT_Ore_Layer noOresInVein = new GT_Worldgen_GT_Ore_Layer( - "NoOresInVein", - false, - 0, - 255, - 0, - 255, - 16, - false, - false, - false, - Materials.Aluminium, - Materials.Aluminium, - Materials.Aluminium, - Materials.Aluminium); + "NoOresInVein", + false, + 0, + 255, + 0, + 255, + 16, + false, + false, + false, + Materials.Aluminium, + Materials.Aluminium, + Materials.Aluminium, + Materials.Aluminium); public static Hashtable validOreveins = new Hashtable<>(1024); public boolean mIsGenerating = false; public static final Object listLock = new Object(); @@ -70,28 +70,28 @@ public class GT_Worldgenerator implements IWorldGenerator { @Override public void generate(Random aRandom, int aX, int aZ, World aWorld, IChunkProvider aChunkGenerator, - IChunkProvider aChunkProvider) { + IChunkProvider aChunkProvider) { synchronized (listLock) { mList.add( - new WorldGenContainer( - new XSTR(Math.abs(aRandom.nextInt()) + 1), - aX, - aZ, - aWorld.provider.dimensionId, - aWorld, - aChunkGenerator, - aChunkProvider, - aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8).biomeName)); + new WorldGenContainer( + new XSTR(Math.abs(aRandom.nextInt()) + 1), + aX, + aZ, + aWorld.provider.dimensionId, + aWorld, + aChunkGenerator, + aChunkProvider, + aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8).biomeName)); if (debugWorldGen) GT_Log.out.println( - "ADD WorldSeed:" + aWorld.getSeed() - + " DimId" - + aWorld.provider.dimensionId - + " chunk x:" - + aX - + " z:" - + aZ - + " SIZE: " - + mList.size()); + "ADD WorldSeed:" + aWorld.getSeed() + + " DimId" + + aWorld.provider.dimensionId + + " chunk x:" + + aX + + " z:" + + aZ + + " SIZE: " + + mList.size()); } if (!this.mIsGenerating) { @@ -102,17 +102,17 @@ public class GT_Worldgenerator implements IWorldGenerator { for (int i = 0; i < mList_sS; i++) { WorldGenContainer toRun = (WorldGenContainer) mList.get(0); if (debugWorldGen) GT_Log.out.println( - "RUN WorldSeed:" + aWorld.getSeed() - + " DimId" - + aWorld.provider.dimensionId - + " chunk x:" - + toRun.mX - + " z:" - + toRun.mZ - + " SIZE: " - + mList.size() - + " i: " - + i); + "RUN WorldSeed:" + aWorld.getSeed() + + " DimId" + + aWorld.provider.dimensionId + + " chunk x:" + + toRun.mX + + " z:" + + toRun.mZ + + " SIZE: " + + mList.size() + + " i: " + + i); synchronized (listLock) { mList.remove(0); } @@ -166,7 +166,7 @@ public class GT_Worldgenerator implements IWorldGenerator { // aX and aZ are now the by-chunk X and Z for the chunk of interest public WorldGenContainer(Random aRandom, int aX, int aZ, int aDimensionType, World aWorld, - IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider, String aBiome) { + IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider, String aBiome) { this.mRandom = aRandom; this.mX = aX; this.mZ = aZ; @@ -212,8 +212,8 @@ public class GT_Worldgenerator implements IWorldGenerator { // bits of the chunk so we have bits for dimension. // ( (long)oreseedZ & 0x000000000fffffffL )) Puts the chunk Z in the bits 0-27. Cuts off the top few bits // of the chunk so we have bits for dimension. - long oreveinSeed = (this.mWorld.getSeed() << 16) ^ (((this.mWorld.provider.dimensionId & 0xffL) << 56) - | (((long) oreseedX & 0x000000000fffffffL) << 28) + long oreveinSeed = (this.mWorld.getSeed() << 16) + ^ (((this.mWorld.provider.dimensionId & 0xffL) << 56) | (((long) oreseedX & 0x000000000fffffffL) << 28) | ((long) oreseedZ & 0x000000000fffffffL)); // Use an RNG that is identical every time it is // called for // this oreseed. @@ -226,22 +226,22 @@ public class GT_Worldgenerator implements IWorldGenerator { } if (debugOrevein) GT_Log.out.println( - " Finding oreveins for oreveinSeed=" + oreveinSeed - + " mX=" - + this.mX - + " mZ=" - + this.mZ - + " oreseedX=" - + oreseedX - + " oreseedZ=" - + oreseedZ - + " worldSeed=" - + this.mWorld.getSeed()); + " Finding oreveins for oreveinSeed=" + oreveinSeed + + " mX=" + + this.mX + + " mZ=" + + this.mZ + + " oreseedX=" + + oreseedX + + " oreseedZ=" + + oreseedZ + + " worldSeed=" + + this.mWorld.getSeed()); // Search for a valid orevein for this dimension if (!validOreveins.containsKey(oreveinSeed)) { if ((oreveinPercentageRoll < oreveinPercentage) && (GT_Worldgen_GT_Ore_Layer.sWeight > 0) - && (GT_Worldgen_GT_Ore_Layer.sList.size() > 0)) { + && (GT_Worldgen_GT_Ore_Layer.sList.size() > 0)) { int placementAttempts = 0; boolean oreveinFound = false; int i; @@ -254,7 +254,7 @@ public class GT_Worldgenerator implements IWorldGenerator { * ); } } */ for (i = 0; (i < oreveinAttempts) && (!oreveinFound) - && (placementAttempts < oreveinMaxPlacementAttempts); i++) { + && (placementAttempts < oreveinMaxPlacementAttempts); i++) { int tRandomWeight = oreveinRNG.nextInt(GT_Worldgen_GT_Ore_Layer.sWeight); for (GT_Worldgen_GT_Ore_Layer tWorldGen : GT_Worldgen_GT_Ore_Layer.sList) { tRandomWeight -= (tWorldGen).mWeight; @@ -266,28 +266,28 @@ public class GT_Worldgenerator implements IWorldGenerator { // same minimum heights would fail as well. This prevents that, giving each orevein // a unique height each pass through here. int placementResult = tWorldGen.executeWorldgenChunkified( - this.mWorld, - new XSTR(oreveinSeed ^ (tWorldGen.mPrimaryMeta)), - this.mBiome, - this.mDimensionType, - this.mX * 16, - this.mZ * 16, - oreseedX * 16, - oreseedZ * 16, - this.mChunkGenerator, - this.mChunkProvider); + this.mWorld, + new XSTR(oreveinSeed ^ (tWorldGen.mPrimaryMeta)), + this.mBiome, + this.mDimensionType, + this.mX * 16, + this.mZ * 16, + oreseedX * 16, + oreseedZ * 16, + this.mChunkGenerator, + this.mChunkProvider); switch (placementResult) { case GT_Worldgen_GT_Ore_Layer.ORE_PLACED -> { if (debugOrevein) GT_Log.out.println( - " Added near oreveinSeed=" + oreveinSeed - + " " - + (tWorldGen).mWorldGenName - + " tries at oremix=" - + i - + " placementAttempts=" - + placementAttempts - + " dimensionName=" - + tDimensionName); + " Added near oreveinSeed=" + oreveinSeed + + " " + + (tWorldGen).mWorldGenName + + " tries at oremix=" + + i + + " placementAttempts=" + + placementAttempts + + " dimensionName=" + + tDimensionName); validOreveins.put(oreveinSeed, tWorldGen); oreveinFound = true; } @@ -296,29 +296,29 @@ public class GT_Worldgenerator implements IWorldGenerator { // SHould do retry in this case until out of chances case GT_Worldgen_GT_Ore_Layer.NO_OVERLAP -> { if (debugOrevein) GT_Log.out.println( - " Added far oreveinSeed=" + oreveinSeed - + " " - + (tWorldGen).mWorldGenName - + " tries at oremix=" - + i - + " placementAttempts=" - + placementAttempts - + " dimensionName=" - + tDimensionName); + " Added far oreveinSeed=" + oreveinSeed + + " " + + (tWorldGen).mWorldGenName + + " tries at oremix=" + + i + + " placementAttempts=" + + placementAttempts + + " dimensionName=" + + tDimensionName); validOreveins.put(oreveinSeed, tWorldGen); oreveinFound = true; } case GT_Worldgen_GT_Ore_Layer.NO_OVERLAP_AIR_BLOCK -> { if (debugOrevein) GT_Log.out.println( - " No overlap and air block in test spot=" + oreveinSeed - + " " - + (tWorldGen).mWorldGenName - + " tries at oremix=" - + i - + " placementAttempts=" - + placementAttempts - + " dimensionName=" - + tDimensionName); + " No overlap and air block in test spot=" + oreveinSeed + + " " + + (tWorldGen).mWorldGenName + + " tries at oremix=" + + i + + " placementAttempts=" + + placementAttempts + + " dimensionName=" + + tDimensionName); // SHould do retry in this case until out of chances placementAttempts++; } @@ -326,17 +326,17 @@ public class GT_Worldgenerator implements IWorldGenerator { break; // Try the next orevein } catch (Throwable e) { if (debugOrevein) GT_Log.out.println( - "Exception occurred on oreVein" + tWorldGen - + " oreveinSeed=" - + oreveinSeed - + " mX=" - + this.mX - + " mZ=" - + this.mZ - + " oreseedX=" - + oreseedX - + " oreseedZ=" - + oreseedZ); + "Exception occurred on oreVein" + tWorldGen + + " oreveinSeed=" + + oreveinSeed + + " mX=" + + this.mX + + " mZ=" + + this.mZ + + " oreseedX=" + + oreseedX + + " oreseedZ=" + + oreseedZ); e.printStackTrace(GT_Log.err); } } @@ -345,60 +345,60 @@ public class GT_Worldgenerator implements IWorldGenerator { // Only add an empty orevein if unable to place a vein at the oreseed chunk. if ((!oreveinFound) && (this.mX == oreseedX) && (this.mZ == oreseedZ)) { if (debugOrevein) GT_Log.out.println( - " Empty oreveinSeed=" + oreveinSeed - + " mX=" - + this.mX - + " mZ=" - + this.mZ - + " oreseedX=" - + oreseedX - + " oreseedZ=" - + oreseedZ - + " tries at oremix=" - + i - + " placementAttempts=" - + placementAttempts - + " dimensionName=" - + tDimensionName); + " Empty oreveinSeed=" + oreveinSeed + + " mX=" + + this.mX + + " mZ=" + + this.mZ + + " oreseedX=" + + oreseedX + + " oreseedZ=" + + oreseedZ + + " tries at oremix=" + + i + + " placementAttempts=" + + placementAttempts + + " dimensionName=" + + tDimensionName); validOreveins.put(oreveinSeed, noOresInVein); } } else if (oreveinPercentageRoll >= oreveinPercentage) { if (debugOrevein) GT_Log.out.println( - " Skipped oreveinSeed=" + oreveinSeed - + " mX=" - + this.mX - + " mZ=" - + this.mZ - + " oreseedX=" - + oreseedX - + " oreseedZ=" - + oreseedZ - + " RNG=" - + oreveinPercentageRoll - + " %=" - + oreveinPercentage - + " dimensionName=" - + tDimensionName); + " Skipped oreveinSeed=" + oreveinSeed + + " mX=" + + this.mX + + " mZ=" + + this.mZ + + " oreseedX=" + + oreseedX + + " oreseedZ=" + + oreseedZ + + " RNG=" + + oreveinPercentageRoll + + " %=" + + oreveinPercentage + + " dimensionName=" + + tDimensionName); validOreveins.put(oreveinSeed, noOresInVein); } } else { // oreseed is located in the previously processed table - if (debugOrevein) GT_Log.out.print( - " Valid oreveinSeed=" + oreveinSeed + " validOreveins.size()=" + validOreveins.size() + " "); + if (debugOrevein) GT_Log.out + .print(" Valid oreveinSeed=" + oreveinSeed + " validOreveins.size()=" + validOreveins.size() + " "); GT_Worldgen_GT_Ore_Layer tWorldGen = validOreveins.get(oreveinSeed); oreveinRNG.setSeed(oreveinSeed ^ (tWorldGen.mPrimaryMeta)); // Reset RNG to only be based on oreseed X/Z // and type of vein int placementResult = tWorldGen.executeWorldgenChunkified( - this.mWorld, - oreveinRNG, - this.mBiome, - this.mDimensionType, - this.mX * 16, - this.mZ * 16, - oreseedX * 16, - oreseedZ * 16, - this.mChunkGenerator, - this.mChunkProvider); + this.mWorld, + oreveinRNG, + this.mBiome, + this.mDimensionType, + this.mX * 16, + this.mZ * 16, + oreseedX * 16, + oreseedZ * 16, + this.mChunkGenerator, + this.mChunkProvider); switch (placementResult) { case GT_Worldgen_GT_Ore_Layer.NO_ORE_IN_BOTTOM_LAYER -> { if (debugOrevein) GT_Log.out.println(" No ore in bottom layer"); @@ -422,14 +422,14 @@ public class GT_Worldgenerator implements IWorldGenerator { * if (debugWorldGen) GT_Log.out.println( "tWorldGen.mWorldGenName="+tWorldGen.mWorldGenName ); */ tWorldGen.executeWorldgen( - this.mWorld, - this.mRandom, - this.mBiome, - this.mDimensionType, - this.mX * 16, - this.mZ * 16, - this.mChunkGenerator, - this.mChunkProvider); + this.mWorld, + this.mRandom, + this.mBiome, + this.mDimensionType, + this.mX * 16, + this.mZ * 16, + this.mChunkGenerator, + this.mChunkProvider); } } catch (Throwable e) { e.printStackTrace(GT_Log.err); @@ -439,7 +439,7 @@ 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")) { + .equals("Underdark")) { oreveinMaxSize = 32; // Leave Deep Dark/Underdark max oregen at 32, instead of 64 } else { oreveinMaxSize = 32; @@ -478,7 +478,7 @@ public class GT_Worldgenerator implements IWorldGenerator { // (aRandom.nextInt(mEndAsteroidProbability) == 0))) || ((tDimensionName.equals("Asteroids")) && gcAsteroids // && ((mGCAsteroidProbability <= 1) || (aRandom.nextInt(mGCAsteroidProbability) == 0)))) { if (((tDimensionType == 1) && endAsteroids - && ((mEndAsteroidProbability <= 1) || (aRandom.nextInt(mEndAsteroidProbability) == 0)))) { + && ((mEndAsteroidProbability <= 1) || (aRandom.nextInt(mEndAsteroidProbability) == 0)))) { short primaryMeta = 0; short secondaryMeta = 0; short betweenMeta = 0; @@ -519,7 +519,7 @@ public class GT_Worldgenerator implements IWorldGenerator { // mSize = aRandom.nextInt((int) (gcMaxSize - gcMinSize)); } if ((mWorld.getBlock(tX, tY, tZ) - .isAir(mWorld, 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; @@ -533,9 +533,9 @@ public class GT_Worldgenerator implements IWorldGenerator { double zCenter = zBase + (zFactor - zBase) * i / mSize; double randomDistance = aRandom.nextDouble() * mSize / 16.0D; double halfLength = (MathHelper.sin(i * (float) Math.PI / mSize) + 1.0F) * randomDistance - + 1.0D; + + 1.0D; double halfHeight = (MathHelper.sin(i * (float) Math.PI / mSize) + 1.0F) * randomDistance - + 1.0D; + + 1.0D; int tMinX = MathHelper.floor_double(xCenter - halfLength / 2.0D); int tMinY = MathHelper.floor_double(yCenter - halfHeight / 2.0D); int tMinZ = MathHelper.floor_double(zCenter - halfLength / 2.0D); @@ -551,41 +551,21 @@ 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); } @@ -607,12 +587,12 @@ public class GT_Worldgenerator implements IWorldGenerator { long duration = (endTime - startTime); if (debugWorldGen) { GT_Log.out.println( - " Oregen took " + (oregenTime - leftOverTime) - + " Leftover gen took " - + (leftOverTime - startTime) - + " Worldgen took " - + duration - + " nanoseconds"); + " Oregen took " + (oregenTime - leftOverTime) + + " Leftover gen took " + + (leftOverTime - startTime) + + " Worldgen took " + + duration + + " nanoseconds"); } } } diff --git a/src/main/java/gregtech/common/bees/GT_AlleleBeeSpecies.java b/src/main/java/gregtech/common/bees/GT_AlleleBeeSpecies.java index e3b916db88..d4aa78ecf3 100644 --- a/src/main/java/gregtech/common/bees/GT_AlleleBeeSpecies.java +++ b/src/main/java/gregtech/common/bees/GT_AlleleBeeSpecies.java @@ -14,18 +14,18 @@ import forestry.apiculture.genetics.alleles.AlleleBeeSpecies; public class GT_AlleleBeeSpecies extends AlleleBeeSpecies { public GT_AlleleBeeSpecies(String uid, boolean dominant, String unlocalizedName, String authority, - String unlocalizedDescription, IClassification branch, String binomial, Color primaryColor, - Color secondaryColor) { + String unlocalizedDescription, IClassification branch, String binomial, Color primaryColor, + Color secondaryColor) { super( - uid, - unlocalizedName, - authority, - unlocalizedDescription, - dominant, - branch, - binomial, - primaryColor.getRGB(), - secondaryColor.getRGB()); + uid, + unlocalizedName, + authority, + unlocalizedDescription, + dominant, + branch, + binomial, + primaryColor.getRGB(), + secondaryColor.getRGB()); AlleleManager.alleleRegistry.registerAllele(this, EnumBeeChromosome.SPECIES); } diff --git a/src/main/java/gregtech/common/bees/GT_AlleleHelper.java b/src/main/java/gregtech/common/bees/GT_AlleleHelper.java index 8c605f95c6..c9e37f7824 100644 --- a/src/main/java/gregtech/common/bees/GT_AlleleHelper.java +++ b/src/main/java/gregtech/common/bees/GT_AlleleHelper.java @@ -34,28 +34,26 @@ public class GT_AlleleHelper extends AlleleHelper { if (PluginManager.Module.APICULTURE.isEnabled() || PluginManager.Module.ARBORICULTURE.isEnabled()) { createAlleles(EnumAllele.Territory.class, EnumBeeChromosome.TERRITORY, EnumTreeChromosome.TERRITORY); - AlleleManager.alleleRegistry.registerDeprecatedAlleleReplacement( - "forestry.territoryDefault", - get(EnumAllele.Territory.AVERAGE)); + AlleleManager.alleleRegistry + .registerDeprecatedAlleleReplacement("forestry.territoryDefault", get(EnumAllele.Territory.AVERAGE)); } if (PluginManager.Module.APICULTURE.isEnabled() || PluginManager.Module.LEPIDOPTEROLOGY.isEnabled()) { createAlleles(EnumAllele.Speed.class, EnumBeeChromosome.SPEED, EnumButterflyChromosome.SPEED); createAlleles(EnumAllele.Lifespan.class, EnumBeeChromosome.LIFESPAN, EnumButterflyChromosome.LIFESPAN); createAlleles( - EnumAllele.Tolerance.class, - EnumBeeChromosome.TEMPERATURE_TOLERANCE, - EnumBeeChromosome.HUMIDITY_TOLERANCE, - EnumButterflyChromosome.TEMPERATURE_TOLERANCE, - EnumButterflyChromosome.HUMIDITY_TOLERANCE); + EnumAllele.Tolerance.class, + EnumBeeChromosome.TEMPERATURE_TOLERANCE, + EnumBeeChromosome.HUMIDITY_TOLERANCE, + EnumButterflyChromosome.TEMPERATURE_TOLERANCE, + EnumButterflyChromosome.HUMIDITY_TOLERANCE); createAlleles( - EnumAllele.Flowers.class, - EnumBeeChromosome.FLOWER_PROVIDER, - EnumButterflyChromosome.FLOWER_PROVIDER); + EnumAllele.Flowers.class, + 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()) { @@ -66,42 +64,30 @@ 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.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.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.maturityFastest", - get(EnumAllele.Maturation.FASTEST)); + 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.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.maturityFastest", get(EnumAllele.Maturation.FASTEST)); } if (PluginManager.Module.LEPIDOPTEROLOGY.isEnabled()) { @@ -112,10 +98,10 @@ public class GT_AlleleHelper extends AlleleHelper { for (int i = 1; i <= 10; i++) { IAlleleInteger alleleInteger = new AlleleInteger(modId, "i", i + "d", i, true); AlleleManager.alleleRegistry.registerAllele( - alleleInteger, - EnumTreeChromosome.GIRTH, - EnumButterflyChromosome.METABOLISM, - EnumButterflyChromosome.FERTILITY); + alleleInteger, + EnumTreeChromosome.GIRTH, + EnumButterflyChromosome.METABOLISM, + EnumButterflyChromosome.FERTILITY); integers.put(i, alleleInteger); } alleleMaps.put(Integer.class, integers); @@ -125,13 +111,13 @@ public class GT_AlleleHelper extends AlleleHelper { booleans.put(false, new AlleleBoolean(modId, "bool", false, false)); for (IAlleleBoolean alleleBoolean : booleans.values()) { AlleleManager.alleleRegistry.registerAllele( - alleleBoolean, - EnumBeeChromosome.NOCTURNAL, - EnumBeeChromosome.TOLERANT_FLYER, - EnumBeeChromosome.CAVE_DWELLING, - EnumButterflyChromosome.NOCTURNAL, - EnumButterflyChromosome.TOLERANT_FLYER, - EnumButterflyChromosome.FIRE_RESIST); + alleleBoolean, + EnumBeeChromosome.NOCTURNAL, + EnumBeeChromosome.TOLERANT_FLYER, + EnumBeeChromosome.CAVE_DWELLING, + EnumButterflyChromosome.NOCTURNAL, + EnumButterflyChromosome.TOLERANT_FLYER, + EnumButterflyChromosome.FIRE_RESIST); } alleleMaps.put(Boolean.class, booleans); } @@ -141,10 +127,8 @@ public class GT_AlleleHelper extends AlleleHelper { GT_AlleleHelper helper = new GT_AlleleHelper(); try { - helper.alleleMaps = (Map, Map>) FieldUtils.readField( - FieldUtils.getField(AlleleHelper.class, "alleleMaps", true), - AlleleHelper.instance, - true); + helper.alleleMaps = (Map, Map>) FieldUtils + .readField(FieldUtils.getField(AlleleHelper.class, "alleleMaps", true), AlleleHelper.instance, true); } catch (IllegalAccessException e) { e.printStackTrace(); } @@ -162,7 +146,7 @@ public class GT_AlleleHelper extends AlleleHelper { } if (!chromosomeType.getAlleleClass() - .isInstance(allele)) { + .isInstance(allele)) { GT_Mod.GT_FML_LOGGER.info("chromosomeType is not an instance of allele!" + allele.getName()); return; } @@ -228,7 +212,7 @@ public class GT_AlleleHelper extends AlleleHelper { private & IAlleleValue, V> void createAlleles(Class enumClass, IChromosomeType... types) { String category = enumClass.getSimpleName() - .toLowerCase(Locale.ENGLISH); + .toLowerCase(Locale.ENGLISH); EnumMap map = new EnumMap<>(enumClass); for (K enumValue : enumClass.getEnumConstants()) { IAllele allele = createAllele(category, enumValue, types); @@ -238,11 +222,11 @@ public class GT_AlleleHelper extends AlleleHelper { } private static , V> IAllele createAllele(String category, K enumValue, - IChromosomeType... types) { + IChromosomeType... types) { V value = enumValue.getValue(); boolean isDominant = enumValue.isDominant(); String name = enumValue.toString() - .toLowerCase(Locale.ENGLISH); + .toLowerCase(Locale.ENGLISH); Class valueClass = value.getClass(); if (Float.class.isAssignableFrom(valueClass)) { @@ -251,34 +235,22 @@ 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)) { IAlleleTolerance alleleTolerance = new AlleleTolerance( - modId, - category, - name, - (EnumTolerance) value, - isDominant); + modId, + category, + name, + (EnumTolerance) value, + isDominant); 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 b79fb98c73..17a764e2b9 100644 --- a/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java +++ b/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java @@ -33,7 +33,7 @@ public class GT_Bee_Mutation extends BeeMutation { @Override public float getChance(IBeeHousing housing, IAlleleBeeSpecies allele0, IAlleleBeeSpecies allele1, - IBeeGenome genome0, IBeeGenome genome1) { + IBeeGenome genome0, IBeeGenome genome1) { World world = housing != null ? housing.getWorld() : null; ChunkCoordinates housingCoordinates = housing != null ? housing.getCoordinates() : null; int x = housingCoordinates != null ? housingCoordinates.posX : 0; @@ -48,7 +48,7 @@ public class GT_Bee_Mutation extends BeeMutation { IBeeModifier beeHousingModifier = BeeManager.beeRoot.createBeeHousingModifier(housing); IBeeModifier beeModeModifier = BeeManager.beeRoot.getBeekeepingMode(world) - .getBeeModifier(); + .getBeeModifier(); processedChance *= beeHousingModifier.getMutationModifier(genome0, genome1, processedChance); processedChance *= beeModeModifier.getMutationModifier(genome0, genome1, processedChance); @@ -58,7 +58,7 @@ public class GT_Bee_Mutation extends BeeMutation { @SuppressWarnings("unchecked") private float getBasicChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, - IGenome genome1, IClimateProvider climate) { + IGenome genome1, IClimateProvider climate) { float mutationChance = this.getBaseChance(); List mutationConditions = null; Field f = FieldUtils.getDeclaredField(Mutation.class, "mutationConditions", true); 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 5751ebc703..ea5c569ac7 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java @@ -33,9 +33,8 @@ 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"); @@ -99,8 +98,7 @@ public class GT_Block_Casings1 extends GT_Block_Casings_Abstract { @Override public int colorMultiplier(IBlockAccess aWorld, int aX, int aY, int aZ) { return aWorld.getBlockMetadata(aX, aY, aZ) > 9 ? super.colorMultiplier(aWorld, aX, aY, aZ) - : gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[0] << 16 - | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 - | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; + : gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[0] << 16 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 + | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; } } 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 dfc5ff974b..14960eea10 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java @@ -20,12 +20,12 @@ 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()), - 0, - ForgeDirection.UNKNOWN, - Dyes.MACHINE_METAL.mRGBa); + Block.getBlockFromItem( + ItemList.Casing_ULV.get(1) + .getItem()), + 0, + ForgeDirection.UNKNOWN, + Dyes.MACHINE_METAL.mRGBa); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Solid Steel Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Frost Proof Machine Casing"); @@ -91,8 +91,8 @@ public class GT_Block_Casings2 extends GT_Block_Casings_Abstract { @Override public float getExplosionResistance(Entity aTNT, World aWorld, int aX, int aY, int aZ, double eX, double eY, - double eZ) { + double eZ) { return aWorld.getBlockMetadata(aX, aY, aZ) == 8 ? Blocks.bedrock.getExplosionResistance(aTNT) - : super.getExplosionResistance(aTNT, aWorld, aX, aY, aZ, eX, eY, eZ); + : super.getExplosionResistance(aTNT, aWorld, aX, aY, aZ, eX, eY, eZ); } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java index 3985acf049..92bb58aead 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java @@ -67,11 +67,11 @@ public class GT_Block_Casings3 extends GT_Block_Casings_Abstract { case 11 -> Textures.BlockIcons.MACHINE_CASING_VENT.getIcon(); case 12 -> Textures.BlockIcons.MACHINE_CASING_RADIATIONPROOF.getIcon(); case 13 -> aSide > 1 ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_BRONZE.getIcon() - : Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS.getIcon(); + : Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS.getIcon(); case 14 -> aSide > 1 ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_STEEL.getIcon() - : Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + : Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); case 15 -> aSide > 1 ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_TUNGSTENSTEEL.getIcon() - : Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); + : Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); default -> Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); }; } 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 e95935ab78..5b1972b59e 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java @@ -25,29 +25,27 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { * original getIcon implementation to understand why it is 0, 1, etc, if that if ladder is even intelligible. */ private static final int[][] mapping = new int[][] { - { 7, 7, 7, 7, 0, 7, 0, 7, 1, 7, 1, 7, 8, 7, 8, 7, 0, 7, 0, 7, 0, 7, 0, 7, 9, 7, 9, 7, 3, 7, 3, 7, 1, 7, 1, - 7, 11, 7, 11, 7, 1, 7, 1, 7, 2, 7, 2, 7, 10, 7, 10, 7, 5, 7, 5, 7, 4, 7, 4, 7, 6, 7, 6, 7 }, - { 7, 7, 7, 7, 0, 0, 7, 7, 1, 1, 7, 7, 8, 8, 7, 7, 0, 0, 7, 7, 0, 0, 7, 7, 9, 9, 7, 7, 3, 3, 7, 7, 1, 1, 7, - 7, 11, 11, 7, 7, 1, 1, 7, 7, 2, 2, 7, 7, 10, 10, 7, 7, 5, 5, 7, 7, 4, 4, 7, 7, 6, 6, 7, 7 }, - { 7, 1, 1, 1, 0, 9, 10, 4, 7, 1, 1, 1, 0, 9, 10, 4, 0, 8, 11, 2, 0, 3, 5, 6, 0, 8, 11, 2, 0, 3, 5, 6, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 }, - { 7, 1, 1, 1, 0, 8, 11, 2, 7, 7, 7, 7, 7, 7, 7, 7, 0, 9, 10, 4, 0, 3, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 1, - 1, 0, 8, 11, 2, 7, 7, 7, 7, 7, 7, 7, 7, 0, 9, 10, 4, 0, 3, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7 }, - { 7, 1, 1, 1, 7, 1, 1, 1, 0, 8, 11, 2, 0, 8, 11, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 9, - 10, 4, 0, 9, 10, 4, 0, 3, 5, 6, 0, 3, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 }, - { 7, 1, 1, 1, 7, 7, 7, 7, 0, 9, 10, 4, 7, 7, 7, 7, 7, 1, 1, 1, 7, 7, 7, 7, 0, 9, 10, 4, 7, 7, 7, 7, 0, 8, - 11, 2, 7, 7, 7, 7, 0, 3, 5, 6, 7, 7, 7, 7, 0, 8, 11, 2, 7, 7, 7, 7, 0, 3, 5, 6, 7, 7, 7, 7 }, }; + { 7, 7, 7, 7, 0, 7, 0, 7, 1, 7, 1, 7, 8, 7, 8, 7, 0, 7, 0, 7, 0, 7, 0, 7, 9, 7, 9, 7, 3, 7, 3, 7, 1, 7, 1, 7, + 11, 7, 11, 7, 1, 7, 1, 7, 2, 7, 2, 7, 10, 7, 10, 7, 5, 7, 5, 7, 4, 7, 4, 7, 6, 7, 6, 7 }, + { 7, 7, 7, 7, 0, 0, 7, 7, 1, 1, 7, 7, 8, 8, 7, 7, 0, 0, 7, 7, 0, 0, 7, 7, 9, 9, 7, 7, 3, 3, 7, 7, 1, 1, 7, 7, + 11, 11, 7, 7, 1, 1, 7, 7, 2, 2, 7, 7, 10, 10, 7, 7, 5, 5, 7, 7, 4, 4, 7, 7, 6, 6, 7, 7 }, + { 7, 1, 1, 1, 0, 9, 10, 4, 7, 1, 1, 1, 0, 9, 10, 4, 0, 8, 11, 2, 0, 3, 5, 6, 0, 8, 11, 2, 0, 3, 5, 6, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 }, + { 7, 1, 1, 1, 0, 8, 11, 2, 7, 7, 7, 7, 7, 7, 7, 7, 0, 9, 10, 4, 0, 3, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 1, 1, + 0, 8, 11, 2, 7, 7, 7, 7, 7, 7, 7, 7, 0, 9, 10, 4, 0, 3, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7 }, + { 7, 1, 1, 1, 7, 1, 1, 1, 0, 8, 11, 2, 0, 8, 11, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 9, 10, 4, + 0, 9, 10, 4, 0, 3, 5, 6, 0, 3, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 }, + { 7, 1, 1, 1, 7, 7, 7, 7, 0, 9, 10, 4, 7, 7, 7, 7, 7, 1, 1, 1, 7, 7, 7, 7, 0, 9, 10, 4, 7, 7, 7, 7, 0, 8, 11, 2, + 7, 7, 7, 7, 0, 3, 5, 6, 7, 7, 7, 7, 0, 8, 11, 2, 7, 7, 7, 7, 0, 3, 5, 6, 7, 7, 7, 7 }, }; public static boolean mConnectedMachineTextures = true; 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"); @@ -94,7 +92,7 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { case 1, 10 -> Textures.BlockIcons.MACHINE_CASING_CLEAN_STAINLESSSTEEL.getIcon(); case 2, 11 -> Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); case 3 -> aSide > 1 ? Textures.BlockIcons.MACHINE_CASING_FIREBOX_TITANIUM.getIcon() - : Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); + : Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); case 4 -> // Do not overwrite! Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW.getIcon(); @@ -116,13 +114,13 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { public IIcon getTurbineCasing(int meta, int iconIndex, boolean active) { return switch (meta) { case 10 -> active ? Textures.BlockIcons.TURBINE_ACTIVE1[iconIndex].getIcon() - : Textures.BlockIcons.TURBINE1[iconIndex].getIcon(); + : Textures.BlockIcons.TURBINE1[iconIndex].getIcon(); case 11 -> active ? Textures.BlockIcons.TURBINE_ACTIVE2[iconIndex].getIcon() - : Textures.BlockIcons.TURBINE2[iconIndex].getIcon(); + : Textures.BlockIcons.TURBINE2[iconIndex].getIcon(); case 12 -> active ? Textures.BlockIcons.TURBINE_ACTIVE3[iconIndex].getIcon() - : Textures.BlockIcons.TURBINE3[iconIndex].getIcon(); + : Textures.BlockIcons.TURBINE3[iconIndex].getIcon(); default -> active ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() - : Textures.BlockIcons.TURBINE[iconIndex].getIcon(); + : Textures.BlockIcons.TURBINE[iconIndex].getIcon(); }; } @@ -130,17 +128,17 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { public IIcon getTurbineCasing(int meta, int iconIndex, boolean active, boolean hasTurbine) { return switch (meta) { case 10 -> active ? Textures.BlockIcons.TURBINE_ACTIVE1[iconIndex].getIcon() - : hasTurbine ? Textures.BlockIcons.TURBINE1[iconIndex].getIcon() - : Textures.BlockIcons.TURBINE_EMPTY1[iconIndex].getIcon(); + : hasTurbine ? Textures.BlockIcons.TURBINE1[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE_EMPTY1[iconIndex].getIcon(); case 11 -> active ? Textures.BlockIcons.TURBINE_ACTIVE2[iconIndex].getIcon() - : hasTurbine ? Textures.BlockIcons.TURBINE2[iconIndex].getIcon() - : Textures.BlockIcons.TURBINE_EMPTY2[iconIndex].getIcon(); + : hasTurbine ? Textures.BlockIcons.TURBINE2[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE_EMPTY2[iconIndex].getIcon(); case 12 -> active ? Textures.BlockIcons.TURBINE_ACTIVE3[iconIndex].getIcon() - : hasTurbine ? Textures.BlockIcons.TURBINE3[iconIndex].getIcon() - : Textures.BlockIcons.TURBINE_EMPTY3[iconIndex].getIcon(); + : hasTurbine ? Textures.BlockIcons.TURBINE3[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE_EMPTY3[iconIndex].getIcon(); default -> active ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() - : hasTurbine ? Textures.BlockIcons.TURBINE[iconIndex].getIcon() - : Textures.BlockIcons.TURBINE_EMPTY[iconIndex].getIcon(); + : hasTurbine ? Textures.BlockIcons.TURBINE[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE_EMPTY[iconIndex].getIcon(); }; } @@ -148,7 +146,7 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (!(tTileEntity instanceof IGregTechTileEntity tTile)) return 0; if (tTile.getMetaTileEntity() instanceof GT_MetaTileEntity_LargeTurbine turbine - && tTile.getFrontFacing() == aSide) { + && tTile.getFrontFacing() == aSide) { if (turbine.isNewStyleRendering()) return 0; if (tTile.isActive()) return 1; return turbine.hasTurbine() ? 2 : 3; @@ -162,7 +160,7 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { aWorld = GT_RenderingWorld.getInstance(aWorld); int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); if (tMeta != 6 && tMeta != 8 && tMeta != 9 && tMeta != 10 && tMeta != 11 && tMeta != 12 - || !mConnectedMachineTextures) { + || !mConnectedMachineTextures) { return getIcon(aSide, tMeta); } if (tMeta > 8 && tMeta < 13) { @@ -174,7 +172,7 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { if (i == 0 && j == 0) continue; int tState; if ((tState = isTurbineControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, aSide)) - != 0) { + != 0) { return getTurbineCasing(tMeta, 4 - i * 3 - j, tState == 1, tState == 2); } } @@ -186,12 +184,12 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { if (i == 0 && j == 0) continue; int tState; if ((tState = isTurbineControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, aSide)) - != 0) { + != 0) { return getTurbineCasing( - tMeta, - 4 + i * 3 - j * tInvertLeftRightMod, - tState == 1, - tState == 2); + tMeta, + 4 + i * 3 - j * tInvertLeftRightMod, + tState == 1, + tState == 2); } } } @@ -202,12 +200,12 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { if (i == 0 && j == 0) continue; int tState; if ((tState = isTurbineControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, aSide)) - != 0) { + != 0) { return getTurbineCasing( - tMeta, - 4 + i * 3 + j * tInvertLeftRightMod, - tState == 1, - tState == 2); + tMeta, + 4 + i * 3 + j * tInvertLeftRightMod, + tState == 1, + tState == 2); } } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java index 92ba33a4b9..cde7a8b5fa 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java @@ -84,7 +84,7 @@ public class GT_Block_Casings6 extends GT_Block_Casings_Abstract { @Override public int colorMultiplier(IBlockAccess aWorld, int aX, int aY, int aZ) { return gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[0] << 16 - | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 - | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; + | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 + | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; } } 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 6e6313c05c..b4778ec12e 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java @@ -31,26 +31,23 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Mining Black Plutonium Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Extreme Engine Intake Casing"); GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + ".5.name", - "Europium Reinforced Radiation Proof Machine Casing"); + getUnlocalizedName() + ".5.name", + "Europium Reinforced Radiation Proof Machine Casing"); GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + ".6.name", - "Advanced Rhodium Plated Palladium Machine Casing"); - GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + ".7.name", - "Advanced Iridium Plated Machine Casing"); + getUnlocalizedName() + ".6.name", + "Advanced Rhodium Plated Palladium 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() + ".12.name", "Reinforced Photolithographic Framework Casing"); GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + ".11.name", - "Basic Photolithographic Framework Casing"); - GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + ".12.name", - "Reinforced Photolithographic Framework Casing"); - GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + ".13.name", - "Radiation Proof Photolithographic Framework Casing"); + getUnlocalizedName() + ".13.name", + "Radiation Proof Photolithographic Framework Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Infinity Cooled Casing"); ItemList.Casing_Chemically_Inert.set(new ItemStack(this, 1, 0)); @@ -103,20 +100,20 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { public IIcon getTurbineCasing(int meta, int iconIndex, boolean active) { return switch (meta) { case 9 -> active ? Textures.BlockIcons.TURBINE_ADVGASACTIVE[iconIndex].getIcon() - : Textures.BlockIcons.TURBINEADVGAS[iconIndex].getIcon(); + : Textures.BlockIcons.TURBINEADVGAS[iconIndex].getIcon(); default -> active ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() - : Textures.BlockIcons.TURBINE[iconIndex].getIcon(); + : Textures.BlockIcons.TURBINE[iconIndex].getIcon(); }; } public IIcon getTurbineCasing(int meta, int iconIndex, boolean active, boolean hasTurbine) { return switch (meta) { case 9 -> active ? Textures.BlockIcons.TURBINE_ADVGASACTIVE[iconIndex].getIcon() - : hasTurbine ? Textures.BlockIcons.TURBINEADVGAS[iconIndex].getIcon() - : Textures.BlockIcons.TURBINE_ADVGASEMPTY[iconIndex].getIcon(); + : hasTurbine ? Textures.BlockIcons.TURBINEADVGAS[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE_ADVGASEMPTY[iconIndex].getIcon(); default -> active ? Textures.BlockIcons.TURBINE_ACTIVE[iconIndex].getIcon() - : hasTurbine ? Textures.BlockIcons.TURBINE[iconIndex].getIcon() - : Textures.BlockIcons.TURBINE_EMPTY[iconIndex].getIcon(); + : hasTurbine ? Textures.BlockIcons.TURBINE[iconIndex].getIcon() + : Textures.BlockIcons.TURBINE_EMPTY[iconIndex].getIcon(); }; } @@ -124,7 +121,7 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (!(tTileEntity instanceof IGregTechTileEntity tTile)) return 0; if (tTile.getMetaTileEntity() instanceof GT_MetaTileEntity_LargeTurbine turbine - && tTile.getFrontFacing() == aSide) { + && tTile.getFrontFacing() == aSide) { if (turbine.isNewStyleRendering()) return 0; if (tTile.isActive()) return 1; return turbine.hasTurbine() ? 2 : 3; @@ -149,7 +146,7 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { if (i == 0 && j == 0) continue; int tState; if ((tState = isTurbineControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, aSide)) - != 0) { + != 0) { return getTurbineCasing(tMeta, 4 - i * 3 - j, tState == 1, tState == 2); } } @@ -161,12 +158,12 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { if (i == 0 && j == 0) continue; int tState; if ((tState = isTurbineControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, aSide)) - != 0) { + != 0) { return getTurbineCasing( - tMeta, - 4 + i * 3 - j * tInvertLeftRightMod, - tState == 1, - tState == 2); + tMeta, + 4 + i * 3 - j * tInvertLeftRightMod, + tState == 1, + tState == 2); } } } @@ -177,12 +174,12 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { if (i == 0 && j == 0) continue; int tState; if ((tState = isTurbineControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, aSide)) - != 0) { + != 0) { return getTurbineCasing( - tMeta, - 4 + i * 3 + j * tInvertLeftRightMod, - tState == 1, - tState == 2); + tMeta, + 4 + i * 3 + j * tInvertLeftRightMod, + tState == 1, + tState == 2); } } } 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 79a026af44..0aa9ca916f 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings9.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings9.java @@ -15,9 +15,8 @@ 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 a7dd8a1fd1..cef97ecb95 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 @@ -25,7 +25,7 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_LanguageManager; public abstract class GT_Block_Casings_Abstract extends GT_Generic_Block - implements gregtech.api.interfaces.IHasIndexedTexture { + implements gregtech.api.interfaces.IHasIndexedTexture { public GT_Block_Casings_Abstract(Class aItemClass, String aName, Material aMaterial) { super(aItemClass, aName, aMaterial); @@ -36,7 +36,7 @@ public abstract class GT_Block_Casings_Abstract extends GT_Generic_Block } public GT_Block_Casings_Abstract(Class aItemClass, String aName, Material aMaterial, - int aMaxMeta) { + int aMaxMeta) { this(aItemClass, aName, aMaterial); for (int i = 0; i < aMaxMeta; i++) { Textures.BlockIcons.setCasingTextureForId(getTextureIndex(i), TextureFactory.of(this, i)); @@ -127,8 +127,7 @@ public abstract class GT_Block_Casings_Abstract extends GT_Generic_Block for (int i = 0; i < 16; i++) { ItemStack aStack = new ItemStack(aItem, 1, i); if (!aStack.getDisplayName() - .contains(".name")) - aList.add(aStack); + .contains(".name")) aList.add(aStack); } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java b/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java index 0207ab975a..ae3588cfa3 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java @@ -73,8 +73,8 @@ public class GT_Block_Concretes extends GT_Block_Stones_Abstract implements IBlo @Override public void onWalkOver(EntityLivingBase aEntity, World aWorld, int aX, int aY, int aZ) { if ((aEntity.motionX != 0 || aEntity.motionZ != 0) && !aEntity.isInWater() - && !aEntity.isWet() - && !aEntity.isSneaking()) { + && !aEntity.isWet() + && !aEntity.isSneaking()) { double tSpeed = (aWorld.getBlock(aX, aY - 1, aZ).slipperiness >= 0.8 ? 1.5 : 1.2); aEntity.motionX *= tSpeed; aEntity.motionZ *= tSpeed; 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 eb8adf7872..e0215e77eb 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java @@ -231,18 +231,12 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo @SuppressWarnings("unchecked") // Old API uses raw List type @Override public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, - List outputAABB, Entity collider) { + List outputAABB, Entity collider) { 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).getMetaTileEntity() != null) { + ((IGregTechTileEntity) tTileEntity) + .addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); return; } super.addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); @@ -252,7 +246,7 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity instanceof IGregTechTileEntity - && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { + && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { return ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); } return super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); @@ -263,7 +257,7 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo public AxisAlignedBB getSelectedBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity instanceof IGregTechTileEntity - && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { + && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { return ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); } return super.getSelectedBoundingBoxFromPool(aWorld, aX, aY, aZ); @@ -273,12 +267,9 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo public void setBlockBoundsBasedOnState(IBlockAccess blockAccess, int aX, int aY, int aZ) { 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); + && (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null)) { + 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; @@ -299,7 +290,7 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity collider) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity instanceof IGregTechTileEntity - && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { + && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { ((IGregTechTileEntity) tTileEntity).onEntityCollidedWithBlock(aWorld, aX, aY, aZ, collider); return; } @@ -348,13 +339,13 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo public float getPlayerRelativeBlockHardness(EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); return tTileEntity instanceof BaseMetaTileEntity && ((BaseMetaTileEntity) tTileEntity).privateAccess() - && !((BaseMetaTileEntity) tTileEntity).playerOwnsThis(aPlayer, true) ? -1.0F - : super.getPlayerRelativeBlockHardness(aPlayer, aWorld, aX, aY, aZ); + && !((BaseMetaTileEntity) tTileEntity).playerOwnsThis(aPlayer, true) ? -1.0F + : super.getPlayerRelativeBlockHardness(aPlayer, aWorld, aX, aY, aZ); } @Override public boolean onBlockActivated(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer, int aSide, - float aOffsetX, float aOffsetY, float aOffsetZ) { + float aOffsetX, float aOffsetY, float aOffsetZ) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity == null) { return false; @@ -362,10 +353,9 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo if (aPlayer.isSneaking()) { final ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem(); if (tCurrentItem != null && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList) - && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWrenchList) - && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWireCutterList) - && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSolderingToolList)) - return false; + && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWrenchList) + && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWireCutterList) + && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSolderingToolList)) return false; } if ((tTileEntity instanceof IGregTechTileEntity)) { if (((IGregTechTileEntity) tTileEntity).getTimer() < 50L) { @@ -374,12 +364,8 @@ 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; } @@ -406,11 +392,11 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity instanceof BaseMetaTileEntity) { GT_Log.exp.printf( - "Explosion at : %d | %d | %d DIMID: %s due to near explosion!%n", - aX, - aY, - aZ, - aWorld.provider.dimensionId); + "Explosion at : %d | %d | %d DIMID: %s due to near explosion!%n", + aX, + aY, + aZ, + aWorld.provider.dimensionId); ((BaseMetaTileEntity) tTileEntity).doEnergyExplosion(); } super.onBlockExploded(aWorld, aX, aY, aZ, aExplosion); @@ -427,19 +413,19 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo for (int i = 0; i < tGregTechTileEntity.getSizeInventory(); i++) { final ItemStack tItem = tGregTechTileEntity.getStackInSlot(i); if ((tItem != null) && (tItem.stackSize > 0) - && (tGregTechTileEntity.isValidSlot(i)) - && tGregTechTileEntity.shouldDropItemAt(i)) { + && (tGregTechTileEntity.isValidSlot(i)) + && tGregTechTileEntity.shouldDropItemAt(i)) { final EntityItem tItemEntity = new EntityItem( - aWorld, - aX + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, - aY + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, - aZ + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, - new ItemStack(tItem.getItem(), tItem.stackSize, tItem.getItemDamage())); + aWorld, + aX + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, + aY + XSTR_INSTANCE.nextFloat() * 0.8F + 0.1F, + 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()); + .setTagCompound( + (NBTTagCompound) tItem.getTagCompound() + .copy()); } tItemEntity.motionX = (XSTR_INSTANCE.nextGaussian() * 0.05D); tItemEntity.motionY = (XSTR_INSTANCE.nextGaussian() * 0.25D); @@ -519,17 +505,17 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo @Override public void dropBlockAsItemWithChance(World aWorld, int aX, int aY, int aZ, int aMetadata, float chance, - int aFortune) { + int aFortune) { if (!aWorld.isRemote) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity != null && (chance < 1.0F)) { if (tTileEntity instanceof BaseMetaTileEntity && (GregTech_API.sMachineNonWrenchExplosions)) { GT_Log.exp.printf( - "Explosion at : %d | %d | %d DIMID: %s NonWrench picking/Rain!%n", - aX, - aY, - aZ, - aWorld.provider.dimensionId); + "Explosion at : %d | %d | %d DIMID: %s NonWrench picking/Rain!%n", + aX, + aY, + aZ, + aWorld.provider.dimensionId); ((BaseMetaTileEntity) tTileEntity).doEnergyExplosion(); } } else { @@ -549,11 +535,11 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo return true; } if (tTileEntity instanceof BaseMetaPipeEntity - && (((BaseMetaPipeEntity) tTileEntity).mConnections & 0xFFFFFFC0) != 0) { + && (((BaseMetaPipeEntity) tTileEntity).mConnections & 0xFFFFFFC0) != 0) { return true; } return tTileEntity instanceof ICoverable - && ((ICoverable) tTileEntity).getCoverIDAtSide((byte) aSide.ordinal()) != 0; + && ((ICoverable) tTileEntity).getCoverIDAtSide((byte) aSide.ordinal()) != 0; } return false; } @@ -609,7 +595,7 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo @Override public float getExplosionResistance(Entity entity, World aWorld, int aX, int aY, int aZ, double explosionX, - double explosionY, double explosionZ) { + double explosionY, double explosionZ) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity instanceof IGregTechTileEntity) { return ((IGregTechTileEntity) tTileEntity).getBlastResistance((byte) 6); @@ -633,7 +619,7 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (!(tTileEntity instanceof IGregTechTileEntity iGregTechTileEntity)) return; iGregTechTileEntity.setFrontFacing( - BaseTileEntity.getSideForPlayerPlacing(aPlayer, SIDE_UP, iGregTechTileEntity.getValidFacings())); + BaseTileEntity.getSideForPlayerPlacing(aPlayer, SIDE_UP, iGregTechTileEntity.getValidFacings())); } @Override @@ -665,14 +651,14 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo final byte aSide = (byte) side; if (side != -1) { final Block facadeBlock = tile.getCoverInfoAtSide(aSide) - .getFacadeBlock(); + .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(); + .getFacadeBlock(); if (facadeBlock != null) { return facadeBlock; } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Metal.java b/src/main/java/gregtech/common/blocks/GT_Block_Metal.java index 00b12eb804..b8aa8b0e00 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Metal.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Metal.java @@ -33,8 +33,8 @@ public class GT_Block_Metal extends GT_Block_Storage { for (int i = 0; i < aMats.length; i++) { if (aMats[i].mMetaItemSubID > 0 && aMats[i].mHasParentMod) { GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + "." + i + ".name", - "Block of " + (GT_LanguageManager.i18nPlaceholder ? "%material" : aMats[i].mDefaultLocalName)); + getUnlocalizedName() + "." + i + ".name", + "Block of " + (GT_LanguageManager.i18nPlaceholder ? "%material" : aMats[i].mDefaultLocalName)); GT_OreDictUnificator.registerOre(aPrefix, aMats[i], new ItemStack(this, 1, i)); } } 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 db239341a3..11768763a8 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores.java @@ -41,8 +41,8 @@ public class GT_Block_Ores extends GT_Block_Ores_Abstract { public OrePrefixes[] getProcessingPrefix() { // Must have 8 entries; an entry can be null to disable automatic // recipes. return new OrePrefixes[] { OrePrefixes.ore, OrePrefixes.oreNetherrack, OrePrefixes.oreEndstone, - OrePrefixes.oreBlackgranite, OrePrefixes.oreRedgranite, OrePrefixes.oreMarble, OrePrefixes.oreBasalt, - null }; + OrePrefixes.oreBlackgranite, OrePrefixes.oreRedgranite, OrePrefixes.oreMarble, OrePrefixes.oreBasalt, + null }; } @Override @@ -92,14 +92,14 @@ public class GT_Block_Ores extends GT_Block_Ores_Abstract { @Override public Materials[] getDroppedDusts() { // Must have 8 entries; can be null. return new Materials[] { Materials.Stone, Materials.Netherrack, Materials.Endstone, Materials.GraniteBlack, - Materials.GraniteRed, Materials.Marble, Materials.Basalt, Materials.Stone }; + Materials.GraniteRed, Materials.Marble, Materials.Basalt, Materials.Stone }; } @Override public boolean[] getEnabledMetas() { return new boolean[] { true, true, true, GT_Mod.gregtechproxy.enableBlackGraniteOres, - GT_Mod.gregtechproxy.enableRedGraniteOres, GT_Mod.gregtechproxy.enableMarbleOres, - GT_Mod.gregtechproxy.enableBasaltOres, true }; + GT_Mod.gregtechproxy.enableRedGraniteOres, GT_Mod.gregtechproxy.enableMarbleOres, + GT_Mod.gregtechproxy.enableBasaltOres, true }; } @Override @@ -109,21 +109,21 @@ public class GT_Block_Ores extends GT_Block_Ores_Abstract { rTextures[1] = TextureFactory.of(Blocks.netherrack); rTextures[2] = TextureFactory.of(Blocks.end_stone); rTextures[3] = TextureFactory.builder() - .addIcon(GRANITE_BLACK_STONE) - .stdOrient() - .build(); + .addIcon(GRANITE_BLACK_STONE) + .stdOrient() + .build(); rTextures[4] = TextureFactory.builder() - .addIcon(GRANITE_RED_STONE) - .stdOrient() - .build(); + .addIcon(GRANITE_RED_STONE) + .stdOrient() + .build(); rTextures[5] = TextureFactory.builder() - .addIcon(MARBLE_STONE) - .stdOrient() - .build(); + .addIcon(MARBLE_STONE) + .stdOrient() + .build(); rTextures[6] = TextureFactory.builder() - .addIcon(BASALT_STONE) - .stdOrient() - .build(); + .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 64f6b2e8ae..10fb15a77c 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 @@ -50,7 +50,7 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements public static Set aBlockedOres = new HashSet<>(); protected GT_Block_Ores_Abstract(String aUnlocalizedName, int aOreMetaCount, boolean aHideFirstMeta, - Material aMaterial) { + Material aMaterial) { super(GT_Item_Ores.class, aUnlocalizedName, aMaterial); this.isBlockContainer = true; setStepSound(soundTypeStone); @@ -66,28 +66,27 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements for (int j = 0; j < aOreMetaCount; j++) { if (!this.getEnabledMetas()[j]) continue; GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + "." + (i + (j * 1000)) + DOT_NAME, - GT_LanguageManager.i18nPlaceholder - ? getLocalizedNameFormat(GregTech_API.sGeneratedMaterials[i]) - : getLocalizedName(GregTech_API.sGeneratedMaterials[i])); + getUnlocalizedName() + "." + (i + (j * 1000)) + DOT_NAME, + GT_LanguageManager.i18nPlaceholder ? getLocalizedNameFormat(GregTech_API.sGeneratedMaterials[i]) + : getLocalizedName(GregTech_API.sGeneratedMaterials[i])); GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + "." + (i + (j * 1000)) + DOT_TOOLTIP, - GregTech_API.sGeneratedMaterials[i].getToolTip()); + getUnlocalizedName() + "." + (i + (j * 1000)) + DOT_TOOLTIP, + GregTech_API.sGeneratedMaterials[i].getToolTip()); GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + "." + ((i + 16000) + (j * 1000)) + DOT_NAME, - "Small " + (GT_LanguageManager.i18nPlaceholder - ? getLocalizedNameFormat(GregTech_API.sGeneratedMaterials[i]) - : getLocalizedName(GregTech_API.sGeneratedMaterials[i]))); + getUnlocalizedName() + "." + ((i + 16000) + (j * 1000)) + DOT_NAME, + "Small " + (GT_LanguageManager.i18nPlaceholder + ? getLocalizedNameFormat(GregTech_API.sGeneratedMaterials[i]) + : getLocalizedName(GregTech_API.sGeneratedMaterials[i]))); GT_LanguageManager.addStringLocalization( - getUnlocalizedName() + "." + ((i + 16000) + (j * 1000)) + DOT_TOOLTIP, - GregTech_API.sGeneratedMaterials[i].getToolTip()); + getUnlocalizedName() + "." + ((i + 16000) + (j * 1000)) + DOT_TOOLTIP, + GregTech_API.sGeneratedMaterials[i].getToolTip()); if ((GregTech_API.sGeneratedMaterials[i].mTypes & 0x8) != 0 - && !aBlockedOres.contains(GregTech_API.sGeneratedMaterials[i])) { + && !aBlockedOres.contains(GregTech_API.sGeneratedMaterials[i])) { GT_OreDictUnificator.registerOre( - this.getProcessingPrefix()[j] != null - ? this.getProcessingPrefix()[j].get(GregTech_API.sGeneratedMaterials[i]) - : "", - new ItemStack(this, 1, i + (j * 1000))); + this.getProcessingPrefix()[j] != null + ? this.getProcessingPrefix()[j].get(GregTech_API.sGeneratedMaterials[i]) + : "", + new ItemStack(this, 1, i + (j * 1000))); if (tHideOres) { if (!(j == 0 && !aHideFirstMeta)) { codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + (j * 1000))); @@ -142,7 +141,7 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements @Override public boolean onBlockActivated(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer, int aSide, - float aOffsetX, float aOffsetY, float aOffsetZ) { + float aOffsetX, float aOffsetY, float aOffsetZ) { if (!aPlayer.isSneaking() || !aPlayer.capabilities.isCreativeMode) { return false; } @@ -159,7 +158,7 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements @Override public boolean onBlockEventReceived(World p_149696_1_, int p_149696_2_, int p_149696_3_, int p_149696_4_, - int p_149696_5_, int p_149696_6_) { + int p_149696_5_, int p_149696_6_) { super.onBlockEventReceived(p_149696_1_, p_149696_2_, p_149696_3_, p_149696_4_, p_149696_5_, p_149696_6_); TileEntity tileentity = p_149696_1_.getTileEntity(p_149696_2_, p_149696_3_, p_149696_4_); return tileentity != null && tileentity.receiveClientEvent(p_149696_5_, p_149696_6_); @@ -187,7 +186,7 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements @Override public float getExplosionResistance(Entity entity, World aWorld, int aX, int aY, int aZ, double explosionX, - double explosionY, double explosionZ) { + double explosionY, double explosionZ) { return 1.0F + getHarvestLevel(aWorld.getBlockMetadata(aX, aY, aZ)) * 1.0F; } @@ -251,14 +250,8 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements @Override @SideOnly(Side.CLIENT) public boolean addHitEffects(World worldObj, MovingObjectPosition target, EffectRenderer effectRenderer) { - GT_Renderer_Block.addHitEffects( - effectRenderer, - this, - worldObj, - target.blockX, - target.blockY, - target.blockZ, - target.sideHit); + GT_Renderer_Block + .addHitEffects(effectRenderer, this, worldObj, target.blockX, target.blockY, target.blockZ, target.sideHit); return true; } @@ -304,8 +297,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 @@ -324,8 +317,7 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements 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))) - aList.add(new ItemStack(aItem, 1, meta)); + .contains(DOT_NAME))) aList.add(new ItemStack(aItem, 1, meta)); } } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB1.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB1.java index 2a27ee0cf9..cacf903c81 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB1.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB1.java @@ -31,7 +31,7 @@ public class GT_Block_Ores_UB1 extends GT_Block_Ores_Abstract { @Override public OrePrefixes[] getProcessingPrefix() { // Must have 8 entries. return new OrePrefixes[] { OrePrefixes.oreRedgranite, OrePrefixes.oreBlackgranite, OrePrefixes.ore, - OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.oreBasalt, OrePrefixes.ore, OrePrefixes.ore }; + OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.oreBasalt, OrePrefixes.ore, OrePrefixes.ore }; } @Override @@ -52,7 +52,7 @@ public class GT_Block_Ores_UB1 extends GT_Block_Ores_Abstract { @Override public Materials[] getDroppedDusts() { // Must have 8 entries; can be null. return new Materials[] { Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, - Materials.Stone, Materials.Stone, Materials.Stone }; + Materials.Stone, Materials.Stone, Materials.Stone }; } @Override @@ -63,10 +63,10 @@ public class GT_Block_Ores_UB1 extends GT_Block_Ores_Abstract { @Override public ITexture[] getTextureSet() { // Must have 16 entries. return new ITexture[] { TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), - TextureFactory.of(aUBBlock, 2), TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), - TextureFactory.of(aUBBlock, 5), TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7), - TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), TextureFactory.of(aUBBlock, 2), - TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), TextureFactory.of(aUBBlock, 5), - TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7) }; + TextureFactory.of(aUBBlock, 2), TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), + TextureFactory.of(aUBBlock, 5), TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7), + TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), TextureFactory.of(aUBBlock, 2), + TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), TextureFactory.of(aUBBlock, 5), + TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7) }; } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB2.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB2.java index d7f08f2466..db8dc4347c 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB2.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB2.java @@ -32,7 +32,7 @@ public class GT_Block_Ores_UB2 extends GT_Block_Ores_Abstract { public OrePrefixes[] getProcessingPrefix() { // Must have 8 entries; an entry can be null to disable automatic // recipes. return new OrePrefixes[] { OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.oreMarble, OrePrefixes.ore, - OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore }; + OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore }; } @Override @@ -53,7 +53,7 @@ public class GT_Block_Ores_UB2 extends GT_Block_Ores_Abstract { @Override public Materials[] getDroppedDusts() { // Must have 8 entries; can be null. return new Materials[] { Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, - Materials.Stone, Materials.Stone, Materials.Stone }; + Materials.Stone, Materials.Stone, Materials.Stone }; } @Override @@ -64,10 +64,10 @@ public class GT_Block_Ores_UB2 extends GT_Block_Ores_Abstract { @Override public ITexture[] getTextureSet() { // Must have 16 entries. return new ITexture[] { TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), - TextureFactory.of(aUBBlock, 2), TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), - TextureFactory.of(aUBBlock, 5), TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7), - TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), TextureFactory.of(aUBBlock, 2), - TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), TextureFactory.of(aUBBlock, 5), - TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7) }; + TextureFactory.of(aUBBlock, 2), TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), + TextureFactory.of(aUBBlock, 5), TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7), + TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), TextureFactory.of(aUBBlock, 2), + TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), TextureFactory.of(aUBBlock, 5), + TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7) }; } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java index 7315d81890..1c8f433adf 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java @@ -32,7 +32,7 @@ public class GT_Block_Ores_UB3 extends GT_Block_Ores_Abstract { public OrePrefixes[] getProcessingPrefix() { // Must have 8 entries; an entry can be null to disable automatic // recipes. return new OrePrefixes[] { OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, - OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore }; + OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore }; } @Override @@ -53,7 +53,7 @@ public class GT_Block_Ores_UB3 extends GT_Block_Ores_Abstract { @Override public Materials[] getDroppedDusts() { // Must have 8 entries; can be null. return new Materials[] { Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, - Materials.Stone, Materials.Stone, Materials.Stone }; + Materials.Stone, Materials.Stone, Materials.Stone }; } @Override @@ -64,10 +64,10 @@ public class GT_Block_Ores_UB3 extends GT_Block_Ores_Abstract { @Override public ITexture[] getTextureSet() { // Must have 16 entries. return new ITexture[] { TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), - TextureFactory.of(aUBBlock, 2), TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), - TextureFactory.of(aUBBlock, 5), TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7), - TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), TextureFactory.of(aUBBlock, 2), - TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), TextureFactory.of(aUBBlock, 5), - TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7) }; + TextureFactory.of(aUBBlock, 2), TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), + TextureFactory.of(aUBBlock, 5), TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7), + TextureFactory.of(aUBBlock, 0), TextureFactory.of(aUBBlock, 1), TextureFactory.of(aUBBlock, 2), + TextureFactory.of(aUBBlock, 3), TextureFactory.of(aUBBlock, 4), TextureFactory.of(aUBBlock, 5), + TextureFactory.of(aUBBlock, 6), TextureFactory.of(aUBBlock, 7) }; } } 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 93a10dc45b..23e55839bf 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java @@ -55,91 +55,91 @@ public class GT_Block_Reinforced extends GT_Generic_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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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)); + 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) }); + new ItemStack(Items.coal, 1, 1), + new Object[] { ItemList.Block_BrittleCharcoal.get(1) }); GT_ModHandler.addCraftingRecipe( - ItemList.Block_Powderbarrel.get(1L), - GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "WSW", "GGG", "WGW", 'W', OrePrefixes.plate.get(Materials.Wood), 'G', - new ItemStack(Items.gunpowder, 1), 'S', new ItemStack(Items.string, 1) }); + ItemList.Block_Powderbarrel.get(1L), + GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "WSW", "GGG", "WGW", 'W', OrePrefixes.plate.get(Materials.Wood), 'G', + new ItemStack(Items.gunpowder, 1), 'S', new ItemStack(Items.string, 1) }); } @Override @@ -247,7 +247,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block { @Override public float getExplosionResistance(Entity entity, World world, int x, int y, int z, double explosionX, - double explosionY, double explosionZ) { + double explosionY, double explosionZ) { if (world == null) { return 0.0F; } @@ -322,7 +322,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block { @Override public void dropBlockAsItemWithChance(World aWorld, int aX, int aY, int aZ, int aMetadata, float chance, - int aFortune) { + int aFortune) { if (aMetadata == 4) { this.dropBlockAsItem(aWorld, aX, aY, aZ, new ItemStack(Items.coal, XSTR_INSTANCE.nextInt(2) + 1, 1)); } else { @@ -336,11 +336,11 @@ public class GT_Block_Reinforced extends GT_Generic_Block { 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(); + .setVolume(1f) + .setIdentifier(SoundResource.GAME_TNT_PRIMED) + .setEntity(entitytntprimed) + .setWorld(world) + .run(); world.setBlockToAir(x, y, z); return false; } @@ -366,11 +366,11 @@ public class GT_Block_Reinforced extends GT_Generic_Block { public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) { if (!world.isRemote && world.getBlockMetadata(x, y, z) == 5) { EntityTNTPrimed entitytntprimed = new EntityTNTPrimed( - world, - x + 0.5F, - y + 0.5F, - z + 0.5F, - explosion.getExplosivePlacedBy()); + world, + x + 0.5F, + y + 0.5F, + z + 0.5F, + explosion.getExplosivePlacedBy()); entitytntprimed.fuse = (world.rand.nextInt(entitytntprimed.fuse / 4) + entitytntprimed.fuse / 8); world.spawnEntityInWorld(entitytntprimed); } @@ -379,10 +379,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) { + float yOffset, float zOffset) { if ((player.getCurrentEquippedItem() != null) && (player.getCurrentEquippedItem() - .getItem() - == Items.flint_and_steel) && world.getBlockMetadata(x, y, z) == 5) { + .getItem() == Items.flint_and_steel) && world.getBlockMetadata(x, y, z) == 5) { removedByPlayer(world, player, x, y, z); return true; @@ -400,8 +399,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block { for (int i = 0; i < 16; i++) { ItemStack aStack = new ItemStack(aItem, 1, i); if (!aStack.getDisplayName() - .contains(".name")) - aList.add(aStack); + .contains(".name")) aList.add(aStack); } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Stones.java b/src/main/java/gregtech/common/blocks/GT_Block_Stones.java index 2f9e9e9d71..253d9d2163 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Stones.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Stones.java @@ -32,17 +32,13 @@ public class GT_Block_Stones extends GT_Block_Stones_Abstract { GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Chiseled Basalt"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Smooth Basalt"); for (int i = 0; i < 16; i++) { + GT_OreDictUnificator + .registerOre(OrePrefixes.stone, i < 8 ? Materials.Marble : Materials.Basalt, new ItemStack(this, 1, i)); + GT_OreDictUnificator + .registerOre(OrePrefixes.block, i < 8 ? Materials.Marble : Materials.Basalt, new ItemStack(this, 1, i)); GT_OreDictUnificator.registerOre( - OrePrefixes.stone, - i < 8 ? Materials.Marble : Materials.Basalt, - new ItemStack(this, 1, i)); - GT_OreDictUnificator.registerOre( - OrePrefixes.block, - i < 8 ? Materials.Marble : Materials.Basalt, - new ItemStack(this, 1, i)); - GT_OreDictUnificator.registerOre( - (i < 8 ? Materials.Marble.mName.toLowerCase() : Materials.Basalt.mName.toLowerCase()), - new ItemStack(this, 1, i)); + (i < 8 ? Materials.Marble.mName.toLowerCase() : Materials.Basalt.mName.toLowerCase()), + new ItemStack(this, 1, i)); } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Stones_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Block_Stones_Abstract.java index 3a9920e7e4..31b81eb5ff 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Stones_Abstract.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Stones_Abstract.java @@ -48,79 +48,79 @@ public class GT_Block_Stones_Abstract extends GT_Generic_Block implements IOreRe GT_ModHandler.addSmeltingRecipe(new ItemStack(this, 1, 14), new ItemStack(this, 1, 8)); GT_ModHandler.addSmeltingRecipe(new ItemStack(this, 1, 15), new ItemStack(this, 1, 8)); GT_Values.RA.addAssemblerRecipe( - new ItemStack(this, 1, 0), - ItemList.Circuit_Integrated.getWithDamage(0L, 4L), - new ItemStack(this, 1, 3), - 50, - 4); + new ItemStack(this, 1, 0), + ItemList.Circuit_Integrated.getWithDamage(0L, 4L), + new ItemStack(this, 1, 3), + 50, + 4); GT_Values.RA.addAssemblerRecipe( - new ItemStack(this, 1, 8), - ItemList.Circuit_Integrated.getWithDamage(0L, 4L), - new ItemStack(this, 1, 11), - 50, - 4); + new ItemStack(this, 1, 8), + ItemList.Circuit_Integrated.getWithDamage(0L, 4L), + new ItemStack(this, 1, 11), + 50, + 4); GT_ModHandler.addCraftingRecipe( - new ItemStack(this, 1, 6), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "f", "X", 'X', new ItemStack(this, 1, 7) }); + new ItemStack(this, 1, 6), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "f", "X", 'X', new ItemStack(this, 1, 7) }); GT_ModHandler.addCraftingRecipe( - new ItemStack(this, 1, 14), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "f", "X", 'X', new ItemStack(this, 1, 15) }); + new ItemStack(this, 1, 14), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "f", "X", 'X', new ItemStack(this, 1, 15) }); GT_ModHandler.addCraftingRecipe( - new ItemStack(this, 1, 4), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "h", "X", 'X', new ItemStack(this, 1, 3) }); + new ItemStack(this, 1, 4), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "h", "X", 'X', new ItemStack(this, 1, 3) }); GT_ModHandler.addCraftingRecipe( - new ItemStack(this, 1, 12), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "h", "X", 'X', new ItemStack(this, 1, 11) }); + new ItemStack(this, 1, 12), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "h", "X", 'X', new ItemStack(this, 1, 11) }); GT_ModHandler.addCraftingRecipe( - new ItemStack(this, 1, 1), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "h", "X", 'X', new ItemStack(this, 1, 0) }); + new ItemStack(this, 1, 1), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "h", "X", 'X', new ItemStack(this, 1, 0) }); GT_ModHandler.addCraftingRecipe( - new ItemStack(this, 1, 9), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "h", "X", 'X', new ItemStack(this, 1, 8) }); + new ItemStack(this, 1, 9), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "h", "X", 'X', new ItemStack(this, 1, 8) }); GT_Values.RA.addForgeHammerRecipe(new ItemStack(this, 1, 3), new ItemStack(this, 1, 4), 16, 10); GT_Values.RA.addForgeHammerRecipe(new ItemStack(this, 1, 11), new ItemStack(this, 1, 12), 16, 10); GT_Values.RA.addForgeHammerRecipe(new ItemStack(this, 1, 0), new ItemStack(this, 1, 1), 16, 10); GT_Values.RA.addForgeHammerRecipe(new ItemStack(this, 1, 8), new ItemStack(this, 1, 9), 16, 10); GT_ModHandler.addCraftingRecipe( - new ItemStack(this, 4, 3), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "XX", "XX", 'X', new ItemStack(this, 4, 0) }); + new ItemStack(this, 4, 3), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "XX", "XX", 'X', new ItemStack(this, 4, 0) }); GT_ModHandler.addCraftingRecipe( - new ItemStack(this, 4, 11), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "XX", "XX", 'X', new ItemStack(this, 4, 8) }); + new ItemStack(this, 4, 11), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "XX", "XX", 'X', new ItemStack(this, 4, 8) }); GT_ModHandler.addCraftingRecipe( - new ItemStack(this, 4, 3), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "XX", "XX", 'X', new ItemStack(this, 4, 7) }); + new ItemStack(this, 4, 3), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "XX", "XX", 'X', new ItemStack(this, 4, 7) }); GT_ModHandler.addCraftingRecipe( - new ItemStack(this, 4, 11), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "XX", "XX", 'X', new ItemStack(this, 4, 15) }); + new ItemStack(this, 4, 11), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "XX", "XX", 'X', new ItemStack(this, 4, 15) }); } @Override public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, - ItemStack aStack) { + ItemStack aStack) { if (aOreDictName.equals(OreDictNames.craftingLensWhite.toString())) { GT_Values.RA.addLaserEngraverRecipe( - new ItemStack(this, 1, 7), - GT_Utility.copyAmount(0L, aStack), - new ItemStack(this, 1, 6), - 50, - 16); + new ItemStack(this, 1, 7), + GT_Utility.copyAmount(0L, aStack), + new ItemStack(this, 1, 6), + 50, + 16); GT_Values.RA.addLaserEngraverRecipe( - new ItemStack(this, 1, 15), - GT_Utility.copyAmount(0L, aStack), - new ItemStack(this, 1, 14), - 50, - 16); + new ItemStack(this, 1, 15), + GT_Utility.copyAmount(0L, aStack), + new ItemStack(this, 1, 14), + 50, + 16); } } 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 47053f6e78..ada3f01cde 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Storage.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Storage.java @@ -97,8 +97,7 @@ public class GT_Block_Storage extends GT_Generic_Block { 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)); + .contains(".name"))) aList.add(new ItemStack(aItem, 1, i)); } } } diff --git a/src/main/java/gregtech/common/blocks/GT_Cyclotron_Coils.java b/src/main/java/gregtech/common/blocks/GT_Cyclotron_Coils.java index 99d80d1cbb..4e5768f199 100644 --- a/src/main/java/gregtech/common/blocks/GT_Cyclotron_Coils.java +++ b/src/main/java/gregtech/common/blocks/GT_Cyclotron_Coils.java @@ -121,8 +121,7 @@ public class GT_Cyclotron_Coils extends GT_Block_Casings_Abstract { @Override public int colorMultiplier(IBlockAccess aWorld, int aX, int aY, int aZ) { return aWorld.getBlockMetadata(aX, aY, aZ) > 9 ? super.colorMultiplier(aWorld, aX, aY, aZ) - : gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[0] << 16 - | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 - | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; + : gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[0] << 16 | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 + | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; } } 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 fb6b8ebc85..f8cda499f1 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java @@ -17,12 +17,10 @@ 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 e7a20e28cb..46b0aba237 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,42 +12,30 @@ 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 294d0df1cc..44c094aa41 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Concretes.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Concretes.java @@ -10,9 +10,8 @@ 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 ebd495784b..52d0db5165 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_LongDistancePipe.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_LongDistancePipe.java @@ -12,12 +12,10 @@ 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 3e946633b3..8cd4684664 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java @@ -67,108 +67,108 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { if (GregTech_API.METATILEENTITIES[tDamage] != null) { final IGregTechTileEntity tTileEntity = GregTech_API.METATILEENTITIES[tDamage].getBaseMetaTileEntity(); if (!GregTech_API.sPostloadFinished - && tTileEntity.getMetaTileEntity() instanceof ISecondaryDescribable) { - final String[] tSecondaryDescription = ((ISecondaryDescribable) tTileEntity.getMetaTileEntity()).getSecondaryDescription(); + && tTileEntity.getMetaTileEntity() instanceof ISecondaryDescribable) { + final String[] tSecondaryDescription = ((ISecondaryDescribable) tTileEntity.getMetaTileEntity()) + .getSecondaryDescription(); addDescription(null, tSecondaryDescription, tDamage, "_Secondary", true); } { final IMetaTileEntity tMetaTileEntity = tTileEntity.getMetaTileEntity(); final String tSuffix = (tMetaTileEntity instanceof ISecondaryDescribable - && ((ISecondaryDescribable) tMetaTileEntity).isDisplaySecondaryDescription()) ? "_Secondary" - : ""; + && ((ISecondaryDescribable) tMetaTileEntity).isDisplaySecondaryDescription()) ? "_Secondary" + : ""; addDescription( - aList, - tTileEntity.getDescription(), - tDamage, - tSuffix, - !GregTech_API.sPostloadFinished); + aList, + tTileEntity.getDescription(), + tDamage, + tSuffix, + !GregTech_API.sPostloadFinished); tMetaTileEntity.addAdditionalTooltipInformation(aStack, aList); } if (tTileEntity.getEUCapacity() > 0L) { if (tTileEntity.getInputVoltage() > 0L) { final byte inputTier = GT_Utility.getTier(tTileEntity.getInputVoltage()); aList.add( - GT_LanguageManager.addStringLocalization( - "TileEntity_EUp_IN", - "Voltage IN: ", - !GregTech_API.sPostloadFinished) + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(tTileEntity.getInputVoltage()) - + " (" - + GT_Utility.getColoredTierNameFromTier(inputTier) - + EnumChatFormatting.GREEN - + ")" - + EnumChatFormatting.GRAY); + GT_LanguageManager.addStringLocalization( + "TileEntity_EUp_IN", + "Voltage IN: ", + !GregTech_API.sPostloadFinished) + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(tTileEntity.getInputVoltage()) + + " (" + + GT_Utility.getColoredTierNameFromTier(inputTier) + + EnumChatFormatting.GREEN + + ")" + + EnumChatFormatting.GRAY); } if (tTileEntity.getOutputVoltage() > 0L) { final byte outputTier = GT_Utility.getTier(tTileEntity.getOutputVoltage()); aList.add( - GT_LanguageManager.addStringLocalization( - "TileEntity_EUp_OUT", - "Voltage OUT: ", - !GregTech_API.sPostloadFinished) + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(tTileEntity.getOutputVoltage()) - + " (" - + GT_Utility.getColoredTierNameFromTier(outputTier) - + EnumChatFormatting.GREEN - + ")" - + EnumChatFormatting.GRAY); + GT_LanguageManager.addStringLocalization( + "TileEntity_EUp_OUT", + "Voltage OUT: ", + !GregTech_API.sPostloadFinished) + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(tTileEntity.getOutputVoltage()) + + " (" + + GT_Utility.getColoredTierNameFromTier(outputTier) + + EnumChatFormatting.GREEN + + ")" + + EnumChatFormatting.GRAY); } if (tTileEntity.getOutputAmperage() > 1L) { aList.add( - GT_LanguageManager.addStringLocalization( - "TileEntity_EUp_AMOUNT", - "Amperage: ", - !GregTech_API.sPostloadFinished) + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(tTileEntity.getOutputAmperage()) - + EnumChatFormatting.GRAY); + GT_LanguageManager.addStringLocalization( + "TileEntity_EUp_AMOUNT", + "Amperage: ", + !GregTech_API.sPostloadFinished) + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(tTileEntity.getOutputAmperage()) + + EnumChatFormatting.GRAY); } aList.add( - GT_LanguageManager.addStringLocalization( - "TileEntity_EUp_STORE", - "Capacity: ", - !GregTech_API.sPostloadFinished) + EnumChatFormatting.BLUE - + GT_Utility.formatNumbers(tTileEntity.getEUCapacity()) - + EnumChatFormatting.GRAY - + " EU"); + GT_LanguageManager.addStringLocalization( + "TileEntity_EUp_STORE", + "Capacity: ", + !GregTech_API.sPostloadFinished) + EnumChatFormatting.BLUE + + GT_Utility.formatNumbers(tTileEntity.getEUCapacity()) + + EnumChatFormatting.GRAY + + " EU"); } } final NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { if (aNBT.getBoolean("mMuffler")) { aList.add( - GT_LanguageManager.addStringLocalization( - "GT_TileEntity_MUFFLER", - "has Muffler Upgrade", - !GregTech_API.sPostloadFinished)); + GT_LanguageManager.addStringLocalization( + "GT_TileEntity_MUFFLER", + "has Muffler Upgrade", + !GregTech_API.sPostloadFinished)); } if (aNBT.getBoolean("mSteamConverter")) { aList.add( - GT_LanguageManager.addStringLocalization( - "GT_TileEntity_STEAMCONVERTER", - "has Steam Upgrade", - !GregTech_API.sPostloadFinished)); + GT_LanguageManager.addStringLocalization( + "GT_TileEntity_STEAMCONVERTER", + "has Steam Upgrade", + !GregTech_API.sPostloadFinished)); } int tAmount = 0; if ((tAmount = aNBT.getByte("mSteamTanks")) > 0) { aList.add( - tAmount + " " - + GT_LanguageManager.addStringLocalization( - "GT_TileEntity_STEAMTANKS", - "Steam Tank Upgrades", - !GregTech_API.sPostloadFinished)); + tAmount + " " + + GT_LanguageManager.addStringLocalization( + "GT_TileEntity_STEAMTANKS", + "Steam Tank Upgrades", + !GregTech_API.sPostloadFinished)); } CoverableTileEntity.addInstalledCoversInformation(aNBT, aList); if (aNBT.hasKey("mColor") && aNBT.getByte("mColor") != -1) { aList.add( - GT_LanguageManager.addStringLocalization( - "GT_TileEntity_COLORED", - "Colored", - !GregTech_API.sPostloadFinished) + " (" - + Dyes.get(aNBT.getByte("mColor") - 1).formatting - + Dyes.get(aNBT.getByte("mColor") - 1).mName - + EnumChatFormatting.GRAY - + ")"); + GT_LanguageManager + .addStringLocalization("GT_TileEntity_COLORED", "Colored", !GregTech_API.sPostloadFinished) + + " (" + + Dyes.get(aNBT.getByte("mColor") - 1).formatting + + Dyes.get(aNBT.getByte("mColor") - 1).mName + + EnumChatFormatting.GRAY + + ")"); } } } catch (Throwable e) { @@ -177,7 +177,7 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { } private void addDescription(@Nullable List aList, @Nullable String[] aDescription, int aDamage, - String aSuffix, boolean aWriteIntoLangFile) { + String aSuffix, boolean aWriteIntoLangFile) { if (aDescription == null) return; for (int i = 0, tLength = aDescription.length; i < tLength; i++) { String tDescLine = aDescription[i]; @@ -194,8 +194,8 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { tRep[j / 2] = tSplitStrings[j]; } final String tTranslated = String.format( - GT_LanguageManager.addStringLocalization(tKey, tBuffer.toString(), aWriteIntoLangFile), - (Object[]) tRep); + GT_LanguageManager.addStringLocalization(tKey, tBuffer.toString(), aWriteIntoLangFile), + (Object[]) tRep); if (aList != null) aList.add(tTranslated); } else { String tTranslated = GT_LanguageManager.addStringLocalization(tKey, tDescLine, aWriteIntoLangFile); @@ -209,9 +209,10 @@ 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); @@ -220,7 +221,7 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { @Override public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, - float hitX, float hitY, float hitZ) { + float hitX, float hitY, float hitZ) { return false; } @@ -241,7 +242,7 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { String aName = super.getItemStackDisplayName(aStack); final short aDamage = (short) getDamage(aStack); if (aDamage >= 0 && aDamage < GregTech_API.METATILEENTITIES.length - && GregTech_API.METATILEENTITIES[aDamage] != null) { + && GregTech_API.METATILEENTITIES[aDamage] != null) { Materials aMaterial = null; if (GregTech_API.METATILEENTITIES[aDamage] instanceof GT_MetaPipeEntity_Item) { aMaterial = ((GT_MetaPipeEntity_Item) GregTech_API.METATILEENTITIES[aDamage]).mMaterial; @@ -264,14 +265,14 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { super.onCreated(aStack, aWorld, aPlayer); final short tDamage = (short) getDamage(aStack); if ((tDamage < 0) || ((tDamage >= GregTech_API.METATILEENTITIES.length) - && (GregTech_API.METATILEENTITIES[tDamage] != null))) { + && (GregTech_API.METATILEENTITIES[tDamage] != null))) { GregTech_API.METATILEENTITIES[tDamage].onCreated(aStack, aWorld, aPlayer); } } @Override public boolean placeBlockAt(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int side, - float hitX, float hitY, float hitZ, int aMeta) { + float hitX, float hitY, float hitZ, int aMeta) { final short tDamage = (short) getDamage(aStack); if (tDamage > 0) { if (GregTech_API.METATILEENTITIES[tDamage] == null) { @@ -283,11 +284,11 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { } if (aWorld.getBlock(aX, aY, aZ) != this.field_150939_a) { throw new GT_ItsNotMyFaultException( - "Failed to place Block even though World.setBlock returned true. It COULD be MCPC/Bukkit causing that. In case you really have that installed, don't report this Bug to me, I don't know how to fix it."); + "Failed to place Block even though World.setBlock returned true. It COULD be MCPC/Bukkit causing that. In case you really have that installed, don't report this Bug to me, I don't know how to fix it."); } if (aWorld.getBlockMetadata(aX, aY, aZ) != tMetaData) { throw new GT_ItsNotMyFaultException( - "Failed to set the MetaValue of the Block even though World.setBlock returned true. It COULD be MCPC/Bukkit causing that. In case you really have that installed, don't report this Bug to me, I don't know how to fix it."); + "Failed to set the MetaValue of the Block even though World.setBlock returned true. It COULD be MCPC/Bukkit causing that. In case you really have that installed, don't report this Bug to me, I don't know how to fix it."); } final IGregTechTileEntity tTileEntity = (IGregTechTileEntity) aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity != null) { @@ -297,7 +298,7 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { tTileEntity.setOwnerUuid(aPlayer.getUniqueID()); } tTileEntity.getMetaTileEntity() - .initDefaultModes(aStack.getTagCompound()); + .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 @@ -326,8 +327,8 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { final short tDamage = (short) getDamage(aStack); final EntityLivingBase tPlayer = (EntityPlayer) aPlayer; if (GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_QuantumChest - || GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_SuperTank - || GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_QuantumTank) { + || GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_SuperTank + || GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_QuantumTank) { final NBTTagCompound tNBT = aStack.stackTagCompound; if (tNBT == null) return; if (tNBT.hasNoTags()) { @@ -335,7 +336,7 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { return; } if ((tNBT.hasKey("mItemCount") && tNBT.getInteger("mItemCount") > 0) || (tNBT.hasKey("mFluid") - && FluidStack.loadFluidStackFromNBT(tNBT.getCompoundTag("mFluid")).amount > 64000)) { + && FluidStack.loadFluidStackFromNBT(tNBT.getCompoundTag("mFluid")).amount > 64000)) { final FluidStack tFluid = FluidStack.loadFluidStackFromNBT(tNBT.getCompoundTag("mFluid")); int tEffectDuration = 1200; if (tFluid != null) { @@ -381,7 +382,7 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { final int tDamage = container.getItemDamage(); final IMetaTileEntity tMetaTile = GregTech_API.METATILEENTITIES[tDamage]; if (!(tMetaTile instanceof GT_MetaTileEntity_QuantumTank - || tMetaTile instanceof GT_MetaTileEntity_SuperTank)) { + || tMetaTile instanceof GT_MetaTileEntity_SuperTank)) { return 0; } if (container.stackTagCompound == null) container.stackTagCompound = new NBTTagCompound(); @@ -414,7 +415,7 @@ public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { final int tDamage = container.getItemDamage(); final IMetaTileEntity tMetaTile = GregTech_API.METATILEENTITIES[tDamage]; if (!(tMetaTile instanceof GT_MetaTileEntity_QuantumTank - || tMetaTile instanceof GT_MetaTileEntity_SuperTank)) { + || tMetaTile instanceof GT_MetaTileEntity_SuperTank)) { return null; } final FluidStack tStoredFluid = getFluid(container); 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 2471c514a9..03a2591542 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Ores.java @@ -25,7 +25,7 @@ public class GT_Item_Ores extends ItemBlock { @Override public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, - float hitX, float hitY, float hitZ) { + float hitX, float hitY, float hitZ) { return false; } @@ -45,18 +45,18 @@ public class GT_Item_Ores extends ItemBlock { @Override public boolean placeBlockAt(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int side, - float hitX, float hitY, float hitZ, int aMeta) { + float hitX, float hitY, float hitZ, int aMeta) { short tDamage = (short) getDamage(aStack); if (tDamage > 0) { if (!aWorld.setBlock( - aX, - aY, - aZ, - this.field_150939_a, - GT_TileEntity_Ores.getHarvestData( - tDamage, - ((GT_Block_Ores_Abstract) field_150939_a).getBaseBlockHarvestLevel(aMeta % 16000 / 1000)), - 3)) { + aX, + aY, + aZ, + this.field_150939_a, + GT_TileEntity_Ores.getHarvestData( + tDamage, + ((GT_Block_Ores_Abstract) field_150939_a).getBaseBlockHarvestLevel(aMeta % 16000 / 1000)), + 3)) { return false; } GT_TileEntity_Ores tTileEntity = (GT_TileEntity_Ores) aWorld.getTileEntity(aX, aY, aZ); @@ -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 0b44d223a9..5b73108301 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,9 +12,8 @@ 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 099ccf2e65..4add136ab5 100644 --- a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java @@ -35,17 +35,15 @@ 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( - aBaseBlockHarvestLevel, - Math.min( - GT_Mod.gregtechproxy.mMaxHarvestLevel, - GT_Mod.gregtechproxy.mHarvestLevel[aMaterial.mMetaItemSubID] - - (aMetaData < 16000 ? 0 : 1))); + : (byte) Math.max( + aBaseBlockHarvestLevel, + Math.min( + GT_Mod.gregtechproxy.mMaxHarvestLevel, + GT_Mod.gregtechproxy.mHarvestLevel[aMaterial.mMetaItemSubID] - (aMetaData < 16000 ? 0 : 1))); } return tByte; } @@ -55,7 +53,7 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit } public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData, boolean isSmallOre, - boolean air) { + boolean air) { if (!air) { aY = Math.min(aWorld.getActualHeight(), Math.max(aY, 1)); } @@ -115,14 +113,14 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit } // GT_FML_LOGGER.info(tOreBlock); aWorld.setBlock( - aX, - aY, - aZ, - tOreBlock, - getHarvestData( - (short) aMetaData, - ((GT_Block_Ores_Abstract) tOreBlock).getBaseBlockHarvestLevel(aMetaData % 16000 / 1000)), - 0); + aX, + aY, + aZ, + tOreBlock, + getHarvestData( + (short) aMetaData, + ((GT_Block_Ores_Abstract) tOreBlock).getBaseBlockHarvestLevel(aMetaData % 16000 / 1000)), + 0); TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if ((tTileEntity instanceof GT_TileEntity_Ores)) { ((GT_TileEntity_Ores) tTileEntity).mMetaData = ((short) aMetaData); @@ -151,10 +149,10 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit if ((!this.worldObj.isRemote) && (this.mBlocked)) { this.mBlocked = false; GT_Values.NW.sendPacketToAllPlayersInRange( - this.worldObj, - new GT_Packet_Ores(this.xCoord, (short) this.yCoord, this.zCoord, this.mMetaData), - this.xCoord, - this.zCoord); + this.worldObj, + new GT_Packet_Ores(this.xCoord, (short) this.yCoord, this.zCoord, this.mMetaData), + this.xCoord, + this.zCoord); } } @@ -164,10 +162,10 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit boolean sendUpdate = mBlockedChecked ? !mBlocked : checkBlocked(); if (sendUpdate) { GT_Values.NW.sendPacketToAllPlayersInRange( - this.worldObj, - new GT_Packet_Ores(this.xCoord, (short) this.yCoord, this.zCoord, this.mMetaData), - this.xCoord, - this.zCoord); + this.worldObj, + new GT_Packet_Ores(this.xCoord, (short) this.yCoord, this.zCoord, this.mMetaData), + this.xCoord, + this.zCoord); } } return null; @@ -219,61 +217,51 @@ 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( + } 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( this.worldObj, this.xCoord, this.yCoord, this.zCoord, - Blocks.end_stone)) { - this.mMetaData = ((short) (this.mMetaData + 2000)); - } else - if (aOverridingStoneBlock.isReplaceableOreGen( + GregTech_API.sBlockGranites)) { + if (aOverridingStoneBlock == GregTech_API.sBlockGranites) { + if (aOverridingStoneMeta < 8) { + this.mMetaData = ((short) (this.mMetaData + 3000)); + } else { + this.mMetaData = ((short) (this.mMetaData + 4000)); + } + } else { + this.mMetaData = ((short) (this.mMetaData + 3000)); + } + } else if (aOverridingStoneBlock.isReplaceableOreGen( this.worldObj, this.xCoord, this.yCoord, this.zCoord, - GregTech_API.sBlockGranites)) { - if (aOverridingStoneBlock == GregTech_API.sBlockGranites) { + GregTech_API.sBlockStones)) { + if (aOverridingStoneBlock == GregTech_API.sBlockStones) { if (aOverridingStoneMeta < 8) { - this.mMetaData = ((short) (this.mMetaData + 3000)); + this.mMetaData = ((short) (this.mMetaData + 5000)); } else { - this.mMetaData = ((short) (this.mMetaData + 4000)); + this.mMetaData = ((short) (this.mMetaData + 6000)); } } else { - this.mMetaData = ((short) (this.mMetaData + 3000)); - } - } else - if (aOverridingStoneBlock.isReplaceableOreGen( - this.worldObj, - this.xCoord, - this.yCoord, - this.zCoord, - GregTech_API.sBlockStones)) { - if (aOverridingStoneBlock == GregTech_API.sBlockStones) { - if (aOverridingStoneMeta < 8) { - this.mMetaData = ((short) (this.mMetaData + 5000)); - } else { - this.mMetaData = ((short) (this.mMetaData + 6000)); - } - } else { - this.mMetaData = ((short) (this.mMetaData + 5000)); - } + this.mMetaData = ((short) (this.mMetaData + 5000)); } + } this.worldObj.setBlockMetadataWithNotify( - this.xCoord, - this.yCoord, - this.zCoord, - getHarvestData( - this.mMetaData, - ((GT_Block_Ores_Abstract) blockType).getBaseBlockHarvestLevel(mMetaData % 16000 / 1000)), - 0); + this.xCoord, + this.yCoord, + this.zCoord, + getHarvestData( + this.mMetaData, + ((GT_Block_Ores_Abstract) blockType).getBaseBlockHarvestLevel(mMetaData % 16000 / 1000)), + 0); } public void convertOreBlock(World aWorld, int aX, int aY, int aZ) { @@ -283,14 +271,13 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit if (tTileEntity instanceof GT_TileEntity_Ores) { ((GT_TileEntity_Ores) tTileEntity).mMetaData = aMeta; this.worldObj.setBlockMetadataWithNotify( - this.xCoord, - this.yCoord, - this.zCoord, - getHarvestData( - aMeta, - ((GT_Block_Ores_Abstract) tTileEntity.blockType).getBaseBlockHarvestLevel( - aMeta % 16000 / 1000)), - 0); + this.xCoord, + this.yCoord, + this.zCoord, + getHarvestData( + aMeta, + ((GT_Block_Ores_Abstract) tTileEntity.blockType).getBaseBlockHarvestLevel(aMeta % 16000 / 1000)), + 0); } } @@ -326,21 +313,15 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit Materials aMaterial = aOreMaterial.mOreReplacement; - ItemStack tStack = GT_OreDictUnificator.get( - OrePrefixes.gemExquisite, - aMaterial, - GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), - 1L); + ItemStack tStack = GT_OreDictUnificator + .get(OrePrefixes.gemExquisite, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L); if (tStack != null) { for (int i = 0; i < 1; i++) { tSelector.add(tStack); } } - tStack = GT_OreDictUnificator.get( - OrePrefixes.gemFlawless, - aMaterial, - GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), - 1L); + tStack = GT_OreDictUnificator + .get(OrePrefixes.gemFlawless, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L); if (tStack != null) { for (int i = 0; i < 2; i++) { tSelector.add(tStack); @@ -353,10 +334,10 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit } } tStack = GT_OreDictUnificator.get( - OrePrefixes.gemFlawed, - aMaterial, - GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L), - 1L); + OrePrefixes.gemFlawed, + aMaterial, + GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L), + 1L); if (tStack != null) { for (int i = 0; i < 5; i++) { tSelector.add(tStack); @@ -369,10 +350,10 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit } } tStack = GT_OreDictUnificator.get( - OrePrefixes.gemChipped, - aMaterial, - GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), - 1L); + OrePrefixes.gemChipped, + aMaterial, + GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), + 1L); if (tStack != null) { for (int i = 0; i < 5; i++) { tSelector.add(tStack); @@ -387,21 +368,19 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit if (!tSelector.isEmpty()) { int i = 0; for (int j = Math.max( - 1, - aMaterial.mOreMultiplier - + (aFortune > 0 ? tRandom.nextInt(1 + aFortune * aMaterial.mOreMultiplier) : 0) / 2); i - < j; i++) { + 1, + aMaterial.mOreMultiplier + + (aFortune > 0 ? tRandom.nextInt(1 + aFortune * aMaterial.mOreMultiplier) : 0) / 2); i + < j; i++) { rList.add(GT_Utility.copyAmount(1L, tSelector.get(tRandom.nextInt(tSelector.size())))); } } if (tRandom.nextInt(3 + aFortune) > 1) { Materials dustMat = ((GT_Block_Ores_Abstract) aDroppedOre).getDroppedDusts()[this.mMetaData / 1000 - % 16]; + % 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; @@ -412,22 +391,20 @@ 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 }; + ((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 cc6d2db1e9..0c3cf6986f 100644 --- a/src/main/java/gregtech/common/covers/CoverInfo.java +++ b/src/main/java/gregtech/common/covers/CoverInfo.java @@ -49,7 +49,7 @@ public final class CoverInfo { coverID = aNBT.getInteger(NBT_ID); coverBehavior = GregTech_API.getCoverBehaviorNew(coverID); coverData = aNBT.hasKey(NBT_DATA) ? coverBehavior.createDataObject(aNBT.getTag(NBT_DATA)) - : coverBehavior.createDataObject(); + : coverBehavior.createDataObject(); coveredTile = new WeakReference<>(aTile); } @@ -136,13 +136,8 @@ 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() { @@ -167,11 +162,11 @@ public final class CoverInfo { public ModularWindow createWindow(EntityPlayer player) { final GT_CoverUIBuildContext buildContext = new GT_CoverUIBuildContext( - player, - coverID, - coverSide, - coveredTile.get(), - true); + player, + coverID, + coverSide, + coveredTile.get(), + true); return getCoverBehavior().createWindow(buildContext); } @@ -224,15 +219,8 @@ 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) { @@ -240,15 +228,8 @@ 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 83cf48386d..d7600e0927 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java @@ -53,13 +53,13 @@ public class GT_Cover_Arm extends GT_CoverBehavior { @Override public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { return false; } @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { if ((((aTileEntity instanceof IMachineProgress)) && (!((IMachineProgress) aTileEntity).isAllowedToWork()))) { return aCoverVariable; } @@ -90,24 +90,9 @@ public class GT_Cover_Arm extends GT_CoverBehavior { if (fromSlot > 0 && toSlot > 0) { if (fromTile instanceof IInventory && toTile instanceof IInventory) movedItems = GT_Utility.moveFromSlotToSlot( - (IInventory) fromTile, - (IInventory) toTile, - fromSlot - 1, - toSlot - 1, - null, - false, - (byte) 64, - (byte) 1, - (byte) 64, - (byte) 1); - } else if (toSlot > 0) { - byte side; - if ((aCoverVariable & EXPORT_MASK) > 0) side = aSide; - else side = GT_Utility.getOppositeSide(aSide); - movedItems = GT_Utility.moveOneItemStackIntoSlot( - fromTile, - toTile, - side, + (IInventory) fromTile, + (IInventory) toTile, + fromSlot - 1, toSlot - 1, null, false, @@ -115,21 +100,36 @@ public class GT_Cover_Arm extends GT_CoverBehavior { (byte) 1, (byte) 64, (byte) 1); + } else if (toSlot > 0) { + byte side; + if ((aCoverVariable & EXPORT_MASK) > 0) side = aSide; + else side = GT_Utility.getOppositeSide(aSide); + movedItems = GT_Utility.moveOneItemStackIntoSlot( + fromTile, + toTile, + side, + toSlot - 1, + null, + false, + (byte) 64, + (byte) 1, + (byte) 64, + (byte) 1); } else if (fromSlot > 0) { byte toSide; if ((aCoverVariable & EXPORT_MASK) > 0) toSide = aSide; else toSide = GT_Utility.getOppositeSide(aSide); if (fromTile instanceof IInventory) movedItems = GT_Utility.moveFromSlotToSide( - (IInventory) fromTile, - toTile, - fromSlot - 1, - toSide, - null, - false, - (byte) 64, - (byte) 1, - (byte) 64, - (byte) 1); + (IInventory) fromTile, + toTile, + fromSlot - 1, + toSide, + null, + false, + (byte) 64, + (byte) 1, + (byte) 64, + (byte) 1); } else { byte fromSide, toSide; if ((aCoverVariable & EXPORT_MASK) > 0) { @@ -140,16 +140,16 @@ public class GT_Cover_Arm extends GT_CoverBehavior { toSide = aSide; } movedItems = GT_Utility.moveOneItemStack( - fromTile, - toTile, - fromSide, - toSide, - null, - false, - (byte) 64, - (byte) 1, - (byte) 64, - (byte) 1); + fromTile, + toTile, + fromSide, + toSide, + null, + false, + (byte) 64, + (byte) 1, + (byte) 64, + (byte) 1); } return aCoverVariable; @@ -157,7 +157,7 @@ public class GT_Cover_Arm extends GT_CoverBehavior { @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { + EntityPlayer aPlayer, float aX, float aY, float aZ) { int step = 0; if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { step += aPlayer.isSneaking() ? 256 : 16; @@ -171,8 +171,8 @@ public class GT_Cover_Arm extends GT_CoverBehavior { @Override protected boolean onCoverRightClickImpl(byte aSide, int aCoverID, - ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, - float aY, float aZ) { + ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, + float aY, float aZ) { int step = (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) ? 1 : -1; int tCoverVariable = getNewVar(aCoverVariable.get(), step); sendMessageToPlayer(aPlayer, tCoverVariable); @@ -183,7 +183,7 @@ public class GT_Cover_Arm extends GT_CoverBehavior { @Override @SuppressWarnings("deprecation") public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { + EntityPlayer aPlayer, float aX, float aY, float aZ) { int step = (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) ? 1 : -1; aCoverVariable = getNewVar(aCoverVariable, step); sendMessageToPlayer(aPlayer, aCoverVariable); @@ -193,11 +193,10 @@ public class GT_Cover_Arm extends GT_CoverBehavior { private void sendMessageToPlayer(EntityPlayer aPlayer, int var) { if ((var & EXPORT_MASK) != 0) GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("001", "Puts out into adjacent Slot #") + (((var >> 14) & SLOT_ID_MASK) - 1)); - else GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("002", "Grabs in for own Slot #") + ((var & SLOT_ID_MASK) - 1)); + aPlayer, + GT_Utility.trans("001", "Puts out into adjacent Slot #") + (((var >> 14) & SLOT_ID_MASK) - 1)); + else GT_Utility + .sendChatToPlayer(aPlayer, GT_Utility.trans("002", "Grabs in for own Slot #") + ((var & SLOT_ID_MASK) - 1)); } private int getNewVar(int var, int step) { @@ -305,134 +304,111 @@ 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( - 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_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)); + new CoverDataControllerWidget<>(this::getCoverData, this::setCoverData, GT_Cover_Arm.this).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_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)); } 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 8349dde2ee..872371a355 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java @@ -37,7 +37,7 @@ public class GT_Cover_ControlsWork extends GT_CoverBehavior implements IControls @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { if (!makeSureOnlyOne(aSide, aTileEntity)) return 0; if (aTileEntity instanceof IMachineProgress machine) { if (aCoverVariable < 2) { @@ -53,14 +53,14 @@ public class GT_Cover_ControlsWork extends GT_CoverBehavior implements IControls if (!mPlayerNotified) { mPlayerNotified = true; GT_Utility.sendChatToPlayer( - lastPlayer, - aTileEntity.getInventoryName() + "at " - + String.format( - "(%d,%d,%d)", - aTileEntity.getXCoord(), - aTileEntity.getYCoord(), - aTileEntity.getZCoord()) - + " shut down."); + lastPlayer, + aTileEntity.getInventoryName() + "at " + + String.format( + "(%d,%d,%d)", + aTileEntity.getXCoord(), + aTileEntity.getYCoord(), + aTileEntity.getZCoord()) + + " shut down."); } return 2; } else { @@ -73,7 +73,7 @@ public class GT_Cover_ControlsWork extends GT_CoverBehavior implements IControls @Override protected boolean isRedstoneSensitiveImpl(byte aSide, int aCoverID, - ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, long aTimer) { + ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, long aTimer) { return aCoverVariable.get() != 2; // always off, so no redstone needed either } @@ -119,7 +119,7 @@ public class GT_Cover_ControlsWork extends GT_CoverBehavior implements IControls @Override public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - boolean aForced) { + boolean aForced) { if ((aTileEntity instanceof IMachineProgress)) { ((IMachineProgress) aTileEntity).enableWorking(); ((IMachineProgress) aTileEntity).setWorkDataValue((byte) 0); @@ -129,7 +129,7 @@ public class GT_Cover_ControlsWork extends GT_CoverBehavior implements IControls @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { + EntityPlayer aPlayer, float aX, float aY, float aZ) { aCoverVariable = (aCoverVariable + (aPlayer.isSneaking() ? -1 : 1)) % 5; if (aCoverVariable < 0) { aCoverVariable = 2; @@ -200,75 +200,54 @@ public class GT_Cover_ControlsWork extends GT_CoverBehavior implements IControls @SuppressWarnings("PointlessArithmeticExpression") @Override protected void addUIWidgets(ModularWindow.Builder builder) { - builder.widget( + builder + .widget( new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( - this::getCoverData, - this::setCoverData, - GT_Cover_ControlsWork.this, - (id, coverData) -> !getClickable(id, convert(coverData)), - (id, coverData) -> new ISerializableObject.LegacyCoverData( - getNewCoverVariable(id, convert(coverData)))).addToggleButton( - 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)); + this::getCoverData, + this::setCoverData, + GT_Cover_ControlsWork.this, + (id, coverData) -> !getClickable(id, convert(coverData)), + (id, coverData) -> new ISerializableObject.LegacyCoverData( + getNewCoverVariable(id, convert(coverData)))) + .addToggleButton( + 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)); } 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 ac99e56005..80d7dff6ae 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java @@ -49,13 +49,13 @@ public class GT_Cover_Conveyor extends GT_CoverBehavior { @Override public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { return false; } @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { if ((aCoverVariable % 6 > 1) && ((aTileEntity instanceof IMachineProgress))) { if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable % 6 < 4) { return aCoverVariable; @@ -68,24 +68,24 @@ public class GT_Cover_Conveyor extends GT_CoverBehavior { final byte toSide = aCoverVariable % 2 == 0 ? GT_Utility.getOppositeSide(aSide) : aSide; moveMultipleItemStacks( - fromEntity, - toEntity, - fromSide, - toSide, - null, - false, - (byte) 64, - (byte) 1, - (byte) 64, - (byte) 1, - this.mMaxStacks); + fromEntity, + toEntity, + fromSide, + toSide, + null, + false, + (byte) 64, + (byte) 1, + (byte) 64, + (byte) 1, + this.mMaxStacks); return aCoverVariable; } @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { + EntityPlayer aPlayer, float aX, float aY, float aZ) { aCoverVariable = (aCoverVariable + (aPlayer.isSneaking() ? -1 : 1)) % 12; if (aCoverVariable < 0) { aCoverVariable = 11; @@ -100,15 +100,12 @@ public class GT_Cover_Conveyor extends GT_CoverBehavior { case 6 -> GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("012", "Export allow Input")); case 7 -> GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("013", "Import allow Output")); case 8 -> GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("014", "Export allow Input (conditional)")); - case 9 -> GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("015", "Import allow Output (conditional)")); - case 10 -> GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("016", "Export allow Input (invert cond)")); - case 11 -> GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("017", "Import allow Output (invert cond)")); + case 9 -> GT_Utility + .sendChatToPlayer(aPlayer, GT_Utility.trans("015", "Import allow Output (conditional)")); + case 10 -> GT_Utility + .sendChatToPlayer(aPlayer, GT_Utility.trans("016", "Export allow Input (invert cond)")); + case 11 -> GT_Utility + .sendChatToPlayer(aPlayer, GT_Utility.trans("017", "Import allow Output (invert cond)")); } return aCoverVariable; } @@ -194,111 +191,67 @@ public class GT_Cover_Conveyor extends GT_CoverBehavior { @SuppressWarnings("PointlessArithmeticExpression") @Override protected void addUIWidgets(ModularWindow.Builder builder) { - builder.widget( + builder + .widget( new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( - this::getCoverData, - this::setCoverData, - GT_Cover_Conveyor.this, - (id, coverData) -> !getClickable(id, convert(coverData)), - (id, coverData) -> new ISerializableObject.LegacyCoverData( - getNewCoverVariable(id, convert(coverData)))).addToggleButton( - 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)); + this::getCoverData, + this::setCoverData, + GT_Cover_Conveyor.this, + (id, coverData) -> !getClickable(id, convert(coverData)), + (id, coverData) -> new ISerializableObject.LegacyCoverData( + getNewCoverVariable(id, convert(coverData)))) + .addToggleButton( + 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)); } private int getNewCoverVariable(int id, int coverVariable) { diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Crafting.java b/src/main/java/gregtech/common/covers/GT_Cover_Crafting.java index 4a5c254ee1..139317110b 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Crafting.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Crafting.java @@ -25,23 +25,23 @@ public class GT_Cover_Crafting extends GT_CoverBehavior { @Override public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { return false; } @Override public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { + EntityPlayer aPlayer, float aX, float aY, float aZ) { if ((aPlayer instanceof EntityPlayerMP)) { ((EntityPlayerMP) aPlayer).getNextWindowId(); ((EntityPlayerMP) aPlayer).playerNetServerHandler.sendPacket( - new S2DPacketOpenWindow(((EntityPlayerMP) aPlayer).currentWindowId, 1, "Crafting", 9, true)); + new S2DPacketOpenWindow(((EntityPlayerMP) aPlayer).currentWindowId, 1, "Crafting", 9, true)); aPlayer.openContainer = new ContainerWorkbench( - aPlayer.inventory, - aPlayer.worldObj, - aTileEntity.getXCoord(), - aTileEntity.getYCoord(), - aTileEntity.getZCoord()) { + aPlayer.inventory, + aPlayer.worldObj, + aTileEntity.getXCoord(), + aTileEntity.getYCoord(), + aTileEntity.getZCoord()) { @Override public boolean canInteractWith(EntityPlayer player) { 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 01d95f1664..367f070848 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java @@ -33,29 +33,29 @@ public class GT_Cover_DoesWork extends GT_CoverBehavior { @Override public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { return false; } @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { if ((aTileEntity instanceof IMachineProgress)) { if (aCoverVariable < 2) { int tScale = ((IMachineProgress) aTileEntity).getMaxProgress() / 15; if ((tScale > 0) && (((IMachineProgress) aTileEntity).hasThingsToDo())) { aTileEntity.setOutputRedstoneSignal( - aSide, - aCoverVariable % 2 == 0 ? (byte) (((IMachineProgress) aTileEntity).getProgress() / tScale) - : (byte) (15 - ((IMachineProgress) aTileEntity).getProgress() / tScale)); + aSide, + aCoverVariable % 2 == 0 ? (byte) (((IMachineProgress) aTileEntity).getProgress() / tScale) + : (byte) (15 - ((IMachineProgress) aTileEntity).getProgress() / tScale)); } else { aTileEntity.setOutputRedstoneSignal(aSide, (byte) (aCoverVariable % 2 == 0 ? 0 : 15)); } } else { aTileEntity.setOutputRedstoneSignal( - aSide, - (byte) ((aCoverVariable % 2 == 0 ? 1 : 0) - != (((IMachineProgress) aTileEntity).getMaxProgress() == 0 ? 1 : 0) ? 0 : 15)); + aSide, + (byte) ((aCoverVariable % 2 == 0 ? 1 : 0) + != (((IMachineProgress) aTileEntity).getMaxProgress() == 0 ? 1 : 0) ? 0 : 15)); } } else { aTileEntity.setOutputRedstoneSignal(aSide, (byte) 0); @@ -65,7 +65,7 @@ public class GT_Cover_DoesWork extends GT_CoverBehavior { @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { + EntityPlayer aPlayer, float aX, float aY, float aZ) { aCoverVariable = (aCoverVariable + (aPlayer.isSneaking() ? -1 : 1)) % 4; if (aCoverVariable < 0) { aCoverVariable = 3; @@ -115,7 +115,7 @@ public class GT_Cover_DoesWork extends GT_CoverBehavior { @Override public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, - ICoverable aTileEntity) { + ICoverable aTileEntity) { return true; } @@ -155,48 +155,46 @@ public class GT_Cover_DoesWork extends GT_CoverBehavior { @SuppressWarnings("PointlessArithmeticExpression") @Override protected void addUIWidgets(ModularWindow.Builder builder) { - builder.widget( + builder + .widget( new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( - this::getCoverData, - this::setCoverData, - GT_Cover_DoesWork.this, - (id, coverData) -> isEnabled(id, convert(coverData)), - (id, coverData) -> new ISerializableObject.LegacyCoverData( - getNewCoverVariable(id, convert(coverData)))).addToggleButton( - 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)); + this::getCoverData, + this::setCoverData, + GT_Cover_DoesWork.this, + (id, coverData) -> isEnabled(id, convert(coverData)), + (id, coverData) -> new ISerializableObject.LegacyCoverData( + getNewCoverVariable(id, convert(coverData)))) + .addToggleButton( + 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)); } 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 5f5381a141..82c6e78c57 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Drain.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Drain.java @@ -32,13 +32,13 @@ public class GT_Cover_Drain extends GT_CoverBehavior { @Override public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { return false; } @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { if ((aCoverVariable % 3 > 1) && ((aTileEntity instanceof IMachineProgress))) { if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable % 3 < 2) { return aCoverVariable; @@ -48,68 +48,65 @@ public class GT_Cover_Drain extends GT_CoverBehavior { Block tBlock = aTileEntity.getBlockAtSide(aSide); if ((aCoverVariable < 3) && ((aTileEntity instanceof IFluidHandler))) { if ((aSide == 1) && (aTileEntity.getWorld() - .isRaining()) - && (aTileEntity.getWorld() - .getPrecipitationHeight(aTileEntity.getXCoord(), aTileEntity.getZCoord()) - - 2 < aTileEntity.getYCoord())) { + .isRaining()) + && (aTileEntity.getWorld() + .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), - true); + ForgeDirection.getOrientation(aSide), + Materials.Water.getFluid( + aTileEntity.getWorld() + .isThundering() ? tAmount * 2 : tAmount), + true); } } FluidStack tLiquid = null; if (tBlock != null) { if (((tBlock == Blocks.water) || (tBlock == Blocks.flowing_water)) - && (aTileEntity.getMetaIDAtSide(aSide) == 0)) { + && (aTileEntity.getMetaIDAtSide(aSide) == 0)) { tLiquid = Materials.Water.getFluid(1000L); } else if (((tBlock == Blocks.lava) || (tBlock == Blocks.flowing_lava)) - && (aTileEntity.getMetaIDAtSide(aSide) == 0)) { - tLiquid = Materials.Lava.getFluid(1000L); - } else - if ((tBlock instanceof IFluidBlock)) { + && (aTileEntity.getMetaIDAtSide(aSide) == 0)) { + tLiquid = Materials.Lava.getFluid(1000L); + } else if ((tBlock instanceof IFluidBlock)) { tLiquid = ((IFluidBlock) tBlock).drain( - aTileEntity.getWorld(), - aTileEntity.getOffsetX(aSide, 1), - aTileEntity.getOffsetY(aSide, 1), - aTileEntity.getOffsetZ(aSide, 1), - false); + aTileEntity.getWorld(), + aTileEntity.getOffsetX(aSide, 1), + aTileEntity.getOffsetY(aSide, 1), + aTileEntity.getOffsetZ(aSide, 1), + false); } if ((tLiquid != null) && (tLiquid.getFluid() != null) - && ((aSide > 1) || ((aSide == 0) && (tLiquid.getFluid() - .getDensity() - <= 0)) - || ((aSide == 1) && (tLiquid.getFluid() - .getDensity() - >= 0))) - && (((IFluidHandler) aTileEntity).fill(ForgeDirection.getOrientation(aSide), tLiquid, false) - == tLiquid.amount)) { + && ((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); + .setBlockToAir( + aTileEntity.getXCoord() + ForgeDirection.getOrientation(aSide).offsetX, + aTileEntity.getYCoord() + ForgeDirection.getOrientation(aSide).offsetY, + aTileEntity.getZCoord() + ForgeDirection.getOrientation(aSide).offsetZ); } } } if ((aCoverVariable >= 3) && (tBlock != null) - && ((tBlock == Blocks.lava) || (tBlock == Blocks.flowing_lava) - || (tBlock == Blocks.water) - || (tBlock == Blocks.flowing_water) - || ((tBlock instanceof IFluidBlock)))) { + && ((tBlock == Blocks.lava) || (tBlock == Blocks.flowing_lava) + || (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); + .setBlock( + aTileEntity.getOffsetX(aSide, 1), + aTileEntity.getOffsetY(aSide, 1), + aTileEntity.getOffsetZ(aSide, 1), + Blocks.air, + 0, + 0); } } return aCoverVariable; @@ -117,7 +114,7 @@ public class GT_Cover_Drain extends GT_CoverBehavior { @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { + EntityPlayer aPlayer, float aX, float aY, float aZ) { aCoverVariable = (aCoverVariable + (aPlayer.isSneaking() ? -1 : 1)) % 6; if (aCoverVariable < 0) { aCoverVariable = 5; 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 a57544e55c..613e1e546d 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java @@ -58,7 +58,7 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("031", "Normal Universal Storage")); case 1 -> GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("032", "Inverted Universal Storage")); @@ -107,12 +107,11 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("038", "Inverted Average Electric Input")); case 8 -> GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("039", "Normal Average Electric Output")); case 9 -> GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("040", "Inverted Average Electric Output")); - case 10 -> GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("041", "Normal Electricity Storage(Including Batteries)")); + case 10 -> GT_Utility + .sendChatToPlayer(aPlayer, GT_Utility.trans("041", "Normal Electricity Storage(Including Batteries)")); case 11 -> GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("042", "Inverted Electricity Storage(Including Batteries)")); + aPlayer, + GT_Utility.trans("042", "Inverted Electricity Storage(Including Batteries)")); } aCoverVariable.setNum(num); return aCoverVariable; @@ -121,7 +120,7 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase( - this::getCoverData, - this::setCoverData, - GT_Cover_EUMeter.this).addFollower( - new CoverDataFollower_CycleButtonWidget<>(), - coverData -> coverData.type.ordinal(), - (coverData, state) -> { - coverData.type = EnergyType.getEnergyType(state); - 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)); + new CoverDataControllerWidget<>(this::getCoverData, this::setCoverData, GT_Cover_EUMeter.this) + .addFollower( + new CoverDataFollower_CycleButtonWidget<>(), + coverData -> coverData.type.ordinal(), + (coverData, state) -> { + coverData.type = EnergyType.getEnergyType(state); + 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)); } } @@ -353,34 +342,34 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase te.getInputVoltage() * te.getInputAmperage()), + ICoverable::getAverageElectricInput, (te) -> te.getInputVoltage() * te.getInputAmperage()), AVERAGE_ELECTRIC_OUTPUT(GT_Utility.trans("305", "Avg. Output"), - GT_Utility.trans("260", "Average Electric Output"), ICoverable::getAverageElectricOutput, - (te) -> te.getOutputVoltage() * te.getOutputAmperage()), + GT_Utility.trans("260", "Average Electric Output"), ICoverable::getAverageElectricOutput, + (te) -> te.getOutputVoltage() * te.getOutputAmperage()), ELECTRICITY_STORAGE_INCLUDING_BATTERIES(GT_Utility.trans("306", "EU stored"), - GT_Utility.trans("261", "Electricity Storage(Including Batteries)"), (te) -> { - if (te instanceof IGregTechTileEntity) { - IMetaTileEntity mte = ((IGregTechTileEntity) te).getMetaTileEntity(); - if (mte instanceof GT_MetaTileEntity_BasicBatteryBuffer buffer) { - return buffer.getStoredEnergy()[0]; - } + GT_Utility.trans("261", "Electricity Storage(Including Batteries)"), (te) -> { + if (te instanceof IGregTechTileEntity) { + IMetaTileEntity mte = ((IGregTechTileEntity) te).getMetaTileEntity(); + if (mte instanceof GT_MetaTileEntity_BasicBatteryBuffer buffer) { + return buffer.getStoredEnergy()[0]; } - return te.getStoredEU(); - }, (te) -> { - if (te instanceof IGregTechTileEntity) { - IMetaTileEntity mte = ((IGregTechTileEntity) te).getMetaTileEntity(); - if (mte instanceof GT_MetaTileEntity_BasicBatteryBuffer buffer) { - return buffer.getStoredEnergy()[1]; - } + } + return te.getStoredEU(); + }, (te) -> { + if (te instanceof IGregTechTileEntity) { + IMetaTileEntity mte = ((IGregTechTileEntity) te).getMetaTileEntity(); + if (mte instanceof GT_MetaTileEntity_BasicBatteryBuffer buffer) { + return buffer.getStoredEnergy()[1]; } - return te.getEUCapacity(); - }); + } + return te.getEUCapacity(); + }); private final String title; private final String tooltip; @@ -388,7 +377,7 @@ public class GT_Cover_EUMeter extends GT_CoverBehaviorBase getTileEntityEnergyCapacityFunc; EnergyType(String title, String tooltip, Function getTileEntityStoredEnergyFunc, - Function getTileEntityEnergyCapacityFunc) { + Function getTileEntityEnergyCapacityFunc) { this.title = title; this.tooltip = tooltip; this.getTileEntityStoredEnergyFunc = getTileEntityStoredEnergyFunc; 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 66d5eae5e5..87ceb05204 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java @@ -58,26 +58,26 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase cover removed before data reach client GT_RenderingWorld.getInstance() - .unregister( - aTileEntity.getXCoord(), - aTileEntity.getYCoord(), - aTileEntity.getZCoord(), - getTargetBlock(aCoverVariable.mStack), - getTargetMeta(aCoverVariable.mStack)); + .unregister( + aTileEntity.getXCoord(), + aTileEntity.getYCoord(), + aTileEntity.getZCoord(), + getTargetBlock(aCoverVariable.mStack), + getTargetMeta(aCoverVariable.mStack)); } } @Override protected boolean onCoverRightClickImpl(byte aSide, int aCoverID, FacadeData aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { + EntityPlayer aPlayer, float aX, float aY, float aZ) { // in case cover data didn't hit client somehow. maybe he had a ridiculous view distance aTileEntity.issueCoverUpdate(aSide); return super.onCoverRightClickImpl(aSide, aCoverID, aCoverVariable, aTileEntity, aPlayer, aX, aY, aZ); @@ -323,63 +323,52 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase( - this::getCoverData, - this::setCoverData, - GT_Cover_FacadeBase.this, - this::isEnabled, - (id, coverData) -> { - coverData.mFlags = getNewCoverVariable(id, coverData); - return coverData; - }).addToggleButton( - 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)); + new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( + this::getCoverData, + this::setCoverData, + GT_Cover_FacadeBase.this, + this::isEnabled, + (id, coverData) -> { + coverData.mFlags = getNewCoverVariable(id, coverData); + return coverData; + }).addToggleButton( + 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)); } @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 bf82af3ad2..199d22407a 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_FluidLimiter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_FluidLimiter.java @@ -46,7 +46,7 @@ public class GT_Cover_FluidLimiter extends GT_CoverBehaviorBase( - 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)); + 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)); } } } 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 d233d741ae..e4459c06db 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java @@ -94,13 +94,13 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehaviorBase= 0.5F) { adjustSpeed(aPlayer, aCoverVariable, aPlayer.isSneaking() ? 256 : 16); } else { @@ -177,7 +177,7 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehaviorBase= 0.5F) { adjustSpeed(aPlayer, aCoverVariable, 1); } else { @@ -192,55 +192,55 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehaviorBase( - 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) - .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)); + 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) + .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)); } } @@ -483,7 +434,7 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehaviorBase { private static final IIconContainer[] icons = new IIconContainer[] { OVERLAY_FLUID_STORAGE_MONITOR0, - OVERLAY_FLUID_STORAGE_MONITOR1, OVERLAY_FLUID_STORAGE_MONITOR2, OVERLAY_FLUID_STORAGE_MONITOR3, - OVERLAY_FLUID_STORAGE_MONITOR4, OVERLAY_FLUID_STORAGE_MONITOR5, OVERLAY_FLUID_STORAGE_MONITOR6, - OVERLAY_FLUID_STORAGE_MONITOR7, OVERLAY_FLUID_STORAGE_MONITOR8, OVERLAY_FLUID_STORAGE_MONITOR9, - OVERLAY_FLUID_STORAGE_MONITOR10, OVERLAY_FLUID_STORAGE_MONITOR11, OVERLAY_FLUID_STORAGE_MONITOR12, - OVERLAY_FLUID_STORAGE_MONITOR13, OVERLAY_FLUID_STORAGE_MONITOR14, }; + OVERLAY_FLUID_STORAGE_MONITOR1, OVERLAY_FLUID_STORAGE_MONITOR2, OVERLAY_FLUID_STORAGE_MONITOR3, + OVERLAY_FLUID_STORAGE_MONITOR4, OVERLAY_FLUID_STORAGE_MONITOR5, OVERLAY_FLUID_STORAGE_MONITOR6, + OVERLAY_FLUID_STORAGE_MONITOR7, OVERLAY_FLUID_STORAGE_MONITOR8, OVERLAY_FLUID_STORAGE_MONITOR9, + OVERLAY_FLUID_STORAGE_MONITOR10, OVERLAY_FLUID_STORAGE_MONITOR11, OVERLAY_FLUID_STORAGE_MONITOR12, + OVERLAY_FLUID_STORAGE_MONITOR13, OVERLAY_FLUID_STORAGE_MONITOR14, }; public GT_Cover_FluidStorageMonitor() { super(FluidStorageData.class); @@ -78,11 +78,11 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase 0) fluidTextureBuilder.glow(); return TextureFactory.of(fluidTextureBuilder.build(), TextureFactory.of(icons[aCoverVariable.scale])); } @Override protected boolean onCoverRightClickImpl(byte aSide, int aCoverID, FluidStorageData aCoverVariable, - ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aPlayer == null || aPlayer.worldObj == null || aPlayer.worldObj.isRemote) { return false; } @@ -182,7 +182,7 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase GT_Utility.areFluidsEqual(fs, tankInfo.fluid)) - .map(fs -> fs.amount) - .orElse(0), - containerItem.fill( - container, + Optional + .ofNullable( + tank.drain( + side, new FluidStack(tankInfo.fluid.getFluid(), containerItem.getCapacity(container)), - false)); + false)) + .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)), + false)); if (filled == 0) { return null; } @@ -247,10 +248,9 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase GT_Utility.areFluidsEqual(fs, filledFluid)) - .map(fs -> fs.amount) - .orElse(0) - != filledFluid.amount) { + .filter(fs -> GT_Utility.areFluidsEqual(fs, filledFluid)) + .map(fs -> fs.amount) + .orElse(0) != filledFluid.amount) { return null; } tank.drain(side, filledFluid, true); @@ -259,7 +259,7 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase> 16 & 0xFF), (short) (color >> 8 & 0xFF), (short) (color & 0xFF), - (short) (0xFF) }; + (short) (0xFF) }; } public static class FluidStorageData implements ISerializableObject { @@ -405,7 +405,7 @@ public class GT_Cover_FluidStorageMonitor extends GT_CoverBehaviorBase 0.375D) && (aX < 0.625D)) || ((aSide > 3) && ((aY > 0.375D) && (aY < 0.625D))) - || ((aSide < 2) && ((aZ > 0.375D) && (aZ < 0.625D))) - || (aSide == 2) - || (aSide == 3)) { + || ((aSide < 2) && ((aZ > 0.375D) && (aZ < 0.625D))) + || (aSide == 2) + || (aSide == 3)) { ItemStack tStack = aPlayer.inventory.getCurrentItem(); if (tStack == null) return true; @@ -134,9 +132,8 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase( - this::getCoverData, - this::setCoverData, - GT_Cover_Fluidfilter.this, - (id, coverData) -> !getClickable(id, coverData), - (id, coverData) -> { - coverData.mFilterMode = getNewFilterMode(id, coverData); + new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( + this::getCoverData, + this::setCoverData, + GT_Cover_Fluidfilter.this, + (id, coverData) -> !getClickable(id, coverData), + (id, coverData) -> { + coverData.mFilterMode = getNewFilterMode(id, coverData); + return coverData; + }).addToggleButton( + 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(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; - }).addToggleButton( - 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( - 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)); + }, + 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) { @@ -410,9 +395,9 @@ public class GT_Cover_Fluidfilter extends GT_CoverBehaviorBase= 0) tNBT.setString( - "mFluid", - FluidRegistry.getFluid(mFluidID) - .getName()); + "mFluid", + FluidRegistry.getFluid(mFluidID) + .getName()); return tNBT; } 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 3ea7c88d8e..0e5f57ad6d 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java @@ -64,39 +64,39 @@ public class GT_Cover_ItemFilter extends GT_CoverBehaviorBase Filter = Collections.singletonList(aCoverVariable.mFilter); moveMultipleItemStacks( - fromEntity, - toEntity, - fromSide, - toSide, - Filter, - aCoverVariable.mWhitelist, - (byte) 64, - (byte) 1, - (byte) 64, - (byte) 1, - 64); + fromEntity, + toEntity, + fromSide, + toSide, + Filter, + aCoverVariable.mWhitelist, + (byte) 64, + (byte) 1, + (byte) 64, + (byte) 1, + 64); return aCoverVariable; } @Override protected boolean onCoverRightClickImpl(byte aSide, int aCoverID, ItemFilterData aCoverVariable, - ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { ItemStack tStack = aPlayer.inventory.getCurrentItem(); if (tStack != null) { aCoverVariable.mFilter = tStack; @@ -110,66 +110,66 @@ public class GT_Cover_ItemFilter extends GT_CoverBehaviorBase( - 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)); + 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)); } 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 059cf43e2c..af5a4df927 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java @@ -73,12 +73,12 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase 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); } @@ -150,37 +149,37 @@ public class GT_Cover_ItemMeter extends GT_CoverBehaviorBase( - 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)); + 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)); } private int getMaxSlot() { final ICoverable tile = getUIBuildContext().getTile(); if (tile instanceof TileEntity && !tile.isDead() - && tile instanceof IGregTechTileEntity - && !(((IGregTechTileEntity) tile).getMetaTileEntity() instanceof GT_MetaTileEntity_DigitalChestBase)) + && tile instanceof IGregTechTileEntity + && !(((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_Lens.java b/src/main/java/gregtech/common/covers/GT_Cover_Lens.java index 1171a4717f..092973767a 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Lens.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Lens.java @@ -23,7 +23,7 @@ public class GT_Cover_Lens extends GT_CoverBehavior { @Override public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { return false; } 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 4e54aa7cf3..af97e190ce 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java @@ -54,7 +54,7 @@ public class GT_Cover_LiquidMeter extends GT_CoverBehaviorBase tank.capacity) - .sum(); + .mapToInt(tank -> tank.capacity) + .sum(); } else { maxCapacity = -1; } builder.widget( - 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)); + 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)); } } 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 b0ec7137b4..5fc9354c18 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java @@ -36,19 +36,19 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior { public static boolean isRotor(ItemStack rotor) { return (rotor != null && rotor.getItem() instanceof GT_MetaGenerated_Tool - && rotor.getItemDamage() >= 170 - && rotor.getItemDamage() <= 176); + && rotor.getItemDamage() >= 170 + && rotor.getItemDamage() <= 176); } @Override public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { return false; } @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { boolean needsRepair = false; if (aTileEntity instanceof IGregTechTileEntity tTileEntity) { IMetaTileEntity mTileEntity = tTileEntity.getMetaTileEntity(); @@ -67,9 +67,9 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior { needsRepair = (tCur >= tMax * 8 / 10); } else { long mExpectedDamage = Math.round( - Math.min( - multi.mEUt / multi.damageFactorLow, - Math.pow(multi.mEUt, multi.damageFactorHigh))); + Math.min( + multi.mEUt / multi.damageFactorLow, + Math.pow(multi.mEUt, multi.damageFactorHigh))); needsRepair = tCur + mExpectedDamage * 2 >= tMax; } } else { @@ -89,44 +89,38 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior { @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { + EntityPlayer aPlayer, float aX, float aY, float aZ) { aCoverVariable = (aCoverVariable + (aPlayer.isSneaking() ? -1 : 1)) % 14; if (aCoverVariable < 0) { aCoverVariable = 13; } switch (aCoverVariable) { case 0 -> GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("056", "Emit if 1 Maintenance Needed")); - case 1 -> GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("057", "Emit if 1 Maintenance Needed(inverted)")); + case 1 -> GT_Utility + .sendChatToPlayer(aPlayer, GT_Utility.trans("057", "Emit if 1 Maintenance Needed(inverted)")); case 2 -> GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("058", "Emit if 2 Maintenance Needed")); - case 3 -> GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("059", "Emit if 2 Maintenance Needed(inverted)")); + case 3 -> GT_Utility + .sendChatToPlayer(aPlayer, GT_Utility.trans("059", "Emit if 2 Maintenance Needed(inverted)")); case 4 -> GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("060", "Emit if 3 Maintenance Needed")); - case 5 -> GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("061", "Emit if 3 Maintenance Needed(inverted)")); + case 5 -> GT_Utility + .sendChatToPlayer(aPlayer, GT_Utility.trans("061", "Emit if 3 Maintenance Needed(inverted)")); case 6 -> GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("062", "Emit if 4 Maintenance Needed")); - case 7 -> GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("063", "Emit if 4 Maintenance Needed(inverted)")); + case 7 -> GT_Utility + .sendChatToPlayer(aPlayer, GT_Utility.trans("063", "Emit if 4 Maintenance Needed(inverted)")); case 8 -> GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("064", "Emit if 5 Maintenance Needed")); - case 9 -> GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("065", "Emit if 5 Maintenance Needed(inverted)")); - case 10 -> GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("066", "Emit if rotor needs maintenance low accuracy mod")); + case 9 -> GT_Utility + .sendChatToPlayer(aPlayer, GT_Utility.trans("065", "Emit if 5 Maintenance Needed(inverted)")); + case 10 -> GT_Utility + .sendChatToPlayer(aPlayer, GT_Utility.trans("066", "Emit if rotor needs maintenance low accuracy mod")); case 11 -> GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("067", "Emit if rotor needs maintenance low accuracy mod(inverted)")); + aPlayer, + GT_Utility.trans("067", "Emit if rotor needs maintenance low accuracy mod(inverted)")); case 12 -> GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("068", "Emit if rotor needs maintenance high accuracy mod")); + aPlayer, + GT_Utility.trans("068", "Emit if rotor needs maintenance high accuracy mod")); case 13 -> GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("069", "Emit if rotor needs maintenance high accuracy mod(inverted)")); + aPlayer, + GT_Utility.trans("069", "Emit if rotor needs maintenance high accuracy mod(inverted)")); } return aCoverVariable; } @@ -163,7 +157,7 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior { @Override public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, - ICoverable aTileEntity) { + ICoverable aTileEntity) { return true; } @@ -204,116 +198,95 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior { @Override protected void addUIWidgets(ModularWindow.Builder builder) { final String[] tooltipText = { GT_Utility.trans("056", "Emit if 1 Maintenance Needed"), - GT_Utility.trans("058", "Emit if 2 Maintenance Needed"), - GT_Utility.trans("060", "Emit if 3 Maintenance Needed"), - GT_Utility.trans("062", "Emit if 4 Maintenance Needed"), - GT_Utility.trans("064", "Emit if 5 Maintenance Needed"), - GT_Utility.trans("066", "Emit if rotor needs maintenance low accuracy mod"), - GT_Utility.trans("068", "Emit if rotor needs maintenance high accuracy mod"), }; + GT_Utility.trans("058", "Emit if 2 Maintenance Needed"), + GT_Utility.trans("060", "Emit if 3 Maintenance Needed"), + GT_Utility.trans("062", "Emit if 4 Maintenance Needed"), + GT_Utility.trans("064", "Emit if 5 Maintenance Needed"), + GT_Utility.trans("066", "Emit if rotor needs maintenance low accuracy mod"), + GT_Utility.trans("068", "Emit if rotor needs maintenance high accuracy mod"), }; final String[] buttonText = { GT_Utility.trans("247", "1 Issue"), GT_Utility.trans("248", "2 Issues"), - GT_Utility.trans("249", "3 Issues"), GT_Utility.trans("250", "4 Issues"), - GT_Utility.trans("251", "5 Issues"), GT_Utility.trans("252", "Rotor < 80%"), - GT_Utility.trans("253", "Rotor < 100%"), GT_Utility.trans("INVERTED", "Inverted"), - GT_Utility.trans("NORMAL", "Normal"), }; + GT_Utility.trans("249", "3 Issues"), GT_Utility.trans("250", "4 Issues"), + GT_Utility.trans("251", "5 Issues"), GT_Utility.trans("252", "Rotor < 80%"), + GT_Utility.trans("253", "Rotor < 100%"), GT_Utility.trans("INVERTED", "Inverted"), + GT_Utility.trans("NORMAL", "Normal"), }; - builder.widget( + builder + .widget( new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( - this::getCoverData, - this::setCoverData, - GT_Cover_NeedMaintainance.this, - (index, coverData) -> isEnabled(index, convert(coverData)), - (index, coverData) -> new ISerializableObject.LegacyCoverData( - 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)); + this::getCoverData, + this::setCoverData, + GT_Cover_NeedMaintainance.this, + (index, coverData) -> isEnabled(index, convert(coverData)), + (index, coverData) -> new ISerializableObject.LegacyCoverData( + 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)); } 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 466931d075..13054bccf6 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java @@ -36,13 +36,13 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior { @Override public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { return false; } @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { boolean playerDetected = false; if (aTileEntity instanceof IGregTechTileEntity) { @@ -57,18 +57,18 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior { for (Object tObject : aTileEntity.getWorld().playerEntities) { if ((tObject instanceof EntityPlayerMP tEntity)) { int dist = Math.max( - 1, - (int) tEntity.getDistance( - aTileEntity.getXCoord() + 0.5D, - aTileEntity.getYCoord() + 0.5D, - aTileEntity.getZCoord() + 0.5D)); + 1, + (int) tEntity.getDistance( + aTileEntity.getXCoord() + 0.5D, + aTileEntity.getYCoord() + 0.5D, + aTileEntity.getZCoord() + 0.5D)); if (dist < range) { if (aCoverVariable == 0) { playerDetected = true; break; } if (tEntity.getDisplayName() - .equalsIgnoreCase(placer)) { + .equalsIgnoreCase(placer)) { if (aCoverVariable == 1) { playerDetected = true; break; @@ -87,7 +87,7 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior { @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { + EntityPlayer aPlayer, float aX, float aY, float aZ) { aCoverVariable = (aCoverVariable + (aPlayer.isSneaking() ? -1 : 1)) % 3; if (aCoverVariable < 0) { aCoverVariable = 2; @@ -132,7 +132,7 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior { @Override public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, - ICoverable aTileEntity) { + ICoverable aTileEntity) { return true; } @@ -172,58 +172,39 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior { @SuppressWarnings("PointlessArithmeticExpression") @Override protected void addUIWidgets(ModularWindow.Builder builder) { - builder.widget( + builder + .widget( new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( - this::getCoverData, - this::setCoverData, - GT_Cover_PlayerDetector.this, - (index, coverData) -> index == convert(coverData), - (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)); + this::getCoverData, + this::setCoverData, + GT_Cover_PlayerDetector.this, + (index, coverData) -> index == convert(coverData), + (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)); } } } 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 f95c586427..045eec872c 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java @@ -39,13 +39,13 @@ public class GT_Cover_Pump extends GT_CoverBehavior { @Override public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { return false; } @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { if ((aCoverVariable % 6 > 1) && ((aTileEntity instanceof IMachineProgress))) { if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable % 6 < 4) { return aCoverVariable; @@ -61,36 +61,36 @@ public class GT_Cover_Pump extends GT_CoverBehavior { if (tLiquid != null) { tLiquid = tLiquid.copy(); tLiquid.amount = tTank2.fill( - ForgeDirection.getOrientation(aSide) - .getOpposite(), - tLiquid, - false); + ForgeDirection.getOrientation(aSide) + .getOpposite(), + tLiquid, + false); if (tLiquid.amount > 0 && canTransferFluid(tLiquid)) { tTank2.fill( - ForgeDirection.getOrientation(aSide) - .getOpposite(), - tTank1.drain(ForgeDirection.getOrientation(aSide), tLiquid.amount, true), - true); + 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); + ForgeDirection.getOrientation(aSide) + .getOpposite(), + this.mTransferRate, + false); if (tLiquid != null) { tLiquid = tLiquid.copy(); tLiquid.amount = tTank1.fill(ForgeDirection.getOrientation(aSide), tLiquid, false); if (tLiquid.amount > 0 && canTransferFluid(tLiquid)) { tTank1.fill( - ForgeDirection.getOrientation(aSide), - tTank2.drain( - ForgeDirection.getOrientation(aSide) - .getOpposite(), - tLiquid.amount, - true), - true); + ForgeDirection.getOrientation(aSide), + tTank2.drain( + ForgeDirection.getOrientation(aSide) + .getOpposite(), + tLiquid.amount, + true), + true); } } } @@ -105,7 +105,7 @@ public class GT_Cover_Pump extends GT_CoverBehavior { @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { + EntityPlayer aPlayer, float aX, float aY, float aZ) { aCoverVariable = (aCoverVariable + (aPlayer.isSneaking() ? -1 : 1)) % 12; if (aCoverVariable < 0) { aCoverVariable = 11; @@ -120,15 +120,12 @@ public class GT_Cover_Pump extends GT_CoverBehavior { case 6 -> GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("012", "Export allow Input")); case 7 -> GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("013", "Import allow Output")); case 8 -> GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("014", "Export allow Input (conditional)")); - case 9 -> GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("015", "Import allow Output (conditional)")); - case 10 -> GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("016", "Export allow Input (invert cond)")); - case 11 -> GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("017", "Import allow Output (invert cond)")); + case 9 -> GT_Utility + .sendChatToPlayer(aPlayer, GT_Utility.trans("015", "Import allow Output (conditional)")); + case 10 -> GT_Utility + .sendChatToPlayer(aPlayer, GT_Utility.trans("016", "Export allow Input (invert cond)")); + case 11 -> GT_Utility + .sendChatToPlayer(aPlayer, GT_Utility.trans("017", "Import allow Output (invert cond)")); } return aCoverVariable; } @@ -224,111 +221,67 @@ public class GT_Cover_Pump extends GT_CoverBehavior { @SuppressWarnings("PointlessArithmeticExpression") @Override protected void addUIWidgets(ModularWindow.Builder builder) { - builder.widget( + builder + .widget( new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( - this::getCoverData, - this::setCoverData, - GT_Cover_Pump.this, - (id, coverData) -> !getClickable(id, convert(coverData)), - (id, coverData) -> new ISerializableObject.LegacyCoverData( - getNewCoverVariable(id, convert(coverData)))).addToggleButton( - 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)); + this::getCoverData, + this::setCoverData, + GT_Cover_Pump.this, + (id, coverData) -> !getClickable(id, convert(coverData)), + (id, coverData) -> new ISerializableObject.LegacyCoverData( + getNewCoverVariable(id, convert(coverData)))) + .addToggleButton( + 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)); } private int getNewCoverVariable(int id, int coverVariable) { diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java index 7b1adacff4..7205876fca 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java @@ -17,26 +17,26 @@ public class GT_Cover_RedstoneConductor extends GT_CoverBehavior { @Override public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { return false; } @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { if (aCoverVariable == 0) { aTileEntity.setOutputRedstoneSignal(aSide, aTileEntity.getStrongestRedstone()); } else if (aCoverVariable < 7) { aTileEntity.setOutputRedstoneSignal( - aSide, - aTileEntity.getInternalInputRedstoneSignal((byte) (aCoverVariable - 1))); + aSide, + aTileEntity.getInternalInputRedstoneSignal((byte) (aCoverVariable - 1))); } return aCoverVariable; } @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { + EntityPlayer aPlayer, float aX, float aY, float aZ) { aCoverVariable = (aCoverVariable + (aPlayer.isSneaking() ? -1 : 1)) % 7; if (aCoverVariable < 0) { aCoverVariable = 6; @@ -85,7 +85,7 @@ public class GT_Cover_RedstoneConductor extends GT_CoverBehavior { @Override public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, - ICoverable aTileEntity) { + ICoverable aTileEntity) { return true; } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverExternal.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverExternal.java index 8fe1bb5d13..00890541bc 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverExternal.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverExternal.java @@ -20,23 +20,23 @@ public class GT_Cover_RedstoneReceiverExternal extends GT_Cover_RedstoneWireless @Override public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { return false; } @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { aTileEntity.setOutputRedstoneSignal( - aSide, - GregTech_API.sWirelessRedstone.get(aCoverVariable) == null ? 0 - : GregTech_API.sWirelessRedstone.get(aCoverVariable)); + aSide, + GregTech_API.sWirelessRedstone.get(aCoverVariable) == null ? 0 + : GregTech_API.sWirelessRedstone.get(aCoverVariable)); return aCoverVariable; } @Override public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, - ICoverable aTileEntity) { + ICoverable aTileEntity) { return true; } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java index 8dec852149..899db734af 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java @@ -22,7 +22,7 @@ public class GT_Cover_RedstoneReceiverInternal extends GT_Cover_RedstoneWireless @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { if (aTileEntity instanceof IMachineProgress) { if (getRedstoneInput(aSide, aInputRedstone, aCoverID, aCoverVariable, aTileEntity) > 0) ((IMachineProgress) aTileEntity).enableWorking(); @@ -34,15 +34,15 @@ public class GT_Cover_RedstoneReceiverInternal extends GT_Cover_RedstoneWireless @Override protected boolean isRedstoneSensitiveImpl(byte aSide, int aCoverID, - ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, long aTimer) { + ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, long aTimer) { return true; } @Override public byte getRedstoneInput(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, - ICoverable aTileEntity) { + ICoverable aTileEntity) { return GregTech_API.sWirelessRedstone.get(aCoverVariable) == null ? 0 - : GregTech_API.sWirelessRedstone.get(aCoverVariable); + : GregTech_API.sWirelessRedstone.get(aCoverVariable); } @Override diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java index bdb160f15e..d8ace5b4d2 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java @@ -18,24 +18,22 @@ public class GT_Cover_RedstoneSignalizer extends GT_CoverBehavior { @Override public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { return false; } @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { + EntityPlayer aPlayer, float aX, float aY, float aZ) { aCoverVariable = (aCoverVariable + 1) % 48; switch (aCoverVariable / 16) { - case 0 -> GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("078", "Signal = ") + (aCoverVariable & 0xF)); - case 1 -> GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("079", "Conditional Signal = ") + (aCoverVariable & 0xF)); + case 0 -> GT_Utility + .sendChatToPlayer(aPlayer, GT_Utility.trans("078", "Signal = ") + (aCoverVariable & 0xF)); + case 1 -> GT_Utility + .sendChatToPlayer(aPlayer, GT_Utility.trans("079", "Conditional Signal = ") + (aCoverVariable & 0xF)); case 2 -> GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("080", "Inverted Conditional Signal = ") + (aCoverVariable & 0xF)); + aPlayer, + GT_Utility.trans("080", "Inverted Conditional Signal = ") + (aCoverVariable & 0xF)); } return aCoverVariable; } @@ -77,7 +75,7 @@ public class GT_Cover_RedstoneSignalizer extends GT_CoverBehavior { @Override public byte getRedstoneInput(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, - ICoverable aTileEntity) { + ICoverable aTileEntity) { if (aCoverVariable < 16) { return (byte) (aCoverVariable & 0xF); } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterExternal.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterExternal.java index 4f3a8367d3..05374fb096 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterExternal.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterExternal.java @@ -26,7 +26,7 @@ public class GT_Cover_RedstoneTransmitterExternal extends GT_Cover_RedstoneWirel @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { // TODO remove next line after 2.3.0 if (!IControlsWorkCover.makeSureOnlyOne(aSide, aTileEntity)) return aCoverVariable; GregTech_API.sWirelessRedstone.put(aCoverVariable, aInputRedstone); @@ -35,7 +35,7 @@ public class GT_Cover_RedstoneTransmitterExternal extends GT_Cover_RedstoneWirel @Override protected boolean isRedstoneSensitiveImpl(byte aSide, int aCoverID, - ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, long aTimer) { + ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, long aTimer) { return true; } 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 42c20e9088..43dbfea1de 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java @@ -20,13 +20,13 @@ public class GT_Cover_RedstoneTransmitterInternal extends GT_Cover_RedstoneWirel @Override public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { return false; } @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { GregTech_API.sWirelessRedstone.put(aCoverVariable, aTileEntity.getOutputRedstoneSignal(aSide)); return aCoverVariable; } @@ -43,7 +43,7 @@ public class GT_Cover_RedstoneTransmitterInternal extends GT_Cover_RedstoneWirel @Override public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, - ICoverable aTileEntity) { + ICoverable aTileEntity) { return true; } } 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 a2a6ea76c6..f41250ad15 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java @@ -39,21 +39,20 @@ public abstract class GT_Cover_RedstoneWirelessBase extends GT_CoverBehavior { @Override public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - boolean aForced) { + boolean aForced) { GregTech_API.sWirelessRedstone.put(aCoverVariable, (byte) 0); return true; } @Override protected boolean onCoverRightClickImpl(byte aSide, int aCoverID, - ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, - float aY, float aZ) { + ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, + float aY, float aZ) { if (((aX > 0.375D) && (aX < 0.625D)) || ((aSide > 3) && ((aY > 0.375D) && (aY < 0.625D)))) { GregTech_API.sWirelessRedstone.put(aCoverVariable.get(), (byte) 0); aCoverVariable.set( - (aCoverVariable.get() & (PRIVATE_MASK | CHECKBOX_MASK)) - | (((Integer) GT_Utility.stackToInt(aPlayer.inventory.getCurrentItem())).hashCode() - & PUBLIC_MASK)); + (aCoverVariable.get() & (PRIVATE_MASK | CHECKBOX_MASK)) + | (((Integer) GT_Utility.stackToInt(aPlayer.inventory.getCurrentItem())).hashCode() & PUBLIC_MASK)); GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("081", "Frequency: ") + aCoverVariable); return true; } @@ -63,20 +62,19 @@ public abstract class GT_Cover_RedstoneWirelessBase extends GT_CoverBehavior { @Override @SuppressWarnings("deprecation") public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { + EntityPlayer aPlayer, float aX, float aY, float aZ) { if (((aX > 0.375D) && (aX < 0.625D)) || ((aSide > 3) && ((aY > 0.375D) && (aY < 0.625D)))) { 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; @@ -84,14 +82,14 @@ public abstract class GT_Cover_RedstoneWirelessBase extends GT_CoverBehavior { @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { + EntityPlayer aPlayer, float aX, float aY, float aZ) { if (((aX > 0.375D) && (aX < 0.625D)) - || ((aSide <= 3) || (((aY > 0.375D) && (aY < 0.625D)) || ((((aZ <= 0.375D) || (aZ >= 0.625D))))))) { + || ((aSide <= 3) || (((aY > 0.375D) && (aY < 0.625D)) || ((((aZ <= 0.375D) || (aZ >= 0.625D))))))) { GregTech_API.sWirelessRedstone.put(aCoverVariable, (byte) 0); float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ); short tAdjustVal = switch ((byte) ((byte) (int) (tCoords[0] * 2.0F) - + 2 * (byte) (int) (tCoords[1] * 2.0F))) { + + 2 * (byte) (int) (tCoords[1] * 2.0F))) { case 0 -> -32; case 1 -> 32; case 2 -> -1024; @@ -189,45 +187,35 @@ public abstract class GT_Cover_RedstoneWirelessBase extends GT_CoverBehavior { @SuppressWarnings("PointlessArithmeticExpression") @Override protected void addUIWidgets(ModularWindow.Builder builder) { - builder.widget( + builder + .widget( 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) - .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)); + 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) + .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)); } private int getFlagFrequency(int coverVariable) { diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Screen.java b/src/main/java/gregtech/common/covers/GT_Cover_Screen.java index 8f26c112ae..77d75aa6b9 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Screen.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Screen.java @@ -23,7 +23,7 @@ public class GT_Cover_Screen extends GT_CoverBehavior { @Override public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { return false; } @@ -79,25 +79,25 @@ public class GT_Cover_Screen extends GT_CoverBehavior { @Override public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, - ICoverable aTileEntity) { + ICoverable aTileEntity) { return false; } @Override public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { + EntityPlayer aPlayer, float aX, float aY, float aZ) { return false; } @Override public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - boolean aForced) { + boolean aForced) { return true; } @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { return 0; } } 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 1e70efc5b8..e7d2ac1e02 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java @@ -33,19 +33,19 @@ public class GT_Cover_Shutter extends GT_CoverBehavior { @Override public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { return false; } @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { return aCoverVariable; } @Override public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { + EntityPlayer aPlayer, float aX, float aY, float aZ) { aCoverVariable = (aCoverVariable + (aPlayer.isSneaking() ? -1 : 1)) % 4; if (aCoverVariable < 0) { aCoverVariable = 3; @@ -65,57 +65,57 @@ public class GT_Cover_Shutter extends GT_CoverBehavior { @Override public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return aCoverVariable >= 2 ? aCoverVariable == 3 - : !(aTileEntity instanceof IMachineProgress) - || (((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0)); + : !(aTileEntity instanceof IMachineProgress) + || (((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0)); } @Override public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return aCoverVariable >= 2 ? aCoverVariable == 2 - : !(aTileEntity instanceof IMachineProgress) - || (((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0)); + : !(aTileEntity instanceof IMachineProgress) + || (((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0)); } @Override public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return aCoverVariable >= 2 ? aCoverVariable == 3 - : !(aTileEntity instanceof IMachineProgress) - || (((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0)); + : !(aTileEntity instanceof IMachineProgress) + || (((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0)); } @Override public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return aCoverVariable >= 2 ? aCoverVariable == 2 - : !(aTileEntity instanceof IMachineProgress) - || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); + : !(aTileEntity instanceof IMachineProgress) + || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); } @Override public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return aCoverVariable >= 2 ? aCoverVariable == 3 - : !(aTileEntity instanceof IMachineProgress) - || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); + : !(aTileEntity instanceof IMachineProgress) + || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); } @Override public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { return aCoverVariable >= 2 ? aCoverVariable == 2 - : !(aTileEntity instanceof IMachineProgress) - || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); + : !(aTileEntity instanceof IMachineProgress) + || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); } @Override public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return aCoverVariable >= 2 ? aCoverVariable == 3 - : !(aTileEntity instanceof IMachineProgress) - || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); + : !(aTileEntity instanceof IMachineProgress) + || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); } @Override public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { return aCoverVariable >= 2 ? aCoverVariable == 2 - : !(aTileEntity instanceof IMachineProgress) - || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); + : !(aTileEntity instanceof IMachineProgress) + || ((IMachineProgress) aTileEntity).isAllowedToWork() == (aCoverVariable % 2 == 0); } @Override @@ -159,71 +159,46 @@ public class GT_Cover_Shutter extends GT_CoverBehavior { @SuppressWarnings("PointlessArithmeticExpression") @Override protected void addUIWidgets(ModularWindow.Builder builder) { - builder.widget( + builder + .widget( new CoverDataControllerWidget.CoverDataIndexedControllerWidget_ToggleButtons<>( - this::getCoverData, - 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)); + this::getCoverData, + 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)); } } } 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 7b41aefcca..702291db78 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java @@ -21,30 +21,29 @@ public class GT_Cover_SolarPanel extends GT_CoverBehavior { @Override public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { return false; } @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { if (aSide != 1) return 0; int coverState = aCoverVariable & 0x3; int coverNum = aCoverVariable >> 2; if (aTimer % 100L == 0L) { if (aTileEntity.getWorld() - .isThundering()) { + .isThundering()) { return aTileEntity.getBiome().rainfall > 0.0F && aTileEntity.getSkyAtSide(aSide) - ? Math.min(20, coverNum) << 2 - : coverNum << 2; + ? Math.min(20, coverNum) << 2 + : coverNum << 2; } else { if (aTileEntity.getWorld() - .isRaining() - && aTileEntity.getBiome().rainfall > 0.0F) { // really rains + .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()) { + .isDaytime()) { coverState = 2; } else { return coverNum << 2; @@ -52,7 +51,7 @@ public class GT_Cover_SolarPanel extends GT_CoverBehavior { } } else { // not rains if (aTileEntity.getWorld() - .isDaytime()) { + .isDaytime()) { coverState = 1; } else { coverState = 2; @@ -69,8 +68,8 @@ public class GT_Cover_SolarPanel extends GT_CoverBehavior { @Override protected boolean onCoverRightClickImpl(byte aSide, int aCoverID, - ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, - float aY, float aZ) { + ISerializableObject.LegacyCoverData aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, + float aY, float aZ) { if (aPlayer.capabilities.isCreativeMode) { GT_Utility.sendChatToPlayer(aPlayer, "Cleaned solar panel from " + (aCoverVariable.get() >> 2) + "% dirt"); aCoverVariable.set(aCoverVariable.get() & 0x3); @@ -80,12 +79,11 @@ public class GT_Cover_SolarPanel extends GT_CoverBehavior { ItemStack is = aPlayer.inventory.mainInventory[i]; if (is == null) continue; if (is.getUnlocalizedName() - .equals(new ItemStack(Items.water_bucket).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.get() >> 2) + "% dirt"); + GT_Utility + .sendChatToPlayer(aPlayer, "Cleaned solar panel from " + (aCoverVariable.get() >> 2) + "% dirt"); aCoverVariable.set(aCoverVariable.get() & 0x3); return true; } @@ -97,7 +95,7 @@ public class GT_Cover_SolarPanel extends GT_CoverBehavior { @Override @SuppressWarnings("deprecation") public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { + EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aPlayer.capabilities.isCreativeMode) { GT_Utility.sendChatToPlayer(aPlayer, "Cleaned solar panel from " + (aCoverVariable >> 2) + "% dirt"); aTileEntity.setCoverDataAtSide(aSide, (aCoverVariable & 0x3)); @@ -107,7 +105,7 @@ public class GT_Cover_SolarPanel extends GT_CoverBehavior { ItemStack is = aPlayer.inventory.mainInventory[i]; if (is == null) continue; if (is.getUnlocalizedName() - .equals(new ItemStack(Items.water_bucket).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/GT_Cover_SteamValve.java b/src/main/java/gregtech/common/covers/GT_Cover_SteamValve.java index 0c24e135f1..21c2fa6f63 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_SteamValve.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_SteamValve.java @@ -22,7 +22,7 @@ public class GT_Cover_SteamValve extends GT_Cover_Pump { @Override public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { return false; } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Vent.java b/src/main/java/gregtech/common/covers/GT_Cover_Vent.java index 39eeda2ba2..c179f5843b 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Vent.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Vent.java @@ -29,13 +29,13 @@ public class GT_Cover_Vent extends GT_CoverBehavior { @Override public boolean isRedstoneSensitive(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { return false; } @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { if (aSide == SIDE_UNKNOWN) return 0; int ret = 0; if (aTileEntity instanceof IFluidHandler) { @@ -63,7 +63,7 @@ public class GT_Cover_Vent extends GT_CoverBehavior { final int offsetZ = aTileEntity.getOffsetZ(aSide, 1); final World world = aTileEntity.getWorld(); if (aTileEntity.hasThingsToDo() && aCoverVariable != aTileEntity.getProgress() - && !GT_Utility.hasBlockHitBox(world, offsetX, offsetY, offsetZ)) { + && !GT_Utility.hasBlockHitBox(world, offsetX, offsetY, offsetZ)) { aTileEntity.increaseProgress(this.mEfficiency); } return aTileEntity.getProgress(); 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 bebedffaca..afd0f67b37 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 @@ -23,7 +23,7 @@ import gregtech.common.gui.modularui.widget.CoverDataFollower_ToggleButtonWidget import io.netty.buffer.ByteBuf; public abstract class GT_Cover_AdvancedRedstoneReceiverBase - extends GT_Cover_AdvancedWirelessRedstoneBase { + extends GT_Cover_AdvancedWirelessRedstoneBase { public GT_Cover_AdvancedRedstoneReceiverBase(ITexture coverTexture) { super(ReceiverData.class, coverTexture); @@ -71,10 +71,8 @@ public abstract class GT_Cover_AdvancedRedstoneReceiverBase protected void addUIWidgets(ModularWindow.Builder builder) { 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)); + new TextWidget(GT_Utility.trans("335", "Gate Mode")).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 5, 4 + startY + spaceY * 2)); } @SuppressWarnings("PointlessArithmeticExpression") @@ -82,59 +80,59 @@ public abstract class GT_Cover_AdvancedRedstoneReceiverBase protected void addUIForDataController(CoverDataControllerWidget controller) { super.addUIForDataController(controller); controller.addFollower( + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + coverData -> coverData.mode == GateMode.AND, + (coverData, state) -> { + coverData.mode = GateMode.AND; + 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.AND, + coverData -> coverData.mode == GateMode.NAND, (coverData, state) -> { - coverData.mode = GateMode.AND; + coverData.mode = GateMode.NAND; 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)); + 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_AdvancedRedstoneReceiverExternal.java b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneReceiverExternal.java index caf4b6bdcd..1e1c992bb1 100644 --- a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneReceiverExternal.java +++ b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneReceiverExternal.java @@ -11,23 +11,23 @@ public class GT_Cover_AdvancedRedstoneReceiverExternal extends GT_Cover_Advanced @Override public ReceiverData doCoverThingsImpl(byte aSide, byte aInputRedstone, int aCoverID, ReceiverData aCoverVariable, - ICoverable aTileEntity, long aTimer) { + ICoverable aTileEntity, long aTimer) { aTileEntity.setOutputRedstoneSignal( - aSide, - getSignalAt(aCoverVariable.getUuid(), aCoverVariable.getFrequency(), aCoverVariable.getGateMode())); + aSide, + getSignalAt(aCoverVariable.getUuid(), aCoverVariable.getFrequency(), aCoverVariable.getGateMode())); return aCoverVariable; } @Override protected boolean isRedstoneSensitiveImpl(byte aSide, int aCoverID, ReceiverData aCoverVariable, - ICoverable aTileEntity, long aTimer) { + ICoverable aTileEntity, long aTimer) { return false; } @Override protected boolean manipulatesSidedRedstoneOutputImpl(byte aSide, int aCoverID, ReceiverData aCoverVariable, - ICoverable aTileEntity) { + ICoverable aTileEntity) { return true; } } diff --git a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneReceiverInternal.java b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneReceiverInternal.java index 0ceaaeb887..899a97dca7 100644 --- a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneReceiverInternal.java +++ b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneReceiverInternal.java @@ -12,7 +12,7 @@ public class GT_Cover_AdvancedRedstoneReceiverInternal extends GT_Cover_Advanced @Override public ReceiverData doCoverThingsImpl(byte aSide, byte aInputRedstone, int aCoverID, ReceiverData aCoverVariable, - ICoverable aTileEntity, long aTimer) { + ICoverable aTileEntity, long aTimer) { if (aTileEntity instanceof IMachineProgress machine) { if (getRedstoneInput(aSide, aInputRedstone, aCoverID, aCoverVariable, aTileEntity) > 0) { machine.enableWorking(); @@ -28,13 +28,13 @@ public class GT_Cover_AdvancedRedstoneReceiverInternal extends GT_Cover_Advanced @Override protected byte getRedstoneInputImpl(byte aSide, byte aInputRedstone, int aCoverID, ReceiverData aCoverVariable, - ICoverable aTileEntity) { + ICoverable aTileEntity) { return getSignalAt(aCoverVariable.getUuid(), aCoverVariable.getFrequency(), aCoverVariable.getGateMode()); } @Override protected boolean isRedstoneSensitiveImpl(byte aSide, int aCoverID, ReceiverData aCoverVariable, - ICoverable aTileEntity, long aTimer) { + ICoverable aTileEntity, long aTimer) { return true; } } 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 e74dffb102..237635eb7f 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 @@ -24,7 +24,7 @@ import gregtech.common.gui.modularui.widget.CoverDataFollower_ToggleButtonWidget import io.netty.buffer.ByteBuf; public abstract class GT_Cover_AdvancedRedstoneTransmitterBase - extends GT_Cover_AdvancedWirelessRedstoneBase { + extends GT_Cover_AdvancedWirelessRedstoneBase { public GT_Cover_AdvancedRedstoneTransmitterBase(Class typeToken, ITexture coverTexture) { super(typeToken, coverTexture); @@ -37,33 +37,33 @@ public abstract class GT_Cover_AdvancedRedstoneTransmitterBase controller) { super.addUIForDataController(controller); controller.addFollower( - CoverDataFollower_ToggleButtonWidget.ofRedstone(), - coverData -> coverData.invert, - (coverData, state) -> { - coverData.invert = state; - return coverData; - }, - widget -> widget.addTooltip(0, GT_Utility.trans("NORMAL", "Normal")) - .addTooltip(1, GT_Utility.trans("INVERTED", "Inverted")) - .setPos(spaceX * 9, spaceY * getButtonRow())); + CoverDataFollower_ToggleButtonWidget.ofRedstone(), + coverData -> coverData.invert, + (coverData, state) -> { + coverData.invert = state; + return coverData; + }, + widget -> widget.addTooltip(0, GT_Utility.trans("NORMAL", "Normal")) + .addTooltip(1, GT_Utility.trans("INVERTED", "Inverted")) + .setPos(spaceX * 9, spaceY * getButtonRow())); } } } diff --git a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterExternal.java b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterExternal.java index 52392b5f84..c693610318 100644 --- a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterExternal.java +++ b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterExternal.java @@ -4,7 +4,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.ICoverable; public class GT_Cover_AdvancedRedstoneTransmitterExternal - extends GT_Cover_AdvancedRedstoneTransmitterBase { + extends GT_Cover_AdvancedRedstoneTransmitterBase { public GT_Cover_AdvancedRedstoneTransmitterExternal(ITexture coverTexture) { super(TransmitterData.class, coverTexture); @@ -22,7 +22,7 @@ public class GT_Cover_AdvancedRedstoneTransmitterExternal @Override public TransmitterData doCoverThingsImpl(byte aSide, byte aInputRedstone, int aCoverID, - TransmitterData aCoverVariable, ICoverable aTileEntity, long aTimer) { + TransmitterData aCoverVariable, ICoverable aTileEntity, long aTimer) { byte outputRedstone = aInputRedstone; if (aCoverVariable.isInvert()) { if (outputRedstone > 0) outputRedstone = 0; @@ -37,13 +37,13 @@ public class GT_Cover_AdvancedRedstoneTransmitterExternal @Override protected boolean isRedstoneSensitiveImpl(byte aSide, int aCoverID, TransmitterData aCoverVariable, - ICoverable aTileEntity, long aTimer) { + ICoverable aTileEntity, long aTimer) { return true; } @Override public boolean letsRedstoneGoInImpl(byte aSide, int aCoverID, TransmitterData aCoverVariable, - ICoverable aTileEntity) { + ICoverable aTileEntity) { return true; } } diff --git a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterInternal.java b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterInternal.java index 8cd288f8e2..353a579680 100644 --- a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterInternal.java +++ b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterInternal.java @@ -4,7 +4,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.ICoverable; public class GT_Cover_AdvancedRedstoneTransmitterInternal - extends GT_Cover_AdvancedRedstoneTransmitterBase { + extends GT_Cover_AdvancedRedstoneTransmitterBase { public GT_Cover_AdvancedRedstoneTransmitterInternal(ITexture coverTexture) { super(TransmitterData.class, coverTexture); @@ -22,7 +22,7 @@ public class GT_Cover_AdvancedRedstoneTransmitterInternal @Override public TransmitterData doCoverThingsImpl(byte aSide, byte aInputRedstone, int aCoverID, - TransmitterData aCoverVariable, ICoverable aTileEntity, long aTimer) { + TransmitterData aCoverVariable, ICoverable aTileEntity, long aTimer) { byte outputRedstone = aTileEntity.getOutputRedstoneSignal(aSide); if (aCoverVariable.isInvert()) { if (outputRedstone > 0) outputRedstone = 0; @@ -36,13 +36,13 @@ public class GT_Cover_AdvancedRedstoneTransmitterInternal @Override public boolean letsRedstoneGoOutImpl(byte aSide, int aCoverID, TransmitterData aCoverVariable, - ICoverable aTileEntity) { + ICoverable aTileEntity) { return true; } @Override protected boolean manipulatesSidedRedstoneOutputImpl(byte aSide, int aCoverID, TransmitterData aCoverVariable, - ICoverable aTileEntity) { + ICoverable aTileEntity) { return true; } } 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 fecb188214..843c7ab5e2 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 @@ -29,7 +29,7 @@ import gregtech.common.gui.modularui.widget.CoverDataFollower_ToggleButtonWidget import io.netty.buffer.ByteBuf; public abstract class GT_Cover_AdvancedWirelessRedstoneBase - extends GT_CoverBehaviorBase { + extends GT_CoverBehaviorBase { public GT_Cover_AdvancedWirelessRedstoneBase(Class typeToken, ITexture coverTexture) { super(typeToken, coverTexture); @@ -45,36 +45,36 @@ public abstract class GT_Cover_AdvancedWirelessRedstoneBase { return (byte) (signals.values() - .stream() - .map(signal -> signal > 0) - .reduce(true, (signalA, signalB) -> signalA && signalB) ? 15 : 0); + .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); + .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); + .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); + .stream() + .map(signal -> signal > 0) + .reduce(false, (signalA, signalB) -> signalA || signalB) ? 0 : 15); } case SINGLE_SOURCE -> { if (signals.values() - .isEmpty()) { + .isEmpty()) { return 0; } return signals.values() - .iterator() - .next(); + .iterator() + .next(); } default -> { return 0; @@ -92,9 +92,8 @@ public abstract class GT_Cover_AdvancedWirelessRedstoneBase> frequencies = GregTech_API.sAdvancedWirelessRedstone.computeIfAbsent( - String.valueOf(uuid), - k -> new ConcurrentHashMap<>()); + Map> frequencies = GregTech_API.sAdvancedWirelessRedstone + .computeIfAbsent(String.valueOf(uuid), k -> new ConcurrentHashMap<>()); Map signals = frequencies.computeIfAbsent(frequency, k -> new ConcurrentHashMap<>()); signals.put(hash, value); } @@ -105,7 +104,7 @@ public abstract class GT_Cover_AdvancedWirelessRedstoneBase dataController = new CoverDataControllerWidget<>( - this::getCoverData, - this::setCoverData, - GT_Cover_AdvancedWirelessRedstoneBase.this); + this::getCoverData, + this::setCoverData, + GT_Cover_AdvancedWirelessRedstoneBase.this); dataController.setPos(startX, startY); 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 controller) { controller.addFollower( - new CoverDataFollower_TextFieldWidget<>(), - coverData -> String.valueOf(coverData.frequency), + new CoverDataFollower_TextFieldWidget<>(), + coverData -> String.valueOf(coverData.frequency), + (coverData, state) -> { + 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) -> { - coverData.frequency = (int) MathExpression.parseMathExpression(state); + if (state) { + coverData.uuid = getUIBuildContext().getPlayer() + .getUniqueID(); + } else { + coverData.uuid = null; + } 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.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 af1afbe18d..f580877dea 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 @@ -24,7 +24,7 @@ import gregtech.common.gui.modularui.widget.CoverDataFollower_TextFieldWidget; import io.netty.buffer.ByteBuf; public class GT_Cover_WirelessFluidDetector - extends GT_Cover_AdvancedRedstoneTransmitterBase { + extends GT_Cover_AdvancedRedstoneTransmitterBase { public GT_Cover_WirelessFluidDetector(ITexture coverTexture) { super(FluidTransmitterData.class, coverTexture); @@ -42,11 +42,9 @@ 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); + FluidTransmitterData aCoverVariable, ICoverable aTileEntity, long aTimer) { + byte signal = GT_Cover_LiquidMeter + .computeSignalBasedOnFluid(aTileEntity, aCoverVariable.invert, aCoverVariable.threshold); long hash = hashCoverCoords(aTileEntity, aSide); setSignalAt(aCoverVariable.getUuid(), aCoverVariable.getFrequency(), hash, signal); @@ -55,13 +53,13 @@ public class GT_Cover_WirelessFluidDetector @Override public boolean letsRedstoneGoOutImpl(byte aSide, int aCoverID, FluidTransmitterData aCoverVariable, - ICoverable aTileEntity) { + ICoverable aTileEntity) { return true; } @Override protected boolean manipulatesSidedRedstoneOutputImpl(byte aSide, int aCoverID, FluidTransmitterData aCoverVariable, - ICoverable aTileEntity) { + ICoverable aTileEntity) { return true; } @@ -146,24 +144,24 @@ public class GT_Cover_WirelessFluidDetector protected void addUIWidgets(ModularWindow.Builder builder) { super.addUIWidgets(builder); builder.widget( - new TextWidget(GT_Utility.trans("222", "Fluid threshold")).setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 5, 4 + startY)); + new TextWidget(GT_Utility.trans("222", "Fluid threshold")).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 5, 4 + startY)); } @Override protected void addUIForDataController(CoverDataControllerWidget controller) { super.addUIForDataController(controller); controller.addFollower( - new CoverDataFollower_TextFieldWidget<>(), - coverData -> String.valueOf(coverData.threshold), - (coverData, state) -> { - coverData.threshold = (int) MathExpression.parseMathExpression(state); - return coverData; - }, - widget -> widget.setOnScrollNumbers() - .setNumbers(0, Integer.MAX_VALUE) - .setPos(1, 2) - .setSize(spaceX * 5 - 4, 12)); + new CoverDataFollower_TextFieldWidget<>(), + coverData -> String.valueOf(coverData.threshold), + (coverData, state) -> { + coverData.threshold = (int) MathExpression.parseMathExpression(state); + return coverData; + }, + 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 9c1e9b2c5f..428b9b636d 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 @@ -32,7 +32,7 @@ import gregtech.common.tileentities.storage.GT_MetaTileEntity_DigitalChestBase; import io.netty.buffer.ByteBuf; public class GT_Cover_WirelessItemDetector - extends GT_Cover_AdvancedRedstoneTransmitterBase { + extends GT_Cover_AdvancedRedstoneTransmitterBase { public GT_Cover_WirelessItemDetector(ITexture coverTexture) { super(ItemTransmitterData.class, coverTexture); @@ -50,13 +50,13 @@ public class GT_Cover_WirelessItemDetector @Override public ItemTransmitterData doCoverThingsImpl(byte aSide, byte aInputRedstone, int aCoverID, - ItemTransmitterData aCoverVariable, ICoverable aTileEntity, long aTimer) { + ItemTransmitterData aCoverVariable, ICoverable aTileEntity, long aTimer) { byte signal = GT_Cover_ItemMeter.computeSignalBasedOnItems( - aTileEntity, - aCoverVariable.invert, - aCoverVariable.threshold, - aCoverVariable.slot, - aSide); + aTileEntity, + aCoverVariable.invert, + aCoverVariable.threshold, + aCoverVariable.slot, + aSide); long hash = hashCoverCoords(aTileEntity, aSide); setSignalAt(aCoverVariable.getUuid(), aCoverVariable.getFrequency(), hash, signal); @@ -65,13 +65,13 @@ public class GT_Cover_WirelessItemDetector @Override public boolean letsRedstoneGoOutImpl(byte aSide, int aCoverID, ItemTransmitterData aCoverVariable, - ICoverable aTileEntity) { + ICoverable aTileEntity) { return true; } @Override protected boolean manipulatesSidedRedstoneOutputImpl(byte aSide, int aCoverID, ItemTransmitterData aCoverVariable, - ICoverable aTileEntity) { + ICoverable aTileEntity) { return true; } @@ -174,64 +174,56 @@ public class GT_Cover_WirelessItemDetector maxSlot = getMaxSlot(); 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)); + 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)); } @Override protected void addUIForDataController(CoverDataControllerWidget controller) { super.addUIForDataController(controller); controller.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, this::getMaxItemCount) + .setPos(1, 2 + spaceY * 2) + .setSize(spaceX * 5 - 4, 12)) + .addFollower( new CoverDataFollower_TextFieldWidget<>(), - coverData -> String.valueOf(coverData.threshold), + coverData -> getSlotTextFieldContent(coverData.slot), (coverData, state) -> { - coverData.threshold = (int) MathExpression.parseMathExpression(state); + coverData.slot = getIntFromText(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.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)) { + && tile instanceof IGregTechTileEntity + && !(((IGregTechTileEntity) tile).getMetaTileEntity() instanceof GT_MetaTileEntity_DigitalChestBase)) { return tile.getSizeInventory() - 1; } else { return -1; @@ -258,9 +250,9 @@ public class GT_Cover_WirelessItemDetector final ICoverable tile = getUIBuildContext().getTile(); final ItemTransmitterData coverVariable = getCoverData(); if (coverVariable != null && coverVariable.slot >= 0 - && tile instanceof TileEntity - && !tile.isDead() - && tile.getSizeInventory() >= coverVariable.slot) { + && tile instanceof TileEntity + && !tile.isDead() + && tile.getSizeInventory() >= coverVariable.slot) { return tile.getStackInSlot(coverVariable.slot); } else { return null; 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 d567ea0ae5..6179b8084c 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 @@ -27,8 +27,8 @@ import gregtech.common.gui.modularui.widget.CoverDataControllerWidget; import gregtech.common.gui.modularui.widget.CoverDataFollower_ToggleButtonWidget; import io.netty.buffer.ByteBuf; -public class GT_Cover_WirelessMaintenanceDetector extends - GT_Cover_AdvancedRedstoneTransmitterBase { +public class GT_Cover_WirelessMaintenanceDetector + extends GT_Cover_AdvancedRedstoneTransmitterBase { public GT_Cover_WirelessMaintenanceDetector(ITexture coverTexture) { super(MaintenanceTransmitterData.class, coverTexture); @@ -45,7 +45,7 @@ public class GT_Cover_WirelessMaintenanceDetector extends } private static byte computeSignalBasedOnMaintenance(MaintenanceTransmitterData coverVariable, - ICoverable tileEntity) { + ICoverable tileEntity) { boolean signal = false; if (tileEntity instanceof IGregTechTileEntity) { @@ -57,7 +57,7 @@ public class GT_Cover_WirelessMaintenanceDetector extends switch (coverVariable.mode) { case NO_ISSUE -> signal = ideal == real; case ONE_ISSUE, TWO_ISSUES, THREE_ISSUES, FOUR_ISSUES, FIVE_ISSUES -> signal = ideal - real - >= coverVariable.mode.ordinal(); + >= coverVariable.mode.ordinal(); case ROTOR_80, ROTOR_100 -> { ItemStack rotor = multiTE.getRealInventory()[1]; if (GT_Cover_NeedMaintainance.isRotor(rotor)) { @@ -68,9 +68,9 @@ public class GT_Cover_WirelessMaintenanceDetector extends signal = current >= max * 8 / 10; } else { long expectedDamage = Math.round( - Math.min( - (double) multiTE.mEUt / multiTE.damageFactorLow, - Math.pow(multiTE.mEUt, multiTE.damageFactorHigh))); + Math.min( + (double) multiTE.mEUt / multiTE.damageFactorLow, + Math.pow(multiTE.mEUt, multiTE.damageFactorHigh))); signal = current + expectedDamage * 2 >= max; } } else { @@ -90,7 +90,7 @@ public class GT_Cover_WirelessMaintenanceDetector extends @Override public MaintenanceTransmitterData doCoverThingsImpl(byte aSide, byte aInputRedstone, int aCoverID, - MaintenanceTransmitterData aCoverVariable, ICoverable aTileEntity, long aTimer) { + MaintenanceTransmitterData aCoverVariable, ICoverable aTileEntity, long aTimer) { byte signal = computeSignalBasedOnMaintenance(aCoverVariable, aTileEntity); long hash = hashCoverCoords(aTileEntity, aSide); setSignalAt(aCoverVariable.getUuid(), aCoverVariable.getFrequency(), hash, signal); @@ -100,19 +100,19 @@ public class GT_Cover_WirelessMaintenanceDetector extends @Override public boolean letsRedstoneGoOutImpl(byte aSide, int aCoverID, MaintenanceTransmitterData aCoverVariable, - ICoverable aTileEntity) { + ICoverable aTileEntity) { return true; } @Override protected boolean manipulatesSidedRedstoneOutputImpl(byte aSide, int aCoverID, - MaintenanceTransmitterData aCoverVariable, ICoverable aTileEntity) { + MaintenanceTransmitterData aCoverVariable, ICoverable aTileEntity) { return true; } @Override public int getTickRateImpl(byte aSide, int aCoverID, MaintenanceTransmitterData aCoverVariable, - ICoverable aTileEntity) { + ICoverable aTileEntity) { return 60; } @@ -183,7 +183,7 @@ public class GT_Cover_WirelessMaintenanceDetector extends // GUI stuff private static final String[] extraTexts = new String[] { "No Issues", ">= 1 Issue", ">= 2 Issues", ">= 3 Issues", - ">= 4 Issues", ">= 5 Issues", "Rotor < 80%", "Rotor < 100%" }; + ">= 4 Issues", ">= 5 Issues", "Rotor < 80%", "Rotor < 100%" }; @Override public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) { @@ -216,10 +216,8 @@ public class GT_Cover_WirelessMaintenanceDetector extends super.addUIWidgets(builder); 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))); + new TextWidget(extraTexts[i]).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * (i % 2 == 0 ? 1 : 7), 4 + startY + spaceY * (2 + i / 2))); } } @@ -229,16 +227,14 @@ public class GT_Cover_WirelessMaintenanceDetector extends for (int i = 0; i < 8; i++) { final int index = i; controller.addFollower( - CoverDataFollower_ToggleButtonWidget.ofDisableable(), - coverData -> coverData.mode == MaintenanceMode.values()[index], - (coverData, state) -> { - 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))); + CoverDataFollower_ToggleButtonWidget.ofDisableable(), + coverData -> coverData.mode == MaintenanceMode.values()[index], + (coverData, state) -> { + 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))); } } } 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 c07e316684..c5ca19fdad 100644 --- a/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java +++ b/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java @@ -77,7 +77,7 @@ public class GT_Entity_Arrow extends EntityArrow { if ((this.prevRotationPitch == 0.0F) && (this.prevRotationYaw == 0.0F)) { float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); this.prevRotationYaw = (this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D - / Math.PI)); + / Math.PI)); this.prevRotationPitch = (this.rotationPitch = (float) (Math.atan2(this.motionY, f) * 180.0D / Math.PI)); } if (this.mTicksAlive++ == 3000) { @@ -86,13 +86,10 @@ 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)))) { + && (axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ)))) { this.inGround = true; } } @@ -112,24 +109,20 @@ 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, + this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ) + .expand(1.0D, 1.0D, 1.0D)); double tLargestDistance = Double.MAX_VALUE; for (Entity tAllPotentiallyHitEntity : tAllPotentiallyHitEntities) { Entity entity1 = tAllPotentiallyHitEntity; @@ -150,7 +143,7 @@ public class GT_Entity_Arrow extends EntityArrow { } if ((tVector != null) && ((tVector.entityHit instanceof EntityPlayer entityplayer))) { if ((entityplayer.capabilities.disableDamage) || (((tShootingEntity instanceof EntityPlayer)) - && (!((EntityPlayer) tShootingEntity).canAttackPlayer(entityplayer)))) { + && (!((EntityPlayer) tShootingEntity).canAttackPlayer(entityplayer)))) { tVector = null; } } @@ -159,36 +152,34 @@ public class GT_Entity_Arrow extends EntityArrow { ItemData tData = GT_OreDictUnificator.getItemData(this.mArrow); float tMagicDamage = (tVector.entityHit instanceof EntityLivingBase) - ? EnchantmentHelper.func_152377_a( - this.mArrow, - ((EntityLivingBase) tVector.entityHit).getCreatureAttribute()) - : 0.0F; + ? EnchantmentHelper + .func_152377_a(this.mArrow, ((EntityLivingBase) tVector.entityHit).getCreatureAttribute()) + : 0.0F; float tDamage = MathHelper.ceiling_double_int( - MathHelper.sqrt_double( - this.motionX * this.motionX + this.motionY * this.motionY - + this.motionZ * this.motionZ) - * (getDamage() + ((tData != null) && (tData.mMaterial != null) - && (tData.mMaterial.mMaterial != null) - ? tData.mMaterial.mMaterial.mToolQuality / 2.0F - 1.0F - : 0.0F))); + MathHelper.sqrt_double( + this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ) + * (getDamage() + + ((tData != null) && (tData.mMaterial != null) && (tData.mMaterial.mMaterial != null) + ? tData.mMaterial.mMaterial.mToolQuality / 2.0F - 1.0F + : 0.0F))); if (getIsCritical()) { tDamage += this.rand.nextInt((int) (tDamage / 2.0D + 2.0D)); } int tFireDamage = (isBurning() ? 5 : 0) - + 4 * EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, this.mArrow); + + 4 * EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, this.mArrow); int tKnockback = this.mKnockback - + EnchantmentHelper.getEnchantmentLevel(Enchantment.knockback.effectId, this.mArrow); + + EnchantmentHelper.getEnchantmentLevel(Enchantment.knockback.effectId, this.mArrow); int tHitTimer = -1; int[] tDamages = onHitEntity( - tVector.entityHit, - tShootingEntity == null ? this : tShootingEntity, - this.mArrow == null ? new ItemStack(Items.arrow, 1) : this.mArrow, - (int) (tDamage * 2.0F), - (int) (tMagicDamage * 2.0F), - tKnockback, - tFireDamage, - tHitTimer); + tVector.entityHit, + tShootingEntity == null ? this : tShootingEntity, + this.mArrow == null ? new ItemStack(Items.arrow, 1) : this.mArrow, + (int) (tDamage * 2.0F), + (int) (tMagicDamage * 2.0F), + tKnockback, + tFireDamage, + tHitTimer); if (tDamages != null) { tDamage = tDamages[0] / 2.0F; tMagicDamage = tDamages[1] / 2.0F; @@ -199,17 +190,16 @@ public class GT_Entity_Arrow extends EntityArrow { tVector.entityHit.setFire(tFireDamage); } if ((!(tHitEntity instanceof EntityPlayer)) - && (EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, this.mArrow) - > 0)) { + && (EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, this.mArrow) > 0)) { EntityPlayer tPlayer = null; if ((this.worldObj instanceof WorldServer)) { tPlayer = FakePlayerFactory.get( - (WorldServer) this.worldObj, - new GameProfile( - new UUID(0L, 0L), - (tShootingEntity instanceof EntityLivingBase) - ? tShootingEntity.getCommandSenderName() - : "Arrow")); + (WorldServer) this.worldObj, + new GameProfile( + new UUID(0L, 0L), + (tShootingEntity instanceof EntityLivingBase) + ? tShootingEntity.getCommandSenderName() + : "Arrow")); } if (tPlayer != null) { tPlayer.inventory.currentItem = 0; @@ -218,58 +208,54 @@ 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))) { + && (tVector.entityHit.attackEntityFrom(tDamageSource, tDamage + tMagicDamage))) { if ((tVector.entityHit instanceof EntityLivingBase tHitLivingEntity)) { 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(); } 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, - 0.1D, - this.motionZ * tKnockback * 0.6000000238418579D / tKnockbackDivider); + this.motionX * tKnockback * 0.6000000238418579D / tKnockbackDivider, + 0.1D, + this.motionZ * tKnockback * 0.6000000238418579D / tKnockbackDivider); } } GT_Utility.GT_EnchantmentHelper.applyBullshitA( - tHitLivingEntity, - tShootingEntity == null ? this : tShootingEntity, - this.mArrow); + tHitLivingEntity, + tShootingEntity == null ? this : tShootingEntity, + this.mArrow); GT_Utility.GT_EnchantmentHelper.applyBullshitB( - (tShootingEntity instanceof EntityLivingBase) - ? (EntityLivingBase) tShootingEntity - : null, - tHitLivingEntity, - this.mArrow); + (tShootingEntity instanceof EntityLivingBase) ? (EntityLivingBase) tShootingEntity + : null, + tHitLivingEntity, + this.mArrow); if ((tShootingEntity != null) && (tHitLivingEntity != tShootingEntity) - && ((tHitLivingEntity instanceof EntityPlayer)) - && ((tShootingEntity instanceof EntityPlayerMP))) { - ((EntityPlayerMP) tShootingEntity).playerNetServerHandler.sendPacket( - new S2BPacketChangeGameState(6, 0.0F)); + && ((tHitLivingEntity instanceof EntityPlayer)) + && ((tShootingEntity instanceof EntityPlayerMP))) { + ((EntityPlayerMP) tShootingEntity).playerNetServerHandler + .sendPacket(new S2BPacketChangeGameState(6, 0.0F)); } } if (((tShootingEntity instanceof EntityPlayer)) && (tMagicDamage > 0.0F)) { ((EntityPlayer) tShootingEntity).onEnchantmentCritical(tVector.entityHit); } if ((!(tVector.entityHit instanceof EntityEnderman)) - || (((EntityEnderman) tVector.entityHit).getActivePotionEffect(Potion.weakness) - != null)) { + || (((EntityEnderman) tVector.entityHit).getActivePotionEffect(Potion.weakness) + != null)) { if (tFireDamage > 0) { tVector.entityHit.setFire(tFireDamage); } @@ -290,15 +276,13 @@ 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)); float f2 = MathHelper.sqrt_double( - this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); + this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); this.posX -= this.motionX / f2 * 0.0500000007450581D; this.posY -= this.motionY / f2 * 0.0500000007450581D; this.posZ -= this.motionZ / f2 * 0.0500000007450581D; @@ -308,51 +292,46 @@ public class GT_Entity_Arrow extends EntityArrow { setIsCritical(false); if (this.mHitBlock.getMaterial() != Material.air) { this.mHitBlock.onEntityCollidedWithBlock( - this.worldObj, - this.mHitBlockX, - this.mHitBlockY, - this.mHitBlockZ, - this); + this.worldObj, + this.mHitBlockX, + this.mHitBlockY, + this.mHitBlockZ, + this); } if ((!this.worldObj.isRemote) - && (EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, this.mArrow) - > 2)) { - GT_Utility.setCoordsOnFire( - this.worldObj, - this.mHitBlockX, - this.mHitBlockY, - this.mHitBlockZ, - true); + && (EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, this.mArrow) > 2)) { + GT_Utility + .setCoordsOnFire(this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ, true); } if (breaksOnImpact()) { setDead(); } } } - 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).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).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; this.posZ += this.motionZ; this.rotationYaw = ((float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI)); - for (this.rotationPitch = ((float) (Math.atan2( - this.motionY, - MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ)) * 180.0D - / Math.PI)); this.rotationPitch - this.prevRotationPitch - < -180.0F; this.prevRotationPitch -= 360.0F) {} + for (this.rotationPitch = ((float) (Math + .atan2(this.motionY, MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ)) + * 180.0D + / Math.PI)); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) {} while (this.rotationPitch - this.prevRotationPitch >= 180.0F) { this.prevRotationPitch += 360.0F; } @@ -367,12 +346,12 @@ public class GT_Entity_Arrow extends EntityArrow { 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); + .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()) { @@ -422,9 +401,9 @@ public class GT_Entity_Arrow extends EntityArrow { @Override public void onCollideWithPlayer(EntityPlayer aPlayer) { if ((!this.worldObj.isRemote) && (this.inGround) - && (this.arrowShake <= 0) - && (this.canBePickedUp == 1) - && (aPlayer.inventory.addItemStackToInventory(getArrowItem()))) { + && (this.arrowShake <= 0) + && (this.canBePickedUp == 1) + && (aPlayer.inventory.addItemStackToInventory(getArrowItem()))) { playSound("random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F); aPlayer.onItemPickup(this, 1); setDead(); @@ -432,7 +411,7 @@ public class GT_Entity_Arrow extends EntityArrow { } public int[] onHitEntity(Entity aHitEntity, Entity aShootingEntity, ItemStack aArrow, int aRegularDamage, - int aMagicDamage, int aKnockback, int aFireDamage, int aHitTimer) { + int aMagicDamage, int aKnockback, int aFireDamage, int aHitTimer) { return new int[] { aRegularDamage, aMagicDamage, aKnockback, aFireDamage, aHitTimer }; } diff --git a/src/main/java/gregtech/common/entities/GT_Entity_Arrow_Potion.java b/src/main/java/gregtech/common/entities/GT_Entity_Arrow_Potion.java index e44129d245..9b520831b6 100644 --- a/src/main/java/gregtech/common/entities/GT_Entity_Arrow_Potion.java +++ b/src/main/java/gregtech/common/entities/GT_Entity_Arrow_Potion.java @@ -52,27 +52,27 @@ public class GT_Entity_Arrow_Potion extends GT_Entity_Arrow { @Override public int[] onHitEntity(Entity aHitEntity, Entity aShootingEntity, ItemStack aArrow, int aRegularDamage, - int aMagicDamage, int aKnockback, int aFireDamage, int aHitTimer) { + int aMagicDamage, int aKnockback, int aFireDamage, int aHitTimer) { if ((aHitEntity instanceof EntityLivingBase)) { for (int i = 3; i < this.mPotions.length; i += 4) { if (aHitEntity.worldObj.rand.nextInt(100) < this.mPotions[i]) { ((EntityLivingBase) aHitEntity).addPotionEffect( - new PotionEffect( - this.mPotions[(i - 3)], - this.mPotions[(i - 2)], - this.mPotions[(i - 1)], - false)); + new PotionEffect( + this.mPotions[(i - 3)], + this.mPotions[(i - 2)], + this.mPotions[(i - 1)], + false)); } } } return super.onHitEntity( - aHitEntity, - aShootingEntity, - aArrow, - 1, - aMagicDamage, - aKnockback, - aFireDamage, - aHitTimer); + aHitEntity, + aShootingEntity, + aArrow, + 1, + aMagicDamage, + aKnockback, + aFireDamage, + aHitTimer); } } diff --git a/src/main/java/gregtech/common/fluid/GT_Fluid.java b/src/main/java/gregtech/common/fluid/GT_Fluid.java index dd3ffdfc51..0ef44215f4 100644 --- a/src/main/java/gregtech/common/fluid/GT_Fluid.java +++ b/src/main/java/gregtech/common/fluid/GT_Fluid.java @@ -56,12 +56,12 @@ public class GT_Fluid extends Fluid implements IGT_Fluid, IGT_RegisteredFluid, R break; case GAS: setGaseous(true).setDensity(-100) - .setViscosity(200); + .setViscosity(200); break; case PLASMA: setGaseous(true).setDensity(55536) - .setViscosity(10) - .setLuminosity(15); + .setViscosity(10) + .setLuminosity(15); break; case MOLTEN: final int luminosity; @@ -86,7 +86,7 @@ public class GT_Fluid extends Fluid implements IGT_Fluid, IGT_RegisteredFluid, R @Override public int getColor() { return (Math.max(0, Math.min(255, colorRGBA[0])) << 16) | (Math.max(0, Math.min(255, colorRGBA[1])) << 8) - | Math.max(0, Math.min(255, colorRGBA[2])); + | Math.max(0, Math.min(255, colorRGBA[2])); } // ----- IGT_Fluid interface implementations ----- @@ -117,15 +117,15 @@ public class GT_Fluid extends Fluid implements IGT_Fluid, IGT_RegisteredFluid, R */ @Override public IGT_RegisteredFluid registerContainers(final ItemStack fullContainer, final ItemStack emptyContainer, - final int containerSize) { + final int containerSize) { if (fullContainer != null && emptyContainer != null) { final FluidStack fluidStack = new FluidStack(registeredFluid, containerSize); if (!FluidContainerRegistry.registerFluidContainer(fluidStack, fullContainer, emptyContainer)) { GT_Values.RA.addFluidCannerRecipe( - fullContainer, - GT_Utility.getContainerItem(fullContainer, false), - null, - fluidStack); + fullContainer, + GT_Utility.getContainerItem(fullContainer, false), + null, + fluidStack); } } return this; diff --git a/src/main/java/gregtech/common/fluid/GT_FluidBuilder.java b/src/main/java/gregtech/common/fluid/GT_FluidBuilder.java index 13ee7f8c8d..9a18b8d812 100644 --- a/src/main/java/gregtech/common/fluid/GT_FluidBuilder.java +++ b/src/main/java/gregtech/common/fluid/GT_FluidBuilder.java @@ -113,7 +113,7 @@ public class GT_FluidBuilder implements IGT_FluidBuilder { */ @Override public IGT_FluidBuilder withTextures(final ResourceLocation stillIconResourceLocation, - final ResourceLocation flowingIconResourceLocation) { + final ResourceLocation flowingIconResourceLocation) { this.stillIconResourceLocation = stillIconResourceLocation; this.flowingIconResourceLocation = flowingIconResourceLocation; return this; diff --git a/src/main/java/gregtech/common/gui/modularui/UIHelper.java b/src/main/java/gregtech/common/gui/modularui/UIHelper.java index 1337ce18ca..0893310342 100644 --- a/src/main/java/gregtech/common/gui/modularui/UIHelper.java +++ b/src/main/java/gregtech/common/gui/modularui/UIHelper.java @@ -20,62 +20,61 @@ public class UIHelper { * Iterates over candidates for slot placement. */ public static void forEachSlots(ForEachSlot forEachItemInputSlot, ForEachSlot forEachItemOutputSlot, - ForEachSlot forEachSpecialSlot, ForEachSlot forEachFluidInputSlot, ForEachSlot forEachFluidOutputSlot, - IDrawable itemSlotBackground, IDrawable fluidSlotBackground, @Nullable GT_Recipe.GT_Recipe_Map recipeMap, - int itemInputCount, int itemOutputCount, int fluidInputCount, int fluidOutputCount, - SteamVariant steamVariant, Pos2d offset) { + ForEachSlot forEachSpecialSlot, ForEachSlot forEachFluidInputSlot, ForEachSlot forEachFluidOutputSlot, + IDrawable itemSlotBackground, IDrawable fluidSlotBackground, @Nullable GT_Recipe.GT_Recipe_Map recipeMap, + int itemInputCount, int itemOutputCount, int fluidInputCount, int fluidOutputCount, SteamVariant steamVariant, + Pos2d offset) { List itemInputPositions = recipeMap != null ? recipeMap.getItemInputPositions(itemInputCount) - : UIHelper.getItemInputPositions(itemInputCount); + : UIHelper.getItemInputPositions(itemInputCount); itemInputPositions = itemInputPositions.stream() - .map(p -> p.add(offset)) - .collect(Collectors.toList()); + .map(p -> p.add(offset)) + .collect(Collectors.toList()); for (int i = 0; i < itemInputPositions.size(); i++) { forEachItemInputSlot.accept( - i, - getBackgroundsForSlot(itemSlotBackground, recipeMap, false, false, i, false, steamVariant), - itemInputPositions.get(i)); + i, + getBackgroundsForSlot(itemSlotBackground, recipeMap, false, false, i, false, steamVariant), + itemInputPositions.get(i)); } List itemOutputPositions = recipeMap != null ? recipeMap.getItemOutputPositions(itemOutputCount) - : UIHelper.getItemOutputPositions(itemOutputCount); + : UIHelper.getItemOutputPositions(itemOutputCount); itemOutputPositions = itemOutputPositions.stream() - .map(p -> p.add(offset)) - .collect(Collectors.toList()); + .map(p -> p.add(offset)) + .collect(Collectors.toList()); for (int i = 0; i < itemOutputPositions.size(); i++) { forEachItemOutputSlot.accept( - i, - getBackgroundsForSlot(itemSlotBackground, recipeMap, false, true, i, false, steamVariant), - itemOutputPositions.get(i)); + i, + getBackgroundsForSlot(itemSlotBackground, recipeMap, false, true, i, false, steamVariant), + itemOutputPositions.get(i)); } forEachSpecialSlot.accept( - 0, - getBackgroundsForSlot(itemSlotBackground, recipeMap, false, false, 0, true, steamVariant), - (recipeMap != null ? recipeMap.getSpecialItemPosition() : UIHelper.getSpecialItemPosition()).add( - offset)); + 0, + getBackgroundsForSlot(itemSlotBackground, recipeMap, false, false, 0, true, steamVariant), + (recipeMap != null ? recipeMap.getSpecialItemPosition() : UIHelper.getSpecialItemPosition()).add(offset)); List fluidInputPositions = recipeMap != null ? recipeMap.getFluidInputPositions(fluidInputCount) - : UIHelper.getFluidInputPositions(fluidInputCount); + : UIHelper.getFluidInputPositions(fluidInputCount); fluidInputPositions = fluidInputPositions.stream() - .map(p -> p.add(offset)) - .collect(Collectors.toList()); + .map(p -> p.add(offset)) + .collect(Collectors.toList()); for (int i = 0; i < fluidInputPositions.size(); i++) { forEachFluidInputSlot.accept( - i, - getBackgroundsForSlot(fluidSlotBackground, recipeMap, true, false, i, false, steamVariant), - fluidInputPositions.get(i)); + i, + getBackgroundsForSlot(fluidSlotBackground, recipeMap, true, false, i, false, steamVariant), + fluidInputPositions.get(i)); } List fluidOutputPositions = recipeMap != null ? recipeMap.getFluidOutputPositions(fluidOutputCount) - : UIHelper.getFluidOutputPositions(fluidOutputCount); + : UIHelper.getFluidOutputPositions(fluidOutputCount); fluidOutputPositions = fluidOutputPositions.stream() - .map(p -> p.add(offset)) - .collect(Collectors.toList()); + .map(p -> p.add(offset)) + .collect(Collectors.toList()); for (int i = 0; i < fluidOutputPositions.size(); i++) { forEachFluidOutputSlot.accept( - i, - getBackgroundsForSlot(fluidSlotBackground, recipeMap, true, true, i, false, steamVariant), - fluidOutputPositions.get(i)); + i, + getBackgroundsForSlot(fluidSlotBackground, recipeMap, true, true, i, false, steamVariant), + fluidOutputPositions.get(i)); } } @@ -143,7 +142,7 @@ public class UIHelper { } public static List getGridPositions(int totalCount, int xOrigin, int yOrigin, int xDirMaxCount, - int yDirMaxCount) { + int yDirMaxCount) { // 18 pixels to get to a new grid for placing an item tile since they are 16x16 and have 1 pixel buffers // around them. int distance = 18; @@ -169,12 +168,12 @@ public class UIHelper { */ @Deprecated public static List getItemGridPositions(int itemCount, int xOrigin, int yOrigin, int xDirMaxCount, - int yDirMaxCount) { + int yDirMaxCount) { return getGridPositions(itemCount, xOrigin, yOrigin, xDirMaxCount, yDirMaxCount); } private static IDrawable[] getBackgroundsForSlot(IDrawable base, GT_Recipe.GT_Recipe_Map recipeMap, boolean isFluid, - boolean isOutput, int index, boolean isSpecial, SteamVariant steamVariant) { + boolean isOutput, int index, boolean isSpecial, SteamVariant steamVariant) { if (recipeMap != null) { IDrawable overlay; if (steamVariant != SteamVariant.NONE) { 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 c8e015d5b4..8dcf845bd1 100644 --- a/src/main/java/gregtech/common/gui/modularui/uifactory/SelectItemUIFactory.java +++ b/src/main/java/gregtech/common/gui/modularui/uifactory/SelectItemUIFactory.java @@ -58,12 +58,12 @@ public class SelectItemUIFactory { private final Supplier COLOR_TEXT_GRAY = () -> getTextColorOrDefault("text_gray", 0x555555); public SelectItemUIFactory(String header, ItemStack headerItem, Consumer selectedCallback, - List stacks) { + List stacks) { this(header, headerItem, selectedCallback, stacks, UNSELECTED); } public SelectItemUIFactory(String header, ItemStack headerItem, Consumer selectedCallback, - List stacks, int selected) { + List stacks, int selected) { this(header, headerItem, selectedCallback, stacks, selected, false); } @@ -81,7 +81,7 @@ public class SelectItemUIFactory { * is guaranteed to be called with a nonnull stack */ public SelectItemUIFactory(String header, ItemStack headerItem, Consumer selectedCallback, - List stacks, int selected, boolean noDeselect) { + List stacks, int selected, boolean noDeselect) { this.header = header; this.headerItem = headerItem; this.selectedCallback = selectedCallback; @@ -116,21 +116,20 @@ 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)); + new ItemDrawable(headerItem).asWidget() + .setPos(5, 5) + .setSize(16, 16)); } builder.widget( - new TextWidget(header).setDefaultColor(COLOR_TITLE.get()) - .setPos(25, 9)); + new TextWidget(header).setDefaultColor(COLOR_TITLE.get()) + .setPos(25, 9)); builder.widget(new SlotWidget(BaseSlot.phantom(currentDisplayItemHandler, 0)) { @@ -144,43 +143,40 @@ 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)); + .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; builder.widget( - new SlotWidget(new BaseSlot(new ItemStackHandler(new ItemStack[] { stacks.get(index) }), 0, true)) { - - @Override - public ClickResult onClick(int buttonId, boolean doubleClick) { - if (buttonId == 0) { - setSelected(index); - } else if (buttonId == 1) { - setSelected(UNSELECTED); - } else { - return ClickResult.ACCEPT; - } - selectedCallback.accept(getCandidate(getSelected())); - return ClickResult.SUCCESS; + new SlotWidget(new BaseSlot(new ItemStackHandler(new ItemStack[] { stacks.get(index) }), 0, true)) { + + @Override + public ClickResult onClick(int buttonId, boolean doubleClick) { + if (buttonId == 0) { + setSelected(index); + } else if (buttonId == 1) { + setSelected(UNSELECTED); + } else { + return ClickResult.ACCEPT; } - - @Override - public IDrawable[] getBackground() { - return new IDrawable[] { - index == selected ? GT_UITextures.SLOT_DARK_GRAY : ModularUITextures.ITEM_SLOT }; - } - }.disableInteraction() - .setPos(7 + 18 * (index % cols), 43 + 18 * (index / cols))); + selectedCallback.accept(getCandidate(getSelected())); + return ClickResult.SUCCESS; + } + + @Override + public IDrawable[] getBackground() { + return new IDrawable[] { + index == selected ? GT_UITextures.SLOT_DARK_GRAY : ModularUITextures.ITEM_SLOT }; + } + }.disableInteraction() + .setPos(7 + 18 * (index % cols), 43 + 18 * (index / cols))); } if (anotherWindow) { @@ -192,11 +188,11 @@ public class SelectItemUIFactory { dialogOpened.set(false); } }.setOnClick( - (clickData, widget) -> widget.getWindow() - .tryClose()) - .setBackground(ModularUITextures.VANILLA_BACKGROUND, new Text("x")) - .setPos(getGUIWidth() - 15, 3) - .setSize(12, 12)); + (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 28b495ce42..4d1c6649ae 100644 --- a/src/main/java/gregtech/common/gui/modularui/widget/CoverCycleButtonWidget.java +++ b/src/main/java/gregtech/common/gui/modularui/widget/CoverCycleButtonWidget.java @@ -16,22 +16,13 @@ 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/CoverDataControllerWidget.java b/src/main/java/gregtech/common/gui/modularui/widget/CoverDataControllerWidget.java index 3fa25abdbf..4543980ce1 100644 --- a/src/main/java/gregtech/common/gui/modularui/widget/CoverDataControllerWidget.java +++ b/src/main/java/gregtech/common/gui/modularui/widget/CoverDataControllerWidget.java @@ -25,14 +25,14 @@ public class CoverDataControllerWidget extends Da * @param coverBehavior cover this widget handles data update */ public CoverDataControllerWidget(Supplier dataGetter, Function dataSetter, - GT_CoverBehaviorBase coverBehavior) { + GT_CoverBehaviorBase coverBehavior) { super(dataGetter, dataSetter); this.coverBehavior = coverBehavior; } @Override public > CoverDataControllerWidget addFollower(W widget, - Function dataToStateGetter, BiFunction dataUpdater, Consumer applyForWidget) { + Function dataToStateGetter, BiFunction dataUpdater, Consumer applyForWidget) { super.addFollower(widget, dataToStateGetter, dataUpdater, applyForWidget); return this; } @@ -55,7 +55,7 @@ public class CoverDataControllerWidget extends Da * Uses int index to determine toggle button behaviors. */ public static class CoverDataIndexedControllerWidget_ToggleButtons - extends CoverDataControllerWidget { + extends CoverDataControllerWidget { private final BiFunction dataToStateGetter; private final BiFunction dataUpdater; @@ -68,8 +68,8 @@ public class CoverDataControllerWidget extends Da * @param dataUpdater (index of button, current cover data) -> new cover data */ public CoverDataIndexedControllerWidget_ToggleButtons(Supplier coverDataGetter, - Function coverDataSetter, GT_CoverBehaviorBase coverBehavior, - BiFunction dataToStateGetter, BiFunction dataUpdater) { + Function coverDataSetter, GT_CoverBehaviorBase coverBehavior, + BiFunction dataToStateGetter, BiFunction dataUpdater) { super(coverDataGetter, coverDataSetter, coverBehavior); this.dataToStateGetter = dataToStateGetter; this.dataUpdater = dataUpdater; @@ -81,12 +81,12 @@ public class CoverDataControllerWidget extends Da * @param applyForWidget methods to call for widget to add */ public > CoverDataIndexedControllerWidget_ToggleButtons addToggleButton( - int index, W widget, Consumer> applyForWidget) { + int index, W widget, Consumer> applyForWidget) { addFollower( - widget, - data -> dataToStateGetter.apply(index, data), - (data, state) -> dataUpdater.apply(index, data), - applyForWidget); + widget, + data -> dataToStateGetter.apply(index, data), + (data, state) -> dataUpdater.apply(index, data), + applyForWidget); return this; } } @@ -95,7 +95,7 @@ public class CoverDataControllerWidget extends Da * Uses int index to determine cycle button behaviors. */ public static class CoverDataIndexedControllerWidget_CycleButtons - extends CoverDataControllerWidget { + extends CoverDataControllerWidget { private final BiFunction dataToStateGetter; private final BiFunction dataUpdater; @@ -108,8 +108,8 @@ public class CoverDataControllerWidget extends Da * @param dataUpdater (index of button, current cover data) -> new cover data */ public CoverDataIndexedControllerWidget_CycleButtons(Supplier coverDataGetter, - Function coverDataSetter, GT_CoverBehaviorBase coverBehavior, - BiFunction dataToStateGetter, BiFunction dataUpdater) { + Function coverDataSetter, GT_CoverBehaviorBase coverBehavior, + BiFunction dataToStateGetter, BiFunction dataUpdater) { super(coverDataGetter, coverDataSetter, coverBehavior); this.dataToStateGetter = dataToStateGetter; this.dataUpdater = dataUpdater; @@ -121,12 +121,12 @@ public class CoverDataControllerWidget extends Da * @param applyForWidget methods to call for the widget to add */ public > CoverDataIndexedControllerWidget_CycleButtons addCycleButton( - int index, W widget, Consumer> applyForWidget) { + int index, W widget, Consumer> applyForWidget) { addFollower( - widget, - data -> dataToStateGetter.apply(index, data), - (data, state) -> dataUpdater.apply(index, data), - applyForWidget); + widget, + data -> dataToStateGetter.apply(index, data), + (data, state) -> dataUpdater.apply(index, data), + applyForWidget); return this; } } diff --git a/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_CycleButtonWidget.java b/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_CycleButtonWidget.java index 6e69b1ff79..ec7d31ca7e 100644 --- a/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_CycleButtonWidget.java +++ b/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_CycleButtonWidget.java @@ -10,7 +10,7 @@ import gregtech.api.util.ISerializableObject; * Determines button state with cover data. */ public class CoverDataFollower_CycleButtonWidget extends CoverCycleButtonWidget - implements IDataFollowerWidget { + implements IDataFollowerWidget { private Function dataToStateGetter; diff --git a/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_SlotWidget.java b/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_SlotWidget.java index c7795efbdc..8c19d65ba5 100644 --- a/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_SlotWidget.java +++ b/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_SlotWidget.java @@ -15,7 +15,7 @@ import gregtech.api.gui.modularui.IDataFollowerWidget; import gregtech.api.util.ISerializableObject; public class CoverDataFollower_SlotWidget extends SlotWidget - implements IDataFollowerWidget { + implements IDataFollowerWidget { private Function dataToStateGetter; private Consumer dataSetter; diff --git a/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_TextFieldWidget.java b/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_TextFieldWidget.java index 7d11656231..13628eb80f 100644 --- a/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_TextFieldWidget.java +++ b/src/main/java/gregtech/common/gui/modularui/widget/CoverDataFollower_TextFieldWidget.java @@ -15,7 +15,7 @@ import gregtech.api.gui.modularui.IDataFollowerWidget; import gregtech.api.util.ISerializableObject; public class CoverDataFollower_TextFieldWidget extends TextFieldWidget - implements IDataFollowerWidget { + implements IDataFollowerWidget { private Function dataToStateGetter; @@ -63,7 +63,7 @@ public class CoverDataFollower_TextFieldWidget ex public CoverDataFollower_TextFieldWidget setOnScrollNumbers(int baseStep, int ctrlStep, int shiftStep) { setOnScrollNumbers((val, direction) -> { int step = (GuiScreen.isShiftKeyDown() ? shiftStep : GuiScreen.isCtrlKeyDown() ? ctrlStep : baseStep) - * direction; + * direction; try { val = Math.addExact(val, step); } catch (ArithmeticException ignored) { @@ -82,7 +82,7 @@ public class CoverDataFollower_TextFieldWidget ex setOnScroll((text, direction) -> { int val = (int) MathExpression.parseMathExpression(text, -1); int step = (GuiScreen.isShiftKeyDown() ? shiftStep : GuiScreen.isCtrlKeyDown() ? ctrlStep : baseStep) - * direction; + * direction; try { val = Math.addExact(val, step); } catch (ArithmeticException ignored) { @@ -100,7 +100,7 @@ public class CoverDataFollower_TextFieldWidget ex public CoverDataFollower_TextFieldWidget setOnScrollNumbersLong(long baseStep, long ctrlStep, long shiftStep) { setOnScrollNumbersLong((val, direction) -> { long step = (GuiScreen.isShiftKeyDown() ? shiftStep : GuiScreen.isCtrlKeyDown() ? ctrlStep : baseStep) - * direction; + * direction; try { val = Math.addExact(val, step); } catch (ArithmeticException ignored) { 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 0547609022..6f798a93d5 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 @@ -10,7 +10,7 @@ import gregtech.api.gui.modularui.IDataFollowerWidget; import gregtech.api.util.ISerializableObject; public class CoverDataFollower_ToggleButtonWidget extends CoverCycleButtonWidget - implements IDataFollowerWidget { + implements IDataFollowerWidget { private Function dataToStateGetter; @@ -44,21 +44,18 @@ public class CoverDataFollower_ToggleButtonWidget } public static CoverDataFollower_ToggleButtonWidget ofCheckAndCross() { - return new CoverDataFollower_ToggleButtonWidget().setToggleTexture( - GT_UITextures.OVERLAY_BUTTON_CHECKMARK, - GT_UITextures.OVERLAY_BUTTON_CROSS); + return new CoverDataFollower_ToggleButtonWidget() + .setToggleTexture(GT_UITextures.OVERLAY_BUTTON_CHECKMARK, GT_UITextures.OVERLAY_BUTTON_CROSS); } public static CoverDataFollower_ToggleButtonWidget ofCheck() { - return new CoverDataFollower_ToggleButtonWidget().setToggleTexture( - GT_UITextures.OVERLAY_BUTTON_CHECKMARK, - GT_UITextures.TRANSPARENT); + return new CoverDataFollower_ToggleButtonWidget() + .setToggleTexture(GT_UITextures.OVERLAY_BUTTON_CHECKMARK, GT_UITextures.TRANSPARENT); } public static CoverDataFollower_ToggleButtonWidget ofRedstone() { - return new CoverDataFollower_ToggleButtonWidget().setToggleTexture( - GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON, - GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF); + return new CoverDataFollower_ToggleButtonWidget() + .setToggleTexture(GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON, GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF); } public static CoverDataFollower_ToggleButtonWidget ofDisableable() { @@ -69,7 +66,7 @@ public class CoverDataFollower_ToggleButtonWidget * Disables clicking if button is already pressed. */ public static class CoverDataFollower_DisableableToggleButtonWidget - extends CoverDataFollower_ToggleButtonWidget { + extends CoverDataFollower_ToggleButtonWidget { public CoverDataFollower_DisableableToggleButtonWidget() { super(); diff --git a/src/main/java/gregtech/common/gui/modularui/widget/DataControllerWidget.java b/src/main/java/gregtech/common/gui/modularui/widget/DataControllerWidget.java index 4e9ac4a245..959edb80fd 100644 --- a/src/main/java/gregtech/common/gui/modularui/widget/DataControllerWidget.java +++ b/src/main/java/gregtech/common/gui/modularui/widget/DataControllerWidget.java @@ -152,7 +152,7 @@ public abstract class DataControllerWidget extends MultiChildWidget implement * @param widget type to add */ public > DataControllerWidget addFollower(W widget, - Function dataToStateGetter, BiFunction dataUpdater, Consumer applyForWidget) { + Function dataToStateGetter, BiFunction dataUpdater, Consumer applyForWidget) { widget.setDataToStateGetter(dataToStateGetter); widget.setStateSetter(state -> { T newData = dataUpdater.apply(getLastData(), state); 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 4f9f19d49a..bc37f5c11a 100644 --- a/src/main/java/gregtech/common/gui/modularui/widget/FluidDisplaySlotWidget.java +++ b/src/main/java/gregtech/common/gui/modularui/widget/FluidDisplaySlotWidget.java @@ -141,16 +141,16 @@ 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( - fluidAccessConstructor.get(), - getContext().getPlayer(), - clickData.mouseButton == 0, - canDrainGetter != null ? canDrainGetter.get() : true, - canFillGetter != null ? canFillGetter.get() : true); + fluidAccessConstructor.get(), + getContext().getPlayer(), + clickData.mouseButton == 0, + canDrainGetter != null ? canDrainGetter.get() : true, + canFillGetter != null ? canFillGetter.get() : true); } else if (actionRealClick == Action.LOCK) { lockFluid(getContext().getPlayer().inventory.getItemStack()); } @@ -160,7 +160,7 @@ public class FluidDisplaySlotWidget extends SlotWidget { } protected ItemStack transferFluid(IFluidAccess aFluidAccess, EntityPlayer aPlayer, boolean aProcessFullStack, - boolean aCanDrain, boolean aCanFill) { + boolean aCanDrain, boolean aCanFill) { ItemStack tStackHeld = aPlayer.inventory.getItemStack(); ItemStack tStackSizedOne = GT_Utility.copyAmount(1, tStackHeld); if (tStackSizedOne == null || tStackHeld.stackSize == 0) return null; @@ -235,11 +235,10 @@ public class FluidDisplaySlotWidget extends SlotWidget { } protected static ItemStack fillFluid(IFluidAccess aFluidAccess, EntityPlayer aPlayer, FluidStack aFluidHeld, - boolean aProcessFullStack) { + 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; + .isFluidEqual(aFluidHeld)) return null; ItemStack tStackHeld = aPlayer.inventory.getItemStack(); ItemStack tStackSizedOne = GT_Utility.copyAmount(1, tStackHeld); if (tStackSizedOne == null) return null; @@ -340,10 +339,10 @@ public class FluidDisplaySlotWidget extends SlotWidget { mteToLock.lockFluid(true); mteToLock.setLockedFluidName(tFluid.getName()); GT_Utility.sendChatToPlayer( - getContext().getPlayer(), - String.format( - GT_Utility.trans("151.4", "Successfully locked Fluid to %s"), - new FluidStack(tFluid, 1).getLocalizedName())); + getContext().getPlayer(), + String.format( + GT_Utility.trans("151.4", "Successfully locked Fluid to %s"), + new FluidStack(tFluid, 1).getLocalizedName())); if (!isClient()) { mteToLock.onFluidLockPacketReceived(tFluid.getName()); @@ -418,7 +417,7 @@ public class FluidDisplaySlotWidget extends SlotWidget { * @param beforeRealClick (click data, this widget) -> if allow click */ public FluidDisplaySlotWidget setBeforeRealClick( - BiFunction beforeRealClick) { + BiFunction beforeRealClick) { this.beforeRealClick = beforeRealClick; return this; } @@ -429,7 +428,7 @@ public class FluidDisplaySlotWidget extends SlotWidget { * @param beforeDragAndDrop (click data, this widget) -> if allow click */ public FluidDisplaySlotWidget setBeforeDragAndDrop( - BiFunction beforeDragAndDrop) { + BiFunction beforeDragAndDrop) { this.beforeDragAndDrop = beforeDragAndDrop; return this; } diff --git a/src/main/java/gregtech/common/items/CombType.java b/src/main/java/gregtech/common/items/CombType.java index c646652e44..388b864151 100644 --- a/src/main/java/gregtech/common/items/CombType.java +++ b/src/main/java/gregtech/common/items/CombType.java @@ -29,7 +29,7 @@ public enum CombType { VIBRANTALLOY(14, "vibrantalloy", true, Materials.VibrantAlloy, 50, 0x86A12D, 0xC4F2AE, ItemComb.Voltage.HV), ENERGETICALLOY(15, "energeticalloy", true, Materials.EnergeticAlloy, 70, 0xFF9933, 0xFFAD5C, ItemComb.Voltage.HV), ELECTRICALSTEEL(16, "electricalsteel", true, Materials.ElectricalSteel, 90, 0x787878, 0xD8D8D8, - ItemComb.Voltage.LV), + ItemComb.Voltage.LV), DARKSTEEL(17, "darksteel", true, Materials.DarkSteel, 80, 0x252525, 0x443B44, ItemComb.Voltage.MV), PULSATINGIRON(18, "pulsatingiron", true, Materials.PulsatingIron, 80, 0x006600, 0x6DD284, ItemComb.Voltage.HV), STAINLESSSTEEL(19, "stainlesssteel", true, Materials.StainlessSteel, 75, 0x778899, 0xC8C8DC, ItemComb.Voltage.HV), @@ -127,7 +127,7 @@ public enum CombType { QUANTIUM(97, "quantium", true, Materials.Quantium, 50, 0x00FF00, 0x00D10B, ItemComb.Voltage.IV), ORIHARUKON(98, "oriharukon", true, Materials.Oriharukon, 50, 0x228B22, 0x677D68, ItemComb.Voltage.IV), MYSTERIOUSCRYSTAL(99, "mysteriouscrystal", true, Materials.MysteriousCrystal, 45, 0x3CB371, 0x16856C, - ItemComb.Voltage.LuV), + ItemComb.Voltage.LuV), BLACKPLUTONIUM(100, "blackplutonium", true, Materials.Quantium, 25, 0x000000, 0x323232, ItemComb.Voltage.LuV), TRINIUM(101, "trinium", true, Materials.Trinium, 25, 0xB0E0E6, 0xC8C8D2, ItemComb.Voltage.ZPM), @@ -150,9 +150,9 @@ public enum CombType { // Infinity COSMICNEUTRONIUM(117, "cosmicneutronium", true, Materials.CosmicNeutronium, 5, 0x484848, 0x323232, - ItemComb.Voltage.UV), + ItemComb.Voltage.UV), INFINITYCATALYST(118, "infinitycatalyst", true, Materials.InfinityCatalyst, 2, 0xFFFFFF, 0xFFFFFF, - ItemComb.Voltage.UHV), + ItemComb.Voltage.UHV), INFINITY(119, "infinity", true, Materials.Infinity, 1, 0xFFFFFF, 0xFFFFFF, ItemComb.Voltage.UEV), // HEE @@ -225,7 +225,7 @@ public enum CombType { } CombType(int id, String pName, boolean show, Materials material, int chance, int color1, int color2, - ItemComb.Voltage voltage) { + ItemComb.Voltage voltage) { if (id < 0 && !"INVALIDCOMB".equals(pName)) throw new IllegalArgumentException(); this.id = id; this.name = pName; @@ -235,11 +235,9 @@ public enum CombType { this.showInList = show; 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"); + "comb." + this.name, + this.name.substring(0, 1) + .toUpperCase() + this.name.substring(1) + " Comb"); } public void setHidden() { @@ -269,9 +267,9 @@ public enum CombType { static { int biggestId = Arrays.stream(CombType.values()) - .mapToInt(CombType::getId) - .max() - .getAsInt(); + .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 198e1e3787..3ed3169294 100644 --- a/src/main/java/gregtech/common/items/DropType.java +++ b/src/main/java/gregtech/common/items/DropType.java @@ -16,8 +16,8 @@ public enum DropType { ENDERGOO("ender goo", true); private static int[][] colours = new int[][] { { 0x19191B, 0x303032 }, { 0xffc100, 0x00ff11 }, - { 0x144F5A, 0x2494A2 }, { 0xC11F1F, 0xEBB9B9 }, { 0x872836, 0xB8132C }, { 0xD02001, 0x9C0018 }, - { 0x003366, 0x0066BB }, { 0x1727b1, 0x008ce3 }, { 0xA005E7, 0x161616 }, }; + { 0x144F5A, 0x2494A2 }, { 0xC11F1F, 0xEBB9B9 }, { 0x872836, 0xB8132C }, { 0xD02001, 0x9C0018 }, + { 0x003366, 0x0066BB }, { 0x1727b1, 0x008ce3 }, { 0xA005E7, 0x161616 }, }; public boolean showInList; public Materials material; public int chance; @@ -35,11 +35,9 @@ public enum DropType { public String getName() { return GT_LanguageManager.addStringLocalization( - "drop." + this.name, - this.name.substring(0, 1) - .toUpperCase() - + this.name.substring(1) - + " Drop"); + "drop." + this.name, + this.name.substring(0, 1) + .toUpperCase() + this.name.substring(1) + " Drop"); } public int[] getColours() { diff --git a/src/main/java/gregtech/common/items/GT_DepletetCell_Item.java b/src/main/java/gregtech/common/items/GT_DepletetCell_Item.java index a7505f8953..df14adc39b 100644 --- a/src/main/java/gregtech/common/items/GT_DepletetCell_Item.java +++ b/src/main/java/gregtech/common/items/GT_DepletetCell_Item.java @@ -13,11 +13,11 @@ public class GT_DepletetCell_Item extends GT_RadioactiveCellIC_Item { @Override public void processChamber(IReactor paramIReactor, ItemStack paramItemStack, int paramInt1, int paramInt2, - boolean paramBoolean) {} + boolean paramBoolean) {} @Override public boolean acceptUraniumPulse(IReactor paramIReactor, ItemStack paramItemStack1, ItemStack paramItemStack2, - int paramInt1, int paramInt2, int paramInt3, int paramInt4, boolean paramBoolean) { + int paramInt1, int paramInt2, int paramInt3, int paramInt4, boolean paramBoolean) { return false; } @@ -38,7 +38,7 @@ public class GT_DepletetCell_Item extends GT_RadioactiveCellIC_Item { @Override public int alterHeat(IReactor paramIReactor, ItemStack paramItemStack, int paramInt1, int paramInt2, - int paramInt3) { + int paramInt3) { return 0; } diff --git a/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java b/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java index dd1dc60e06..4aec0ed5c7 100644 --- a/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java +++ b/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java @@ -42,7 +42,7 @@ public class GT_FluidDisplayItem extends GT_Generic_Item { protected void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) { if (FluidRegistry.getFluid(aStack.getItemDamage()) != null) { String tChemicalFormula = getChemicalFormula( - new FluidStack(FluidRegistry.getFluid(aStack.getItemDamage()), 1)); + new FluidStack(FluidRegistry.getFluid(aStack.getItemDamage()), 1)); if (!tChemicalFormula.isEmpty()) aList.add(EnumChatFormatting.YELLOW + tChemicalFormula + EnumChatFormatting.RESET); } @@ -57,22 +57,20 @@ public class GT_FluidDisplayItem extends GT_Generic_Item { long tToolTipAmount = aNBT.getLong("mFluidDisplayAmount"); if (tToolTipAmount > 0L) { aList.add( - EnumChatFormatting.BLUE + "Amount: " - + GT_Utility.formatNumbers(tToolTipAmount) - + " L" - + EnumChatFormatting.GRAY); + EnumChatFormatting.BLUE + "Amount: " + + GT_Utility.formatNumbers(tToolTipAmount) + + " L" + + EnumChatFormatting.GRAY); } aList.add( - EnumChatFormatting.RED + "Temperature: " - + GT_Utility.formatNumbers(aNBT.getLong("mFluidDisplayHeat")) - + " K" - + EnumChatFormatting.GRAY); + EnumChatFormatting.RED + "Temperature: " + + GT_Utility.formatNumbers(aNBT.getLong("mFluidDisplayHeat")) + + " K" + + EnumChatFormatting.GRAY); aList.add( - EnumChatFormatting.GREEN - + String.format( - transItem("018", "State: %s"), - aNBT.getBoolean("mFluidState") ? "Gas" : "Liquid") - + EnumChatFormatting.GRAY); + EnumChatFormatting.GREEN + + String.format(transItem("018", "State: %s"), aNBT.getBoolean("mFluidState") ? "Gas" : "Liquid") + + EnumChatFormatting.GRAY); } } @@ -83,11 +81,11 @@ 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); + .filter(Objects::nonNull) + .map(Fluid::getStillIcon) + .filter(Objects::nonNull) + .findFirst() + .orElseThrow(IllegalStateException::new); } @Override @@ -137,7 +135,7 @@ public class GT_FluidDisplayItem extends GT_Generic_Item { List tTooltip = tContainer.getTooltip(null, true); for (Object tInfo : tTooltip) { if (!((String) tInfo).contains(" ") && !((String) tInfo).contains(":") - && tTooltip.indexOf(tInfo) != 0) { + && tTooltip.indexOf(tInfo) != 0) { return (String) tInfo; } } @@ -175,9 +173,9 @@ public class GT_FluidDisplayItem extends GT_Generic_Item { String tOreDictName = OreDictionary.getOreName(tOreDict); if (tOreDictName.startsWith("cell")) { return Materials.getRealMaterial( - tOreDictName.replace("cell", "") - .replace("Molten", "") - .replace("Plasma", "")); + 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 e970084691..76c5de859c 100644 --- a/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java +++ b/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java @@ -67,107 +67,107 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo } GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 0L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { OrePrefixes.circuit.get(Materials.Basic) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 0L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { OrePrefixes.circuit.get(Materials.Basic) }); long bits = GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE; GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 1L), - bits, - new Object[] { "d ", " P ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 1L), + bits, + new Object[] { "d ", " P ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 2L), - bits, - new Object[] { " d ", " P ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 2L), + bits, + new Object[] { " d ", " P ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 3L), - bits, - new Object[] { " d", " P ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 3L), + bits, + new Object[] { " d", " P ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 4L), - bits, - new Object[] { aTextEmptyRow, " Pd", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 4L), + bits, + new Object[] { aTextEmptyRow, " Pd", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 5L), - bits, - new Object[] { aTextEmptyRow, " P ", " d", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 5L), + bits, + new Object[] { aTextEmptyRow, " P ", " d", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 6L), - bits, - new Object[] { aTextEmptyRow, " P ", " d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 6L), + bits, + new Object[] { aTextEmptyRow, " P ", " d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 7L), - bits, - new Object[] { aTextEmptyRow, " P ", "d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 7L), + bits, + new Object[] { aTextEmptyRow, " P ", "d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 8L), - bits, - new Object[] { aTextEmptyRow, "dP ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 8L), + bits, + new Object[] { aTextEmptyRow, "dP ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 9L), - bits, - new Object[] { "P d", aTextEmptyRow, aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 9L), + bits, + new Object[] { "P d", aTextEmptyRow, aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 10L), - bits, - new Object[] { "P ", " d", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 10L), + bits, + new Object[] { "P ", " d", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 11L), - bits, - new Object[] { "P ", aTextEmptyRow, " d", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 11L), + bits, + new Object[] { "P ", aTextEmptyRow, " d", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 12L), - bits, - new Object[] { "P ", aTextEmptyRow, " d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 12L), + bits, + new Object[] { "P ", aTextEmptyRow, " d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 13L), - bits, - new Object[] { " P", aTextEmptyRow, " d", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 13L), + bits, + new Object[] { " P", aTextEmptyRow, " d", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 14L), - bits, - new Object[] { " P", aTextEmptyRow, " d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 14L), + bits, + new Object[] { " P", aTextEmptyRow, " d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 15L), - bits, - new Object[] { " P", aTextEmptyRow, "d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 15L), + bits, + new Object[] { " P", aTextEmptyRow, "d ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 16L), - bits, - new Object[] { " P", "d ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 16L), + bits, + new Object[] { " P", "d ", aTextEmptyRow, 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 17L), - bits, - new Object[] { aTextEmptyRow, aTextEmptyRow, "d P", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 17L), + bits, + new Object[] { aTextEmptyRow, aTextEmptyRow, "d P", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 18L), - bits, - new Object[] { aTextEmptyRow, "d ", " P", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 18L), + bits, + new Object[] { aTextEmptyRow, "d ", " P", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 19L), - bits, - new Object[] { "d ", aTextEmptyRow, " P", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 19L), + bits, + new Object[] { "d ", aTextEmptyRow, " P", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 20L), - bits, - new Object[] { " d ", aTextEmptyRow, " P", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 20L), + bits, + new Object[] { " d ", aTextEmptyRow, " P", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 21L), - bits, - new Object[] { "d ", aTextEmptyRow, "P ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 21L), + bits, + new Object[] { "d ", aTextEmptyRow, "P ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 22L), - bits, - new Object[] { " d ", aTextEmptyRow, "P ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 22L), + bits, + new Object[] { " d ", aTextEmptyRow, "P ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 23L), - bits, - new Object[] { " d", aTextEmptyRow, "P ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 23L), + bits, + new Object[] { " d", aTextEmptyRow, "P ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); GT_ModHandler.addCraftingRecipe( - ItemList.Circuit_Integrated.getWithDamage(1L, 24L), - bits, - new Object[] { aTextEmptyRow, " d", "P ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); + ItemList.Circuit_Integrated.getWithDamage(1L, 24L), + bits, + new Object[] { aTextEmptyRow, " d", "P ", 'P', ItemList.Circuit_Integrated.getWildcard(1L) }); } private static String getModeString(int aMetaData) { @@ -189,23 +189,23 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo public void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) { super.addAdditionalToolTips(aList, aStack, aPlayer); aList.add( - GT_LanguageManager.addStringLocalization( - new StringBuilder().append(getUnlocalizedName()) - .append(".configuration") - .toString(), - "Configuration: ") + getConfigurationString(getDamage(aStack))); + GT_LanguageManager.addStringLocalization( + new StringBuilder().append(getUnlocalizedName()) + .append(".configuration") + .toString(), + "Configuration: ") + getConfigurationString(getDamage(aStack))); aList.add( - GT_LanguageManager.addStringLocalization( - new StringBuilder().append(getUnlocalizedName()) - .append(".tooltip.0") - .toString(), - "Right click to reconfigure")); + GT_LanguageManager.addStringLocalization( + 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(), - "Needs a screwdriver or circuit programming tool")); + GT_LanguageManager.addStringLocalization( + new StringBuilder().append(getUnlocalizedName()) + .append(".tooltip.1") + .toString(), + "Needs a screwdriver or circuit programming tool")); } @Override @@ -224,8 +224,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( - GregTech.getResourcePath(GT_Config.troll ? "troll" : getUnlocalizedName() + "/" + i)); + mIconDamage[i] = aIconRegister + .registerIcon(GregTech.getResourcePath(GT_Config.troll ? "troll" : getUnlocalizedName() + "/" + i)); } if (GregTech_API.sPostloadFinished) { GT_Log.out.println("GT_Mod: Starting Item Icon Load Phase"); @@ -260,7 +260,7 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo ItemStack[] mainInventory = player.inventory.mainInventory; mainInventory[toolIndex.getKey()] = toolIndex.getValue() - .apply(mainInventory[toolIndex.getKey()], player); + .apply(mainInventory[toolIndex.getKey()], player); } stack.setItemDamage(meta); @@ -280,18 +280,18 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo if (configurator == null) { int count; try { - count = Integer.parseInt( - StatCollector.translateToLocal("GT5U.item.programmed_circuit.no_screwdriver.count")); + count = Integer + .parseInt(StatCollector.translateToLocal("GT5U.item.programmed_circuit.no_screwdriver.count")); } catch (NumberFormatException e) { player.addChatComponentMessage( - new ChatComponentText( - "Error in translation GT5U.item.programmed_circuit.no_screwdriver.count: " - + e.getMessage())); + new ChatComponentText( + "Error in translation GT5U.item.programmed_circuit.no_screwdriver.count: " + + e.getMessage())); count = 1; } player.addChatComponentMessage( - new ChatComponentTranslation( - "GT5U.item.programmed_circuit.no_screwdriver." + XSTR.XSTR_INSTANCE.nextInt(count))); + new ChatComponentTranslation( + "GT5U.item.programmed_circuit.no_screwdriver." + XSTR.XSTR_INSTANCE.nextInt(count))); return stack; } configuratorStack = player.inventory.mainInventory[configurator.getKey()]; @@ -302,14 +302,14 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo private void openSelectorGui(ItemStack configurator, int meta, EntityPlayer player) { UIInfos.openClientUI( - player, - buildContext -> new SelectItemUIFactory( - StatCollector.translateToLocal("GT5U.item.programmed_circuit.select.header"), - configurator, - GT_IntegratedCircuit_Item::onConfigured, - ALL_VARIANTS, - meta, - true).createWindow(buildContext)); + player, + buildContext -> new SelectItemUIFactory( + StatCollector.translateToLocal("GT5U.item.programmed_circuit.select.header"), + configurator, + GT_IntegratedCircuit_Item::onConfigured, + ALL_VARIANTS, + meta, + true).createWindow(buildContext)); } private static void onConfigured(ItemStack stack) { @@ -319,17 +319,17 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo } private static Pair> findConfiguratorInInv( - EntityPlayer player) { + EntityPlayer player) { ItemStack[] mainInventory = player.inventory.mainInventory; for (int j = 0, mainInventoryLength = mainInventory.length; j < mainInventoryLength; j++) { ItemStack toolStack = mainInventory[j]; if (!GT_Utility.isStackValid(toolStack)) continue; - for (Map.Entry, BiFunction> p : GregTech_API.sCircuitProgrammerList.entrySet()) + for (Map.Entry, BiFunction> p : GregTech_API.sCircuitProgrammerList + .entrySet()) if (p.getKey() - .test(toolStack)) - return Pair.of(j, p.getValue()); + .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 7b42dc60f2..739a3c7b9e 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,9 +50,8 @@ 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 "; @@ -67,39 +66,39 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { public GT_MetaGenerated_Item_01() { super( - "metaitem.01", - OrePrefixes.dustTiny, - OrePrefixes.dustSmall, - OrePrefixes.dust, - OrePrefixes.dustImpure, - OrePrefixes.dustPure, - OrePrefixes.crushed, - OrePrefixes.crushedPurified, - OrePrefixes.crushedCentrifuged, - OrePrefixes.gem, - OrePrefixes.nugget, - null, - OrePrefixes.ingot, - OrePrefixes.ingotHot, - OrePrefixes.ingotDouble, - OrePrefixes.ingotTriple, - OrePrefixes.ingotQuadruple, - OrePrefixes.ingotQuintuple, - OrePrefixes.plate, - OrePrefixes.plateDouble, - OrePrefixes.plateTriple, - OrePrefixes.plateQuadruple, - OrePrefixes.plateQuintuple, - OrePrefixes.plateDense, - OrePrefixes.stick, - OrePrefixes.lens, - OrePrefixes.round, - OrePrefixes.bolt, - OrePrefixes.screw, - OrePrefixes.ring, - OrePrefixes.foil, - OrePrefixes.cell, - OrePrefixes.cellPlasma); + "metaitem.01", + OrePrefixes.dustTiny, + OrePrefixes.dustSmall, + OrePrefixes.dust, + OrePrefixes.dustImpure, + OrePrefixes.dustPure, + OrePrefixes.crushed, + OrePrefixes.crushedPurified, + OrePrefixes.crushedCentrifuged, + OrePrefixes.gem, + OrePrefixes.nugget, + null, + OrePrefixes.ingot, + OrePrefixes.ingotHot, + OrePrefixes.ingotDouble, + OrePrefixes.ingotTriple, + OrePrefixes.ingotQuadruple, + OrePrefixes.ingotQuintuple, + OrePrefixes.plate, + OrePrefixes.plateDouble, + OrePrefixes.plateTriple, + OrePrefixes.plateQuadruple, + OrePrefixes.plateQuintuple, + OrePrefixes.plateDense, + OrePrefixes.stick, + OrePrefixes.lens, + OrePrefixes.round, + OrePrefixes.bolt, + OrePrefixes.screw, + OrePrefixes.ring, + OrePrefixes.foil, + OrePrefixes.cell, + OrePrefixes.cellPlasma); INSTANCE = this; int tLastID = 0; @@ -107,570 +106,565 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { setBurnValue(17000 + Materials.Wood.mMetaItemSubID, 1600); GT_OreDictUnificator.addToBlacklist(new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID)); GT_ModHandler.addCompressionRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 8L), - new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID)); + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 8L), + new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID)); GregTech_API.registerCover( - new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID), - TextureFactory.of(COVER_WOOD_PLATE), - null); + new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID), + TextureFactory.of(COVER_WOOD_PLATE), + null); ItemStack tStack = new ItemStack(this, 1, 17000 + Materials.Wood.mMetaItemSubID); tStack.setStackDisplayName("The holy Planks of Sengir"); GT_Utility.ItemNBT.addEnchantment(tStack, Enchantment.smite, 10); GT_ModHandler.addCraftingRecipe( - tStack, - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "XXX", "XDX", "XXX", 'X', OrePrefixes.gem.get(Materials.NetherStar), 'D', - new ItemStack(Blocks.dragon_egg, 1, 32767) }); + tStack, + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "XXX", "XDX", "XXX", 'X', OrePrefixes.gem.get(Materials.NetherStar), 'D', + new ItemStack(Blocks.dragon_egg, 1, 32767) }); ItemList.Credit_Greg_Copper.set(addItem(tLastID = 0, "Copper GT Credit", "0.125 Credits")); ItemList.Credit_Greg_Cupronickel.set( - addItem( - tLastID = 1, - "Cupronickel GT Credit", - "1 Credit", - new ItemData(Materials.Cupronickel, 907200L))); + addItem(tLastID = 1, "Cupronickel GT Credit", "1 Credit", new ItemData(Materials.Cupronickel, 907200L))); ItemList.Credit_Greg_Silver.set( - addItem( - tLastID = 2, - "Silver GT Credit", - "8 Credits", - new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); + addItem( + tLastID = 2, + "Silver GT Credit", + "8 Credits", + new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); ItemList.Credit_Greg_Gold.set(addItem(tLastID = 3, "Gold GT Credit", "64 Credits")); ItemList.Credit_Greg_Platinum.set(addItem(tLastID = 4, "Platinum GT Credit", "512 Credits")); ItemList.Credit_Greg_Osmium.set(addItem(tLastID = 5, "Osmium GT Credit", "4,096 Credits")); ItemList.Credit_Greg_Naquadah.set(addItem(tLastID = 6, "Naquadah GT Credit", "32,768 Credits")); ItemList.Credit_Greg_Neutronium.set(addItem(tLastID = 7, "Neutronium GT Credit", "262,144 Credits")); ItemList.Coin_Gold_Ancient.set( - addItem( - tLastID = 8, - "Ancient Gold Coin", - "Found in ancient Ruins", - new ItemData(Materials.Gold, 907200L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 8L))); + addItem( + tLastID = 8, + "Ancient Gold Coin", + "Found in ancient Ruins", + new ItemData(Materials.Gold, 907200L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 8L))); ItemList.Coin_Doge.set( - addItem( - tLastID = 9, - "Doge Coin", - "wow much coin how money so crypto plz mine v rich very currency wow", - new ItemData(Materials.Brass, 907200L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); + addItem( + tLastID = 9, + "Doge Coin", + "wow much coin how money so crypto plz mine v rich very currency wow", + new ItemData(Materials.Brass, 907200L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); ItemList.Coin_Chocolate.set( - addItem( - tLastID = 10, - "Chocolate Coin", - "Wrapped in Gold", - new ItemData(Materials.Gold, OrePrefixes.foil.mMaterialAmount), - new GT_FoodStat( - 1, - 0.1F, - EnumAction.eat, - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gold, 1L), - true, - false, - false, - Potion.moveSpeed.id, - 200, - 1, - 100))); + addItem( + tLastID = 10, + "Chocolate Coin", + "Wrapped in Gold", + new ItemData(Materials.Gold, OrePrefixes.foil.mMaterialAmount), + new GT_FoodStat( + 1, + 0.1F, + EnumAction.eat, + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gold, 1L), + true, + false, + false, + Potion.moveSpeed.id, + 200, + 1, + 100))); ItemList.Credit_Copper.set(addItem(tLastID = 11, "Industrial Copper Credit", "0.125 Credits")); ItemList.Credit_Silver.set( - addItem( - tLastID = 13, - "Industrial Silver Credit", - "8 Credits", - new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); + addItem( + tLastID = 13, + "Industrial Silver Credit", + "8 Credits", + new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); ItemList.Credit_Gold.set(addItem(tLastID = 14, "Industrial Gold Credit", "64 Credits")); ItemList.Credit_Platinum.set(addItem(tLastID = 15, "Industrial Platinum Credit", "512 Credits")); ItemList.Credit_Osmium.set(addItem(tLastID = 16, "Industrial Osmium Credit", "4096 Credits")); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Coin_Chocolate.get(1L), - new Object[] { OrePrefixes.dust.get(Materials.Cocoa), OrePrefixes.dust.get(Materials.Milk), - OrePrefixes.dust.get(Materials.Sugar), OrePrefixes.foil.get(Materials.Gold) }); + ItemList.Coin_Chocolate.get(1L), + new Object[] { OrePrefixes.dust.get(Materials.Cocoa), OrePrefixes.dust.get(Materials.Milk), + OrePrefixes.dust.get(Materials.Sugar), OrePrefixes.foil.get(Materials.Gold) }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Credit_Copper.get(8L), - GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Credit_Iron }); + ItemList.Credit_Copper.get(8L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Credit_Iron }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Credit_Iron.get(8L), - GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Credit_Silver }); + ItemList.Credit_Iron.get(8L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Credit_Silver }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Credit_Silver.get(8L), - GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Credit_Gold }); + ItemList.Credit_Silver.get(8L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Credit_Gold }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Credit_Gold.get(8L), - GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Credit_Platinum }); + ItemList.Credit_Gold.get(8L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Credit_Platinum }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Credit_Platinum.get(8L), - GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Credit_Osmium }); + ItemList.Credit_Platinum.get(8L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Credit_Osmium }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Credit_Iron.get(1L), - GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, - ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, - ItemList.Credit_Copper }); + ItemList.Credit_Iron.get(1L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, + ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, ItemList.Credit_Copper, + ItemList.Credit_Copper }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Credit_Silver.get(1L), - GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, - ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron }); + ItemList.Credit_Silver.get(1L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, + ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron, ItemList.Credit_Iron }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Credit_Gold.get(1L), - GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, - ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, - ItemList.Credit_Silver }); + ItemList.Credit_Gold.get(1L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, + ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, ItemList.Credit_Silver, + ItemList.Credit_Silver }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Credit_Platinum.get(1L), - GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, - ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold }); + ItemList.Credit_Platinum.get(1L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, + ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold, ItemList.Credit_Gold }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Credit_Osmium.get(1L), - GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, - ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, - ItemList.Credit_Platinum, ItemList.Credit_Platinum }); + ItemList.Credit_Osmium.get(1L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, + ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, ItemList.Credit_Platinum, + ItemList.Credit_Platinum }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Credit_Greg_Copper.get(8L), - GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Credit_Greg_Cupronickel }); + ItemList.Credit_Greg_Copper.get(8L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Credit_Greg_Cupronickel }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Credit_Greg_Cupronickel.get(8L), - GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Credit_Greg_Silver }); + ItemList.Credit_Greg_Cupronickel.get(8L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Credit_Greg_Silver }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Credit_Greg_Silver.get(8L), - GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Credit_Greg_Gold }); + ItemList.Credit_Greg_Silver.get(8L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Credit_Greg_Gold }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Credit_Greg_Gold.get(8L), - GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Credit_Greg_Platinum }); + ItemList.Credit_Greg_Gold.get(8L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Credit_Greg_Platinum }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Credit_Greg_Platinum.get(8L), - GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Credit_Greg_Osmium }); + ItemList.Credit_Greg_Platinum.get(8L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Credit_Greg_Osmium }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Credit_Greg_Osmium.get(8L), - GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Credit_Greg_Naquadah }); + ItemList.Credit_Greg_Osmium.get(8L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Credit_Greg_Naquadah }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Credit_Greg_Naquadah.get(8L), - GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Credit_Greg_Neutronium }); + ItemList.Credit_Greg_Naquadah.get(8L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Credit_Greg_Neutronium }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Credit_Greg_Cupronickel.get(1L), - GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, - ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, - ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper }); + ItemList.Credit_Greg_Cupronickel.get(1L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, + ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper, + ItemList.Credit_Greg_Copper, ItemList.Credit_Greg_Copper }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Credit_Greg_Silver.get(1L), - GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, - ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, - ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, - ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel }); + ItemList.Credit_Greg_Silver.get(1L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, + ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, + ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel, ItemList.Credit_Greg_Cupronickel }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Credit_Greg_Gold.get(1L), - GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, - ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, - ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver }); + ItemList.Credit_Greg_Gold.get(1L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, + ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver, + ItemList.Credit_Greg_Silver, ItemList.Credit_Greg_Silver }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Credit_Greg_Platinum.get(1L), - GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, - ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, - ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold }); + ItemList.Credit_Greg_Platinum.get(1L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, + ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold, + ItemList.Credit_Greg_Gold, ItemList.Credit_Greg_Gold }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Credit_Greg_Osmium.get(1L), - GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, - ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, - ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum }); + ItemList.Credit_Greg_Osmium.get(1L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, + ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum, + ItemList.Credit_Greg_Platinum, ItemList.Credit_Greg_Platinum }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Credit_Greg_Naquadah.get(1L), - GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, - ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, - ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium }); + ItemList.Credit_Greg_Naquadah.get(1L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, + ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium, + ItemList.Credit_Greg_Osmium, ItemList.Credit_Greg_Osmium }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Credit_Greg_Neutronium.get(1L), - GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, - ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, - ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah }); + ItemList.Credit_Greg_Neutronium.get(1L), + GT_ModHandler.RecipeBits.KEEPNBT | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, + ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah, + ItemList.Credit_Greg_Naquadah, ItemList.Credit_Greg_Naquadah }); ItemList.Component_Minecart_Wheels_Iron.set( - addItem( - tLastID = 100, - "Iron Minecart Wheels", - "To get things rolling", - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L))); + addItem( + tLastID = 100, + "Iron Minecart Wheels", + "To get things rolling", + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L))); ItemList.Component_Minecart_Wheels_Steel.set( - addItem( - tLastID = 101, - "Steel Minecart Wheels", - "To get things rolling", - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L))); + addItem( + tLastID = 101, + "Steel Minecart Wheels", + "To get things rolling", + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L))); GT_ModHandler.addCraftingRecipe( - ItemList.Component_Minecart_Wheels_Iron.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { " h ", "RSR", " w ", 'R', OrePrefixes.ring.get(Materials.AnyIron), 'S', - OrePrefixes.stick.get(Materials.AnyIron) }); + ItemList.Component_Minecart_Wheels_Iron.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { " h ", "RSR", " w ", 'R', OrePrefixes.ring.get(Materials.AnyIron), 'S', + OrePrefixes.stick.get(Materials.AnyIron) }); GT_ModHandler.addCraftingRecipe( - ItemList.Component_Minecart_Wheels_Steel.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { " h ", "RSR", " w ", 'R', OrePrefixes.ring.get(Materials.Steel), 'S', - OrePrefixes.stick.get(Materials.Steel) }); + ItemList.Component_Minecart_Wheels_Steel.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { " h ", "RSR", " w ", 'R', OrePrefixes.ring.get(Materials.Steel), 'S', + OrePrefixes.stick.get(Materials.Steel) }); ItemList.CompressedFireclay.set(addItem(tLastID = 110, "Compressed Fireclay", "Brick-shaped")); ItemList.Firebrick.set(addItem(tLastID = 111, "Firebrick", "Heat resistant")); ItemList.Arrow_Head_Glass_Emtpy.set( - addItem( - tLastID = 200, - "Empty Glass Arrow Head", - "Fill with Potions before use", - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); + addItem( + tLastID = 200, + "Empty Glass Arrow Head", + "Fill with Potions before use", + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); ItemList.Arrow_Head_Glass_Poison.set( - addItem( - tLastID = 201, - "Poison Glass Arrow Head", - "Glass Arrow filled with Poison", - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + addItem( + tLastID = 201, + "Poison Glass Arrow Head", + "Glass Arrow filled with Poison", + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); ItemList.Arrow_Head_Glass_Poison_Long.set( - addItem( - tLastID = 202, - "Poison Glass Arrow Head", - "Glass Arrow filled with stretched Poison", - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + addItem( + tLastID = 202, + "Poison Glass Arrow Head", + "Glass Arrow filled with stretched Poison", + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); ItemList.Arrow_Head_Glass_Poison_Strong.set( - addItem( - tLastID = 203, - "Poison Glass Arrow Head", - "Glass Arrow filled with strong Poison", - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + addItem( + tLastID = 203, + "Poison Glass Arrow Head", + "Glass Arrow filled with strong Poison", + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); ItemList.Arrow_Head_Glass_Slowness.set( - addItem( - tLastID = 204, - "Slowness Glass Arrow Head", - "Glass Arrow filled with Laming Brew", - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + addItem( + tLastID = 204, + "Slowness Glass Arrow Head", + "Glass Arrow filled with Laming Brew", + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); ItemList.Arrow_Head_Glass_Slowness_Long.set( - addItem( - tLastID = 205, - "Slowness Glass Arrow Head", - "Glass Arrow filled with stretched Laming Brew", - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + addItem( + tLastID = 205, + "Slowness Glass Arrow Head", + "Glass Arrow filled with stretched Laming Brew", + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); ItemList.Arrow_Head_Glass_Weakness.set( - addItem( - tLastID = 206, - "Weakness Glass Arrow Head", - "Glass Arrow filled with Weakening Brew", - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + addItem( + tLastID = 206, + "Weakness Glass Arrow Head", + "Glass Arrow filled with Weakening Brew", + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); ItemList.Arrow_Head_Glass_Weakness_Long.set( - addItem( - tLastID = 207, - "Weakness Glass Arrow Head", - "Glass Arrow filled with stretched Weakening Brew", - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + addItem( + tLastID = 207, + "Weakness Glass Arrow Head", + "Glass Arrow filled with stretched Weakening Brew", + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); ItemList.Arrow_Head_Glass_Holy_Water.set( - addItem( - tLastID = 208, - "Holy Water Glass Arrow Head", - "Glass Arrow filled with Holy Water", - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L))); + addItem( + tLastID = 208, + "Holy Water Glass Arrow Head", + "Glass Arrow filled with Holy Water", + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L))); ItemList.Arrow_Wooden_Glass_Emtpy.set( - addItem( - tLastID = 225, - "Regular Glass Vial Arrow", - "Empty Glass Arrow", - new Behaviour_Arrow_Potion(1.0F, 6.0F), - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); + addItem( + tLastID = 225, + "Regular Glass Vial Arrow", + "Empty Glass Arrow", + new Behaviour_Arrow_Potion(1.0F, 6.0F), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); ItemList.Arrow_Wooden_Glass_Poison.set( - addItem( - tLastID = 226, - "Regular Poison Arrow", - "Glass Arrow filled with Poison", - new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.poison.id, 450, 0, 100), - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + addItem( + tLastID = 226, + "Regular Poison Arrow", + "Glass Arrow filled with Poison", + new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.poison.id, 450, 0, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); ItemList.Arrow_Wooden_Glass_Poison_Long.set( - addItem( - tLastID = 227, - "Regular Poison Arrow", - "Glass Arrow filled with stretched Poison", - new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.poison.id, 900, 0, 100), - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + addItem( + tLastID = 227, + "Regular Poison Arrow", + "Glass Arrow filled with stretched Poison", + new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.poison.id, 900, 0, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); ItemList.Arrow_Wooden_Glass_Poison_Strong.set( - addItem( - tLastID = 228, - "Regular Poison Arrow", - "Glass Arrow filled with strong Poison", - new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.poison.id, 450, 1, 100), - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + addItem( + tLastID = 228, + "Regular Poison Arrow", + "Glass Arrow filled with strong Poison", + new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.poison.id, 450, 1, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); ItemList.Arrow_Wooden_Glass_Slowness.set( - addItem( - tLastID = 229, - "Regular Slowness Arrow", - "Glass Arrow filled with Laming Brew", - new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.moveSlowdown.id, 900, 0, 100), - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + addItem( + tLastID = 229, + "Regular Slowness Arrow", + "Glass Arrow filled with Laming Brew", + new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.moveSlowdown.id, 900, 0, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); ItemList.Arrow_Wooden_Glass_Slowness_Long.set( - addItem( - tLastID = 230, - "Regular Slowness Arrow", - "Glass Arrow filled with stretched Laming Brew", - new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.moveSlowdown.id, 1800, 0, 100), - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + addItem( + tLastID = 230, + "Regular Slowness Arrow", + "Glass Arrow filled with stretched Laming Brew", + new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.moveSlowdown.id, 1800, 0, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); ItemList.Arrow_Wooden_Glass_Weakness.set( - addItem( - tLastID = 231, - "Regular Weakness Arrow", - "Glass Arrow filled with Weakening Brew", - new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.weakness.id, 900, 0, 100), - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + addItem( + tLastID = 231, + "Regular Weakness Arrow", + "Glass Arrow filled with Weakening Brew", + new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.weakness.id, 900, 0, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); ItemList.Arrow_Wooden_Glass_Weakness_Long.set( - addItem( - tLastID = 232, - "Regular Weakness Arrow", - "Glass Arrow filled with stretched Weakening Brew", - new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.weakness.id, 1800, 0, 100), - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + addItem( + tLastID = 232, + "Regular Weakness Arrow", + "Glass Arrow filled with stretched Weakening Brew", + new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.weakness.id, 1800, 0, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); ItemList.Arrow_Wooden_Glass_Holy_Water.set( - addItem( - tLastID = 233, - "Regular Holy Water Arrow", - "Glass Arrow filled with Holy Water", - new Behaviour_Arrow_Potion(1.0F, 6.0F, Enchantment.smite, 10), - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L))); + addItem( + tLastID = 233, + "Regular Holy Water Arrow", + "Glass Arrow filled with Holy Water", + new Behaviour_Arrow_Potion(1.0F, 6.0F, Enchantment.smite, 10), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L))); ItemList.Arrow_Plastic_Glass_Emtpy.set( - addItem( - tLastID = 250, - "Light Glass Vial Arrow", - "Empty Glass Arrow", - new Behaviour_Arrow_Potion(1.5F, 6.0F), - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); + addItem( + tLastID = 250, + "Light Glass Vial Arrow", + "Empty Glass Arrow", + new Behaviour_Arrow_Potion(1.5F, 6.0F), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); ItemList.Arrow_Plastic_Glass_Poison.set( - addItem( - tLastID = 251, - "Light Poison Arrow", - "Glass Arrow filled with Poison", - new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.poison.id, 450, 0, 100), - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + addItem( + tLastID = 251, + "Light Poison Arrow", + "Glass Arrow filled with Poison", + new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.poison.id, 450, 0, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); ItemList.Arrow_Plastic_Glass_Poison_Long.set( - addItem( - tLastID = 252, - "Light Poison Arrow", - "Glass Arrow filled with stretched Poison", - new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.poison.id, 900, 0, 100), - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + addItem( + tLastID = 252, + "Light Poison Arrow", + "Glass Arrow filled with stretched Poison", + new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.poison.id, 900, 0, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); ItemList.Arrow_Plastic_Glass_Poison_Strong.set( - addItem( - tLastID = 253, - "Light Poison Arrow", - "Glass Arrow filled with strong Poison", - new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.poison.id, 450, 1, 100), - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + addItem( + tLastID = 253, + "Light Poison Arrow", + "Glass Arrow filled with strong Poison", + new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.poison.id, 450, 1, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); ItemList.Arrow_Plastic_Glass_Slowness.set( - addItem( - tLastID = 254, - "Light Slowness Arrow", - "Glass Arrow filled with Laming Brew", - new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.moveSlowdown.id, 900, 0, 100), - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + addItem( + tLastID = 254, + "Light Slowness Arrow", + "Glass Arrow filled with Laming Brew", + new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.moveSlowdown.id, 900, 0, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); ItemList.Arrow_Plastic_Glass_Slowness_Long.set( - addItem( - tLastID = 255, - "Light Slowness Arrow", - "Glass Arrow filled with stretched Laming Brew", - new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.moveSlowdown.id, 1800, 0, 100), - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + addItem( + tLastID = 255, + "Light Slowness Arrow", + "Glass Arrow filled with stretched Laming Brew", + new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.moveSlowdown.id, 1800, 0, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); ItemList.Arrow_Plastic_Glass_Weakness.set( - addItem( - tLastID = 256, - "Light Weakness Arrow", - "Glass Arrow filled with Weakening Brew", - new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.weakness.id, 900, 0, 100), - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + addItem( + tLastID = 256, + "Light Weakness Arrow", + "Glass Arrow filled with Weakening Brew", + new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.weakness.id, 900, 0, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); ItemList.Arrow_Plastic_Glass_Weakness_Long.set( - addItem( - tLastID = 257, - "Light Weakness Arrow", - "Glass Arrow filled with stretched Weakening Brew", - new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.weakness.id, 1800, 0, 100), - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); + addItem( + tLastID = 257, + "Light Weakness Arrow", + "Glass Arrow filled with stretched Weakening Brew", + new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.weakness.id, 1800, 0, 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L))); ItemList.Arrow_Plastic_Glass_Holy_Water.set( - addItem( - tLastID = 258, - "Light Holy Water Arrow", - "Glass Arrow filled with Holy Water", - new Behaviour_Arrow_Potion(1.5F, 6.0F, Enchantment.smite, 10), - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L))); + addItem( + tLastID = 258, + "Light Holy Water Arrow", + "Glass Arrow filled with Holy Water", + new Behaviour_Arrow_Potion(1.5F, 6.0F, Enchantment.smite, 10), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L))); GT_ModHandler.addCraftingRecipe( - ItemList.Arrow_Wooden_Glass_Emtpy.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Emtpy, 'F', - OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) }); + ItemList.Arrow_Wooden_Glass_Emtpy.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Emtpy, 'F', + OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) }); GT_ModHandler.addCraftingRecipe( - ItemList.Arrow_Wooden_Glass_Poison.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison, 'F', - OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) }); + ItemList.Arrow_Wooden_Glass_Poison.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison, 'F', + OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) }); GT_ModHandler.addCraftingRecipe( - ItemList.Arrow_Wooden_Glass_Poison_Long.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Long, 'F', - OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) }); + ItemList.Arrow_Wooden_Glass_Poison_Long.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Long, 'F', + OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) }); GT_ModHandler.addCraftingRecipe( - ItemList.Arrow_Wooden_Glass_Poison_Strong.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Strong, 'F', - OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) }); + ItemList.Arrow_Wooden_Glass_Poison_Strong.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Strong, 'F', + OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) }); GT_ModHandler.addCraftingRecipe( - ItemList.Arrow_Wooden_Glass_Slowness.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness, 'F', - OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) }); + ItemList.Arrow_Wooden_Glass_Slowness.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness, 'F', + OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) }); GT_ModHandler.addCraftingRecipe( - ItemList.Arrow_Wooden_Glass_Slowness_Long.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness_Long, 'F', - OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) }); + ItemList.Arrow_Wooden_Glass_Slowness_Long.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness_Long, 'F', + OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) }); GT_ModHandler.addCraftingRecipe( - ItemList.Arrow_Wooden_Glass_Weakness.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness, 'F', - OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) }); + ItemList.Arrow_Wooden_Glass_Weakness.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness, 'F', + OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) }); GT_ModHandler.addCraftingRecipe( - ItemList.Arrow_Wooden_Glass_Weakness_Long.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness_Long, 'F', - OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) }); + ItemList.Arrow_Wooden_Glass_Weakness_Long.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness_Long, 'F', + OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) }); GT_ModHandler.addCraftingRecipe( - ItemList.Arrow_Wooden_Glass_Holy_Water.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Holy_Water, 'F', - OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) }); + ItemList.Arrow_Wooden_Glass_Holy_Water.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Holy_Water, 'F', + OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) }); GT_ModHandler.addCraftingRecipe( - ItemList.Arrow_Plastic_Glass_Emtpy.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Emtpy, 'F', - OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) }); + ItemList.Arrow_Plastic_Glass_Emtpy.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Emtpy, 'F', + OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) }); GT_ModHandler.addCraftingRecipe( - ItemList.Arrow_Plastic_Glass_Poison.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison, 'F', - OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) }); + ItemList.Arrow_Plastic_Glass_Poison.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison, 'F', + OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) }); GT_ModHandler.addCraftingRecipe( - ItemList.Arrow_Plastic_Glass_Poison_Long.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Long, 'F', - OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) }); + ItemList.Arrow_Plastic_Glass_Poison_Long.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Long, 'F', + OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) }); GT_ModHandler.addCraftingRecipe( - ItemList.Arrow_Plastic_Glass_Poison_Strong.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Strong, 'F', - OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) }); + ItemList.Arrow_Plastic_Glass_Poison_Strong.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Strong, 'F', + OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) }); GT_ModHandler.addCraftingRecipe( - ItemList.Arrow_Plastic_Glass_Slowness.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness, 'F', - OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) }); + ItemList.Arrow_Plastic_Glass_Slowness.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness, 'F', + OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) }); GT_ModHandler.addCraftingRecipe( - ItemList.Arrow_Plastic_Glass_Slowness_Long.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness_Long, 'F', - OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) }); + ItemList.Arrow_Plastic_Glass_Slowness_Long.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness_Long, 'F', + OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) }); GT_ModHandler.addCraftingRecipe( - ItemList.Arrow_Plastic_Glass_Weakness.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness, 'F', - OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) }); + ItemList.Arrow_Plastic_Glass_Weakness.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness, 'F', + OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) }); GT_ModHandler.addCraftingRecipe( - ItemList.Arrow_Plastic_Glass_Weakness_Long.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness_Long, 'F', - OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) }); + ItemList.Arrow_Plastic_Glass_Weakness_Long.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness_Long, 'F', + OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) }); GT_ModHandler.addCraftingRecipe( - ItemList.Arrow_Plastic_Glass_Holy_Water.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Holy_Water, 'F', - OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) }); + ItemList.Arrow_Plastic_Glass_Holy_Water.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Holy_Water, 'F', + OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) }); ItemList.Shape_Empty.set( - addItem( - tLastID = 300, - "Empty Shape Plate", - "Raw Plate to make Molds and Extruder Shapes", - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L))); + addItem( + tLastID = 300, + "Empty Shape Plate", + "Raw Plate to make Molds and Extruder Shapes", + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L))); // GT_ModHandler.addCraftingRecipe(ItemList.Shape_Empty.get(1L, new Object[0]), // GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.BUFFERED | @@ -680,8 +674,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")); @@ -692,8 +686,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")); @@ -703,583 +697,574 @@ 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, - new ItemStack(Blocks.glass), - 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")); + new ItemStack(Blocks.glass), + null, + new ItemStack(Blocks.glass), + 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_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_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")); + 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_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_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), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "hXS", aTextShape, "fXd", 'P', ItemList.Shape_Extruder_Block, 'X', - OrePrefixes.plate.get(Materials.StainlessSteel), 'S', - OrePrefixes.screw.get(Materials.StainlessSteel) }); + ItemList.Shape_Slicer_Flat.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "hXS", aTextShape, "fXd", 'P', ItemList.Shape_Extruder_Block, 'X', + OrePrefixes.plate.get(Materials.StainlessSteel), 'S', + OrePrefixes.screw.get(Materials.StainlessSteel) }); GT_ModHandler.addCraftingRecipe( - ItemList.Shape_Slicer_Stripes.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "hXS", "XPX", "fXd", 'P', ItemList.Shape_Extruder_Block, 'X', - OrePrefixes.plate.get(Materials.StainlessSteel), 'S', - OrePrefixes.screw.get(Materials.StainlessSteel) }); + ItemList.Shape_Slicer_Stripes.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "hXS", "XPX", "fXd", 'P', ItemList.Shape_Extruder_Block, 'X', + OrePrefixes.plate.get(Materials.StainlessSteel), 'S', + OrePrefixes.screw.get(Materials.StainlessSteel) }); ItemList.Fuel_Can_Plastic_Empty.set( - addItem( - tLastID = 400, - "Empty Plastic Fuel Can", - "Used to store Fuels", - new ItemData(Materials.Plastic, OrePrefixes.plate.mMaterialAmount * 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L))); + addItem( + tLastID = 400, + "Empty Plastic Fuel Can", + "Used to store Fuels", + new ItemData(Materials.Plastic, OrePrefixes.plate.mMaterialAmount * 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L))); ItemList.Fuel_Can_Plastic_Filled.set( - addItem( - tLastID = 401, - "Plastic Fuel Can", - "Burns well in Diesel Generators", - new ItemData(Materials.Plastic, OrePrefixes.plate.mMaterialAmount * 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L))); + addItem( + tLastID = 401, + "Plastic Fuel Can", + "Burns well in Diesel Generators", + new ItemData(Materials.Plastic, OrePrefixes.plate.mMaterialAmount * 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L))); GT_ModHandler.addCraftingRecipe( - ItemList.Fuel_Can_Plastic_Empty.get(7L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { " PP", "P P", "PPP", 'P', OrePrefixes.plate.get(Materials.Plastic) }); + ItemList.Fuel_Can_Plastic_Empty.get(7L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { " PP", "P P", "PPP", 'P', OrePrefixes.plate.get(Materials.Plastic) }); ItemList.Spray_Empty.set( - addItem( - tLastID = 402, - "Empty Spray Can", - "Used for making Sprays", - new ItemData( - Materials.Tin, - OrePrefixes.plate.mMaterialAmount * 2L, - Materials.Redstone, - OrePrefixes.dust.mMaterialAmount), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); + addItem( + tLastID = 402, + "Empty Spray Can", + "Used for making Sprays", + new ItemData( + Materials.Tin, + OrePrefixes.plate.mMaterialAmount * 2L, + Materials.Redstone, + OrePrefixes.dust.mMaterialAmount), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), - GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Spray_Empty.get(1L), - 800, - 1); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Spray_Empty.get(1L), + 800, + 1); ItemList.Crate_Empty.set( - addItem( - tLastID = 403, - "Empty Crate", - "To Package lots of Material", - new ItemData(Materials.Wood, 3628800L, Materials.Iron, OrePrefixes.screw.mMaterialAmount), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L))); + addItem( + tLastID = 403, + "Empty Crate", + "To Package lots of Material", + new ItemData(Materials.Wood, 3628800L, Materials.Iron, OrePrefixes.screw.mMaterialAmount), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L))); GT_ModHandler.addCraftingRecipe( - ItemList.Crate_Empty.get(4L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "SWS", "WdW", "SWS", 'W', OrePrefixes.plank.get(Materials.Wood), 'S', - OrePrefixes.screw.get(Materials.AnyIron) }); + ItemList.Crate_Empty.get(4L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "SWS", "WdW", "SWS", 'W', OrePrefixes.plank.get(Materials.Wood), 'S', + OrePrefixes.screw.get(Materials.AnyIron) }); GT_ModHandler.addCraftingRecipe( - ItemList.Crate_Empty.get(4L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "SWS", "WdW", "SWS", 'W', OrePrefixes.plank.get(Materials.Wood), 'S', - OrePrefixes.screw.get(Materials.Steel) }); + ItemList.Crate_Empty.get(4L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "SWS", "WdW", "SWS", 'W', OrePrefixes.plank.get(Materials.Wood), 'S', + OrePrefixes.screw.get(Materials.Steel) }); ItemList.ThermosCan_Empty.set( - addItem( - tLastID = 404, - "Empty Thermos Can", - "Keeping hot things hot and cold things cold", - new ItemData( - Materials.Aluminium, - OrePrefixes.plateDouble.mMaterialAmount * 1L + 2L * OrePrefixes.ring.mMaterialAmount), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L))); + addItem( + tLastID = 404, + "Empty Thermos Can", + "Keeping hot things hot and cold things cold", + new ItemData( + Materials.Aluminium, + OrePrefixes.plateDouble.mMaterialAmount * 1L + 2L * OrePrefixes.ring.mMaterialAmount), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L))); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Aluminium, 1L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Aluminium, 2L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.ThermosCan_Empty.get(1L), - 800, - 1); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Aluminium, 1L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Aluminium, 2L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.ThermosCan_Empty.get(1L), + 800, + 1); ItemList.Large_Fluid_Cell_Steel.set( - addItem( - tLastID = 405, - "Large Steel Fluid Cell", - "", - new ItemData( - Materials.Steel, - OrePrefixes.plateDouble.mMaterialAmount * 4L, - new MaterialStack(Materials.Bronze, OrePrefixes.ring.mMaterialAmount * 4L)), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); + addItem( + tLastID = 405, + "Large Steel Fluid Cell", + "", + new ItemData( + Materials.Steel, + OrePrefixes.plateDouble.mMaterialAmount * 4L, + new MaterialStack(Materials.Bronze, OrePrefixes.ring.mMaterialAmount * 4L)), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); setFluidContainerStats(32000 + tLastID, 8000L, 64L); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Steel, 4L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.AnyBronze, 4L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Large_Fluid_Cell_Steel.get(1L), - 200, - 30); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Steel, 4L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.AnyBronze, 4L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Large_Fluid_Cell_Steel.get(1L), + 200, + 30); ItemList.Large_Fluid_Cell_TungstenSteel.set( - addItem( - tLastID = 406, - "Large Tungstensteel Fluid Cell", - "", - new ItemData( - Materials.TungstenSteel, - OrePrefixes.plateDouble.mMaterialAmount * 4L, - new MaterialStack(Materials.Platinum, OrePrefixes.ring.mMaterialAmount * 4L)), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 9L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 7L))); + addItem( + tLastID = 406, + "Large Tungstensteel Fluid Cell", + "", + new ItemData( + Materials.TungstenSteel, + OrePrefixes.plateDouble.mMaterialAmount * 4L, + new MaterialStack(Materials.Platinum, OrePrefixes.ring.mMaterialAmount * 4L)), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 9L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 7L))); setFluidContainerStats(32000 + tLastID, 512000L, 32L); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.TungstenSteel, 4L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Platinum, 4L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Large_Fluid_Cell_TungstenSteel.get(1L), - 200, - 480); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.TungstenSteel, 4L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Platinum, 4L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Large_Fluid_Cell_TungstenSteel.get(1L), + 200, + 480); ItemList.Large_Fluid_Cell_Aluminium.set( - addItem( - tLastID = 407, - "Large Aluminium Fluid Cell", - "", - new ItemData( - Materials.Aluminium, - OrePrefixes.plateDouble.mMaterialAmount * 4L, - new MaterialStack(Materials.Silver, OrePrefixes.ring.mMaterialAmount * 4L)), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 5L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 3L))); + addItem( + tLastID = 407, + "Large Aluminium Fluid Cell", + "", + new ItemData( + Materials.Aluminium, + OrePrefixes.plateDouble.mMaterialAmount * 4L, + new MaterialStack(Materials.Silver, OrePrefixes.ring.mMaterialAmount * 4L)), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 5L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 3L))); setFluidContainerStats(32000 + tLastID, 32000L, 64L); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Aluminium, 4L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Silver, 4L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Large_Fluid_Cell_Aluminium.get(1L), - 200, - 64); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Aluminium, 4L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Silver, 4L), GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Large_Fluid_Cell_Aluminium.get(1L), + 200, + 64); ItemList.Large_Fluid_Cell_StainlessSteel.set( - addItem( - tLastID = 408, - "Large Stainless Steel Fluid Cell", - "", - new ItemData( - Materials.StainlessSteel, - OrePrefixes.plateDouble.mMaterialAmount * 4L, - new MaterialStack(Materials.Electrum, OrePrefixes.ring.mMaterialAmount * 4L)), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 6L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L))); + addItem( + tLastID = 408, + "Large Stainless Steel Fluid Cell", + "", + new ItemData( + Materials.StainlessSteel, + OrePrefixes.plateDouble.mMaterialAmount * 4L, + new MaterialStack(Materials.Electrum, OrePrefixes.ring.mMaterialAmount * 4L)), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 6L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L))); setFluidContainerStats(32000 + tLastID, 64000L, 64L); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.StainlessSteel, 4L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Electrum, 4L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Large_Fluid_Cell_StainlessSteel.get(1L), - 200, - 120); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.StainlessSteel, 4L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Electrum, 4L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Large_Fluid_Cell_StainlessSteel.get(1L), + 200, + 120); ItemList.Large_Fluid_Cell_Titanium.set( - addItem( - tLastID = 409, - "Large Titanium Fluid Cell", - "", - new ItemData( - Materials.Titanium, - OrePrefixes.plateDouble.mMaterialAmount * 4L, - new MaterialStack(Materials.RoseGold, OrePrefixes.ring.mMaterialAmount * 4L)), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 7L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 5L))); + addItem( + tLastID = 409, + "Large Titanium Fluid Cell", + "", + new ItemData( + Materials.Titanium, + OrePrefixes.plateDouble.mMaterialAmount * 4L, + new MaterialStack(Materials.RoseGold, OrePrefixes.ring.mMaterialAmount * 4L)), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 7L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 5L))); setFluidContainerStats(32000 + tLastID, 128000L, 64L); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Titanium, 4L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.RoseGold, 4L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Large_Fluid_Cell_Titanium.get(1L), - 200, - 256); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Titanium, 4L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.RoseGold, 4L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Large_Fluid_Cell_Titanium.get(1L), + 200, + 256); ItemList.Large_Fluid_Cell_Chrome.set( - addItem( - tLastID = 410, - "Large Chrome Fluid Cell", - "", - new ItemData( - Materials.Chrome, - OrePrefixes.plateDouble.mMaterialAmount * 4L, - new MaterialStack(Materials.Palladium, OrePrefixes.ring.mMaterialAmount * 4L)), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 6L))); + addItem( + tLastID = 410, + "Large Chrome Fluid Cell", + "", + new ItemData( + Materials.Chrome, + OrePrefixes.plateDouble.mMaterialAmount * 4L, + new MaterialStack(Materials.Palladium, OrePrefixes.ring.mMaterialAmount * 4L)), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 6L))); setFluidContainerStats(32000 + tLastID, 2048000L, 8L); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Chrome, 4L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Palladium, 4L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Large_Fluid_Cell_Chrome.get(1L), - 200, - 1024); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Chrome, 4L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Palladium, 4L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Large_Fluid_Cell_Chrome.get(1L), + 200, + 1024); ItemList.Large_Fluid_Cell_Iridium.set( - addItem( - tLastID = 411, - "Large Iridium Fluid Cell", - "", - new ItemData( - Materials.Iridium, - OrePrefixes.plateDouble.mMaterialAmount * 4L, - new MaterialStack(Materials.Naquadah, OrePrefixes.ring.mMaterialAmount * 4L)), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 10L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L))); + addItem( + tLastID = 411, + "Large Iridium Fluid Cell", + "", + new ItemData( + Materials.Iridium, + OrePrefixes.plateDouble.mMaterialAmount * 4L, + new MaterialStack(Materials.Naquadah, OrePrefixes.ring.mMaterialAmount * 4L)), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 10L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L))); setFluidContainerStats(32000 + tLastID, 8192000L, 2L); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Iridium, 4L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Naquadah, 4L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Large_Fluid_Cell_Iridium.get(1L), - 200, - 1920); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Iridium, 4L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Naquadah, 4L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Large_Fluid_Cell_Iridium.get(1L), + 200, + 1920); ItemList.Large_Fluid_Cell_Osmium.set( - addItem( - tLastID = 412, - "Large Osmium Fluid Cell", - "", - new ItemData( - Materials.Osmium, - OrePrefixes.plateDouble.mMaterialAmount * 4L, - new MaterialStack(Materials.ElectrumFlux, OrePrefixes.ring.mMaterialAmount * 4L)), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 11L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 9L))); + addItem( + tLastID = 412, + "Large Osmium Fluid Cell", + "", + new ItemData( + Materials.Osmium, + OrePrefixes.plateDouble.mMaterialAmount * 4L, + new MaterialStack(Materials.ElectrumFlux, OrePrefixes.ring.mMaterialAmount * 4L)), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 11L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 9L))); setFluidContainerStats(32000 + tLastID, 32768000L, 1L); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Osmium, 4L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.ElectrumFlux, 4L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Large_Fluid_Cell_Osmium.get(1L), - 200, - 4096); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Osmium, 4L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.ElectrumFlux, 4L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Large_Fluid_Cell_Osmium.get(1L), + 200, + 4096); ItemList.Large_Fluid_Cell_Neutronium.set( - addItem( - tLastID = 413, - "Large Neutronium Fluid Cell", - "", - new ItemData( - Materials.Neutronium, - OrePrefixes.plateDouble.mMaterialAmount * 4L, - new MaterialStack(Materials.Draconium, OrePrefixes.ring.mMaterialAmount * 4L)), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 12L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 10L))); + addItem( + tLastID = 413, + "Large Neutronium Fluid Cell", + "", + new ItemData( + Materials.Neutronium, + OrePrefixes.plateDouble.mMaterialAmount * 4L, + new MaterialStack(Materials.Draconium, OrePrefixes.ring.mMaterialAmount * 4L)), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 12L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 10L))); setFluidContainerStats(32000 + tLastID, 131072000L, 1L); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Neutronium, 4L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Draconium, 4L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Large_Fluid_Cell_Neutronium.get(1L), - 200, - 7680); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Neutronium, 4L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Draconium, 4L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Large_Fluid_Cell_Neutronium.get(1L), + 200, + 7680); for (byte i = 0; i < 16; i = (byte) (i + 1)) { ItemList.SPRAY_CAN_DYES[i].set( - addItem( - tLastID = 430 + 2 * i, - "Spray Can (" + Dyes.get(i).mName + ")", - "Full", - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 4L))); + addItem( + tLastID = 430 + 2 * i, + "Spray Can (" + Dyes.get(i).mName + ")", + "Full", + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 4L))); ItemList.SPRAY_CAN_DYES_USED[i].set( - addItem( - tLastID + 1, - "Spray Can (" + Dyes.get(i).mName + ")", - "Used", - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 3L), - SubTag.INVISIBLE)); + addItem( + tLastID + 1, + "Spray Can (" + Dyes.get(i).mName + ")", + "Used", + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 3L), + SubTag.INVISIBLE)); IItemBehaviour tBehaviour = new Behaviour_Spray_Color( - ItemList.Spray_Empty.get(1L), - ItemList.SPRAY_CAN_DYES_USED[i].get(1L), - ItemList.SPRAY_CAN_DYES[i].get(1L), - 512L, - i); + ItemList.Spray_Empty.get(1L), + ItemList.SPRAY_CAN_DYES_USED[i].get(1L), + ItemList.SPRAY_CAN_DYES[i].get(1L), + 512L, + i); addItemBehavior(32000 + tLastID, tBehaviour); addItemBehavior(32001 + tLastID, tBehaviour); } ItemList.Tool_Matches.set( - addItem( - tLastID = 471, - "Match", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); + addItem( + tLastID = 471, + "Match", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); ItemList.Tool_MatchBox_Used.set( - addItem( - tLastID = 472, - "Match Box", - "This is not a Car", - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), - SubTag.INVISIBLE)); + addItem( + tLastID = 472, + "Match Box", + "This is not a Car", + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), + SubTag.INVISIBLE)); ItemList.Tool_MatchBox_Full.set( - addItem( - tLastID = 473, - "Match Box (Full)", - "This is not a Car", - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); + addItem( + tLastID = 473, + "Match Box (Full)", + "This is not a Car", + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); IItemBehaviour tBehaviour = new Behaviour_Lighter( - null, - ItemList.Tool_Matches.get(1L), - ItemList.Tool_Matches.get(1L), - 1L); + null, + ItemList.Tool_Matches.get(1L), + ItemList.Tool_Matches.get(1L), + 1L); addItemBehavior(32471, tBehaviour); tBehaviour = new Behaviour_Lighter( - null, - ItemList.Tool_MatchBox_Used.get(1L), - ItemList.Tool_MatchBox_Full.get(1L), - 16L); + null, + ItemList.Tool_MatchBox_Used.get(1L), + ItemList.Tool_MatchBox_Full.get(1L), + 16L); addItemBehavior(32472, tBehaviour); addItemBehavior(32473, tBehaviour); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 1L), - GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Phosphorus, 1L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Tool_Matches.get(1L), - 16, - 16); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Phosphorus, 1L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Tool_Matches.get(1L), + 16, + 16); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 1L), - GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.TricalciumPhosphate, 1L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Tool_Matches.get(1L), - 16, - 16); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.TricalciumPhosphate, 1L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Tool_Matches.get(1L), + 16, + 16); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 4L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphorus, 1L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Tool_Matches.get(4L), - 64, - 16); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphorus, 1L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Tool_Matches.get(4L), + 64, + 16); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 4L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TricalciumPhosphate, 1L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Tool_Matches.get(4L), - 64, - 16); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Wood, 4L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TricalciumPhosphate, 1L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Tool_Matches.get(4L), + 64, + 16); GT_Values.RA.addBoxingRecipe( - ItemList.Tool_Matches.get(16L), - GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Paper, 1L), - 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); + ItemList.Tool_Matches.get(16L), + GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Paper, 1L), + 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); ItemList.Tool_Lighter_Invar_Empty.set( - addItem( - tLastID = 474, - "Lighter (Empty)", - "", - new ItemData(Materials.Invar, OrePrefixes.plate.mMaterialAmount * 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); + addItem( + tLastID = 474, + "Lighter (Empty)", + "", + new ItemData(Materials.Invar, OrePrefixes.plate.mMaterialAmount * 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); ItemList.Tool_Lighter_Invar_Used.set( - addItem( - tLastID = 475, - "Lighter", - "", - new ItemData(Materials.Invar, OrePrefixes.plate.mMaterialAmount * 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), - SubTag.INVISIBLE)); + addItem( + tLastID = 475, + "Lighter", + "", + new ItemData(Materials.Invar, OrePrefixes.plate.mMaterialAmount * 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), + SubTag.INVISIBLE)); ItemList.Tool_Lighter_Invar_Full.set( - addItem( - tLastID = 476, - "Lighter (Full)", - "", - new ItemData(Materials.Invar, OrePrefixes.plate.mMaterialAmount * 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); + addItem( + tLastID = 476, + "Lighter (Full)", + "", + new ItemData(Materials.Invar, OrePrefixes.plate.mMaterialAmount * 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); tBehaviour = new Behaviour_Lighter( - ItemList.Tool_Lighter_Invar_Empty.get(1L), - ItemList.Tool_Lighter_Invar_Used.get(1L), - ItemList.Tool_Lighter_Invar_Full.get(1L), - 100L); + ItemList.Tool_Lighter_Invar_Empty.get(1L), + ItemList.Tool_Lighter_Invar_Used.get(1L), + ItemList.Tool_Lighter_Invar_Full.get(1L), + 100L); addItemBehavior(32475, tBehaviour); addItemBehavior(32476, tBehaviour); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Invar, 2L), - new ItemStack(Items.flint, 1), GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Tool_Lighter_Invar_Empty.get(1L), - 256, - 16); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Invar, 2L), + new ItemStack(Items.flint, 1), GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Tool_Lighter_Invar_Empty.get(1L), + 256, + 16); ItemList.Tool_Lighter_Platinum_Empty.set( - addItem( - tLastID = 477, - "Platinum Lighter (Empty)", - "A known Prank Master is engraved on it", - new ItemData(Materials.Platinum, OrePrefixes.plate.mMaterialAmount * 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); + addItem( + tLastID = 477, + "Platinum Lighter (Empty)", + "A known Prank Master is engraved on it", + new ItemData(Materials.Platinum, OrePrefixes.plate.mMaterialAmount * 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); ItemList.Tool_Lighter_Platinum_Used.set( - addItem( - tLastID = 478, - "Platinum Lighter", - "A known Prank Master is engraved on it", - new ItemData(Materials.Platinum, OrePrefixes.plate.mMaterialAmount * 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), - SubTag.INVISIBLE)); + addItem( + tLastID = 478, + "Platinum Lighter", + "A known Prank Master is engraved on it", + new ItemData(Materials.Platinum, OrePrefixes.plate.mMaterialAmount * 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), + SubTag.INVISIBLE)); ItemList.Tool_Lighter_Platinum_Full.set( - addItem( - tLastID = 479, - "Platinum Lighter (Full)", - "A known Prank Master is engraved on it", - new ItemData(Materials.Platinum, OrePrefixes.plate.mMaterialAmount * 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); + addItem( + tLastID = 479, + "Platinum Lighter (Full)", + "A known Prank Master is engraved on it", + new ItemData(Materials.Platinum, OrePrefixes.plate.mMaterialAmount * 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); tBehaviour = new Behaviour_Lighter( - ItemList.Tool_Lighter_Platinum_Empty.get(1L), - ItemList.Tool_Lighter_Platinum_Used.get(1L), - ItemList.Tool_Lighter_Platinum_Full.get(1L), - 1000L); + ItemList.Tool_Lighter_Platinum_Empty.get(1L), + ItemList.Tool_Lighter_Platinum_Used.get(1L), + ItemList.Tool_Lighter_Platinum_Full.get(1L), + 1000L); addItemBehavior(32478, tBehaviour); addItemBehavior(32479, tBehaviour); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Platinum, 2L), - new ItemStack(Items.flint, 1), GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Tool_Lighter_Platinum_Empty.get(1L), - 256, - 256); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Platinum, 2L), + new ItemStack(Items.flint, 1), GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Tool_Lighter_Platinum_Empty.get(1L), + 256, + 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', @@ -1287,12 +1272,12 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { // OrePrefixes.compressed.get(Materials.Aluminium), 'S', OrePrefixes.compressed.get(Materials.Steel)}); } ItemList.Ingot_IridiumAlloy.set( - addItem( - tLastID = 480, - "Iridium Alloy Ingot", - "Used to make Iridium Plates", - new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L))); + addItem( + tLastID = 480, + "Iridium Alloy Ingot", + "Used to make Iridium Plates", + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L))); // GT_ModHandler.addRollingMachineRecipe(ItemList.Ingot_IridiumAlloy.get(1L, new Object[0]), new Object[]{"IAI", // "ADA", "IAI", 'D', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "iridiumplate", true) @@ -1305,284 +1290,284 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { // OrePrefixes.plateAlloy.get("Advanced"), 'I', OrePrefixes.plate.get(Materials.Iridium)}); ItemList.Paper_Printed_Pages.set( - addItem( - tLastID = 481, - "Printed Pages", - "Used to make written Books", - new ItemData(Materials.Paper, 10886400L), - new Behaviour_PrintedPages(), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L))); + addItem( + tLastID = 481, + "Printed Pages", + "Used to make written Books", + new ItemData(Materials.Paper, 10886400L), + new Behaviour_PrintedPages(), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L))); ItemList.Paper_Magic_Empty.set( - addItem( - tLastID = 482, - "Magic Paper", - "", - SubTag.INVISIBLE, - new ItemData(Materials.Paper, 3628800L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 1L))); + addItem( + tLastID = 482, + "Magic Paper", + "", + SubTag.INVISIBLE, + new ItemData(Materials.Paper, 3628800L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 1L))); ItemList.Paper_Magic_Page.set( - addItem( - tLastID = 483, - "Enchanted Page", - "", - SubTag.INVISIBLE, - new ItemData(Materials.Paper, 3628800L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 2L))); + addItem( + tLastID = 483, + "Enchanted Page", + "", + SubTag.INVISIBLE, + new ItemData(Materials.Paper, 3628800L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 2L))); ItemList.Paper_Magic_Pages.set( - addItem( - tLastID = 484, - "Enchanted Pages", - "", - SubTag.INVISIBLE, - new ItemData(Materials.Paper, 10886400L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 4L))); + addItem( + tLastID = 484, + "Enchanted Pages", + "", + SubTag.INVISIBLE, + new ItemData(Materials.Paper, 10886400L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PRAECANTATIO, 4L))); ItemList.Paper_Punch_Card_Empty.set( - addItem( - tLastID = 485, - "Punch Card", - "", - SubTag.INVISIBLE, - new ItemData(Materials.Paper, 7257600L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L))); + addItem( + tLastID = 485, + "Punch Card", + "", + SubTag.INVISIBLE, + new ItemData(Materials.Paper, 7257600L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L))); ItemList.Paper_Punch_Card_Encoded.set( - addItem( - tLastID = 486, - "Punched Card", - "", - SubTag.INVISIBLE, - new ItemData(Materials.Paper, 7257600L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L))); + addItem( + tLastID = 486, + "Punched Card", + "", + SubTag.INVISIBLE, + new ItemData(Materials.Paper, 7257600L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L))); ItemList.Book_Written_01.set( - addItem( - tLastID = 487, - "Book", - "", - new ItemData(Materials.Paper, 10886400L), - "bookWritten", - OreDictNames.craftingBook, - new Behaviour_WrittenBook(), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L))); + addItem( + tLastID = 487, + "Book", + "", + new ItemData(Materials.Paper, 10886400L), + "bookWritten", + OreDictNames.craftingBook, + new Behaviour_WrittenBook(), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L))); ItemList.Book_Written_02.set( - addItem( - tLastID = 488, - "Book", - "", - new ItemData(Materials.Paper, 10886400L), - "bookWritten", - OreDictNames.craftingBook, - new Behaviour_WrittenBook(), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L))); + addItem( + tLastID = 488, + "Book", + "", + new ItemData(Materials.Paper, 10886400L), + "bookWritten", + OreDictNames.craftingBook, + new Behaviour_WrittenBook(), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L))); ItemList.Book_Written_03.set( - addItem( - tLastID = 489, - "Book", - "", - new ItemData(Materials.Paper, 10886400L), - "bookWritten", - OreDictNames.craftingBook, - new Behaviour_WrittenBook(), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L))); + addItem( + tLastID = 489, + "Book", + "", + new ItemData(Materials.Paper, 10886400L), + "bookWritten", + OreDictNames.craftingBook, + new Behaviour_WrittenBook(), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L))); ItemList.Schematic.set( - addItem( - tLastID = 490, - "Schematic", - "EMPTY", - new ItemData(Materials.Steel, 7257600L), - new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 1L))); + addItem( + tLastID = 490, + "Schematic", + "EMPTY", + new ItemData(Materials.Steel, 7257600L), + new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 1L))); ItemList.Schematic_Crafting.set( - addItem( - tLastID = 491, - "Schematic (Crafting)", - "Crafts the Programmed Recipe", - new ItemData(Materials.Steel, 7257600L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L))); + addItem( + tLastID = 491, + "Schematic (Crafting)", + "Crafts the Programmed Recipe", + new ItemData(Materials.Steel, 7257600L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L))); ItemList.Schematic_1by1.set( - addItem( - tLastID = 495, - "Schematic (1x1)", - "Crafts 1 Items as 1x1 (use in Packager)", - new ItemData(Materials.Steel, 7257600L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L))); + addItem( + tLastID = 495, + "Schematic (1x1)", + "Crafts 1 Items as 1x1 (use in Packager)", + new ItemData(Materials.Steel, 7257600L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L))); ItemList.Schematic_2by2.set( - addItem( - tLastID = 496, - "Schematic (2x2)", - "Crafts 4 Items as 2x2 (use in Packager)", - new ItemData(Materials.Steel, 7257600L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L))); + addItem( + tLastID = 496, + "Schematic (2x2)", + "Crafts 4 Items as 2x2 (use in Packager)", + new ItemData(Materials.Steel, 7257600L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L))); ItemList.Schematic_3by3.set( - addItem( - tLastID = 497, - "Schematic (3x3)", - "Crafts 9 Items as 3x3 (use in Packager)", - new ItemData(Materials.Steel, 7257600L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L))); + addItem( + tLastID = 497, + "Schematic (3x3)", + "Crafts 9 Items as 3x3 (use in Packager)", + new ItemData(Materials.Steel, 7257600L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L))); ItemList.Schematic_Dust.set( - addItem( - tLastID = 498, - "Schematic (Dusts)", - "Combines Dusts (use in Packager)", - new ItemData(Materials.Steel, 7257600L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L))); + addItem( + tLastID = 498, + "Schematic (Dusts)", + "Combines Dusts (use in Packager)", + new ItemData(Materials.Steel, 7257600L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L))); GT_ModHandler.addCraftingRecipe( - ItemList.Schematic_1by1.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "d ", aTextShape, aTextEmptyRow, 'P', ItemList.Schematic }); + ItemList.Schematic_1by1.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "d ", aTextShape, aTextEmptyRow, 'P', ItemList.Schematic }); GT_ModHandler.addCraftingRecipe( - ItemList.Schematic_2by2.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { " d ", aTextShape, aTextEmptyRow, 'P', ItemList.Schematic }); + ItemList.Schematic_2by2.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { " d ", aTextShape, aTextEmptyRow, 'P', ItemList.Schematic }); GT_ModHandler.addCraftingRecipe( - ItemList.Schematic_3by3.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { " d", aTextShape, aTextEmptyRow, 'P', ItemList.Schematic }); + ItemList.Schematic_3by3.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { " d", aTextShape, aTextEmptyRow, 'P', ItemList.Schematic }); GT_ModHandler.addCraftingRecipe( - ItemList.Schematic_Dust.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { aTextEmptyRow, aTextShape, " d", 'P', ItemList.Schematic }); + ItemList.Schematic_Dust.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { aTextEmptyRow, aTextShape, " d", 'P', ItemList.Schematic }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Schematic.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Schematic_Crafting }); + ItemList.Schematic.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Schematic_Crafting }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Schematic.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Schematic_1by1 }); + ItemList.Schematic.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Schematic_1by1 }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Schematic.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Schematic_2by2 }); + ItemList.Schematic.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Schematic_2by2 }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Schematic.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Schematic_3by3 }); + ItemList.Schematic.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Schematic_3by3 }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Schematic.get(1L), - GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Schematic_Dust }); + ItemList.Schematic.get(1L), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Schematic_Dust }); ItemList.Battery_Hull_LV.set( - addItem( - 500, - "Small Battery Hull", - "An empty LV Battery Hull", - new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); + addItem( + 500, + "Small Battery Hull", + "An empty LV Battery Hull", + new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); ItemList.Battery_Hull_MV.set( - addItem( - 501, - "Medium Battery Hull", - "An empty MV Battery Hull", - new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 3L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); + addItem( + 501, + "Medium Battery Hull", + "An empty MV Battery Hull", + new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); ItemList.Battery_Hull_HV.set( - addItem( - 502, - "Large Battery Hull", - "An empty HV Battery Hull", - new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 9L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); + addItem( + 502, + "Large Battery Hull", + "An empty HV Battery Hull", + new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 9L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L))); GT_ModHandler.addCraftingRecipe( - ItemList.Battery_Hull_LV.get(1L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "Cf ", "Ph ", "Ps ", 'P', OrePrefixes.plate.get(Materials.BatteryAlloy), 'C', - OreDictNames.craftingWireTin }); + ItemList.Battery_Hull_LV.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "Cf ", "Ph ", "Ps ", 'P', OrePrefixes.plate.get(Materials.BatteryAlloy), 'C', + OreDictNames.craftingWireTin }); // GT_ModHandler.addCraftingRecipe(ItemList.Battery_Hull_MV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new // Object[]{"C C", "PPP", "PPP", 'P', OrePrefixes.plate.get(Materials.BatteryAlloy), 'C', // OreDictNames.craftingWireCopper}); // ULV Batteries ItemList.Battery_RE_ULV_Tantalum.set( - addItem( - tLastID = 499, - "Tantalum Capacitor", - "Reusable", - "batteryULV", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); + addItem( + tLastID = 499, + "Tantalum Capacitor", + "Reusable", + "batteryULV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); setElectricStats(32000 + tLastID, 1000L, GT_Values.V[0], 0L, -3L, false); registerTieredTooltip(ItemList.Battery_RE_ULV_Tantalum.get(1), ULV); // LV Batteries ItemList.Battery_SU_LV_SulfuricAcid.set( - addItem( - tLastID = 510, - "Small Acid Battery", - "Single Use", - "batteryLV", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); + addItem( + tLastID = 510, + "Small Acid Battery", + "Single Use", + "batteryLV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); setElectricStats(32000 + tLastID, 18000L, GT_Values.V[1], 1L, -2L, true); registerTieredTooltip(ItemList.Battery_SU_LV_SulfuricAcid.get(1), LV); ItemList.Battery_SU_LV_Mercury.set( - addItem( - tLastID = 511, - "Small Mercury Battery", - "Single Use", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); + addItem( + tLastID = 511, + "Small Mercury Battery", + "Single Use", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); setElectricStats(32000 + tLastID, 32000L, GT_Values.V[1], 1L, -2L, true); registerTieredTooltip(ItemList.Battery_SU_LV_Mercury.get(1), LV); ItemList.Battery_RE_LV_Cadmium.set( - addItem( - tLastID = 517, - "Small Cadmium Battery", - "Reusable", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), - "batteryLV")); + addItem( + tLastID = 517, + "Small Cadmium Battery", + "Reusable", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), + "batteryLV")); setElectricStats(32000 + tLastID, 75000L, GT_Values.V[1], 1L, -3L, true); registerTieredTooltip(ItemList.Battery_RE_LV_Cadmium.get(1), LV); // Annoying backwards compat OreDictionary.registerOre("calclavia:ADVANCED_BATTERY", ItemList.Battery_RE_LV_Cadmium.get(1)); ItemList.Battery_RE_LV_Lithium.set( - addItem( - tLastID = 518, - "Small Lithium Battery", - "Reusable", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), - "batteryLV")); + addItem( + tLastID = 518, + "Small Lithium Battery", + "Reusable", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), + "batteryLV")); setElectricStats(32000 + tLastID, 100000L, GT_Values.V[1], 1L, -3L, true); registerTieredTooltip(ItemList.Battery_RE_LV_Lithium.get(1), LV); // Annoying backwards compat OreDictionary.registerOre("calclavia:ADVANCED_BATTERY", ItemList.Battery_RE_LV_Lithium.get(1)); ItemList.Battery_RE_LV_Sodium.set( - addItem( - tLastID = 519, - "Small Sodium Battery", - "Reusable", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), - "calclavia:ADVANCED_BATTERY")); + addItem( + tLastID = 519, + "Small Sodium Battery", + "Reusable", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), + "calclavia:ADVANCED_BATTERY")); setElectricStats(32000 + tLastID, 50000L, GT_Values.V[1], 1L, -3L, true); registerTieredTooltip(ItemList.Battery_RE_LV_Sodium.get(1), LV); // Annoying backwards compat @@ -1590,137 +1575,134 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { // MV Batteries ItemList.Battery_SU_MV_SulfuricAcid.set( - addItem( - tLastID = 520, - "Medium Acid Battery", - "Single Use", - "batteryMV", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L))); + addItem( + tLastID = 520, + "Medium Acid Battery", + "Single Use", + "batteryMV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L))); setElectricStats(32000 + tLastID, 72000L, GT_Values.V[2], 2L, -2L, true); registerTieredTooltip(ItemList.Battery_SU_MV_SulfuricAcid.get(1), MV); ItemList.Battery_SU_MV_Mercury.set( - addItem( - tLastID = 521, - "Medium Mercury Battery", - "Single Use", - "batteryMV", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L))); + addItem( + tLastID = 521, + "Medium Mercury Battery", + "Single Use", + "batteryMV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L))); setElectricStats(32000 + tLastID, 128000L, GT_Values.V[2], 2L, -2L, true); registerTieredTooltip(ItemList.Battery_SU_MV_Mercury.get(1), MV); ItemList.Battery_RE_MV_Cadmium.set( - addItem( - tLastID = 527, - "Medium Cadmium Battery", - "Reusable", - "batteryMV", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); + addItem( + tLastID = 527, + "Medium Cadmium Battery", + "Reusable", + "batteryMV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); setElectricStats(32000 + tLastID, 300000L, GT_Values.V[2], 2L, -3L, true); registerTieredTooltip(ItemList.Battery_RE_MV_Cadmium.get(1), MV); ItemList.Battery_RE_MV_Lithium.set( - addItem( - tLastID = 528, - "Medium Lithium Battery", - "Reusable", - "batteryMV", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); + addItem( + tLastID = 528, + "Medium Lithium Battery", + "Reusable", + "batteryMV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); setElectricStats(32000 + tLastID, 400000L, GT_Values.V[2], 2L, -3L, true); registerTieredTooltip(ItemList.Battery_RE_MV_Lithium.get(1), MV); ItemList.Battery_RE_MV_Sodium.set( - addItem( - tLastID = 529, - "Medium Sodium Battery", - "Reusable", - "batteryMV", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); + addItem( + tLastID = 529, + "Medium Sodium Battery", + "Reusable", + "batteryMV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); setElectricStats(32000 + tLastID, 200000L, GT_Values.V[2], 2L, -3L, true); registerTieredTooltip(ItemList.Battery_RE_MV_Sodium.get(1), MV); // HV Batteries ItemList.Battery_SU_HV_SulfuricAcid.set( - addItem( - tLastID = 530, - "Large Acid Battery", - "Single Use", - "batteryHV", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 8L))); + addItem( + tLastID = 530, + "Large Acid Battery", + "Single Use", + "batteryHV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 8L))); setElectricStats(32000 + tLastID, 288000L, GT_Values.V[3], 3L, -2L, true); registerTieredTooltip(ItemList.Battery_SU_HV_SulfuricAcid.get(1), HV); ItemList.Battery_SU_HV_Mercury.set( - addItem( - tLastID = 531, - "Large Mercury Battery", - "Single Use", - "batteryHV", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 8L))); + addItem( + tLastID = 531, + "Large Mercury Battery", + "Single Use", + "batteryHV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 8L))); setElectricStats(32000 + tLastID, 512000L, GT_Values.V[3], 3L, -2L, true); registerTieredTooltip(ItemList.Battery_SU_HV_Mercury.get(1), HV); ItemList.Battery_RE_HV_Cadmium.set( - addItem( - tLastID = 537, - "Large Cadmium Battery", - "Reusable", - "batteryHV", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L))); + addItem( + tLastID = 537, + "Large Cadmium Battery", + "Reusable", + "batteryHV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L))); setElectricStats(32000 + tLastID, 1200000L, GT_Values.V[3], 3L, -3L, true); registerTieredTooltip(ItemList.Battery_RE_HV_Cadmium.get(1), HV); ItemList.Battery_RE_HV_Lithium.set( - addItem( - tLastID = 538, - "Large Lithium Battery", - "Reusable", - "batteryHV", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L))); + addItem( + tLastID = 538, + "Large Lithium Battery", + "Reusable", + "batteryHV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L))); setElectricStats(32000 + tLastID, 1600000L, GT_Values.V[3], 3L, -3L, true); registerTieredTooltip(ItemList.Battery_RE_HV_Lithium.get(1), HV); ItemList.Battery_RE_HV_Sodium.set( - addItem( - tLastID = 539, - "Large Sodium Battery", - "Reusable", - "batteryHV", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L))); + addItem( + tLastID = 539, + "Large Sodium Battery", + "Reusable", + "batteryHV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L))); 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)); @@ -1733,1799 +1715,1768 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { GT_ModHandler.addExtractionRecipe(ItemList.Battery_RE_HV_Sodium.get(1L), ItemList.Battery_Hull_HV.get(1L)); GT_Values.RA.addCannerRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cadmium, 2L), - ItemList.Battery_Hull_LV.get(1L), - ItemList.Battery_RE_LV_Cadmium.get(1L), - null, - 100, - 2); + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cadmium, 2L), + ItemList.Battery_Hull_LV.get(1L), + ItemList.Battery_RE_LV_Cadmium.get(1L), + null, + 100, + 2); GT_Values.RA.addCannerRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 2L), - ItemList.Battery_Hull_LV.get(1L), - ItemList.Battery_RE_LV_Lithium.get(1L), - null, - 100, - 2); + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 2L), + ItemList.Battery_Hull_LV.get(1L), + ItemList.Battery_RE_LV_Lithium.get(1L), + null, + 100, + 2); GT_Values.RA.addCannerRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 2L), - ItemList.Battery_Hull_LV.get(1L), - ItemList.Battery_RE_LV_Sodium.get(1L), - null, - 100, - 2); + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 2L), + ItemList.Battery_Hull_LV.get(1L), + ItemList.Battery_RE_LV_Sodium.get(1L), + null, + 100, + 2); GT_Values.RA.addCannerRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cadmium, 8L), - ItemList.Battery_Hull_MV.get(1L), - ItemList.Battery_RE_MV_Cadmium.get(1L), - null, - 400, - 2); + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cadmium, 8L), + ItemList.Battery_Hull_MV.get(1L), + ItemList.Battery_RE_MV_Cadmium.get(1L), + null, + 400, + 2); GT_Values.RA.addCannerRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 8L), - ItemList.Battery_Hull_MV.get(1L), - ItemList.Battery_RE_MV_Lithium.get(1L), - null, - 400, - 2); + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 8L), + ItemList.Battery_Hull_MV.get(1L), + ItemList.Battery_RE_MV_Lithium.get(1L), + null, + 400, + 2); GT_Values.RA.addCannerRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 8L), - ItemList.Battery_Hull_MV.get(1L), - ItemList.Battery_RE_MV_Sodium.get(1L), - null, - 400, - 2); + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 8L), + ItemList.Battery_Hull_MV.get(1L), + ItemList.Battery_RE_MV_Sodium.get(1L), + null, + 400, + 2); GT_Values.RA.addCannerRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cadmium, 32L), - ItemList.Battery_Hull_HV.get(1L), - ItemList.Battery_RE_HV_Cadmium.get(1L), - null, - 1600, - 2); + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cadmium, 32L), + ItemList.Battery_Hull_HV.get(1L), + ItemList.Battery_RE_HV_Cadmium.get(1L), + null, + 1600, + 2); GT_Values.RA.addCannerRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 32L), - ItemList.Battery_Hull_HV.get(1L), - ItemList.Battery_RE_HV_Lithium.get(1L), - null, - 1600, - 2); + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 32L), + ItemList.Battery_Hull_HV.get(1L), + ItemList.Battery_RE_HV_Lithium.get(1L), + null, + 1600, + 2); GT_Values.RA.addCannerRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 32L), - ItemList.Battery_Hull_HV.get(1L), - ItemList.Battery_RE_HV_Sodium.get(1L), - null, - 1600, - 2); + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 32L), + ItemList.Battery_Hull_HV.get(1L), + ItemList.Battery_RE_HV_Sodium.get(1L), + null, + 1600, + 2); // IV Battery ItemList.Energy_LapotronicOrb.set( - addItem( - tLastID = 597, - "Lapotronic Energy Orb", - "Reusable battery", - "batteryIV", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 16L), - OrePrefixes.battery.get(Materials.Ultimate))); + addItem( + tLastID = 597, + "Lapotronic Energy Orb", + "Reusable battery", + "batteryIV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 16L), + OrePrefixes.battery.get(Materials.Ultimate))); setElectricStats(32000 + tLastID, 100000000L, GT_Values.V[5], 5L, -3L, true); registerTieredTooltip(ItemList.Energy_LapotronicOrb.get(1), IV); // ZPM Module ItemList.ZPM.set( - addItem( - tLastID = 598, - "Zero Point Module", - "Single use battery", - "batteryZPM", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L))); + addItem( + tLastID = 598, + "Zero Point Module", + "Single use battery", + "batteryZPM", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L))); setElectricStats(32000 + tLastID, 2000000000000L, GT_Values.V[7], 7L, -2L, true); registerTieredTooltip(ItemList.ZPM.get(1), ZPM); // LuV Lapotron orb cluster battery ItemList.Energy_LapotronicOrb2.set( - addItem( - tLastID = 599, - "Lapotronic Energy Orb Cluster", - "Reusable battery", - "batteryLuV", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 16L), - OrePrefixes.battery.get(Materials.Ultimate))); + addItem( + tLastID = 599, + "Lapotronic Energy Orb Cluster", + "Reusable battery", + "batteryLuV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 16L), + OrePrefixes.battery.get(Materials.Ultimate))); setElectricStats(32000 + tLastID, 1000000000L, GT_Values.V[6], 6L, -3L, true); registerTieredTooltip(ItemList.Energy_LapotronicOrb2.get(1), LuV); // UV Battery ItemList.ZPM2.set( - addItem( - tLastID = 605, - "Ultimate Battery", - "Fill this to win minecraft", - "batteryUV", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L))); + addItem( + tLastID = 605, + "Ultimate Battery", + "Fill this to win minecraft", + "batteryUV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L))); setElectricStats(32000 + tLastID, Long.MAX_VALUE, GT_Values.V[8], 8L, -3L, true); registerTieredTooltip(ItemList.ZPM2.get(1), UV); // UMV Battery ItemList.ZPM3.set( - addItem( - tLastID = 609, - "Really Ultimate Battery", - "Fill this to be way older", - "batteryUMV", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L))); + addItem( + tLastID = 609, + "Really Ultimate Battery", + "Fill this to be way older", + "batteryUMV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L))); setElectricStats(32000 + tLastID, Long.MAX_VALUE, GT_Values.V[12], 12L, -3L, true); registerTieredTooltip(ItemList.ZPM3.get(1), UMV); // UXV Battery ItemList.ZPM4.set( - addItem( - tLastID = 594, - "Extremely Ultimate Battery", - "Fill this to be older", - "batteryUXV", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L))); + addItem( + tLastID = 594, + "Extremely Ultimate Battery", + "Fill this to be older", + "batteryUXV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L))); setElectricStats(32000 + tLastID, Long.MAX_VALUE, GT_Values.V[13], 13L, -3L, true); registerTieredTooltip(ItemList.ZPM4.get(1), UXV); // MAX Battery ItemList.ZPM5.set( - addItem( - tLastID = 145, - "Insanely Ultimate Battery", - "Fill this for fun", - "batteryMAX", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L))); + addItem( + tLastID = 145, + "Insanely Ultimate Battery", + "Fill this for fun", + "batteryMAX", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L))); setElectricStats(32000 + tLastID, Long.MAX_VALUE, GT_Values.V[14], 14L, -3L, true); registerTieredTooltip(ItemList.ZPM5.get(1), MAX); // ERROR Battery ItemList.ZPM6.set( - addItem( - tLastID = 146, - "Mega Ultimate Battery", - "Fill the capacitor to reach enlightenment", - "batteryERV", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L))); + addItem( + tLastID = 146, + "Mega Ultimate Battery", + "Fill the capacitor to reach enlightenment", + "batteryERV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L))); setElectricStats(32000 + tLastID, Long.MAX_VALUE, GT_Values.V[15], 15L, -3L, true); registerTieredTooltip(ItemList.ZPM6.get(1), ERV); // ZPM Cluster ItemList.Energy_Module.set( - addItem( - tLastID = 736, - "Energy Module", - "Reusable battery", - "batteryZPM", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 16L), - OrePrefixes.battery.get(Materials.Ultimate))); + addItem( + tLastID = 736, + "Energy Module", + "Reusable battery", + "batteryZPM", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 16L), + OrePrefixes.battery.get(Materials.Ultimate))); setElectricStats(32000 + tLastID, 10000000000L, GT_Values.V[7], 7L, -3L, true); registerTieredTooltip(ItemList.Energy_Module.get(1), ZPM); // UV Cluster ItemList.Energy_Cluster.set( - addItem( - tLastID = 737, - "Energy Cluster", - "Reusable battery", - "batteryUV", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L))); + addItem( + tLastID = 737, + "Energy Cluster", + "Reusable battery", + "batteryUV", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L))); setElectricStats(32000 + tLastID, 100000000000L, GT_Values.V[8], 8L, -3L, true); registerTieredTooltip(ItemList.Energy_Cluster.get(1), UV); // UIV, UMV, UXV and MAX component textures backported from gregicality. ItemList.Electric_Motor_LV.set( - addItem( - 600, - "Electric Motor (LV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); + addItem( + 600, + "Electric Motor (LV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); ItemList.Electric_Motor_MV.set( - addItem( - 601, - "Electric Motor (MV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L))); + addItem( + 601, + "Electric Motor (MV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L))); ItemList.Electric_Motor_HV.set( - addItem( - 602, - "Electric Motor (HV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 4L))); + addItem( + 602, + "Electric Motor (HV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 4L))); ItemList.Electric_Motor_EV.set( - addItem( - 603, - "Electric Motor (EV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 8L))); + addItem( + 603, + "Electric Motor (EV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 8L))); ItemList.Electric_Motor_IV.set( - addItem( - 604, - "Electric Motor (IV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L))); + addItem( + 604, + "Electric Motor (IV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L))); ItemList.Electric_Motor_LuV.set( - addItem( - 606, - "Electric Motor (LuV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 32L))); + addItem( + 606, + "Electric Motor (LuV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 32L))); ItemList.Electric_Motor_ZPM.set( - addItem( - 607, - "Electric Motor (ZPM)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 64L))); + addItem( + 607, + "Electric Motor (ZPM)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 64L))); ItemList.Electric_Motor_UV.set( - addItem( - 608, - "Electric Motor (UV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 128L))); + addItem( + 608, + "Electric Motor (UV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 128L))); ItemList.Electric_Motor_UHV.set( - addItem( - 596, - "Electric Motor (UHV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 256L))); + addItem( + 596, + "Electric Motor (UHV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 256L))); ItemList.Electric_Motor_UEV.set( - addItem( - 595, - "Electric Motor (UEV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); + addItem( + 595, + "Electric Motor (UEV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); ItemList.Electric_Motor_UIV.set( - addItem( - 17, - "Electric Motor (UIV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); + addItem( + 17, + "Electric Motor (UIV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); ItemList.Electric_Motor_UMV.set( - addItem( - 18, - "Electric Motor (UMV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); + addItem( + 18, + "Electric Motor (UMV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); ItemList.Electric_Motor_UXV.set( - addItem( - 19, - "Electric Motor (UXV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); + addItem( + 19, + "Electric Motor (UXV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); ItemList.Electric_Motor_MAX.set( - addItem( - 20, - "Electric Motor (MAX)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); + addItem( + 20, + "Electric Motor (MAX)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); GT_ModHandler.addCraftingRecipe( - ItemList.Electric_Motor_LV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.IronMagnetic), 'R', - OrePrefixes.stick.get(Materials.AnyIron), 'W', OrePrefixes.wireGt01.get(Materials.AnyCopper), - 'C', OrePrefixes.cableGt01.get(Materials.Tin) }); + ItemList.Electric_Motor_LV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.IronMagnetic), 'R', + OrePrefixes.stick.get(Materials.AnyIron), 'W', OrePrefixes.wireGt01.get(Materials.AnyCopper), 'C', + OrePrefixes.cableGt01.get(Materials.Tin) }); GT_ModHandler.addCraftingRecipe( - ItemList.Electric_Motor_LV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.SteelMagnetic), 'R', - OrePrefixes.stick.get(Materials.Steel), 'W', OrePrefixes.wireGt01.get(Materials.AnyCopper), 'C', - OrePrefixes.cableGt01.get(Materials.Tin) }); + ItemList.Electric_Motor_LV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.SteelMagnetic), 'R', + OrePrefixes.stick.get(Materials.Steel), 'W', OrePrefixes.wireGt01.get(Materials.AnyCopper), 'C', + OrePrefixes.cableGt01.get(Materials.Tin) }); GT_ModHandler.addCraftingRecipe( - ItemList.Electric_Motor_MV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.SteelMagnetic), 'R', - OrePrefixes.stick.get(Materials.Aluminium), 'W', - OrePrefixes.wireGt02.get(Materials.Cupronickel), 'C', - OrePrefixes.cableGt01.get(Materials.AnyCopper) }); + ItemList.Electric_Motor_MV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.SteelMagnetic), 'R', + OrePrefixes.stick.get(Materials.Aluminium), 'W', OrePrefixes.wireGt02.get(Materials.Cupronickel), 'C', + OrePrefixes.cableGt01.get(Materials.AnyCopper) }); GT_ModHandler.addCraftingRecipe( - ItemList.Electric_Motor_HV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.SteelMagnetic), 'R', - OrePrefixes.stick.get(Materials.StainlessSteel), 'W', - OrePrefixes.wireGt04.get(Materials.Electrum), 'C', - OrePrefixes.cableGt02.get(Materials.Silver) }); + ItemList.Electric_Motor_HV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.SteelMagnetic), 'R', + OrePrefixes.stick.get(Materials.StainlessSteel), 'W', OrePrefixes.wireGt04.get(Materials.Electrum), 'C', + OrePrefixes.cableGt02.get(Materials.Silver) }); GT_ModHandler.addCraftingRecipe( - ItemList.Electric_Motor_EV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.NeodymiumMagnetic), 'R', - OrePrefixes.stick.get(Materials.Titanium), 'W', OrePrefixes.wireGt04.get(Materials.BlackSteel), - 'C', OrePrefixes.cableGt02.get(Materials.Aluminium) }); + ItemList.Electric_Motor_EV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.NeodymiumMagnetic), 'R', + OrePrefixes.stick.get(Materials.Titanium), 'W', OrePrefixes.wireGt04.get(Materials.BlackSteel), 'C', + OrePrefixes.cableGt02.get(Materials.Aluminium) }); GT_ModHandler.addCraftingRecipe( - ItemList.Electric_Motor_IV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.NeodymiumMagnetic), 'R', - OrePrefixes.stick.get(Materials.TungstenSteel), 'W', - OrePrefixes.wireGt04.get(Materials.Graphene), 'C', - OrePrefixes.cableGt02.get(Materials.Tungsten) }); + ItemList.Electric_Motor_IV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "CWR", "WIW", "RWC", 'I', OrePrefixes.stick.get(Materials.NeodymiumMagnetic), 'R', + OrePrefixes.stick.get(Materials.TungstenSteel), 'W', OrePrefixes.wireGt04.get(Materials.Graphene), 'C', + OrePrefixes.cableGt02.get(Materials.Tungsten) }); ItemList.Tesseract.set( - addItem( - 415, - "Raw Tesseract", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); + addItem( + 415, + "Raw Tesseract", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); ItemList.GigaChad.set( - addItem( - 416, - "Giga Chad Token", - "You are worthy", - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1000L))); + addItem( + 416, + "Giga Chad Token", + "You are worthy", + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1000L))); ItemList.EnergisedTesseract.set( - addItem( - 417, - "Energised Tesseract", - "Higher dimensional engineering", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 10L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); + addItem( + 417, + "Energised Tesseract", + "Higher dimensional engineering", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 10L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); ItemList.Electric_Piston_LV.set( - addItem( - 640, - "Electric Piston (LV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); + addItem( + 640, + "Electric Piston (LV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); ItemList.Electric_Piston_MV.set( - addItem( - 641, - "Electric Piston (MV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L))); + addItem( + 641, + "Electric Piston (MV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L))); ItemList.Electric_Piston_HV.set( - addItem( - 642, - "Electric Piston (HV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 4L))); + addItem( + 642, + "Electric Piston (HV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 4L))); ItemList.Electric_Piston_EV.set( - addItem( - 643, - "Electric Piston (EV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 8L))); + addItem( + 643, + "Electric Piston (EV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 8L))); ItemList.Electric_Piston_IV.set( - addItem( - 644, - "Electric Piston (IV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L))); + addItem( + 644, + "Electric Piston (IV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L))); ItemList.Electric_Piston_LuV.set( - addItem( - 645, - "Electric Piston (LuV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 32L))); + addItem( + 645, + "Electric Piston (LuV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 32L))); ItemList.Electric_Piston_ZPM.set( - addItem( - 646, - "Electric Piston (ZPM)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 64L))); + addItem( + 646, + "Electric Piston (ZPM)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 64L))); ItemList.Electric_Piston_UV.set( - addItem( - 647, - "Electric Piston (UV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 128L))); + addItem( + 647, + "Electric Piston (UV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 128L))); ItemList.Electric_Piston_UHV.set( - addItem( - 648, - "Electric Piston (UHV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 256L))); + addItem( + 648, + "Electric Piston (UHV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 256L))); ItemList.Electric_Piston_UEV.set( - addItem( - 649, - "Electric Piston (UEV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); + addItem( + 649, + "Electric Piston (UEV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); ItemList.Electric_Piston_UIV.set( - addItem( - 21, - "Electric Piston (UIV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); + addItem( + 21, + "Electric Piston (UIV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); ItemList.Electric_Piston_UMV.set( - addItem( - 22, - "Electric Piston (UMV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); + addItem( + 22, + "Electric Piston (UMV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); ItemList.Electric_Piston_UXV.set( - addItem( - 23, - "Electric Piston (UXV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); + addItem( + 23, + "Electric Piston (UXV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); ItemList.Electric_Piston_MAX.set( - addItem( - 24, - "Electric Piston (MAX)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); + addItem( + 24, + "Electric Piston (MAX)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L))); GT_ModHandler.addCraftingRecipe( - ItemList.Electric_Piston_LV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.Steel), 'S', - OrePrefixes.stick.get(Materials.Steel), 'G', OrePrefixes.gearGtSmall.get(Materials.Steel), 'M', - ItemList.Electric_Motor_LV, 'C', OrePrefixes.cableGt01.get(Materials.Tin) }); + ItemList.Electric_Piston_LV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.Steel), 'S', + OrePrefixes.stick.get(Materials.Steel), 'G', OrePrefixes.gearGtSmall.get(Materials.Steel), 'M', + ItemList.Electric_Motor_LV, 'C', OrePrefixes.cableGt01.get(Materials.Tin) }); GT_ModHandler.addCraftingRecipe( - ItemList.Electric_Piston_MV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.Aluminium), 'S', - OrePrefixes.stick.get(Materials.Aluminium), 'G', - OrePrefixes.gearGtSmall.get(Materials.Aluminium), 'M', ItemList.Electric_Motor_MV, 'C', - OrePrefixes.cableGt01.get(Materials.AnyCopper) }); + ItemList.Electric_Piston_MV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.Aluminium), 'S', + OrePrefixes.stick.get(Materials.Aluminium), 'G', OrePrefixes.gearGtSmall.get(Materials.Aluminium), 'M', + ItemList.Electric_Motor_MV, 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper) }); GT_ModHandler.addCraftingRecipe( - ItemList.Electric_Piston_HV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'S', - OrePrefixes.stick.get(Materials.StainlessSteel), 'G', - OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'M', ItemList.Electric_Motor_HV, 'C', - OrePrefixes.cableGt01.get(Materials.Gold) }); + ItemList.Electric_Piston_HV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'S', + OrePrefixes.stick.get(Materials.StainlessSteel), 'G', + OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), 'M', ItemList.Electric_Motor_HV, 'C', + OrePrefixes.cableGt01.get(Materials.Gold) }); GT_ModHandler.addCraftingRecipe( - ItemList.Electric_Piston_EV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.Titanium), 'S', - OrePrefixes.stick.get(Materials.Titanium), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium), - 'M', ItemList.Electric_Motor_EV, 'C', OrePrefixes.cableGt01.get(Materials.Aluminium) }); + ItemList.Electric_Piston_EV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.Titanium), 'S', + OrePrefixes.stick.get(Materials.Titanium), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium), 'M', + ItemList.Electric_Motor_EV, 'C', OrePrefixes.cableGt01.get(Materials.Aluminium) }); GT_ModHandler.addCraftingRecipe( - ItemList.Electric_Piston_IV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'S', - OrePrefixes.stick.get(Materials.TungstenSteel), 'G', - OrePrefixes.gearGtSmall.get(Materials.TungstenSteel), 'M', ItemList.Electric_Motor_IV, 'C', - OrePrefixes.cableGt01.get(Materials.Tungsten) }); + ItemList.Electric_Piston_IV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'S', + OrePrefixes.stick.get(Materials.TungstenSteel), 'G', + OrePrefixes.gearGtSmall.get(Materials.TungstenSteel), 'M', ItemList.Electric_Motor_IV, 'C', + OrePrefixes.cableGt01.get(Materials.Tungsten) }); ItemList.Electric_Pump_LV.set( - addItem( - 610, - "Electric Pump (LV)", - GT_Utility.formatNumbers(32) + PartCoverText - + GT_Utility.formatNumbers(32 * 20) - + PartCoverText2, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))); + addItem( + 610, + "Electric Pump (LV)", + GT_Utility.formatNumbers(32) + PartCoverText + GT_Utility.formatNumbers(32 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))); ItemList.Electric_Pump_MV.set( - addItem( - 611, - "Electric Pump (MV)", - GT_Utility.formatNumbers(128) + PartCoverText - + GT_Utility.formatNumbers(128 * 20) - + PartCoverText2, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); + addItem( + 611, + "Electric Pump (MV)", + GT_Utility.formatNumbers(128) + PartCoverText + GT_Utility.formatNumbers(128 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); ItemList.Electric_Pump_HV.set( - addItem( - 612, - "Electric Pump (HV)", - GT_Utility.formatNumbers(512) + PartCoverText - + GT_Utility.formatNumbers(512 * 20) - + PartCoverText2, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L))); + addItem( + 612, + "Electric Pump (HV)", + GT_Utility.formatNumbers(512) + PartCoverText + GT_Utility.formatNumbers(512 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L))); ItemList.Electric_Pump_EV.set( - addItem( - 613, - "Electric Pump (EV)", - GT_Utility.formatNumbers(2048) + PartCoverText - + GT_Utility.formatNumbers(2048 * 20) - + PartCoverText2, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L))); + addItem( + 613, + "Electric Pump (EV)", + GT_Utility.formatNumbers(2048) + PartCoverText + GT_Utility.formatNumbers(2048 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L))); ItemList.Electric_Pump_IV.set( - addItem( - 614, - "Electric Pump (IV)", - GT_Utility.formatNumbers(8192) + PartCoverText - + GT_Utility.formatNumbers(8192 * 20) - + PartCoverText2, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 16L))); + addItem( + 614, + "Electric Pump (IV)", + GT_Utility.formatNumbers(8192) + PartCoverText + GT_Utility.formatNumbers(8192 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 16L))); ItemList.Electric_Pump_LuV.set( - addItem( - 615, - "Electric Pump (LuV)", - GT_Utility.formatNumbers(32768) + PartCoverText - + GT_Utility.formatNumbers(32768 * 20) - + PartCoverText2, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 32L))); + addItem( + 615, + "Electric Pump (LuV)", + GT_Utility.formatNumbers(32768) + PartCoverText + GT_Utility.formatNumbers(32768 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 32L))); ItemList.Electric_Pump_ZPM.set( - addItem( - 616, - "Electric Pump (ZPM)", - GT_Utility.formatNumbers(131072) + PartCoverText - + GT_Utility.formatNumbers(131072 * 20) - + PartCoverText2, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 64L))); + addItem( + 616, + "Electric Pump (ZPM)", + GT_Utility.formatNumbers(131072) + PartCoverText + + GT_Utility.formatNumbers(131072 * 20) + + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 64L))); ItemList.Electric_Pump_UV.set( - addItem( - 617, - "Electric Pump (UV)", - GT_Utility.formatNumbers(524288) + PartCoverText - + GT_Utility.formatNumbers(524288 * 20) - + PartCoverText2, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 128L))); + addItem( + 617, + "Electric Pump (UV)", + GT_Utility.formatNumbers(524288) + PartCoverText + + GT_Utility.formatNumbers(524288 * 20) + + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 128L))); ItemList.Electric_Pump_UHV.set( - addItem( - 618, - "Electric Pump (UHV)", - GT_Utility.formatNumbers(1048576) + PartCoverText - + GT_Utility.formatNumbers(1048576 * 20) - + PartCoverText2, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 256L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 256L))); + addItem( + 618, + "Electric Pump (UHV)", + GT_Utility.formatNumbers(1048576) + PartCoverText + + GT_Utility.formatNumbers(1048576 * 20) + + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 256L))); ItemList.Electric_Pump_UEV.set( - addItem( - 619, - "Electric Pump (UEV)", - GT_Utility.formatNumbers(2097152) + PartCoverText - + GT_Utility.formatNumbers(2097152 * 20) - + PartCoverText2, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L))); + addItem( + 619, + "Electric Pump (UEV)", + GT_Utility.formatNumbers(2097152) + PartCoverText + + GT_Utility.formatNumbers(2097152 * 20) + + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L))); ItemList.Electric_Pump_UIV.set( - addItem( - 25, - "Electric Pump (UIV)", - PartNotCoverText, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L))); + addItem( + 25, + "Electric Pump (UIV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L))); ItemList.Electric_Pump_UMV.set( - addItem( - 26, - "Electric Pump (UMV)", - PartNotCoverText, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L))); + addItem( + 26, + "Electric Pump (UMV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L))); ItemList.Electric_Pump_UXV.set( - addItem( - 27, - "Electric Pump (UXV)", - PartNotCoverText, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L))); + addItem( + 27, + "Electric Pump (UXV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L))); ItemList.Electric_Pump_MAX.set( - addItem( - 28, - "Electric Pump (MAX)", - PartNotCoverText, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L))); + addItem( + 28, + "Electric Pump (MAX)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L))); GregTech_API.registerCover( - ItemList.Electric_Pump_LV.get(1L), - TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_PUMP)), - new GT_Cover_Pump(32, TextureFactory.of(OVERLAY_PUMP))); + ItemList.Electric_Pump_LV.get(1L), + TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_Pump(32, TextureFactory.of(OVERLAY_PUMP))); GregTech_API.registerCover( - ItemList.Electric_Pump_MV.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_PUMP)), - new GT_Cover_Pump(128, TextureFactory.of(OVERLAY_PUMP))); + ItemList.Electric_Pump_MV.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_Pump(128, TextureFactory.of(OVERLAY_PUMP))); GregTech_API.registerCover( - ItemList.Electric_Pump_HV.get(1L), - TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_PUMP)), - new GT_Cover_Pump(512, TextureFactory.of(OVERLAY_PUMP))); + ItemList.Electric_Pump_HV.get(1L), + TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_Pump(512, TextureFactory.of(OVERLAY_PUMP))); GregTech_API.registerCover( - ItemList.Electric_Pump_EV.get(1L), - TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_PUMP)), - new GT_Cover_Pump(2048, TextureFactory.of(OVERLAY_PUMP))); + ItemList.Electric_Pump_EV.get(1L), + TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_Pump(2048, TextureFactory.of(OVERLAY_PUMP))); GregTech_API.registerCover( - ItemList.Electric_Pump_IV.get(1L), - TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_PUMP)), - new GT_Cover_Pump(8192, TextureFactory.of(OVERLAY_PUMP))); + ItemList.Electric_Pump_IV.get(1L), + TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_Pump(8192, TextureFactory.of(OVERLAY_PUMP))); GregTech_API.registerCover( - ItemList.Electric_Pump_LuV.get(1L), - TextureFactory.of(MACHINE_CASINGS[6][0], TextureFactory.of(OVERLAY_PUMP)), - new GT_Cover_Pump(32768, TextureFactory.of(OVERLAY_PUMP))); + ItemList.Electric_Pump_LuV.get(1L), + TextureFactory.of(MACHINE_CASINGS[6][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_Pump(32768, TextureFactory.of(OVERLAY_PUMP))); GregTech_API.registerCover( - ItemList.Electric_Pump_ZPM.get(1L), - TextureFactory.of(MACHINE_CASINGS[7][0], TextureFactory.of(OVERLAY_PUMP)), - new GT_Cover_Pump(131072, TextureFactory.of(OVERLAY_PUMP))); + ItemList.Electric_Pump_ZPM.get(1L), + TextureFactory.of(MACHINE_CASINGS[7][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_Pump(131072, TextureFactory.of(OVERLAY_PUMP))); GregTech_API.registerCover( - ItemList.Electric_Pump_UV.get(1L), - TextureFactory.of(MACHINE_CASINGS[8][0], TextureFactory.of(OVERLAY_PUMP)), - new GT_Cover_Pump(524288, TextureFactory.of(OVERLAY_PUMP))); + ItemList.Electric_Pump_UV.get(1L), + TextureFactory.of(MACHINE_CASINGS[8][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_Pump(524288, TextureFactory.of(OVERLAY_PUMP))); GregTech_API.registerCover( - ItemList.Electric_Pump_UHV.get(1L), - TextureFactory.of(MACHINE_CASINGS[9][0], TextureFactory.of(OVERLAY_PUMP)), - new GT_Cover_Pump(1048576, TextureFactory.of(OVERLAY_PUMP))); + ItemList.Electric_Pump_UHV.get(1L), + TextureFactory.of(MACHINE_CASINGS[9][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_Pump(1048576, TextureFactory.of(OVERLAY_PUMP))); GregTech_API.registerCover( - ItemList.Electric_Pump_UEV.get(1L), - TextureFactory.of(MACHINE_CASINGS[10][0], TextureFactory.of(OVERLAY_PUMP)), - new GT_Cover_Pump(2097152, TextureFactory.of(OVERLAY_PUMP))); + ItemList.Electric_Pump_UEV.get(1L), + TextureFactory.of(MACHINE_CASINGS[10][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_Pump(2097152, TextureFactory.of(OVERLAY_PUMP))); GT_ModHandler.addCraftingRecipe( - ItemList.Electric_Pump_LV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_LV, 'O', - OrePrefixes.ring.get(Materials.AnyRubber), 'X', OrePrefixes.rotor.get(Materials.Tin), 'S', - OrePrefixes.screw.get(Materials.Tin), 'W', OrePrefixes.cableGt01.get(Materials.Tin), 'P', - OrePrefixes.pipeMedium.get(Materials.Bronze) }); + ItemList.Electric_Pump_LV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_LV, 'O', + OrePrefixes.ring.get(Materials.AnyRubber), 'X', OrePrefixes.rotor.get(Materials.Tin), 'S', + OrePrefixes.screw.get(Materials.Tin), 'W', OrePrefixes.cableGt01.get(Materials.Tin), 'P', + OrePrefixes.pipeMedium.get(Materials.Bronze) }); GT_ModHandler.addCraftingRecipe( - ItemList.Electric_Pump_MV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_MV, 'O', - OrePrefixes.ring.get(Materials.AnyRubber), 'X', OrePrefixes.rotor.get(Materials.Bronze), 'S', - OrePrefixes.screw.get(Materials.Bronze), 'W', OrePrefixes.cableGt01.get(Materials.AnyCopper), - 'P', OrePrefixes.pipeMedium.get(Materials.Steel) }); + ItemList.Electric_Pump_MV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_MV, 'O', + OrePrefixes.ring.get(Materials.AnyRubber), 'X', OrePrefixes.rotor.get(Materials.Bronze), 'S', + OrePrefixes.screw.get(Materials.Bronze), 'W', OrePrefixes.cableGt01.get(Materials.AnyCopper), 'P', + OrePrefixes.pipeMedium.get(Materials.Steel) }); GT_ModHandler.addCraftingRecipe( - ItemList.Electric_Pump_HV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_HV, 'O', - OrePrefixes.ring.get(Materials.AnyRubber), 'X', OrePrefixes.rotor.get(Materials.Steel), 'S', - OrePrefixes.screw.get(Materials.Steel), 'W', OrePrefixes.cableGt01.get(Materials.Gold), 'P', - OrePrefixes.pipeMedium.get(Materials.StainlessSteel) }); + ItemList.Electric_Pump_HV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_HV, 'O', + OrePrefixes.ring.get(Materials.AnyRubber), 'X', OrePrefixes.rotor.get(Materials.Steel), 'S', + OrePrefixes.screw.get(Materials.Steel), 'W', OrePrefixes.cableGt01.get(Materials.Gold), 'P', + OrePrefixes.pipeMedium.get(Materials.StainlessSteel) }); GT_ModHandler.addCraftingRecipe( - ItemList.Electric_Pump_EV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_EV, 'O', - OrePrefixes.ring.get(Materials.AnyRubber), 'X', OrePrefixes.rotor.get(Materials.StainlessSteel), - 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'W', - OrePrefixes.cableGt01.get(Materials.Aluminium), 'P', - OrePrefixes.pipeMedium.get(Materials.Titanium) }); + ItemList.Electric_Pump_EV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_EV, 'O', + OrePrefixes.ring.get(Materials.AnyRubber), 'X', OrePrefixes.rotor.get(Materials.StainlessSteel), 'S', + OrePrefixes.screw.get(Materials.StainlessSteel), 'W', OrePrefixes.cableGt01.get(Materials.Aluminium), + 'P', OrePrefixes.pipeMedium.get(Materials.Titanium) }); GT_ModHandler.addCraftingRecipe( - ItemList.Electric_Pump_IV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_IV, 'O', - OrePrefixes.ring.get(Materials.AnySyntheticRubber), 'X', - OrePrefixes.rotor.get(Materials.TungstenSteel), 'S', - OrePrefixes.screw.get(Materials.TungstenSteel), 'W', - OrePrefixes.cableGt01.get(Materials.Tungsten), 'P', - OrePrefixes.pipeMedium.get(Materials.TungstenSteel) }); + ItemList.Electric_Pump_IV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_IV, 'O', + OrePrefixes.ring.get(Materials.AnySyntheticRubber), 'X', OrePrefixes.rotor.get(Materials.TungstenSteel), + 'S', OrePrefixes.screw.get(Materials.TungstenSteel), 'W', OrePrefixes.cableGt01.get(Materials.Tungsten), + 'P', OrePrefixes.pipeMedium.get(Materials.TungstenSteel) }); ItemList.Steam_Valve_LV.set( - addItem( - 620, - "Steam Valve (LV)", - GT_Utility.formatNumbers(1024) + PartCoverText - + GT_Utility.formatNumbers(1024 * 20) - + PartCoverText2, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))); + addItem( + 620, + "Steam Valve (LV)", + GT_Utility.formatNumbers(1024) + PartCoverText + GT_Utility.formatNumbers(1024 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))); ItemList.Steam_Valve_MV.set( - addItem( - 621, - "Steam Valve (MV)", - GT_Utility.formatNumbers(2048) + PartCoverText - + GT_Utility.formatNumbers(2048 * 20) - + PartCoverText2, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); + addItem( + 621, + "Steam Valve (MV)", + GT_Utility.formatNumbers(2048) + PartCoverText + GT_Utility.formatNumbers(2048 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); ItemList.Steam_Valve_HV.set( - addItem( - 622, - "Steam Valve (HV)", - GT_Utility.formatNumbers(4096) + PartCoverText - + GT_Utility.formatNumbers(4096 * 20) - + PartCoverText2, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L))); + addItem( + 622, + "Steam Valve (HV)", + GT_Utility.formatNumbers(4096) + PartCoverText + GT_Utility.formatNumbers(4096 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L))); ItemList.Steam_Valve_EV.set( - addItem( - 623, - "Steam Valve (EV)", - GT_Utility.formatNumbers(8192) + PartCoverText - + GT_Utility.formatNumbers(8192 * 20) - + PartCoverText2, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L))); + addItem( + 623, + "Steam Valve (EV)", + GT_Utility.formatNumbers(8192) + PartCoverText + GT_Utility.formatNumbers(8192 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L))); ItemList.Steam_Valve_IV.set( - addItem( - 624, - "Steam Valve (IV)", - GT_Utility.formatNumbers(16384) + PartCoverText - + GT_Utility.formatNumbers(16384 * 20) - + PartCoverText2, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 16L))); + addItem( + 624, + "Steam Valve (IV)", + GT_Utility.formatNumbers(16384) + PartCoverText + GT_Utility.formatNumbers(16384 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 16L))); GregTech_API.registerCover( - ItemList.Steam_Valve_LV.get(1L), - TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_VALVE)), - new GT_Cover_SteamValve(1024, TextureFactory.of(OVERLAY_VALVE))); + ItemList.Steam_Valve_LV.get(1L), + TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_VALVE)), + new GT_Cover_SteamValve(1024, TextureFactory.of(OVERLAY_VALVE))); GregTech_API.registerCover( - ItemList.Steam_Valve_MV.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_VALVE)), - new GT_Cover_SteamValve(2048, TextureFactory.of(OVERLAY_VALVE))); + ItemList.Steam_Valve_MV.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_VALVE)), + new GT_Cover_SteamValve(2048, TextureFactory.of(OVERLAY_VALVE))); GregTech_API.registerCover( - ItemList.Steam_Valve_HV.get(1L), - TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_VALVE)), - new GT_Cover_SteamValve(4096, TextureFactory.of(OVERLAY_VALVE))); + ItemList.Steam_Valve_HV.get(1L), + TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_VALVE)), + new GT_Cover_SteamValve(4096, TextureFactory.of(OVERLAY_VALVE))); GregTech_API.registerCover( - ItemList.Steam_Valve_EV.get(1L), - TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_VALVE)), - new GT_Cover_SteamValve(8192, TextureFactory.of(OVERLAY_VALVE))); + ItemList.Steam_Valve_EV.get(1L), + TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_VALVE)), + new GT_Cover_SteamValve(8192, TextureFactory.of(OVERLAY_VALVE))); GregTech_API.registerCover( - ItemList.Steam_Valve_IV.get(1L), - 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_MV.set( - addItem(tLastID = 661, "Fluid Regulator (MV)", FRText1 + GT_Utility.formatNumbers(2560) + FRText2)); - ItemList.FluidRegulator_HV.set( - addItem(tLastID = 662, "Fluid Regulator (HV)", FRText1 + GT_Utility.formatNumbers(10240) + FRText2)); - ItemList.FluidRegulator_EV.set( - addItem(tLastID = 663, "Fluid Regulator (EV)", FRText1 + GT_Utility.formatNumbers(40960) + FRText2)); - ItemList.FluidRegulator_IV.set( - addItem(tLastID = 664, "Fluid Regulator (IV)", FRText1 + GT_Utility.formatNumbers(163840) + FRText2)); - ItemList.FluidRegulator_LuV.set( - addItem(tLastID = 665, "Fluid Regulator (LuV)", FRText1 + GT_Utility.formatNumbers(655360) + FRText2)); + ItemList.Steam_Valve_IV.get(1L), + 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_MV + .set(addItem(tLastID = 661, "Fluid Regulator (MV)", FRText1 + GT_Utility.formatNumbers(2560) + FRText2)); + ItemList.FluidRegulator_HV + .set(addItem(tLastID = 662, "Fluid Regulator (HV)", FRText1 + GT_Utility.formatNumbers(10240) + FRText2)); + ItemList.FluidRegulator_EV + .set(addItem(tLastID = 663, "Fluid Regulator (EV)", FRText1 + GT_Utility.formatNumbers(40960) + FRText2)); + ItemList.FluidRegulator_IV + .set(addItem(tLastID = 664, "Fluid Regulator (IV)", FRText1 + GT_Utility.formatNumbers(163840) + FRText2)); + ItemList.FluidRegulator_LuV + .set(addItem(tLastID = 665, "Fluid Regulator (LuV)", FRText1 + GT_Utility.formatNumbers(655360) + FRText2)); ItemList.FluidRegulator_ZPM.set( - addItem(tLastID = 666, "Fluid Regulator (ZPM)", FRText1 + GT_Utility.formatNumbers(2621440) + FRText2)); + addItem(tLastID = 666, "Fluid Regulator (ZPM)", FRText1 + GT_Utility.formatNumbers(2621440) + FRText2)); ItemList.FluidRegulator_UV.set( - addItem(tLastID = 667, "Fluid Regulator (UV)", FRText1 + GT_Utility.formatNumbers(10485760) + FRText2)); + addItem(tLastID = 667, "Fluid Regulator (UV)", FRText1 + GT_Utility.formatNumbers(10485760) + FRText2)); GregTech_API.registerCover( - ItemList.FluidRegulator_LV.get(1L), - TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_PUMP)), - new GT_Cover_FluidRegulator(32, TextureFactory.of(OVERLAY_PUMP))); + ItemList.FluidRegulator_LV.get(1L), + TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_FluidRegulator(32, TextureFactory.of(OVERLAY_PUMP))); GregTech_API.registerCover( - ItemList.FluidRegulator_MV.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_PUMP)), - new GT_Cover_FluidRegulator(128, TextureFactory.of(OVERLAY_PUMP))); + ItemList.FluidRegulator_MV.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_FluidRegulator(128, TextureFactory.of(OVERLAY_PUMP))); GregTech_API.registerCover( - ItemList.FluidRegulator_HV.get(1L), - TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_PUMP)), - new GT_Cover_FluidRegulator(512, TextureFactory.of(OVERLAY_PUMP))); + ItemList.FluidRegulator_HV.get(1L), + TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_FluidRegulator(512, TextureFactory.of(OVERLAY_PUMP))); GregTech_API.registerCover( - ItemList.FluidRegulator_EV.get(1L), - TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_PUMP)), - new GT_Cover_FluidRegulator(2048, TextureFactory.of(OVERLAY_PUMP))); + ItemList.FluidRegulator_EV.get(1L), + TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_FluidRegulator(2048, TextureFactory.of(OVERLAY_PUMP))); GregTech_API.registerCover( - ItemList.FluidRegulator_IV.get(1L), - TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_PUMP)), - new GT_Cover_FluidRegulator(8192, TextureFactory.of(OVERLAY_PUMP))); + ItemList.FluidRegulator_IV.get(1L), + TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_FluidRegulator(8192, TextureFactory.of(OVERLAY_PUMP))); GregTech_API.registerCover( - ItemList.FluidRegulator_LuV.get(1L), - TextureFactory.of(MACHINE_CASINGS[6][0], TextureFactory.of(OVERLAY_PUMP)), - new GT_Cover_FluidRegulator(32768, TextureFactory.of(OVERLAY_PUMP))); + ItemList.FluidRegulator_LuV.get(1L), + TextureFactory.of(MACHINE_CASINGS[6][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_FluidRegulator(32768, TextureFactory.of(OVERLAY_PUMP))); GregTech_API.registerCover( - ItemList.FluidRegulator_ZPM.get(1L), - TextureFactory.of(MACHINE_CASINGS[7][0], TextureFactory.of(OVERLAY_PUMP)), - new GT_Cover_FluidRegulator(131072, TextureFactory.of(OVERLAY_PUMP))); + ItemList.FluidRegulator_ZPM.get(1L), + TextureFactory.of(MACHINE_CASINGS[7][0], TextureFactory.of(OVERLAY_PUMP)), + new GT_Cover_FluidRegulator(131072, TextureFactory.of(OVERLAY_PUMP))); GregTech_API.registerCover( - ItemList.FluidRegulator_UV.get(1L), - TextureFactory.of(MACHINE_CASINGS[8][0], TextureFactory.of(OVERLAY_PUMP)), - new GT_Cover_FluidRegulator(524288, TextureFactory.of(OVERLAY_PUMP))); + ItemList.FluidRegulator_UV.get(1L), + 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)), - new GT_Cover_Fluidfilter(TextureFactory.of(OVERLAY_SHUTTER))); + ItemList.FluidFilter.get(1L), + TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_SHUTTER)), + new GT_Cover_Fluidfilter(TextureFactory.of(OVERLAY_SHUTTER))); ItemList.ItemFilter_Export.set( - addItem( - 270, - "Item Filter Cover (Export)", - "Right click with an item to set filter (Only supports Export Mode)")); + addItem( + 270, + "Item Filter Cover (Export)", + "Right click with an item to set filter (Only supports Export Mode)")); GregTech_API.registerCover( - ItemList.ItemFilter_Export.get(1L), - TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_CONVEYOR)), - new GT_Cover_ItemFilter(true, TextureFactory.of(OVERLAY_CONVEYOR))); + ItemList.ItemFilter_Export.get(1L), + TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_CONVEYOR)), + new GT_Cover_ItemFilter(true, TextureFactory.of(OVERLAY_CONVEYOR))); ItemList.ItemFilter_Import.set( - addItem( - 271, - "Item Filter Cover (Import)", - "Right click with an item to set filter (Only supports Import Mode)")); + addItem( + 271, + "Item Filter Cover (Import)", + "Right click with an item to set filter (Only supports Import Mode)")); GregTech_API.registerCover( - 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.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")); GregTech_API.registerCover( - ItemList.Cover_FluidLimiter.get(1L), - TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_SHUTTER)), - new GT_Cover_FluidLimiter(TextureFactory.of(OVERLAY_SHUTTER))); + ItemList.Cover_FluidLimiter.get(1L), + TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_SHUTTER)), + new GT_Cover_FluidLimiter(TextureFactory.of(OVERLAY_SHUTTER))); ItemList.Conveyor_Module_LV.set( - addItem( - 630, - "Conveyor Module (LV)", - "1 stack every 20 secs (as Cover)", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L))); + addItem( + 630, + "Conveyor Module (LV)", + "1 stack every 20 secs (as Cover)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L))); ItemList.Conveyor_Module_MV.set( - addItem( - 631, - "Conveyor Module (MV)", - "1 stack every 5 secs (as Cover)", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L))); + addItem( + 631, + "Conveyor Module (MV)", + "1 stack every 5 secs (as Cover)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L))); ItemList.Conveyor_Module_HV.set( - addItem( - 632, - "Conveyor Module (HV)", - "1 stack every 1 sec (as Cover)", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 4L))); + addItem( + 632, + "Conveyor Module (HV)", + "1 stack every 1 sec (as Cover)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 4L))); ItemList.Conveyor_Module_EV.set( - addItem( - 633, - "Conveyor Module (EV)", - "1 stack every 1/5 sec (as Cover)", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 8L))); + addItem( + 633, + "Conveyor Module (EV)", + "1 stack every 1/5 sec (as Cover)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 8L))); ItemList.Conveyor_Module_IV.set( - addItem( - 634, - "Conveyor Module (IV)", - "1 stack every 1/20 sec (as Cover)", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L))); + addItem( + 634, + "Conveyor Module (IV)", + "1 stack every 1/20 sec (as Cover)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L))); ItemList.Conveyor_Module_LuV.set( - addItem( - 635, - "Conveyor Module (LuV)", - "2 stacks every 1/20 sec (as Cover)", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 32L))); + addItem( + 635, + "Conveyor Module (LuV)", + "2 stacks every 1/20 sec (as Cover)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 32L))); ItemList.Conveyor_Module_ZPM.set( - addItem( - 636, - "Conveyor Module (ZPM)", - "4 stacks every 1/20 sec (as Cover)", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 64L))); + addItem( + 636, + "Conveyor Module (ZPM)", + "4 stacks every 1/20 sec (as Cover)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 64L))); ItemList.Conveyor_Module_UV.set( - addItem( - 637, - "Conveyor Module (UV)", - "8 stacks every 1/20 sec (as Cover)", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 128L))); + addItem( + 637, + "Conveyor Module (UV)", + "8 stacks every 1/20 sec (as Cover)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 128L))); ItemList.Conveyor_Module_UHV.set( - addItem( - 638, - "Conveyor Module (UHV)", - "16 stacks every 1/20 sec (as Cover)", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 256L))); + addItem( + 638, + "Conveyor Module (UHV)", + "16 stacks every 1/20 sec (as Cover)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 256L))); ItemList.Conveyor_Module_UEV.set( - addItem( - 639, - "Conveyor Module (UEV)", - "32 stacks every 1/20 sec (as Cover)", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L))); + addItem( + 639, + "Conveyor Module (UEV)", + "32 stacks every 1/20 sec (as Cover)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L))); ItemList.Conveyor_Module_UIV.set( - addItem( - 29, - "Conveyor Module (UIV)", - PartNotCoverText, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L))); + addItem( + 29, + "Conveyor Module (UIV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L))); ItemList.Conveyor_Module_UMV.set( - addItem( - 30, - "Conveyor Module (UMV)", - PartNotCoverText, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L))); + addItem( + 30, + "Conveyor Module (UMV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L))); ItemList.Conveyor_Module_UXV.set( - addItem( - 31, - "Conveyor Module (UXV)", - PartNotCoverText, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L))); + addItem( + 31, + "Conveyor Module (UXV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L))); ItemList.Conveyor_Module_MAX.set( - addItem( - 32, - "Conveyor Module (MAX)", - PartNotCoverText, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L))); + addItem( + 32, + "Conveyor Module (MAX)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L))); GT_ModHandler.addCraftingRecipe( - ItemList.Conveyor_Module_LV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_LV, 'C', - OrePrefixes.cableGt01.get(Materials.Tin), 'R', OrePrefixes.plate.get(Materials.AnyRubber) }); + ItemList.Conveyor_Module_LV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_LV, 'C', + OrePrefixes.cableGt01.get(Materials.Tin), 'R', OrePrefixes.plate.get(Materials.AnyRubber) }); GT_ModHandler.addCraftingRecipe( - ItemList.Conveyor_Module_MV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_MV, 'C', - OrePrefixes.cableGt01.get(Materials.AnyCopper), 'R', - OrePrefixes.plate.get(Materials.AnyRubber) }); + ItemList.Conveyor_Module_MV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_MV, 'C', + OrePrefixes.cableGt01.get(Materials.AnyCopper), 'R', OrePrefixes.plate.get(Materials.AnyRubber) }); GT_ModHandler.addCraftingRecipe( - ItemList.Conveyor_Module_HV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_HV, 'C', - OrePrefixes.cableGt01.get(Materials.Gold), 'R', OrePrefixes.plate.get(Materials.AnyRubber) }); + ItemList.Conveyor_Module_HV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_HV, 'C', + OrePrefixes.cableGt01.get(Materials.Gold), 'R', OrePrefixes.plate.get(Materials.AnyRubber) }); GT_ModHandler.addCraftingRecipe( - ItemList.Conveyor_Module_EV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_EV, 'C', - OrePrefixes.cableGt01.get(Materials.Aluminium), 'R', - OrePrefixes.plate.get(Materials.AnyRubber) }); + ItemList.Conveyor_Module_EV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_EV, 'C', + OrePrefixes.cableGt01.get(Materials.Aluminium), 'R', OrePrefixes.plate.get(Materials.AnyRubber) }); GT_ModHandler.addCraftingRecipe( - ItemList.Conveyor_Module_IV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_IV, 'C', - OrePrefixes.cableGt01.get(Materials.Tungsten), 'R', - OrePrefixes.plate.get(Materials.AnySyntheticRubber) }); + ItemList.Conveyor_Module_IV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "RRR", "MCM", "RRR", 'M', ItemList.Electric_Motor_IV, 'C', + OrePrefixes.cableGt01.get(Materials.Tungsten), 'R', + OrePrefixes.plate.get(Materials.AnySyntheticRubber) }); GregTech_API.registerCover( - ItemList.Conveyor_Module_LV.get(1L), - TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_CONVEYOR)), - new GT_Cover_Conveyor(400, 1, TextureFactory.of(OVERLAY_CONVEYOR))); + ItemList.Conveyor_Module_LV.get(1L), + TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_CONVEYOR)), + new GT_Cover_Conveyor(400, 1, TextureFactory.of(OVERLAY_CONVEYOR))); GregTech_API.registerCover( - ItemList.Conveyor_Module_MV.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_CONVEYOR)), - new GT_Cover_Conveyor(100, 1, TextureFactory.of(OVERLAY_CONVEYOR))); + ItemList.Conveyor_Module_MV.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_CONVEYOR)), + new GT_Cover_Conveyor(100, 1, TextureFactory.of(OVERLAY_CONVEYOR))); GregTech_API.registerCover( - ItemList.Conveyor_Module_HV.get(1L), - TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_CONVEYOR)), - new GT_Cover_Conveyor(20, 1, TextureFactory.of(OVERLAY_CONVEYOR))); + ItemList.Conveyor_Module_HV.get(1L), + TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_CONVEYOR)), + new GT_Cover_Conveyor(20, 1, TextureFactory.of(OVERLAY_CONVEYOR))); GregTech_API.registerCover( - ItemList.Conveyor_Module_EV.get(1L), - TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_CONVEYOR)), - new GT_Cover_Conveyor(4, 1, TextureFactory.of(OVERLAY_CONVEYOR))); + ItemList.Conveyor_Module_EV.get(1L), + TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_CONVEYOR)), + new GT_Cover_Conveyor(4, 1, TextureFactory.of(OVERLAY_CONVEYOR))); GregTech_API.registerCover( - ItemList.Conveyor_Module_IV.get(1L), - TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_CONVEYOR)), - new GT_Cover_Conveyor(1, 1, TextureFactory.of(OVERLAY_CONVEYOR))); + ItemList.Conveyor_Module_IV.get(1L), + TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_CONVEYOR)), + new GT_Cover_Conveyor(1, 1, TextureFactory.of(OVERLAY_CONVEYOR))); GregTech_API.registerCover( - ItemList.Conveyor_Module_LuV.get(1L), - TextureFactory.of(MACHINE_CASINGS[6][0], TextureFactory.of(OVERLAY_CONVEYOR)), - new GT_Cover_Conveyor(1, 2, TextureFactory.of(OVERLAY_CONVEYOR))); + ItemList.Conveyor_Module_LuV.get(1L), + TextureFactory.of(MACHINE_CASINGS[6][0], TextureFactory.of(OVERLAY_CONVEYOR)), + new GT_Cover_Conveyor(1, 2, TextureFactory.of(OVERLAY_CONVEYOR))); GregTech_API.registerCover( - ItemList.Conveyor_Module_ZPM.get(1L), - TextureFactory.of(MACHINE_CASINGS[7][0], TextureFactory.of(OVERLAY_CONVEYOR)), - new GT_Cover_Conveyor(1, 4, TextureFactory.of(OVERLAY_CONVEYOR))); + ItemList.Conveyor_Module_ZPM.get(1L), + TextureFactory.of(MACHINE_CASINGS[7][0], TextureFactory.of(OVERLAY_CONVEYOR)), + new GT_Cover_Conveyor(1, 4, TextureFactory.of(OVERLAY_CONVEYOR))); GregTech_API.registerCover( - ItemList.Conveyor_Module_UV.get(1L), - TextureFactory.of(MACHINE_CASINGS[8][0], TextureFactory.of(OVERLAY_CONVEYOR)), - new GT_Cover_Conveyor(1, 8, TextureFactory.of(OVERLAY_CONVEYOR))); + ItemList.Conveyor_Module_UV.get(1L), + TextureFactory.of(MACHINE_CASINGS[8][0], TextureFactory.of(OVERLAY_CONVEYOR)), + new GT_Cover_Conveyor(1, 8, TextureFactory.of(OVERLAY_CONVEYOR))); GregTech_API.registerCover( - ItemList.Conveyor_Module_UHV.get(1L), - TextureFactory.of(MACHINE_CASINGS[9][0], TextureFactory.of(OVERLAY_CONVEYOR)), - new GT_Cover_Conveyor(1, 16, TextureFactory.of(OVERLAY_CONVEYOR))); + ItemList.Conveyor_Module_UHV.get(1L), + TextureFactory.of(MACHINE_CASINGS[9][0], TextureFactory.of(OVERLAY_CONVEYOR)), + new GT_Cover_Conveyor(1, 16, TextureFactory.of(OVERLAY_CONVEYOR))); GregTech_API.registerCover( - ItemList.Conveyor_Module_UEV.get(1L), - TextureFactory.of(MACHINE_CASINGS[10][0], TextureFactory.of(OVERLAY_CONVEYOR)), - new GT_Cover_Conveyor(1, 32, TextureFactory.of(OVERLAY_CONVEYOR))); + ItemList.Conveyor_Module_UEV.get(1L), + TextureFactory.of(MACHINE_CASINGS[10][0], TextureFactory.of(OVERLAY_CONVEYOR)), + new GT_Cover_Conveyor(1, 32, TextureFactory.of(OVERLAY_CONVEYOR))); ItemList.Robot_Arm_LV.set( - addItem( - 650, - "Robot Arm (LV)", - "1 stack every 20 secs (as Cover)/n " + RAText, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L))); + addItem( + 650, + "Robot Arm (LV)", + "1 stack every 20 secs (as Cover)/n " + RAText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L))); ItemList.Robot_Arm_MV.set( - addItem( - 651, - "Robot Arm (MV)", - "1 stack every 5 secs (as Cover)/n " + RAText, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L))); + addItem( + 651, + "Robot Arm (MV)", + "1 stack every 5 secs (as Cover)/n " + RAText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L))); ItemList.Robot_Arm_HV.set( - addItem( - 652, - "Robot Arm (HV)", - "1 stack every 1 sec (as Cover)/n " + RAText, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 4L))); + addItem( + 652, + "Robot Arm (HV)", + "1 stack every 1 sec (as Cover)/n " + RAText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 4L))); ItemList.Robot_Arm_EV.set( - addItem( - 653, - "Robot Arm (EV)", - "1 stack every 1/5 sec (as Cover)/n " + RAText, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 8L))); + addItem( + 653, + "Robot Arm (EV)", + "1 stack every 1/5 sec (as Cover)/n " + RAText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 8L))); ItemList.Robot_Arm_IV.set( - addItem( - 654, - "Robot Arm (IV)", - "1 stack every 1/20 sec (as Cover)/n " + RAText, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 16L))); + addItem( + 654, + "Robot Arm (IV)", + "1 stack every 1/20 sec (as Cover)/n " + RAText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 16L))); ItemList.Robot_Arm_LuV.set( - addItem( - 655, - "Robot Arm (LuV)", - PartNotCoverText, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 32L))); + addItem( + 655, + "Robot Arm (LuV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 32L))); ItemList.Robot_Arm_ZPM.set( - addItem( - 656, - "Robot Arm (ZPM)", - PartNotCoverText, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 64L))); + addItem( + 656, + "Robot Arm (ZPM)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 64L))); ItemList.Robot_Arm_UV.set( - addItem( - 657, - "Robot Arm (UV)", - PartNotCoverText, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 128L))); + addItem( + 657, + "Robot Arm (UV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 128L))); ItemList.Robot_Arm_UHV.set( - addItem( - 658, - "Robot Arm (UHV)", - PartNotCoverText, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 256L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 256L))); + addItem( + 658, + "Robot Arm (UHV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 256L))); ItemList.Robot_Arm_UEV.set( - addItem( - 659, - "Robot Arm (UEV)", - PartNotCoverText, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1024L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 512L))); + addItem( + 659, + "Robot Arm (UEV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1024L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 512L))); ItemList.Robot_Arm_UIV.set( - addItem( - 33, - "Robot Arm (UIV)", - PartNotCoverText, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1024L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 512L))); + addItem( + 33, + "Robot Arm (UIV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1024L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 512L))); ItemList.Robot_Arm_UMV.set( - addItem( - 34, - "Robot Arm (UMV)", - PartNotCoverText, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1024L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 512L))); + addItem( + 34, + "Robot Arm (UMV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1024L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 512L))); ItemList.Robot_Arm_UXV.set( - addItem( - 35, - "Robot Arm (UXV)", - PartNotCoverText, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1024L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 512L))); + addItem( + 35, + "Robot Arm (UXV)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1024L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 512L))); ItemList.Robot_Arm_MAX.set( - addItem( - 36, - "Robot Arm (MAX)", - PartNotCoverText, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1024L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 512L))); + addItem( + 36, + "Robot Arm (MAX)", + PartNotCoverText, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1024L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 512L))); GT_ModHandler.addCraftingRecipe( - ItemList.Robot_Arm_LV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.Steel), 'M', - ItemList.Electric_Motor_LV, 'P', ItemList.Electric_Piston_LV, 'E', - OrePrefixes.circuit.get(Materials.Basic), 'C', OrePrefixes.cableGt01.get(Materials.Tin) }); + ItemList.Robot_Arm_LV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.Steel), 'M', + ItemList.Electric_Motor_LV, 'P', ItemList.Electric_Piston_LV, 'E', + OrePrefixes.circuit.get(Materials.Basic), 'C', OrePrefixes.cableGt01.get(Materials.Tin) }); GT_ModHandler.addCraftingRecipe( - ItemList.Robot_Arm_MV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.Aluminium), 'M', - ItemList.Electric_Motor_MV, 'P', ItemList.Electric_Piston_MV, 'E', - OrePrefixes.circuit.get(Materials.Good), 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper) }); + ItemList.Robot_Arm_MV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.Aluminium), 'M', + ItemList.Electric_Motor_MV, 'P', ItemList.Electric_Piston_MV, 'E', + OrePrefixes.circuit.get(Materials.Good), 'C', OrePrefixes.cableGt01.get(Materials.AnyCopper) }); GT_ModHandler.addCraftingRecipe( - ItemList.Robot_Arm_HV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.StainlessSteel), 'M', - ItemList.Electric_Motor_HV, 'P', ItemList.Electric_Piston_HV, 'E', - OrePrefixes.circuit.get(Materials.Advanced), 'C', OrePrefixes.cableGt01.get(Materials.Gold) }); + ItemList.Robot_Arm_HV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.StainlessSteel), 'M', + ItemList.Electric_Motor_HV, 'P', ItemList.Electric_Piston_HV, 'E', + OrePrefixes.circuit.get(Materials.Advanced), 'C', OrePrefixes.cableGt01.get(Materials.Gold) }); GT_ModHandler.addCraftingRecipe( - ItemList.Robot_Arm_EV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.Titanium), 'M', - ItemList.Electric_Motor_EV, 'P', ItemList.Electric_Piston_EV, 'E', - OrePrefixes.circuit.get(Materials.Data), 'C', OrePrefixes.cableGt01.get(Materials.Aluminium) }); + ItemList.Robot_Arm_EV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.Titanium), 'M', + ItemList.Electric_Motor_EV, 'P', ItemList.Electric_Piston_EV, 'E', + OrePrefixes.circuit.get(Materials.Data), 'C', OrePrefixes.cableGt01.get(Materials.Aluminium) }); GT_ModHandler.addCraftingRecipe( - ItemList.Robot_Arm_IV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.TungstenSteel), 'M', - ItemList.Electric_Motor_IV, 'P', ItemList.Electric_Piston_IV, 'E', - OrePrefixes.circuit.get(Materials.Elite), 'C', OrePrefixes.cableGt01.get(Materials.Tungsten) }); + ItemList.Robot_Arm_IV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "CCC", "MSM", "PES", 'S', OrePrefixes.stick.get(Materials.TungstenSteel), 'M', + ItemList.Electric_Motor_IV, 'P', ItemList.Electric_Piston_IV, 'E', + OrePrefixes.circuit.get(Materials.Elite), 'C', OrePrefixes.cableGt01.get(Materials.Tungsten) }); GregTech_API.registerCover( - ItemList.Robot_Arm_LV.get(1L), - TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_ARM)), - new GT_Cover_Arm(400, TextureFactory.of(OVERLAY_ARM))); + ItemList.Robot_Arm_LV.get(1L), + TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_ARM)), + new GT_Cover_Arm(400, TextureFactory.of(OVERLAY_ARM))); GregTech_API.registerCover( - ItemList.Robot_Arm_MV.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ARM)), - new GT_Cover_Arm(100, TextureFactory.of(OVERLAY_ARM))); + ItemList.Robot_Arm_MV.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ARM)), + new GT_Cover_Arm(100, TextureFactory.of(OVERLAY_ARM))); GregTech_API.registerCover( - ItemList.Robot_Arm_HV.get(1L), - TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_ARM)), - new GT_Cover_Arm(20, TextureFactory.of(OVERLAY_ARM))); + ItemList.Robot_Arm_HV.get(1L), + TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_ARM)), + new GT_Cover_Arm(20, TextureFactory.of(OVERLAY_ARM))); GregTech_API.registerCover( - ItemList.Robot_Arm_EV.get(1L), - TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_ARM)), - new GT_Cover_Arm(4, TextureFactory.of(OVERLAY_ARM))); + ItemList.Robot_Arm_EV.get(1L), + TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_ARM)), + new GT_Cover_Arm(4, TextureFactory.of(OVERLAY_ARM))); GregTech_API.registerCover( - ItemList.Robot_Arm_IV.get(1L), - TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_ARM)), - new GT_Cover_Arm(1, TextureFactory.of(OVERLAY_ARM))); + ItemList.Robot_Arm_IV.get(1L), + TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_ARM)), + new GT_Cover_Arm(1, TextureFactory.of(OVERLAY_ARM))); ItemList.QuantumEye.set(addItem(tLastID = 724, "Quantum Eye", "Improved Ender Eye")); ItemList.QuantumStar.set(addItem(tLastID = 725, "Quantum Star", "Improved Nether Star")); ItemList.Gravistar.set(addItem(tLastID = 726, "Gravi Star", "Ultimate Nether Star")); ItemList.Emitter_LV.set( - addItem( - 680, - "Emitter (LV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 1L))); + addItem( + 680, + "Emitter (LV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 1L))); ItemList.Emitter_MV.set( - addItem( - 681, - "Emitter (MV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 2L))); + addItem( + 681, + "Emitter (MV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 2L))); ItemList.Emitter_HV.set( - addItem( - 682, - "Emitter (HV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 4L))); + addItem( + 682, + "Emitter (HV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 4L))); ItemList.Emitter_EV.set( - addItem( - 683, - "Emitter (EV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 8L))); + addItem( + 683, + "Emitter (EV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 8L))); ItemList.Emitter_IV.set( - addItem( - 684, - "Emitter (IV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 16L))); + addItem( + 684, + "Emitter (IV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 16L))); ItemList.Emitter_LuV.set( - addItem( - 685, - "Emitter (LuV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 32L))); + addItem( + 685, + "Emitter (LuV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 32L))); ItemList.Emitter_ZPM.set( - addItem( - 686, - "Emitter (ZPM)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 64L))); + addItem( + 686, + "Emitter (ZPM)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 64L))); ItemList.Emitter_UV.set( - addItem( - 687, - "Emitter (UV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 128L))); + addItem( + 687, + "Emitter (UV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 128L))); ItemList.Emitter_UHV.set( - addItem( - 688, - "Emitter (UHV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 256L))); + addItem( + 688, + "Emitter (UHV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 256L))); ItemList.Emitter_UEV.set( - addItem( - 689, - "Emitter (UEV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 512L))); + addItem( + 689, + "Emitter (UEV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 512L))); ItemList.Emitter_UIV.set( - addItem( - 37, - "Emitter (UIV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 512L))); + addItem( + 37, + "Emitter (UIV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 512L))); ItemList.Emitter_UMV.set( - addItem( - 38, - "Emitter (UMV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 512L))); + addItem( + 38, + "Emitter (UMV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 512L))); ItemList.Emitter_UXV.set( - addItem( - 39, - "Emitter (UXV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 512L))); + addItem( + 39, + "Emitter (UXV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 512L))); ItemList.Emitter_MAX.set( - addItem( - 40, - "Emitter (MAX)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 512L))); + addItem( + 40, + "Emitter (MAX)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 512L))); GT_ModHandler.addCraftingRecipe( - ItemList.Emitter_LV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "SSC", "WQS", "CWS", 'Q', OrePrefixes.gem.get(Materials.CertusQuartz), 'S', - OrePrefixes.stick.get(Materials.Brass), 'C', OrePrefixes.circuit.get(Materials.Basic), 'W', - OrePrefixes.cableGt01.get(Materials.Tin) }); + ItemList.Emitter_LV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "SSC", "WQS", "CWS", 'Q', OrePrefixes.gem.get(Materials.CertusQuartz), 'S', + OrePrefixes.stick.get(Materials.Brass), 'C', OrePrefixes.circuit.get(Materials.Basic), 'W', + OrePrefixes.cableGt01.get(Materials.Tin) }); GT_ModHandler.addCraftingRecipe( - ItemList.Emitter_MV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "SSC", "WQS", "CWS", 'Q', OrePrefixes.gem.get(Materials.EnderPearl), 'S', - OrePrefixes.stick.get(Materials.Electrum), 'C', OrePrefixes.circuit.get(Materials.Good), 'W', - OrePrefixes.cableGt01.get(Materials.AnyCopper) }); + ItemList.Emitter_MV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "SSC", "WQS", "CWS", 'Q', OrePrefixes.gem.get(Materials.EnderPearl), 'S', + OrePrefixes.stick.get(Materials.Electrum), 'C', OrePrefixes.circuit.get(Materials.Good), 'W', + OrePrefixes.cableGt01.get(Materials.AnyCopper) }); GT_ModHandler.addCraftingRecipe( - ItemList.Emitter_HV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "SSC", "WQS", "CWS", 'Q', OrePrefixes.gem.get(Materials.EnderEye), 'S', - OrePrefixes.stick.get(Materials.Chrome), 'C', OrePrefixes.circuit.get(Materials.Advanced), 'W', - OrePrefixes.cableGt01.get(Materials.Gold) }); + ItemList.Emitter_HV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "SSC", "WQS", "CWS", 'Q', OrePrefixes.gem.get(Materials.EnderEye), 'S', + OrePrefixes.stick.get(Materials.Chrome), 'C', OrePrefixes.circuit.get(Materials.Advanced), 'W', + OrePrefixes.cableGt01.get(Materials.Gold) }); GT_ModHandler.addCraftingRecipe( - ItemList.Emitter_EV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "SSC", "WQS", "CWS", 'Q', ItemList.QuantumEye, 'S', - OrePrefixes.stick.get(Materials.Platinum), 'C', OrePrefixes.circuit.get(Materials.Data), 'W', - OrePrefixes.cableGt01.get(Materials.Aluminium) }); + ItemList.Emitter_EV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "SSC", "WQS", "CWS", 'Q', ItemList.QuantumEye, 'S', + OrePrefixes.stick.get(Materials.Platinum), 'C', OrePrefixes.circuit.get(Materials.Data), 'W', + OrePrefixes.cableGt01.get(Materials.Aluminium) }); GT_ModHandler.addCraftingRecipe( - ItemList.Emitter_IV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "SSC", "WQS", "CWS", 'Q', ItemList.QuantumStar, 'S', - OrePrefixes.stick.get(Materials.Iridium), 'C', OrePrefixes.circuit.get(Materials.Elite), 'W', - OrePrefixes.cableGt01.get(Materials.Tungsten) }); + ItemList.Emitter_IV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "SSC", "WQS", "CWS", 'Q', ItemList.QuantumStar, 'S', + OrePrefixes.stick.get(Materials.Iridium), 'C', OrePrefixes.circuit.get(Materials.Elite), 'W', + OrePrefixes.cableGt01.get(Materials.Tungsten) }); ItemList.Sensor_LV.set( - addItem( - 690, - "Sensor (LV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L))); + addItem( + 690, + "Sensor (LV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L))); ItemList.Sensor_MV.set( - addItem( - 691, - "Sensor (MV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L))); + addItem( + 691, + "Sensor (MV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L))); ItemList.Sensor_HV.set( - addItem( - 692, - "Sensor (HV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 4L))); + addItem( + 692, + "Sensor (HV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 4L))); ItemList.Sensor_EV.set( - addItem( - 693, - "Sensor (EV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 8L))); + addItem( + 693, + "Sensor (EV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 8L))); ItemList.Sensor_IV.set( - addItem( - 694, - "Sensor (IV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 16L))); + addItem( + 694, + "Sensor (IV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 16L))); ItemList.Sensor_LuV.set( - addItem( - 695, - "Sensor (LuV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 32L))); + addItem( + 695, + "Sensor (LuV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 32L))); ItemList.Sensor_ZPM.set( - addItem( - 696, - "Sensor (ZPM)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 64L))); + addItem( + 696, + "Sensor (ZPM)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 64L))); ItemList.Sensor_UV.set( - addItem( - 697, - "Sensor (UV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 128L))); + addItem( + 697, + "Sensor (UV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 128L))); ItemList.Sensor_UHV.set( - addItem( - 698, - "Sensor (UHV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 256L))); + addItem( + 698, + "Sensor (UHV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 256L))); ItemList.Sensor_UEV.set( - addItem( - 699, - "Sensor (UEV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 512L))); + addItem( + 699, + "Sensor (UEV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 512L))); ItemList.Sensor_UIV.set( - addItem( - 41, - "Sensor (UIV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 512L))); + addItem( + 41, + "Sensor (UIV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 512L))); ItemList.Sensor_UMV.set( - addItem( - 42, - "Sensor (UMV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 512L))); + addItem( + 42, + "Sensor (UMV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 512L))); ItemList.Sensor_UXV.set( - addItem( - 43, - "Sensor (UXV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 512L))); + addItem( + 43, + "Sensor (UXV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 512L))); ItemList.Sensor_MAX.set( - addItem( - 44, - "Sensor (MAX)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 512L))); + addItem( + 44, + "Sensor (MAX)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 512L))); GT_ModHandler.addCraftingRecipe( - ItemList.Sensor_LV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "P Q", "PS ", "CPP", 'Q', OrePrefixes.gem.get(Materials.CertusQuartz), 'S', - OrePrefixes.stick.get(Materials.Brass), 'P', OrePrefixes.plate.get(Materials.Steel), 'C', - OrePrefixes.circuit.get(Materials.Basic) }); + ItemList.Sensor_LV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "P Q", "PS ", "CPP", 'Q', OrePrefixes.gem.get(Materials.CertusQuartz), 'S', + OrePrefixes.stick.get(Materials.Brass), 'P', OrePrefixes.plate.get(Materials.Steel), 'C', + OrePrefixes.circuit.get(Materials.Basic) }); GT_ModHandler.addCraftingRecipe( - ItemList.Sensor_MV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "P Q", "PS ", "CPP", 'Q', OrePrefixes.gemFlawless.get(Materials.Emerald), 'S', - OrePrefixes.stick.get(Materials.Electrum), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'C', - OrePrefixes.circuit.get(Materials.Good) }); + ItemList.Sensor_MV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "P Q", "PS ", "CPP", 'Q', OrePrefixes.gemFlawless.get(Materials.Emerald), 'S', + OrePrefixes.stick.get(Materials.Electrum), 'P', OrePrefixes.plate.get(Materials.Aluminium), 'C', + OrePrefixes.circuit.get(Materials.Good) }); GT_ModHandler.addCraftingRecipe( - ItemList.Sensor_HV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "P Q", "PS ", "CPP", 'Q', OrePrefixes.gem.get(Materials.EnderEye), 'S', - OrePrefixes.stick.get(Materials.Chrome), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), - 'C', OrePrefixes.circuit.get(Materials.Advanced) }); + ItemList.Sensor_HV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "P Q", "PS ", "CPP", 'Q', OrePrefixes.gem.get(Materials.EnderEye), 'S', + OrePrefixes.stick.get(Materials.Chrome), 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'C', + OrePrefixes.circuit.get(Materials.Advanced) }); GT_ModHandler.addCraftingRecipe( - ItemList.Sensor_EV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "P Q", "PS ", "CPP", 'Q', ItemList.QuantumEye, 'S', - OrePrefixes.stick.get(Materials.Platinum), 'P', OrePrefixes.plate.get(Materials.Titanium), 'C', - OrePrefixes.circuit.get(Materials.Data) }); + ItemList.Sensor_EV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "P Q", "PS ", "CPP", 'Q', ItemList.QuantumEye, 'S', + OrePrefixes.stick.get(Materials.Platinum), 'P', OrePrefixes.plate.get(Materials.Titanium), 'C', + OrePrefixes.circuit.get(Materials.Data) }); GT_ModHandler.addCraftingRecipe( - ItemList.Sensor_IV.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "P Q", "PS ", "CPP", 'Q', ItemList.QuantumStar, 'S', - OrePrefixes.stick.get(Materials.Iridium), 'P', OrePrefixes.plate.get(Materials.TungstenSteel), - 'C', OrePrefixes.circuit.get(Materials.Elite) }); + ItemList.Sensor_IV.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "P Q", "PS ", "CPP", 'Q', ItemList.QuantumStar, 'S', + OrePrefixes.stick.get(Materials.Iridium), 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'C', + OrePrefixes.circuit.get(Materials.Elite) }); ItemList.Field_Generator_LV.set( - addItem( - 670, - "Field Generator (LV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 1L))); + addItem( + 670, + "Field Generator (LV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 1L))); ItemList.Field_Generator_MV.set( - addItem( - 671, - "Field Generator (MV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 2L))); + addItem( + 671, + "Field Generator (MV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 2L))); ItemList.Field_Generator_HV.set( - addItem( - 672, - "Field Generator (HV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 4L))); + addItem( + 672, + "Field Generator (HV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 4L))); ItemList.Field_Generator_EV.set( - addItem( - 673, - "Field Generator (EV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 8L))); + addItem( + 673, + "Field Generator (EV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 8L))); ItemList.Field_Generator_IV.set( - addItem( - 674, - "Field Generator (IV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 16L))); + addItem( + 674, + "Field Generator (IV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 16L))); ItemList.Field_Generator_LuV.set( - addItem( - 675, - "Field Generator (LuV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 32L))); + addItem( + 675, + "Field Generator (LuV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 32L))); ItemList.Field_Generator_ZPM.set( - addItem( - 676, - "Field Generator (ZPM)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 64L))); + addItem( + 676, + "Field Generator (ZPM)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 64L))); ItemList.Field_Generator_UV.set( - addItem( - 677, - "Field Generator (UV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 128L))); + addItem( + 677, + "Field Generator (UV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 128L))); ItemList.Field_Generator_UHV.set( - addItem( - 678, - "Field Generator (UHV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 256L))); + addItem( + 678, + "Field Generator (UHV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 256L))); ItemList.Field_Generator_UEV.set( - addItem( - 679, - "Field Generator (UEV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1024L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 512L))); + addItem( + 679, + "Field Generator (UEV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1024L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 512L))); ItemList.Field_Generator_UIV.set( - addItem( - 45, - "Field Generator (UIV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1024L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 512L))); + addItem( + 45, + "Field Generator (UIV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1024L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 512L))); ItemList.Field_Generator_UMV.set( - addItem( - 46, - "Field Generator (UMV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1024L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 512L))); + addItem( + 46, + "Field Generator (UMV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1024L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 512L))); ItemList.Field_Generator_UXV.set( - addItem( - 47, - "Field Generator (UXV)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1024L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 512L))); + addItem( + 47, + "Field Generator (UXV)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1024L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 512L))); ItemList.Field_Generator_MAX.set( - addItem( - 48, - "Field Generator (MAX)", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1024L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 512L))); + addItem( + 48, + "Field Generator (MAX)", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1024L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 512L))); ItemList.StableAdhesive.set( - addItem( - 427, - "Hyper-Stable Self-Healing Adhesive", - "Complete and selective adhesion, even when torn or damaged", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 30L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 20L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LIMUS, 10L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VINCULUM, 5L))); + addItem( + 427, + "Hyper-Stable Self-Healing Adhesive", + "Complete and selective adhesion, even when torn or damaged", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 30L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 20L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LIMUS, 10L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VINCULUM, 5L))); ItemList.SuperconductorComposite.set( - addItem( - 428, - "Superconductor Rare-Earth Composite", - "Zero resistance to electrical and quantum flow, regardless of temperature", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 50L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 25L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 15L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 10L))); + addItem( + 428, + "Superconductor Rare-Earth Composite", + "Zero resistance to electrical and quantum flow, regardless of temperature", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 50L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 25L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 15L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 10L))); ItemList.NaquadriaSupersolid.set( - addItem( - 429, - "Black Body Naquadria Supersolid", - "Flows like a fluid and reflects nothing, perfect absorption and transfer", - new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 100L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 60L), - new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 40L), - new TC_Aspects.TC_AspectStack(TC_Aspects.RADIO, 20L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ALIENIS, 10L))); + addItem( + 429, + "Black Body Naquadria Supersolid", + "Flows like a fluid and reflects nothing, perfect absorption and transfer", + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 100L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 60L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 40L), + new TC_Aspects.TC_AspectStack(TC_Aspects.RADIO, 20L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ALIENIS, 10L))); // Circuits ULV - LuV. ItemList.Circuit_Primitive.set( - addItem( - tLastID = 700, - "Vacuum Tube", - "A very simple Circuit", - OrePrefixes.circuit.get(Materials.Primitive), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 700, + "Vacuum Tube", + "A very simple Circuit", + OrePrefixes.circuit.get(Materials.Primitive), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Primitive.get(1), ULV); ItemList.Circuit_Basic.set( - addItem( - tLastID = 701, - "Integrated Logic Circuit", - "A Basic Circuit", - OrePrefixes.circuit.get(Materials.Basic), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 701, + "Integrated Logic Circuit", + "A Basic Circuit", + OrePrefixes.circuit.get(Materials.Basic), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Basic.get(1), LV); ItemList.Circuit_Good.set( - addItem( - tLastID = 702, - "Good Electronic Circuit", - "A Good Circuit", - OrePrefixes.circuit.get(Materials.Good), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 702, + "Good Electronic Circuit", + "A Good Circuit", + OrePrefixes.circuit.get(Materials.Good), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Good.get(1), MV); ItemList.Circuit_Advanced.set( - addItem( - tLastID = 703, - "Processor Assembly", - "An Advanced Circuit", - OrePrefixes.circuit.get(Materials.Advanced), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 703, + "Processor Assembly", + "An Advanced Circuit", + OrePrefixes.circuit.get(Materials.Advanced), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Advanced.get(1), HV); ItemList.Circuit_Data.set( - addItem( - tLastID = 704, - "Workstation", - "An Extreme Circuit", - OrePrefixes.circuit.get(Materials.Data), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 704, + "Workstation", + "An Extreme Circuit", + OrePrefixes.circuit.get(Materials.Data), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Data.get(1), EV); ItemList.Circuit_Elite.set( - addItem( - tLastID = 705, - "Mainframe", - "An Elite Circuit", - OrePrefixes.circuit.get(Materials.Elite), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 705, + "Mainframe", + "An Elite Circuit", + OrePrefixes.circuit.get(Materials.Elite), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Elite.get(1), IV); ItemList.Circuit_Master.set( - addItem( - tLastID = 706, - "Nanoprocessor Mainframe", - "A Master Circuit", - OrePrefixes.circuit.get(Materials.Master), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 706, + "Nanoprocessor Mainframe", + "A Master Circuit", + OrePrefixes.circuit.get(Materials.Master), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Master.get(1), LuV); // Backwards compatibility. @@ -3533,51 +3484,51 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { ItemList.Circuit_Computer.set(ItemList.Circuit_Advanced.get(1)); ItemList.Tool_DataOrb.set( - addItem( - tLastID = 707, - "Data Orb", - "A High Capacity Data Storage", - SubTag.NO_UNIFICATION, - new Behaviour_DataOrb())); + addItem( + tLastID = 707, + "Data Orb", + "A High Capacity Data Storage", + SubTag.NO_UNIFICATION, + new Behaviour_DataOrb())); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Tool_DataOrb.get(1L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Tool_DataOrb.get(1L) }); + ItemList.Tool_DataOrb.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Tool_DataOrb.get(1L) }); ItemList.Tool_DataStick.set( - addItem( - tLastID = 708, - "Data Stick", - "A Low Capacity Data Storage", - SubTag.NO_UNIFICATION, - new Behaviour_DataStick())); + addItem( + tLastID = 708, + "Data Stick", + "A Low Capacity Data Storage", + SubTag.NO_UNIFICATION, + new Behaviour_DataStick())); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Tool_DataStick.get(1L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ItemList.Tool_DataStick.get(1L) }); + ItemList.Tool_DataStick.get(1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ItemList.Tool_DataStick.get(1L) }); ItemList.Tool_Cover_Copy_Paste.set( - addItem( - tLastID = 709, - "Cover Copy/Paste tool", - "Set Cover Massively.", - Behaviour_Cover_Tool.INSTANCE, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 6L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 6L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 6L))); + addItem( + tLastID = 709, + "Cover Copy/Paste tool", + "Set Cover Massively.", + Behaviour_Cover_Tool.INSTANCE, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 6L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 6L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 6L))); setElectricStats(32000 + tLastID, 400000L, GT_Values.V[2], 2L, -1L, false); ItemList.Circuit_Board_Basic.set(addItem(tLastID = 710, "Coated Circuit Board", "A Basic Board")); 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")); @@ -3592,790 +3543,773 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { ItemList.Circuit_Board_Fiberglass.set(ItemList.Empty_Board_Elite.get(1)); ItemList.Component_Sawblade_Diamond.set( - addItem( - tLastID = 721, - "Diamond Sawblade", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L), - OreDictNames.craftingDiamondBlade)); + addItem( + tLastID = 721, + "Diamond Sawblade", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L), + OreDictNames.craftingDiamondBlade)); ItemList.Component_Grinder_Diamond.set( - addItem( - tLastID = 722, - "Diamond Grinding Head", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 6L), - OreDictNames.craftingGrinder)); + addItem( + tLastID = 722, + "Diamond Grinding Head", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 6L), + OreDictNames.craftingGrinder)); ItemList.Component_Grinder_Tungsten.set( - addItem( - tLastID = 723, - "Tungsten Grinding Head", - "", - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 6L), - OreDictNames.craftingGrinder)); + addItem( + tLastID = 723, + "Tungsten Grinding Head", + "", + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 6L), + OreDictNames.craftingGrinder)); GT_ModHandler.addCraftingRecipe( - ItemList.Component_Sawblade_Diamond.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { " D ", "DGD", " D ", 'D', OrePrefixes.dustSmall.get(Materials.Diamond), 'G', - OrePrefixes.gearGt.get(Materials.CobaltBrass) }); + ItemList.Component_Sawblade_Diamond.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { " D ", "DGD", " D ", 'D', OrePrefixes.dustSmall.get(Materials.Diamond), 'G', + OrePrefixes.gearGt.get(Materials.CobaltBrass) }); GT_ModHandler.addCraftingRecipe( - ItemList.Component_Grinder_Diamond.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "DSD", "SIS", "DSD", 'I', OrePrefixes.gem.get(Materials.Diamond), 'D', - OrePrefixes.dust.get(Materials.Diamond), 'S', OrePrefixes.plateDouble.get(Materials.Steel) }); + ItemList.Component_Grinder_Diamond.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "DSD", "SIS", "DSD", 'I', OrePrefixes.gem.get(Materials.Diamond), 'D', + OrePrefixes.dust.get(Materials.Diamond), 'S', OrePrefixes.plateDouble.get(Materials.Steel) }); GT_ModHandler.addCraftingRecipe( - ItemList.Component_Grinder_Tungsten.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "TST", "SIS", "TST", 'I', OreDictNames.craftingIndustrialDiamond, 'T', - OrePrefixes.plate.get(Materials.Tungsten), 'S', OrePrefixes.plateDouble.get(Materials.Steel) }); + ItemList.Component_Grinder_Tungsten.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "TST", "SIS", "TST", 'I', OreDictNames.craftingIndustrialDiamond, 'T', + OrePrefixes.plate.get(Materials.Tungsten), 'S', OrePrefixes.plateDouble.get(Materials.Steel) }); ItemList.Upgrade_Muffler.set( - addItem( - tLastID = 727, - "Muffler Upgrade", - "Makes Machines silent", - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 2L))); + addItem( + tLastID = 727, + "Muffler Upgrade", + "Makes Machines silent", + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 2L))); ItemList.Upgrade_Lock.set( - addItem( - tLastID = 728, - "Lock Upgrade", - "Protects your Machines", - new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 4L))); + addItem( + tLastID = 728, + "Lock Upgrade", + "Protects your Machines", + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 4L))); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 2L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Upgrade_Muffler.get(1L), - 1600, - 2); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 2L), GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Upgrade_Muffler.get(1L), + 1600, + 2); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Upgrade_Muffler.get(1L), - 1600, - 2); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Upgrade_Muffler.get(1L), + 1600, + 2); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 2L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Upgrade_Muffler.get(1L), - 1600, - 2); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 2L), GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Upgrade_Muffler.get(1L), + 1600, + 2); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Upgrade_Muffler.get(1L), - 1600, - 2); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Upgrade_Muffler.get(1L), + 1600, + 2); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 2L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Upgrade_Muffler.get(1L), - 1600, - 2); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 2L), GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Upgrade_Muffler.get(1L), + 1600, + 2); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Upgrade_Muffler.get(1L), - 1600, - 2); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L), GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Upgrade_Muffler.get(1L), + 1600, + 2); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Upgrade_Lock.get(1L), - 6400, - 16); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Upgrade_Lock.get(1L), + 6400, + 16); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Upgrade_Lock.get(1L), - 6400, - 16); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Upgrade_Lock.get(1L), + 6400, + 16); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Upgrade_Lock.get(1L), - 6400, - 16); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Upgrade_Lock.get(1L), + 6400, + 16); ItemList.Component_Filter.set( - addItem( - tLastID = 729, - "Item Filter", - "", - new ItemData(Materials.Zinc, OrePrefixes.foil.mMaterialAmount * 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), - OreDictNames.craftingFilter)); + addItem( + tLastID = 729, + "Item Filter", + "", + new ItemData(Materials.Zinc, OrePrefixes.foil.mMaterialAmount * 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), + OreDictNames.craftingFilter)); ItemList.Cover_Controller.set( - addItem( - tLastID = 730, - "Machine Controller Cover", - "Turns Machines ON/OFF", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); + addItem( + tLastID = 730, + "Machine Controller Cover", + "Turns Machines ON/OFF", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); ItemList.Cover_ActivityDetector.set( - addItem( - tLastID = 731, - "Activity Detector Cover", - "Gives out Activity as Redstone", - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); + addItem( + tLastID = 731, + "Activity Detector Cover", + "Gives out Activity as Redstone", + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); ItemList.Cover_FluidDetector.set( - addItem( - tLastID = 732, - "Fluid Detector Cover", - "Gives out Fluid Amount as Redstone", - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))); + addItem( + tLastID = 732, + "Fluid Detector Cover", + "Gives out Fluid Amount as Redstone", + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))); ItemList.Cover_ItemDetector.set( - addItem( - tLastID = 733, - "Item Detector Cover", - "Gives out Item Amount as Redstone", - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 1L))); + addItem( + tLastID = 733, + "Item Detector Cover", + "Gives out Item Amount as Redstone", + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 1L))); ItemList.Cover_EnergyDetector.set( - addItem( - tLastID = 734, - "Energy Detector Cover", - "Gives out Energy Amount as Redstone", - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); + addItem( + tLastID = 734, + "Energy Detector Cover", + "Gives out Energy Amount as Redstone", + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); ItemList.Cover_PlayerDetector.set( - addItem( - tLastID = 735, - "Player Detector Cover", - "Gives out close Players as Redstone", - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); + addItem( + tLastID = 735, + "Player Detector Cover", + "Gives out close Players as Redstone", + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); ItemList.Cover_FluidStorageMonitor.set( - addItem( - tLastID = 577, - "Fluid Storage Monitor Cover", - "Displays the fluid stored in the Tank", - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))); + addItem( + tLastID = 577, + "Fluid Storage Monitor Cover", + "Displays the fluid stored in the Tank", + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { ItemList.Sensor_EV.get(1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 1L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Cover_PlayerDetector.get(1L), - 3200, - 128); + new ItemStack[] { ItemList.Sensor_EV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 1L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Cover_PlayerDetector.get(1L), + 3200, + 128); GregTech_API.registerCover( - ItemList.Cover_Controller.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_CONTROLLER)), - new GT_Cover_ControlsWork(TextureFactory.of(OVERLAY_CONTROLLER))); + ItemList.Cover_Controller.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_CONTROLLER)), + new GT_Cover_ControlsWork(TextureFactory.of(OVERLAY_CONTROLLER))); final ITexture doesWorkCoverTexture = TextureFactory.of( - TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), - TextureFactory.builder() - .addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW) - .glow() - .build()); + TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), + TextureFactory.builder() + .addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW) + .glow() + .build()); GregTech_API.registerCover( - ItemList.Cover_ActivityDetector.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], doesWorkCoverTexture), - new GT_Cover_DoesWork(doesWorkCoverTexture)); + ItemList.Cover_ActivityDetector.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], doesWorkCoverTexture), + new GT_Cover_DoesWork(doesWorkCoverTexture)); GregTech_API.registerCover( - ItemList.Cover_FluidDetector.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_FLUIDDETECTOR)), - new GT_Cover_LiquidMeter(TextureFactory.of(OVERLAY_FLUIDDETECTOR))); + ItemList.Cover_FluidDetector.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_FLUIDDETECTOR)), + new GT_Cover_LiquidMeter(TextureFactory.of(OVERLAY_FLUIDDETECTOR))); GregTech_API.registerCover( - ItemList.Cover_ItemDetector.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ITEMDETECTOR)), - new GT_Cover_ItemMeter(TextureFactory.of(OVERLAY_ITEMDETECTOR))); + ItemList.Cover_ItemDetector.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ITEMDETECTOR)), + new GT_Cover_ItemMeter(TextureFactory.of(OVERLAY_ITEMDETECTOR))); GregTech_API.registerCover( - ItemList.Cover_EnergyDetector.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ENERGYDETECTOR)), - new GT_Cover_EUMeter(TextureFactory.of(OVERLAY_ENERGYDETECTOR))); + ItemList.Cover_EnergyDetector.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ENERGYDETECTOR)), + new GT_Cover_EUMeter(TextureFactory.of(OVERLAY_ENERGYDETECTOR))); final ITexture playerDectectorCoverTexture = TextureFactory.of( - TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), - TextureFactory.builder() - .addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW) - .glow() - .build()); + TextureFactory.of(OVERLAY_ACTIVITYDETECTOR), + TextureFactory.builder() + .addIcon(OVERLAY_ACTIVITYDETECTOR_GLOW) + .glow() + .build()); GregTech_API.registerCover( - ItemList.Cover_PlayerDetector.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], playerDectectorCoverTexture), - new GT_Cover_PlayerDetector(playerDectectorCoverTexture)); + ItemList.Cover_PlayerDetector.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], playerDectectorCoverTexture), + new GT_Cover_PlayerDetector(playerDectectorCoverTexture)); GregTech_API.registerCover( - ItemList.Cover_FluidStorageMonitor.get(1L), - TextureFactory.of(OVERLAY_FLUID_STORAGE_MONITOR0), - new GT_Cover_FluidStorageMonitor()); + ItemList.Cover_FluidStorageMonitor.get(1L), + TextureFactory.of(OVERLAY_FLUID_STORAGE_MONITOR0), + new GT_Cover_FluidStorageMonitor()); ItemList.Cover_Screen.set( - addItem( - tLastID = 740, - "Computer Monitor Cover", - "Displays Data and GUI", - new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L))); + addItem( + tLastID = 740, + "Computer Monitor Cover", + "Displays Data and GUI", + new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITIO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUX, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L))); ItemList.Cover_Crafting.set( - addItem( - tLastID = 744, - "Crafting Table Cover", - "Better than a wooden Workbench", - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 4L))); + addItem( + tLastID = 744, + "Crafting Table Cover", + "Better than a wooden Workbench", + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 4L))); ItemList.Cover_Drain.set( - addItem( - tLastID = 745, - "Drain Module Cover", - "Absorbs Fluids and collects Rain", - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); + addItem( + tLastID = 745, + "Drain Module Cover", + "Absorbs Fluids and collects Rain", + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); ItemList.Cover_Shutter.set( - addItem( - tLastID = 749, - "Shutter Module Cover", - "Blocks Inventory/Tank Side. Use together with Machine Controller.", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L))); + addItem( + tLastID = 749, + "Shutter Module Cover", + "Blocks Inventory/Tank Side. Use together with Machine Controller.", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L))); GT_ModHandler.addCraftingRecipe( - ItemList.Cover_Screen.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "AGA", "RPB", "ALA", 'A', OrePrefixes.plate.get(Materials.Aluminium), 'L', - OrePrefixes.dust.get(Materials.Glowstone), 'R', Dyes.dyeRed, 'G', Dyes.dyeLime, 'B', - Dyes.dyeBlue, 'P', OrePrefixes.plate.get(Materials.Glass) }); + ItemList.Cover_Screen.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "AGA", "RPB", "ALA", 'A', OrePrefixes.plate.get(Materials.Aluminium), 'L', + OrePrefixes.dust.get(Materials.Glowstone), 'R', Dyes.dyeRed, 'G', Dyes.dyeLime, 'B', Dyes.dyeBlue, 'P', + OrePrefixes.plate.get(Materials.Glass) }); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), - ItemList.Cover_Drain.get(1L), GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Cover_Shutter.get(1L), - 200, - 64); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), + ItemList.Cover_Drain.get(1L), GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Cover_Shutter.get(1L), + 200, + 64); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), - ItemList.Cover_Drain.get(1L), GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Cover_Shutter.get(1L), - 800, - 16); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), + ItemList.Cover_Drain.get(1L), GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Cover_Shutter.get(1L), + 800, + 16); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), - ItemList.Cover_Drain.get(1L), GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Cover_Shutter.get(1L), - 400, - 30); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), + ItemList.Cover_Drain.get(1L), GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Cover_Shutter.get(1L), + 400, + 30); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 2L), - new ItemStack(Blocks.iron_bars, 2), GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Cover_Drain.get(1L), - 200, - 64); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 2L), + new ItemStack(Blocks.iron_bars, 2), GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Cover_Drain.get(1L), + 200, + 64); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 2L), - new ItemStack(Blocks.iron_bars, 2), GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Cover_Drain.get(1L), - 800, - 16); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 2L), + new ItemStack(Blocks.iron_bars, 2), GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Cover_Drain.get(1L), + 800, + 16); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 2L), - new ItemStack(Blocks.iron_bars, 2), GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Cover_Drain.get(1L), - 400, - 30); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 2L), + new ItemStack(Blocks.iron_bars, 2), GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Cover_Drain.get(1L), + 400, + 30); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), - new ItemStack(Blocks.crafting_table, 1), GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Cover_Crafting.get(1L), - 200, - 64); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), + new ItemStack(Blocks.crafting_table, 1), GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Cover_Crafting.get(1L), + 200, + 64); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), - new ItemStack(Blocks.crafting_table, 1), GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Cover_Crafting.get(1L), - 800, - 16); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), + new ItemStack(Blocks.crafting_table, 1), GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Cover_Crafting.get(1L), + 800, + 16); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), - new ItemStack(Blocks.crafting_table, 1), GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Cover_Crafting.get(1L), - 800, - 16); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), + new ItemStack(Blocks.crafting_table, 1), GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Cover_Crafting.get(1L), + 800, + 16); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { ItemList.Cover_Shutter.get(1L), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.FluidFilter.get(1L), - 800, - 4); + new ItemStack[] { ItemList.Cover_Shutter.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1), GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.FluidFilter.get(1L), + 800, + 4); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { ItemList.Cover_Screen.get(1L), ItemList.Cover_FluidDetector.get(1L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Cover_FluidStorageMonitor.get(1L), - 1200, - 128); + new ItemStack[] { ItemList.Cover_Screen.get(1L), ItemList.Cover_FluidDetector.get(1L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Cover_FluidStorageMonitor.get(1L), + 1200, + 128); final ITexture screenCoverTexture = TextureFactory.of( - TextureFactory.of(OVERLAY_SCREEN), - TextureFactory.builder() - .addIcon(OVERLAY_SCREEN_GLOW) - .glow() - .build()); + TextureFactory.of(OVERLAY_SCREEN), + TextureFactory.builder() + .addIcon(OVERLAY_SCREEN_GLOW) + .glow() + .build()); GregTech_API.registerCover( - ItemList.Cover_Screen.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], screenCoverTexture), - new GT_Cover_Screen(screenCoverTexture)); + ItemList.Cover_Screen.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], screenCoverTexture), + new GT_Cover_Screen(screenCoverTexture)); GregTech_API.registerCover( - ItemList.Cover_Crafting.get(1L), - TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_CRAFTING)), - new GT_Cover_Crafting(TextureFactory.of(OVERLAY_CRAFTING))); + ItemList.Cover_Crafting.get(1L), + TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_CRAFTING)), + new GT_Cover_Crafting(TextureFactory.of(OVERLAY_CRAFTING))); GregTech_API.registerCover( - ItemList.Cover_Drain.get(1L), - TextureFactory.of(MACHINE_CASINGS[0][0], TextureFactory.of(OVERLAY_DRAIN)), - new GT_Cover_Drain(TextureFactory.of(OVERLAY_DRAIN))); + ItemList.Cover_Drain.get(1L), + TextureFactory.of(MACHINE_CASINGS[0][0], TextureFactory.of(OVERLAY_DRAIN)), + new GT_Cover_Drain(TextureFactory.of(OVERLAY_DRAIN))); GregTech_API.registerCover( - ItemList.Cover_Shutter.get(1L), - TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_SHUTTER)), - new GT_Cover_Shutter(TextureFactory.of(OVERLAY_SHUTTER))); + ItemList.Cover_Shutter.get(1L), + TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_SHUTTER)), + new GT_Cover_Shutter(TextureFactory.of(OVERLAY_SHUTTER))); ItemList.Cover_SolarPanel.set( - addItem( - tLastID = 750, - "Solar Panel", - "May the Sun be with you (Needs cleaning with right click)", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 1L))); + addItem( + tLastID = 750, + "Solar Panel", + "May the Sun be with you (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 1L))); ItemList.Cover_SolarPanel_8V.set( - addItem( - tLastID = 751, - "Solar Panel (8V)", - "8 Volt Solar Panel (Needs cleaning with right click)", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 2L))); + addItem( + tLastID = 751, + "Solar Panel (8V)", + "8 Volt Solar Panel (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 2L))); ItemList.Cover_SolarPanel_LV.set( - addItem( - tLastID = 752, - "Solar Panel (LV)", - "Low Voltage Solar Panel (Needs cleaning with right click)", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 4L))); + addItem( + tLastID = 752, + "Solar Panel (LV)", + "Low Voltage Solar Panel (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 4L))); ItemList.Cover_SolarPanel_MV.set( - addItem( - tLastID = 753, - "Solar Panel (MV)", - "Medium Voltage Solar Panel (Needs cleaning with right click)", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 8L))); + addItem( + tLastID = 753, + "Solar Panel (MV)", + "Medium Voltage Solar Panel (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 8L))); ItemList.Cover_SolarPanel_HV.set( - addItem( - tLastID = 754, - "Solar Panel (HV)", - "High Voltage Solar Panel (Needs cleaning with right click)", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 16L))); + addItem( + tLastID = 754, + "Solar Panel (HV)", + "High Voltage Solar Panel (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 16L))); ItemList.Cover_SolarPanel_EV.set( - addItem( - tLastID = 755, - "Solar Panel (EV)", - "Extreme Solar Panel (Needs cleaning with right click)", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 32L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 32L))); + addItem( + tLastID = 755, + "Solar Panel (EV)", + "Extreme Solar Panel (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 32L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 32L))); ItemList.Cover_SolarPanel_IV.set( - addItem( - tLastID = 756, - "Solar Panel (IV)", - "Insane Solar Panel (Needs cleaning with right click)", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L))); + addItem( + tLastID = 756, + "Solar Panel (IV)", + "Insane Solar Panel (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L))); ItemList.Cover_SolarPanel_LuV.set( - addItem( - tLastID = 757, - "Solar Panel (LuV)", - "Ludicrous Solar Panel (Needs cleaning with right click)", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L))); + addItem( + tLastID = 757, + "Solar Panel (LuV)", + "Ludicrous Solar Panel (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L))); ItemList.Cover_SolarPanel_ZPM.set( - addItem( - tLastID = 758, - "Solar Panel (ZPM)", - "ZPM Voltage Solar Panel (Needs cleaning with right click)", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L))); + addItem( + tLastID = 758, + "Solar Panel (ZPM)", + "ZPM Voltage Solar Panel (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L))); ItemList.Cover_SolarPanel_UV.set( - addItem( - tLastID = 759, - "Solar Panel (UV)", - "Ultimate Solar Panel (Needs cleaning with right click)", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L))); + addItem( + tLastID = 759, + "Solar Panel (UV)", + "Ultimate Solar Panel (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 64L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 64L))); GregTech_API.registerCover( - ItemList.Cover_SolarPanel.get(1L), - TextureFactory.of(SOLARPANEL), - new GT_Cover_SolarPanel(1)); + ItemList.Cover_SolarPanel.get(1L), + TextureFactory.of(SOLARPANEL), + new GT_Cover_SolarPanel(1)); GregTech_API.registerCover( - ItemList.Cover_SolarPanel_8V.get(1L), - TextureFactory.of(SOLARPANEL_8V), - new GT_Cover_SolarPanel(8)); + ItemList.Cover_SolarPanel_8V.get(1L), + TextureFactory.of(SOLARPANEL_8V), + new GT_Cover_SolarPanel(8)); GregTech_API.registerCover( - ItemList.Cover_SolarPanel_LV.get(1L), - TextureFactory.of(SOLARPANEL_LV), - new GT_Cover_SolarPanel(32)); + ItemList.Cover_SolarPanel_LV.get(1L), + TextureFactory.of(SOLARPANEL_LV), + new GT_Cover_SolarPanel(32)); GregTech_API.registerCover( - ItemList.Cover_SolarPanel_MV.get(1L), - TextureFactory.of(SOLARPANEL_MV), - new GT_Cover_SolarPanel(128)); + ItemList.Cover_SolarPanel_MV.get(1L), + TextureFactory.of(SOLARPANEL_MV), + new GT_Cover_SolarPanel(128)); GregTech_API.registerCover( - ItemList.Cover_SolarPanel_HV.get(1L), - TextureFactory.of(SOLARPANEL_HV), - new GT_Cover_SolarPanel(512)); + ItemList.Cover_SolarPanel_HV.get(1L), + TextureFactory.of(SOLARPANEL_HV), + new GT_Cover_SolarPanel(512)); GregTech_API.registerCover( - ItemList.Cover_SolarPanel_EV.get(1L), - TextureFactory.of(SOLARPANEL_EV), - new GT_Cover_SolarPanel(2048)); + ItemList.Cover_SolarPanel_EV.get(1L), + TextureFactory.of(SOLARPANEL_EV), + new GT_Cover_SolarPanel(2048)); GregTech_API.registerCover( - ItemList.Cover_SolarPanel_IV.get(1L), - TextureFactory.of(SOLARPANEL_IV), - new GT_Cover_SolarPanel(8192)); + ItemList.Cover_SolarPanel_IV.get(1L), + TextureFactory.of(SOLARPANEL_IV), + new GT_Cover_SolarPanel(8192)); GregTech_API.registerCover( - ItemList.Cover_SolarPanel_LuV.get(1L), - TextureFactory.of(SOLARPANEL_LuV), - new GT_Cover_SolarPanel(32768)); + ItemList.Cover_SolarPanel_LuV.get(1L), + TextureFactory.of(SOLARPANEL_LuV), + new GT_Cover_SolarPanel(32768)); GregTech_API.registerCover( - ItemList.Cover_SolarPanel_ZPM.get(1L), - TextureFactory.of(SOLARPANEL_ZPM), - new GT_Cover_SolarPanel(131072)); + ItemList.Cover_SolarPanel_ZPM.get(1L), + TextureFactory.of(SOLARPANEL_ZPM), + new GT_Cover_SolarPanel(131072)); GregTech_API.registerCover( - ItemList.Cover_SolarPanel_UV.get(1L), - TextureFactory.of(SOLARPANEL_UV), - new GT_Cover_SolarPanel(524288)); + ItemList.Cover_SolarPanel_UV.get(1L), + TextureFactory.of(SOLARPANEL_UV), + new GT_Cover_SolarPanel(524288)); ItemList.Tool_Sonictron.set( - addItem( - tLastID = 760, - "Sonictron", - "Bring your Music with you", - Behaviour_Sonictron.INSTANCE, - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 4L))); + addItem( + tLastID = 760, + "Sonictron", + "Bring your Music with you", + Behaviour_Sonictron.INSTANCE, + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 4L))); ItemList.Tool_Cheat.set( - addItem( - tLastID = 761, - "Debug Scanner", - "Also an Infinite Energy Source", - Behaviour_Scanner.INSTANCE, - new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 64L))); + addItem( + tLastID = 761, + "Debug Scanner", + "Also an Infinite Energy Source", + Behaviour_Scanner.INSTANCE, + new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 64L))); setElectricStats(32000 + tLastID, -2000000000L, 1000000000L, -1L, -3L, false); ItemList.Tool_Scanner.set( - addItem( - tLastID = 762, - "Portable Scanner", - "Tricorder", - Behaviour_Scanner.INSTANCE, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 6L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 6L))); + addItem( + tLastID = 762, + "Portable Scanner", + "Tricorder", + Behaviour_Scanner.INSTANCE, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 6L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 6L))); setElectricStats(32000 + tLastID, 400000L, GT_Values.V[2], 2L, -1L, false); GT_ModHandler.addCraftingRecipe( - ItemList.Tool_Scanner.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE - | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "EPR", "CSC", "PBP", 'C', OrePrefixes.circuit.get(Materials.Advanced), 'P', - OrePrefixes.plate.get(Materials.Aluminium), 'E', ItemList.Emitter_MV, 'R', ItemList.Sensor_MV, - 'S', ItemList.Cover_Screen, 'B', ItemList.Battery_RE_MV_Lithium }); + ItemList.Tool_Scanner.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE + | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "EPR", "CSC", "PBP", 'C', OrePrefixes.circuit.get(Materials.Advanced), 'P', + OrePrefixes.plate.get(Materials.Aluminium), 'E', ItemList.Emitter_MV, 'R', ItemList.Sensor_MV, 'S', + ItemList.Cover_Screen, 'B', ItemList.Battery_RE_MV_Lithium }); ItemList.NC_SensorKit.set(addItem(tLastID = 763, "GregTech Sensor Kit", "", new Behaviour_SensorKit())); ItemList.Duct_Tape.set( - addItem( - tLastID = 764, - "BrainTech Aerospace Advanced Reinforced Duct Tape FAL-84", - "If you can't fix it with this, use more of it!", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - OreDictNames.craftingDuctTape)); + addItem( + tLastID = 764, + "BrainTech Aerospace Advanced Reinforced Duct Tape FAL-84", + "If you can't fix it with this, use more of it!", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + OreDictNames.craftingDuctTape)); ItemList.McGuffium_239.set( - addItem( - tLastID = 765, - "Mc Guffium 239", - "42% better than Phlebotnium", - new TC_Aspects.TC_AspectStack(TC_Aspects.ALIENIS, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SPIRITUS, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITIUM, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.RADIO, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MAGNETO, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 8L))); + addItem( + tLastID = 765, + "Mc Guffium 239", + "42% better than Phlebotnium", + new TC_Aspects.TC_AspectStack(TC_Aspects.ALIENIS, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SPIRITUS, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITIUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.RADIO, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MAGNETO, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.STRONTIO, 8L))); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { ItemList.Sensor_LV.get(1L), ItemList.Emitter_LV.get(1L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.NC_SensorKit.get(1L), - 1600, - 2); + new ItemStack[] { ItemList.Sensor_LV.get(1L), ItemList.Emitter_LV.get(1L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.NC_SensorKit.get(1L), + 1600, + 2); ItemList.Cover_RedstoneTransmitterExternal.set( - addItem( - tLastID = 741, - "Redstone Transmitter (External)", - "Transfers Redstone signals wireless", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); + addItem( + tLastID = 741, + "Redstone Transmitter (External)", + "Transfers Redstone signals wireless", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); ItemList.Cover_RedstoneTransmitterInternal.set( - addItem( - tLastID = 742, - "Redstone Transmitter (Internal)", - "Transfers Redstone signals wireless", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); + addItem( + tLastID = 742, + "Redstone Transmitter (Internal)", + "Transfers Redstone signals wireless", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); ItemList.Cover_RedstoneReceiverExternal.set( - addItem( - tLastID = 746, - "Redstone Receiver (External)", - "Transfers Redstone signals wireless", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); + addItem( + tLastID = 746, + "Redstone Receiver (External)", + "Transfers Redstone signals wireless", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); ItemList.Cover_RedstoneReceiverInternal.set( - addItem( - tLastID = 747, - "Redstone Receiver (Internal)", - "Transfers Redstone signals wireless", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); + addItem( + tLastID = 747, + "Redstone Receiver (Internal)", + "Transfers Redstone signals wireless", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); GregTech_API.registerCover( - ItemList.Cover_RedstoneTransmitterExternal.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_REDSTONE_TRANSMITTER)), - new GT_Cover_RedstoneTransmitterExternal(TextureFactory.of(OVERLAY_REDSTONE_TRANSMITTER))); + ItemList.Cover_RedstoneTransmitterExternal.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_REDSTONE_TRANSMITTER)), + new GT_Cover_RedstoneTransmitterExternal(TextureFactory.of(OVERLAY_REDSTONE_TRANSMITTER))); GregTech_API.registerCover( - ItemList.Cover_RedstoneTransmitterInternal.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_REDSTONE_TRANSMITTER)), - new GT_Cover_RedstoneTransmitterInternal(TextureFactory.of(OVERLAY_REDSTONE_TRANSMITTER))); + ItemList.Cover_RedstoneTransmitterInternal.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_REDSTONE_TRANSMITTER)), + new GT_Cover_RedstoneTransmitterInternal(TextureFactory.of(OVERLAY_REDSTONE_TRANSMITTER))); GregTech_API.registerCover( - ItemList.Cover_RedstoneReceiverExternal.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_REDSTONE_RECEIVER)), - new GT_Cover_RedstoneReceiverExternal(TextureFactory.of(OVERLAY_REDSTONE_RECEIVER))); + ItemList.Cover_RedstoneReceiverExternal.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_REDSTONE_RECEIVER)), + new GT_Cover_RedstoneReceiverExternal(TextureFactory.of(OVERLAY_REDSTONE_RECEIVER))); GregTech_API.registerCover( - ItemList.Cover_RedstoneReceiverInternal.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_REDSTONE_RECEIVER)), - new GT_Cover_RedstoneReceiverInternal(TextureFactory.of(OVERLAY_REDSTONE_RECEIVER))); + ItemList.Cover_RedstoneReceiverInternal.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_REDSTONE_RECEIVER)), + new GT_Cover_RedstoneReceiverInternal(TextureFactory.of(OVERLAY_REDSTONE_RECEIVER))); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { ItemList.Emitter_EV.get(1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 1L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Cover_RedstoneTransmitterExternal.get(1L), - 3200, - 128); + new ItemStack[] { ItemList.Emitter_EV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 1L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Cover_RedstoneTransmitterExternal.get(1L), + 3200, + 128); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { ItemList.Sensor_EV.get(1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 1L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Cover_RedstoneReceiverExternal.get(1L), - 3200, - 128); + new ItemStack[] { ItemList.Sensor_EV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 1L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Cover_RedstoneReceiverExternal.get(1L), + 3200, + 128); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Cover_RedstoneTransmitterInternal.get(1L), - new Object[] { ItemList.Cover_RedstoneTransmitterExternal.get(1L) }); + ItemList.Cover_RedstoneTransmitterInternal.get(1L), + new Object[] { ItemList.Cover_RedstoneTransmitterExternal.get(1L) }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Cover_RedstoneReceiverInternal.get(1L), - new Object[] { ItemList.Cover_RedstoneReceiverExternal.get(1L) }); + ItemList.Cover_RedstoneReceiverInternal.get(1L), + new Object[] { ItemList.Cover_RedstoneReceiverExternal.get(1L) }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Cover_RedstoneTransmitterExternal.get(1L), - new Object[] { ItemList.Cover_RedstoneTransmitterInternal.get(1L) }); + ItemList.Cover_RedstoneTransmitterExternal.get(1L), + new Object[] { ItemList.Cover_RedstoneTransmitterInternal.get(1L) }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Cover_RedstoneReceiverExternal.get(1L), - new Object[] { ItemList.Cover_RedstoneReceiverInternal.get(1L) }); + ItemList.Cover_RedstoneReceiverExternal.get(1L), + new Object[] { ItemList.Cover_RedstoneReceiverInternal.get(1L) }); ItemList.Cover_NeedsMaintainance.set( - addItem( - tLastID = 748, - "Needs Maintenance Cover", - "Attach to Multiblock Controller. Emits Redstone Signal if needs Maintenance", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); + addItem( + tLastID = 748, + "Needs Maintenance Cover", + "Attach to Multiblock Controller. Emits Redstone Signal if needs Maintenance", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L))); GregTech_API.registerCover( - ItemList.Cover_NeedsMaintainance.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_MAINTENANCE_DETECTOR)), - new GT_Cover_NeedMaintainance(TextureFactory.of(OVERLAY_MAINTENANCE_DETECTOR))); + ItemList.Cover_NeedsMaintainance.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_MAINTENANCE_DETECTOR)), + new GT_Cover_NeedMaintainance(TextureFactory.of(OVERLAY_MAINTENANCE_DETECTOR))); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { ItemList.Emitter_MV.get(1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Cover_NeedsMaintainance.get(1L), - 600, - 24); + new ItemStack[] { ItemList.Emitter_MV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Cover_NeedsMaintainance.get(1L), + 600, + 24); GT_ModHandler.addCraftingRecipe( - ItemList.ItemFilter_Export.get(1L), - new Object[] { "SPS", "dIC", "SPS", 'P', OrePrefixes.plate.get(Materials.Tin), 'S', - OrePrefixes.screw.get(Materials.Iron), 'I', ItemList.Component_Filter, 'C', - ItemList.Conveyor_Module_LV }); + ItemList.ItemFilter_Export.get(1L), + new Object[] { "SPS", "dIC", "SPS", 'P', OrePrefixes.plate.get(Materials.Tin), 'S', + OrePrefixes.screw.get(Materials.Iron), 'I', ItemList.Component_Filter, 'C', + ItemList.Conveyor_Module_LV }); GT_ModHandler.addCraftingRecipe( - ItemList.ItemFilter_Import.get(1L), - new Object[] { "SPS", "CId", "SPS", 'P', OrePrefixes.plate.get(Materials.Tin), 'S', - OrePrefixes.screw.get(Materials.Iron), 'I', ItemList.Component_Filter, 'C', - ItemList.Conveyor_Module_LV }); + ItemList.ItemFilter_Import.get(1L), + new Object[] { "SPS", "CId", "SPS", 'P', OrePrefixes.plate.get(Materials.Tin), 'S', + OrePrefixes.screw.get(Materials.Iron), 'I', ItemList.Component_Filter, 'C', + ItemList.Conveyor_Module_LV }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.ItemFilter_Export.get(1L), - new Object[] { ItemList.ItemFilter_Import.get(1L) }); + ItemList.ItemFilter_Export.get(1L), + new Object[] { ItemList.ItemFilter_Import.get(1L) }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.ItemFilter_Import.get(1L), - new Object[] { ItemList.ItemFilter_Export.get(1L) }); + ItemList.ItemFilter_Import.get(1L), + new Object[] { ItemList.ItemFilter_Export.get(1L) }); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Tin, 2L), - ItemList.Component_Filter.get(1L), ItemList.Conveyor_Module_LV.get(1L), - GT_Utility.getIntegratedCircuit(1) }, - null, - ItemList.ItemFilter_Export.get(1L), - 100, - 30); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Tin, 2L), + ItemList.Component_Filter.get(1L), ItemList.Conveyor_Module_LV.get(1L), + GT_Utility.getIntegratedCircuit(1) }, + null, + ItemList.ItemFilter_Export.get(1L), + 100, + 30); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Tin, 2L), - ItemList.Component_Filter.get(1L), ItemList.Conveyor_Module_LV.get(1L), - GT_Utility.getIntegratedCircuit(2) }, - null, - ItemList.ItemFilter_Import.get(1L), - 100, - 30); + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Tin, 2L), + ItemList.Component_Filter.get(1L), ItemList.Conveyor_Module_LV.get(1L), + GT_Utility.getIntegratedCircuit(2) }, + null, + ItemList.ItemFilter_Import.get(1L), + 100, + 30); GT_ModHandler.addCraftingRecipe( - ItemList.Tool_Cover_Copy_Paste.get(1L), - GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "PSP", "PCP", "PBP", 'P', OrePrefixes.plate.get(Materials.Aluminium), 'S', - ItemList.Tool_DataStick.get(1L), 'C', ItemList.Cover_Screen.get(1L), 'B', - ItemList.Battery_RE_MV_Lithium.get(1L) }); + ItemList.Tool_Cover_Copy_Paste.get(1L), + GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "PSP", "PCP", "PBP", 'P', OrePrefixes.plate.get(Materials.Aluminium), 'S', + ItemList.Tool_DataStick.get(1L), 'C', ItemList.Cover_Screen.get(1L), 'B', + ItemList.Battery_RE_MV_Lithium.get(1L) }); ItemList.Steam_Regulator_LV.set( - addItem( - tLastID = 332, - "Steam Regulator (LV)", - GT_Utility.formatNumbers(1024) + PartCoverText - + GT_Utility.formatNumbers(1024 * 20) - + PartCoverText2, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))); + addItem( + tLastID = 332, + "Steam Regulator (LV)", + GT_Utility.formatNumbers(1024) + PartCoverText + GT_Utility.formatNumbers(1024 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))); ItemList.Steam_Regulator_MV.set( - addItem( - tLastID = 333, - "Steam Regulator (MV)", - GT_Utility.formatNumbers(2048) + PartCoverText - + GT_Utility.formatNumbers(2048 * 20) - + PartCoverText2, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); + addItem( + tLastID = 333, + "Steam Regulator (MV)", + GT_Utility.formatNumbers(2048) + PartCoverText + GT_Utility.formatNumbers(2048 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); ItemList.Steam_Regulator_HV.set( - addItem( - tLastID = 334, - "Steam Regulator (HV)", - GT_Utility.formatNumbers(4096) + PartCoverText - + GT_Utility.formatNumbers(4096 * 20) - + PartCoverText2, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L))); + addItem( + tLastID = 334, + "Steam Regulator (HV)", + GT_Utility.formatNumbers(4096) + PartCoverText + GT_Utility.formatNumbers(4096 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L))); ItemList.Steam_Regulator_EV.set( - addItem( - tLastID = 335, - "Steam Regulator (EV)", - GT_Utility.formatNumbers(8192) + PartCoverText - + GT_Utility.formatNumbers(8192 * 20) - + PartCoverText2, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 8L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L))); + addItem( + tLastID = 335, + "Steam Regulator (EV)", + GT_Utility.formatNumbers(8192) + PartCoverText + GT_Utility.formatNumbers(8192 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 8L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L))); ItemList.Steam_Regulator_IV.set( - addItem( - tLastID = 336, - "Steam Regulator (IV)", - GT_Utility.formatNumbers(16384) + PartCoverText - + GT_Utility.formatNumbers(16384 * 20) - + PartCoverText2, - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 16L))); + addItem( + tLastID = 336, + "Steam Regulator (IV)", + GT_Utility.formatNumbers(16384) + PartCoverText + GT_Utility.formatNumbers(16384 * 20) + PartCoverText2, + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 16L))); GregTech_API.registerCover( - ItemList.Steam_Regulator_LV.get(1L), - TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_VALVE)), - new GT_Cover_SteamRegulator(1024, TextureFactory.of(OVERLAY_VALVE))); + ItemList.Steam_Regulator_LV.get(1L), + TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_VALVE)), + new GT_Cover_SteamRegulator(1024, TextureFactory.of(OVERLAY_VALVE))); GregTech_API.registerCover( - ItemList.Steam_Regulator_MV.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_VALVE)), - new GT_Cover_SteamRegulator(2048, TextureFactory.of(OVERLAY_VALVE))); + ItemList.Steam_Regulator_MV.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_VALVE)), + new GT_Cover_SteamRegulator(2048, TextureFactory.of(OVERLAY_VALVE))); GregTech_API.registerCover( - ItemList.Steam_Regulator_HV.get(1L), - TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_VALVE)), - new GT_Cover_SteamRegulator(4096, TextureFactory.of(OVERLAY_VALVE))); + ItemList.Steam_Regulator_HV.get(1L), + TextureFactory.of(MACHINE_CASINGS[3][0], TextureFactory.of(OVERLAY_VALVE)), + new GT_Cover_SteamRegulator(4096, TextureFactory.of(OVERLAY_VALVE))); GregTech_API.registerCover( - ItemList.Steam_Regulator_EV.get(1L), - TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_VALVE)), - new GT_Cover_SteamRegulator(8192, TextureFactory.of(OVERLAY_VALVE))); + ItemList.Steam_Regulator_EV.get(1L), + TextureFactory.of(MACHINE_CASINGS[4][0], TextureFactory.of(OVERLAY_VALVE)), + new GT_Cover_SteamRegulator(8192, TextureFactory.of(OVERLAY_VALVE))); GregTech_API.registerCover( - ItemList.Steam_Regulator_IV.get(1L), - TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_VALVE)), - new GT_Cover_SteamRegulator(16384, TextureFactory.of(OVERLAY_VALVE))); + ItemList.Steam_Regulator_IV.get(1L), + TextureFactory.of(MACHINE_CASINGS[5][0], TextureFactory.of(OVERLAY_VALVE)), + new GT_Cover_SteamRegulator(16384, TextureFactory.of(OVERLAY_VALVE))); } @@ -4388,7 +4322,7 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { @Override public boolean onEntityItemUpdate(EntityItem aItemEntity) { int aDamage = aItemEntity.getEntityItem() - .getItemDamage(); + .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)) { @@ -4404,10 +4338,8 @@ 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; } @@ -4416,10 +4348,8 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) { aItemEntity.setEntityItemStack( - GT_OreDictUnificator.get( - OrePrefixes.crushedPurified, - aMaterial, - aItemEntity.getEntityItem().stackSize)); + GT_OreDictUnificator + .get(OrePrefixes.crushedPurified, aMaterial, aItemEntity.getEntityItem().stackSize)); aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3); return true; } @@ -4458,11 +4388,10 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { 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 + .isFluidEqual(aMaterial.getPlasma(1L))) return true; // Fusion recipe + // output matches + // current plasma + // cell fluid } } } @@ -4472,15 +4401,15 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { @Override public boolean doesShowInCreative(OrePrefixes aPrefix, Materials aMaterial, boolean aDoShowAllItems) { return (aDoShowAllItems) || (((aPrefix != OrePrefixes.gem) || (!aMaterial.mName.startsWith("Infused"))) - && (aPrefix != OrePrefixes.dustTiny) - && (aPrefix != OrePrefixes.dustSmall) - && (aPrefix != OrePrefixes.dustImpure) - && (aPrefix != OrePrefixes.dustPure) - && (aPrefix != OrePrefixes.crushed) - && (aPrefix != OrePrefixes.crushedPurified) - && (aPrefix != OrePrefixes.crushedCentrifuged) - && (aPrefix != OrePrefixes.ingotHot) - && !(aPrefix == OrePrefixes.cellPlasma && !isPlasmaCellUsed(aPrefix, aMaterial))); + && (aPrefix != OrePrefixes.dustTiny) + && (aPrefix != OrePrefixes.dustSmall) + && (aPrefix != OrePrefixes.dustImpure) + && (aPrefix != OrePrefixes.dustPure) + && (aPrefix != OrePrefixes.crushed) + && (aPrefix != OrePrefixes.crushedPurified) + && (aPrefix != OrePrefixes.crushedCentrifuged) + && (aPrefix != OrePrefixes.ingotHot) + && !(aPrefix == OrePrefixes.cellPlasma && !isPlasmaCellUsed(aPrefix, aMaterial))); } @Override 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 164a5c4ca4..2fb25828a7 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 @@ -50,1917 +50,1861 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { public GT_MetaGenerated_Item_02() { super( - "metaitem.02", - OrePrefixes.toolHeadSword, - OrePrefixes.toolHeadPickaxe, - OrePrefixes.toolHeadShovel, - OrePrefixes.toolHeadAxe, - OrePrefixes.toolHeadHoe, - OrePrefixes.toolHeadHammer, - OrePrefixes.toolHeadFile, - OrePrefixes.toolHeadSaw, - OrePrefixes.toolHeadDrill, - OrePrefixes.toolHeadChainsaw, - OrePrefixes.toolHeadWrench, - OrePrefixes.toolHeadUniversalSpade, - OrePrefixes.toolHeadSense, - OrePrefixes.toolHeadPlow, - OrePrefixes.toolHeadArrow, - OrePrefixes.toolHeadBuzzSaw, - OrePrefixes.turbineBlade, - null, - OrePrefixes.itemCasing, - OrePrefixes.wireFine, - OrePrefixes.gearGtSmall, - OrePrefixes.rotor, - OrePrefixes.stickLong, - OrePrefixes.springSmall, - OrePrefixes.spring, - OrePrefixes.arrowGtWood, - OrePrefixes.arrowGtPlastic, - OrePrefixes.gemChipped, - OrePrefixes.gemFlawed, - OrePrefixes.gemFlawless, - OrePrefixes.gemExquisite, - OrePrefixes.gearGt); + "metaitem.02", + OrePrefixes.toolHeadSword, + OrePrefixes.toolHeadPickaxe, + OrePrefixes.toolHeadShovel, + OrePrefixes.toolHeadAxe, + OrePrefixes.toolHeadHoe, + OrePrefixes.toolHeadHammer, + OrePrefixes.toolHeadFile, + OrePrefixes.toolHeadSaw, + OrePrefixes.toolHeadDrill, + OrePrefixes.toolHeadChainsaw, + OrePrefixes.toolHeadWrench, + OrePrefixes.toolHeadUniversalSpade, + OrePrefixes.toolHeadSense, + OrePrefixes.toolHeadPlow, + OrePrefixes.toolHeadArrow, + OrePrefixes.toolHeadBuzzSaw, + OrePrefixes.turbineBlade, + null, + OrePrefixes.itemCasing, + OrePrefixes.wireFine, + OrePrefixes.gearGtSmall, + OrePrefixes.rotor, + OrePrefixes.stickLong, + OrePrefixes.springSmall, + OrePrefixes.spring, + OrePrefixes.arrowGtWood, + OrePrefixes.arrowGtPlastic, + OrePrefixes.gemChipped, + OrePrefixes.gemFlawed, + OrePrefixes.gemFlawless, + OrePrefixes.gemExquisite, + OrePrefixes.gearGt); INSTANCE = this; int tLastID = 0; ItemList.ThermosCan_Dark_Coffee.set( - addItem( - tLastID = 0, - "Dark Coffee", - "Coffee, dark, without anything else", - new GT_FoodStat( - 2, - 0.2F, - EnumAction.drink, - ItemList.ThermosCan_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.moveSpeed.id, - 400, - 1, - 70, - Potion.digSpeed.id, - 400, - 1, - 70), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L))); + addItem( + tLastID = 0, + "Dark Coffee", + "Coffee, dark, without anything else", + new GT_FoodStat( + 2, + 0.2F, + EnumAction.drink, + ItemList.ThermosCan_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.moveSpeed.id, + 400, + 1, + 70, + Potion.digSpeed.id, + 400, + 1, + 70), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L))); ItemList.ThermosCan_Dark_Cafe_au_lait.set( - addItem( - tLastID = 1, - "Dark Coffee au lait", - "Keeping you awake the whole night", - SubTag.INVISIBLE, - new GT_FoodStat( - 2, - 0.2F, - EnumAction.drink, - ItemList.ThermosCan_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.moveSpeed.id, - 400, - 2, - 90, - Potion.digSpeed.id, - 400, - 2, - 90), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 3L))); + addItem( + tLastID = 1, + "Dark Coffee au lait", + "Keeping you awake the whole night", + SubTag.INVISIBLE, + new GT_FoodStat( + 2, + 0.2F, + EnumAction.drink, + ItemList.ThermosCan_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.moveSpeed.id, + 400, + 2, + 90, + Potion.digSpeed.id, + 400, + 2, + 90), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 3L))); ItemList.ThermosCan_Coffee.set( - addItem( - tLastID = 2, - "Coffee", - "Just the regular morning Coffee", - new GT_FoodStat( - 3, - 0.4F, - EnumAction.drink, - ItemList.ThermosCan_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.moveSpeed.id, - 400, - 0, - 50, - Potion.digSpeed.id, - 400, - 0, - 50), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); + addItem( + tLastID = 2, + "Coffee", + "Just the regular morning Coffee", + new GT_FoodStat( + 3, + 0.4F, + EnumAction.drink, + ItemList.ThermosCan_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.moveSpeed.id, + 400, + 0, + 50, + Potion.digSpeed.id, + 400, + 0, + 50), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L))); ItemList.ThermosCan_Cafe_au_lait.set( - addItem( - tLastID = 3, - "Cafe au lait", - "Sweet Coffee", - new GT_FoodStat( - 3, - 0.4F, - EnumAction.drink, - ItemList.ThermosCan_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.moveSpeed.id, - 400, - 1, - 70, - Potion.digSpeed.id, - 400, - 1, - 70), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L))); + addItem( + tLastID = 3, + "Cafe au lait", + "Sweet Coffee", + new GT_FoodStat( + 3, + 0.4F, + EnumAction.drink, + ItemList.ThermosCan_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.moveSpeed.id, + 400, + 1, + 70, + Potion.digSpeed.id, + 400, + 1, + 70), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L))); ItemList.ThermosCan_Lait_au_cafe.set( - addItem( - tLastID = 4, - "Lait au cafe", - "You want Coffee to your Sugar?", - SubTag.INVISIBLE, - new GT_FoodStat( - 3, - 0.4F, - EnumAction.drink, - ItemList.ThermosCan_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.moveSpeed.id, - 400, - 2, - 90, - Potion.digSpeed.id, - 400, - 2, - 90), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 3L))); + addItem( + tLastID = 4, + "Lait au cafe", + "You want Coffee to your Sugar?", + SubTag.INVISIBLE, + new GT_FoodStat( + 3, + 0.4F, + EnumAction.drink, + ItemList.ThermosCan_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.moveSpeed.id, + 400, + 2, + 90, + Potion.digSpeed.id, + 400, + 2, + 90), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 3L))); ItemList.ThermosCan_Dark_Chocolate_Milk.set( - addItem( - tLastID = 5, - "Dark Chocolate Milk", - "A bit bitter, better add a bit Sugar", - new GT_FoodStat( - 3, - 0.4F, - EnumAction.drink, - ItemList.ThermosCan_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.regeneration.id, - 50, - 1, - 60), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); + addItem( + tLastID = 5, + "Dark Chocolate Milk", + "A bit bitter, better add a bit Sugar", + new GT_FoodStat( + 3, + 0.4F, + EnumAction.drink, + ItemList.ThermosCan_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.regeneration.id, + 50, + 1, + 60), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); ItemList.ThermosCan_Chocolate_Milk.set( - addItem( - tLastID = 6, - "Chocolate Milk", - "Sweet Goodness", - new GT_FoodStat( - 3, - 0.4F, - EnumAction.drink, - ItemList.ThermosCan_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.regeneration.id, - 50, - 1, - 90), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 2L))); + addItem( + tLastID = 6, + "Chocolate Milk", + "Sweet Goodness", + new GT_FoodStat( + 3, + 0.4F, + EnumAction.drink, + ItemList.ThermosCan_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.regeneration.id, + 50, + 1, + 90), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 2L))); ItemList.ThermosCan_Tea.set( - addItem( - tLastID = 7, - "Tea", - "Keep calm and carry on", - new GT_FoodStat( - 2, - 0.2F, - EnumAction.drink, - ItemList.ThermosCan_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.moveSlowdown.id, - 300, - 0, - 50), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); + addItem( + tLastID = 7, + "Tea", + "Keep calm and carry on", + new GT_FoodStat( + 2, + 0.2F, + EnumAction.drink, + ItemList.ThermosCan_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.moveSlowdown.id, + 300, + 0, + 50), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); ItemList.ThermosCan_Sweet_Tea.set( - addItem( - tLastID = 8, - "Sweet Tea", - "How about a Tea Party? In Boston?", - SubTag.INVISIBLE, - new GT_FoodStat( - 2, - 0.2F, - EnumAction.drink, - ItemList.ThermosCan_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); + addItem( + tLastID = 8, + "Sweet Tea", + "How about a Tea Party? In Boston?", + SubTag.INVISIBLE, + new GT_FoodStat( + 2, + 0.2F, + EnumAction.drink, + ItemList.ThermosCan_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); ItemList.ThermosCan_Ice_Tea.set( - addItem( - tLastID = 9, - "Ice Tea", - "Better than this purple Junk Drink from failed Potions", - new GT_FoodStat( - 2, - 0.2F, - EnumAction.drink, - ItemList.ThermosCan_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.moveSlowdown.id, - 300, - 0, - 50), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); + addItem( + tLastID = 9, + "Ice Tea", + "Better than this purple Junk Drink from failed Potions", + new GT_FoodStat( + 2, + 0.2F, + EnumAction.drink, + ItemList.ThermosCan_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.moveSlowdown.id, + 300, + 0, + 50), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L))); ItemList.GelledToluene.set(addItem(tLastID = 10, "Gelled Toluene", "Raw Explosive")); ItemList.Bottle_Purple_Drink.set( - addItem( - tLastID = 100, - "Purple Drink", - "How about Lemonade. Or some Ice Tea? I got Purple Drink!", - new GT_FoodStat( - 8, - 0.2F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.moveSlowdown.id, - 400, - 1, - 90), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VINCULUM, 1L))); + addItem( + tLastID = 100, + "Purple Drink", + "How about Lemonade. Or some Ice Tea? I got Purple Drink!", + new GT_FoodStat( + 8, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.moveSlowdown.id, + 400, + 1, + 90), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VINCULUM, 1L))); ItemList.Bottle_Grape_Juice.set( - addItem( - tLastID = 101, - "Grape Juice", - "This has a cleaning effect on your internals.", - new GT_FoodStat( - 4, - 0.2F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.hunger.id, - 400, - 1, - 60), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); + addItem( + tLastID = 101, + "Grape Juice", + "This has a cleaning effect on your internals.", + new GT_FoodStat( + 4, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.hunger.id, + 400, + 1, + 60), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); ItemList.Bottle_Wine.set( - addItem( - tLastID = 102, - "Wine", - "Ordinary", - new GT_FoodStat( - 2, - 0.2F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.confusion.id, - 400, - 1, - 60, - Potion.heal.id, - 0, - 0, - 60, - Potion.poison.id, - 200, - 1, - 5), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); + addItem( + tLastID = 102, + "Wine", + "Ordinary", + new GT_FoodStat( + 2, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 400, + 1, + 60, + Potion.heal.id, + 0, + 0, + 60, + Potion.poison.id, + 200, + 1, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); ItemList.Bottle_Vinegar.set( - addItem( - tLastID = 103, - "Vinegar", - "Exquisite", - new GT_FoodStat( - 2, - 0.2F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.confusion.id, - 400, - 1, - 90, - Potion.heal.id, - 0, - 1, - 90, - Potion.poison.id, - 200, - 2, - 10, - Potion.harm.id, - 0, - 2, - 5), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); + addItem( + tLastID = 103, + "Vinegar", + "Exquisite", + new GT_FoodStat( + 2, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 400, + 1, + 90, + Potion.heal.id, + 0, + 1, + 90, + Potion.poison.id, + 200, + 2, + 10, + Potion.harm.id, + 0, + 2, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); ItemList.Bottle_Potato_Juice.set( - addItem( - tLastID = 104, - "Potato Juice", - "Ever seen Potato Juice in stores? No? That has a reason.", - SubTag.INVISIBLE, - new GT_FoodStat( - 3, - 0.3F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L))); + addItem( + tLastID = 104, + "Potato Juice", + "Ever seen Potato Juice in stores? No? That has a reason.", + SubTag.INVISIBLE, + new GT_FoodStat( + 3, + 0.3F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L))); ItemList.Bottle_Vodka.set( - addItem( - tLastID = 105, - "Vodka", - "Not to confuse with Water", - new GT_FoodStat( - 2, - 0.2F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.confusion.id, - 500, - 0, - 60, - Potion.damageBoost.id, - 500, - 1, - 60, - Potion.poison.id, - 200, - 1, - 5), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L))); + addItem( + tLastID = 105, + "Vodka", + "Not to confuse with Water", + new GT_FoodStat( + 2, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 500, + 0, + 60, + Potion.damageBoost.id, + 500, + 1, + 60, + Potion.poison.id, + 200, + 1, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L))); ItemList.Bottle_Leninade.set( - addItem( - tLastID = 106, - "Leninade", - "Let the Communism flow through you!", - SubTag.INVISIBLE, - new GT_FoodStat( - 2, - 0.2F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.confusion.id, - 500, - 1, - 90, - Potion.damageBoost.id, - 500, - 2, - 90, - Potion.poison.id, - 200, - 2, - 10, - Potion.harm.id, - 0, - 2, - 5), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 2L))); + addItem( + tLastID = 106, + "Leninade", + "Let the Communism flow through you!", + SubTag.INVISIBLE, + new GT_FoodStat( + 2, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 500, + 1, + 90, + Potion.damageBoost.id, + 500, + 2, + 90, + Potion.poison.id, + 200, + 2, + 10, + Potion.harm.id, + 0, + 2, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 2L))); ItemList.Bottle_Mineral_Water.set( - addItem( - tLastID = 107, - "Mineral Water", - "The best Stuff you can drink to stay healthy", - new GT_FoodStat( - 1, - 0.1F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.regeneration.id, - 100, - 1, - 10), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); + addItem( + tLastID = 107, + "Mineral Water", + "The best Stuff you can drink to stay healthy", + new GT_FoodStat( + 1, + 0.1F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.regeneration.id, + 100, + 1, + 10), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); ItemList.Bottle_Salty_Water.set( - addItem( - tLastID = 108, - "Salty Water", - "Like Sea Water but less dirty", - SubTag.INVISIBLE, - new GT_FoodStat( - 1, - 0.0F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.hunger.id, - 400, - 2, - 95), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TEMPESTAS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + addItem( + tLastID = 108, + "Salty Water", + "Like Sea Water but less dirty", + SubTag.INVISIBLE, + new GT_FoodStat( + 1, + 0.0F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.hunger.id, + 400, + 2, + 95), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TEMPESTAS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); ItemList.Bottle_Reed_Water.set( - addItem( - tLastID = 109, - "Reed Water", - "I guess this tastes better when fermented", - new GT_FoodStat( - 1, - 0.1F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); + addItem( + tLastID = 109, + "Reed Water", + "I guess this tastes better when fermented", + new GT_FoodStat( + 1, + 0.1F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); ItemList.Bottle_Rum.set( - addItem( - tLastID = 110, - "Rum", - "A buddle o' rum", - new GT_FoodStat( - 4, - 0.4F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.confusion.id, - 300, - 0, - 60, - Potion.damageBoost.id, - 300, - 1, - 60, - Potion.poison.id, - 200, - 1, - 5), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); + addItem( + tLastID = 110, + "Rum", + "A buddle o' rum", + new GT_FoodStat( + 4, + 0.4F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 300, + 0, + 60, + Potion.damageBoost.id, + 300, + 1, + 60, + Potion.poison.id, + 200, + 1, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); ItemList.Bottle_Pirate_Brew.set( - addItem( - tLastID = 111, - "Pirate Brew", - "Set the Sails, we are going to Torrentuga!", - new GT_FoodStat( - 4, - 0.4F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.confusion.id, - 300, - 1, - 90, - Potion.damageBoost.id, - 300, - 2, - 90, - Potion.poison.id, - 200, - 2, - 10, - Potion.harm.id, - 0, - 2, - 5), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 2L))); + addItem( + tLastID = 111, + "Pirate Brew", + "Set the Sails, we are going to Torrentuga!", + new GT_FoodStat( + 4, + 0.4F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 300, + 1, + 90, + Potion.damageBoost.id, + 300, + 2, + 90, + Potion.poison.id, + 200, + 2, + 10, + Potion.harm.id, + 0, + 2, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 2L))); ItemList.Bottle_Hops_Juice.set( - addItem( - tLastID = 112, - "Hops Juice", - "Every Beer has a start", - new GT_FoodStat( - 1, - 0.1F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L))); + addItem( + tLastID = 112, + "Hops Juice", + "Every Beer has a start", + new GT_FoodStat( + 1, + 0.1F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L))); ItemList.Bottle_Dark_Beer.set( - addItem( - tLastID = 113, - "Dark Beer", - "Dark Beer, for the real Men", - new GT_FoodStat( - 4, - 0.4F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.confusion.id, - 300, - 1, - 60, - Potion.damageBoost.id, - 300, - 1, - 60, - Potion.poison.id, - 200, - 1, - 5), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); + addItem( + tLastID = 113, + "Dark Beer", + "Dark Beer, for the real Men", + new GT_FoodStat( + 4, + 0.4F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 300, + 1, + 60, + Potion.damageBoost.id, + 300, + 1, + 60, + Potion.poison.id, + 200, + 1, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); ItemList.Bottle_Dragon_Blood.set( - addItem( - tLastID = 114, - "Dragon Blood", - "FUS RO DAH!", - new GT_FoodStat( - 4, - 0.4F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.confusion.id, - 300, - 2, - 90, - Potion.damageBoost.id, - 300, - 2, - 90, - Potion.poison.id, - 200, - 2, - 10, - Potion.harm.id, - 0, - 2, - 5), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); + addItem( + tLastID = 114, + "Dragon Blood", + "FUS RO DAH!", + new GT_FoodStat( + 4, + 0.4F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 300, + 2, + 90, + Potion.damageBoost.id, + 300, + 2, + 90, + Potion.poison.id, + 200, + 2, + 10, + Potion.harm.id, + 0, + 2, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L))); ItemList.Bottle_Wheaty_Juice.set( - addItem( - tLastID = 115, - "Wheaty Juice", - "Is this liquefied Bread or what?", - new GT_FoodStat( - 2, - 0.1F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L))); + addItem( + tLastID = 115, + "Wheaty Juice", + "Is this liquefied Bread or what?", + new GT_FoodStat( + 2, + 0.1F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L))); ItemList.Bottle_Scotch.set( - addItem( - tLastID = 116, - "Scotch", - "Technically this is just a Whisky", - SubTag.INVISIBLE, - new GT_FoodStat( - 2, - 0.1F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.confusion.id, - 400, - 0, - 60, - Potion.resistance.id, - 400, - 1, - 60, - Potion.poison.id, - 200, - 1, - 5), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 1L))); + addItem( + tLastID = 116, + "Scotch", + "Technically this is just a Whisky", + SubTag.INVISIBLE, + new GT_FoodStat( + 2, + 0.1F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 400, + 0, + 60, + Potion.resistance.id, + 400, + 1, + 60, + Potion.poison.id, + 200, + 1, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 1L))); ItemList.Bottle_Glen_McKenner.set( - addItem( - tLastID = 117, - "Glen McKenner", - "Don't hand to easily surprised people, they will shatter it.", - SubTag.INVISIBLE, - new GT_FoodStat( - 2, - 0.1F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.confusion.id, - 400, - 1, - 90, - Potion.resistance.id, - 400, - 2, - 90, - Potion.poison.id, - 200, - 2, - 10, - Potion.harm.id, - 0, - 2, - 5), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 2L))); + addItem( + tLastID = 117, + "Glen McKenner", + "Don't hand to easily surprised people, they will shatter it.", + SubTag.INVISIBLE, + new GT_FoodStat( + 2, + 0.1F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 400, + 1, + 90, + Potion.resistance.id, + 400, + 2, + 90, + Potion.poison.id, + 200, + 2, + 10, + Potion.harm.id, + 0, + 2, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 2L))); ItemList.Bottle_Wheaty_Hops_Juice.set( - addItem( - tLastID = 118, - "Wheaty Hops Juice", - "Also known as 'Duff-Lite'", - new GT_FoodStat( - 1, - 0.1F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 2L))); + addItem( + tLastID = 118, + "Wheaty Hops Juice", + "Also known as 'Duff-Lite'", + new GT_FoodStat( + 1, + 0.1F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 2L))); ItemList.Bottle_Beer.set( - addItem( - tLastID = 119, - "Beer", - "Good old Beer", - new GT_FoodStat( - 6, - 0.4F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.confusion.id, - 400, - 0, - 60, - Potion.digSpeed.id, - 400, - 2, - 60, - Potion.poison.id, - 100, - 0, - 5), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 1L))); + addItem( + tLastID = 119, + "Beer", + "Good old Beer", + new GT_FoodStat( + 6, + 0.4F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 400, + 0, + 60, + Potion.digSpeed.id, + 400, + 2, + 60, + Potion.poison.id, + 100, + 0, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 1L))); ItemList.Bottle_Chilly_Sauce.set( - addItem( - tLastID = 120, - "Chilly Sauce", - "Spicy", - new GT_FoodStat( - 2, - 0.1F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.confusion.id, - 1000, - 0, - 10, - Potion.fireResistance.id, - 1000, - 0, - 60), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 120, + "Chilly Sauce", + "Spicy", + new GT_FoodStat( + 2, + 0.1F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 1000, + 0, + 10, + Potion.fireResistance.id, + 1000, + 0, + 60), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); ItemList.Bottle_Hot_Sauce.set( - addItem( - tLastID = 121, - "Hot Sauce", - "Very Spicy, I guess?", - new GT_FoodStat( - 2, - 0.1F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.confusion.id, - 2000, - 0, - 30, - Potion.fireResistance.id, - 2000, - 0, - 70), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 2L))); + addItem( + tLastID = 121, + "Hot Sauce", + "Very Spicy, I guess?", + new GT_FoodStat( + 2, + 0.1F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 2000, + 0, + 30, + Potion.fireResistance.id, + 2000, + 0, + 70), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 2L))); ItemList.Bottle_Diabolo_Sauce.set( - addItem( - tLastID = 122, - "Diabolo Sauce", - "As if the Devil made this Sauce", - SubTag.INVISIBLE, - new GT_FoodStat( - 2, - 0.1F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.confusion.id, - 3000, - 1, - 50, - Potion.fireResistance.id, - 3000, - 0, - 80), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 3L))); + addItem( + tLastID = 122, + "Diabolo Sauce", + "As if the Devil made this Sauce", + SubTag.INVISIBLE, + new GT_FoodStat( + 2, + 0.1F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 3000, + 1, + 50, + Potion.fireResistance.id, + 3000, + 0, + 80), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 3L))); ItemList.Bottle_Diablo_Sauce.set( - addItem( - tLastID = 123, - "Diablo Sauce", - "Diablo always comes back!", - SubTag.INVISIBLE, - new GT_FoodStat( - 2, - 0.1F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.confusion.id, - 4000, - 1, - 70, - Potion.fireResistance.id, - 4000, - 0, - 90), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 4L))); + addItem( + tLastID = 123, + "Diablo Sauce", + "Diablo always comes back!", + SubTag.INVISIBLE, + new GT_FoodStat( + 2, + 0.1F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 4000, + 1, + 70, + Potion.fireResistance.id, + 4000, + 0, + 90), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 4L))); ItemList.Bottle_Snitches_Glitch_Sauce.set( - addItem( - tLastID = 124, - "Old Man Snitches glitched Diablo Sauce", - "[Missing No]", - SubTag.INVISIBLE, - new GT_FoodStat( - 2, - 0.1F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.confusion.id, - 9999, - 2, - 999, - Potion.fireResistance.id, - 9999, - 9, - 999), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 3L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 5L))); + addItem( + tLastID = 124, + "Old Man Snitches glitched Diablo Sauce", + "[Missing No]", + SubTag.INVISIBLE, + new GT_FoodStat( + 2, + 0.1F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 9999, + 2, + 999, + Potion.fireResistance.id, + 9999, + 9, + 999), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 5L))); ItemList.Bottle_Apple_Juice.set( - addItem( - tLastID = 125, - "Apple Juice", - "Made of the Apples from our best Oak Farms", - new GT_FoodStat( - 4, - 0.2F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.hunger.id, - 400, - 0, - 20), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); + addItem( + tLastID = 125, + "Apple Juice", + "Made of the Apples from our best Oak Farms", + new GT_FoodStat( + 4, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.hunger.id, + 400, + 0, + 20), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); ItemList.Bottle_Cider.set( - addItem( - tLastID = 126, - "Cider", - "If you have nothing better to do with your Apples", - new GT_FoodStat( - 4, - 0.2F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.confusion.id, - 400, - 0, - 60, - Potion.resistance.id, - 400, - 1, - 60, - Potion.poison.id, - 200, - 1, - 5), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 1L))); + addItem( + tLastID = 126, + "Cider", + "If you have nothing better to do with your Apples", + new GT_FoodStat( + 4, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 400, + 0, + 60, + Potion.resistance.id, + 400, + 1, + 60, + Potion.poison.id, + 200, + 1, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 1L))); ItemList.Bottle_Golden_Apple_Juice.set( - addItem( - tLastID = 127, - "Golden Apple Juice", - "A golden Apple in liquid form", - SubTag.INVISIBLE, - new GT_FoodStat( - 4, - 0.2F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.hunger.id, - 400, - 0, - 20, - Potion.field_76444_x.id, - 2400, - 0, - 100, - Potion.regeneration.id, - 100, - 1, - 100), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); + addItem( + tLastID = 127, + "Golden Apple Juice", + "A golden Apple in liquid form", + SubTag.INVISIBLE, + new GT_FoodStat( + 4, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.hunger.id, + 400, + 0, + 20, + Potion.field_76444_x.id, + 2400, + 0, + 100, + Potion.regeneration.id, + 100, + 1, + 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); ItemList.Bottle_Golden_Cider.set( - addItem( - tLastID = 128, - "Golden Cider", - "More Resistance, less Regeneration", - SubTag.INVISIBLE, - new GT_FoodStat( - 4, - 0.2F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.confusion.id, - 400, - 0, - 60, - Potion.field_76444_x.id, - 2400, - 1, - 95, - Potion.poison.id, - 200, - 1, - 5), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 1L))); + addItem( + tLastID = 128, + "Golden Cider", + "More Resistance, less Regeneration", + SubTag.INVISIBLE, + new GT_FoodStat( + 4, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.confusion.id, + 400, + 0, + 60, + Potion.field_76444_x.id, + 2400, + 1, + 95, + Potion.poison.id, + 200, + 1, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 1L))); ItemList.Bottle_Iduns_Apple_Juice.set( - addItem( - tLastID = 129, - "Idun's Apple Juice", - "So you got the Idea of using Notch Apples for a drink?", - SubTag.INVISIBLE, - new GT_FoodStat( - 4, - 0.2F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.regeneration.id, - 600, - 4, - 100, - Potion.field_76444_x.id, - 2400, - 0, - 100, - Potion.resistance.id, - 6000, - 0, - 100, - Potion.fireResistance.id, - 6000, - 0, - 100), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 9L))); + addItem( + tLastID = 129, + "Idun's Apple Juice", + "So you got the Idea of using Notch Apples for a drink?", + SubTag.INVISIBLE, + new GT_FoodStat( + 4, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.regeneration.id, + 600, + 4, + 100, + Potion.field_76444_x.id, + 2400, + 0, + 100, + Potion.resistance.id, + 6000, + 0, + 100, + Potion.fireResistance.id, + 6000, + 0, + 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 9L))); ItemList.Bottle_Notches_Brew.set( - addItem( - tLastID = 130, - "Notches Brew", - "This is just overpowered", - SubTag.INVISIBLE, - new GT_FoodStat( - 4, - 0.2F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.regeneration.id, - 700, - 4, - 95, - Potion.field_76444_x.id, - 3000, - 1, - 95, - Potion.resistance.id, - 7000, - 1, - 95, - Potion.fireResistance.id, - 7000, - 0, - 95, - Potion.harm.id, - 0, - 2, - 20), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 9L))); + addItem( + tLastID = 130, + "Notches Brew", + "This is just overpowered", + SubTag.INVISIBLE, + new GT_FoodStat( + 4, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.regeneration.id, + 700, + 4, + 95, + Potion.field_76444_x.id, + 3000, + 1, + 95, + Potion.resistance.id, + 7000, + 1, + 95, + Potion.fireResistance.id, + 7000, + 0, + 95, + Potion.harm.id, + 0, + 2, + 20), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.NEBRISUM, 9L))); ItemList.Bottle_Lemon_Juice.set( - addItem( - tLastID = 131, - "Lemon Juice", - "Maybe adding Sugar will make it less sour", - new GT_FoodStat( - 2, - 0.4F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.digSpeed.id, - 1200, - 0, - 60), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 1L))); + addItem( + tLastID = 131, + "Lemon Juice", + "Maybe adding Sugar will make it less sour", + new GT_FoodStat( + 2, + 0.4F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.digSpeed.id, + 1200, + 0, + 60), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 1L))); ItemList.Bottle_Limoncello.set( - addItem( - tLastID = 132, - "Limoncello", - "An alcoholic Drink which tastes like Lemons", - new GT_FoodStat( - 2, - 0.4F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.digSpeed.id, - 1200, - 0, - 90, - Potion.poison.id, - 200, - 1, - 5), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 1L))); + addItem( + tLastID = 132, + "Limoncello", + "An alcoholic Drink which tastes like Lemons", + new GT_FoodStat( + 2, + 0.4F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.digSpeed.id, + 1200, + 0, + 90, + Potion.poison.id, + 200, + 1, + 5), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 1L))); ItemList.Bottle_Lemonade.set( - addItem( - tLastID = 133, - "Lemonade", - "Cold and refreshing Lemonade", - new GT_FoodStat( - 4, - 0.3F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.digSpeed.id, - 900, - 1, - 90), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 1L))); + addItem( + tLastID = 133, + "Lemonade", + "Cold and refreshing Lemonade", + new GT_FoodStat( + 4, + 0.3F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.digSpeed.id, + 900, + 1, + 90), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 1L))); ItemList.Bottle_Alcopops.set( - addItem( - tLastID = 134, - "Alcopops", - "Don't let your Children drink this junk!", - new GT_FoodStat( - 2, - 0.2F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.digSpeed.id, - 900, - 1, - 90, - Potion.poison.id, - 300, - 2, - 20), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VINCULUM, 1L))); + addItem( + tLastID = 134, + "Alcopops", + "Don't let your Children drink this junk!", + new GT_FoodStat( + 2, + 0.2F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.digSpeed.id, + 900, + 1, + 90, + Potion.poison.id, + 300, + 2, + 20), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VINCULUM, 1L))); ItemList.Bottle_Cave_Johnsons_Grenade_Juice.set( - addItem( - tLastID = 135, - "Cave Johnson's Grenade Juice", - "When life gives you Lemons, make Life take them Lemons back!", - SubTag.INVISIBLE, - new GT_FoodStat( - 0, - 0.0F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false).setExplosive(), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MORTUUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 1L))); + addItem( + tLastID = 135, + "Cave Johnson's Grenade Juice", + "When life gives you Lemons, make Life take them Lemons back!", + SubTag.INVISIBLE, + new GT_FoodStat( + 0, + 0.0F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false).setExplosive(), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MORTUUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 1L))); ItemList.Bottle_Milk.set( - addItem( - tLastID = 136, - "Milk", - "Got Milk?", - OrePrefixes.bottle.get(Materials.Milk), - new GT_FoodStat( - 0, - 0.0F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false).setMilk(), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); + addItem( + tLastID = 136, + "Milk", + "Got Milk?", + OrePrefixes.bottle.get(Materials.Milk), + new GT_FoodStat( + 0, + 0.0F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false).setMilk(), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); ItemList.Bottle_Holy_Water.set( - addItem( - tLastID = 137, - "Holy Water", - "May the holy Planks be with you", - OrePrefixes.bottle.get(Materials.HolyWater), - new GT_FoodStat( - 0, - 0.0F, - EnumAction.drink, - ItemList.Bottle_Empty.get(1L), - GregTech_API.sDrinksAlwaysDrinkable, - false, - false, - Potion.poison.id, - 100, - 1, - 100).setMilk(), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L))); + addItem( + tLastID = 137, + "Holy Water", + "May the holy Planks be with you", + OrePrefixes.bottle.get(Materials.HolyWater), + new GT_FoodStat( + 0, + 0.0F, + EnumAction.drink, + ItemList.Bottle_Empty.get(1L), + GregTech_API.sDrinksAlwaysDrinkable, + false, + false, + Potion.poison.id, + 100, + 1, + 100).setMilk(), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L))); ItemList.Food_Potato_On_Stick.set( - addItem( - tLastID = 200, - "Potato on a Stick", - "Totally looks like a Crab Claw", - new GT_FoodStat(1, 0.3F, EnumAction.eat, new ItemStack(Items.stick, 1), false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem( + tLastID = 200, + "Potato on a Stick", + "Totally looks like a Crab Claw", + new GT_FoodStat(1, 0.3F, EnumAction.eat, new ItemStack(Items.stick, 1), false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); ItemList.Food_Potato_On_Stick_Roasted.set( - addItem( - tLastID = 201, - "Roasted Potato on a Stick", - "Still looks like a Crab Claw", - new GT_FoodStat(6, 0.6F, EnumAction.eat, new ItemStack(Items.stick, 1), false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 201, + "Roasted Potato on a Stick", + "Still looks like a Crab Claw", + new GT_FoodStat(6, 0.6F, EnumAction.eat, new ItemStack(Items.stick, 1), false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); ItemList.Food_Raw_Fries.set( - addItem( - tLastID = 202, - "Potato Strips", - "It's Potato in Stripe Form", - new GT_FoodStat(1, 0.3F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); + addItem( + tLastID = 202, + "Potato Strips", + "It's Potato in Stripe Form", + new GT_FoodStat(1, 0.3F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 16L); ItemList.Food_Fries.set( - addItem( - tLastID = 203, - "Fries", - "Not to confuse with Fry the Delivery Boy", - new GT_FoodStat(7, 0.5F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 203, + "Fries", + "Not to confuse with Fry the Delivery Boy", + new GT_FoodStat(7, 0.5F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 16L); ItemList.Food_Packaged_Fries.set( - addItem( - tLastID = 204, - "Fries", - "Ketchup not included", - new GT_FoodStat( - 7, - 0.5F, - EnumAction.eat, - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 1L), - false, - true, - false), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 204, + "Fries", + "Ketchup not included", + new GT_FoodStat( + 7, + 0.5F, + EnumAction.eat, + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 1L), + false, + true, + false), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); ItemList.Food_Raw_PotatoChips.set( - addItem( - tLastID = 205, - "Potato Chips (Raw)", - "Just like a Potato", - new GT_FoodStat(1, 0.3F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); + addItem( + tLastID = 205, + "Potato Chips (Raw)", + "Just like a Potato", + new GT_FoodStat(1, 0.3F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 16L); ItemList.Food_PotatoChips.set( - addItem( - tLastID = 206, - "Potato Chips", - "Crunchy", - new GT_FoodStat(7, 0.5F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 206, + "Potato Chips", + "Crunchy", + new GT_FoodStat(7, 0.5F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 16L); ItemList.Food_ChiliChips.set( - addItem( - tLastID = 207, - "Chili Chips", - "Spicy", - new GT_FoodStat(7, 0.6F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 207, + "Chili Chips", + "Spicy", + new GT_FoodStat(7, 0.6F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 16L); ItemList.Food_Packaged_PotatoChips.set( - addItem( - tLastID = 208, - "Bag of Potato Chips", - "Full of delicious Air", - new GT_FoodStat( - 7, - 0.5F, - EnumAction.eat, - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 1L), - false, - true, - false), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 208, + "Bag of Potato Chips", + "Full of delicious Air", + new GT_FoodStat( + 7, + 0.5F, + EnumAction.eat, + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 1L), + false, + true, + false), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); ItemList.Food_Packaged_ChiliChips.set( - addItem( - tLastID = 209, - "Bag of Chili Chips", - "Stop making noises Baj!", - new GT_FoodStat( - 7, - 0.6F, - EnumAction.eat, - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 1L), - false, - true, - false), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 209, + "Bag of Chili Chips", + "Stop making noises Baj!", + new GT_FoodStat( + 7, + 0.6F, + EnumAction.eat, + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 1L), + false, + true, + false), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); ItemList.Food_Chum.set( - addItem( - tLastID = 210, - "Chum", - "Chum is Fum!", - new GT_FoodStat( - 5, - 0.2F, - EnumAction.eat, - null, - true, - false, - true, - Potion.hunger.id, - 1000, - 4, - 100, - Potion.confusion.id, - 300, - 1, - 80), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 210, + "Chum", + "Chum is Fum!", + new GT_FoodStat( + 5, + 0.2F, + EnumAction.eat, + null, + true, + false, + true, + Potion.hunger.id, + 1000, + 4, + 100, + Potion.confusion.id, + 300, + 1, + 80), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); ItemList.Food_Chum_On_Stick.set( - addItem( - tLastID = 211, - "Chum on a Stick", - "Don't forget to try our Chum-balaya", - new GT_FoodStat( - 5, - 0.2F, - EnumAction.eat, - new ItemStack(Items.stick, 1), - true, - false, - true, - Potion.hunger.id, - 1000, - 4, - 100, - Potion.confusion.id, - 300, - 1, - 80), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 211, + "Chum on a Stick", + "Don't forget to try our Chum-balaya", + new GT_FoodStat( + 5, + 0.2F, + EnumAction.eat, + new ItemStack(Items.stick, 1), + true, + false, + true, + Potion.hunger.id, + 1000, + 4, + 100, + Potion.confusion.id, + 300, + 1, + 80), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); ItemList.Food_Dough_Sugar.set( - addItem( - tLastID = 212, - "Sugary Dough", - "Don't eat the Dough before it is baken", - new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + addItem( + tLastID = 212, + "Sugary Dough", + "Don't eat the Dough before it is baken", + new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); ItemList.Food_Dough_Chocolate.set( - addItem( - tLastID = 213, - "Chocolate Dough", - "I said don't eat the Dough!", - new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + addItem( + tLastID = 213, + "Chocolate Dough", + "I said don't eat the Dough!", + new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); ItemList.Food_Raw_Cookie.set( - addItem( - tLastID = 214, - "Cookie shaped Dough", - "For baking Cookies", - new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + addItem( + tLastID = 214, + "Cookie shaped Dough", + "For baking Cookies", + new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); ItemList.Food_Sliced_Buns.set( - addItem( - tLastID = 220, - "Buns", - "Pre Sliced", - new GT_FoodStat(3, 0.5F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 220, + "Buns", + "Pre Sliced", + new GT_FoodStat(3, 0.5F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); ItemList.Food_Burger_Veggie.set( - addItem( - tLastID = 221, - "Veggieburger", - "No matter how you call this, this is NOT a Burger!", - new GT_FoodStat(3, 0.5F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 221, + "Veggieburger", + "No matter how you call this, this is NOT a Burger!", + new GT_FoodStat(3, 0.5F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); ItemList.Food_Burger_Cheese.set( - addItem( - tLastID = 222, - "Cheeseburger", - "Cheesy!", - new GT_FoodStat(3, 0.5F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), - new ItemData(Materials.Cheese, 907200L))); + addItem( + tLastID = 222, + "Cheeseburger", + "Cheesy!", + new GT_FoodStat(3, 0.5F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new ItemData(Materials.Cheese, 907200L))); ItemList.Food_Burger_Meat.set( - addItem( - tLastID = 223, - "Hamburger", - "The Mc Burger Queen Burger", - new GT_FoodStat(3, 0.5F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 223, + "Hamburger", + "The Mc Burger Queen Burger", + new GT_FoodStat(3, 0.5F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); ItemList.Food_Burger_Chum.set( - addItem( - tLastID = 224, - "Chumburger", - "Fum is Chum!", - new GT_FoodStat( - 5, - 0.2F, - EnumAction.eat, - null, - true, - false, - true, - Potion.hunger.id, - 1000, - 4, - 100, - Potion.confusion.id, - 300, - 1, - 80), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 224, + "Chumburger", + "Fum is Chum!", + new GT_FoodStat( + 5, + 0.2F, + EnumAction.eat, + null, + true, + false, + true, + Potion.hunger.id, + 1000, + 4, + 100, + Potion.confusion.id, + 300, + 1, + 80), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); ItemList.Food_Sliced_Breads.set( - addItem( - tLastID = 230, - "Breads", - "Pre Sliced", - new GT_FoodStat(5, 0.6F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 230, + "Breads", + "Pre Sliced", + new GT_FoodStat(5, 0.6F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); ItemList.Food_Sandwich_Veggie.set( - addItem( - tLastID = 231, - "Veggie Sandwich", - "Meatless", - new GT_FoodStat(7, 0.6F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 231, + "Veggie Sandwich", + "Meatless", + new GT_FoodStat(7, 0.6F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 32L); ItemList.Food_Sandwich_Cheese.set( - addItem( - tLastID = 232, - "Cheese Sandwich", - "Say Cheese!", - new GT_FoodStat(7, 0.6F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 232, + "Cheese Sandwich", + "Say Cheese!", + new GT_FoodStat(7, 0.6F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 32L); ItemList.Food_Sandwich_Bacon.set( - addItem( - tLastID = 233, - "Bacon Sandwich", - "The best Sandwich ever!", - new GT_FoodStat(10, 0.8F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 233, + "Bacon Sandwich", + "The best Sandwich ever!", + new GT_FoodStat(10, 0.8F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 32L); ItemList.Food_Sandwich_Steak.set( - addItem( - tLastID = 234, - "Steak Sandwich", - "Not a 'Steam Sandwich'", - new GT_FoodStat(10, 0.8F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 234, + "Steak Sandwich", + "Not a 'Steam Sandwich'", + new GT_FoodStat(10, 0.8F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 32L); ItemList.Food_Sliced_Baguettes.set( - addItem( - tLastID = 240, - "Baguettes", - "Pre Sliced", - new GT_FoodStat(8, 0.5F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 240, + "Baguettes", + "Pre Sliced", + new GT_FoodStat(8, 0.5F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); ItemList.Food_Large_Sandwich_Veggie.set( - addItem( - tLastID = 241, - "Large Veggie Sandwich", - "Just not worth it", - new GT_FoodStat(15, 0.8F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 3L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 241, + "Large Veggie Sandwich", + "Just not worth it", + new GT_FoodStat(15, 0.8F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 16L); ItemList.Food_Large_Sandwich_Cheese.set( - addItem( - tLastID = 242, - "Large Cheese Sandwich", - "I need another cheesy tooltip for this", - new GT_FoodStat(15, 0.8F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 3L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 242, + "Large Cheese Sandwich", + "I need another cheesy tooltip for this", + new GT_FoodStat(15, 0.8F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 16L); ItemList.Food_Large_Sandwich_Bacon.set( - addItem( - tLastID = 243, - "Large Bacon Sandwich", - "For Men! (and manly Women)", - new GT_FoodStat(20, 1.0F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 243, + "Large Bacon Sandwich", + "For Men! (and manly Women)", + new GT_FoodStat(20, 1.0F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 16L); ItemList.Food_Large_Sandwich_Steak.set( - addItem( - tLastID = 244, - "Large Steak Sandwich", - "Yes, I once accidentially called it 'Steam Sandwich'", - new GT_FoodStat(20, 1.0F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 244, + "Large Steak Sandwich", + "Yes, I once accidentially called it 'Steam Sandwich'", + new GT_FoodStat(20, 1.0F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); setFluidContainerStats(32000 + tLastID, 0L, 16L); ItemList.Food_Raw_Pizza_Veggie.set( - addItem( - tLastID = 250, - "Raw Veggie Pizza", - "Into the Oven with it!", - new GT_FoodStat(1, 0.2F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 250, + "Raw Veggie Pizza", + "Into the Oven with it!", + new GT_FoodStat(1, 0.2F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); ItemList.Food_Raw_Pizza_Cheese.set( - addItem( - tLastID = 251, - "Raw Cheese Pizza", - "Into the Oven with it!", - new GT_FoodStat(2, 0.2F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 251, + "Raw Cheese Pizza", + "Into the Oven with it!", + new GT_FoodStat(2, 0.2F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); ItemList.Food_Raw_Pizza_Meat.set( - addItem( - tLastID = 252, - "Raw Mince Meat Pizza", - "Into the Oven with it!", - new GT_FoodStat(2, 0.2F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 252, + "Raw Mince Meat Pizza", + "Into the Oven with it!", + new GT_FoodStat(2, 0.2F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); ItemList.Food_Baked_Pizza_Veggie.set( - addItem( - tLastID = 260, - "Veggie Pizza", - "The next they want is Gluten Free Pizzas...", - new GT_FoodStat(3, 0.3F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 260, + "Veggie Pizza", + "The next they want is Gluten Free Pizzas...", + new GT_FoodStat(3, 0.3F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); ItemList.Food_Baked_Pizza_Cheese.set( - addItem( - tLastID = 261, - "Cheese Pizza", - "Pizza Magarita", - new GT_FoodStat(4, 0.4F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 261, + "Cheese Pizza", + "Pizza Magarita", + new GT_FoodStat(4, 0.4F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); ItemList.Food_Baked_Pizza_Meat.set( - addItem( - tLastID = 262, - "Mince Meat Pizza", - "Emo Pizza, it cuts itself!", - new GT_FoodStat(5, 0.5F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 262, + "Mince Meat Pizza", + "Emo Pizza, it cuts itself!", + new GT_FoodStat(5, 0.5F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); ItemList.Dye_Indigo.set( - addItem( - tLastID = 410, - "Indigo Dye", - "Blue Dye", - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L), - Dyes.dyeBlue)); + addItem( + tLastID = 410, + "Indigo Dye", + "Blue Dye", + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L), + Dyes.dyeBlue)); for (byte i = 0; i < 16; i = (byte) (i + 1)) { ItemList.DYE_ONLY_ITEMS[i].set( - addItem( - tLastID = 414 + i, - Dyes.get(i).mName + " Dye", - "", - Dyes.get(i) - .name(), - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L))); + addItem( + tLastID = 414 + i, + Dyes.get(i).mName + " Dye", + "", + Dyes.get(i) + .name(), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L))); } - ItemList.Plank_Oak.set( - addItem(tLastID = 470, "Oak Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Oak + .set(addItem(tLastID = 470, "Oak Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.Plank_Spruce.set( - addItem( - tLastID = 471, - "Spruce Plank", - aTextCover, - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem(tLastID = 471, "Spruce Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.Plank_Birch.set( - addItem(tLastID = 472, "Birch Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem(tLastID = 472, "Birch Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.Plank_Jungle.set( - addItem( - tLastID = 473, - "Jungle Plank", - aTextCover, - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem(tLastID = 473, "Jungle Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.Plank_Acacia.set( - addItem( - tLastID = 474, - "Acacia Plank", - aTextCover, - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem(tLastID = 474, "Acacia Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.Plank_DarkOak.set( - addItem( - tLastID = 475, - "Dark Oak Plank", - aTextCover, - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem(tLastID = 475, "Dark Oak Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.Plank_Larch.set( - addItem(tLastID = 476, "Larch Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem(tLastID = 476, "Larch Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Teak.set( - addItem(tLastID = 477, "Teak Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Teak + .set(addItem(tLastID = 477, "Teak Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.Plank_Acacia_Green.set( - addItem( - tLastID = 478, - "Green Acacia Plank", - aTextCover, - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem( + tLastID = 478, + "Green Acacia Plank", + aTextCover, + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Lime.set( - addItem(tLastID = 479, "Lime Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Lime + .set(addItem(tLastID = 479, "Lime Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.Plank_Chestnut.set( - addItem( - tLastID = 480, - "Chestnut Plank", - aTextCover, - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem(tLastID = 480, "Chestnut Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.Plank_Wenge.set( - addItem(tLastID = 481, "Wenge Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem(tLastID = 481, "Wenge Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.Plank_Baobab.set( - addItem( - tLastID = 482, - "Baobab Plank", - aTextCover, - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem(tLastID = 482, "Baobab Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.Plank_Sequoia.set( - addItem( - tLastID = 483, - "Sequoia Plank", - aTextCover, - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem(tLastID = 483, "Sequoia Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.Plank_Kapok.set( - addItem(tLastID = 484, "Kapok Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem(tLastID = 484, "Kapok Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.Plank_Ebony.set( - addItem(tLastID = 485, "Ebony Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem(tLastID = 485, "Ebony Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.Plank_Mahagony.set( - addItem( - tLastID = 486, - "Mahagony Plank", - aTextCover, - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem(tLastID = 486, "Mahagony Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.Plank_Balsa.set( - addItem(tLastID = 487, "Balsa Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem(tLastID = 487, "Balsa Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.Plank_Willow.set( - addItem( - tLastID = 488, - "Willow Plank", - aTextCover, - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem(tLastID = 488, "Willow Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.Plank_Walnut.set( - addItem( - tLastID = 489, - "Walnut Plank", - aTextCover, - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem(tLastID = 489, "Walnut Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.Plank_Greenheart.set( - addItem( - tLastID = 490, - "Greenheart Plank", - aTextCover, - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem( + tLastID = 490, + "Greenheart Plank", + aTextCover, + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.Plank_Cherry.set( - addItem( - tLastID = 491, - "Cherry Plank", - aTextCover, - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem(tLastID = 491, "Cherry Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.Plank_Mahoe.set( - addItem(tLastID = 492, "Mahoe Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem(tLastID = 492, "Mahoe Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.Plank_Poplar.set( - addItem( - tLastID = 493, - "Poplar Plank", - aTextCover, - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem(tLastID = 493, "Poplar Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Palm.set( - addItem(tLastID = 494, "Palm Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Palm + .set(addItem(tLastID = 494, "Palm Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.Plank_Papaya.set( - addItem( - tLastID = 495, - "Papaya Plank", - aTextCover, - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem(tLastID = 495, "Papaya Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Pine.set( - addItem(tLastID = 496, "Pine Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Pine + .set(addItem(tLastID = 496, "Pine Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); - ItemList.Plank_Plum.set( - addItem(tLastID = 497, "Plum Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + ItemList.Plank_Plum + .set(addItem(tLastID = 497, "Plum Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.Plank_Maple.set( - addItem(tLastID = 498, "Maple Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem(tLastID = 498, "Maple Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.Plank_Citrus.set( - addItem( - tLastID = 499, - "Citrus Plank", - aTextCover, - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem(tLastID = 499, "Citrus Plank", aTextCover, new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 75); ItemList.SFMixture.set(addItem(tLastID = 270, "Super Fuel Binder", "Raw Material")); ItemList.MSFMixture.set(addItem(tLastID = 271, "Magic Super Fuel Binder", "Raw Material")); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Oak.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 0) }); + ItemList.Plank_Oak.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 0) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Spruce.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 1) }); + ItemList.Plank_Spruce.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 1) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Birch.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 2) }); + ItemList.Plank_Birch.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 2) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Jungle.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 3) }); + ItemList.Plank_Jungle.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 3) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Acacia.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 4) }); + ItemList.Plank_Acacia.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 4) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_DarkOak.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 5) }); + ItemList.Plank_DarkOak.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', new ItemStack(Blocks.wooden_slab, 1, 5) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Larch.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs1", 1L, 0) }); + ItemList.Plank_Larch.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs1", 1L, 0) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Teak.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs1", 1L, 1) }); + ItemList.Plank_Teak.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs1", 1L, 1) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Acacia_Green.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs1", 1L, 2) }); + ItemList.Plank_Acacia_Green.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs1", 1L, 2) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Lime.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs1", 1L, 3) }); + ItemList.Plank_Lime.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs1", 1L, 3) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Chestnut.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs1", 1L, 4) }); + ItemList.Plank_Chestnut.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs1", 1L, 4) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Wenge.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs1", 1L, 5) }); + ItemList.Plank_Wenge.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs1", 1L, 5) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Baobab.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs1", 1L, 6) }); + ItemList.Plank_Baobab.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs1", 1L, 6) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Sequoia.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs1", 1L, 7) }); + ItemList.Plank_Sequoia.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs1", 1L, 7) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Kapok.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs2", 1L, 0) }); + ItemList.Plank_Kapok.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs2", 1L, 0) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Ebony.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs2", 1L, 1) }); + ItemList.Plank_Ebony.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs2", 1L, 1) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Mahagony.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs2", 1L, 2) }); + ItemList.Plank_Mahagony.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs2", 1L, 2) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Balsa.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs2", 1L, 3) }); + ItemList.Plank_Balsa.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs2", 1L, 3) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Willow.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs2", 1L, 4) }); + ItemList.Plank_Willow.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs2", 1L, 4) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Walnut.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs2", 1L, 5) }); + ItemList.Plank_Walnut.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs2", 1L, 5) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Greenheart.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs2", 1L, 6) }); + ItemList.Plank_Greenheart.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs2", 1L, 6) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Cherry.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs2", 1L, 7) }); + ItemList.Plank_Cherry.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs2", 1L, 7) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Mahoe.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs3", 1L, 0) }); + ItemList.Plank_Mahoe.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs3", 1L, 0) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Poplar.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs3", 1L, 1) }); + ItemList.Plank_Poplar.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs3", 1L, 1) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Palm.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs3", 1L, 2) }); + ItemList.Plank_Palm.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs3", 1L, 2) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Papaya.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs3", 1L, 3) }); + ItemList.Plank_Papaya.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs3", 1L, 3) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Pine.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs3", 1L, 4) }); + ItemList.Plank_Pine.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs3", 1L, 4) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Plum.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs3", 1L, 5) }); + ItemList.Plank_Plum.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs3", 1L, 5) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Maple.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs3", 1L, 6) }); + ItemList.Plank_Maple.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs3", 1L, 6) }); GT_ModHandler.addCraftingRecipe( - ItemList.Plank_Citrus.get(2L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, - new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs3", 1L, 7) }); + ItemList.Plank_Citrus.get(2L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, + new Object[] { "s ", " P", 'P', GT_ModHandler.getModItem(Forestry.ID, "slabs3", 1L, 7) }); GregTech_API.registerCover(ItemList.Plank_Oak.get(1L), TextureFactory.of(Blocks.planks, 0), null); GregTech_API.registerCover(ItemList.Plank_Spruce.get(1L), TextureFactory.of(Blocks.planks, 1), null); @@ -1969,410 +1913,290 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { GregTech_API.registerCover(ItemList.Plank_Acacia.get(1L), TextureFactory.of(Blocks.planks, 4), null); GregTech_API.registerCover(ItemList.Plank_DarkOak.get(1L), TextureFactory.of(Blocks.planks, 5), null); GregTech_API.registerCover( - ItemList.Plank_Larch.get(1L), - TextureFactory.of( - GT_Utility.getBlockFromStack( - GT_ModHandler.getModItem( - Forestry.ID, - "planks", - 1L, - 0, - new ItemStack(Blocks.planks, 1, 0))), - 0), - null); + ItemList.Plank_Larch.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack( + GT_ModHandler.getModItem(Forestry.ID, "planks", 1L, 0, new ItemStack(Blocks.planks, 1, 0))), + 0), + null); GregTech_API.registerCover( - ItemList.Plank_Teak.get(1L), - TextureFactory.of( - GT_Utility.getBlockFromStack( - GT_ModHandler.getModItem( - Forestry.ID, - "planks", - 1L, - 1, - new ItemStack(Blocks.planks, 1, 0))), - 1), - null); + ItemList.Plank_Teak.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack( + GT_ModHandler.getModItem(Forestry.ID, "planks", 1L, 1, new ItemStack(Blocks.planks, 1, 0))), + 1), + null); GregTech_API.registerCover( - ItemList.Plank_Acacia_Green.get(1L), - TextureFactory.of( - GT_Utility.getBlockFromStack( - GT_ModHandler.getModItem( - Forestry.ID, - "planks", - 1L, - 2, - new ItemStack(Blocks.planks, 1, 0))), - 2), - null); + ItemList.Plank_Acacia_Green.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack( + GT_ModHandler.getModItem(Forestry.ID, "planks", 1L, 2, new ItemStack(Blocks.planks, 1, 0))), + 2), + null); GregTech_API.registerCover( - ItemList.Plank_Lime.get(1L), - TextureFactory.of( - GT_Utility.getBlockFromStack( - GT_ModHandler.getModItem( - Forestry.ID, - "planks", - 1L, - 3, - new ItemStack(Blocks.planks, 1, 0))), - 3), - null); + ItemList.Plank_Lime.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack( + GT_ModHandler.getModItem(Forestry.ID, "planks", 1L, 3, new ItemStack(Blocks.planks, 1, 0))), + 3), + null); GregTech_API.registerCover( - ItemList.Plank_Chestnut.get(1L), - TextureFactory.of( - GT_Utility.getBlockFromStack( - GT_ModHandler.getModItem( - Forestry.ID, - "planks", - 1L, - 4, - new ItemStack(Blocks.planks, 1, 0))), - 4), - null); + ItemList.Plank_Chestnut.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack( + GT_ModHandler.getModItem(Forestry.ID, "planks", 1L, 4, new ItemStack(Blocks.planks, 1, 0))), + 4), + null); GregTech_API.registerCover( - ItemList.Plank_Wenge.get(1L), - TextureFactory.of( - GT_Utility.getBlockFromStack( - GT_ModHandler.getModItem( - Forestry.ID, - "planks", - 1L, - 5, - new ItemStack(Blocks.planks, 1, 0))), - 5), - null); + ItemList.Plank_Wenge.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack( + GT_ModHandler.getModItem(Forestry.ID, "planks", 1L, 5, new ItemStack(Blocks.planks, 1, 0))), + 5), + null); GregTech_API.registerCover( - ItemList.Plank_Baobab.get(1L), - TextureFactory.of( - GT_Utility.getBlockFromStack( - GT_ModHandler.getModItem( - Forestry.ID, - "planks", - 1L, - 6, - new ItemStack(Blocks.planks, 1, 0))), - 6), - null); + ItemList.Plank_Baobab.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack( + GT_ModHandler.getModItem(Forestry.ID, "planks", 1L, 6, new ItemStack(Blocks.planks, 1, 0))), + 6), + null); GregTech_API.registerCover( - ItemList.Plank_Sequoia.get(1L), - TextureFactory.of( - GT_Utility.getBlockFromStack( - GT_ModHandler.getModItem( - Forestry.ID, - "planks", - 1L, - 7, - new ItemStack(Blocks.planks, 1, 0))), - 7), - null); + ItemList.Plank_Sequoia.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack( + GT_ModHandler.getModItem(Forestry.ID, "planks", 1L, 7, new ItemStack(Blocks.planks, 1, 0))), + 7), + null); GregTech_API.registerCover( - ItemList.Plank_Kapok.get(1L), - TextureFactory.of( - GT_Utility.getBlockFromStack( - GT_ModHandler.getModItem( - Forestry.ID, - "planks", - 1L, - 8, - new ItemStack(Blocks.planks, 1, 0))), - 8), - null); + ItemList.Plank_Kapok.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack( + GT_ModHandler.getModItem(Forestry.ID, "planks", 1L, 8, new ItemStack(Blocks.planks, 1, 0))), + 8), + null); GregTech_API.registerCover( - ItemList.Plank_Ebony.get(1L), - TextureFactory.of( - GT_Utility.getBlockFromStack( - GT_ModHandler.getModItem( - Forestry.ID, - "planks", - 1L, - 9, - new ItemStack(Blocks.planks, 1, 0))), - 9), - null); + ItemList.Plank_Ebony.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack( + GT_ModHandler.getModItem(Forestry.ID, "planks", 1L, 9, new ItemStack(Blocks.planks, 1, 0))), + 9), + null); GregTech_API.registerCover( - ItemList.Plank_Mahagony.get(1L), - TextureFactory.of( - GT_Utility.getBlockFromStack( - GT_ModHandler.getModItem( - Forestry.ID, - "planks", - 1L, - 10, - new ItemStack(Blocks.planks, 1, 0))), - 10), - null); + ItemList.Plank_Mahagony.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack( + GT_ModHandler.getModItem(Forestry.ID, "planks", 1L, 10, new ItemStack(Blocks.planks, 1, 0))), + 10), + null); GregTech_API.registerCover( - ItemList.Plank_Balsa.get(1L), - TextureFactory.of( - GT_Utility.getBlockFromStack( - GT_ModHandler.getModItem( - Forestry.ID, - "planks", - 1L, - 11, - new ItemStack(Blocks.planks, 1, 0))), - 11), - null); + ItemList.Plank_Balsa.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack( + GT_ModHandler.getModItem(Forestry.ID, "planks", 1L, 11, new ItemStack(Blocks.planks, 1, 0))), + 11), + null); GregTech_API.registerCover( - ItemList.Plank_Willow.get(1L), - TextureFactory.of( - GT_Utility.getBlockFromStack( - GT_ModHandler.getModItem( - Forestry.ID, - "planks", - 1L, - 12, - new ItemStack(Blocks.planks, 1, 0))), - 12), - null); + ItemList.Plank_Willow.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack( + GT_ModHandler.getModItem(Forestry.ID, "planks", 1L, 12, new ItemStack(Blocks.planks, 1, 0))), + 12), + null); GregTech_API.registerCover( - ItemList.Plank_Walnut.get(1L), - TextureFactory.of( - GT_Utility.getBlockFromStack( - GT_ModHandler.getModItem( - Forestry.ID, - "planks", - 1L, - 13, - new ItemStack(Blocks.planks, 1, 0))), - 13), - null); + ItemList.Plank_Walnut.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack( + GT_ModHandler.getModItem(Forestry.ID, "planks", 1L, 13, new ItemStack(Blocks.planks, 1, 0))), + 13), + null); GregTech_API.registerCover( - ItemList.Plank_Greenheart.get(1L), - TextureFactory.of( - GT_Utility.getBlockFromStack( - GT_ModHandler.getModItem( - Forestry.ID, - "planks", - 1L, - 14, - new ItemStack(Blocks.planks, 1, 0))), - 14), - null); + ItemList.Plank_Greenheart.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack( + GT_ModHandler.getModItem(Forestry.ID, "planks", 1L, 14, new ItemStack(Blocks.planks, 1, 0))), + 14), + null); GregTech_API.registerCover( - ItemList.Plank_Cherry.get(1L), - TextureFactory.of( - GT_Utility.getBlockFromStack( - GT_ModHandler.getModItem( - Forestry.ID, - "planks", - 1L, - 15, - new ItemStack(Blocks.planks, 1, 0))), - 15), - null); + ItemList.Plank_Cherry.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack( + GT_ModHandler.getModItem(Forestry.ID, "planks", 1L, 15, new ItemStack(Blocks.planks, 1, 0))), + 15), + null); GregTech_API.registerCover( - ItemList.Plank_Mahoe.get(1L), - TextureFactory.of( - GT_Utility.getBlockFromStack( - GT_ModHandler.getModItem( - Forestry.ID, - "planks", - 1L, - 16, - new ItemStack(Blocks.planks, 1, 0))), - 0), - null); + ItemList.Plank_Mahoe.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack( + GT_ModHandler.getModItem(Forestry.ID, "planks", 1L, 16, new ItemStack(Blocks.planks, 1, 0))), + 0), + null); GregTech_API.registerCover( - ItemList.Plank_Poplar.get(1L), - TextureFactory.of( - GT_Utility.getBlockFromStack( - GT_ModHandler.getModItem( - Forestry.ID, - "planks", - 1L, - 17, - new ItemStack(Blocks.planks, 1, 0))), - 1), - null); + ItemList.Plank_Poplar.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack( + GT_ModHandler.getModItem(Forestry.ID, "planks", 1L, 17, new ItemStack(Blocks.planks, 1, 0))), + 1), + null); GregTech_API.registerCover( - ItemList.Plank_Palm.get(1L), - TextureFactory.of( - GT_Utility.getBlockFromStack( - GT_ModHandler.getModItem( - Forestry.ID, - "planks", - 1L, - 18, - new ItemStack(Blocks.planks, 1, 0))), - 2), - null); + ItemList.Plank_Palm.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack( + GT_ModHandler.getModItem(Forestry.ID, "planks", 1L, 18, new ItemStack(Blocks.planks, 1, 0))), + 2), + null); GregTech_API.registerCover( - ItemList.Plank_Papaya.get(1L), - TextureFactory.of( - GT_Utility.getBlockFromStack( - GT_ModHandler.getModItem( - Forestry.ID, - "planks", - 1L, - 19, - new ItemStack(Blocks.planks, 1, 0))), - 3), - null); + ItemList.Plank_Papaya.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack( + GT_ModHandler.getModItem(Forestry.ID, "planks", 1L, 19, new ItemStack(Blocks.planks, 1, 0))), + 3), + null); GregTech_API.registerCover( - ItemList.Plank_Pine.get(1L), - TextureFactory.of( - GT_Utility.getBlockFromStack( - GT_ModHandler.getModItem( - Forestry.ID, - "planks", - 1L, - 20, - new ItemStack(Blocks.planks, 1, 0))), - 4), - null); + ItemList.Plank_Pine.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack( + GT_ModHandler.getModItem(Forestry.ID, "planks", 1L, 20, new ItemStack(Blocks.planks, 1, 0))), + 4), + null); GregTech_API.registerCover( - ItemList.Plank_Plum.get(1L), - TextureFactory.of( - GT_Utility.getBlockFromStack( - GT_ModHandler.getModItem( - Forestry.ID, - "planks", - 1L, - 21, - new ItemStack(Blocks.planks, 1, 0))), - 5), - null); + ItemList.Plank_Plum.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack( + GT_ModHandler.getModItem(Forestry.ID, "planks", 1L, 21, new ItemStack(Blocks.planks, 1, 0))), + 5), + null); GregTech_API.registerCover( - ItemList.Plank_Maple.get(1L), - TextureFactory.of( - GT_Utility.getBlockFromStack( - GT_ModHandler.getModItem( - Forestry.ID, - "planks", - 1L, - 22, - new ItemStack(Blocks.planks, 1, 0))), - 6), - null); + ItemList.Plank_Maple.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack( + GT_ModHandler.getModItem(Forestry.ID, "planks", 1L, 22, new ItemStack(Blocks.planks, 1, 0))), + 6), + null); GregTech_API.registerCover( - ItemList.Plank_Citrus.get(1L), - TextureFactory.of( - GT_Utility.getBlockFromStack( - GT_ModHandler.getModItem( - Forestry.ID, - "planks", - 1L, - 23, - new ItemStack(Blocks.planks, 1, 0))), - 7), - null); + ItemList.Plank_Citrus.get(1L), + TextureFactory.of( + GT_Utility.getBlockFromStack( + GT_ModHandler.getModItem(Forestry.ID, "planks", 1L, 23, new ItemStack(Blocks.planks, 1, 0))), + 7), + null); ItemList.Crop_Drop_Plumbilia.set( - addItem( - tLastID = 500, - "Plumbilia Leaf", - "Source of Lead", - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 1L))); + addItem( + tLastID = 500, + "Plumbilia Leaf", + "Source of Lead", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 1L))); ItemList.Crop_Drop_Argentia.set( - addItem( - tLastID = 501, - "Argentia Leaf", - "Source of Silver", - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); + addItem( + tLastID = 501, + "Argentia Leaf", + "Source of Silver", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); ItemList.Crop_Drop_Indigo.set( - addItem( - tLastID = 502, - "Indigo Blossom", - "Used for making Blue Dye", - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L))); + addItem( + tLastID = 502, + "Indigo Blossom", + "Used for making Blue Dye", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L))); ItemList.Crop_Drop_Ferru.set( - addItem( - tLastID = 503, - "Ferru Leaf", - "Source of Iron", - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L))); + addItem( + tLastID = 503, + "Ferru Leaf", + "Source of Iron", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L))); ItemList.Crop_Drop_Aurelia.set( - addItem( - tLastID = 504, - "Aurelia Leaf", - "Source of Gold", - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); + addItem( + tLastID = 504, + "Aurelia Leaf", + "Source of Gold", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); ItemList.Crop_Drop_TeaLeaf.set( - addItem( - tLastID = 505, - "Tea Leaf", - "Source of Tea", - "cropTea", - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); + addItem( + tLastID = 505, + "Tea Leaf", + "Source of Tea", + "cropTea", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); ItemList.Crop_Drop_OilBerry.set( - addItem( - tLastID = 510, - "Oil Berry", - "Oil in Berry form", - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); + addItem( + tLastID = 510, + "Oil Berry", + "Oil in Berry form", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); ItemList.Crop_Drop_BobsYerUncleRanks.set( - addItem( - tLastID = 511, - "Bobs-Yer-Uncle-Berry", - "Source of Emeralds", - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); + addItem( + tLastID = 511, + "Bobs-Yer-Uncle-Berry", + "Source of Emeralds", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); ItemList.Crop_Drop_UUMBerry.set( - addItem( - tLastID = 512, - "UUM Berry", - "UUM in Berry form", - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); + addItem( + tLastID = 512, + "UUM Berry", + "UUM in Berry form", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); ItemList.Crop_Drop_UUABerry.set( - addItem( - tLastID = 513, - "UUA Berry", - "UUA in Berry form", - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); + addItem( + tLastID = 513, + "UUA Berry", + "UUA in Berry form", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); ItemList.Crop_Drop_MilkWart.set( - addItem( - tLastID = 520, - "Milk Wart", - "Source of Milk", - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); + addItem( + tLastID = 520, + "Milk Wart", + "Source of Milk", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L))); ItemList.Crop_Drop_Coppon.set( - addItem( - tLastID = 530, - "Coppon Fiber", - "ORANGE WOOOOOOOL!!!", - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 1L))); + addItem( + tLastID = 530, + "Coppon Fiber", + "ORANGE WOOOOOOOL!!!", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERMUTATIO, 1L))); ItemList.Crop_Drop_Tine.set( - addItem( - tLastID = 540, - "Tine Twig", - "Source of Tin", - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem( + tLastID = 540, + "Tine Twig", + "Source of Tin", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 100); ItemList.Crop_Drop_Mica.set( - addItem( - tLastID = 538, - "Micadia Twig", - "Source of Mica", - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); + addItem( + tLastID = 538, + "Micadia Twig", + "Source of Mica", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 1L))); setBurnValue(32000 + tLastID, 240); ItemList.Crop_Drop_Bauxite.set(addItem(tLastID = 521, "Bauxia Leaf", "Source of Aluminium")); @@ -2390,400 +2214,385 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { ItemList.Crop_Drop_Naquadah.set(addItem(tLastID = 535, "Stargatium Leaf", "Source of Naquadah")); ItemList.Crop_Drop_Chilly.set( - addItem( - tLastID = 550, - "Chilly Pepper", - "It is red and hot", - "cropChilipepper", - new GT_FoodStat( - 1, - 0.3F, - EnumAction.eat, - null, - false, - true, - false, - Potion.confusion.id, - 200, - 1, - 40), - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + addItem( + tLastID = 550, + "Chilly Pepper", + "It is red and hot", + "cropChilipepper", + new GT_FoodStat(1, 0.3F, EnumAction.eat, null, false, true, false, Potion.confusion.id, 200, 1, 40), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); ItemList.Crop_Drop_Lemon.set( - addItem( - tLastID = 551, - "Lemon", - "Don't make Lemonade", - "cropLemon", - new GT_FoodStat(1, 0.3F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + addItem( + tLastID = 551, + "Lemon", + "Don't make Lemonade", + "cropLemon", + new GT_FoodStat(1, 0.3F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); ItemList.Crop_Drop_Tomato.set( - addItem( - tLastID = 552, - "Tomato", - "Solid Ketchup", - "cropTomato", - new GT_FoodStat(1, 0.2F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + addItem( + tLastID = 552, + "Tomato", + "Solid Ketchup", + "cropTomato", + new GT_FoodStat(1, 0.2F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); ItemList.Crop_Drop_MTomato.set( - addItem( - tLastID = 553, - "Max Tomato", - "Full Health in one Tomato", - "cropTomato", - new GT_FoodStat( - 9, - 1.0F, - EnumAction.eat, - null, - false, - true, - false, - Potion.regeneration.id, - 100, - 100, - 100), - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 3L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + addItem( + tLastID = 553, + "Max Tomato", + "Full Health in one Tomato", + "cropTomato", + new GT_FoodStat( + 9, + 1.0F, + EnumAction.eat, + null, + false, + true, + false, + Potion.regeneration.id, + 100, + 100, + 100), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 3L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); ItemList.Crop_Drop_Grapes.set( - addItem( - tLastID = 554, - "Grapes", - "Source of Wine", - "cropGrape", - new GT_FoodStat(2, 0.3F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + addItem( + tLastID = 554, + "Grapes", + "Source of Wine", + "cropGrape", + new GT_FoodStat(2, 0.3F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); ItemList.Crop_Drop_Onion.set( - addItem( - tLastID = 555, - "Onion", - "Taking over the whole Taste", - "cropOnion", - new GT_FoodStat(2, 0.2F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + addItem( + tLastID = 555, + "Onion", + "Taking over the whole Taste", + "cropOnion", + new GT_FoodStat(2, 0.2F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); ItemList.Crop_Drop_Cucumber.set( - addItem( - tLastID = 556, - "Cucumber", - "Not a Sea Cucumber!", - "cropCucumber", - new GT_FoodStat(1, 0.2F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + addItem( + tLastID = 556, + "Cucumber", + "Not a Sea Cucumber!", + "cropCucumber", + new GT_FoodStat(1, 0.2F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); ItemList.Crop_Drop_Rape.set( - addItem( - tLastID = 557, - "Rape", - "Time to oil up!", - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); + addItem( + tLastID = 557, + "Rape", + "Time to oil up!", + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L))); ItemList.Food_Cheese.set( - addItem( - tLastID = 558, - "Cheese", - "Click the Cheese", - "foodCheese", - new GT_FoodStat(3, 0.6F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 2L))); + addItem( + tLastID = 558, + "Cheese", + "Click the Cheese", + "foodCheese", + new GT_FoodStat(3, 0.6F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 2L))); ItemList.Food_Dough.set( - addItem( - tLastID = 559, - "Dough", - "For making Breads", - "foodDough", - new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + addItem( + tLastID = 559, + "Dough", + "For making Breads", + "foodDough", + new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); ItemList.Food_Flat_Dough.set( - addItem( - tLastID = 560, - "Flattened Dough", - "For making Pizza", - new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + addItem( + tLastID = 560, + "Flattened Dough", + "For making Pizza", + new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); ItemList.Food_Raw_Bread.set( - addItem( - tLastID = 561, - "Dough", - "In Bread Shape", - new GT_FoodStat(1, 0.2F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + addItem( + tLastID = 561, + "Dough", + "In Bread Shape", + new GT_FoodStat(1, 0.2F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); ItemList.Food_Raw_Bun.set( - addItem( - tLastID = 562, - "Dough", - "In Bun Shape", - new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + addItem( + tLastID = 562, + "Dough", + "In Bun Shape", + new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); ItemList.Food_Raw_Baguette.set( - addItem( - tLastID = 563, - "Dough", - "In Baguette Shape", - new GT_FoodStat(1, 0.3F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + addItem( + tLastID = 563, + "Dough", + "In Baguette Shape", + new GT_FoodStat(1, 0.3F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); ItemList.Food_Baked_Bun.set( - addItem( - tLastID = 564, - "Bun", - "Do not teleport Bread!", - new GT_FoodStat(3, 0.5F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 564, + "Bun", + "Do not teleport Bread!", + new GT_FoodStat(3, 0.5F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); ItemList.Food_Baked_Baguette.set( - addItem( - tLastID = 565, - "Baguette", - "I teleported nothing BUT Bread!!!", - new GT_FoodStat(8, 0.5F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 565, + "Baguette", + "I teleported nothing BUT Bread!!!", + new GT_FoodStat(8, 0.5F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); ItemList.Food_Sliced_Bread.set( - addItem( - tLastID = 566, - "Sliced Bread", - "Just half a Bread", - new GT_FoodStat(2, 0.3F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 566, + "Sliced Bread", + "Just half a Bread", + new GT_FoodStat(2, 0.3F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); ItemList.Food_Sliced_Bun.set( - addItem( - tLastID = 567, - "Sliced Bun", - "Just half a Bun", - new GT_FoodStat(1, 0.3F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 567, + "Sliced Bun", + "Just half a Bun", + new GT_FoodStat(1, 0.3F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); ItemList.Food_Sliced_Baguette.set( - addItem( - tLastID = 568, - "Sliced Baguette", - "Just half a Baguette", - new GT_FoodStat(4, 0.3F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); + addItem( + tLastID = 568, + "Sliced Baguette", + "Just half a Baguette", + new GT_FoodStat(4, 0.3F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.IGNIS, 1L))); ItemList.Food_Raw_Cake.set( - addItem( - tLastID = 569, - "Cake Bottom", - "For making Cake", - new GT_FoodStat(2, 0.2F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + addItem( + tLastID = 569, + "Cake Bottom", + "For making Cake", + new GT_FoodStat(2, 0.2F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); ItemList.Food_Baked_Cake.set( - addItem( - tLastID = 570, - "Baked Cake Bottom", - "I know I promised you an actual Cake, but well...", - new GT_FoodStat(3, 0.3F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + addItem( + tLastID = 570, + "Baked Cake Bottom", + "I know I promised you an actual Cake, but well...", + new GT_FoodStat(3, 0.3F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); ItemList.Food_Sliced_Lemon.set( - addItem( - tLastID = 571, - "Lemon Slice", - "Ideal to put on your Drink", - new GT_FoodStat(1, 0.075F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); + addItem( + tLastID = 571, + "Lemon Slice", + "Ideal to put on your Drink", + new GT_FoodStat(1, 0.075F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); ItemList.Food_Sliced_Tomato.set( - addItem( - tLastID = 572, - "Tomato Slice", - "Solid Ketchup", - new GT_FoodStat(1, 0.05F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); + addItem( + tLastID = 572, + "Tomato Slice", + "Solid Ketchup", + new GT_FoodStat(1, 0.05F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); ItemList.Food_Sliced_Onion.set( - addItem( - tLastID = 573, - "Onion Slice", - "ONIONS, UNITE!", - new GT_FoodStat(1, 0.05F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); + addItem( + tLastID = 573, + "Onion Slice", + "ONIONS, UNITE!", + new GT_FoodStat(1, 0.05F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); ItemList.Food_Sliced_Cucumber.set( - addItem( - tLastID = 574, - "Cucumber Slice", - "QUEWWW-CUMMM-BERRR!!!", - new GT_FoodStat(1, 0.05F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); + addItem( + tLastID = 574, + "Cucumber Slice", + "QUEWWW-CUMMM-BERRR!!!", + new GT_FoodStat(1, 0.05F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 1L))); ItemList.Food_Sliced_Cheese.set( - addItem( - tLastID = 576, - "Cheese Slice", - "ALIEN ATTACK!!!, throw the CHEEEEESE!!!", - new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), - new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); + addItem( + tLastID = 576, + "Cheese Slice", + "ALIEN ATTACK!!!, throw the CHEEEEESE!!!", + new GT_FoodStat(1, 0.1F, EnumAction.eat, null, false, true, false), + new TC_Aspects.TC_AspectStack(TC_Aspects.FAMES, 1L))); ItemList.Cover_AdvancedRedstoneTransmitterExternal.set( - addItem( - tLastID = 577, - "Advanced Redstone Transmitter (External)", - "Transfers Redstone signals wirelessly", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L))); + addItem( + tLastID = 577, + "Advanced Redstone Transmitter (External)", + "Transfers Redstone signals wirelessly", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L))); ItemList.Cover_AdvancedRedstoneTransmitterInternal.set( - addItem( - tLastID = 578, - "Advanced Redstone Transmitter (Internal)", - "Transfers Redstone signals wirelessly", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L))); + addItem( + tLastID = 578, + "Advanced Redstone Transmitter (Internal)", + "Transfers Redstone signals wirelessly", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L))); ItemList.Cover_AdvancedRedstoneReceiverExternal.set( - addItem( - tLastID = 579, - "Advanced Redstone Receiver (External)", - "Transfers Redstone signals wirelessly", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L))); + addItem( + tLastID = 579, + "Advanced Redstone Receiver (External)", + "Transfers Redstone signals wirelessly", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L))); ItemList.Cover_AdvancedRedstoneReceiverInternal.set( - addItem( - tLastID = 580, - "Advanced Redstone Receiver (Internal)", - "Transfers Redstone signals wirelessly", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L))); + addItem( + tLastID = 580, + "Advanced Redstone Receiver (Internal)", + "Transfers Redstone signals wirelessly", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L))); ItemList.Cover_WirelessFluidDetector.set( - addItem( - tLastID = 581, - "Wireless Fluid Detector Cover", - "Transfers Fluid Amount as Redstone wirelessly", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))); + addItem( + tLastID = 581, + "Wireless Fluid Detector Cover", + "Transfers Fluid Amount as Redstone wirelessly", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L))); ItemList.Cover_WirelessItemDetector.set( - addItem( - tLastID = 582, - "Wireless Item Detector Cover", - "Transfers Item Amount as Redstone wirelessly", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 1L))); + addItem( + tLastID = 582, + "Wireless Item Detector Cover", + "Transfers Item Amount as Redstone wirelessly", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TERRA, 1L))); ItemList.Cover_WirelessNeedsMaintainance.set( - addItem( - tLastID = 583, - "Wireless Needs Maintenance Cover", - "Transfers Maintenance Issues as Redstone wirelessly", - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 3L))); + addItem( + tLastID = 583, + "Wireless Needs Maintenance Cover", + "Transfers Maintenance Issues as Redstone wirelessly", + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 3L))); GregTech_API.registerCover( - ItemList.Cover_AdvancedRedstoneTransmitterExternal.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ADVANCED_REDSTONE_TRANSMITTER)), - new GT_Cover_AdvancedRedstoneTransmitterExternal( - TextureFactory.of(OVERLAY_ADVANCED_REDSTONE_TRANSMITTER))); + ItemList.Cover_AdvancedRedstoneTransmitterExternal.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ADVANCED_REDSTONE_TRANSMITTER)), + new GT_Cover_AdvancedRedstoneTransmitterExternal(TextureFactory.of(OVERLAY_ADVANCED_REDSTONE_TRANSMITTER))); GregTech_API.registerCover( - ItemList.Cover_AdvancedRedstoneTransmitterInternal.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ADVANCED_REDSTONE_TRANSMITTER)), - new GT_Cover_AdvancedRedstoneTransmitterInternal( - TextureFactory.of(OVERLAY_ADVANCED_REDSTONE_TRANSMITTER))); + ItemList.Cover_AdvancedRedstoneTransmitterInternal.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ADVANCED_REDSTONE_TRANSMITTER)), + new GT_Cover_AdvancedRedstoneTransmitterInternal(TextureFactory.of(OVERLAY_ADVANCED_REDSTONE_TRANSMITTER))); GregTech_API.registerCover( - ItemList.Cover_AdvancedRedstoneReceiverExternal.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ADVANCED_REDSTONE_RECEIVER)), - new GT_Cover_AdvancedRedstoneReceiverExternal(TextureFactory.of(OVERLAY_ADVANCED_REDSTONE_RECEIVER))); + ItemList.Cover_AdvancedRedstoneReceiverExternal.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ADVANCED_REDSTONE_RECEIVER)), + new GT_Cover_AdvancedRedstoneReceiverExternal(TextureFactory.of(OVERLAY_ADVANCED_REDSTONE_RECEIVER))); GregTech_API.registerCover( - ItemList.Cover_AdvancedRedstoneReceiverInternal.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ADVANCED_REDSTONE_RECEIVER)), - new GT_Cover_AdvancedRedstoneReceiverInternal(TextureFactory.of(OVERLAY_ADVANCED_REDSTONE_RECEIVER))); + ItemList.Cover_AdvancedRedstoneReceiverInternal.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_ADVANCED_REDSTONE_RECEIVER)), + new GT_Cover_AdvancedRedstoneReceiverInternal(TextureFactory.of(OVERLAY_ADVANCED_REDSTONE_RECEIVER))); GregTech_API.registerCover( - ItemList.Cover_WirelessFluidDetector.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_WIRELESS_FLUID_DETECTOR)), - new GT_Cover_WirelessFluidDetector(TextureFactory.of(OVERLAY_WIRELESS_FLUID_DETECTOR))); + ItemList.Cover_WirelessFluidDetector.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_WIRELESS_FLUID_DETECTOR)), + new GT_Cover_WirelessFluidDetector(TextureFactory.of(OVERLAY_WIRELESS_FLUID_DETECTOR))); GregTech_API.registerCover( - ItemList.Cover_WirelessItemDetector.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_WIRELESS_ITEM_DETECTOR)), - new GT_Cover_WirelessItemDetector(TextureFactory.of(OVERLAY_WIRELESS_ITEM_DETECTOR))); + ItemList.Cover_WirelessItemDetector.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_WIRELESS_ITEM_DETECTOR)), + new GT_Cover_WirelessItemDetector(TextureFactory.of(OVERLAY_WIRELESS_ITEM_DETECTOR))); GregTech_API.registerCover( - ItemList.Cover_WirelessNeedsMaintainance.get(1L), - TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_WIRELESS_MAINTENANCE_DETECTOR)), - new GT_Cover_WirelessMaintenanceDetector(TextureFactory.of(OVERLAY_WIRELESS_MAINTENANCE_DETECTOR))); + ItemList.Cover_WirelessNeedsMaintainance.get(1L), + TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_WIRELESS_MAINTENANCE_DETECTOR)), + new GT_Cover_WirelessMaintenanceDetector(TextureFactory.of(OVERLAY_WIRELESS_MAINTENANCE_DETECTOR))); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { ItemList.Cover_RedstoneTransmitterExternal.get(1L), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 1L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Cover_AdvancedRedstoneTransmitterExternal.get(1L), - 3200, - 128); + new ItemStack[] { ItemList.Cover_RedstoneTransmitterExternal.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 1L), GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Cover_AdvancedRedstoneTransmitterExternal.get(1L), + 3200, + 128); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { ItemList.Cover_RedstoneReceiverExternal.get(1L), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 1L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Cover_AdvancedRedstoneReceiverExternal.get(1L), - 3200, - 128); + new ItemStack[] { ItemList.Cover_RedstoneReceiverExternal.get(1L), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 1L), GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Cover_AdvancedRedstoneReceiverExternal.get(1L), + 3200, + 128); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { ItemList.Cover_FluidDetector.get(1L), ItemList.Emitter_EV.get(1L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Cover_WirelessFluidDetector.get(1L), - 3200, - 128); + new ItemStack[] { ItemList.Cover_FluidDetector.get(1L), ItemList.Emitter_EV.get(1L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Cover_WirelessFluidDetector.get(1L), + 3200, + 128); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { ItemList.Cover_ItemDetector.get(1L), ItemList.Emitter_EV.get(1L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Cover_WirelessItemDetector.get(1L), - 3200, - 128); + new ItemStack[] { ItemList.Cover_ItemDetector.get(1L), ItemList.Emitter_EV.get(1L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Cover_WirelessItemDetector.get(1L), + 3200, + 128); GT_Values.RA.addAssemblerRecipe( - new ItemStack[] { ItemList.Cover_NeedsMaintainance.get(1L), ItemList.Emitter_EV.get(1L), - GT_Utility.getIntegratedCircuit(1) }, - GT_Values.NF, - ItemList.Cover_WirelessNeedsMaintainance.get(1L), - 3200, - 128); + new ItemStack[] { ItemList.Cover_NeedsMaintainance.get(1L), ItemList.Emitter_EV.get(1L), + GT_Utility.getIntegratedCircuit(1) }, + GT_Values.NF, + ItemList.Cover_WirelessNeedsMaintainance.get(1L), + 3200, + 128); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Cover_AdvancedRedstoneReceiverExternal.get(1L), - new Object[] { ItemList.Cover_AdvancedRedstoneReceiverInternal.get(1L) }); + ItemList.Cover_AdvancedRedstoneReceiverExternal.get(1L), + new Object[] { ItemList.Cover_AdvancedRedstoneReceiverInternal.get(1L) }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Cover_AdvancedRedstoneReceiverInternal.get(1L), - new Object[] { ItemList.Cover_AdvancedRedstoneReceiverExternal.get(1L) }); + ItemList.Cover_AdvancedRedstoneReceiverInternal.get(1L), + new Object[] { ItemList.Cover_AdvancedRedstoneReceiverExternal.get(1L) }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Cover_AdvancedRedstoneTransmitterExternal.get(1L), - new Object[] { ItemList.Cover_AdvancedRedstoneTransmitterInternal.get(1L) }); + ItemList.Cover_AdvancedRedstoneTransmitterExternal.get(1L), + new Object[] { ItemList.Cover_AdvancedRedstoneTransmitterInternal.get(1L) }); GT_ModHandler.addShapelessCraftingRecipe( - ItemList.Cover_AdvancedRedstoneTransmitterInternal.get(1L), - new Object[] { ItemList.Cover_AdvancedRedstoneTransmitterExternal.get(1L) }); + ItemList.Cover_AdvancedRedstoneTransmitterInternal.get(1L), + new Object[] { ItemList.Cover_AdvancedRedstoneTransmitterExternal.get(1L) }); GT_ModHandler.addExtractionRecipe(new ItemStack(Blocks.red_flower, 1, 0), new ItemStack(Items.dye, 2, 1)); GT_ModHandler.addExtractionRecipe(new ItemStack(Blocks.red_flower, 1, 1), new ItemStack(Items.dye, 2, 12)); @@ -2800,124 +2609,119 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { GT_ModHandler.addExtractionRecipe(new ItemStack(Blocks.double_plant, 1, 4), new ItemStack(Items.dye, 3, 1)); GT_ModHandler.addExtractionRecipe(new ItemStack(Blocks.double_plant, 1, 5), new ItemStack(Items.dye, 3, 9)); GT_ModHandler.addExtractionRecipe( - ItemList.Crop_Drop_Plumbilia.get(1L), - GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Lead, 1L)); + ItemList.Crop_Drop_Plumbilia.get(1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Lead, 1L)); GT_ModHandler.addExtractionRecipe( - ItemList.Crop_Drop_Argentia.get(1L), - GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Silver, 1L)); + ItemList.Crop_Drop_Argentia.get(1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Silver, 1L)); GT_ModHandler.addExtractionRecipe(ItemList.Crop_Drop_Indigo.get(1L), ItemList.Dye_Indigo.get(1L)); GT_ModHandler.addExtractionRecipe( - ItemList.Crop_Drop_MilkWart.get(1L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Milk, 1L)); + ItemList.Crop_Drop_MilkWart.get(1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Milk, 1L)); GT_ModHandler.addExtractionRecipe( - ItemList.Crop_Drop_Coppon.get(1L), - GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Copper, 1L)); + ItemList.Crop_Drop_Coppon.get(1L), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Copper, 1L)); GT_ModHandler.addExtractionRecipe( - ItemList.Crop_Drop_Tine.get(1L), - GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Tin, 1L)); + ItemList.Crop_Drop_Tine.get(1L), + 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)); + ItemList.Crop_Drop_BobsYerUncleRanks.get(4L), + ItemList.IC2_PlantballCompressed.get(1L)); GT_ModHandler.addCompressionRecipe(ItemList.Crop_Drop_Tine.get(4L), ItemList.IC2_PlantballCompressed.get(1L)); GT_ModHandler.addCompressionRecipe(ItemList.Crop_Drop_Rape.get(4L), ItemList.IC2_PlantballCompressed.get(1L)); + GT_ModHandler + .addCompressionRecipe(new ItemStack(Blocks.red_flower, 8, 32767), ItemList.IC2_PlantballCompressed.get(1L)); GT_ModHandler.addCompressionRecipe( - new ItemStack(Blocks.red_flower, 8, 32767), - ItemList.IC2_PlantballCompressed.get(1L)); - GT_ModHandler.addCompressionRecipe( - new ItemStack(Blocks.yellow_flower, 8, 32767), - ItemList.IC2_PlantballCompressed.get(1L)); + new ItemStack(Blocks.yellow_flower, 8, 32767), + ItemList.IC2_PlantballCompressed.get(1L)); GT_ModHandler.addPulverisationRecipe( - ItemList.Food_Sliced_Cheese.get(1L), - GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Cheese, 1L)); + ItemList.Food_Sliced_Cheese.get(1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Cheese, 1L)); GT_ModHandler.addPulverisationRecipe( - ItemList.Dye_Cocoa.get(1L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cocoa, 1L)); + ItemList.Dye_Cocoa.get(1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cocoa, 1L)); GT_ModHandler.addPulverisationRecipe( - ItemList.Crop_Drop_Tine.get(1L), - GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 2L)); + ItemList.Crop_Drop_Tine.get(1L), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 2L)); GT_ModHandler.addPulverisationRecipe( - new ItemStack(Blocks.melon_block, 1, 0), - new ItemStack(Items.melon, 8, 0), - new ItemStack(Items.melon_seeds, 1), - 80, - false); + new ItemStack(Blocks.melon_block, 1, 0), + new ItemStack(Items.melon, 8, 0), + new ItemStack(Items.melon_seeds, 1), + 80, + false); GT_ModHandler.addPulverisationRecipe( - new ItemStack(Blocks.pumpkin, 1, 0), - new ItemStack(Items.pumpkin_seeds, 4, 0), - null, - 0, - false); + new ItemStack(Blocks.pumpkin, 1, 0), + new ItemStack(Items.pumpkin_seeds, 4, 0), + null, + 0, + false); GT_ModHandler.addPulverisationRecipe( - new ItemStack(Items.melon, 1, 0), - new ItemStack(Items.melon_seeds, 1, 0), - null, - 0, - false); + new ItemStack(Items.melon, 1, 0), + new ItemStack(Items.melon_seeds, 1, 0), + null, + 0, + false); GT_ModHandler.addPulverisationRecipe( - new ItemStack(Items.wheat, 1, 0), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wheat, 1L), - null, - 0, - false); + new ItemStack(Items.wheat, 1, 0), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wheat, 1L), + null, + 0, + false); GT_ModHandler.addPulverisationRecipe( - GT_ModHandler.getIC2Item("crop", 1L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), - null, - 0, - false); + GT_ModHandler.getIC2Item("crop", 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), + null, + 0, + false); GT_ModHandler.addPulverisationRecipe( - new ItemStack(Items.stick, 1), - GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 2L), - null, - 0, - false); + new ItemStack(Items.stick, 1), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 2L), + null, + 0, + false); GT_ModHandler.addPulverisationRecipe( - new ItemStack(Blocks.wool, 1, 32767), - new ItemStack(Items.string, 2), - new ItemStack(Items.string, 1), - 50, - false); + new ItemStack(Blocks.wool, 1, 32767), + new ItemStack(Items.string, 2), + new ItemStack(Items.string, 1), + 50, + false); GT_ModHandler.addPulverisationRecipe( - ItemList.Tesseract.get(1), - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TranscendentMetal, 8L) }, - new int[] { 10000 }, - 32_000_000, - 100); + ItemList.Tesseract.get(1), + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.TranscendentMetal, 8L) }, + new int[] { 10000 }, + 32_000_000, + 100); 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); } } ItemList.Display_ITS_FREE.set( - addItem( - tLastID = 766, - "ITS FREE", - "(or at least almost free)", - SubTag.INVISIBLE, - new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); + addItem( + tLastID = 766, + "ITS FREE", + "(or at least almost free)", + SubTag.INVISIBLE, + new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L))); } @Override @@ -2941,7 +2745,7 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { @Override public EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, - double aZ) { + double aZ) { int aDamage = aStack.getItemDamage(); if ((aDamage >= 25000) && (aDamage < 27000)) { if (aDamage >= 26000) { @@ -2954,17 +2758,12 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { @Override public EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, - float aSpeed) { + float aSpeed) { 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); } @@ -2977,7 +2776,7 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { Materials aMaterial = GregTech_API.sGeneratedMaterials[(aDamage % 1000)]; if ((aDamage >= 25000) && (aDamage < 27000) && (aMaterial != null) && (aMaterial.mEnchantmentTools != null)) { Enchantment tEnchant = aMaterial.mEnchantmentTools == Enchantment.fortune ? Enchantment.looting - : aMaterial.mEnchantmentTools; + : aMaterial.mEnchantmentTools; if (tEnchant.type == EnumEnchantmentType.weapon) { NBTTagCompound tNBT = GT_Utility.ItemNBT.getNBT(aStack); if (!tNBT.getBoolean("GT.HasBeenUpdated")) { @@ -2993,7 +2792,7 @@ 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")); + .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 939aa650aa..594c5841f5 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 @@ -19,12 +19,12 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 { public GT_MetaGenerated_Item_03() { super( - "metaitem.03", - OrePrefixes.crateGtDust, - OrePrefixes.crateGtIngot, - OrePrefixes.crateGtGem, - OrePrefixes.crateGtPlate, - OrePrefixes.nanite); + "metaitem.03", + OrePrefixes.crateGtDust, + OrePrefixes.crateGtIngot, + OrePrefixes.crateGtGem, + OrePrefixes.crateGtPlate, + OrePrefixes.nanite); INSTANCE = this; int tLastID = 0; Object[] o = new Object[0]; @@ -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)); @@ -45,110 +45,104 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 { * diodes normal+smd transistors normal+smd capacitors normal+smd Glass Fibers */ ItemList.Circuit_Parts_ResistorSMD.set( - addItem( - tLastID = 11, - "SMD Resistor", - "Electronic Component", - OrePrefixes.componentCircuit.get(Materials.Resistor), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 11, + "SMD Resistor", + "Electronic Component", + OrePrefixes.componentCircuit.get(Materials.Resistor), + SubTag.NO_UNIFICATION)); ItemList.Circuit_Parts_Glass_Tube.set(addItem(tLastID = 12, "Glass Tube", "", o)); ItemList.Circuit_Parts_Coil.set(addItem(tLastID = 14, "Small Coil", "Basic Electronic Component", o)); ItemList.Circuit_Parts_DiodeSMD.set( - addItem( - tLastID = 16, - "SMD Diode", - "Electronic Component", - OrePrefixes.componentCircuit.get(Materials.Diode), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 16, + "SMD Diode", + "Electronic Component", + OrePrefixes.componentCircuit.get(Materials.Diode), + SubTag.NO_UNIFICATION)); ItemList.Circuit_Parts_TransistorSMD.set( - addItem( - tLastID = 18, - "SMD Transistor", - "Electronic Component", - OrePrefixes.componentCircuit.get(Materials.Transistor), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 18, + "SMD Transistor", + "Electronic Component", + OrePrefixes.componentCircuit.get(Materials.Transistor), + SubTag.NO_UNIFICATION)); ItemList.Circuit_Parts_CapacitorSMD.set( - addItem( - tLastID = 20, - "SMD Capacitor", - "Electronic Component", - OrePrefixes.componentCircuit.get(Materials.Capacitor), - SubTag.NO_UNIFICATION)); - ItemList.Circuit_Parts_GlassFiber.set( - addItem(tLastID = 21, "Glass Fiber", Materials.BorosilicateGlass.mChemicalFormula, o)); + addItem( + tLastID = 20, + "SMD Capacitor", + "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_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( - tLastID = 182, - "SMD Inductor", - "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)); + addItem( + tLastID = 182, + "SMD Inductor", + "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)); - 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, - Materials.Resistor, - ItemList.Circuit_Parts_ResistorSMD.get(1L), - true); + OrePrefixes.componentCircuit, + Materials.Resistor, + ItemList.Circuit_Parts_ResistorSMD.get(1L), + true); GT_OreDictUnificator.addAssociation( - OrePrefixes.componentCircuit, - Materials.Diode, - ItemList.Circuit_Parts_DiodeSMD.get(1L), - true); + OrePrefixes.componentCircuit, + Materials.Diode, + ItemList.Circuit_Parts_DiodeSMD.get(1L), + true); GT_OreDictUnificator.addAssociation( - OrePrefixes.componentCircuit, - Materials.Transistor, - ItemList.Circuit_Parts_TransistorSMD.get(1L), - true); + OrePrefixes.componentCircuit, + Materials.Transistor, + ItemList.Circuit_Parts_TransistorSMD.get(1L), + true); GT_OreDictUnificator.addAssociation( - OrePrefixes.componentCircuit, - Materials.Capacitor, - ItemList.Circuit_Parts_CapacitorSMD.get(1L), - true); + OrePrefixes.componentCircuit, + Materials.Capacitor, + ItemList.Circuit_Parts_CapacitorSMD.get(1L), + true); GT_OreDictUnificator.addAssociation( - OrePrefixes.componentCircuit, - Materials.Inductor, - ItemList.Circuit_Parts_InductorSMD.get(1L), - true); + OrePrefixes.componentCircuit, + Materials.Inductor, + ItemList.Circuit_Parts_InductorSMD.get(1L), + true); /** * ICs Lenses made from perfect crystals first instead of plates Monocrystalline silicon ingot @@ -163,16 +157,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)); @@ -210,8 +204,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)); @@ -242,10 +236,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 @@ -253,20 +247,20 @@ 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)); // Nand Chip ItemList.NandChip.set( - addItem( - tLastID = 75, - "NAND Chip", - "A very simple Circuit", - OrePrefixes.circuit.get(Materials.Primitive), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 75, + "NAND Chip", + "A very simple Circuit", + OrePrefixes.circuit.get(Materials.Primitive), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.NandChip.get(1), ULV); // Vacuum Tube Item01 // Basic Circuit IC2 @@ -274,31 +268,31 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 { // Integrated Logic Circuit Item01 ItemList.Circuit_Integrated_Good.set( - addItem( - tLastID = 79, - "Good Integrated Circuit", - "Good Circuit", - OrePrefixes.circuit.get(Materials.Good), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 79, + "Good Integrated Circuit", + "Good Circuit", + OrePrefixes.circuit.get(Materials.Good), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Integrated_Good.get(1), MV); // Good Integrated Circuit Item01 // Advanced Circuit IC2 ItemList.Circuit_Microprocessor.set( - addItem( - tLastID = 78, - "Microprocessor", - "A Basic Circuit", - OrePrefixes.circuit.get(Materials.Basic), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 78, + "Microprocessor", + "A Basic Circuit", + OrePrefixes.circuit.get(Materials.Basic), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Microprocessor.get(1), LV); ItemList.Circuit_Processor.set( - addItem( - tLastID = 80, - "Integrated Processor", - "A Good Circuit", - OrePrefixes.circuit.get(Materials.Good), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 80, + "Integrated Processor", + "A Good Circuit", + OrePrefixes.circuit.get(Materials.Good), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Processor.get(1), MV); // ItemList.Circuit_Computer.set(addItem(tLastID = 81, "Processor Assembly", "Advanced Circuit", new // Object[]{OrePrefixes.circuit.get(Materials.Advanced), SubTag.NO_UNIFICATION})); @@ -306,97 +300,97 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 { // Mainframe Item01 DataProcessor ItemList.Circuit_Nanoprocessor.set( - addItem( - tLastID = 82, - "Nanoprocessor", - "An Advanced Circuit", - OrePrefixes.circuit.get(Materials.Advanced), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 82, + "Nanoprocessor", + "An Advanced Circuit", + OrePrefixes.circuit.get(Materials.Advanced), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Nanoprocessor.get(1), HV); ItemList.Circuit_Nanocomputer.set( - addItem( - tLastID = 83, - "Nanoprocessor Assembly", - "An Extreme Circuit", - OrePrefixes.circuit.get(Materials.Data), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 83, + "Nanoprocessor Assembly", + "An Extreme Circuit", + OrePrefixes.circuit.get(Materials.Data), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Nanocomputer.get(1), EV); ItemList.Circuit_Elitenanocomputer.set( - addItem( - tLastID = 84, - "Elite Nanocomputer", - "An Elite Circuit", - OrePrefixes.circuit.get(Materials.Elite), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 84, + "Elite Nanocomputer", + "An Elite Circuit", + OrePrefixes.circuit.get(Materials.Elite), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Elitenanocomputer.get(1), IV); // Nanoprocessor Mainframe Item01 Energy Flow Circuit // Quantum circuits ItemList.Circuit_Quantumprocessor.set( - addItem( - tLastID = 85, - "Quantumprocessor", - "An Extreme Circuit", - OrePrefixes.circuit.get(Materials.Data), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 85, + "Quantumprocessor", + "An Extreme Circuit", + OrePrefixes.circuit.get(Materials.Data), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Quantumprocessor.get(1), EV); ItemList.Circuit_Quantumcomputer.set( - addItem( - tLastID = 86, - "Quantumprocessor Assembly", - "An Elite Circuit", - OrePrefixes.circuit.get(Materials.Elite), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 86, + "Quantumprocessor Assembly", + "An Elite Circuit", + OrePrefixes.circuit.get(Materials.Elite), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Quantumcomputer.get(1), IV); ItemList.Circuit_Masterquantumcomputer.set( - addItem( - tLastID = 87, - "Master Quantumcomputer", - "A Master Circuit", - OrePrefixes.circuit.get(Materials.Master), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 87, + "Master Quantumcomputer", + "A Master Circuit", + OrePrefixes.circuit.get(Materials.Master), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Masterquantumcomputer.get(1), LuV); ItemList.Circuit_Quantummainframe.set( - addItem( - tLastID = 88, - "Quantumprocessor Mainframe", - "An Ultimate Circuit", - OrePrefixes.circuit.get(Materials.Ultimate), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 88, + "Quantumprocessor Mainframe", + "An Ultimate Circuit", + OrePrefixes.circuit.get(Materials.Ultimate), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Quantummainframe.get(1), ZPM); // Crystal circuits ItemList.Circuit_Crystalprocessor.set( - addItem( - tLastID = 89, - "Crystalprocessor", - "An Elite Circuit", - OrePrefixes.circuit.get(Materials.Elite), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 89, + "Crystalprocessor", + "An Elite Circuit", + OrePrefixes.circuit.get(Materials.Elite), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Crystalprocessor.get(1), IV); ItemList.Circuit_Crystalcomputer.set( - addItem( - tLastID = 96, - "Crystalprocessor Assembly", - "A Master Circuit", - OrePrefixes.circuit.get(Materials.Master), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 96, + "Crystalprocessor Assembly", + "A Master Circuit", + OrePrefixes.circuit.get(Materials.Master), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Crystalcomputer.get(1), LuV); ItemList.Circuit_Ultimatecrystalcomputer.set( - addItem( - tLastID = 90, - "Ultimate Crystalcomputer", - "An Ultimate Circuit", - OrePrefixes.circuit.get(Materials.Ultimate), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 90, + "Ultimate Crystalcomputer", + "An Ultimate Circuit", + OrePrefixes.circuit.get(Materials.Ultimate), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Ultimatecrystalcomputer.get(1), ZPM); ItemList.Circuit_Crystalmainframe.set( - addItem( - tLastID = 91, - "Crystalprocessor Mainframe", - "A Super Circuit", - OrePrefixes.circuit.get(Materials.Superconductor), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 91, + "Crystalprocessor Mainframe", + "A Super Circuit", + OrePrefixes.circuit.get(Materials.Superconductor), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Crystalmainframe.get(1), UV); // ???? Scared to remove. @@ -404,264 +398,264 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 { // Wetware circuits ItemList.Circuit_Neuroprocessor.set( - addItem( - tLastID = 92, - "Wetwareprocessor", - "A Master Circuit", - OrePrefixes.circuit.get(Materials.Master), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 92, + "Wetwareprocessor", + "A Master Circuit", + OrePrefixes.circuit.get(Materials.Master), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Neuroprocessor.get(1), LuV); ItemList.Circuit_Wetwarecomputer.set( - addItem( - tLastID = 93, - "Wetwareprocessor Assembly", - "An Ultimate Circuit", - OrePrefixes.circuit.get(Materials.Ultimate), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 93, + "Wetwareprocessor Assembly", + "An Ultimate Circuit", + OrePrefixes.circuit.get(Materials.Ultimate), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Wetwarecomputer.get(1), ZPM); ItemList.Circuit_Wetwaresupercomputer.set( - addItem( - tLastID = 94, - "Wetware Supercomputer", - "A Super Circuit", - OrePrefixes.circuit.get(Materials.Superconductor), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 94, + "Wetware Supercomputer", + "A Super Circuit", + OrePrefixes.circuit.get(Materials.Superconductor), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Wetwaresupercomputer.get(1), UV); ItemList.Circuit_Wetwaremainframe.set( - addItem( - tLastID = 95, - "Wetware Mainframe", - "An Infinite Circuit", - OrePrefixes.circuit.get(Materials.Infinite), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 95, + "Wetware Mainframe", + "An Infinite Circuit", + OrePrefixes.circuit.get(Materials.Infinite), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Wetwaremainframe.get(1), UHV); // Bioware circuits. ItemList.Circuit_Bioprocessor.set( - addItem( - tLastID = 97, - "Bioprocessor", - "An Ultimate Circuit", - OrePrefixes.circuit.get(Materials.Ultimate), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 97, + "Bioprocessor", + "An Ultimate Circuit", + OrePrefixes.circuit.get(Materials.Ultimate), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Bioprocessor.get(1), ZPM); ItemList.Circuit_Biowarecomputer.set( - addItem( - tLastID = 98, - "Biowareprocessor Assembly", - "A Super Circuit", - OrePrefixes.circuit.get(Materials.Superconductor), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 98, + "Biowareprocessor Assembly", + "A Super Circuit", + OrePrefixes.circuit.get(Materials.Superconductor), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Biowarecomputer.get(1), UV); ItemList.Circuit_Biowaresupercomputer.set( - addItem( - tLastID = 99, - "Bioware Supercomputer", - "An Infinite Circuit", - OrePrefixes.circuit.get(Materials.Infinite), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 99, + "Bioware Supercomputer", + "An Infinite Circuit", + OrePrefixes.circuit.get(Materials.Infinite), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_Biowaresupercomputer.get(1), UHV); ItemList.Circuit_Biomainframe.set( - addItem( - tLastID = 120, - "Bio Mainframe", - "A Bio Circuit", - OrePrefixes.circuit.get(Materials.Bio), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 120, + "Bio Mainframe", + "A Bio Circuit", + OrePrefixes.circuit.get(Materials.Bio), + SubTag.NO_UNIFICATION)); 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_Wetware_Extreme.set( - addItem(tLastID = 105, "Extreme Wetware Lifesupport Circuit Board", "The Board that keeps life", 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( - addItem( - tLastID = 154, - "Optical Processor", - "An Optical Circuit", - OrePrefixes.circuit.get(Materials.Superconductor), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 154, + "Optical Processor", + "An Optical Circuit", + OrePrefixes.circuit.get(Materials.Superconductor), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_OpticalProcessor.get(1), UV); ItemList.Circuit_OpticalAssembly.set( - addItem( - tLastID = 155, - "Optical Assembly", - "An Optical Circuit", - OrePrefixes.circuit.get(Materials.Infinite), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 155, + "Optical Assembly", + "An Optical Circuit", + OrePrefixes.circuit.get(Materials.Infinite), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_OpticalAssembly.get(1), UHV); ItemList.Circuit_OpticalComputer.set( - addItem( - tLastID = 156, - "Optical Computer", - "An Optical Circuit", - OrePrefixes.circuit.get(Materials.Bio), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 156, + "Optical Computer", + "An Optical Circuit", + OrePrefixes.circuit.get(Materials.Bio), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_OpticalComputer.get(1), UEV); ItemList.Circuit_OpticalMainframe.set( - addItem( - tLastID = 157, - "Optical Mainframe", - "An Optical Circuit", - OrePrefixes.circuit.get(Materials.Optical), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 157, + "Optical Mainframe", + "An Optical Circuit", + OrePrefixes.circuit.get(Materials.Optical), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_OpticalMainframe.get(1), UIV); // Exotic circuits ItemList.Circuit_ExoticProcessor.set( - addItem( - tLastID = 166, - "Exotic Processor", - "An Exotic Circuit", - OrePrefixes.circuit.get(Materials.Infinite), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 166, + "Exotic Processor", + "An Exotic Circuit", + OrePrefixes.circuit.get(Materials.Infinite), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_ExoticProcessor.get(1), UHV); ItemList.Circuit_ExoticAssembly.set( - addItem( - tLastID = 167, - "Exotic Assembly", - "An Exotic Circuit", - OrePrefixes.circuit.get(Materials.Bio), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 167, + "Exotic Assembly", + "An Exotic Circuit", + OrePrefixes.circuit.get(Materials.Bio), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_ExoticAssembly.get(1), UEV); ItemList.Circuit_ExoticComputer.set( - addItem( - tLastID = 168, - "Exotic Computer", - "An Exotic Circuit", - OrePrefixes.circuit.get(Materials.Optical), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 168, + "Exotic Computer", + "An Exotic Circuit", + OrePrefixes.circuit.get(Materials.Optical), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_ExoticComputer.get(1), UIV); ItemList.Circuit_ExoticMainframe.set( - addItem( - tLastID = 169, - "Exotic Mainframe", - "An Exotic Circuit", - OrePrefixes.circuit.get(Materials.Exotic), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 169, + "Exotic Mainframe", + "An Exotic Circuit", + OrePrefixes.circuit.get(Materials.Exotic), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_ExoticMainframe.get(1), UMV); // Cosmic circuits ItemList.Circuit_CosmicProcessor.set( - addItem( - tLastID = 170, - "Cosmic Processor", - "A Cosmic Circuit", - OrePrefixes.circuit.get(Materials.Bio), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 170, + "Cosmic Processor", + "A Cosmic Circuit", + OrePrefixes.circuit.get(Materials.Bio), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_CosmicProcessor.get(1), UEV); ItemList.Circuit_CosmicAssembly.set( - addItem( - tLastID = 171, - "Cosmic Assembly", - "A Cosmic Circuit", - OrePrefixes.circuit.get(Materials.Optical), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 171, + "Cosmic Assembly", + "A Cosmic Circuit", + OrePrefixes.circuit.get(Materials.Optical), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_CosmicAssembly.get(1), UIV); ItemList.Circuit_CosmicComputer.set( - addItem( - tLastID = 172, - "Cosmic Computer", - "A Cosmic Circuit", - OrePrefixes.circuit.get(Materials.Exotic), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 172, + "Cosmic Computer", + "A Cosmic Circuit", + OrePrefixes.circuit.get(Materials.Exotic), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_CosmicComputer.get(1), UMV); ItemList.Circuit_CosmicMainframe.set( - addItem( - tLastID = 173, - "Cosmic Mainframe", - "A Cosmic Circuit", - OrePrefixes.circuit.get(Materials.Cosmic), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 173, + "Cosmic Mainframe", + "A Cosmic Circuit", + OrePrefixes.circuit.get(Materials.Cosmic), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_CosmicMainframe.get(1), UXV); // Transcendent circuits ItemList.Circuit_TranscendentProcessor.set( - addItem( - tLastID = 174, - "Temporally Transcendent Processor", - "A circuit operating outside of known spacetime", - OrePrefixes.circuit.get(Materials.Optical), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 174, + "Temporally Transcendent Processor", + "A circuit operating outside of known spacetime", + OrePrefixes.circuit.get(Materials.Optical), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_TranscendentProcessor.get(1), UIV); ItemList.Circuit_TranscendentAssembly.set( - addItem( - tLastID = 175, - "Temporally Transcendent Assembly", - "A circuit operating outside of known spacetime", - OrePrefixes.circuit.get(Materials.Exotic), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 175, + "Temporally Transcendent Assembly", + "A circuit operating outside of known spacetime", + OrePrefixes.circuit.get(Materials.Exotic), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_TranscendentAssembly.get(1), UMV); ItemList.Circuit_TranscendentComputer.set( - addItem( - tLastID = 176, - "Temporally Transcendent Computer", - "A circuit operating outside of known spacetime", - OrePrefixes.circuit.get(Materials.Cosmic), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 176, + "Temporally Transcendent Computer", + "A circuit operating outside of known spacetime", + OrePrefixes.circuit.get(Materials.Cosmic), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_TranscendentComputer.get(1), UXV); ItemList.Circuit_TranscendentMainframe.set( - addItem( - tLastID = 177, - "Temporally Transcendent Mainframe", - "A circuit operating outside of known spacetime", - OrePrefixes.circuit.get(Materials.Transcendent), - SubTag.NO_UNIFICATION)); + addItem( + tLastID = 177, + "Temporally Transcendent Mainframe", + "A circuit operating outside of known spacetime", + OrePrefixes.circuit.get(Materials.Transcendent), + SubTag.NO_UNIFICATION)); registerTieredTooltip(ItemList.Circuit_TranscendentMainframe.get(1), MAX); ItemList.Tube_Wires.set(addItem(tLastID = 110, "Tube Wires", "For the Vacuum Tubes", o)); ItemList.Cover_SolarPanel_UHV.set( - addItem( - tLastID = 130, - "Solar Panel (UHV)", - "Ultimate High Voltage Solar Panel (Needs cleaning with right click)", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 128L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 128L))); + addItem( + tLastID = 130, + "Solar Panel (UHV)", + "Ultimate High Voltage Solar Panel (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 128L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 128L))); ItemList.Cover_SolarPanel_UEV.set( - addItem( - tLastID = 131, - "Solar Panel (UEV)", - "Ultimate Extreme Voltage Solar Panel (Needs cleaning with right click)", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 256L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 256L))); + addItem( + tLastID = 131, + "Solar Panel (UEV)", + "Ultimate Extreme Voltage Solar Panel (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 256L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 256L))); ItemList.Cover_SolarPanel_UIV.set( - addItem( - tLastID = 132, - "Solar Panel (UIV)", - "Ultimate Insane Voltage Solar Panel (Needs cleaning with right click)", - new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 512L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 512L))); + addItem( + tLastID = 132, + "Solar Panel (UIV)", + "Ultimate Insane Voltage Solar Panel (Needs cleaning with right click)", + new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 512L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TENEBRAE, 512L))); GregTech_API.registerCover( - ItemList.Cover_SolarPanel_UHV.get(1L), - TextureFactory.of(SOLARPANEL_UHV), - new GT_Cover_SolarPanel(2097152)); + ItemList.Cover_SolarPanel_UHV.get(1L), + TextureFactory.of(SOLARPANEL_UHV), + new GT_Cover_SolarPanel(2097152)); GregTech_API.registerCover( - ItemList.Cover_SolarPanel_UEV.get(1L), - TextureFactory.of(SOLARPANEL_UEV), - new GT_Cover_SolarPanel(8388608)); + ItemList.Cover_SolarPanel_UEV.get(1L), + TextureFactory.of(SOLARPANEL_UEV), + new GT_Cover_SolarPanel(8388608)); GregTech_API.registerCover( - ItemList.Cover_SolarPanel_UIV.get(1L), - TextureFactory.of(SOLARPANEL_UIV), - new GT_Cover_SolarPanel(33554432)); + ItemList.Cover_SolarPanel_UIV.get(1L), + TextureFactory.of(SOLARPANEL_UIV), + new GT_Cover_SolarPanel(33554432)); ItemList.ULV_Coil.set(addItem(tLastID = 140, "Ultra Low Voltage Coil", "Primitive Coil", o)); ItemList.LV_Coil.set(addItem(tLastID = 141, "Low Voltage Coil", "Basic Coil", o)); @@ -675,8 +669,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)); @@ -684,191 +678,191 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 { ItemList.IndustrialApiary_Upgrade_Frame.set(addItem(tLastID = 199, "Upgrade Frame", "Crafting component", o)); ItemList.IndustrialApiary_Upgrade_Acceleration_1.set( - addItem( - tLastID = 200, - "Acceleration Upgrade x2", - "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 2x acceleration level/n * Energy Consumption +1 AMP LV", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 200, + "Acceleration Upgrade x2", + "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 2x acceleration level/n * Energy Consumption +1 AMP LV", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_Acceleration_2.set( - addItem( - tLastID = 201, - "Acceleration Upgrade x4", - "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 4x acceleration level/n * Energy Consumption +1 AMP MV", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 201, + "Acceleration Upgrade x4", + "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 4x acceleration level/n * Energy Consumption +1 AMP MV", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_Acceleration_3.set( - addItem( - tLastID = 202, - "Acceleration Upgrade x8", - "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 8x acceleration level/n * Energy Consumption +1 AMP HV", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 202, + "Acceleration Upgrade x8", + "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 8x acceleration level/n * Energy Consumption +1 AMP HV", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_Acceleration_4.set( - addItem( - tLastID = 203, - "Acceleration Upgrade x16", - "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 16x acceleration level/n * Energy Consumption +1 AMP EV", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 203, + "Acceleration Upgrade x16", + "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 16x acceleration level/n * Energy Consumption +1 AMP EV", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_Acceleration_5.set( - addItem( - tLastID = 204, - "Acceleration Upgrade x32", - "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 32x acceleration level/n * Energy Consumption +1 AMP IV", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 204, + "Acceleration Upgrade x32", + "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 32x acceleration level/n * Energy Consumption +1 AMP IV", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_Acceleration_6.set( - addItem( - tLastID = 205, - "Acceleration Upgrade x64", - "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 64x acceleration level/n * Energy Consumption +1 AMP LuV", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 205, + "Acceleration Upgrade x64", + "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 64x acceleration level/n * Energy Consumption +1 AMP LuV", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_Acceleration_7.set( - addItem( - tLastID = 206, - "Acceleration Upgrade x128", - "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 128x acceleration level/n * Energy Consumption +1 AMP ZPM", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 206, + "Acceleration Upgrade x128", + "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 128x acceleration level/n * Energy Consumption +1 AMP ZPM", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_Acceleration_8.set( - addItem( - tLastID = 207, - "Acceleration Upgrade x256", - "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 256x acceleration level/n * Energy Consumption +1 AMP UV", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 207, + "Acceleration Upgrade x256", + "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 256x acceleration level/n * Energy Consumption +1 AMP UV", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_Acceleration_8_Upgraded.set( - addItem( - tLastID = 208, - "Upgraded Acceleration Upgrade x256", - "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 256x acceleration level/n * Will also grant 8x production upgrade/n * Energy Consumption +1 AMP UV", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 208, + "Upgraded Acceleration Upgrade x256", + "Acceleration upgrade for Industrial Apiary/n Maximum Installed: 1/n * Unlocks 256x acceleration level/n * Will also grant 8x production upgrade/n * Energy Consumption +1 AMP UV", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_PRODUCTION.set( - addItem( - tLastID = 209, - "Production Upgrade", - "Production upgrade for Industrial Apiary/n Maximum Installed: 8/n Increases production modifier by 0.25/n Energy Consumption +40%", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 209, + "Production Upgrade", + "Production upgrade for Industrial Apiary/n Maximum Installed: 8/n Increases production modifier by 0.25/n Energy Consumption +40%", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_PLAINS.set( - addItem( - tLastID = 210, - "Plains Emulation Upgrade", - "Plains emulation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Biome Override: Plains/n * Energy Consumption +40%", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 210, + "Plains Emulation Upgrade", + "Plains emulation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Biome Override: Plains/n * Energy Consumption +40%", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_LIGHT.set( - addItem( - tLastID = 211, - "Light Upgrade", - "Light upgrade for Industrial Apiary/n Maximum Installed: 1/n * Internal Lighting/n * Energy Consumption +5%", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 211, + "Light Upgrade", + "Light upgrade for Industrial Apiary/n Maximum Installed: 1/n * Internal Lighting/n * Energy Consumption +5%", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_FLOWERING.set( - addItem( - tLastID = 212, - "Flowering Upgrade", - "Flowering upgrade for Industrial Apiary/n Maximum Installed: 8/n * Flowering and Pollination +20%/n * Energy Consumption +10%", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 212, + "Flowering Upgrade", + "Flowering upgrade for Industrial Apiary/n Maximum Installed: 8/n * Flowering and Pollination +20%/n * Energy Consumption +10%", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_WINTER.set( - addItem( - tLastID = 213, - "Winter Emulation Upgrade", - "Winter emulation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Biome Override: Taiga/n * Energy Consumption +50%", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 213, + "Winter Emulation Upgrade", + "Winter emulation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Biome Override: Taiga/n * Energy Consumption +50%", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_DRYER.set( - addItem( - tLastID = 214, - "Dryer Upgrade", - "Dryer upgrade for Industrial Apiary/n Maximum Installed: 8/n * Humidity -25%/n * Energy Consumption +5%", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 214, + "Dryer Upgrade", + "Dryer upgrade for Industrial Apiary/n Maximum Installed: 8/n * Humidity -25%/n * Energy Consumption +5%", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_AUTOMATION.set( - addItem( - tLastID = 215, - "Automation Upgrade", - "Automation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Automation/n * Energy Consumption +10%", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 215, + "Automation Upgrade", + "Automation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Automation/n * Energy Consumption +10%", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_HUMIDIFIER.set( - addItem( - tLastID = 216, - "Humidifier Upgrade", - "Humidifier upgrade for Industrial Apiary/n Maximum Installed: 8/n * Humidity +25%/n * Energy Consumption +5%", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 216, + "Humidifier Upgrade", + "Humidifier upgrade for Industrial Apiary/n Maximum Installed: 8/n * Humidity +25%/n * Energy Consumption +5%", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_HELL.set( - addItem( - tLastID = 217, - "HELL Emulation Upgrade", - "HELL emulation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Biome Override: HELL/n * Energy Consumption +50%", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 217, + "HELL Emulation Upgrade", + "HELL emulation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Biome Override: HELL/n * Energy Consumption +50%", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_POLLEN.set( - addItem( - tLastID = 218, - "Pollen Scrubber Upgrade", - "Pollen scrubber upgrade for Industrial Apiary/n Maximum Installed: 1/n * Flowering and Pollination -100%/n * Energy Consumption +30%", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 218, + "Pollen Scrubber Upgrade", + "Pollen scrubber upgrade for Industrial Apiary/n Maximum Installed: 1/n * Flowering and Pollination -100%/n * Energy Consumption +30%", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_DESERT.set( - addItem( - tLastID = 219, - "Desert Emulation Upgrade", - "Desert emulation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Biome Override: Desert/n * Energy Consumption +20%", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 219, + "Desert Emulation Upgrade", + "Desert emulation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Biome Override: Desert/n * Energy Consumption +20%", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_COOLER.set( - addItem( - tLastID = 220, - "Cooler Upgrade", - "Cooler upgrade for Industrial Apiary/n Maximum Installed: 8/n * Temperature -25%/n * Energy Consumption +5%", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 220, + "Cooler Upgrade", + "Cooler upgrade for Industrial Apiary/n Maximum Installed: 8/n * Temperature -25%/n * Energy Consumption +5%", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_LIFESPAN.set( - addItem( - tLastID = 221, - "Lifespan Upgrade", - "Lifespan upgrade for Industrial Apiary/n Maximum Installed: 4/n * Lifespan -33%/n * Energy Consumption +5%", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 221, + "Lifespan Upgrade", + "Lifespan upgrade for Industrial Apiary/n Maximum Installed: 4/n * Lifespan -33%/n * Energy Consumption +5%", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_SEAL.set( - addItem( - tLastID = 222, - "Seal Upgrade", - "Seal upgrade for Industrial Apiary/n Maximum Installed: 1/n * Rain Protection/n * Energy Consumption +5%", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 222, + "Seal Upgrade", + "Seal upgrade for Industrial Apiary/n Maximum Installed: 1/n * Rain Protection/n * Energy Consumption +5%", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_STABILIZER.set( - addItem( - tLastID = 223, - "Genetic Stabilizer Upgrade", - "Genetic stabilizer upgrade for Industrial Apiary/n Maximum Installed: 1/n * Genetic Decay -100%/n * Energy Consumption +150%", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 223, + "Genetic Stabilizer Upgrade", + "Genetic stabilizer upgrade for Industrial Apiary/n Maximum Installed: 1/n * Genetic Decay -100%/n * Energy Consumption +150%", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_JUNGLE.set( - addItem( - tLastID = 224, - "Jungle Emulation Upgrade", - "Jungle emulation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Biome Override: Jungle/n * Energy Consumption +20%", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 224, + "Jungle Emulation Upgrade", + "Jungle emulation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Biome Override: Jungle/n * Energy Consumption +20%", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_TERRITORY.set( - addItem( - tLastID = 225, - "Territory Upgrade", - "Territory upgrade for Industrial Apiary/n Maximum Installed: 4/n * Territory +50%/n * Energy Consumption +5%", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 225, + "Territory Upgrade", + "Territory upgrade for Industrial Apiary/n Maximum Installed: 4/n * Territory +50%/n * Energy Consumption +5%", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_OCEAN.set( - addItem( - tLastID = 226, - "Ocean Emulation Upgrade", - "Ocean emulation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Biome Override: Ocean/n * Energy Consumption +20%", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 226, + "Ocean Emulation Upgrade", + "Ocean emulation upgrade for Industrial Apiary/n Maximum Installed: 1/n * Biome Override: Ocean/n * Energy Consumption +20%", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_SKY.set( - addItem( - tLastID = 227, - "Open Sky Upgrade", - "Open sky upgrade for Industrial Apiary/n Maximum Installed: 1/n * Open Sky Simulation/n * Energy Consumption +5%", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 227, + "Open Sky Upgrade", + "Open sky upgrade for Industrial Apiary/n Maximum Installed: 1/n * Open Sky Simulation/n * Energy Consumption +5%", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_HEATER.set( - addItem( - tLastID = 228, - "Heater Upgrade", - "Heater upgrade for Industrial Apiary/n Maximum Installed: 8/n * Temperature +25%/n * Energy Consumption +5%", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 228, + "Heater Upgrade", + "Heater upgrade for Industrial Apiary/n Maximum Installed: 8/n * Temperature +25%/n * Energy Consumption +5%", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_SIEVE.set( - addItem( - tLastID = 229, - "Sieve Upgrade", - "Sieve upgrade for Industrial Apiary/n Maximum Installed: 1/n * Pollen Collection/n * Energy Consumption +25%", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 229, + "Sieve Upgrade", + "Sieve upgrade for Industrial Apiary/n Maximum Installed: 1/n * Pollen Collection/n * Energy Consumption +25%", + OrePrefixes.apiaryUpgrade.name())); ItemList.IndustrialApiary_Upgrade_UNLIGHT.set( - addItem( - tLastID = 231, - "Night Upgrade", - "Night upgrade for Industrial Apiary/n Maximum Installed: 1/n * Internal Darkness/n * Energy Consumption +5%", - OrePrefixes.apiaryUpgrade.name())); + addItem( + tLastID = 231, + "Night Upgrade", + "Night upgrade for Industrial Apiary/n Maximum Installed: 1/n * Internal Darkness/n * Energy Consumption +5%", + OrePrefixes.apiaryUpgrade.name())); OrePrefixes.apiaryUpgrade.add(ItemList.IndustrialApiary_Upgrade_Acceleration_1.get(1L)); OrePrefixes.apiaryUpgrade.add(ItemList.IndustrialApiary_Upgrade_Acceleration_2.get(1L)); @@ -903,165 +897,159 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 { OrePrefixes.apiaryUpgrade.add(ItemList.IndustrialApiary_Upgrade_UNLIGHT.get(1L)); ItemList.NuclearStar.set( - addItem( - 230, - "Nuclear Star", - "BY THE POWERS OF NAUGHTINESS, I COMMAND THIS PARTICULAR STAR, TO BE REALLY, REALLY HOT", - SubTag.NO_UNIFICATION)); + addItem( + 230, + "Nuclear Star", + "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( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Plate)", - "Ultra Strong Stellar Shape for making Plates")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Plate)", + "Ultra Strong Stellar Shape for making Plates")); ItemList.White_Dwarf_Shape_Extruder_Rod.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Rod)", - "Ultra Strong Stellar Shape for making Rods")); + addItem(whiteDwarfIDs++, "White Dwarf Extruder Shape (Rod)", "Ultra Strong Stellar Shape for making Rods")); ItemList.White_Dwarf_Shape_Extruder_Bolt.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Bolt)", - "Ultra Strong Stellar Shape for making Bolts")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Bolt)", + "Ultra Strong Stellar Shape for making Bolts")); ItemList.White_Dwarf_Shape_Extruder_Ring.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Ring)", - "Ultra Strong Stellar Shape for making Rings")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Ring)", + "Ultra Strong Stellar Shape for making Rings")); ItemList.White_Dwarf_Shape_Extruder_Cell.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Cell)", - "Ultra Strong Stellar Shape for making Cells")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Cell)", + "Ultra Strong Stellar Shape for making Cells")); ItemList.White_Dwarf_Shape_Extruder_Ingot.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Ingot)", - "Ultra Strong Stellar Shape for, wait, can't we just use a Furnace?")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Ingot)", + "Ultra Strong Stellar Shape for, wait, can't we just use a Furnace?")); ItemList.White_Dwarf_Shape_Extruder_Wire.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Wire)", - "Ultra Strong Stellar Shape for making Wires")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Wire)", + "Ultra Strong Stellar Shape for making Wires")); ItemList.White_Dwarf_Shape_Extruder_Casing.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Casing)", - "Ultra Strong Stellar Shape for making Item Casings")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Casing)", + "Ultra Strong Stellar Shape for making Item Casings")); ItemList.White_Dwarf_Shape_Extruder_Pipe_Tiny.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Tiny Pipe)", - "Ultra Strong Stellar Shape for making tiny Pipes")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Tiny Pipe)", + "Ultra Strong Stellar Shape for making tiny Pipes")); ItemList.White_Dwarf_Shape_Extruder_Pipe_Small.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Small Pipe)", - "Ultra Strong Stellar Shape for making small Pipes")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Small Pipe)", + "Ultra Strong Stellar Shape for making small Pipes")); ItemList.White_Dwarf_Shape_Extruder_Pipe_Medium.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Normal Pipe)", - "Ultra Strong Stellar Shape for making Pipes")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Normal Pipe)", + "Ultra Strong Stellar Shape for making Pipes")); ItemList.White_Dwarf_Shape_Extruder_Pipe_Large.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Large Pipe)", - "Ultra Strong Stellar Shape for making large Pipes")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Large Pipe)", + "Ultra Strong Stellar Shape for making large Pipes")); ItemList.White_Dwarf_Shape_Extruder_Pipe_Huge.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Huge Pipe)", - "Ultra Strong Stellar Shape for making full Block Pipes")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Huge Pipe)", + "Ultra Strong Stellar Shape for making full Block Pipes")); ItemList.White_Dwarf_Shape_Extruder_Block.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Block)", - "Ultra Strong Stellar Shape for making Blocks")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Block)", + "Ultra Strong Stellar Shape for making Blocks")); ItemList.White_Dwarf_Shape_Extruder_Sword.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Sword Blade)", - "Ultra Strong Stellar Shape for making Swords")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Sword Blade)", + "Ultra Strong Stellar Shape for making Swords")); ItemList.White_Dwarf_Shape_Extruder_Pickaxe.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Pickaxe Head)", - "Ultra Strong Stellar Shape for making Pickaxes")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Pickaxe Head)", + "Ultra Strong Stellar Shape for making Pickaxes")); ItemList.White_Dwarf_Shape_Extruder_Shovel.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Shovel Head)", - "Ultra Strong Stellar Shape for making Shovels")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Shovel Head)", + "Ultra Strong Stellar Shape for making Shovels")); ItemList.White_Dwarf_Shape_Extruder_Axe.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Axe Head)", - "Ultra Strong Stellar Shape for making Axes")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Axe Head)", + "Ultra Strong Stellar Shape for making Axes")); ItemList.White_Dwarf_Shape_Extruder_Hoe.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Hoe Head)", - "Ultra Strong Stellar Shape for making Hoes")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Hoe Head)", + "Ultra Strong Stellar Shape for making Hoes")); ItemList.White_Dwarf_Shape_Extruder_Hammer.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Hammer Head)", - "Ultra Strong Stellar Shape for making Hammers")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Hammer Head)", + "Ultra Strong Stellar Shape for making Hammers")); ItemList.White_Dwarf_Shape_Extruder_File.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (File Head)", - "Ultra Strong Stellar Shape for making Files")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (File Head)", + "Ultra Strong Stellar Shape for making Files")); ItemList.White_Dwarf_Shape_Extruder_Saw.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Saw Blade)", - "Ultra Strong Stellar Shape for making Saws")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Saw Blade)", + "Ultra Strong Stellar Shape for making Saws")); ItemList.White_Dwarf_Shape_Extruder_Gear.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Gear)", - "Ultra Strong Stellar Shape for making Gears")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Gear)", + "Ultra Strong Stellar Shape for making Gears")); ItemList.White_Dwarf_Shape_Extruder_Bottle.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Bottle)", - "Ultra Strong Stellar Shape for making Bottles")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Bottle)", + "Ultra Strong Stellar Shape for making Bottles")); ItemList.White_Dwarf_Shape_Extruder_Rotor.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Rotor)", - "Ultra Strong Stellar Shape for a Rotor")); + addItem(whiteDwarfIDs++, "White Dwarf Extruder Shape (Rotor)", "Ultra Strong Stellar Shape for a Rotor")); ItemList.White_Dwarf_Shape_Extruder_Small_Gear.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Small Gear)", - "Ultra Strong Stellar Shape for a Small Gear")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Small Gear)", + "Ultra Strong Stellar Shape for a Small Gear")); ItemList.White_Dwarf_Shape_Extruder_Turbine_Blade.set( - addItem( - whiteDwarfIDs++, - "White Dwarf Extruder Shape (Turbine Blade)", - "Ultra Strong Stellar Extruder Shape for a Turbine Blade")); + addItem( + whiteDwarfIDs++, + "White Dwarf Extruder Shape (Turbine Blade)", + "Ultra Strong Stellar Extruder Shape for a Turbine Blade")); ItemList.White_Dwarf_Shape_Extruder_ToolHeadDrill.set( - addItem( - whiteDwarfIDs, - "White Dwarf Extruder Shape (Drill Head)", - "White Dwarf Extruder Shape for a Drill Head")); + addItem( + whiteDwarfIDs, + "White Dwarf Extruder Shape (Drill Head)", + "White Dwarf Extruder Shape for a Drill Head")); } @Override public boolean doesShowInCreative(OrePrefixes aPrefix, Materials aMaterial, boolean aDoShowAllItems) { return aDoShowAllItems || (aPrefix.toString() - .toLowerCase() - .contains("nanite")); + .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 c748ae8520..8979d358f1 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 @@ -257,8 +257,8 @@ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item { // These fluids are non-GT fluids, so the mod may not be present. if (isStackAlreadySet) { throw new RuntimeException( - "Cell item for fluid " + fluidName - + " has already been created, but the fluid doesn't exist during postload"); + "Cell item for fluid " + fluidName + + " has already been created, but the fluid doesn't exist during postload"); } else { // fluid doesn't exist and this item has not been referenced return; @@ -268,13 +268,13 @@ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item { FluidStack fluidStack = new FluidStack(fluid, cellType.capacity); ItemStack emptyCell = ItemList.Cell_Empty.get(1L); - FluidContainerRegistry.registerFluidContainer( - new FluidContainerRegistry.FluidContainerData(fluidStack, aCell.mStack, emptyCell)); + FluidContainerRegistry + .registerFluidContainer(new FluidContainerRegistry.FluidContainerData(fluidStack, aCell.mStack, emptyCell)); GT_LanguageManager.addStringLocalization( - getUnlocalizedName(aCell.mStack) + ".name", - cellType.prefix.mLocalizedMaterialPre + fluid.getLocalizedName(fluidStack) - + cellType.prefix.mLocalizedMaterialPost); + getUnlocalizedName(aCell.mStack) + ".name", + cellType.prefix.mLocalizedMaterialPre + fluid.getLocalizedName(fluidStack) + + cellType.prefix.mLocalizedMaterialPost); int color = fluid.getColor(); short[] rgba = GT_Util.getRGBaArray(color); @@ -314,10 +314,10 @@ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item { @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); + .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 ce3ef4be30..aa7576911b 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 @@ -36,12 +36,12 @@ public class GT_MetaGenerated_Item_99 extends GT_MetaGenerated_Item { * modification that can be made to this list is adding new entries to the end. */ private static final ImmutableList CRACKED_CELL_TYPES = ImmutableList.of( - OrePrefixes.cellHydroCracked1, - OrePrefixes.cellHydroCracked2, - OrePrefixes.cellHydroCracked3, - OrePrefixes.cellSteamCracked1, - OrePrefixes.cellSteamCracked2, - OrePrefixes.cellSteamCracked3); + OrePrefixes.cellHydroCracked1, + OrePrefixes.cellHydroCracked2, + OrePrefixes.cellHydroCracked3, + OrePrefixes.cellSteamCracked1, + OrePrefixes.cellSteamCracked2, + OrePrefixes.cellSteamCracked3); private static final int NUM_CRACKED_CELL_TYPES = CRACKED_CELL_TYPES.size(); @@ -62,10 +62,10 @@ public class GT_MetaGenerated_Item_99 extends GT_MetaGenerated_Item { } if ((tMaterial.contains(SubTag.SMELTING_TO_FLUID)) && (!tMaterial.contains(SubTag.NO_SMELTING)) - && !tMaterial.contains(SubTag.SMELTING_TO_GEM)) { + && !tMaterial.contains(SubTag.SMELTING_TO_GEM)) { registerMolten(tMaterial, tMaterial.mMetaItemSubID); if (tMaterial.mSmeltInto != tMaterial && tMaterial.mSmeltInto.mMetaItemSubID >= 0 - && tMaterial.mSmeltInto.mMetaItemSubID < 1_000) { + && tMaterial.mSmeltInto.mMetaItemSubID < 1_000) { registerMolten(tMaterial.mSmeltInto, tMaterial.mSmeltInto.mMetaItemSubID); } } @@ -85,11 +85,11 @@ public class GT_MetaGenerated_Item_99 extends GT_MetaGenerated_Item { enabled.set(i); GT_LanguageManager.addStringLocalization( - getUnlocalizedName(tStack) + ".name", - cellMolten.getDefaultLocalNameFormatForItem(tMaterial)); + getUnlocalizedName(tStack) + ".name", + cellMolten.getDefaultLocalNameFormatForItem(tMaterial)); GT_LanguageManager.addStringLocalization( - getUnlocalizedName(tStack) + ".tooltip", - tMaterial.getToolTip(cellMolten.mMaterialAmount / M)); + getUnlocalizedName(tStack) + ".tooltip", + tMaterial.getToolTip(cellMolten.mMaterialAmount / M)); if (cellMolten.mIsUnificatable) { GT_OreDictUnificator.set(cellMolten, tMaterial, tStack); @@ -105,11 +105,11 @@ public class GT_MetaGenerated_Item_99 extends GT_MetaGenerated_Item { enabled.set(offset + i); GT_LanguageManager.addStringLocalization( - getUnlocalizedName(tStack) + ".name", - prefix.getDefaultLocalNameFormatForItem(tMaterial)); + getUnlocalizedName(tStack) + ".name", + prefix.getDefaultLocalNameFormatForItem(tMaterial)); GT_LanguageManager.addStringLocalization( - getUnlocalizedName(tStack) + ".tooltip", - tMaterial.getToolTip(prefix.mMaterialAmount / M)); + getUnlocalizedName(tStack) + ".tooltip", + tMaterial.getToolTip(prefix.mMaterialAmount / M)); if (prefix.mIsUnificatable) { GT_OreDictUnificator.set(prefix, tMaterial, tStack); @@ -179,8 +179,8 @@ public class GT_MetaGenerated_Item_99 extends GT_MetaGenerated_Item { @SideOnly(Side.CLIENT) public void getSubItems(Item aItem, CreativeTabs aCreativeTab, List aList) { enabled.stream() - .mapToObj(i -> new ItemStack(this, 1, i)) - .forEach(aList::add); + .mapToObj(i -> new ItemStack(this, 1, i)) + .forEach(aList::add); } @Override diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java index 0ee136d7fb..5ea7dadfa6 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java @@ -90,412 +90,412 @@ public class GT_MetaGenerated_Tool_01 extends GT_MetaGenerated_Tool { super("metatool.01"); INSTANCE = this; addTool( - SWORD, - "Sword", - "", - new GT_Tool_Sword(), - ToolDictNames.craftingToolSword, - ToolDictNames.craftingToolBlade, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 4L)); + SWORD, + "Sword", + "", + new GT_Tool_Sword(), + ToolDictNames.craftingToolSword, + ToolDictNames.craftingToolBlade, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 4L)); addTool( - PICKAXE, - "Pickaxe", - "", - new GT_Tool_Pickaxe(), - ToolDictNames.craftingToolPickaxe, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 4L)); + PICKAXE, + "Pickaxe", + "", + new GT_Tool_Pickaxe(), + ToolDictNames.craftingToolPickaxe, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 4L)); addTool( - SHOVEL, - "Shovel", - "", - new GT_Tool_Shovel(), - ToolDictNames.craftingToolShovel, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 4L)); + SHOVEL, + "Shovel", + "", + new GT_Tool_Shovel(), + ToolDictNames.craftingToolShovel, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 4L)); addTool( - AXE, - "Axe", - "", - new GT_Tool_Axe(), - ToolDictNames.craftingToolAxe, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); + AXE, + "Axe", + "", + new GT_Tool_Axe(), + ToolDictNames.craftingToolAxe, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); addTool( - HOE, - "Hoe", - "", - new GT_Tool_Hoe(), - ToolDictNames.craftingToolHoe, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 4L)); + HOE, + "Hoe", + "", + new GT_Tool_Hoe(), + ToolDictNames.craftingToolHoe, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 4L)); addTool( - SAW, - "Saw", - "Can also harvest Ice", - new GT_Tool_Saw(), - ToolDictNames.craftingToolSaw, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); - GregTech_API.registerTool( - addTool( - HARDHAMMER, - "Hammer", - "Crushes Ores instead of harvesting them", - new GT_Tool_HardHammer(), - ToolDictNames.craftingToolHardHammer, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), - GregTech_API.sHardHammerList); - GregTech_API.registerTool( - addTool( - SOFTMALLET, - "Soft Mallet", - "", - new GT_Tool_SoftHammer(), - ToolDictNames.craftingToolSoftHammer, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LIMUS, 4L)), - GregTech_API.sSoftHammerList); + SAW, + "Saw", + "Can also harvest Ice", + new GT_Tool_Saw(), + ToolDictNames.craftingToolSaw, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); GregTech_API.registerTool( - addTool( - WRENCH, - "Wrench", - "Hold Leftclick to dismantle Machines", - new GT_Tool_Wrench(), - ToolDictNames.craftingToolWrench, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), - GregTech_API.sWrenchList); - addTool( - FILE, - "File", - "", - new GT_Tool_File(), - ToolDictNames.craftingToolFile, + addTool( + HARDHAMMER, + "Hammer", + "Crushes Ores instead of harvesting them", + new GT_Tool_HardHammer(), + ToolDictNames.craftingToolHardHammer, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)); + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sHardHammerList); GregTech_API.registerTool( - addTool( - CROWBAR, - "Crowbar", - "Dismounts Covers and Rotates Rails", - new GT_Tool_Crowbar(), - ToolDictNames.craftingToolCrowbar, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 2L)), - GregTech_API.sCrowbarList); + addTool( + SOFTMALLET, + "Soft Mallet", + "", + new GT_Tool_SoftHammer(), + ToolDictNames.craftingToolSoftHammer, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LIMUS, 4L)), + GregTech_API.sSoftHammerList); GregTech_API.registerTool( - addTool( - SCREWDRIVER, - "Screwdriver", - "Adjusts Covers and Machines", - new GT_Tool_Screwdriver(), - ToolDictNames.craftingToolScrewdriver, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), - GregTech_API.sScrewdriverList); + addTool( + WRENCH, + "Wrench", + "Hold Leftclick to dismantle Machines", + new GT_Tool_Wrench(), + ToolDictNames.craftingToolWrench, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sWrenchList); addTool( - MORTAR, - "Mortar", - "", - new GT_Tool_Mortar(), - ToolDictNames.craftingToolMortar, + FILE, + "File", + "", + new GT_Tool_File(), + ToolDictNames.craftingToolFile, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)); + GregTech_API.registerTool( + addTool( + CROWBAR, + "Crowbar", + "Dismounts Covers and Rotates Rails", + new GT_Tool_Crowbar(), + ToolDictNames.craftingToolCrowbar, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L)); + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 2L)), + GregTech_API.sCrowbarList); GregTech_API.registerTool( - addTool( - WIRECUTTER, - "Wire Cutter", - "", - new GT_Tool_WireCutter(), - ToolDictNames.craftingToolWireCutter, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), - GregTech_API.sWireCutterList); - addTool( - SCOOP, - "Scoop", - "", - new GT_Tool_Scoop(), - ToolDictNames.craftingToolScoop, + addTool( + SCREWDRIVER, + "Screwdriver", + "Adjusts Covers and Machines", + new GT_Tool_Screwdriver(), + ToolDictNames.craftingToolScrewdriver, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.BESTIA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.PANNUS, 2L)); + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sScrewdriverList); addTool( - BRANCHCUTTER, - "Branch Cutter", + MORTAR, + "Mortar", + "", + new GT_Tool_Mortar(), + ToolDictNames.craftingToolMortar, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L)); + GregTech_API.registerTool( + addTool( + WIRECUTTER, + "Wire Cutter", "", - new GT_Tool_BranchCutter(), - ToolDictNames.craftingToolBranchCutter, + new GT_Tool_WireCutter(), + ToolDictNames.craftingToolWireCutter, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L)); - GregTech_API.registerTool( - addTool( - UNIVERSALSPADE, - "Universal Spade", - "", - new GT_Tool_UniversalSpade(), - ToolDictNames.craftingToolBlade, - ToolDictNames.craftingToolShovel, - ToolDictNames.craftingToolCrowbar, - ToolDictNames.craftingToolSaw, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 1L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L)), - GregTech_API.sCrowbarList); + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sWireCutterList); + addTool( + SCOOP, + "Scoop", + "", + new GT_Tool_Scoop(), + ToolDictNames.craftingToolScoop, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.BESTIA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PANNUS, 2L)); addTool( - KNIFE, - "Knife", + BRANCHCUTTER, + "Branch Cutter", + "", + new GT_Tool_BranchCutter(), + ToolDictNames.craftingToolBranchCutter, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L)); + GregTech_API.registerTool( + addTool( + UNIVERSALSPADE, + "Universal Spade", "", - new GT_Tool_Knife(), + new GT_Tool_UniversalSpade(), ToolDictNames.craftingToolBlade, - ToolDictNames.craftingToolKnife, + ToolDictNames.craftingToolShovel, + ToolDictNames.craftingToolCrowbar, + ToolDictNames.craftingToolSaw, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 2L)); + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 1L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L)), + GregTech_API.sCrowbarList); addTool( - BUTCHERYKNIFE, - "Butchery Knife", - "Has a slow Attack Rate", - new GT_Tool_ButcheryKnife(), - ToolDictNames.craftingToolBlade, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 4L)); + KNIFE, + "Knife", + "", + new GT_Tool_Knife(), + ToolDictNames.craftingToolBlade, + ToolDictNames.craftingToolKnife, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 2L)); + addTool( + BUTCHERYKNIFE, + "Butchery Knife", + "Has a slow Attack Rate", + new GT_Tool_ButcheryKnife(), + ToolDictNames.craftingToolBlade, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.CORPUS, 4L)); addTool( - SENSE, - "Sense", - "Because a Scythe doesn't make Sense", - new GT_Tool_Sense(), - ToolDictNames.craftingToolBlade, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.MORTUUS, 2L)); + SENSE, + "Sense", + "Because a Scythe doesn't make Sense", + new GT_Tool_Sense(), + ToolDictNames.craftingToolBlade, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.MORTUUS, 2L)); addTool( - PLOW, - "Plow", - "Used to get rid of Snow", - new GT_Tool_Plow(), - ToolDictNames.craftingToolPlow, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 2L)); + PLOW, + "Plow", + "Used to get rid of Snow", + new GT_Tool_Plow(), + ToolDictNames.craftingToolPlow, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.GELUM, 2L)); addTool( - PLUNGER, - "Plunger", - "", - new GT_Tool_Plunger(), - ToolDictNames.craftingToolPlunger, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L)); + PLUNGER, + "Plunger", + "", + new GT_Tool_Plunger(), + ToolDictNames.craftingToolPlunger, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L)); addTool( - ROLLING_PIN, - "Rolling Pin", - "", - new GT_Tool_RollingPin(), - ToolDictNames.craftingToolRollingPin, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.LIMUS, 4L)); + ROLLING_PIN, + "Rolling Pin", + "", + new GT_Tool_RollingPin(), + ToolDictNames.craftingToolRollingPin, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.LIMUS, 4L)); addTool( - DRILL_LV, - "Drill (LV)", - "", - new GT_Tool_Drill_LV(), - ToolDictNames.craftingToolMiningDrill, - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 4L)); + DRILL_LV, + "Drill (LV)", + "", + new GT_Tool_Drill_LV(), + ToolDictNames.craftingToolMiningDrill, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 4L)); addTool( - DRILL_MV, - "Drill (MV)", - "", - new GT_Tool_Drill_MV(), - ToolDictNames.craftingToolMiningDrill, - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 4L)); + DRILL_MV, + "Drill (MV)", + "", + new GT_Tool_Drill_MV(), + ToolDictNames.craftingToolMiningDrill, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 4L)); addTool( - DRILL_HV, - "Drill (HV)", - "", - new GT_Tool_Drill_HV(), - ToolDictNames.craftingToolMiningDrill, - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 4L)); + DRILL_HV, + "Drill (HV)", + "", + new GT_Tool_Drill_HV(), + ToolDictNames.craftingToolMiningDrill, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 4L)); addTool( - CHAINSAW_LV, - "Chainsaw (LV)", - "Can also harvest Ice", - new GT_Tool_Chainsaw_LV(), - ToolDictNames.craftingToolSaw, - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); + CHAINSAW_LV, + "Chainsaw (LV)", + "Can also harvest Ice", + new GT_Tool_Chainsaw_LV(), + ToolDictNames.craftingToolSaw, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); addTool( - CHAINSAW_MV, - "Chainsaw (MV)", - "Can also harvest Ice", - new GT_Tool_Chainsaw_MV(), - ToolDictNames.craftingToolSaw, - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); + CHAINSAW_MV, + "Chainsaw (MV)", + "Can also harvest Ice", + new GT_Tool_Chainsaw_MV(), + ToolDictNames.craftingToolSaw, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); addTool( - CHAINSAW_HV, - "Chainsaw (HV)", - "Can also harvest Ice", - new GT_Tool_Chainsaw_HV(), - ToolDictNames.craftingToolSaw, - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); + CHAINSAW_HV, + "Chainsaw (HV)", + "Can also harvest Ice", + new GT_Tool_Chainsaw_HV(), + ToolDictNames.craftingToolSaw, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); GregTech_API.registerTool( - addTool( - WRENCH_LV, - "Wrench (LV)", - "Hold Left Button to dismantle Machines", - new GT_Tool_Wrench_LV(), - ToolDictNames.craftingToolWrench, - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), - GregTech_API.sWrenchList); + addTool( + WRENCH_LV, + "Wrench (LV)", + "Hold Left Button to dismantle Machines", + new GT_Tool_Wrench_LV(), + ToolDictNames.craftingToolWrench, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sWrenchList); GregTech_API.registerTool( - addTool( - WRENCH_MV, - "Wrench (MV)", - "Hold Left Button to dismantle Machines", - new GT_Tool_Wrench_MV(), - ToolDictNames.craftingToolWrench, - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), - GregTech_API.sWrenchList); + addTool( + WRENCH_MV, + "Wrench (MV)", + "Hold Left Button to dismantle Machines", + new GT_Tool_Wrench_MV(), + ToolDictNames.craftingToolWrench, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sWrenchList); GregTech_API.registerTool( - addTool( - WRENCH_HV, - "Wrench (HV)", - "Hold Left Button to dismantle Machines", - new GT_Tool_Wrench_HV(), - ToolDictNames.craftingToolWrench, - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), - GregTech_API.sWrenchList); + addTool( + WRENCH_HV, + "Wrench (HV)", + "Hold Left Button to dismantle Machines", + new GT_Tool_Wrench_HV(), + ToolDictNames.craftingToolWrench, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sWrenchList); addTool( - JACKHAMMER, - "JackHammer (HV)", - "Breaks Rocks into pieces", - new GT_Tool_JackHammer(), - ToolDictNames.craftingToolJackHammer, - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L)); + JACKHAMMER, + "JackHammer (HV)", + "Breaks Rocks into pieces", + new GT_Tool_JackHammer(), + ToolDictNames.craftingToolJackHammer, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERFODIO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L)); addTool( - BUZZSAW_LV, - "Buzzsaw (LV)", - "Not suitable for harvesting Blocks", - new GT_Tool_BuzzSaw(), - ToolDictNames.craftingToolSaw, - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); + BUZZSAW_LV, + "Buzzsaw (LV)", + "Not suitable for harvesting Blocks", + new GT_Tool_BuzzSaw(), + ToolDictNames.craftingToolSaw, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); addTool( - BUZZSAW_MV, - "Buzzsaw (MV)", - "Not suitable for harvesting Blocks", - new GT_Tool_BuzzSaw(), - ToolDictNames.craftingToolSaw, - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); + BUZZSAW_MV, + "Buzzsaw (MV)", + "Not suitable for harvesting Blocks", + new GT_Tool_BuzzSaw(), + ToolDictNames.craftingToolSaw, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); addTool( - BUZZSAW_HV, - "Buzzsaw (HV)", - "Not suitable for harvesting Blocks", - new GT_Tool_BuzzSaw(), - ToolDictNames.craftingToolSaw, + BUZZSAW_HV, + "Buzzsaw (HV)", + "Not suitable for harvesting Blocks", + new GT_Tool_BuzzSaw(), + ToolDictNames.craftingToolSaw, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); + GregTech_API.registerTool( + addTool( + SCREWDRIVER_LV, + "Screwdriver (LV)", + "Adjusts Covers and Machines", + new GT_Tool_Screwdriver_LV(), + ToolDictNames.craftingToolScrewdriver, new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)); - GregTech_API.registerTool( - addTool( - SCREWDRIVER_LV, - "Screwdriver (LV)", - "Adjusts Covers and Machines", - new GT_Tool_Screwdriver_LV(), - ToolDictNames.craftingToolScrewdriver, - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), - GregTech_API.sScrewdriverList); + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sScrewdriverList); GregTech_API.registerTool( - addTool( - SCREWDRIVER_MV, - "Screwdriver (MV)", - "Adjusts Covers and Machines", - new GT_Tool_Screwdriver_LV(), - ToolDictNames.craftingToolScrewdriver, - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), - GregTech_API.sScrewdriverList); + addTool( + SCREWDRIVER_MV, + "Screwdriver (MV)", + "Adjusts Covers and Machines", + new GT_Tool_Screwdriver_LV(), + ToolDictNames.craftingToolScrewdriver, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sScrewdriverList); GregTech_API.registerTool( - addTool( - SCREWDRIVER_HV, - "Screwdriver (HV)", - "Adjusts Covers and Machines", - new GT_Tool_Screwdriver_LV(), - ToolDictNames.craftingToolScrewdriver, - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), - GregTech_API.sScrewdriverList); + addTool( + SCREWDRIVER_HV, + "Screwdriver (HV)", + "Adjusts Covers and Machines", + new GT_Tool_Screwdriver_LV(), + ToolDictNames.craftingToolScrewdriver, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sScrewdriverList); GregTech_API.registerTool( - addTool( - SOLDERING_IRON_LV, - "Soldering Iron (LV)", - "Fixes burned out Circuits. Needs soldering materials in inventory.", - new GT_Tool_Soldering_Iron(), - ToolDictNames.craftingToolSolderingIron, - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), - GregTech_API.sSolderingToolList); + addTool( + SOLDERING_IRON_LV, + "Soldering Iron (LV)", + "Fixes burned out Circuits. Needs soldering materials in inventory.", + new GT_Tool_Soldering_Iron(), + ToolDictNames.craftingToolSolderingIron, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sSolderingToolList); GregTech_API.registerTool( - addTool( - SOLDERING_IRON_MV, - "Soldering Iron (MV)", - "Fixes burned out Circuits. Needs soldering materials in inventory.", - new GT_Tool_Soldering_Iron(), - ToolDictNames.craftingToolSolderingIron, - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), - GregTech_API.sSolderingToolList); + addTool( + SOLDERING_IRON_MV, + "Soldering Iron (MV)", + "Fixes burned out Circuits. Needs soldering materials in inventory.", + new GT_Tool_Soldering_Iron(), + ToolDictNames.craftingToolSolderingIron, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sSolderingToolList); GregTech_API.registerTool( - addTool( - SOLDERING_IRON_HV, - "Soldering Iron (HV)", - "Fixes burned out Circuits. Needs soldering materials in inventory.", - new GT_Tool_Soldering_Iron(), - ToolDictNames.craftingToolSolderingIron, - new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), - GregTech_API.sSolderingToolList); + addTool( + SOLDERING_IRON_HV, + "Soldering Iron (HV)", + "Fixes burned out Circuits. Needs soldering materials in inventory.", + new GT_Tool_Soldering_Iron(), + ToolDictNames.craftingToolSolderingIron, + new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), + GregTech_API.sSolderingToolList); addTool(TURBINE_SMALL, "Small Turbine", "Turbine Rotors for your power station", new GT_Tool_Turbine_Small()); addTool(TURBINE, "Turbine", "Turbine Rotors for your power station", new GT_Tool_Turbine_Normal()); @@ -503,282 +503,279 @@ public class GT_MetaGenerated_Tool_01 extends GT_MetaGenerated_Tool { addTool(TURBINE_HUGE, "Huge Turbine", "Turbine Rotors for your power station", new GT_Tool_Turbine_Huge()); addTool( - POCKET_MULTITOOL, - "Pocket Multitool", - "6 useful Tools in one!", - new GT_Tool_Pocket_Multitool(POCKET_KNIFE), - null, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 6), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 3), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 3)); + POCKET_MULTITOOL, + "Pocket Multitool", + "6 useful Tools in one!", + new GT_Tool_Pocket_Multitool(POCKET_KNIFE), + null, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 6), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 3), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 3)); addTool( - POCKET_KNIFE, - "Pocket Multitool (Knife)", - "", - new GT_Tool_Pocket_Knife(POCKET_SAW), - ToolDictNames.craftingToolKnife, - ToolDictNames.craftingToolBlade, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 6), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 3), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 3)); + POCKET_KNIFE, + "Pocket Multitool (Knife)", + "", + new GT_Tool_Pocket_Knife(POCKET_SAW), + ToolDictNames.craftingToolKnife, + ToolDictNames.craftingToolBlade, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 6), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 3), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 3)); addTool( - POCKET_SAW, - "Pocket Multitool (Saw)", - "Can also harvest Ice", - new GT_Tool_Pocket_Saw(POCKET_FILE), - ToolDictNames.craftingToolSaw, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 6), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 3), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 3)); + POCKET_SAW, + "Pocket Multitool (Saw)", + "Can also harvest Ice", + new GT_Tool_Pocket_Saw(POCKET_FILE), + ToolDictNames.craftingToolSaw, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 6), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 3), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 3)); addTool( - POCKET_FILE, - "Pocket Multitool (File)", - "", - new GT_Tool_Pocket_File(POCKET_SCREWDRIVER), - ToolDictNames.craftingToolFile, + POCKET_FILE, + "Pocket Multitool (File)", + "", + new GT_Tool_Pocket_File(POCKET_SCREWDRIVER), + ToolDictNames.craftingToolFile, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 6), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 3), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 3)); + GregTech_API.registerTool( + addTool( + POCKET_SCREWDRIVER, + "Pocket Multitool (Screwdriver)", + "Adjusts Covers and Machines", + new GT_Tool_Pocket_Screwdriver(POCKET_WIRECUTTER), + ToolDictNames.craftingToolScrewdriver, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 6), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 3), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 3)); + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 3)), + GregTech_API.sScrewdriverList); GregTech_API.registerTool( - addTool( - POCKET_SCREWDRIVER, - "Pocket Multitool (Screwdriver)", - "Adjusts Covers and Machines", - new GT_Tool_Pocket_Screwdriver(POCKET_WIRECUTTER), - ToolDictNames.craftingToolScrewdriver, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 6), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 3), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 3)), - GregTech_API.sScrewdriverList); - GregTech_API.registerTool( - addTool( - POCKET_WIRECUTTER, - "Pocket Multitool (Wire Cutter)", - "", - new GT_Tool_Pocket_WireCutter(POCKET_BRANCHCUTTER), - ToolDictNames.craftingToolWireCutter, - new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 6), - new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 3), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 3)), - GregTech_API.sWireCutterList); - addTool( - POCKET_BRANCHCUTTER, - "Pocket Multitool (Branch Cutter)", + addTool( + POCKET_WIRECUTTER, + "Pocket Multitool (Wire Cutter)", "", - new GT_Tool_Pocket_BranchCutter(POCKET_MULTITOOL), - ToolDictNames.craftingToolBranchCutter, + new GT_Tool_Pocket_WireCutter(POCKET_BRANCHCUTTER), + ToolDictNames.craftingToolWireCutter, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 6), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 3), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 3)); + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 3)), + GregTech_API.sWireCutterList); + addTool( + POCKET_BRANCHCUTTER, + "Pocket Multitool (Branch Cutter)", + "", + new GT_Tool_Pocket_BranchCutter(POCKET_MULTITOOL), + ToolDictNames.craftingToolBranchCutter, + new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 6), + new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 3), + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 3)); + + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.Flint, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { " I ", "SIS", "SSS", 'I', new ItemStack(Items.flint, 1), 'S', OrePrefixes.stone }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.Bronze, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Bronze), 'S', OrePrefixes.stone }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.Iron, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Iron), 'S', OrePrefixes.stone }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.Steel, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Steel), 'S', OrePrefixes.stone }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.WroughtIron, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.WroughtIron), 'S', + OrePrefixes.stone }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.RedSteel, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.RedSteel), 'S', + OrePrefixes.stone }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.BlueSteel, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.BlueSteel), 'S', + OrePrefixes.stone }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.BlackSteel, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.BlackSteel), 'S', + OrePrefixes.stone }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.DamascusSteel, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.DamascusSteel), 'S', + OrePrefixes.stone }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(MORTAR, 1, Materials.Thaumium, Materials.Stone, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Thaumium), 'S', + OrePrefixes.stone }); GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Wood, Materials.Wood, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { " S", " I ", "S f", 'I', OrePrefixes.plank.get(Materials.Wood), 'S', + OrePrefixes.stick.get(Materials.Wood) }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Plastic, Materials.Plastic, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { " S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.Plastic), 'S', + OrePrefixes.stick.get(Materials.Plastic) }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Aluminium, Materials.Aluminium, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { " S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.Aluminium), 'S', + OrePrefixes.stick.get(Materials.Aluminium) }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.StainlessSteel, Materials.StainlessSteel, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { " S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.StainlessSteel), 'S', + OrePrefixes.stick.get(Materials.StainlessSteel) }); + + if (!GregTech_API.sSpecialFile.get(ConfigCategories.general, "DisableFlintTools", false)) { + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(SWORD, 1, Materials.Flint, Materials.Wood, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "F", "F", "S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', + new ItemStack(Items.flint, 1) }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(PICKAXE, 1, Materials.Flint, Materials.Wood, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "FFF", " S ", " S ", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', + new ItemStack(Items.flint, 1) }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(SHOVEL, 1, Materials.Flint, Materials.Wood, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "F", "S", "S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', + new ItemStack(Items.flint, 1) }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(AXE, 1, Materials.Flint, Materials.Wood, null), + GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "FF", "FS", " S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', + new ItemStack(Items.flint, 1) }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(HOE, 1, Materials.Flint, Materials.Wood, null), + GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "FF", " S", " S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', + new ItemStack(Items.flint, 1) }); + GT_ModHandler.addCraftingRecipe( + INSTANCE.getToolWithStats(KNIFE, 1, Materials.Flint, Materials.Wood, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { "F", "S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', + new ItemStack(Items.flint, 1) }); + + GT_ModHandler.addCraftingRecipe( INSTANCE.getToolWithStats(MORTAR, 1, Materials.Flint, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { " I ", "SIS", "SSS", 'I', new ItemStack(Items.flint, 1), 'S', OrePrefixes.stone }); - GT_ModHandler.addCraftingRecipe( + GT_ModHandler.addCraftingRecipe( INSTANCE.getToolWithStats(MORTAR, 1, Materials.Bronze, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Bronze), 'S', - OrePrefixes.stone }); - GT_ModHandler.addCraftingRecipe( + OrePrefixes.stone }); + GT_ModHandler.addCraftingRecipe( INSTANCE.getToolWithStats(MORTAR, 1, Materials.Iron, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Iron), 'S', - OrePrefixes.stone }); - GT_ModHandler.addCraftingRecipe( + OrePrefixes.stone }); + GT_ModHandler.addCraftingRecipe( INSTANCE.getToolWithStats(MORTAR, 1, Materials.Steel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Steel), 'S', - OrePrefixes.stone }); - GT_ModHandler.addCraftingRecipe( + OrePrefixes.stone }); + GT_ModHandler.addCraftingRecipe( INSTANCE.getToolWithStats(MORTAR, 1, Materials.WroughtIron, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.WroughtIron), 'S', - OrePrefixes.stone }); - GT_ModHandler.addCraftingRecipe( + OrePrefixes.stone }); + GT_ModHandler.addCraftingRecipe( INSTANCE.getToolWithStats(MORTAR, 1, Materials.RedSteel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.RedSteel), 'S', - OrePrefixes.stone }); - GT_ModHandler.addCraftingRecipe( + OrePrefixes.stone }); + GT_ModHandler.addCraftingRecipe( INSTANCE.getToolWithStats(MORTAR, 1, Materials.BlueSteel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.BlueSteel), 'S', - OrePrefixes.stone }); - GT_ModHandler.addCraftingRecipe( + OrePrefixes.stone }); + GT_ModHandler.addCraftingRecipe( INSTANCE.getToolWithStats(MORTAR, 1, Materials.BlackSteel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.BlackSteel), 'S', - OrePrefixes.stone }); - GT_ModHandler.addCraftingRecipe( + OrePrefixes.stone }); + GT_ModHandler.addCraftingRecipe( INSTANCE.getToolWithStats(MORTAR, 1, Materials.DamascusSteel, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.DamascusSteel), 'S', - OrePrefixes.stone }); - GT_ModHandler.addCraftingRecipe( + OrePrefixes.stone }); + GT_ModHandler.addCraftingRecipe( INSTANCE.getToolWithStats(MORTAR, 1, Materials.Thaumium, Materials.Stone, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Thaumium), 'S', - OrePrefixes.stone }); + OrePrefixes.stone }); - GT_ModHandler.addCraftingRecipe( + GT_ModHandler.addCraftingRecipe( INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Wood, Materials.Wood, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { " S", " I ", "S f", 'I', OrePrefixes.plank.get(Materials.Wood), 'S', - OrePrefixes.stick.get(Materials.Wood) }); - GT_ModHandler.addCraftingRecipe( + OrePrefixes.stick.get(Materials.Wood) }); + GT_ModHandler.addCraftingRecipe( INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Plastic, Materials.Plastic, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { " S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.Plastic), 'S', - OrePrefixes.stick.get(Materials.Plastic) }); - GT_ModHandler.addCraftingRecipe( + OrePrefixes.stick.get(Materials.Plastic) }); + GT_ModHandler.addCraftingRecipe( INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Aluminium, Materials.Aluminium, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { " S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.Aluminium), 'S', - OrePrefixes.stick.get(Materials.Aluminium) }); - GT_ModHandler.addCraftingRecipe( + OrePrefixes.stick.get(Materials.Aluminium) }); + GT_ModHandler.addCraftingRecipe( INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.StainlessSteel, Materials.StainlessSteel, null), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { " S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.StainlessSteel), 'S', - OrePrefixes.stick.get(Materials.StainlessSteel) }); - - if (!GregTech_API.sSpecialFile.get(ConfigCategories.general, "DisableFlintTools", false)) { - GT_ModHandler.addCraftingRecipe( - INSTANCE.getToolWithStats(SWORD, 1, Materials.Flint, Materials.Wood, null), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "F", "F", "S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', - new ItemStack(Items.flint, 1) }); - GT_ModHandler.addCraftingRecipe( - INSTANCE.getToolWithStats(PICKAXE, 1, Materials.Flint, Materials.Wood, null), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "FFF", " S ", " S ", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', - new ItemStack(Items.flint, 1) }); - GT_ModHandler.addCraftingRecipe( - INSTANCE.getToolWithStats(SHOVEL, 1, Materials.Flint, Materials.Wood, null), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "F", "S", "S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', - new ItemStack(Items.flint, 1) }); - GT_ModHandler.addCraftingRecipe( - INSTANCE.getToolWithStats(AXE, 1, Materials.Flint, Materials.Wood, null), - GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "FF", "FS", " S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', - new ItemStack(Items.flint, 1) }); - GT_ModHandler.addCraftingRecipe( - INSTANCE.getToolWithStats(HOE, 1, Materials.Flint, Materials.Wood, null), - GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "FF", " S", " S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', - new ItemStack(Items.flint, 1) }); - GT_ModHandler.addCraftingRecipe( - INSTANCE.getToolWithStats(KNIFE, 1, Materials.Flint, Materials.Wood, null), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { "F", "S", 'S', OrePrefixes.stick.get(Materials.Wood), 'F', - new ItemStack(Items.flint, 1) }); - - GT_ModHandler.addCraftingRecipe( - INSTANCE.getToolWithStats(MORTAR, 1, Materials.Flint, Materials.Stone, null), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { " I ", "SIS", "SSS", 'I', new ItemStack(Items.flint, 1), 'S', OrePrefixes.stone }); - GT_ModHandler.addCraftingRecipe( - INSTANCE.getToolWithStats(MORTAR, 1, Materials.Bronze, Materials.Stone, null), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Bronze), 'S', - OrePrefixes.stone }); - GT_ModHandler.addCraftingRecipe( - INSTANCE.getToolWithStats(MORTAR, 1, Materials.Iron, Materials.Stone, null), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Iron), 'S', - OrePrefixes.stone }); - GT_ModHandler.addCraftingRecipe( - INSTANCE.getToolWithStats(MORTAR, 1, Materials.Steel, Materials.Stone, null), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Steel), 'S', - OrePrefixes.stone }); - GT_ModHandler.addCraftingRecipe( - INSTANCE.getToolWithStats(MORTAR, 1, Materials.WroughtIron, Materials.Stone, null), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.WroughtIron), 'S', - OrePrefixes.stone }); - GT_ModHandler.addCraftingRecipe( - INSTANCE.getToolWithStats(MORTAR, 1, Materials.RedSteel, Materials.Stone, null), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.RedSteel), 'S', - OrePrefixes.stone }); + OrePrefixes.stick.get(Materials.StainlessSteel) }); GT_ModHandler.addCraftingRecipe( - INSTANCE.getToolWithStats(MORTAR, 1, Materials.BlueSteel, Materials.Stone, null), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.BlueSteel), 'S', - OrePrefixes.stone }); - GT_ModHandler.addCraftingRecipe( - INSTANCE.getToolWithStats(MORTAR, 1, Materials.BlackSteel, Materials.Stone, null), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.BlackSteel), 'S', - OrePrefixes.stone }); - GT_ModHandler.addCraftingRecipe( - INSTANCE.getToolWithStats(MORTAR, 1, Materials.DamascusSteel, Materials.Stone, null), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.DamascusSteel), 'S', - OrePrefixes.stone }); - GT_ModHandler.addCraftingRecipe( - INSTANCE.getToolWithStats(MORTAR, 1, Materials.Thaumium, Materials.Stone, null), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { " I ", "SIS", "SSS", 'I', OrePrefixes.ingot.get(Materials.Thaumium), 'S', - OrePrefixes.stone }); - - GT_ModHandler.addCraftingRecipe( - INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Wood, Materials.Wood, null), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { " S", " I ", "S f", 'I', OrePrefixes.plank.get(Materials.Wood), 'S', - OrePrefixes.stick.get(Materials.Wood) }); - GT_ModHandler.addCraftingRecipe( - INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Plastic, Materials.Plastic, null), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { " S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.Plastic), 'S', - OrePrefixes.stick.get(Materials.Plastic) }); - GT_ModHandler.addCraftingRecipe( - INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.Aluminium, Materials.Aluminium, null), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { " S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.Aluminium), 'S', - OrePrefixes.stick.get(Materials.Aluminium) }); - GT_ModHandler.addCraftingRecipe( - INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.StainlessSteel, Materials.StainlessSteel, null), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { " S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.StainlessSteel), 'S', - OrePrefixes.stick.get(Materials.StainlessSteel) }); - GT_ModHandler.addCraftingRecipe( - INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.IronWood, Materials.IronWood, null), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { " S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.IronWood), 'S', - OrePrefixes.stick.get(Materials.IronWood) }); + INSTANCE.getToolWithStats(ROLLING_PIN, 1, Materials.IronWood, Materials.IronWood, null), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { " S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.IronWood), 'S', + OrePrefixes.stick.get(Materials.IronWood) }); if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Coal", true)) { GT_ModHandler.addShapelessCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ToolDictNames.craftingToolMortar, new ItemStack(Items.coal, 1) }); + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ToolDictNames.craftingToolMortar, new ItemStack(Items.coal, 1) }); } if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Clay", true)) { GT_ModHandler.addShapelessCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Clay, 1L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ToolDictNames.craftingToolMortar, new ItemStack(Blocks.clay, 1) }); + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Clay, 1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ToolDictNames.craftingToolMortar, new ItemStack(Blocks.clay, 1) }); } if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Wheat", true)) { GT_ModHandler.addShapelessCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wheat, 1L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ToolDictNames.craftingToolMortar, new ItemStack(Items.wheat, 1) }); + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wheat, 1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ToolDictNames.craftingToolMortar, new ItemStack(Items.wheat, 1) }); } if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Flint", true)) { GT_ModHandler.addShapelessCraftingRecipe( - new ItemStack(Items.flint, 1), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ToolDictNames.craftingToolMortar, new ItemStack(Blocks.gravel, 1) }); + new ItemStack(Items.flint, 1), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ToolDictNames.craftingToolMortar, new ItemStack(Blocks.gravel, 1) }); } if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Blaze", true)) { GT_ModHandler.addShapelessCraftingRecipe( - new ItemStack(Items.blaze_powder, 2), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ToolDictNames.craftingToolMortar, new ItemStack(Items.blaze_rod, 1) }); + new ItemStack(Items.blaze_powder, 2), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ToolDictNames.craftingToolMortar, new ItemStack(Items.blaze_rod, 1) }); } } } 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 9365677773..b2fd104917 100644 --- a/src/main/java/gregtech/common/items/GT_NeutronReflector_Item.java +++ b/src/main/java/gregtech/common/items/GT_NeutronReflector_Item.java @@ -16,17 +16,10 @@ public class GT_NeutronReflector_Item extends GT_Generic_Item implements IReacto @Override public boolean acceptUraniumPulse(IReactor reactor, ItemStack yourStack, ItemStack pulsingStack, int youX, int youY, - int pulseX, int pulseY, boolean heatrun) { + 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_SensorCard_Item.java b/src/main/java/gregtech/common/items/GT_SensorCard_Item.java index 0a2b7ff9b5..818f673a5d 100644 --- a/src/main/java/gregtech/common/items/GT_SensorCard_Item.java +++ b/src/main/java/gregtech/common/items/GT_SensorCard_Item.java @@ -42,11 +42,11 @@ public class GT_SensorCard_Item extends GT_Generic_Item implements IRemoteSensor } else { aList.add(transItem("015", "Device at:")); aList.add( - String.format( - "x: %d, y: %d, z: %d", - tNBT.getInteger("x"), - tNBT.getInteger("y"), - tNBT.getInteger("z"))); + String.format( + "x: %d, y: %d, z: %d", + tNBT.getInteger("x"), + tNBT.getInteger("y"), + tNBT.getInteger("z"))); } } } @@ -62,7 +62,7 @@ public class GT_SensorCard_Item extends GT_Generic_Item implements IRemoteSensor TileEntity tTileEntity = world.getTileEntity(target.posX, target.posY, target.posZ); if (((tTileEntity instanceof IGregTechDeviceInformation)) - && (((IGregTechDeviceInformation) tTileEntity).isGivingInformation())) { + && (((IGregTechDeviceInformation) tTileEntity).isGivingInformation())) { String[] tInfoData = ((IGregTechDeviceInformation) tTileEntity).getInfoData(); for (int i = 0; i < tInfoData.length; i++) { aCard.setString("mString" + i, tInfoData[i]); diff --git a/src/main/java/gregtech/common/items/GT_VolumetricFlask.java b/src/main/java/gregtech/common/items/GT_VolumetricFlask.java index 069d7acd5b..7776af8d69 100644 --- a/src/main/java/gregtech/common/items/GT_VolumetricFlask.java +++ b/src/main/java/gregtech/common/items/GT_VolumetricFlask.java @@ -77,7 +77,7 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain @Override public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, - float xOffset, float yOffset, float zOffset) { + float xOffset, float yOffset, float zOffset) { if (player instanceof FakePlayer) { return false; } @@ -102,8 +102,8 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain ForgeDirection dir = ForgeDirection.VALID_DIRECTIONS[mop.sideHit]; FluidStack fluidStack = drainContainerStack(stack, player, 1000, true); if (placeFluid(fluidStack, world, x, y, z) - || (player.canPlayerEdit(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, mop.sideHit, stack) - && placeFluid(fluidStack, world, x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ))) { + || (player.canPlayerEdit(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, mop.sideHit, stack) + && placeFluid(fluidStack, world, x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ))) { if (!player.capabilities.isCreativeMode) drainContainerStack(stack, player, 1000, false); return true; } @@ -229,7 +229,7 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain public void getSubItems(Item item, CreativeTabs creativeTabs, List itemList) { itemList.add(new ItemStack(this)); for (Fluid fluid : FluidRegistry.getRegisteredFluids() - .values()) { + .values()) { if (fluid != null) { ItemStack stack = new ItemStack(this); setCapacity(stack, getMaxCapacity()); @@ -336,16 +336,16 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain } }; textField.setText( - String.valueOf(((GT_VolumetricFlask) getCurrentItem().getItem()).getCapacity(getCurrentItem()))); + 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); @@ -356,35 +356,34 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain addChangeAmountButton(builder, "-100", new Pos2d(82, 75), new Size(32, 20), val -> val - 100); 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)); + 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)); return builder.build(); } private void addChangeAmountButton(ModularWindow.Builder builder, String text, Pos2d pos, Size size, - Function function) { + Function 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)); + 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 c3000b9fc7..60fbeb075a 100644 --- a/src/main/java/gregtech/common/items/ItemComb.java +++ b/src/main/java/gregtech/common/items/ItemComb.java @@ -98,7 +98,7 @@ public class ItemComb extends Item implements IGT_ItemWithMaterialRenderer { @Override public String getItemStackDisplayName(ItemStack stack) { return CombType.valueOf(stack.getItemDamage()) - .getName(); + .getName(); } @Override @@ -137,120 +137,118 @@ public class ItemComb extends Item implements IGT_ItemWithMaterialRenderer { addProcessGT(CombType.LIGNIE, new Materials[] { Materials.Lignite }, Voltage.LV); addProcessGT(CombType.COAL, new Materials[] { Materials.Coal }, Voltage.LV); addCentrifugeToItemStack( - CombType.STICKY, - new ItemStack[] { ItemList.IC2_Resin.get(1), ItemList.IC2_Plantball.get(1), ItemList.FR_Wax.get(1) }, - new int[] { 50 * 100, 15 * 100, 50 * 100 }, - Voltage.ULV); + CombType.STICKY, + new ItemStack[] { ItemList.IC2_Resin.get(1), ItemList.IC2_Plantball.get(1), ItemList.FR_Wax.get(1) }, + new int[] { 50 * 100, 15 * 100, 50 * 100 }, + Voltage.ULV); addProcessGT(CombType.OIL, new Materials[] { Materials.Oilsands }, Voltage.LV); addProcessGT(CombType.APATITE, new Materials[] { Materials.Apatite }, Voltage.LV); addCentrifugeToMaterial( - CombType.ASH, - new Materials[] { Materials.DarkAsh, Materials.Ash }, - new int[] { 50 * 100, 50 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 50 * 100); + CombType.ASH, + new Materials[] { Materials.DarkAsh, Materials.Ash }, + new int[] { 50 * 100, 50 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 50 * 100); addCentrifugeToItemStack( - CombType.PHOSPHORUS, - new ItemStack[] { Materials.Phosphorus.getDust(3), Materials.TricalciumPhosphate.getDust(2), - ItemList.FR_Wax.get(1) }, - new int[] { 100 * 100, 75 * 100, 100 * 100 }, - Voltage.HV); + CombType.PHOSPHORUS, + new ItemStack[] { Materials.Phosphorus.getDust(3), Materials.TricalciumPhosphate.getDust(2), + ItemList.FR_Wax.get(1) }, + new int[] { 100 * 100, 75 * 100, 100 * 100 }, + Voltage.HV); addCentrifugeToItemStack( - CombType.MICA, - new ItemStack[] { Materials.Mica.getDust(2), ItemList.FR_Wax.get(1) }, - new int[] { 100 * 100, 75 * 100 }, - Voltage.HV); + CombType.MICA, + new ItemStack[] { Materials.Mica.getDust(2), ItemList.FR_Wax.get(1) }, + new int[] { 100 * 100, 75 * 100 }, + Voltage.HV); if (GT_Mod.gregtechproxy.mNerfedCombs) { addCentrifugeToItemStack( - CombType.LIGNIE, - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Lignite, 1), - ItemList.FR_Wax.get(1) }, - new int[] { 90 * 100, 50 * 100 }, - Voltage.ULV); + CombType.LIGNIE, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Lignite, 1), + ItemList.FR_Wax.get(1) }, + new int[] { 90 * 100, 50 * 100 }, + Voltage.ULV); addCentrifugeToItemStack( - CombType.COAL, - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 1), - ItemList.FR_Wax.get(1) }, - new int[] { 5 * 100, 50 * 100 }, - Voltage.ULV); + CombType.COAL, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 1), + ItemList.FR_Wax.get(1) }, + new int[] { 5 * 100, 50 * 100 }, + Voltage.ULV); addCentrifugeToItemStack( - CombType.OIL, - new ItemStack[] { ItemList.Crop_Drop_OilBerry.get(6), GT_Bees.drop.getStackForType(DropType.OIL), - ItemList.FR_Wax.get(1) }, - new int[] { 100 * 100, 100 * 100, 50 * 100 }, - Voltage.ULV); + CombType.OIL, + new ItemStack[] { ItemList.Crop_Drop_OilBerry.get(6), GT_Bees.drop.getStackForType(DropType.OIL), + ItemList.FR_Wax.get(1) }, + new int[] { 100 * 100, 100 * 100, 50 * 100 }, + Voltage.ULV); } else { addCentrifugeToItemStack( - CombType.LIGNIE, - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Lignite, 1), - GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Lignite, 1), - ItemList.FR_Wax.get(1) }, - new int[] { 90 * 100, 100 * 100, 50 * 100 }, - Voltage.ULV); + CombType.LIGNIE, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Lignite, 1), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Lignite, 1), ItemList.FR_Wax.get(1) }, + new int[] { 90 * 100, 100 * 100, 50 * 100 }, + Voltage.ULV); addCentrifugeToItemStack( - CombType.COAL, - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 1), - GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Coal, 1), ItemList.FR_Wax.get(1) }, - new int[] { 5 * 100, 100 * 100, 50 * 100 }, - Voltage.ULV); + CombType.COAL, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 1), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Coal, 1), ItemList.FR_Wax.get(1) }, + new int[] { 5 * 100, 100 * 100, 50 * 100 }, + Voltage.ULV); addCentrifugeToItemStack( - CombType.OIL, - new ItemStack[] { ItemList.Crop_Drop_OilBerry.get(6), GT_Bees.drop.getStackForType(DropType.OIL), - GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Oilsands, 1), - ItemList.FR_Wax.get(1) }, - new int[] { 100 * 100, 100 * 100, 100 * 100, 50 * 100 }, - Voltage.ULV); - addCentrifugeToMaterial( - CombType.APATITE, - new Materials[] { Materials.Apatite, Materials.Phosphate }, - new int[] { 100 * 100, 80 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); + CombType.OIL, + new ItemStack[] { ItemList.Crop_Drop_OilBerry.get(6), GT_Bees.drop.getStackForType(DropType.OIL), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Oilsands, 1), ItemList.FR_Wax.get(1) }, + new int[] { 100 * 100, 100 * 100, 100 * 100, 50 * 100 }, + Voltage.ULV); + addCentrifugeToMaterial( + CombType.APATITE, + new Materials[] { Materials.Apatite, Materials.Phosphate }, + new int[] { 100 * 100, 80 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); } // ic2 addCentrifugeToItemStack( - CombType.COOLANT, - new ItemStack[] { GT_Bees.drop.getStackForType(DropType.COOLANT), ItemList.FR_Wax.get(1) }, - new int[] { 100 * 100, 100 * 100 }, - Voltage.HV, - 196); + CombType.COOLANT, + new ItemStack[] { GT_Bees.drop.getStackForType(DropType.COOLANT), ItemList.FR_Wax.get(1) }, + new int[] { 100 * 100, 100 * 100 }, + Voltage.HV, + 196); addCentrifugeToItemStack( - CombType.ENERGY, - new ItemStack[] { GT_Bees.drop.getStackForType(DropType.HOT_COOLANT), - ItemList.IC2_Energium_Dust.get(1L), ItemList.FR_RefractoryWax.get(1) }, - new int[] { 20 * 100, 20 * 100, 50 * 100 }, - Voltage.HV, - 196); + CombType.ENERGY, + new ItemStack[] { GT_Bees.drop.getStackForType(DropType.HOT_COOLANT), ItemList.IC2_Energium_Dust.get(1L), + ItemList.FR_RefractoryWax.get(1) }, + new int[] { 20 * 100, 20 * 100, 50 * 100 }, + Voltage.HV, + 196); addCentrifugeToItemStack( - CombType.LAPOTRON, - new ItemStack[] { GT_Bees.drop.getStackForType(DropType.LAPIS), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.LapotronDust", 1, 0), - GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 2) }, - new int[] { 20 * 100, 15 * 100, 40 * 100 }, - Voltage.HV, - 196); + CombType.LAPOTRON, + new ItemStack[] { GT_Bees.drop.getStackForType(DropType.LAPIS), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.LapotronDust", 1, 0), + GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 2) }, + new int[] { 20 * 100, 15 * 100, 40 * 100 }, + Voltage.HV, + 196); addCentrifugeToMaterial( - CombType.PYROTHEUM, - new Materials[] { Materials.Blaze, Materials.Pyrotheum }, - new int[] { 25 * 100, 20 * 100 }, - new int[] {}, - Voltage.HV, - NI, - 30 * 100); + CombType.PYROTHEUM, + new Materials[] { Materials.Blaze, Materials.Pyrotheum }, + new int[] { 25 * 100, 20 * 100 }, + new int[] {}, + Voltage.HV, + NI, + 30 * 100); addCentrifugeToItemStack( - CombType.CRYOTHEUM, - new ItemStack[] { ItemList.FR_RefractoryWax.get(1), Materials.Cryotheum.getDust(1) }, - new int[] { 50 * 100, 100 * 100 }, - Voltage.MV); + CombType.CRYOTHEUM, + new ItemStack[] { ItemList.FR_RefractoryWax.get(1), Materials.Cryotheum.getDust(1) }, + new int[] { 50 * 100, 100 * 100 }, + Voltage.MV); addCentrifugeToItemStack( - CombType.BLIZZ, - new ItemStack[] { ItemList.FR_RefractoryWax.get(1), Materials.Blizz.getDust(1) }, - new int[] { 50 * 100, 100 * 100 }, - Voltage.MV); + CombType.BLIZZ, + new ItemStack[] { ItemList.FR_RefractoryWax.get(1), Materials.Blizz.getDust(1) }, + new int[] { 50 * 100, 100 * 100 }, + Voltage.MV); // Alloy addProcessGT(CombType.REDALLOY, new Materials[] { Materials.RedAlloy }, Voltage.LV); addProcessGT(CombType.REDSTONEALLOY, new Materials[] { Materials.RedstoneAlloy }, Voltage.LV); @@ -263,299 +261,299 @@ public class ItemComb extends Item implements IGT_ItemWithMaterialRenderer { addProcessGT(CombType.STAINLESSSTEEL, new Materials[] { Materials.StainlessSteel }, Voltage.HV); addProcessGT(CombType.BEDROCKIUM, new Materials[] { Materials.Bedrockium }, Voltage.EV); addCentrifugeToItemStack( - CombType.ENDERIUM, - new ItemStack[] { ItemList.FR_RefractoryWax.get(1), - GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.EnderiumBase, 1), - GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Enderium, 1) }, - new int[] { 50 * 100, 30 * 100, 50 * 100 }, - Voltage.HV); + CombType.ENDERIUM, + new ItemStack[] { ItemList.FR_RefractoryWax.get(1), + GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.EnderiumBase, 1), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Enderium, 1) }, + new int[] { 50 * 100, 30 * 100, 50 * 100 }, + Voltage.HV); if (GT_Mod.gregtechproxy.mNerfedCombs) { addCentrifugeToMaterial( - CombType.REDALLOY, - new Materials[] { Materials.RedAlloy }, - new int[] { 100 * 100 }, - new int[] {}, - Voltage.ULV, - ItemList.FR_RefractoryWax.get(1), - 50 * 100); - addCentrifugeToMaterial( - CombType.REDSTONEALLOY, - new Materials[] { Materials.RedstoneAlloy }, - new int[] { 100 * 100 }, - new int[] {}, - Voltage.ULV, - ItemList.FR_RefractoryWax.get(1), - 50 * 100); - addCentrifugeToMaterial( - CombType.CONDUCTIVEIRON, - new Materials[] { Materials.ConductiveIron }, - new int[] { 90 * 100 }, - new int[] {}, - Voltage.MV, - ItemList.FR_RefractoryWax.get(1), - 50 * 100); - addCentrifugeToMaterial( - CombType.VIBRANTALLOY, - new Materials[] { Materials.VibrantAlloy }, - new int[] { 70 * 100 }, - new int[] {}, - Voltage.HV, - ItemList.FR_RefractoryWax.get(1), - 50 * 100); - addCentrifugeToMaterial( - CombType.ENERGETICALLOY, - new Materials[] { Materials.EnergeticAlloy }, - new int[] { 80 * 100 }, - new int[] {}, - Voltage.HV, - ItemList.FR_RefractoryWax.get(1), - 50 * 100); - addCentrifugeToMaterial( - CombType.ELECTRICALSTEEL, - new Materials[] { Materials.ElectricalSteel }, - new int[] { 100 * 100 }, - new int[] {}, - Voltage.ULV, - ItemList.FR_RefractoryWax.get(1), - 50 * 100); - addCentrifugeToMaterial( - CombType.DARKSTEEL, - new Materials[] { Materials.DarkSteel }, - new int[] { 100 * 100 }, - new int[] {}, - Voltage.MV, - ItemList.FR_RefractoryWax.get(1), - 50 * 100); - addCentrifugeToMaterial( - CombType.PULSATINGIRON, - new Materials[] { Materials.PulsatingIron }, - new int[] { 80 * 100 }, - new int[] {}, - Voltage.HV, - ItemList.FR_RefractoryWax.get(1), - 50 * 100); - addCentrifugeToMaterial( - CombType.STAINLESSSTEEL, - new Materials[] { Materials.StainlessSteel }, - new int[] { 50 * 100 }, - new int[] {}, - Voltage.HV, - ItemList.FR_RefractoryWax.get(1), - 50 * 100); - addCentrifugeToMaterial( - CombType.BEDROCKIUM, - new Materials[] { Materials.Bedrockium }, - new int[] { 50 * 100 }, - new int[] {}, - Voltage.EV, - ItemList.FR_RefractoryWax.get(1), - 50 * 100); + CombType.REDALLOY, + new Materials[] { Materials.RedAlloy }, + new int[] { 100 * 100 }, + new int[] {}, + Voltage.ULV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.REDSTONEALLOY, + new Materials[] { Materials.RedstoneAlloy }, + new int[] { 100 * 100 }, + new int[] {}, + Voltage.ULV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.CONDUCTIVEIRON, + new Materials[] { Materials.ConductiveIron }, + new int[] { 90 * 100 }, + new int[] {}, + Voltage.MV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.VIBRANTALLOY, + new Materials[] { Materials.VibrantAlloy }, + new int[] { 70 * 100 }, + new int[] {}, + Voltage.HV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.ENERGETICALLOY, + new Materials[] { Materials.EnergeticAlloy }, + new int[] { 80 * 100 }, + new int[] {}, + Voltage.HV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.ELECTRICALSTEEL, + new Materials[] { Materials.ElectricalSteel }, + new int[] { 100 * 100 }, + new int[] {}, + Voltage.ULV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.DARKSTEEL, + new Materials[] { Materials.DarkSteel }, + new int[] { 100 * 100 }, + new int[] {}, + Voltage.MV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.PULSATINGIRON, + new Materials[] { Materials.PulsatingIron }, + new int[] { 80 * 100 }, + new int[] {}, + Voltage.HV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.STAINLESSSTEEL, + new Materials[] { Materials.StainlessSteel }, + new int[] { 50 * 100 }, + new int[] {}, + Voltage.HV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.BEDROCKIUM, + new Materials[] { Materials.Bedrockium }, + new int[] { 50 * 100 }, + new int[] {}, + Voltage.EV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); } else { addCentrifugeToMaterial( - CombType.REDALLOY, - new Materials[] { Materials.RedAlloy, Materials.Redstone, Materials.Copper }, - new int[] { 100 * 100, 75 * 100, 90 * 100 }, - new int[] {}, - Voltage.ULV, - ItemList.FR_RefractoryWax.get(1), - 50 * 100); - addCentrifugeToMaterial( - CombType.REDSTONEALLOY, - new Materials[] { Materials.RedstoneAlloy, Materials.Redstone, Materials.Silicon, Materials.Coal }, - new int[] { 100 * 100, 90 * 100, 75 * 100, 75 * 100 }, - new int[] {}, - Voltage.ULV, - ItemList.FR_RefractoryWax.get(1), - 50 * 100); - addCentrifugeToMaterial( - CombType.CONDUCTIVEIRON, - new Materials[] { Materials.ConductiveIron, Materials.Silver, Materials.Iron }, - new int[] { 90 * 100, 55 * 100, 65 * 100 }, - new int[] {}, - Voltage.MV, - ItemList.FR_RefractoryWax.get(1), - 50 * 100); - addCentrifugeToMaterial( - CombType.VIBRANTALLOY, - new Materials[] { Materials.VibrantAlloy, Materials.Chrome }, - new int[] { 70 * 100, 50 * 100 }, - new int[] {}, - Voltage.HV, - ItemList.FR_RefractoryWax.get(1), - 50 * 100); - addCentrifugeToMaterial( - CombType.ENERGETICALLOY, - new Materials[] { Materials.EnergeticAlloy, Materials.Gold }, - new int[] { 80 * 100, 60 * 100 }, - new int[] {}, - Voltage.HV, - ItemList.FR_RefractoryWax.get(1), - 50 * 100); - addCentrifugeToMaterial( - CombType.ELECTRICALSTEEL, - new Materials[] { Materials.ElectricalSteel, Materials.Silicon, Materials.Coal }, - new int[] { 100 * 100, 75 * 100, 75 * 100 }, - new int[] {}, - Voltage.ULV, - ItemList.FR_RefractoryWax.get(1), - 50 * 100); - addCentrifugeToMaterial( - CombType.DARKSTEEL, - new Materials[] { Materials.DarkSteel, Materials.Coal }, - new int[] { 100 * 100, 75 * 100 }, - new int[] {}, - Voltage.MV, - ItemList.FR_RefractoryWax.get(1), - 50 * 100); - addCentrifugeToMaterial( - CombType.PULSATINGIRON, - new Materials[] { Materials.PulsatingIron, Materials.Iron }, - new int[] { 80 * 100, 75 * 100 }, - new int[] {}, - Voltage.HV, - ItemList.FR_RefractoryWax.get(1), - 50 * 100); - addCentrifugeToMaterial( - CombType.STAINLESSSTEEL, - new Materials[] { Materials.StainlessSteel, Materials.Iron, Materials.Chrome, Materials.Manganese, - Materials.Nickel }, - new int[] { 50 * 100, 75 * 100, 55 * 100, 75 * 100, 75 * 100 }, - new int[] {}, - Voltage.HV, - ItemList.FR_RefractoryWax.get(1), - 50 * 100); - addCentrifugeToMaterial( - CombType.BEDROCKIUM, - new Materials[] { Materials.Bedrockium }, - new int[] { 50 * 100 }, - new int[] {}, - Voltage.EV, - ItemList.FR_RefractoryWax.get(1), - 50 * 100); + CombType.REDALLOY, + new Materials[] { Materials.RedAlloy, Materials.Redstone, Materials.Copper }, + new int[] { 100 * 100, 75 * 100, 90 * 100 }, + new int[] {}, + Voltage.ULV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.REDSTONEALLOY, + new Materials[] { Materials.RedstoneAlloy, Materials.Redstone, Materials.Silicon, Materials.Coal }, + new int[] { 100 * 100, 90 * 100, 75 * 100, 75 * 100 }, + new int[] {}, + Voltage.ULV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.CONDUCTIVEIRON, + new Materials[] { Materials.ConductiveIron, Materials.Silver, Materials.Iron }, + new int[] { 90 * 100, 55 * 100, 65 * 100 }, + new int[] {}, + Voltage.MV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.VIBRANTALLOY, + new Materials[] { Materials.VibrantAlloy, Materials.Chrome }, + new int[] { 70 * 100, 50 * 100 }, + new int[] {}, + Voltage.HV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.ENERGETICALLOY, + new Materials[] { Materials.EnergeticAlloy, Materials.Gold }, + new int[] { 80 * 100, 60 * 100 }, + new int[] {}, + Voltage.HV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.ELECTRICALSTEEL, + new Materials[] { Materials.ElectricalSteel, Materials.Silicon, Materials.Coal }, + new int[] { 100 * 100, 75 * 100, 75 * 100 }, + new int[] {}, + Voltage.ULV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.DARKSTEEL, + new Materials[] { Materials.DarkSteel, Materials.Coal }, + new int[] { 100 * 100, 75 * 100 }, + new int[] {}, + Voltage.MV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.PULSATINGIRON, + new Materials[] { Materials.PulsatingIron, Materials.Iron }, + new int[] { 80 * 100, 75 * 100 }, + new int[] {}, + Voltage.HV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.STAINLESSSTEEL, + new Materials[] { Materials.StainlessSteel, Materials.Iron, Materials.Chrome, Materials.Manganese, + Materials.Nickel }, + new int[] { 50 * 100, 75 * 100, 55 * 100, 75 * 100, 75 * 100 }, + new int[] {}, + Voltage.HV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); + addCentrifugeToMaterial( + CombType.BEDROCKIUM, + new Materials[] { Materials.Bedrockium }, + new int[] { 50 * 100 }, + new int[] {}, + Voltage.EV, + ItemList.FR_RefractoryWax.get(1), + 50 * 100); } // Thaumic addProcessGT(CombType.THAUMIUMDUST, new Materials[] { Materials.Thaumium }, Voltage.MV); addCentrifugeToItemStack( - CombType.THAUMIUMSHARD, - new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1, 1), - GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1, 2), - GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1, 3), - GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1, 4), - GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1, 5), - GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1, 6), - GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0) }, - new int[] { 20 * 100, 20 * 100, 20 * 100, 20 * 100, 20 * 100, 20 * 100, 50 * 100 }, - Voltage.ULV); + CombType.THAUMIUMSHARD, + new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1, 1), + GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1, 2), + GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1, 3), + GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1, 4), + GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1, 5), + GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1, 6), + GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0) }, + new int[] { 20 * 100, 20 * 100, 20 * 100, 20 * 100, 20 * 100, 20 * 100, 50 * 100 }, + Voltage.ULV); addProcessGT(CombType.AMBER, new Materials[] { Materials.Amber }, Voltage.LV); addProcessGT(CombType.QUICKSILVER, new Materials[] { Materials.Cinnabar }, Voltage.LV); addCentrifugeToItemStack( - CombType.SALISMUNDUS, - new ItemStack[] { GT_ModHandler.getModItem(Thaumcraft.ID, "ItemResource", 1, 14), - GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0) }, - new int[] { 100 * 100, 50 * 100 }, - Voltage.MV); + CombType.SALISMUNDUS, + new ItemStack[] { GT_ModHandler.getModItem(Thaumcraft.ID, "ItemResource", 1, 14), + GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0) }, + new int[] { 100 * 100, 50 * 100 }, + Voltage.MV); addCentrifugeToItemStack( - CombType.TAINTED, - new ItemStack[] { GT_ModHandler.getModItem(Thaumcraft.ID, "ItemResource", 1, 11), - GT_ModHandler.getModItem(Thaumcraft.ID, "ItemResource", 1, 12), - GT_ModHandler.getModItem(Thaumcraft.ID, "blockTaintFibres", 1, 0), - GT_ModHandler.getModItem(Thaumcraft.ID, "blockTaintFibres", 1, 1), - GT_ModHandler.getModItem(Thaumcraft.ID, "blockTaintFibres", 1, 2), - GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0) }, - new int[] { 15 * 100, 15 * 100, 15 * 100, 15 * 100, 15 * 100, 50 * 100 }, - Voltage.ULV); + CombType.TAINTED, + new ItemStack[] { GT_ModHandler.getModItem(Thaumcraft.ID, "ItemResource", 1, 11), + GT_ModHandler.getModItem(Thaumcraft.ID, "ItemResource", 1, 12), + GT_ModHandler.getModItem(Thaumcraft.ID, "blockTaintFibres", 1, 0), + GT_ModHandler.getModItem(Thaumcraft.ID, "blockTaintFibres", 1, 1), + GT_ModHandler.getModItem(Thaumcraft.ID, "blockTaintFibres", 1, 2), + GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0) }, + new int[] { 15 * 100, 15 * 100, 15 * 100, 15 * 100, 15 * 100, 50 * 100 }, + Voltage.ULV); addProcessGT(CombType.MITHRIL, new Materials[] { Materials.Mithril }, Voltage.HV); addProcessGT(CombType.ASTRALSILVER, new Materials[] { Materials.AstralSilver }, Voltage.HV); addCentrifugeToMaterial( - CombType.ASTRALSILVER, - new Materials[] { Materials.AstralSilver, Materials.Silver }, - new int[] { 20 * 100, (GT_Mod.gregtechproxy.mNerfedCombs ? 10 : 75) * 100 }, - new int[] {}, - Voltage.HV, - GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0), - 50 * 100); + CombType.ASTRALSILVER, + new Materials[] { Materials.AstralSilver, Materials.Silver }, + new int[] { 20 * 100, (GT_Mod.gregtechproxy.mNerfedCombs ? 10 : 75) * 100 }, + new int[] {}, + Voltage.HV, + GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0), + 50 * 100); addCentrifugeToItemStack( - CombType.THAUMINITE, - new ItemStack[] { GT_ModHandler.getModItem(ThaumicBases.ID, "resource", 1, 0), - GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Thaumium, 1), - GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0) }, - new int[] { 20 * 100, 10 * 100, 50 * 100 }, - Voltage.HV); + CombType.THAUMINITE, + new ItemStack[] { GT_ModHandler.getModItem(ThaumicBases.ID, "resource", 1, 0), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Thaumium, 1), + GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0) }, + new int[] { 20 * 100, 10 * 100, 50 * 100 }, + Voltage.HV); addProcessGT(CombType.SHADOWMETAL, new Materials[] { Materials.Shadow }, Voltage.HV); addCentrifugeToMaterial( - CombType.SHADOWMETAL, - new Materials[] { Materials.Shadow, Materials.ShadowSteel }, - new int[] { (GT_Mod.gregtechproxy.mNerfedCombs ? 20 : 75) * 100, 10 * 100 }, - new int[] {}, - Voltage.HV, - GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0), - 50 * 100); + CombType.SHADOWMETAL, + new Materials[] { Materials.Shadow, Materials.ShadowSteel }, + new int[] { (GT_Mod.gregtechproxy.mNerfedCombs ? 20 : 75) * 100, 10 * 100 }, + new int[] {}, + Voltage.HV, + GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0), + 50 * 100); addProcessGT(CombType.DIVIDED, new Materials[] { Materials.Diamond }, Voltage.HV); addCentrifugeToItemStack( - CombType.DIVIDED, - new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0), - GT_ModHandler.getModItem(ExtraUtilities.ID, "unstableingot", 1, 1), - GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Iron, 1), - GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Diamond, 1) }, - new int[] { 50 * 100, 20 * 100, (GT_Mod.gregtechproxy.mNerfedCombs ? 10 : 75) * 100, - (GT_Mod.gregtechproxy.mNerfedCombs ? 5 : 55) * 100 }, - Voltage.HV); + CombType.DIVIDED, + new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0), + GT_ModHandler.getModItem(ExtraUtilities.ID, "unstableingot", 1, 1), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Iron, 1), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Diamond, 1) }, + new int[] { 50 * 100, 20 * 100, (GT_Mod.gregtechproxy.mNerfedCombs ? 10 : 75) * 100, + (GT_Mod.gregtechproxy.mNerfedCombs ? 5 : 55) * 100 }, + Voltage.HV); addProcessGT(CombType.SPARKELING, new Materials[] { Materials.NetherStar }, Voltage.EV); addCentrifugeToItemStack( - CombType.SPARKELING, - new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0), - GT_ModHandler.getModItem(MagicBees.ID, "miscResources", 2, 5), - GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.NetherStar, 1) }, - new int[] { 50 * 100, 10 * 100, (GT_Mod.gregtechproxy.mNerfedCombs ? 10 : 50) * 100 }, - Voltage.EV); + CombType.SPARKELING, + new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0), + GT_ModHandler.getModItem(MagicBees.ID, "miscResources", 2, 5), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.NetherStar, 1) }, + new int[] { 50 * 100, 10 * 100, (GT_Mod.gregtechproxy.mNerfedCombs ? 10 : 50) * 100 }, + Voltage.EV); if (GT_Mod.gregtechproxy.mNerfedCombs) { addCentrifugeToMaterial( - CombType.THAUMIUMDUST, - new Materials[] { Materials.Thaumium }, - new int[] { 100 * 100 }, - new int[] {}, - Voltage.MV, - GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0), - 50 * 100); + CombType.THAUMIUMDUST, + new Materials[] { Materials.Thaumium }, + new int[] { 100 * 100 }, + new int[] {}, + Voltage.MV, + GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0), + 50 * 100); addCentrifugeToItemStack( - CombType.QUICKSILVER, - new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0), - GT_ModHandler.getModItem(Thaumcraft.ID, "ItemNugget", 1, 5) }, - new int[] { 50 * 100, 100 * 100 }, - Voltage.ULV); + CombType.QUICKSILVER, + new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0), + GT_ModHandler.getModItem(Thaumcraft.ID, "ItemNugget", 1, 5) }, + new int[] { 50 * 100, 100 * 100 }, + Voltage.ULV); } else { addCentrifugeToMaterial( - CombType.THAUMIUMDUST, - new Materials[] { Materials.Thaumium, Materials.Iron }, - new int[] { 100 * 100, 75 * 100 }, - new int[] {}, - Voltage.MV, - GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0), - 50 * 100); - addCentrifugeToMaterial( - CombType.AMBER, - new Materials[] { Materials.Amber }, - new int[] { 100 * 100 }, - new int[] {}, - Voltage.ULV, - GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0), - 50 * 100); + CombType.THAUMIUMDUST, + new Materials[] { Materials.Thaumium, Materials.Iron }, + new int[] { 100 * 100, 75 * 100 }, + new int[] {}, + Voltage.MV, + GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0), + 50 * 100); + addCentrifugeToMaterial( + CombType.AMBER, + new Materials[] { Materials.Amber }, + new int[] { 100 * 100 }, + new int[] {}, + Voltage.ULV, + GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0), + 50 * 100); addCentrifugeToItemStack( - CombType.QUICKSILVER, - new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0), - GT_ModHandler.getModItem(Thaumcraft.ID, "ItemNugget", 1, 5), - GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Cinnabar, 1) }, - new int[] { 50 * 100, 100 * 100, 85 * 100 }, - Voltage.ULV); - addCentrifugeToMaterial( - CombType.MITHRIL, - new Materials[] { Materials.Mithril, Materials.Platinum }, - new int[] { 75 * 100, 55 * 100 }, - new int[] {}, - Voltage.HV, - GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0), - 50 * 100); + CombType.QUICKSILVER, + new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0), + GT_ModHandler.getModItem(Thaumcraft.ID, "ItemNugget", 1, 5), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Cinnabar, 1) }, + new int[] { 50 * 100, 100 * 100, 85 * 100 }, + Voltage.ULV); + addCentrifugeToMaterial( + CombType.MITHRIL, + new Materials[] { Materials.Mithril, Materials.Platinum }, + new int[] { 75 * 100, 55 * 100 }, + new int[] {}, + Voltage.HV, + GT_ModHandler.getModItem(MagicBees.ID, "wax", 1, 0), + 50 * 100); } // Gem Line @@ -564,378 +562,375 @@ public class ItemComb extends Item implements IGT_ItemWithMaterialRenderer { addProcessGT(CombType.FLUIX, new Materials[] { Materials.Fluix }, Voltage.LV); addProcessGT(CombType.REDSTONE, new Materials[] { Materials.Redstone }, Voltage.LV); addCentrifugeToMaterial( - CombType.RAREEARTH, - new Materials[] { Materials.RareEarth }, + CombType.RAREEARTH, + new Materials[] { Materials.RareEarth }, + new int[] { 100 * 100 }, + new int[] { 1 }, + Voltage.ULV, + NI, + 30 * 100); + addProcessGT(CombType.LAPIS, new Materials[] { Materials.Lapis }, Voltage.LV); + addProcessGT(CombType.RUBY, new Materials[] { Materials.Ruby }, Voltage.LV); + addProcessGT(CombType.REDGARNET, new Materials[] { Materials.GarnetRed }, Voltage.LV); + addProcessGT(CombType.YELLOWGARNET, new Materials[] { Materials.GarnetYellow }, Voltage.LV); + addProcessGT(CombType.SAPPHIRE, new Materials[] { Materials.Sapphire }, Voltage.LV); + addProcessGT(CombType.DIAMOND, new Materials[] { Materials.Diamond }, Voltage.LV); + addProcessGT(CombType.OLIVINE, new Materials[] { Materials.Olivine }, Voltage.LV); + addProcessGT(CombType.EMERALD, new Materials[] { Materials.Emerald }, Voltage.LV); + addProcessGT(CombType.FIRESTONE, new Materials[] { Materials.Firestone }, Voltage.LV); + addProcessGT(CombType.PYROPE, new Materials[] { Materials.Pyrope }, Voltage.LV); + addProcessGT(CombType.GROSSULAR, new Materials[] { Materials.Grossular }, Voltage.LV); + if (GT_Mod.gregtechproxy.mNerfedCombs) { + addCentrifugeToMaterial( + CombType.STONE, + new Materials[] { Materials.Stone, Materials.GraniteBlack, Materials.GraniteRed, Materials.Basalt, + Materials.Marble, Materials.Redrock }, + new int[] { 70 * 100, 50 * 100, 50 * 100, 50 * 100, 50 * 100, 50 * 100 }, + new int[] { 9, 9, 9, 9, 9, 9 }, + Voltage.ULV, + NI, + 50 * 100); + addCentrifugeToMaterial( + CombType.FLUIX, + new Materials[] { Materials.Fluix }, + new int[] { 25 * 100 }, + new int[] { 9 }, + Voltage.ULV, + NI, + 30 * 100); + } else { + addCentrifugeToMaterial( + CombType.STONE, + new Materials[] { Materials.Soapstone, Materials.Talc, Materials.Apatite, Materials.Phosphate, + Materials.TricalciumPhosphate }, + new int[] { 95 * 100, 90 * 100, 80 * 100, 75 * 100, 75 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 50 * 100); + addCentrifugeToMaterial( + CombType.CERTUS, + new Materials[] { Materials.CertusQuartz, Materials.Quartzite, Materials.Barite }, + new int[] { 100 * 100, 80 * 100, 75 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 50 * 100); + addCentrifugeToMaterial( + CombType.FLUIX, + new Materials[] { Materials.Fluix, Materials.Redstone, Materials.CertusQuartz, Materials.NetherQuartz }, + new int[] { 25 * 100, 90 * 100, 90 * 100, 90 * 100 }, + new int[] { 9, 1, 1, 1 }, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.REDSTONE, + new Materials[] { Materials.Redstone, Materials.Cinnabar }, + new int[] { 100 * 100, 80 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.LAPIS, + new Materials[] { Materials.Lapis, Materials.Sodalite, Materials.Lazurite, Materials.Calcite }, + new int[] { 100 * 100, 90 * 100, 90 * 100, 85 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.RUBY, + new Materials[] { Materials.Ruby, Materials.Redstone }, + new int[] { 100 * 100, 90 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.REDGARNET, + new Materials[] { Materials.GarnetRed, Materials.GarnetYellow }, + new int[] { 100 * 100, 75 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.YELLOWGARNET, + new Materials[] { Materials.GarnetYellow, Materials.GarnetRed }, + new int[] { 100 * 100, 75 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.SAPPHIRE, + new Materials[] { Materials.Sapphire, Materials.GreenSapphire, Materials.Almandine, Materials.Pyrope }, + new int[] { 100 * 100, 90 * 100, 90 * 100, 75 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.DIAMOND, + new Materials[] { Materials.Diamond, Materials.Graphite }, + new int[] { 100 * 100, 75 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.OLIVINE, + new Materials[] { Materials.Olivine, Materials.Bentonite, Materials.Magnesite, Materials.Glauconite }, + new int[] { 100 * 100, 90 * 100, 80 * 100, 75 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.EMERALD, + new Materials[] { Materials.Emerald, Materials.Beryllium, Materials.Thorium }, + new int[] { 100 * 100, 85 * 100, 75 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.FIRESTONE, + new Materials[] { Materials.Firestone }, new int[] { 100 * 100 }, - new int[] { 1 }, + new int[] {}, + Voltage.ULV, + ItemList.FR_RefractoryWax.get(1), + 30 * 100); + addCentrifugeToMaterial( + CombType.PYROPE, + new Materials[] { Materials.Pyrope, Materials.Aluminium, Materials.Magnesium, Materials.Silicon }, + new int[] { 100 * 100, 75 * 100, 80 * 100, 75 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.GROSSULAR, + new Materials[] { Materials.Grossular, Materials.Aluminium, Materials.Silicon }, + new int[] { 100 * 100, 75 * 100, 75 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + } + + // Metals Line + addProcessGT(CombType.SLAG, new Materials[] { Materials.Limestone }, Voltage.LV); + addProcessGT(CombType.COPPER, new Materials[] { Materials.Copper }, Voltage.LV); + addProcessGT(CombType.TIN, new Materials[] { Materials.Tin }, Voltage.LV); + addProcessGT(CombType.LEAD, new Materials[] { Materials.Lead }, Voltage.LV); + addProcessGT(CombType.INDIUM, new Materials[] { Materials.Indium }, Voltage.ZPM); + addProcessGT(CombType.NICKEL, new Materials[] { Materials.Nickel }, Voltage.LV); + addProcessGT(CombType.ZINC, new Materials[] { Materials.Zinc }, Voltage.LV); + addProcessGT(CombType.SILVER, new Materials[] { Materials.Silver }, Voltage.LV); + addProcessGT(CombType.CRYOLITE, new Materials[] { Materials.Cryolite }, Voltage.LV); + addProcessGT(CombType.GOLD, new Materials[] { Materials.Gold }, Voltage.LV); + addProcessGT(CombType.SULFUR, new Materials[] { Materials.Sulfur }, Voltage.LV); + addProcessGT(CombType.GALLIUM, new Materials[] { Materials.Gallium }, Voltage.LV); + addProcessGT(CombType.ARSENIC, new Materials[] { Materials.Arsenic }, Voltage.LV); + addProcessGT(CombType.IRON, new Materials[] { Materials.Iron }, Voltage.LV); + addProcessGT(CombType.STEEL, new Materials[] { Materials.Steel }, Voltage.LV); + if (GT_Mod.gregtechproxy.mNerfedCombs) { + addCentrifugeToMaterial( + CombType.SLAG, + new Materials[] { Materials.Stone, Materials.GraniteBlack, Materials.GraniteRed }, + new int[] { 50 * 100, 20 * 100, 20 * 100 }, + new int[] { 9, 9, 9 }, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.COPPER, + new Materials[] { Materials.Copper }, + new int[] { 70 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.TIN, + new Materials[] { Materials.Tin }, + new int[] { 60 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.LEAD, + new Materials[] { Materials.Lead }, + new int[] { 45 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.IRON, + new Materials[] { Materials.Iron }, + new int[] { 30 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.STEEL, + new Materials[] { Materials.Steel }, + new int[] { 40 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.SILVER, + new Materials[] { Materials.Silver }, + new int[] { 80 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.CRYOLITE, + new Materials[] { Materials.Cryolite }, + new int[] { 80 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.SULFUR, + new Materials[] { Materials.Sulfur }, + new int[] { 100 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + } else { + addCentrifugeToMaterial( + CombType.SLAG, + new Materials[] { Materials.Salt, Materials.RockSalt, Materials.Lepidolite, Materials.Spodumene, + Materials.Monazite }, + new int[] { 100 * 100, 100 * 100, 100 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.COPPER, + new Materials[] { Materials.Copper, Materials.Tetrahedrite, Materials.Chalcopyrite, Materials.Malachite, + Materials.Pyrite, Materials.Stibnite }, + new int[] { 100 * 100, 85 * 100, 95 * 100, 80 * 100, 75 * 100, 65 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.TIN, + new Materials[] { Materials.Tin, Materials.Cassiterite, Materials.CassiteriteSand }, + new int[] { 100 * 100, 85 * 100, 65 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.LEAD, + new Materials[] { Materials.Lead, Materials.Galena }, + new int[] { 100 * 100, 75 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + + addCentrifugeToMaterial( + CombType.IRON, + new Materials[] { Materials.Iron, Materials.Magnetite, Materials.BrownLimonite, + Materials.YellowLimonite, Materials.VanadiumMagnetite, Materials.MeteoricIron }, + new int[] { 100 * 100, 90 * 100, 85 * 100, 85 * 100, 80 * 100, 75 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.LEAD, + new Materials[] { Materials.Steel, Materials.Magnetite, Materials.VanadiumMagnetite, + Materials.Molybdenite, Materials.Molybdenum, Materials.MeteoricIron }, + new int[] { 100 * 100, 90 * 100, 80 * 100, 65 * 100, 65 * 100, 75 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + + addCentrifugeToMaterial( + CombType.NICKEL, + new Materials[] { Materials.Nickel, Materials.Garnierite, Materials.Pentlandite, Materials.Cobaltite, + Materials.Wulfenite, Materials.Powellite }, + new int[] { 100 * 100, 85 * 100, 85 * 100, 80 * 100, 75 * 100, 75 * 100 }, + new int[] {}, Voltage.ULV, NI, 30 * 100); - addProcessGT(CombType.LAPIS, new Materials[] { Materials.Lapis }, Voltage.LV); - addProcessGT(CombType.RUBY, new Materials[] { Materials.Ruby }, Voltage.LV); - addProcessGT(CombType.REDGARNET, new Materials[] { Materials.GarnetRed }, Voltage.LV); - addProcessGT(CombType.YELLOWGARNET, new Materials[] { Materials.GarnetYellow }, Voltage.LV); - addProcessGT(CombType.SAPPHIRE, new Materials[] { Materials.Sapphire }, Voltage.LV); - addProcessGT(CombType.DIAMOND, new Materials[] { Materials.Diamond }, Voltage.LV); - addProcessGT(CombType.OLIVINE, new Materials[] { Materials.Olivine }, Voltage.LV); - addProcessGT(CombType.EMERALD, new Materials[] { Materials.Emerald }, Voltage.LV); - addProcessGT(CombType.FIRESTONE, new Materials[] { Materials.Firestone }, Voltage.LV); - addProcessGT(CombType.PYROPE, new Materials[] { Materials.Pyrope }, Voltage.LV); - addProcessGT(CombType.GROSSULAR, new Materials[] { Materials.Grossular }, Voltage.LV); - if (GT_Mod.gregtechproxy.mNerfedCombs) { addCentrifugeToMaterial( - CombType.STONE, - new Materials[] { Materials.Stone, Materials.GraniteBlack, Materials.GraniteRed, Materials.Basalt, - Materials.Marble, Materials.Redrock }, - new int[] { 70 * 100, 50 * 100, 50 * 100, 50 * 100, 50 * 100, 50 * 100 }, - new int[] { 9, 9, 9, 9, 9, 9 }, - Voltage.ULV, - NI, - 50 * 100); - addCentrifugeToMaterial( - CombType.FLUIX, - new Materials[] { Materials.Fluix }, - new int[] { 25 * 100 }, - new int[] { 9 }, - Voltage.ULV, - NI, - 30 * 100); - } else { + CombType.ZINC, + new Materials[] { Materials.Zinc, Materials.Sphalerite, Materials.Sulfur }, + new int[] { 100 * 100, 80 * 100, 75 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); addCentrifugeToMaterial( - CombType.STONE, - new Materials[] { Materials.Soapstone, Materials.Talc, Materials.Apatite, Materials.Phosphate, - Materials.TricalciumPhosphate }, - new int[] { 95 * 100, 90 * 100, 80 * 100, 75 * 100, 75 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 50 * 100); - addCentrifugeToMaterial( - CombType.CERTUS, - new Materials[] { Materials.CertusQuartz, Materials.Quartzite, Materials.Barite }, - new int[] { 100 * 100, 80 * 100, 75 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 50 * 100); - addCentrifugeToMaterial( - CombType.FLUIX, - new Materials[] { Materials.Fluix, Materials.Redstone, Materials.CertusQuartz, - Materials.NetherQuartz }, - new int[] { 25 * 100, 90 * 100, 90 * 100, 90 * 100 }, - new int[] { 9, 1, 1, 1 }, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.REDSTONE, - new Materials[] { Materials.Redstone, Materials.Cinnabar }, - new int[] { 100 * 100, 80 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.LAPIS, - new Materials[] { Materials.Lapis, Materials.Sodalite, Materials.Lazurite, Materials.Calcite }, - new int[] { 100 * 100, 90 * 100, 90 * 100, 85 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.RUBY, - new Materials[] { Materials.Ruby, Materials.Redstone }, - new int[] { 100 * 100, 90 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.REDGARNET, - new Materials[] { Materials.GarnetRed, Materials.GarnetYellow }, - new int[] { 100 * 100, 75 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.YELLOWGARNET, - new Materials[] { Materials.GarnetYellow, Materials.GarnetRed }, - new int[] { 100 * 100, 75 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.SAPPHIRE, - new Materials[] { Materials.Sapphire, Materials.GreenSapphire, Materials.Almandine, - Materials.Pyrope }, - new int[] { 100 * 100, 90 * 100, 90 * 100, 75 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.DIAMOND, - new Materials[] { Materials.Diamond, Materials.Graphite }, - new int[] { 100 * 100, 75 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.OLIVINE, - new Materials[] { Materials.Olivine, Materials.Bentonite, Materials.Magnesite, - Materials.Glauconite }, - new int[] { 100 * 100, 90 * 100, 80 * 100, 75 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.EMERALD, - new Materials[] { Materials.Emerald, Materials.Beryllium, Materials.Thorium }, - new int[] { 100 * 100, 85 * 100, 75 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.FIRESTONE, - new Materials[] { Materials.Firestone }, - new int[] { 100 * 100 }, - new int[] {}, - Voltage.ULV, - ItemList.FR_RefractoryWax.get(1), - 30 * 100); - addCentrifugeToMaterial( - CombType.PYROPE, - new Materials[] { Materials.Pyrope, Materials.Aluminium, Materials.Magnesium, Materials.Silicon }, - new int[] { 100 * 100, 75 * 100, 80 * 100, 75 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.GROSSULAR, - new Materials[] { Materials.Grossular, Materials.Aluminium, Materials.Silicon }, - new int[] { 100 * 100, 75 * 100, 75 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - } - - // Metals Line - addProcessGT(CombType.SLAG, new Materials[] { Materials.Limestone }, Voltage.LV); - addProcessGT(CombType.COPPER, new Materials[] { Materials.Copper }, Voltage.LV); - addProcessGT(CombType.TIN, new Materials[] { Materials.Tin }, Voltage.LV); - addProcessGT(CombType.LEAD, new Materials[] { Materials.Lead }, Voltage.LV); - addProcessGT(CombType.INDIUM, new Materials[] { Materials.Indium }, Voltage.ZPM); - addProcessGT(CombType.NICKEL, new Materials[] { Materials.Nickel }, Voltage.LV); - addProcessGT(CombType.ZINC, new Materials[] { Materials.Zinc }, Voltage.LV); - addProcessGT(CombType.SILVER, new Materials[] { Materials.Silver }, Voltage.LV); - addProcessGT(CombType.CRYOLITE, new Materials[] { Materials.Cryolite }, Voltage.LV); - addProcessGT(CombType.GOLD, new Materials[] { Materials.Gold }, Voltage.LV); - addProcessGT(CombType.SULFUR, new Materials[] { Materials.Sulfur }, Voltage.LV); - addProcessGT(CombType.GALLIUM, new Materials[] { Materials.Gallium }, Voltage.LV); - addProcessGT(CombType.ARSENIC, new Materials[] { Materials.Arsenic }, Voltage.LV); - addProcessGT(CombType.IRON, new Materials[] { Materials.Iron }, Voltage.LV); - addProcessGT(CombType.STEEL, new Materials[] { Materials.Steel }, Voltage.LV); - if (GT_Mod.gregtechproxy.mNerfedCombs) { + CombType.SILVER, + new Materials[] { Materials.Silver, Materials.Galena }, + new int[] { 100 * 100, 80 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); addCentrifugeToMaterial( - CombType.SLAG, - new Materials[] { Materials.Stone, Materials.GraniteBlack, Materials.GraniteRed }, - new int[] { 50 * 100, 20 * 100, 20 * 100 }, - new int[] { 9, 9, 9 }, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.COPPER, - new Materials[] { Materials.Copper }, - new int[] { 70 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.TIN, - new Materials[] { Materials.Tin }, - new int[] { 60 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.LEAD, - new Materials[] { Materials.Lead }, - new int[] { 45 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.IRON, - new Materials[] { Materials.Iron }, - new int[] { 30 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.STEEL, - new Materials[] { Materials.Steel }, - new int[] { 40 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.SILVER, - new Materials[] { Materials.Silver }, - new int[] { 80 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.CRYOLITE, - new Materials[] { Materials.Cryolite }, - new int[] { 80 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.SULFUR, - new Materials[] { Materials.Sulfur }, - new int[] { 100 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - } else { + CombType.CRYOLITE, + new Materials[] { Materials.Cryolite, Materials.Silver }, + new int[] { 100 * 100, 80 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); addCentrifugeToMaterial( - CombType.SLAG, - new Materials[] { Materials.Salt, Materials.RockSalt, Materials.Lepidolite, Materials.Spodumene, - Materials.Monazite }, - new int[] { 100 * 100, 100 * 100, 100 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.COPPER, - new Materials[] { Materials.Copper, Materials.Tetrahedrite, Materials.Chalcopyrite, - Materials.Malachite, Materials.Pyrite, Materials.Stibnite }, - new int[] { 100 * 100, 85 * 100, 95 * 100, 80 * 100, 75 * 100, 65 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.TIN, - new Materials[] { Materials.Tin, Materials.Cassiterite, Materials.CassiteriteSand }, - new int[] { 100 * 100, 85 * 100, 65 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.LEAD, - new Materials[] { Materials.Lead, Materials.Galena }, - new int[] { 100 * 100, 75 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - + CombType.GOLD, + new Materials[] { Materials.Gold }, + new int[] { 100 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); addCentrifugeToMaterial( - CombType.IRON, - new Materials[] { Materials.Iron, Materials.Magnetite, Materials.BrownLimonite, - Materials.YellowLimonite, Materials.VanadiumMagnetite, Materials.MeteoricIron }, - new int[] { 100 * 100, 90 * 100, 85 * 100, 85 * 100, 80 * 100, 75 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.LEAD, - new Materials[] { Materials.Steel, Materials.Magnetite, Materials.VanadiumMagnetite, - Materials.Molybdenite, Materials.Molybdenum, Materials.MeteoricIron }, - new int[] { 100 * 100, 90 * 100, 80 * 100, 65 * 100, 65 * 100, 75 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - + CombType.SULFUR, + new Materials[] { Materials.Sulfur, Materials.Pyrite, Materials.Sphalerite }, + new int[] { 100 * 100, 90 * 100, 80 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.GALLIUM, + new Materials[] { Materials.Gallium, Materials.Niobium }, + new int[] { 80 * 100, 75 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); addCentrifugeToMaterial( - CombType.NICKEL, - new Materials[] { Materials.Nickel, Materials.Garnierite, Materials.Pentlandite, - Materials.Cobaltite, Materials.Wulfenite, Materials.Powellite }, - new int[] { 100 * 100, 85 * 100, 85 * 100, 80 * 100, 75 * 100, 75 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.ZINC, - new Materials[] { Materials.Zinc, Materials.Sphalerite, Materials.Sulfur }, - new int[] { 100 * 100, 80 * 100, 75 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.SILVER, - new Materials[] { Materials.Silver, Materials.Galena }, - new int[] { 100 * 100, 80 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.CRYOLITE, - new Materials[] { Materials.Cryolite, Materials.Silver }, - new int[] { 100 * 100, 80 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.GOLD, - new Materials[] { Materials.Gold }, - new int[] { 100 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.SULFUR, - new Materials[] { Materials.Sulfur, Materials.Pyrite, Materials.Sphalerite }, - new int[] { 100 * 100, 90 * 100, 80 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.GALLIUM, - new Materials[] { Materials.Gallium, Materials.Niobium }, - new int[] { 80 * 100, 75 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.ARSENIC, - new Materials[] { Materials.Arsenic, Materials.Bismuth, Materials.Antimony }, - new int[] { 80 * 100, 70 * 100, 70 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); + CombType.ARSENIC, + new Materials[] { Materials.Arsenic, Materials.Bismuth, Materials.Antimony }, + new int[] { 80 * 100, 70 * 100, 70 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); } // Rare Metals Line @@ -954,121 +949,121 @@ public class ItemComb extends Item implements IGT_ItemWithMaterialRenderer { addProcessGT(CombType.ELECTROTINE, new Materials[] { Materials.Electrotine }, Voltage.MV); if (GT_Mod.gregtechproxy.mNerfedCombs) { addCentrifugeToItemStack( - CombType.SALT, - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 6), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RockSalt, 6), ItemList.FR_Wax.get(1), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 6) }, - new int[] { 100 * 100, 100 * 100, 50 * 100, 25 * 100 }, - Voltage.MV, - 160); + CombType.SALT, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 6), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RockSalt, 6), ItemList.FR_Wax.get(1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 6) }, + new int[] { 100 * 100, 100 * 100, 50 * 100, 25 * 100 }, + Voltage.MV, + 160); } else { addCentrifugeToMaterial( - CombType.BAUXITE, - new Materials[] { Materials.Bauxite, Materials.Aluminium }, - new int[] { 75 * 100, 55 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.ALUMINIUM, - new Materials[] { Materials.Aluminium, Materials.Bauxite }, - new int[] { 60 * 100, 80 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.MANGANESE, - new Materials[] { Materials.Manganese, Materials.Grossular, Materials.Spessartine, - Materials.Pyrolusite, Materials.Tantalite }, - new int[] { 30 * 100, 100 * 100, 100 * 100, 100 * 100, 100 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.TITANIUM, - new Materials[] { Materials.Titanium, Materials.Ilmenite, Materials.Bauxite, Materials.Rutile }, - new int[] { 90 * 100, 80 * 100, 75 * 100, 75 * 100 }, - new int[] {}, - Voltage.EV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.MAGNESIUM, - new Materials[] { Materials.Magnesium, Materials.Magnesite }, - new int[] { 100 * 100, 80 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.CHROME, - new Materials[] { Materials.Chrome, Materials.Ruby, Materials.Chromite, Materials.Redstone, - Materials.Neodymium, Materials.Bastnasite }, - new int[] { 50 * 100, 100 * 100, 50 * 100, 100 * 100, 80 * 100, 80 * 100 }, - new int[] {}, - Voltage.HV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.TUNGSTEN, - new Materials[] { Materials.Tungsten, Materials.Tungstate, Materials.Scheelite, Materials.Lithium }, - new int[] { 50 * 100, 80 * 100, 75 * 100, 75 * 100 }, - new int[] {}, - Voltage.IV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.PLATINUM, - new Materials[] { Materials.Platinum, Materials.Cooperite, Materials.Palladium }, - new int[] { 40 * 100, 40 * 100, 40 * 100 }, - new int[] {}, - Voltage.HV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.MOLYBDENUM, - new Materials[] { Materials.Molybdenum, Materials.Molybdenite, Materials.Powellite, - Materials.Wulfenite }, - new int[] { 100 * 100, 80 * 100, 75 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.IRIDIUM, - new Materials[] { Materials.Iridium, Materials.Osmium }, - new int[] { 20 * 100, 15 * 100 }, - new int[] {}, - Voltage.IV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.OSMIUM, - new Materials[] { Materials.Osmium, Materials.Iridium }, - new int[] { 25 * 100, 15 * 100 }, - new int[] {}, - Voltage.IV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.LITHIUM, - new Materials[] { Materials.Lithium, Materials.Aluminium }, - new int[] { 85 * 100, 75 * 100 }, - new int[] {}, - Voltage.MV, - NI, - 30 * 100); + CombType.BAUXITE, + new Materials[] { Materials.Bauxite, Materials.Aluminium }, + new int[] { 75 * 100, 55 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.ALUMINIUM, + new Materials[] { Materials.Aluminium, Materials.Bauxite }, + new int[] { 60 * 100, 80 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.MANGANESE, + new Materials[] { Materials.Manganese, Materials.Grossular, Materials.Spessartine, Materials.Pyrolusite, + Materials.Tantalite }, + new int[] { 30 * 100, 100 * 100, 100 * 100, 100 * 100, 100 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.TITANIUM, + new Materials[] { Materials.Titanium, Materials.Ilmenite, Materials.Bauxite, Materials.Rutile }, + new int[] { 90 * 100, 80 * 100, 75 * 100, 75 * 100 }, + new int[] {}, + Voltage.EV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.MAGNESIUM, + new Materials[] { Materials.Magnesium, Materials.Magnesite }, + new int[] { 100 * 100, 80 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.CHROME, + new Materials[] { Materials.Chrome, Materials.Ruby, Materials.Chromite, Materials.Redstone, + Materials.Neodymium, Materials.Bastnasite }, + new int[] { 50 * 100, 100 * 100, 50 * 100, 100 * 100, 80 * 100, 80 * 100 }, + new int[] {}, + Voltage.HV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.TUNGSTEN, + new Materials[] { Materials.Tungsten, Materials.Tungstate, Materials.Scheelite, Materials.Lithium }, + new int[] { 50 * 100, 80 * 100, 75 * 100, 75 * 100 }, + new int[] {}, + Voltage.IV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.PLATINUM, + new Materials[] { Materials.Platinum, Materials.Cooperite, Materials.Palladium }, + new int[] { 40 * 100, 40 * 100, 40 * 100 }, + new int[] {}, + Voltage.HV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.MOLYBDENUM, + new Materials[] { Materials.Molybdenum, Materials.Molybdenite, Materials.Powellite, + Materials.Wulfenite }, + new int[] { 100 * 100, 80 * 100, 75 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.IRIDIUM, + new Materials[] { Materials.Iridium, Materials.Osmium }, + new int[] { 20 * 100, 15 * 100 }, + new int[] {}, + Voltage.IV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.OSMIUM, + new Materials[] { Materials.Osmium, Materials.Iridium }, + new int[] { 25 * 100, 15 * 100 }, + new int[] {}, + Voltage.IV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.LITHIUM, + new Materials[] { Materials.Lithium, Materials.Aluminium }, + new int[] { 85 * 100, 75 * 100 }, + new int[] {}, + Voltage.MV, + NI, + 30 * 100); addCentrifugeToItemStack( - CombType.SALT, - new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 6), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RockSalt, 6), ItemList.FR_Wax.get(1), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 6) }, - new int[] { 100 * 100, 100 * 100, 50 * 100, 25 * 100 }, - Voltage.MV, - 160); + CombType.SALT, + new ItemStack[] { GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 6), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.RockSalt, 6), ItemList.FR_Wax.get(1), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 6) }, + new int[] { 100 * 100, 100 * 100, 50 * 100, 25 * 100 }, + Voltage.MV, + 160); } // Radioactive Line @@ -1083,221 +1078,218 @@ public class ItemComb extends Item implements IGT_ItemWithMaterialRenderer { addProcessGT(CombType.NEUTRONIUM, new Materials[] { Materials.Neutronium }, Voltage.UHV); if (!GT_Mod.gregtechproxy.mNerfedCombs) { addCentrifugeToMaterial( - CombType.ALMANDINE, - new Materials[] { Materials.Almandine, Materials.Pyrope, Materials.Sapphire, - Materials.GreenSapphire }, - new int[] { 90 * 100, 80 * 100, 75 * 100, 75 * 100 }, - new int[] {}, - Voltage.ULV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.URANIUM, - new Materials[] { Materials.Uranium, Materials.Pitchblende, Materials.Uraninite, - Materials.Uranium235 }, - new int[] { 50 * 100, 65 * 100, 75 * 100, 50 * 100 }, - new int[] {}, - Voltage.EV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.PLUTONIUM, - new Materials[] { Materials.Plutonium, Materials.Uranium235 }, - new int[] { 10, 5 }, - new int[] {}, - Voltage.EV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.NAQUADAH, - new Materials[] { Materials.Naquadah, Materials.NaquadahEnriched, Materials.Naquadria }, - new int[] { 10 * 100, 5 * 100, 5 * 100 }, - new int[] {}, - Voltage.IV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.NAQUADRIA, - new Materials[] { Materials.Naquadria, Materials.NaquadahEnriched, Materials.Naquadah }, - new int[] { 10 * 100, 10 * 100, 15 * 100 }, - new int[] {}, - Voltage.LuV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.THORIUM, - new Materials[] { Materials.Thorium, Materials.Uranium, Materials.Coal }, - new int[] { 75 * 100, 75 * 100 * 100, 95 * 100 }, - new int[] {}, - Voltage.EV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.LUTETIUM, - new Materials[] { Materials.Lutetium, Materials.Thorium }, - new int[] { 35 * 100, 55 * 100 }, - new int[] {}, - Voltage.IV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.AMERICIUM, - new Materials[] { Materials.Americium, Materials.Lutetium }, - new int[] { 25 * 100, 45 * 100 }, - new int[] {}, - Voltage.LuV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.NEUTRONIUM, - new Materials[] { Materials.Neutronium, Materials.Americium }, - new int[] { 15 * 100, 35 * 100 }, - new int[] {}, - Voltage.UHV, - NI, - 30 * 100); + CombType.ALMANDINE, + new Materials[] { Materials.Almandine, Materials.Pyrope, Materials.Sapphire, Materials.GreenSapphire }, + new int[] { 90 * 100, 80 * 100, 75 * 100, 75 * 100 }, + new int[] {}, + Voltage.ULV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.URANIUM, + new Materials[] { Materials.Uranium, Materials.Pitchblende, Materials.Uraninite, Materials.Uranium235 }, + new int[] { 50 * 100, 65 * 100, 75 * 100, 50 * 100 }, + new int[] {}, + Voltage.EV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.PLUTONIUM, + new Materials[] { Materials.Plutonium, Materials.Uranium235 }, + new int[] { 10, 5 }, + new int[] {}, + Voltage.EV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.NAQUADAH, + new Materials[] { Materials.Naquadah, Materials.NaquadahEnriched, Materials.Naquadria }, + new int[] { 10 * 100, 5 * 100, 5 * 100 }, + new int[] {}, + Voltage.IV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.NAQUADRIA, + new Materials[] { Materials.Naquadria, Materials.NaquadahEnriched, Materials.Naquadah }, + new int[] { 10 * 100, 10 * 100, 15 * 100 }, + new int[] {}, + Voltage.LuV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.THORIUM, + new Materials[] { Materials.Thorium, Materials.Uranium, Materials.Coal }, + new int[] { 75 * 100, 75 * 100 * 100, 95 * 100 }, + new int[] {}, + Voltage.EV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.LUTETIUM, + new Materials[] { Materials.Lutetium, Materials.Thorium }, + new int[] { 35 * 100, 55 * 100 }, + new int[] {}, + Voltage.IV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.AMERICIUM, + new Materials[] { Materials.Americium, Materials.Lutetium }, + new int[] { 25 * 100, 45 * 100 }, + new int[] {}, + Voltage.LuV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.NEUTRONIUM, + new Materials[] { Materials.Neutronium, Materials.Americium }, + new int[] { 15 * 100, 35 * 100 }, + new int[] {}, + Voltage.UHV, + NI, + 30 * 100); } // Twilight addCentrifugeToItemStack( - CombType.NAGA, - new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1L, 4), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.NagaScaleChip", 1L, 0), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.NagaScaleFragment", 1L, 0), - ItemList.FR_Wax.get(1) }, - new int[] { 5 * 100, 33 * 100, 8 * 100, 30 * 100 }, - Voltage.MV); + CombType.NAGA, + new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1L, 4), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.NagaScaleChip", 1L, 0), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.NagaScaleFragment", 1L, 0), + ItemList.FR_Wax.get(1) }, + new int[] { 5 * 100, 33 * 100, 8 * 100, 30 * 100 }, + Voltage.MV); addCentrifugeToItemStack( - CombType.LICH, - new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1L, 5), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.LichBoneChip", 1L, 0), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.LichBoneFragment", 1L, 0), - ItemList.FR_Wax.get(1) }, - new int[] { 5 * 100, 33 * 100, 8 * 100, 30 * 100 }, - Voltage.HV); + CombType.LICH, + new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1L, 5), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.LichBoneChip", 1L, 0), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.LichBoneFragment", 1L, 0), + ItemList.FR_Wax.get(1) }, + new int[] { 5 * 100, 33 * 100, 8 * 100, 30 * 100 }, + Voltage.HV); addCentrifugeToItemStack( - CombType.HYDRA, - new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1L, 1), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.FieryBloodDrop", 1L, 0), - GT_Bees.drop.getStackForType(DropType.HYDRA), ItemList.FR_Wax.get(1) }, - new int[] { 5 * 100, 33 * 100, 8 * 100, 30 * 100 }, - Voltage.HV); + CombType.HYDRA, + new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1L, 1), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.FieryBloodDrop", 1L, 0), + GT_Bees.drop.getStackForType(DropType.HYDRA), ItemList.FR_Wax.get(1) }, + new int[] { 5 * 100, 33 * 100, 8 * 100, 30 * 100 }, + Voltage.HV); addCentrifugeToItemStack( - CombType.URGHAST, - new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1L, 2), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.CarminiteChip", 1L, 0), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.CarminiteFragment", 1L, 0), - ItemList.FR_Wax.get(1) }, - new int[] { 5 * 100, 33 * 100, 8 * 100, 30 * 100 }, - Voltage.EV); + CombType.URGHAST, + new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1L, 2), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.CarminiteChip", 1L, 0), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.CarminiteFragment", 1L, 0), + ItemList.FR_Wax.get(1) }, + new int[] { 5 * 100, 33 * 100, 8 * 100, 30 * 100 }, + Voltage.EV); addCentrifugeToItemStack( - CombType.SNOWQUEEN, - new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1L, 3), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.SnowQueenBloodDrop", 1L, 0), - GT_Bees.drop.getStackForType(DropType.SNOW_QUEEN), ItemList.FR_Wax.get(1) }, - new int[] { 5 * 100, 33 * 100, 8 * 100, 30 * 100 }, - Voltage.EV); + CombType.SNOWQUEEN, + new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1L, 3), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.SnowQueenBloodDrop", 1L, 0), + GT_Bees.drop.getStackForType(DropType.SNOW_QUEEN), ItemList.FR_Wax.get(1) }, + new int[] { 5 * 100, 33 * 100, 8 * 100, 30 * 100 }, + Voltage.EV); // HEE addCentrifugeToItemStack( - CombType.ENDDUST, - new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1L, 0), - GT_Bees.propolis.getStackForType(PropolisType.End), - GT_Bees.drop.getStackForType(DropType.ENDERGOO), }, - new int[] { 20 * 100, 15 * 100, 10 * 100 }, - Voltage.HV); + CombType.ENDDUST, + new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1L, 0), + GT_Bees.propolis.getStackForType(PropolisType.End), GT_Bees.drop.getStackForType(DropType.ENDERGOO), }, + new int[] { 20 * 100, 15 * 100, 10 * 100 }, + Voltage.HV); addCentrifugeToItemStack( - CombType.STARDUST, - new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1L, 0), - GT_Bees.propolis.getStackForType(PropolisType.Stardust), - GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, - new int[] { 20 * 100, 15 * 100, 10 * 100 }, - Voltage.HV); + CombType.STARDUST, + new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1L, 0), + GT_Bees.propolis.getStackForType(PropolisType.Stardust), + GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, + new int[] { 20 * 100, 15 * 100, 10 * 100 }, + Voltage.HV); addCentrifugeToItemStack( - CombType.ECTOPLASMA, - new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1L, 0), - GT_Bees.propolis.getStackForType(PropolisType.Ectoplasma), - GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, - new int[] { 25 * 100, 10 * 100, 15 * 100 }, - Voltage.EV); + CombType.ECTOPLASMA, + new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1L, 0), + GT_Bees.propolis.getStackForType(PropolisType.Ectoplasma), + GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, + new int[] { 25 * 100, 10 * 100, 15 * 100 }, + Voltage.EV); addCentrifugeToItemStack( - CombType.ARCANESHARD, - new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1L, 0), - GT_Bees.propolis.getStackForType(PropolisType.Arcaneshard), - GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, - new int[] { 25 * 100, 10 * 100, 15 * 100 }, - Voltage.EV); + CombType.ARCANESHARD, + new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1L, 0), + GT_Bees.propolis.getStackForType(PropolisType.Arcaneshard), + GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, + new int[] { 25 * 100, 10 * 100, 15 * 100 }, + Voltage.EV); addCentrifugeToItemStack( - CombType.DRAGONESSENCE, - new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1L, 0), - GT_Bees.propolis.getStackForType(PropolisType.Dragonessence), - GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, - new int[] { 30 * 100, (int) (7.5 * 100), 20 * 100 }, - Voltage.IV); + CombType.DRAGONESSENCE, + new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1L, 0), + GT_Bees.propolis.getStackForType(PropolisType.Dragonessence), + GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, + new int[] { 30 * 100, (int) (7.5 * 100), 20 * 100 }, + Voltage.IV); addCentrifugeToItemStack( - CombType.ENDERMAN, - new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1L, 0), - GT_Bees.propolis.getStackForType(PropolisType.Enderman), - GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, - new int[] { 3000, 750, 2000 }, - Voltage.IV); + CombType.ENDERMAN, + new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1L, 0), + GT_Bees.propolis.getStackForType(PropolisType.Enderman), + GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, + new int[] { 3000, 750, 2000 }, + Voltage.IV); addCentrifugeToItemStack( - CombType.SILVERFISH, - new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1L, 0), - GT_Bees.propolis.getStackForType(PropolisType.Silverfish), - GT_Bees.drop.getStackForType(DropType.ENDERGOO), new ItemStack(Items.spawn_egg, 1, 60) }, - new int[] { 25 * 100, 10 * 100, 20 * 100, 15 * 100 }, - Voltage.EV); + CombType.SILVERFISH, + new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1L, 0), + GT_Bees.propolis.getStackForType(PropolisType.Silverfish), + GT_Bees.drop.getStackForType(DropType.ENDERGOO), new ItemStack(Items.spawn_egg, 1, 60) }, + new int[] { 25 * 100, 10 * 100, 20 * 100, 15 * 100 }, + Voltage.EV); addProcessGT(CombType.ENDIUM, new Materials[] { Materials.HeeEndium }, Voltage.HV); if (!GT_Mod.gregtechproxy.mNerfedCombs) { addCentrifugeToMaterial( - CombType.ENDIUM, - new Materials[] { Materials.HeeEndium }, - new int[] { 50 * 100 }, - new int[] {}, - Voltage.HV, - GT_ModHandler.getModItem(MagicBees.ID, "wax", 1L, 0), - 20 * 100); + CombType.ENDIUM, + new Materials[] { Materials.HeeEndium }, + new int[] { 50 * 100 }, + new int[] {}, + Voltage.HV, + GT_ModHandler.getModItem(MagicBees.ID, "wax", 1L, 0), + 20 * 100); } addCentrifugeToItemStack( - CombType.RUNEI, - new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1L, 0), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.RuneOfPowerFragment", 1L, 0), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.RuneOfAgilityFragment", 1L, 0), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.RuneOfVigorFragment", 1L, 0), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.RuneOfDefenseFragment", 1L, 0), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.RuneOfMagicFragment", 1L, 0) }, - new int[] { 25 * 100, 5 * 100, 5 * 100, 5 * 100, 5 * 100, 5 * 100 }, - Voltage.IV); + CombType.RUNEI, + new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1L, 0), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.RuneOfPowerFragment", 1L, 0), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.RuneOfAgilityFragment", 1L, 0), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.RuneOfVigorFragment", 1L, 0), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.RuneOfDefenseFragment", 1L, 0), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.RuneOfMagicFragment", 1L, 0) }, + new int[] { 25 * 100, 5 * 100, 5 * 100, 5 * 100, 5 * 100, 5 * 100 }, + Voltage.IV); addCentrifugeToItemStack( - CombType.RUNEII, - new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1L, 0), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.RuneOfVoidFragment", 1L, 0) }, - new int[] { 50 * 100, (int) (2.5 * 100) }, - Voltage.IV); + CombType.RUNEII, + new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1L, 0), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.RuneOfVoidFragment", 1L, 0) }, + new int[] { 50 * 100, (int) (2.5 * 100) }, + Voltage.IV); addCentrifugeToItemStack( - CombType.FIREESSENSE, - new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1L, 0), - GT_Bees.propolis.getStackForType(PropolisType.Fireessence), - GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, - new int[] { 30 * 100, (int) (7.5 * 100), 20 * 100 }, - Voltage.IV); + CombType.FIREESSENSE, + new ItemStack[] { GT_ModHandler.getModItem(MagicBees.ID, "wax", 1L, 0), + GT_Bees.propolis.getStackForType(PropolisType.Fireessence), + GT_Bees.drop.getStackForType(DropType.ENDERGOO) }, + new int[] { 30 * 100, (int) (7.5 * 100), 20 * 100 }, + Voltage.IV); // Walrus Recipe if (AE2FluidCraft.isModLoaded()) { addCentrifugeToItemStack( - CombType.WALRUS, - new ItemStack[] { GT_ModHandler.getModItem(AE2FluidCraft.ID, "walrus", 1L, 0) }, - new int[] { 100 * 100 }, - Voltage.LV); + CombType.WALRUS, + new ItemStack[] { GT_ModHandler.getModItem(AE2FluidCraft.ID, "walrus", 1L, 0) }, + new int[] { 100 * 100 }, + Voltage.LV); } // Space Line addCentrifugeToItemStack( - CombType.SPACE, - new ItemStack[] { ItemList.FR_Wax.get(1L), ItemList.FR_RefractoryWax.get(1L), - GT_Bees.drop.getStackForType(DropType.OXYGEN), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.CoinSpace", 1L, 0) }, - new int[] { 50 * 100, 30 * 100, 15 * 100, 5 * 100 }, - Voltage.HV); + CombType.SPACE, + new ItemStack[] { ItemList.FR_Wax.get(1L), ItemList.FR_RefractoryWax.get(1L), + GT_Bees.drop.getStackForType(DropType.OXYGEN), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.CoinSpace", 1L, 0) }, + new int[] { 50 * 100, 30 * 100, 15 * 100, 5 * 100 }, + Voltage.HV); addProcessGT(CombType.METEORICIRON, new Materials[] { Materials.MeteoricIron }, Voltage.HV); addProcessGT(CombType.DESH, new Materials[] { Materials.Desh }, Voltage.EV); addProcessGT(CombType.LEDOX, new Materials[] { Materials.Ledox }, Voltage.EV); @@ -1307,229 +1299,228 @@ public class ItemComb extends Item implements IGT_ItemWithMaterialRenderer { addProcessGT(CombType.ORIHARUKON, new Materials[] { Materials.Oriharukon }, Voltage.IV); addProcessGT(CombType.MYSTERIOUSCRYSTAL, new Materials[] { Materials.MysteriousCrystal }, Voltage.LuV); addCentrifugeToMaterial( - CombType.MYSTERIOUSCRYSTAL, - new Materials[] { Materials.MysteriousCrystal }, - new int[] { (GT_Mod.gregtechproxy.mNerfedCombs ? 10 : 40) * 100, - (GT_Mod.gregtechproxy.mNerfedCombs ? 15 : 50) * 100 }, - new int[] {}, - Voltage.LuV, - 512, - NI, - 50 * 100); + CombType.MYSTERIOUSCRYSTAL, + new Materials[] { Materials.MysteriousCrystal }, + new int[] { (GT_Mod.gregtechproxy.mNerfedCombs ? 10 : 40) * 100, + (GT_Mod.gregtechproxy.mNerfedCombs ? 15 : 50) * 100 }, + new int[] {}, + Voltage.LuV, + 512, + NI, + 50 * 100); addProcessGT(CombType.BLACKPLUTONIUM, new Materials[] { Materials.BlackPlutonium }, Voltage.LuV); addProcessGT(CombType.TRINIUM, new Materials[] { Materials.Trinium }, Voltage.ZPM); if (!GT_Mod.gregtechproxy.mNerfedCombs) { addCentrifugeToMaterial( - CombType.METEORICIRON, - new Materials[] { Materials.MeteoricIron, Materials.Iron }, - new int[] { 85 * 100, 100 * 100 }, - new int[] {}, - Voltage.HV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.DESH, - new Materials[] { Materials.Desh, Materials.Titanium }, - new int[] { 75 * 100, 50 * 100 }, - new int[] {}, - Voltage.EV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.LEDOX, - new Materials[] { Materials.Ledox, Materials.CallistoIce, Materials.Lead }, - new int[] { 65 * 100, 55 * 100, 85 * 100 }, - new int[] {}, - Voltage.EV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.CALLISTOICE, - new Materials[] { Materials.CallistoIce, Materials.Ledox, Materials.Lead }, - new int[] { 65 * 100, 75 * 100, 100 * 100 }, - new int[] {}, - Voltage.IV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.MYTRYL, - new Materials[] { Materials.Mytryl, Materials.Mithril }, - new int[] { 55 * 100, 50 * 100 }, - new int[] {}, - Voltage.IV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.QUANTIUM, - new Materials[] { Materials.Quantium, Materials.Osmium }, - new int[] { 50 * 100, 60 * 100 }, - new int[] {}, - Voltage.IV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.ORIHARUKON, - new Materials[] { Materials.Oriharukon, Materials.Lead }, - new int[] { 50 * 100, 75 * 100 }, - new int[] {}, - Voltage.IV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.BLACKPLUTONIUM, - new Materials[] { Materials.BlackPlutonium, Materials.Plutonium }, - new int[] { 25 * 100, 50 * 100 }, - new int[] {}, - Voltage.LuV, - NI, - 30 * 100); - addCentrifugeToMaterial( - CombType.TRINIUM, - new Materials[] { Materials.Trinium, Materials.Iridium }, - new int[] { 35 * 100, 45 * 100 }, - new int[] {}, - Voltage.ZPM, - NI, - 30 * 100); + CombType.METEORICIRON, + new Materials[] { Materials.MeteoricIron, Materials.Iron }, + new int[] { 85 * 100, 100 * 100 }, + new int[] {}, + Voltage.HV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.DESH, + new Materials[] { Materials.Desh, Materials.Titanium }, + new int[] { 75 * 100, 50 * 100 }, + new int[] {}, + Voltage.EV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.LEDOX, + new Materials[] { Materials.Ledox, Materials.CallistoIce, Materials.Lead }, + new int[] { 65 * 100, 55 * 100, 85 * 100 }, + new int[] {}, + Voltage.EV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.CALLISTOICE, + new Materials[] { Materials.CallistoIce, Materials.Ledox, Materials.Lead }, + new int[] { 65 * 100, 75 * 100, 100 * 100 }, + new int[] {}, + Voltage.IV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.MYTRYL, + new Materials[] { Materials.Mytryl, Materials.Mithril }, + new int[] { 55 * 100, 50 * 100 }, + new int[] {}, + Voltage.IV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.QUANTIUM, + new Materials[] { Materials.Quantium, Materials.Osmium }, + new int[] { 50 * 100, 60 * 100 }, + new int[] {}, + Voltage.IV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.ORIHARUKON, + new Materials[] { Materials.Oriharukon, Materials.Lead }, + new int[] { 50 * 100, 75 * 100 }, + new int[] {}, + Voltage.IV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.BLACKPLUTONIUM, + new Materials[] { Materials.BlackPlutonium, Materials.Plutonium }, + new int[] { 25 * 100, 50 * 100 }, + new int[] {}, + Voltage.LuV, + NI, + 30 * 100); + addCentrifugeToMaterial( + CombType.TRINIUM, + new Materials[] { Materials.Trinium, Materials.Iridium }, + new int[] { 35 * 100, 45 * 100 }, + new int[] {}, + Voltage.ZPM, + NI, + 30 * 100); } // Planet Line addCentrifugeToItemStack( - CombType.MOON, - new ItemStack[] { ItemList.FR_Wax.get(1L), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.MoonStoneDust", 1L, 0) }, - new int[] { 50 * 100, 30 * 100 }, - Voltage.MV, - 300); + CombType.MOON, + new ItemStack[] { ItemList.FR_Wax.get(1L), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.MoonStoneDust", 1L, 0) }, + new int[] { 50 * 100, 30 * 100 }, + Voltage.MV, + 300); addCentrifugeToItemStack( - CombType.MARS, - new ItemStack[] { ItemList.FR_Wax.get(1L), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.MarsStoneDust", 1L, 0) }, - new int[] { 50 * 100, 30 * 100 }, - Voltage.HV, - 300); + CombType.MARS, + new ItemStack[] { ItemList.FR_Wax.get(1L), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.MarsStoneDust", 1L, 0) }, + new int[] { 50 * 100, 30 * 100 }, + Voltage.HV, + 300); addCentrifugeToItemStack( - CombType.JUPITER, - new ItemStack[] { GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.IoStoneDust", 1L, 0), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.EuropaIceDust", 1L, 0), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.EuropaStoneDust", 1L, 0), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.GanymedeStoneDust", 1L, 0), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.CallistoStoneDust", 1L, 0), - GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.CallistoIce, 1L), - ItemList.FR_Wax.get(1L) }, - new int[] { 30 * 100, 30 * 100, 30 * 100, 30 * 100, 30 * 100, 5 * 100, 50 * 100 }, - Voltage.HV, - 300); + CombType.JUPITER, + new ItemStack[] { GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.IoStoneDust", 1L, 0), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.EuropaIceDust", 1L, 0), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.EuropaStoneDust", 1L, 0), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.GanymedeStoneDust", 1L, 0), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.CallistoStoneDust", 1L, 0), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.CallistoIce, 1L), ItemList.FR_Wax.get(1L) }, + new int[] { 30 * 100, 30 * 100, 30 * 100, 30 * 100, 30 * 100, 5 * 100, 50 * 100 }, + Voltage.HV, + 300); addCentrifugeToItemStack( - CombType.MERCURY, - new ItemStack[] { ItemList.FR_Wax.get(1L), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.MercuryCoreDust", 1L, 0), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.MercuryStoneDust", 1L, 0) }, - new int[] { 50 * 100, 30 * 100, 30 * 100 }, - Voltage.EV, - 300); + CombType.MERCURY, + new ItemStack[] { ItemList.FR_Wax.get(1L), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.MercuryCoreDust", 1L, 0), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.MercuryStoneDust", 1L, 0) }, + new int[] { 50 * 100, 30 * 100, 30 * 100 }, + Voltage.EV, + 300); addCentrifugeToItemStack( - CombType.VENUS, - new ItemStack[] { ItemList.FR_Wax.get(1L), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.VenusStoneDust", 1L, 0) }, - new int[] { 50 * 100, 30 * 100 }, - Voltage.EV, - 300); + CombType.VENUS, + new ItemStack[] { ItemList.FR_Wax.get(1L), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.VenusStoneDust", 1L, 0) }, + new int[] { 50 * 100, 30 * 100 }, + Voltage.EV, + 300); addCentrifugeToItemStack( - CombType.SATURN, - new ItemStack[] { ItemList.FR_Wax.get(1L), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.EnceladusStoneDust", 1L, 0), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.TitanStoneDust", 1L, 0) }, - new int[] { 50 * 100, 30 * 100, 30 * 100 }, - Voltage.IV, - 300); + CombType.SATURN, + new ItemStack[] { ItemList.FR_Wax.get(1L), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.EnceladusStoneDust", 1L, 0), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.TitanStoneDust", 1L, 0) }, + new int[] { 50 * 100, 30 * 100, 30 * 100 }, + Voltage.IV, + 300); addCentrifugeToItemStack( - CombType.URANUS, - new ItemStack[] { ItemList.FR_Wax.get(1L), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.MirandaStoneDust", 1L, 0), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.OberonStoneDust", 1L, 0) }, - new int[] { 50 * 100, 30 * 100, 30 * 100 }, - Voltage.IV, - 300); + CombType.URANUS, + new ItemStack[] { ItemList.FR_Wax.get(1L), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.MirandaStoneDust", 1L, 0), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.OberonStoneDust", 1L, 0) }, + new int[] { 50 * 100, 30 * 100, 30 * 100 }, + Voltage.IV, + 300); addCentrifugeToItemStack( - CombType.NEPTUN, - new ItemStack[] { ItemList.FR_Wax.get(1L), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.ProteusStoneDust", 1L, 0), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.TritonStoneDust", 1L, 0) }, - new int[] { 50 * 100, 30 * 100, 30 * 100 }, - Voltage.IV, - 300); + CombType.NEPTUN, + new ItemStack[] { ItemList.FR_Wax.get(1L), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.ProteusStoneDust", 1L, 0), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.TritonStoneDust", 1L, 0) }, + new int[] { 50 * 100, 30 * 100, 30 * 100 }, + Voltage.IV, + 300); addCentrifugeToItemStack( - CombType.PLUTO, - new ItemStack[] { ItemList.FR_Wax.get(1L), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.PlutoStoneDust", 1L, 0), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.PlutoIceDust", 1L, 0) }, - new int[] { 50 * 100, 30 * 100, 30 * 100 }, - Voltage.LuV, - 300); + CombType.PLUTO, + new ItemStack[] { ItemList.FR_Wax.get(1L), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.PlutoStoneDust", 1L, 0), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.PlutoIceDust", 1L, 0) }, + new int[] { 50 * 100, 30 * 100, 30 * 100 }, + Voltage.LuV, + 300); addCentrifugeToItemStack( - CombType.HAUMEA, - new ItemStack[] { ItemList.FR_Wax.get(1L), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.HaumeaStoneDust", 1L, 0) }, - new int[] { 50 * 100, 30 * 100 }, - Voltage.LuV, - 300); + CombType.HAUMEA, + new ItemStack[] { ItemList.FR_Wax.get(1L), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.HaumeaStoneDust", 1L, 0) }, + new int[] { 50 * 100, 30 * 100 }, + Voltage.LuV, + 300); addCentrifugeToItemStack( - CombType.MAKEMAKE, - new ItemStack[] { ItemList.FR_Wax.get(1L), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.MakeMakeStoneDust", 1L, 0) }, - new int[] { 50 * 100, 30 * 100 }, - Voltage.LuV, - 300); + CombType.MAKEMAKE, + new ItemStack[] { ItemList.FR_Wax.get(1L), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.MakeMakeStoneDust", 1L, 0) }, + new int[] { 50 * 100, 30 * 100 }, + Voltage.LuV, + 300); addCentrifugeToItemStack( - CombType.CENTAURI, - new ItemStack[] { ItemList.FR_Wax.get(1L), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.CentauriASurfaceDust", 1L, 0), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.CentauriAStoneDust", 1L, 0) }, - new int[] { 50 * 100, 30 * 100, 30 * 100 }, - Voltage.ZPM, - 300); + CombType.CENTAURI, + new ItemStack[] { ItemList.FR_Wax.get(1L), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.CentauriASurfaceDust", 1L, 0), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.CentauriAStoneDust", 1L, 0) }, + new int[] { 50 * 100, 30 * 100, 30 * 100 }, + Voltage.ZPM, + 300); addCentrifugeToItemStack( - CombType.TCETI, - new ItemStack[] { ItemList.FR_Wax.get(1L), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.TCetiEStoneDust", 1L, 0) }, - new int[] { 50 * 100, 30 * 100 }, - Voltage.ZPM, - 300); + CombType.TCETI, + new ItemStack[] { ItemList.FR_Wax.get(1L), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.TCetiEStoneDust", 1L, 0) }, + new int[] { 50 * 100, 30 * 100 }, + Voltage.ZPM, + 300); addCentrifugeToItemStack( - CombType.BARNARDA, - new ItemStack[] { ItemList.FR_Wax.get(1L), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.BarnardaEStoneDust", 1L, 0), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.BarnardaFStoneDust", 1L, 0) }, - new int[] { 50 * 100, 30 * 100, 30 * 100 }, - Voltage.ZPM, - 300); + CombType.BARNARDA, + new ItemStack[] { ItemList.FR_Wax.get(1L), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.BarnardaEStoneDust", 1L, 0), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.BarnardaFStoneDust", 1L, 0) }, + new int[] { 50 * 100, 30 * 100, 30 * 100 }, + Voltage.ZPM, + 300); addCentrifugeToItemStack( - CombType.VEGA, - new ItemStack[] { ItemList.FR_Wax.get(1L), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.VegaBStoneDust", 1L, 0) }, - new int[] { 50 * 100, 30 * 100 }, - Voltage.ZPM, - 300); + CombType.VEGA, + new ItemStack[] { ItemList.FR_Wax.get(1L), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "item.VegaBStoneDust", 1L, 0) }, + new int[] { 50 * 100, 30 * 100 }, + Voltage.ZPM, + 300); if (GalaxySpace.isModLoaded()) { addCentrifugeToItemStack( - CombType.SEAWEED, - new ItemStack[] { ItemList.FR_Wax.get(1L), - GT_ModHandler.getModItem(GalaxySpace.ID, "tcetiedandelions", 1L, 0) }, - new int[] { 50 * 100, 100 * 100 }, - Voltage.UV, - 100); + CombType.SEAWEED, + new ItemStack[] { ItemList.FR_Wax.get(1L), + GT_ModHandler.getModItem(GalaxySpace.ID, "tcetiedandelions", 1L, 0) }, + new int[] { 50 * 100, 100 * 100 }, + Voltage.UV, + 100); } // Infinity Line addCentrifugeToMaterial( - CombType.INFINITYCATALYST, - new Materials[] { Materials.InfinityCatalyst, Materials.Neutronium }, - new int[] { 25 * 100, 20 * 100 }, - new int[] {}, - Voltage.ZPM, - 100, - NI, - 50 * 100); + CombType.INFINITYCATALYST, + new Materials[] { Materials.InfinityCatalyst, Materials.Neutronium }, + new int[] { 25 * 100, 20 * 100 }, + new int[] {}, + Voltage.ZPM, + 100, + NI, + 50 * 100); // (Noble)gas Line addFluidExtractorProcess(CombType.HELIUM, Materials.Helium.getGas(250), Voltage.HV); @@ -1556,29 +1547,29 @@ public class ItemComb extends Item implements IGT_ItemWithMaterialRenderer { public void addAutoclaveProcess(CombType comb, Materials aMaterial, Voltage volt, int circuitNumber) { if (GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4) == NI) return; RA.addAutoclaveRecipe( - GT_Utility.copyAmount(9, getStackForType(comb)), - GT_Utility.getIntegratedCircuit(circuitNumber), - Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass() + volt.getUUAmplifier()) / 10))), - GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), - 10000, - (int) (aMaterial.getMass() * 128), - volt.getAutoClaveEnergy(), - volt.compareTo(Voltage.HV) > 0); + GT_Utility.copyAmount(9, getStackForType(comb)), + GT_Utility.getIntegratedCircuit(circuitNumber), + Materials.UUMatter.getFluid(Math.max(1, ((aMaterial.getMass() + volt.getUUAmplifier()) / 10))), + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 4), + 10000, + (int) (aMaterial.getMass() * 128), + volt.getAutoClaveEnergy(), + volt.compareTo(Voltage.HV) > 0); } public void addFluidExtractorProcess(CombType comb, FluidStack fluid, Voltage volt) { if (fluid == null) return; RA.addFluidExtractionRecipe( - GT_Utility.copyAmount(1, getStackForType(comb)), - null, - fluid, - 100 * 100, - (fluid.getFluid() - .getDensity() * 128 > 0 - ? (fluid.getFluid() - .getDensity() * 100) - : 128), - volt.getSimpleEnergy() / 2); + GT_Utility.copyAmount(1, getStackForType(comb)), + null, + fluid, + 100 * 100, + (fluid.getFluid() + .getDensity() * 128 > 0 + ? (fluid.getFluid() + .getDensity() * 100) + : 128), + volt.getSimpleEnergy() / 2); } /** @@ -1597,59 +1588,59 @@ public class ItemComb extends Item implements IGT_ItemWithMaterialRenderer { switch (comb) { case NEUTRONIUM: RA.addChemicalRecipe( - GT_Utility.copyAmount(4, tComb), - null, - volt.getFluidAccordingToCombTier(), - Materials.Neutronium.getMolten(576l), - Materials.Neutronium.getNuggets(1), - NI, - volt.getComplexTime() * 17, - volt.getChemicalEnergy(), - volt.compareTo(Voltage.IV) > 0); + GT_Utility.copyAmount(4, tComb), + null, + volt.getFluidAccordingToCombTier(), + Materials.Neutronium.getMolten(576l), + Materials.Neutronium.getNuggets(1), + NI, + volt.getComplexTime() * 17, + volt.getChemicalEnergy(), + volt.compareTo(Voltage.IV) > 0); case OSMIUM: RA.addChemicalRecipe( - GT_Utility.copyAmount(4, tComb), - null, - volt.getFluidAccordingToCombTier(), - Materials.Osmium.getMolten(288l), - Materials.Osmium.getNuggets(1), - NI, - volt.getComplexTime() * 17, - volt.getChemicalEnergy(), - volt.compareTo(Voltage.IV) > 0); + GT_Utility.copyAmount(4, tComb), + null, + volt.getFluidAccordingToCombTier(), + Materials.Osmium.getMolten(288l), + Materials.Osmium.getNuggets(1), + NI, + volt.getComplexTime() * 17, + volt.getChemicalEnergy(), + volt.compareTo(Voltage.IV) > 0); case PLATINUM: RA.addChemicalRecipe( - GT_Utility.copyAmount(4, tComb), - null, - volt.getFluidAccordingToCombTier(), - Materials.Platinum.getMolten(288l), - Materials.Platinum.getNuggets(1), - NI, - volt.getComplexTime() * 10, - volt.getChemicalEnergy(), - volt.compareTo(Voltage.HV) > 0); + GT_Utility.copyAmount(4, tComb), + null, + volt.getFluidAccordingToCombTier(), + Materials.Platinum.getMolten(288l), + Materials.Platinum.getNuggets(1), + NI, + volt.getComplexTime() * 10, + volt.getChemicalEnergy(), + volt.compareTo(Voltage.HV) > 0); case IRIDIUM: RA.addChemicalRecipe( - GT_Utility.copyAmount(4, tComb), - null, - volt.getFluidAccordingToCombTier(), - Materials.Iridium.getMolten(288l), - Materials.Iridium.getNuggets(1), - NI, - volt.getComplexTime() * 14, - volt.getChemicalEnergy(), - volt.compareTo(Voltage.EV) > 0); + GT_Utility.copyAmount(4, tComb), + null, + volt.getFluidAccordingToCombTier(), + Materials.Iridium.getMolten(288l), + Materials.Iridium.getNuggets(1), + NI, + volt.getComplexTime() * 14, + volt.getChemicalEnergy(), + volt.compareTo(Voltage.EV) > 0); default: RA.addChemicalRecipe( - GT_Utility.copyAmount(4, tComb), - null, - volt.getFluidAccordingToCombTier(), - null, - GT_OreDictUnificator.get(OrePrefixes.crushedPurified, materials, 4), - NI, - volt.getComplexTime(), - volt.getChemicalEnergy(), - volt.compareTo(Voltage.IV) > 0); + GT_Utility.copyAmount(4, tComb), + null, + volt.getFluidAccordingToCombTier(), + null, + GT_OreDictUnificator.get(OrePrefixes.crushedPurified, materials, 4), + NI, + volt.getComplexTime(), + volt.getChemicalEnergy(), + volt.compareTo(Voltage.IV) > 0); break; } } @@ -1675,12 +1666,12 @@ public class ItemComb extends Item implements IGT_ItemWithMaterialRenderer { * @param waxChance have same format like "chance" **/ public void addCentrifugeToMaterial(CombType comb, Materials[] aMaterial, int[] chance, int[] stackSize, - Voltage volt, ItemStack beeWax, int waxChance) { + Voltage volt, ItemStack beeWax, int waxChance) { addCentrifugeToMaterial(comb, aMaterial, chance, stackSize, volt, volt.getSimpleTime(), beeWax, waxChance); } public void addCentrifugeToMaterial(CombType comb, Materials[] aMaterial, int[] chance, int[] stackSize, - Voltage volt, int duration, ItemStack beeWax, int waxChance) { + Voltage volt, int duration, ItemStack beeWax, int waxChance) { ItemStack[] aOutPut = new ItemStack[aMaterial.length + 1]; stackSize = Arrays.copyOf(stackSize, aMaterial.length); chance = Arrays.copyOf(chance, aOutPut.length); @@ -1734,19 +1725,19 @@ public class ItemComb extends Item implements IGT_ItemWithMaterialRenderer { } RA.addCentrifugeRecipe( - tComb, - NI, - NF, - NF, - aItem[0], - aItem[1], - aItem[2], - aItem[3], - aItem[4], - aItem[5], - chance, - duration, - volt.getSimpleEnergy()); + tComb, + NI, + NF, + NF, + aItem[0], + aItem[1], + aItem[2], + aItem[3], + aItem[4], + aItem[5], + chance, + duration, + volt.getSimpleEnergy()); } public void registerOreDict() { diff --git a/src/main/java/gregtech/common/items/ItemDrop.java b/src/main/java/gregtech/common/items/ItemDrop.java index 6604b887e6..6e62281812 100644 --- a/src/main/java/gregtech/common/items/ItemDrop.java +++ b/src/main/java/gregtech/common/items/ItemDrop.java @@ -103,85 +103,85 @@ public class ItemDrop extends Item { tDrop = getStackForType(DropType.OIL); addProcessLV( - tDrop, - Materials.OilHeavy.getFluid(100L), - GT_ModHandler.getModItem(Forestry.ID, "propolis", 1L, 0), - 3000, - 8); + tDrop, + Materials.OilHeavy.getFluid(100L), + GT_ModHandler.getModItem(Forestry.ID, "propolis", 1L, 0), + 3000, + 8); RecipeManagers.squeezerManager.addRecipe( - 40, - new ItemStack[] { tDrop }, - Materials.OilHeavy.getFluid(100L), - GT_ModHandler.getModItem(Forestry.ID, "propolis", 1L, 0), - 30); + 40, + new ItemStack[] { tDrop }, + Materials.OilHeavy.getFluid(100L), + GT_ModHandler.getModItem(Forestry.ID, "propolis", 1L, 0), + 30); tDrop = getStackForType(DropType.COOLANT); addProcessLV( - tDrop, - new FluidStack(FluidRegistry.getFluid("ic2coolant"), 100), - GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1L, 0), - 3000, - 8); + tDrop, + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 100), + GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1L, 0), + 3000, + 8); RecipeManagers.squeezerManager.addRecipe( - 40, - new ItemStack[] { tDrop }, - new FluidStack(FluidRegistry.getFluid("ic2coolant"), 100), - GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1L, 0), - 30); + 40, + new ItemStack[] { tDrop }, + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 100), + GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1L, 0), + 30); tDrop = getStackForType(DropType.HOT_COOLANT); addProcessLV( - tDrop, - new FluidStack(FluidRegistry.getFluid("ic2hotcoolant"), 100), - GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1L, 2), - 3000, - 8); + tDrop, + new FluidStack(FluidRegistry.getFluid("ic2hotcoolant"), 100), + GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1L, 2), + 3000, + 8); RecipeManagers.squeezerManager.addRecipe( - 40, - new ItemStack[] { tDrop }, - new FluidStack(FluidRegistry.getFluid("ic2hotcoolant"), 100), - GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1L, 2), - 30); + 40, + new ItemStack[] { tDrop }, + new FluidStack(FluidRegistry.getFluid("ic2hotcoolant"), 100), + GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1L, 2), + 30); tDrop = getStackForType(DropType.SNOW_QUEEN); addProcessMV( - tDrop, - Materials.FierySteel.getFluid(200L), - GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "SnowQueenBloodDrop", 1L, 0), - 1500, - 48); + tDrop, + Materials.FierySteel.getFluid(200L), + GT_ModHandler.getModItem(NewHorizonsCoreMod.ID, "SnowQueenBloodDrop", 1L, 0), + 1500, + 48); tDrop = getStackForType(DropType.LAPIS); addProcessLV( - tDrop, - new FluidStack(FluidRegistry.getFluid("ic2coolant"), 200), - GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1L, 3), - 5000, - 1200, - 2); + tDrop, + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 200), + GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1L, 3), + 5000, + 1200, + 2); RecipeManagers.squeezerManager.addRecipe( - 400, - new ItemStack[] { tDrop }, - new FluidStack(FluidRegistry.getFluid("ic2coolant"), 100), - GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1L, 3), - 30); + 400, + new ItemStack[] { tDrop }, + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 100), + GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1L, 3), + 30); tDrop = getStackForType(DropType.HYDRA); addProcessMV( - tDrop, - Materials.FierySteel.getFluid(50L), - GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1L, 2), - 3000, - 8); + tDrop, + Materials.FierySteel.getFluid(50L), + GT_ModHandler.getModItem(MagicBees.ID, "propolis", 1L, 2), + 3000, + 8); tDrop = getStackForType(DropType.OXYGEN); addProcessLV( - tDrop, - new FluidStack(FluidRegistry.getFluid("liquidoxygen"), 100), - GT_ModHandler.getModItem(ExtraBees.ID, "propolis", 1L, 2), - 250, - 1200, - 8); + tDrop, + new FluidStack(FluidRegistry.getFluid("liquidoxygen"), 100), + GT_ModHandler.getModItem(ExtraBees.ID, "propolis", 1L, 2), + 250, + 1200, + 8); RecipeManagers.squeezerManager.addRecipe( - 400, - new ItemStack[] { tDrop }, - new FluidStack(FluidRegistry.getFluid("ic2coolant"), 100), - GT_ModHandler.getModItem(ExtraBees.ID, "propolis", 1L, 2), - 30); + 400, + new ItemStack[] { tDrop }, + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 100), + GT_ModHandler.getModItem(ExtraBees.ID, "propolis", 1L, 2), + 30); tDrop = getStackForType(DropType.ENDERGOO); if (HardcoreEnderExpansion.isModLoaded()) addProcessHV(tDrop, new FluidStack(FluidRegistry.getFluid("endergoo"), 500), GT_Values.NI, 1000); @@ -192,7 +192,7 @@ public class ItemDrop extends Item { } public void addProcessLV(ItemStack tDrop, FluidStack aOutput, ItemStack aOutput2, int aChance, int aDuration, - int aEUt) { + int aEUt) { GT_Values.RA.addFluidExtractionRecipe(tDrop, aOutput2, aOutput, aChance, aDuration, aEUt); } diff --git a/src/main/java/gregtech/common/items/ItemPropolis.java b/src/main/java/gregtech/common/items/ItemPropolis.java index 20573dcdd7..8513c02e2a 100644 --- a/src/main/java/gregtech/common/items/ItemPropolis.java +++ b/src/main/java/gregtech/common/items/ItemPropolis.java @@ -103,32 +103,27 @@ public class ItemPropolis extends Item { } public void addProcessHV(ItemStack tPropolis, ItemStack aOutput2) { - GT_Values.RA.addFluidExtractionRecipe( - tPropolis, - aOutput2, - FluidRegistry.getFluidStack("endergoo", 100), - 5000, - 50, - 480); + GT_Values.RA + .addFluidExtractionRecipe(tPropolis, aOutput2, FluidRegistry.getFluidStack("endergoo", 100), 5000, 50, 480); } public void addProcessEV(ItemStack tPropolis, ItemStack aOutput2) { GT_Values.RA.addFluidExtractionRecipe( - tPropolis, - aOutput2, - FluidRegistry.getFluidStack("endergoo", 200), - 2500, - 100, - 1920); + tPropolis, + aOutput2, + FluidRegistry.getFluidStack("endergoo", 200), + 2500, + 100, + 1920); } public void addProcessIV(ItemStack tPropolis, ItemStack aOutput2) { GT_Values.RA.addFluidExtractionRecipe( - tPropolis, - aOutput2, - FluidRegistry.getFluidStack("endergoo", 300), - 1500, - 150, - 7680); + tPropolis, + aOutput2, + FluidRegistry.getFluidStack("endergoo", 300), + 1500, + 150, + 7680); } } diff --git a/src/main/java/gregtech/common/items/PollenType.java b/src/main/java/gregtech/common/items/PollenType.java index 94393c1c3d..093a21187b 100644 --- a/src/main/java/gregtech/common/items/PollenType.java +++ b/src/main/java/gregtech/common/items/PollenType.java @@ -24,11 +24,9 @@ public enum PollenType { public String getName() { return GT_LanguageManager.addStringLocalization( - "pollen." + this.name, - this.name.substring(0, 1) - .toUpperCase() - + this.name.substring(1) - + " Pollen"); + "pollen." + this.name, + 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 1060c21b0c..91f3f432b2 100644 --- a/src/main/java/gregtech/common/items/PropolisType.java +++ b/src/main/java/gregtech/common/items/PropolisType.java @@ -16,7 +16,7 @@ public enum PropolisType { Fireessence("Fireessence", true); private static int[] colours = new int[] { 0xCC00FA, 0xDCB0E5, 0x9010AD, 0xFFFF00, 0x911ECE, 0x161616, 0xEE053D, - 0xa0ffff, 0xD41238 }; + 0xa0ffff, 0xD41238 }; public boolean showInList; public Materials material; @@ -35,11 +35,9 @@ public enum PropolisType { public String getName() { // return "gt.comb."+this.name; return GT_LanguageManager.addStringLocalization( - "propolis." + this.name, - this.name.substring(0, 1) - .toUpperCase() - + this.name.substring(1) - + " Propolis"); + "propolis." + this.name, + 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_Arrow.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow.java index 7c03965cc0..8005009d14 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow.java @@ -33,7 +33,7 @@ public class Behaviour_Arrow extends Behaviour_None { } public Behaviour_Arrow(Class aArrow, float aSpeed, float aPrecision, - Enchantment aEnchantment, int aLevel) { + Enchantment aEnchantment, int aLevel) { this.mArrow = aArrow; this.mSpeedMultiplier = aSpeed; this.mPrecision = aPrecision; @@ -81,20 +81,20 @@ public class Behaviour_Arrow extends Behaviour_None { IPosition tPosition = BlockDispenser.func_149939_a(aSource); EnumFacing tFacing = BlockDispenser.func_149937_b(aSource.getBlockMetadata()); GT_Entity_Arrow tEntityArrow = (GT_Entity_Arrow) getProjectile( - aItem, - SubTag.PROJECTILE_ARROW, - aStack, - aWorld, - tPosition.getX(), - tPosition.getY(), - tPosition.getZ()); + aItem, + SubTag.PROJECTILE_ARROW, + aStack, + aWorld, + tPosition.getX(), + tPosition.getY(), + tPosition.getZ()); if (tEntityArrow != null) { tEntityArrow.setThrowableHeading( - tFacing.getFrontOffsetX(), - tFacing.getFrontOffsetY() + 0.1F, - tFacing.getFrontOffsetZ(), - this.mSpeedMultiplier * 1.1F, - this.mPrecision); + tFacing.getFrontOffsetX(), + tFacing.getFrontOffsetY() + 0.1F, + tFacing.getFrontOffsetZ(), + this.mSpeedMultiplier * 1.1F, + this.mPrecision); tEntityArrow.setArrowItem(aStack); tEntityArrow.canBePickedUp = 1; aWorld.spawnEntityInWorld(tEntityArrow); @@ -113,32 +113,28 @@ public class Behaviour_Arrow extends Behaviour_None { @Override public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, - double aX, double aY, double aZ) { + double aX, double aY, double aZ) { if (!hasProjectile(aItem, aProjectileType, aStack)) { return null; } - GT_Entity_Arrow rArrow = (GT_Entity_Arrow) GT_Utility.callConstructor( - this.mArrow.getName(), - -1, - null, - true, - new Object[] { aWorld, aX, aY, aZ }); + GT_Entity_Arrow rArrow = (GT_Entity_Arrow) GT_Utility + .callConstructor(this.mArrow.getName(), -1, null, true, new Object[] { aWorld, aX, aY, aZ }); rArrow.setArrowItem(aStack); return rArrow; } @Override public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, - EntityLivingBase aEntity, float aSpeed) { + EntityLivingBase aEntity, float aSpeed) { if (!hasProjectile(aItem, aProjectileType, aStack)) { return null; } GT_Entity_Arrow rArrow = (GT_Entity_Arrow) GT_Utility.callConstructor( - this.mArrow.getName(), - -1, - null, - true, - new Object[] { aWorld, aEntity, this.mSpeedMultiplier * aSpeed }); + this.mArrow.getName(), + -1, + null, + true, + new Object[] { aWorld, aEntity, this.mSpeedMultiplier * aSpeed }); rArrow.setArrowItem(aStack); return rArrow; } diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow_Potion.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow_Potion.java index 4397429018..3643de7b77 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow_Potion.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow_Potion.java @@ -23,7 +23,7 @@ public class Behaviour_Arrow_Potion extends Behaviour_Arrow { } public Behaviour_Arrow_Potion(float aSpeed, float aPrecision, Enchantment aEnchantment, int aLevel, - int... aPotions) { + int... aPotions) { super(GT_Entity_Arrow_Potion.class, aSpeed, aPrecision, aEnchantment, aLevel); this.mPotions = aPotions; } @@ -34,11 +34,11 @@ public class Behaviour_Arrow_Potion extends Behaviour_Arrow { for (int i = 3; i < this.mPotions.length; i += 4) { if (aEntity.worldObj.rand.nextInt(100) < this.mPotions[i]) { ((EntityLivingBase) aEntity).addPotionEffect( - new PotionEffect( - this.mPotions[(i - 3)], - this.mPotions[(i - 2)], - this.mPotions[(i - 1)], - false)); + new PotionEffect( + this.mPotions[(i - 3)], + this.mPotions[(i - 2)], + this.mPotions[(i - 1)], + false)); } } } @@ -47,7 +47,7 @@ public class Behaviour_Arrow_Potion extends Behaviour_Arrow { @Override public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, - double aX, double aY, double aZ) { + double aX, double aY, double aZ) { if (!hasProjectile(aItem, aProjectileType, aStack)) { return null; } @@ -59,7 +59,7 @@ public class Behaviour_Arrow_Potion extends Behaviour_Arrow { @Override public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, - EntityLivingBase aEntity, float aSpeed) { + EntityLivingBase aEntity, float aSpeed) { if (!hasProjectile(aItem, aProjectileType, aStack)) { return null; } 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 d0c589c09f..d0f5582549 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,16 +23,15 @@ import gregtech.api.util.*; public class Behaviour_Cover_Tool extends Behaviour_None { public static final IItemBehaviour 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; @Override public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, - int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { if (aWorld.isRemote) { return false; } @@ -86,41 +85,41 @@ public class Behaviour_Cover_Tool extends Behaviour_None { @SuppressWarnings({ "unchecked", "rawtypes" }) private void doCopy(TileEntity aTileEntity, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, - float hitZ, List aList) { + float hitZ, List aList) { aList.add( - "----- X: " + EnumChatFormatting.AQUA - + GT_Utility.formatNumbers(aX) - + EnumChatFormatting.RESET - + " Y: " - + EnumChatFormatting.AQUA - + GT_Utility.formatNumbers(aY) - + EnumChatFormatting.RESET - + " Z: " - + EnumChatFormatting.AQUA - + GT_Utility.formatNumbers(aZ) - + EnumChatFormatting.RESET - + " D: " - + EnumChatFormatting.AQUA - + aWorld.provider.dimensionId - + EnumChatFormatting.RESET - + " -----"); + "----- X: " + EnumChatFormatting.AQUA + + GT_Utility.formatNumbers(aX) + + EnumChatFormatting.RESET + + " Y: " + + EnumChatFormatting.AQUA + + GT_Utility.formatNumbers(aY) + + EnumChatFormatting.RESET + + " Z: " + + EnumChatFormatting.AQUA + + GT_Utility.formatNumbers(aZ) + + EnumChatFormatting.RESET + + " D: " + + EnumChatFormatting.AQUA + + aWorld.provider.dimensionId + + EnumChatFormatting.RESET + + " -----"); if (aTileEntity instanceof ICoverable tCoverable) { int tSide = tCoverable.getCoverItemAtSide((byte) aSide) != null ? aSide - : tCoverable.getCoverItemAtSide(GT_Utility.determineWrenchingSide((byte) aSide, hitX, hitY, hitZ)) - != null ? GT_Utility.determineWrenchingSide((byte) aSide, hitX, hitY, hitZ) : -1; + : tCoverable.getCoverItemAtSide(GT_Utility.determineWrenchingSide((byte) aSide, hitX, hitY, hitZ)) + != null ? GT_Utility.determineWrenchingSide((byte) aSide, hitX, hitY, hitZ) : -1; if (tSide != -1) { mStoredData = tCoverable.getComplexCoverDataAtSide((byte) tSide); mCoverType = tCoverable.getCoverIDAtSide((byte) tSide); aList.add( - "Block Side: " + EnumChatFormatting.AQUA - + ForgeDirection.getOrientation(tSide) - .name() - + EnumChatFormatting.RESET); + "Block Side: " + EnumChatFormatting.AQUA + + ForgeDirection.getOrientation(tSide) + .name() + + EnumChatFormatting.RESET); aList.add( - "Cover Type: " + EnumChatFormatting.GREEN - + tCoverable.getCoverItemAtSide((byte) tSide) - .getDisplayName() - + EnumChatFormatting.RESET); + "Cover Type: " + EnumChatFormatting.GREEN + + tCoverable.getCoverItemAtSide((byte) tSide) + .getDisplayName() + + EnumChatFormatting.RESET); } else { mStoredData = GregTech_API.sNoBehavior.createDataObject(); mCoverType = 0; @@ -140,8 +139,8 @@ public class Behaviour_Cover_Tool extends Behaviour_None { return; } int tSide = tCoverable.getCoverItemAtSide((byte) aSide) != null ? aSide - : tCoverable.getCoverItemAtSide(GT_Utility.determineWrenchingSide((byte) aSide, hitX, hitY, hitZ)) - != null ? GT_Utility.determineWrenchingSide((byte) aSide, hitX, hitY, hitZ) : -1; + : tCoverable.getCoverItemAtSide(GT_Utility.determineWrenchingSide((byte) aSide, hitX, hitY, hitZ)) + != null ? GT_Utility.determineWrenchingSide((byte) aSide, hitX, hitY, hitZ) : -1; if (tSide != -1) { int tCoverID = tCoverable.getCoverIDAtSide((byte) tSide); if (tCoverID == mCoverType) { diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Crowbar.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Crowbar.java index 4d8ecb2f41..76bc0615c1 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Crowbar.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Crowbar.java @@ -25,7 +25,7 @@ public class Behaviour_Crowbar extends Behaviour_None { @Override public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, - int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { if (aWorld.isRemote) { return false; } 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 8b876a5b44..13e6622b47 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java @@ -33,7 +33,7 @@ public class Behaviour_DataStick extends Behaviour_None { } } short sTier = GT_Utility.ItemNBT.getNBT(aStack) - .getShort("rocket_tier"); + .getShort("rocket_tier"); if (sTier > 0 && sTier < 100) { aList.add("Rocket Schematic Tier: " + sTier); } else if (sTier >= 100) { @@ -50,7 +50,7 @@ public class Behaviour_DataStick extends Behaviour_None { } } long lastUpdate = GT_Utility.ItemNBT.getNBT(aStack) - .getLong("lastUpdate"); + .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 a66cba699d..0d8e26ac66 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Hoe.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Hoe.java @@ -28,7 +28,7 @@ public class Behaviour_Hoe extends Behaviour_None { @Override public boolean onItemUse(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, - int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { if (!aPlayer.canPlayerEdit(aX, aY, aZ, aSide, aStack)) { return false; } @@ -44,15 +44,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(); + && ((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(); 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 1e232d4988..d348f3eed4 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Lighter.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Lighter.java @@ -24,18 +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) { + long aFuelAmount) { this.mFullLighter = aFullLighter; this.mUsedLighter = aUsedLighter; this.mEmptyLighter = aEmptyLighter; @@ -53,13 +50,13 @@ public class Behaviour_Lighter extends Behaviour_None { long tFuelAmount = GT_Utility.ItemNBT.getLighterFuel(aStack); if (GT_Utility.areStacksEqual(aStack, this.mUsedLighter, true)) { GT_Utility.sendSoundToPlayers( - aPlayer.worldObj, - SoundResource.FIRE_IGNITE, - 1.0F, - 1.0F, - MathHelper.floor_double(aEntity.posX), - MathHelper.floor_double(aEntity.posY), - MathHelper.floor_double(aEntity.posZ)); + aPlayer.worldObj, + SoundResource.FIRE_IGNITE, + 1.0F, + 1.0F, + MathHelper.floor_double(aEntity.posX), + MathHelper.floor_double(aEntity.posY), + MathHelper.floor_double(aEntity.posZ)); ((EntityCreeper) aEntity).func_146079_cb(); if (!aPlayer.capabilities.isCreativeMode) { tFuelAmount -= 1L; @@ -76,13 +73,13 @@ public class Behaviour_Lighter extends Behaviour_None { @Override public boolean onItemUse(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, - int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { return false; } @Override public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, - int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { if ((aWorld.isRemote) || (aStack.stackSize != 1)) { return false; } @@ -134,8 +131,8 @@ public class Behaviour_Lighter extends Behaviour_None { aList.add(this.mTooltip); NBTTagCompound tNBT = aStack.getTagCompound(); long tFuelAmount = tNBT == null ? this.mFuelAmount - : GT_Utility.areStacksEqual(aStack, this.mFullLighter, true) ? this.mFuelAmount - : tNBT.getLong("GT.LighterFuel"); + : GT_Utility.areStacksEqual(aStack, this.mFullLighter, true) ? this.mFuelAmount + : tNBT.getLong("GT.LighterFuel"); aList.add(this.mTooltipUses + " " + tFuelAmount); aList.add(this.mTooltipUnstackable); return aList; diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java index ca6a1e8466..6928222af1 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java @@ -28,13 +28,13 @@ public class Behaviour_None implements IItemBehaviour { @Override public boolean onItemUse(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, - int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { return false; } @Override public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, - int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { return false; } @@ -50,7 +50,7 @@ public class Behaviour_None implements IItemBehaviour { @Override public void onUpdate(GT_MetaBase_Item aItem, ItemStack aStack, World aWorld, Entity aPlayer, int aTimer, - boolean aIsInHand) {} + boolean aIsInHand) {} @Override public boolean isItemStackUsable(GT_MetaBase_Item aItem, ItemStack aStack) { @@ -78,13 +78,13 @@ public class Behaviour_None implements IItemBehaviour { @Override public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, - double aX, double aY, double aZ) { + double aX, double aY, double aZ) { return null; } @Override public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, - EntityLivingBase aEntity, float aSpeed) { + EntityLivingBase aEntity, float aSpeed) { return null; } 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 0023511846..16c1f1dec1 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,9 +18,8 @@ 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; @@ -28,19 +27,19 @@ public class Behaviour_Plunger_Essentia extends Behaviour_None { @Override public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, - int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { if (aWorld.isRemote) { return false; } TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (((aTileEntity instanceof IEssentiaTransport)) && ((aPlayer.capabilities.isCreativeMode) - || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); for (ForgeDirection tDirection : ForgeDirection.VALID_DIRECTIONS) { ((IEssentiaTransport) aTileEntity).takeEssentia( - ((IEssentiaTransport) aTileEntity).getEssentiaType(tDirection), - ((IEssentiaTransport) aTileEntity).getEssentiaAmount(tDirection), - tDirection); + ((IEssentiaTransport) aTileEntity).getEssentiaType(tDirection), + ((IEssentiaTransport) aTileEntity).getEssentiaAmount(tDirection), + tDirection); } return true; } 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 cf5b782200..95e895ba91 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,9 +21,8 @@ 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; @@ -31,7 +30,7 @@ public class Behaviour_Plunger_Fluid extends Behaviour_None { @Override public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, - int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { if (aWorld.isRemote) { return false; } @@ -40,16 +39,16 @@ public class Behaviour_Plunger_Fluid extends Behaviour_None { for (ForgeDirection tDirection : ForgeDirection.VALID_DIRECTIONS) { if (((IFluidHandler) aTileEntity).drain(tDirection, 1000, false) != null) { if ((aPlayer.capabilities.isCreativeMode) - || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { ((IFluidHandler) aTileEntity).drain(tDirection, 1000, true); GT_Utility.sendSoundToPlayers( - aWorld, - SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, - 1.0F, - -1.0F, - aX, - aY, - aZ); + aWorld, + SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, + 1.0F, + -1.0F, + aX, + aY, + aZ); return true; } } @@ -60,14 +59,8 @@ public class Behaviour_Plunger_Fluid extends Behaviour_None { if (mTileEntity instanceof GT_MetaTileEntity_BasicTank machine) { 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 e4f0c3012d..41df9d6e95 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,9 +21,8 @@ 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; @@ -31,7 +30,7 @@ public class Behaviour_Plunger_Item extends Behaviour_None { @Override public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, - int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { if (aWorld.isRemote) { return false; } @@ -39,39 +38,36 @@ public class Behaviour_Plunger_Item extends Behaviour_None { if ((aTileEntity instanceof IGregTechTileEntity)) { 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()) { + for (IMetaTileEntityItemPipe tTileEntity : GT_Utility + .sortMapByValuesAcending( + 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)) { if ((tTileEntity.getStackInSlot(i) != null) && ((aPlayer.capabilities.isCreativeMode) - || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { ItemStack tStack = tTileEntity.decrStackSize(i, 64); if (tStack != null) { EntityItem tEntity = new EntityItem( - aWorld, - ((IGregTechTileEntity) aTileEntity).getOffsetX((byte) aSide, 1) + 0.5D, - ((IGregTechTileEntity) aTileEntity).getOffsetY((byte) aSide, 1) + 0.5D, - ((IGregTechTileEntity) aTileEntity).getOffsetZ((byte) aSide, 1) + 0.5D, - tStack); + aWorld, + ((IGregTechTileEntity) aTileEntity).getOffsetX((byte) aSide, 1) + 0.5D, + ((IGregTechTileEntity) aTileEntity).getOffsetY((byte) aSide, 1) + 0.5D, + ((IGregTechTileEntity) aTileEntity).getOffsetZ((byte) aSide, 1) + 0.5D, + tStack); tEntity.motionX = 0.0D; tEntity.motionY = 0.0D; tEntity.motionZ = 0.0D; aWorld.spawnEntityInWorld(tEntity); GT_Utility.sendSoundToPlayers( - aWorld, - SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, - 1.0F, - -1.0F, - aX, - aY, - aZ); + 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_Prospecting.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java index c007473df1..43a35cff05 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java @@ -31,9 +31,8 @@ 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; @@ -42,7 +41,7 @@ public class Behaviour_Prospecting extends Behaviour_None { @Override public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, - int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { if (aWorld.isRemote) { return false; } @@ -54,26 +53,26 @@ 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.mMaterial != null + && tAssociation.mPrefix.toString() + .startsWith("ore")) { GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("100", "This is ") + tAssociation.mMaterial.mMaterial.mDefaultLocalName - + GT_Utility.trans("101", " Ore.")); + aPlayer, + GT_Utility.trans("100", "This is ") + tAssociation.mMaterial.mMaterial.mDefaultLocalName + + GT_Utility.trans("101", " Ore.")); GT_Utility.sendSoundToPlayers(aWorld, SoundResource.RANDOM_ANVIL_USE, 1.0F, -1.0F, aX, aY, aZ); return true; } if (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone) - || aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack) - || aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone) - || aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockStones) - || aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites) - || aBlock == GregTech_API.sBlockOresUb1 - || aBlock == GregTech_API.sBlockOresUb2 - || aBlock == GregTech_API.sBlockOresUb3 - || aBlock == GregTech_API.sBlockOres1) { + || aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack) + || aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone) + || aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockStones) + || aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites) + || aBlock == GregTech_API.sBlockOresUb1 + || aBlock == GregTech_API.sBlockOresUb2 + || aBlock == GregTech_API.sBlockOresUb3 + || aBlock == GregTech_API.sBlockOres1) { if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) { GT_Utility.sendSoundToPlayers(aWorld, SoundResource.RANDOM_ANVIL_USE, 1.0F, -1.0F, aX, aY, aZ); int tMetaID; @@ -87,27 +86,25 @@ 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) { - GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("103", "There is a Liquid behind this Rock.")); + GT_Utility + .sendChatToPlayer(aPlayer, GT_Utility.trans("103", "There is a Liquid behind this Rock.")); break; } if (tBlock == Blocks.monster_egg || !GT_Utility.hasBlockHitBox(aWorld, tX, tY, tZ)) { GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("104", "There is an Air Pocket behind this Rock.")); + aPlayer, + GT_Utility.trans("104", "There is an Air Pocket behind this Rock.")); break; } if (tBlock != aBlock) { if (i < 4) GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("105", "Material is changing behind this Rock.")); + aPlayer, + GT_Utility.trans("105", "Material is changing behind this Rock.")); break; } } @@ -122,12 +119,12 @@ public class Behaviour_Prospecting extends Behaviour_None { TileEntity tTileEntity = aWorld.getTileEntity(tX, tY, tZ); if (tTileEntity instanceof GT_TileEntity_Ores) { Materials tMaterial = GregTech_API.sGeneratedMaterials[((GT_TileEntity_Ores) tTileEntity).mMetaData - % 1000]; + % 1000]; if (tMaterial != null && tMaterial != Materials._NULL) { GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("106", "Found traces of ") + tMaterial.mDefaultLocalName - + GT_Utility.trans("101", " Ore.")); + aPlayer, + GT_Utility.trans("106", "Found traces of ") + tMaterial.mDefaultLocalName + + GT_Utility.trans("101", " Ore.")); return true; } } @@ -135,14 +132,14 @@ public class Behaviour_Prospecting extends Behaviour_None { tMetaID = aWorld.getBlockMetadata(tX, tY, tZ); tAssociation = GT_OreDictUnificator.getAssociation(new ItemStack(tBlock, 1, tMetaID)); if (tAssociation != null && tAssociation.mPrefix != null - && tAssociation.mMaterial != null - && tAssociation.mPrefix.toString() - .startsWith("ore")) { + && tAssociation.mMaterial != null + && tAssociation.mPrefix.toString() + .startsWith("ore")) { GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("106", "Found traces of ") - + tAssociation.mMaterial.mMaterial.mDefaultLocalName - + GT_Utility.trans("101", " Ore.")); + aPlayer, + GT_Utility.trans("106", "Found traces of ") + + tAssociation.mMaterial.mMaterial.mDefaultLocalName + + GT_Utility.trans("101", " Ore.")); return true; } } 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 d82585184d..c041e02881 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Scanner.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Scanner.java @@ -19,20 +19,19 @@ import gregtech.api.util.GT_Utility; public class Behaviour_Scanner extends Behaviour_None { public static final IItemBehaviour 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, - int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { NBTTagCompound tNBT = aStack.getTagCompound(); if (((aPlayer instanceof EntityPlayerMP)) && (aItem.canUse(aStack, 20000.0D))) { ArrayList tList = new ArrayList<>(); if (aItem.use( - aStack, - GT_Utility.getCoordinateScan(tList, aPlayer, aWorld, 1, aX, aY, aZ, aSide, hitX, hitY, hitZ), - aPlayer)) { + aStack, + GT_Utility.getCoordinateScan(tList, aPlayer, aWorld, 1, aX, aY, aZ, aSide, hitX, hitY, hitZ), + aPlayer)) { int tList_sS = tList.size(); tNBT.setInteger("dataLinesCount", tList_sS); for (int i = 0; i < tList_sS; i++) { 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 6bb687a5a8..65be65a96d 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Scoop.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Scoop.java @@ -17,9 +17,8 @@ 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; @@ -32,23 +31,23 @@ public class Behaviour_Scoop extends Behaviour_None { return true; } if ((aPlayer.capabilities.isCreativeMode) - || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { IButterfly tButterfly = ((IEntityButterfly) aEntity).getButterfly(); tButterfly.getGenome() - .getPrimary() - .getRoot() - .getBreedingTracker(aEntity.worldObj, aPlayer.getGameProfile()) - .registerCatch(tButterfly); + .getPrimary() + .getRoot() + .getBreedingTracker(aEntity.worldObj, aPlayer.getGameProfile()) + .registerCatch(tButterfly); aPlayer.worldObj.spawnEntityInWorld( - new EntityItem( - aPlayer.worldObj, - aEntity.posX, - aEntity.posY, - aEntity.posZ, - tButterfly.getGenome() - .getPrimary() - .getRoot() - .getMemberStack(tButterfly.copy(), EnumFlutterType.BUTTERFLY.ordinal()))); + new EntityItem( + aPlayer.worldObj, + aEntity.posX, + aEntity.posY, + aEntity.posZ, + tButterfly.getGenome() + .getPrimary() + .getRoot() + .getMemberStack(tButterfly.copy(), EnumFlutterType.BUTTERFLY.ordinal()))); aEntity.setDead(); } return true; diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Screwdriver.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Screwdriver.java index e2fa9d8f71..3e15849e3f 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Screwdriver.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Screwdriver.java @@ -23,7 +23,7 @@ public class Behaviour_Screwdriver extends Behaviour_None { @Override public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, - int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { if (aWorld.isRemote) { return false; } 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 949b57e581..8adcc8a59d 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Sense.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Sense.java @@ -15,9 +15,8 @@ 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; @@ -25,7 +24,7 @@ public class Behaviour_Sense extends Behaviour_None { @Override public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, - int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { if (aWorld.isRemote) { return false; } @@ -35,9 +34,9 @@ public class Behaviour_Sense extends Behaviour_None { for (int j = -2; j < 3; j++) { for (int k = -2; k < 3; k++) { if ((aStack.stackSize > 0) - && (((tTileEntity = aWorld.getTileEntity(aX + i, aY + j, aZ + k)) instanceof ICropTile)) - && (((ICropTile) tTileEntity).harvest(true)) - && (!aPlayer.capabilities.isCreativeMode)) { + && (((tTileEntity = aWorld.getTileEntity(aX + i, aY + j, aZ + k)) instanceof ICropTile)) + && (((ICropTile) tTileEntity).harvest(true)) + && (!aPlayer.capabilities.isCreativeMode)) { ((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts / 20); } } diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_SensorKit.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_SensorKit.java index 62ceebd365..7362621df9 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_SensorKit.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_SensorKit.java @@ -19,19 +19,19 @@ import gregtech.api.util.GT_Utility; public class Behaviour_SensorKit extends Behaviour_None { private final String mTooltip = GT_LanguageManager.addStringLocalization( - "gt.behaviour.sensorkit.tooltip", - "Used to display Information using the Mod Nuclear Control"); + "gt.behaviour.sensorkit.tooltip", + "Used to display Information using the Mod Nuclear Control"); @Override public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, - int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { if ((aPlayer instanceof EntityPlayerMP)) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if (((tTileEntity instanceof IInventory)) && (!((IInventory) tTileEntity).isUseableByPlayer(aPlayer))) { return false; } if (((tTileEntity instanceof IGregTechDeviceInformation)) - && (((IGregTechDeviceInformation) tTileEntity).isGivingInformation())) { + && (((IGregTechDeviceInformation) tTileEntity).isGivingInformation())) { GT_Utility.setStack(aStack, ItemList.NC_SensorCard.get(aStack.stackSize)); NBTTagCompound tNBT = aStack.getTagCompound(); if (tNBT == null) { 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 75f3afb4fc..7f529282dd 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_SoftHammer.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_SoftHammer.java @@ -17,9 +17,8 @@ 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; @@ -27,7 +26,7 @@ public class Behaviour_SoftHammer extends Behaviour_None { @Override public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, - int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { if (aWorld.isRemote) { return false; } @@ -38,127 +37,85 @@ public class Behaviour_SoftHammer extends Behaviour_None { byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ); if (aBlock == Blocks.lit_redstone_lamp) { if ((aPlayer.capabilities.isCreativeMode) - || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { 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; } if (aBlock == Blocks.redstone_lamp) { if ((aPlayer.capabilities.isCreativeMode) - || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { 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; } if (aBlock == Blocks.golden_rail) { if ((aPlayer.capabilities.isCreativeMode) - || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { 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; } if (aBlock == Blocks.activator_rail) { if ((aPlayer.capabilities.isCreativeMode) - || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { 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; } if ((aBlock == Blocks.log) || (aBlock == Blocks.log2) || (aBlock == Blocks.hay_block)) { if ((aPlayer.capabilities.isCreativeMode) - || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta + 4) % 12, 3); } return true; } if ((aBlock == Blocks.piston) || (aBlock == Blocks.sticky_piston) - || (aBlock == Blocks.dispenser) - || (aBlock == Blocks.dropper)) { + || (aBlock == Blocks.dispenser) + || (aBlock == Blocks.dropper)) { if ((aPlayer.capabilities.isCreativeMode) - || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + || (((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; } if ((aBlock == Blocks.pumpkin) || (aBlock == Blocks.lit_pumpkin) - || (aBlock == Blocks.furnace) - || (aBlock == Blocks.lit_furnace) - || (aBlock == Blocks.chest) - || (aBlock == Blocks.trapped_chest)) { + || (aBlock == Blocks.furnace) + || (aBlock == Blocks.lit_furnace) + || (aBlock == Blocks.chest) + || (aBlock == Blocks.trapped_chest)) { if ((aPlayer.capabilities.isCreativeMode) - || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + || (((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; } if (aBlock == Blocks.hopper) { if ((aPlayer.capabilities.isCreativeMode) - || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + || (((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_Sonictron.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java index a191d97209..02413bf143 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java @@ -99,7 +99,7 @@ public class Behaviour_Sonictron extends Behaviour_None { @Override public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, - int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { setCurrentIndex(aStack, -1); return false; } @@ -112,17 +112,17 @@ public class Behaviour_Sonictron extends Behaviour_None { @Override public void onUpdate(GT_MetaBase_Item aItem, ItemStack aStack, World aWorld, Entity aPlayer, int aTimer, - boolean aIsInHand) { + boolean aIsInHand) { int tTickTimer = getTickTimer(aStack); int tCurrentIndex = getCurrentIndex(aStack); if ((tTickTimer++ % 2 == 0) && (tCurrentIndex > -1)) { ItemStack[] tInventory = getNBTInventory(aStack); GT_Values.GT.doSonictronSound( - tInventory[tCurrentIndex], - aPlayer.worldObj, - aPlayer.posX, - aPlayer.posY, - aPlayer.posZ); + tInventory[tCurrentIndex], + aPlayer.worldObj, + aPlayer.posX, + aPlayer.posY, + aPlayer.posZ); tCurrentIndex++; if (tCurrentIndex > 63) { tCurrentIndex = -1; 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 36c81b27c1..fd7e1a7965 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 @@ -32,27 +32,25 @@ public class Behaviour_Spray_Color extends Behaviour_None { private final long mUses; private final byte mColor; private final Collection mAllowedVanillaBlocks = Arrays.asList( - Blocks.glass, - Blocks.glass_pane, - Blocks.stained_glass, - Blocks.stained_glass_pane, - Blocks.carpet, - Blocks.hardened_clay, - ItemList.TE_Rockwool.getBlock()); + Blocks.glass, + Blocks.glass_pane, + Blocks.stained_glass, + Blocks.stained_glass_pane, + Blocks.carpet, + 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!"); private final String mTooltipChain = GT_LanguageManager.addStringLocalization( - "gt.behaviour.paintspray.chain", - "If used while sneaking it will paint a chain of blocks"); + "gt.behaviour.paintspray.chain", + "If used while sneaking it will paint a chain of blocks"); private final String mTooltipChainAmount = GT_LanguageManager.addStringLocalization( - "gt.behaviour.paintspray.chain", - "Paints up to %d blocks, in the direction you're looking at"); + "gt.behaviour.paintspray.chain", + "Paints up to %d blocks, in the direction you're looking at"); public Behaviour_Spray_Color(ItemStack aEmpty, ItemStack aUsed, ItemStack aFull, long aUses, int aColor) { this.mEmpty = aEmpty; @@ -61,13 +59,13 @@ public class Behaviour_Spray_Color extends Behaviour_None { this.mUses = aUses; this.mColor = ((byte) aColor); this.mTooltip = GT_LanguageManager.addStringLocalization( - "gt.behaviour.paintspray." + this.mColor + ".tooltip", - "Can Color things in " + Dyes.get(this.mColor).mName); + "gt.behaviour.paintspray." + this.mColor + ".tooltip", + "Can Color things in " + Dyes.get(this.mColor).mName); } @Override public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, - int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { if ((aWorld.isRemote) || (aStack.stackSize != 1)) { return false; } @@ -140,7 +138,7 @@ public class Behaviour_Spray_Color extends Behaviour_None { private boolean colorize(World aWorld, int aX, int aY, int aZ, int aSide) { Block aBlock = aWorld.getBlock(aX, aY, aZ); if ((aBlock != Blocks.air) - && ((this.mAllowedVanillaBlocks.contains(aBlock)) || ((aBlock instanceof BlockColored)))) { + && ((this.mAllowedVanillaBlocks.contains(aBlock)) || ((aBlock instanceof BlockColored)))) { if (aBlock == Blocks.hardened_clay) { aWorld.setBlock(aX, aY, aZ, Blocks.stained_hardened_clay, (~this.mColor) & 0xF, 3); return true; @@ -167,12 +165,12 @@ public class Behaviour_Spray_Color extends Behaviour_None { aList.add(this.mTooltip); aList.add(this.mTooltipChain); aList.add( - String.format( - this.mTooltipChainAmount, - GregTech_API.sSpecialFile.get(ConfigCategories.general, "SprayCanChainRange", 256))); + String.format( + this.mTooltipChainAmount, + GregTech_API.sSpecialFile.get(ConfigCategories.general, "SprayCanChainRange", 256))); NBTTagCompound tNBT = aStack.getTagCompound(); long tRemainingPaint = tNBT == null ? this.mUses - : GT_Utility.areStacksEqual(aStack, this.mFull, true) ? this.mUses : tNBT.getLong("GT.RemainingPaint"); + : GT_Utility.areStacksEqual(aStack, this.mFull, true) ? this.mUses : tNBT.getLong("GT.RemainingPaint"); aList.add(this.mTooltipUses + " " + tRemainingPaint); aList.add(this.mTooltipUnstackable); return aList; diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Switch_Metadata.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Switch_Metadata.java index cd9deb570d..20bc59a171 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Switch_Metadata.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Switch_Metadata.java @@ -41,7 +41,7 @@ public class Behaviour_Switch_Metadata extends Behaviour_None { @Override public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, - int aY, int aZ, int aSide, float aHitX, float aHitY, float aHitZ) { + int aY, int aZ, int aSide, float aHitX, float aHitY, float aHitZ) { if (aStack != null && (aPlayer == null || aPlayer.isSneaking()) && !aWorld.isRemote) { if (mCheckTarget) { Block aBlock = aWorld.blockExists(aX, aY, aZ) ? aWorld.getBlock(aX, aY, aZ) : Blocks.air; 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 a04593a1b8..2e4d682dcf 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Wrench.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Wrench.java @@ -23,9 +23,8 @@ 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; @@ -33,7 +32,7 @@ public class Behaviour_Wrench extends Behaviour_None { @Override public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, - int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { if (aWorld.isRemote) { return false; } @@ -48,7 +47,7 @@ public class Behaviour_Wrench extends Behaviour_None { if (((aTileEntity instanceof IWrenchable))) { if (((IWrenchable) aTileEntity).wrenchCanSetFacing(aPlayer, aTargetSide)) { if ((aPlayer.capabilities.isCreativeMode) - || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { ((IWrenchable) aTileEntity).setFacing(aTargetSide); GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1.0F, aX, aY, aZ); } @@ -57,15 +56,15 @@ public class Behaviour_Wrench extends Behaviour_None { if (((IWrenchable) aTileEntity).wrenchCanRemove(aPlayer)) { int tDamage = ((IWrenchable) aTileEntity).getWrenchDropRate() < 1.0F ? 10 : 3; if ((aPlayer.capabilities.isCreativeMode) - || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, (long) tDamage * this.mCosts))) { + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, (long) tDamage * this.mCosts))) { ItemStack tOutput = ((IWrenchable) aTileEntity).getWrenchDrop(aPlayer); for (ItemStack tStack : aBlock.getDrops(aWorld, aX, aY, aZ, aMeta, 0)) { if (tOutput == null) { aWorld.spawnEntityInWorld( - new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, tStack)); + new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, tStack)); } else { aWorld.spawnEntityInWorld( - new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, tOutput)); + new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, tOutput)); tOutput = null; } } @@ -79,7 +78,7 @@ public class Behaviour_Wrench extends Behaviour_None { } catch (Throwable ignored) {} if ((aBlock == Blocks.log) || (aBlock == Blocks.log2) || (aBlock == Blocks.hay_block)) { if ((aPlayer.capabilities.isCreativeMode) - || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, (aMeta + 4) % 12, 3); GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1.0F, aX, aY, aZ); } @@ -87,7 +86,7 @@ public class Behaviour_Wrench extends Behaviour_None { } if ((aBlock == Blocks.powered_repeater) || (aBlock == Blocks.unpowered_repeater)) { if ((aPlayer.capabilities.isCreativeMode) - || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aMeta / 4 * 4 + (aMeta % 4 + 1) % 4, 3); GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1.0F, aX, aY, aZ); } @@ -95,7 +94,7 @@ public class Behaviour_Wrench extends Behaviour_None { } if ((aBlock == Blocks.powered_comparator) || (aBlock == Blocks.unpowered_comparator)) { if ((aPlayer.capabilities.isCreativeMode) - || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aMeta / 4 * 4 + (aMeta % 4 + 1) % 4, 3); GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1.0F, aX, aY, aZ); } @@ -103,9 +102,9 @@ public class Behaviour_Wrench extends Behaviour_None { } if ((aBlock == Blocks.crafting_table) || (aBlock == Blocks.bookshelf)) { if ((aPlayer.capabilities.isCreativeMode) - || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { aWorld.spawnEntityInWorld( - new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, new ItemStack(aBlock, 1, aMeta))); + new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, new ItemStack(aBlock, 1, aMeta))); aWorld.setBlockToAir(aX, aY, aZ); GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1.0F, aX, aY, aZ); } @@ -113,20 +112,20 @@ public class Behaviour_Wrench extends Behaviour_None { } if (aMeta == aTargetSide) { if ((aBlock == Blocks.pumpkin) || (aBlock == Blocks.lit_pumpkin) - || (aBlock == Blocks.piston) - || (aBlock == Blocks.sticky_piston) - || (aBlock == Blocks.dispenser) - || (aBlock == Blocks.dropper) - || (aBlock == Blocks.furnace) - || (aBlock == Blocks.lit_furnace) - || (aBlock == Blocks.chest) - || (aBlock == Blocks.trapped_chest) - || (aBlock == Blocks.ender_chest) - || (aBlock == Blocks.hopper)) { + || (aBlock == Blocks.piston) + || (aBlock == Blocks.sticky_piston) + || (aBlock == Blocks.dispenser) + || (aBlock == Blocks.dropper) + || (aBlock == Blocks.furnace) + || (aBlock == Blocks.lit_furnace) + || (aBlock == Blocks.chest) + || (aBlock == Blocks.trapped_chest) + || (aBlock == Blocks.ender_chest) + || (aBlock == Blocks.hopper)) { if ((aPlayer.capabilities.isCreativeMode) - || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts))) { aWorld.spawnEntityInWorld( - new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, new ItemStack(aBlock, 1, 0))); + new EntityItem(aWorld, aX + 0.5D, aY + 0.5D, aZ + 0.5D, new ItemStack(aBlock, 1, 0))); aWorld.setBlockToAir(aX, aY, aZ); GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1.0F, aX, aY, aZ); } @@ -134,23 +133,23 @@ public class Behaviour_Wrench extends Behaviour_None { } } else { if ((aBlock == Blocks.piston) || (aBlock == Blocks.sticky_piston) - || (aBlock == Blocks.dispenser) - || (aBlock == Blocks.dropper)) { + || (aBlock == Blocks.dispenser) + || (aBlock == Blocks.dropper)) { if ((aMeta < 6) && ((aPlayer.capabilities.isCreativeMode) - || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aTargetSide, 3); GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1.0F, aX, aY, aZ); } return true; } if ((aBlock == Blocks.pumpkin) || (aBlock == Blocks.lit_pumpkin) - || (aBlock == Blocks.furnace) - || (aBlock == Blocks.lit_furnace) - || (aBlock == Blocks.chest) - || (aBlock == Blocks.ender_chest) - || (aBlock == Blocks.trapped_chest)) { + || (aBlock == Blocks.furnace) + || (aBlock == Blocks.lit_furnace) + || (aBlock == Blocks.chest) + || (aBlock == Blocks.ender_chest) + || (aBlock == Blocks.trapped_chest)) { if ((aTargetSide > 1) && ((aPlayer.capabilities.isCreativeMode) - || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aTargetSide, 3); GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1.0F, aX, aY, aZ); } @@ -158,7 +157,7 @@ public class Behaviour_Wrench extends Behaviour_None { } if (aBlock == Blocks.hopper) { if ((aTargetSide != 1) && ((aPlayer.capabilities.isCreativeMode) - || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { + || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aTargetSide, 3); GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1.0F, aX, aY, aZ); } @@ -166,10 +165,10 @@ public class Behaviour_Wrench extends Behaviour_None { } } if ((Arrays.asList(aBlock.getValidRotations(aWorld, aX, aY, aZ)) - .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)))) { + .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)))) { if (!aPlayer.capabilities.isCreativeMode) { ((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts); } 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 65ba5199ee..c62cfedf2a 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_WrittenBook.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_WrittenBook.java @@ -19,11 +19,11 @@ public class Behaviour_WrittenBook extends Behaviour_None { @Override @SideOnly(Side.CLIENT) public boolean onItemUse(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, - int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { + int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { if ((GT_Utility.isStringValid(GT_Utility.ItemNBT.getBookTitle(aStack))) - && ((aPlayer instanceof EntityPlayerSP))) { + && ((aPlayer instanceof EntityPlayerSP))) { Minecraft.getMinecraft() - .displayGuiScreen(new GuiScreenBook(aPlayer, aStack, false)); + .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 2b91cdebd9..11019e3723 100644 --- a/src/main/java/gregtech/common/misc/GT_Command.java +++ b/src/main/java/gregtech/common/misc/GT_Command.java @@ -34,8 +34,8 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner private void printHelp(ICommandSender sender) { sender.addChatMessage( - new ChatComponentText( - "Usage: gt ")); + new ChatComponentText( + "Usage: gt ")); sender.addChatMessage(new ChatComponentText("\"toggle D1\" - toggles general.Debug (D1)")); sender.addChatMessage(new ChatComponentText("\"toggle D2\" - toggles general.Debug2 (D2)")); sender.addChatMessage(new ChatComponentText("\"toggle debugCleanroom\" - toggles cleanroom debug log")); @@ -43,8 +43,7 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner sender.addChatMessage(new ChatComponentText("\"toggle debugBlockPump\" - Possible issues with pumps")); sender.addChatMessage(new ChatComponentText("\"toggle debugBlockMiner\" - Possible issues with miners")); sender.addChatMessage( - new ChatComponentText( - "\"toggle debugEntityCramming\" - How long it takes and how many entities it finds")); + new ChatComponentText("\"toggle debugEntityCramming\" - How long it takes and how many entities it finds")); sender.addChatMessage(new ChatComponentText("\"toggle debugWorldGen\" - toggles generic worldgen debug")); sender.addChatMessage(new ChatComponentText("\"toggle debugOrevein\" - toggles worldgen ore vein debug")); sender.addChatMessage(new ChatComponentText("\"toggle debugSmallOres\" - toggles worldgen small vein debug")); @@ -53,48 +52,44 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner sender.addChatMessage(new ChatComponentText("\"toggle debugMulti\" - toggles structurelib debug")); sender.addChatMessage(new ChatComponentText("\"chunks\" - print a list of the force loaded chunks")); sender.addChatMessage( - new ChatComponentText( - "\"pollution \" - adds the of the pollution to the current chunk, " - + "\n if isnt specified, will add" - + GT_Mod.gregtechproxy.mPollutionSmogLimit - + "gibbl.")); + new ChatComponentText( + "\"pollution \" - adds the of the pollution to the current chunk, " + + "\n if isnt specified, will add" + + GT_Mod.gregtechproxy.mPollutionSmogLimit + + "gibbl.")); sender.addChatMessage(new ChatComponentText(EnumChatFormatting.GOLD + " --- Global wireless EU controls ---")); sender.addChatMessage(new ChatComponentText("Allows you to set the amount of EU in a users wireless network.")); sender.addChatMessage( - new ChatComponentText( - "Usage:" + EnumChatFormatting.RED - + " global_energy_set " - + EnumChatFormatting.BLUE - + "[Name] " - + EnumChatFormatting.LIGHT_PURPLE - + "[EU]")); + new ChatComponentText( + "Usage:" + EnumChatFormatting.RED + + " global_energy_set " + + EnumChatFormatting.BLUE + + "[Name] " + + EnumChatFormatting.LIGHT_PURPLE + + "[EU]")); sender.addChatMessage( - new ChatComponentText( - "Allows you to add EU to a users wireless network. Also accepts negative numbers.")); + new ChatComponentText("Allows you to add EU to a users wireless network. Also accepts negative numbers.")); sender.addChatMessage( - new ChatComponentText( - "Usage:" + EnumChatFormatting.RED - + " global_energy_add " - + EnumChatFormatting.BLUE - + "[Name] " - + EnumChatFormatting.LIGHT_PURPLE - + "[EU]")); + new ChatComponentText( + "Usage:" + EnumChatFormatting.RED + + " global_energy_add " + + EnumChatFormatting.BLUE + + "[Name] " + + EnumChatFormatting.LIGHT_PURPLE + + "[EU]")); sender.addChatMessage( - new ChatComponentText( - "Allows you to join two users together into one network. Can be undone by writing the users name twice.")); + new ChatComponentText( + "Allows you to join two users together into one network. Can be undone by writing the users name twice.")); sender.addChatMessage( - new ChatComponentText( - "Usage:" + EnumChatFormatting.RED - + " global_energy_join " - + EnumChatFormatting.BLUE - + "[User joining] [User to join]")); + new ChatComponentText( + "Usage:" + EnumChatFormatting.RED + + " global_energy_join " + + EnumChatFormatting.BLUE + + "[User joining] [User to join]")); sender.addChatMessage(new ChatComponentText("Shows the amount of EU in a users energy network.")); sender.addChatMessage( - new ChatComponentText( - "Usage:" + EnumChatFormatting.RED - + " global_energy_display " - + EnumChatFormatting.BLUE - + "[Name]")); + new ChatComponentText( + "Usage:" + EnumChatFormatting.RED + " global_energy_display " + EnumChatFormatting.BLUE + "[Name]")); } @Override @@ -102,16 +97,17 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner List 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)))) { - Stream.of( + .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", "pollution", @@ -119,11 +115,12 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner "global_energy_set", "global_energy_join", "global_energy_display") - .filter(s -> test.isEmpty() || s.startsWith(test)) - .forEach(l::add); + .filter(s -> test.isEmpty() || s.startsWith(test)) + .forEach(l::add); } else if (test.equals("toggle")) { String test1 = ss[1].trim(); - Stream.of( + Stream + .of( "D1", "D2", "debugCleanroom", @@ -138,8 +135,8 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner "debugChunkloaders", "debugMulti", "debugWorldData") - .filter(s -> test1.isEmpty() || s.startsWith(test1)) - .forEach(l::add); + .filter(s -> test1.isEmpty() || s.startsWith(test1)) + .forEach(l::add); } return l; } @@ -159,7 +156,7 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner if ("debugMulti".equals(strings[1])) { StructureLib.DEBUG_MODE = !StructureLib.DEBUG_MODE; sender.addChatMessage( - new ChatComponentText(strings[1] + " = " + (StructureLib.DEBUG_MODE ? "true" : "false"))); + new ChatComponentText(strings[1] + " = " + (StructureLib.DEBUG_MODE ? "true" : "false"))); return; } try { @@ -182,11 +179,11 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner case "pollution" -> { ChunkCoordinates coordinates = sender.getPlayerCoordinates(); int amount = (strings.length < 2) ? GT_Mod.gregtechproxy.mPollutionSmogLimit - : Integer.parseInt(strings[1]); + : Integer.parseInt(strings[1]); GT_Pollution.addPollution( - sender.getEntityWorld() - .getChunkFromBlockCoords(coordinates.posX, coordinates.posZ), - amount); + sender.getEntityWorld() + .getChunkFromBlockCoords(coordinates.posX, coordinates.posZ), + amount); } case "global_energy_add" -> { String username = strings[1]; @@ -199,34 +196,34 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner if (uuid.equals("")) { sender.addChatMessage( - new ChatComponentText("User " + formatted_username + " has no global energy network.")); + new ChatComponentText("User " + formatted_username + " has no global energy network.")); break; } String EU_string_formatted = EnumChatFormatting.RED - + GT_Utility.formatNumbers(new BigInteger(EU_String)) - + EnumChatFormatting.RESET; + + GT_Utility.formatNumbers(new BigInteger(EU_String)) + + EnumChatFormatting.RESET; if (addEUToGlobalEnergyMap(uuid, new BigInteger(EU_String))) sender.addChatMessage( - new ChatComponentText( - "Successfully added " + EU_string_formatted - + "EU to the global energy network of " - + formatted_username - + ".")); + new ChatComponentText( + "Successfully added " + EU_string_formatted + + "EU to the global energy network of " + + formatted_username + + ".")); else sender.addChatMessage( - new ChatComponentText( - "Failed to add " + EU_string_formatted - + "EU to the global energy map of " - + formatted_username - + ". Insufficient energy in network. ")); + new ChatComponentText( + "Failed to add " + EU_string_formatted + + "EU to the global energy map of " + + formatted_username + + ". Insufficient energy in network. ")); sender.addChatMessage( - new ChatComponentText( - formatted_username + " currently has " - + EnumChatFormatting.RED - + GT_Utility.formatNumbers(new BigInteger(getUserEU(uuid).toString())) - + EnumChatFormatting.RESET - + "EU in their network.")); + new ChatComponentText( + formatted_username + " currently has " + + EnumChatFormatting.RED + + GT_Utility.formatNumbers(new BigInteger(getUserEU(uuid).toString())) + + EnumChatFormatting.RESET + + "EU in their network.")); } case "global_energy_set" -> { @@ -239,7 +236,7 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner if (uuid.equals("")) { sender.addChatMessage( - new ChatComponentText("User " + formatted_username + " has no global energy network.")); + new ChatComponentText("User " + formatted_username + " has no global energy network.")); break; } @@ -247,20 +244,20 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner if ((new BigInteger(EU_String_0).compareTo(BigInteger.ZERO)) < 0) { sender.addChatMessage( - new ChatComponentText("Cannot set a users energy network to a negative value.")); + new ChatComponentText("Cannot set a users energy network to a negative value.")); break; } setUserEU(uuid, new BigInteger(EU_String_0)); sender.addChatMessage( - new ChatComponentText( - "Successfully set " + formatted_username - + "'s global energy network to " - + EnumChatFormatting.RED - + GT_Utility.formatNumbers(new BigInteger(EU_String_0)) - + EnumChatFormatting.RESET - + "EU.")); + new ChatComponentText( + "Successfully set " + formatted_username + + "'s global energy network to " + + EnumChatFormatting.RED + + GT_Utility.formatNumbers(new BigInteger(EU_String_0)) + + EnumChatFormatting.RESET + + "EU.")); } case "global_energy_join" -> { @@ -279,51 +276,50 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner if (uuid_1.equals("") && uuid_0.equals("")) { if (username_0.equals(username_1)) { sender.addChatMessage( - new ChatComponentText( - "User " + formatted_username_0 + " has no global energy network.")); + new ChatComponentText("User " + formatted_username_0 + " has no global energy network.")); } else { sender.addChatMessage( - new ChatComponentText( - "User " + formatted_username_0 - + " and " - + formatted_username_1 - + " have no global energy networks.")); + new ChatComponentText( + "User " + formatted_username_0 + + " and " + + formatted_username_1 + + " have no global energy networks.")); } break; } if (uuid_0.equals("")) { sender.addChatMessage( - new ChatComponentText("User " + formatted_username_0 + " has no global energy network.")); + new ChatComponentText("User " + formatted_username_0 + " has no global energy network.")); break; } if (uuid_1.equals("")) { sender.addChatMessage( - new ChatComponentText("User " + formatted_username_1 + " has no global energy network.")); + new ChatComponentText("User " + formatted_username_1 + " has no global energy network.")); break; } if (uuid_0.equals(uuid_1)) { joinUserNetwork(uuid_0, uuid_1); sender.addChatMessage( - new ChatComponentText( - "User " + formatted_username_0 + " has rejoined their own global energy network.")); + new ChatComponentText( + "User " + formatted_username_0 + " has rejoined their own global energy network.")); break; } joinUserNetwork(uuid_0, uuid_1); sender.addChatMessage( - new ChatComponentText( - "Success! " + formatted_username_0 + " has joined " + formatted_username_1 + ".")); + new ChatComponentText( + "Success! " + formatted_username_0 + " has joined " + formatted_username_1 + ".")); sender.addChatMessage( - new ChatComponentText( - "To undo this simply join your own network again with /gt global_energy_join " - + formatted_username_0 - + " " - + formatted_username_0 - + ".")); + new ChatComponentText( + "To undo this simply join your own network again with /gt global_energy_join " + + formatted_username_0 + + " " + + formatted_username_0 + + ".")); } case "global_energy_display" -> { @@ -336,23 +332,23 @@ public final class GT_Command extends CommandBase implements IGlobalWirelessEner if (uuid.equals("")) { sender.addChatMessage( - new ChatComponentText("User " + formatted_username + " has no global energy network.")); + new ChatComponentText("User " + formatted_username + " has no global energy network.")); break; } sender.addChatMessage( - new ChatComponentText( - "User " + formatted_username - + " has " - + EnumChatFormatting.RED - + GT_Utility.formatNumbers(getUserEU(uuid)) - + EnumChatFormatting.RESET - + "EU in their network.")); + new ChatComponentText( + "User " + formatted_username + + " has " + + EnumChatFormatting.RED + + GT_Utility.formatNumbers(getUserEU(uuid)) + + EnumChatFormatting.RESET + + "EU in their network.")); } default -> { - sender.addChatMessage( - new ChatComponentText(EnumChatFormatting.RED + "Invalid command/syntax detected.")); + sender + .addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Invalid command/syntax detected.")); printHelp(sender); } } diff --git a/src/main/java/gregtech/common/misc/GT_DrillingLogicDelegate.java b/src/main/java/gregtech/common/misc/GT_DrillingLogicDelegate.java index 6de4de3c71..9cf7fd7cf8 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; @@ -75,7 +75,7 @@ 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); + .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); @@ -93,7 +93,7 @@ public class GT_DrillingLogicDelegate { // Descent the pipe tip te.getWorld() - .setBlock(xCoord, yCoord + tipDepth - 1, zCoord, MINING_PIPE_TIP_BLOCK); + .setBlock(xCoord, yCoord + tipDepth - 1, zCoord, MINING_PIPE_TIP_BLOCK); tipDepth--; return true; } @@ -143,18 +143,12 @@ public class GT_DrillingLogicDelegate { // Move the pipe tip position if (actualDrillY < yCoord - 1) { owner.getBaseMetaTileEntity() - .getWorld() - .setBlock(xCoord, actualDrillY + 1, zCoord, MINING_PIPE_TIP_BLOCK); + .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); + .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); @@ -183,20 +177,20 @@ public class GT_DrillingLogicDelegate { short metaData = 0; TileEntity tTileEntity = owner.getBaseMetaTileEntity() - .getTileEntity(x, y, z); + .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); + .setBlock( + x, + y, + z, + Block.getBlockFromItem(cobble.getItem()), + cobble.getItemDamage(), /* cause updates(1) + send to client(2) */ + 3); } /** @@ -238,27 +232,21 @@ 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 getBlockDrops(final Block oreBlock, int posX, int posY, int posZ) { return oreBlock.getDrops( - owner.getBaseMetaTileEntity() - .getWorld(), - posX, - posY, - posZ, - owner.getBaseMetaTileEntity() - .getMetaID(posX, posY, posZ), - owner.getMachineTier()); + owner.getBaseMetaTileEntity() + .getWorld(), + posX, + posY, + posZ, + owner.getBaseMetaTileEntity() + .getMetaID(posX, posY, posZ), + owner.getMachineTier()); } /** Can the owner continue doing its work? If we await new pipes - it cannot. */ diff --git a/src/main/java/gregtech/common/misc/spaceprojects/SpaceProjectManager.java b/src/main/java/gregtech/common/misc/spaceprojects/SpaceProjectManager.java index 1067673399..c34c486223 100644 --- a/src/main/java/gregtech/common/misc/spaceprojects/SpaceProjectManager.java +++ b/src/main/java/gregtech/common/misc/spaceprojects/SpaceProjectManager.java @@ -104,11 +104,11 @@ public class SpaceProjectManager { 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); - } + .equals(teamLeader)) { + putInTeam(teamMember, spaceTeams.get(teamLeader)); + } else { + spaceTeams.put(teamMember, teamLeader); + } SpaceProjectWorldSavedData.INSTANCE.markDirty(); } @@ -182,14 +182,14 @@ public class SpaceProjectManager { public static void addProject(ISpaceProject project) { spaceProjects.put(project.getProjectName(), project); GT_Recipe.GT_Recipe_Map.sFakeSpaceProjectRecipes.add( - new GT_Recipe.GT_Recipe_Map.GT_FakeSpaceProjectRecipe( - false, - project.getTotalItemsCost(), - project.getTotalFluidsCost(), - project.getProjectBuildTime(), - (int) project.getProjectVoltage(), - project.getTotalStages(), - project.getProjectName())); + new GT_Recipe.GT_Recipe_Map.GT_FakeSpaceProjectRecipe( + false, + project.getTotalItemsCost(), + project.getTotalFluidsCost(), + project.getProjectBuildTime(), + (int) project.getProjectVoltage(), + project.getTotalStages(), + project.getProjectName())); } /** @@ -266,9 +266,9 @@ public class SpaceProjectManager { */ public static UUID getPlayerUUIDFromName(String playerName) { return MinecraftServer.getServer() - .func_152358_ax() - .func_152655_a(playerName) - .getId(); + .func_152358_ax() + .func_152655_a(playerName) + .getId(); } /** @@ -276,9 +276,9 @@ public class SpaceProjectManager { */ public static String getPlayerNameFromUUID(UUID playerUUID) { return MinecraftServer.getServer() - .func_152358_ax() - .func_152652_a(playerUUID) - .getName(); + .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 a70d1b5843..5afa1b5ef1 100644 --- a/src/main/java/gregtech/common/misc/spaceprojects/SpaceProjectWorldSavedData.java +++ b/src/main/java/gregtech/common/misc/spaceprojects/SpaceProjectWorldSavedData.java @@ -51,33 +51,21 @@ 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(); + .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(); + .create(); private static final String DATA_NAME = "GT_SpaceProjectData"; @@ -146,13 +134,13 @@ public class SpaceProjectWorldSavedData extends WorldSavedData { spaceTeams = new HashMap<>(); } spaceTeamsFile = new File( - aWorld.getSaveHandler() - .getWorldDirectory(), - SPACE_TEAMS_JSON); + aWorld.getSaveHandler() + .getWorldDirectory(), + SPACE_TEAMS_JSON); teamProjectsFile = new File( - aWorld.getSaveHandler() - .getWorldDirectory(), - SPACE_TEAM_PROJECTS_JSON); + aWorld.getSaveHandler() + .getWorldDirectory(), + SPACE_TEAM_PROJECTS_JSON); MapStorage tStorage = aWorld.mapStorage; INSTANCE = (SpaceProjectWorldSavedData) tStorage.loadData(SpaceProjectWorldSavedData.class, DATA_NAME); if (INSTANCE == null) { @@ -170,31 +158,31 @@ public class SpaceProjectWorldSavedData extends WorldSavedData { } private static class PairAdapter - implements JsonSerializer>, JsonDeserializer> { + implements JsonSerializer>, JsonDeserializer> { @Override public JsonElement serialize(Pair src, Type typeOfSrc, JsonSerializationContext context) { JsonObject pair = new JsonObject(); pair.addProperty( - PAIR_LEFT, - src.getLeft() - .getName()); + PAIR_LEFT, + src.getLeft() + .getName()); pair.addProperty(PAIR_RIGHT, src.getRight()); return pair; } @Override public Pair deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) - throws JsonParseException { + throws JsonParseException { Pair pair = null; 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; } @@ -208,9 +196,9 @@ public class SpaceProjectWorldSavedData extends WorldSavedData { obj.addProperty(PROJECT_NAME, src.getProjectName()); obj.addProperty(PROJECT_CURRENT_STAGE, src.getCurrentStage()); obj.addProperty( - PROJECT_LOCATION, - src.getProjectLocation() - .getName()); + 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; @@ -218,26 +206,24 @@ public class SpaceProjectWorldSavedData extends WorldSavedData { @Override public ISpaceProject deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) - throws JsonParseException { + throws JsonParseException { if (!json.isJsonObject()) { return null; } JsonObject obj = json.getAsJsonObject(); String projectName = obj.get(PROJECT_NAME) - .getAsString(); + .getAsString(); ISpaceProject project = SpaceProjectManager.getProject(projectName); int projectCurrentStage = obj.get(PROJECT_CURRENT_STAGE) - .getAsInt(); + .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); + 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()); + obj.get(PROJECT_LOCATION) + .getAsString()); project.setBuiltUpgrade(projectUpgradesBuilt); project.setProjectLocation(projectLocation); project.setProjectCurrentStage(projectCurrentStage); @@ -253,51 +239,51 @@ public class SpaceProjectWorldSavedData extends WorldSavedData { JsonObject obj = new JsonObject(); obj.addProperty(UPGRADE_NAME, src.getUpgradeName()); obj.addProperty( - UPGRADE_PROJECT_PARENT, - src.getParentProject() - .getProjectName()); + UPGRADE_PROJECT_PARENT, + src.getParentProject() + .getProjectName()); obj.addProperty(UPGRADE_CURRENT_STAGE, src.getCurrentStage()); return obj; } @Override public ISP_Upgrade deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) - throws JsonParseException { + throws JsonParseException { if (!json.isJsonObject()) { return null; } JsonObject obj = json.getAsJsonObject(); String projectName = obj.get(UPGRADE_PROJECT_PARENT) - .getAsString(); + .getAsString(); ISpaceProject project = SpaceProjectManager.getProject(projectName); ISP_Upgrade upgrade = project.getUpgrade( - obj.get(UPGRADE_NAME) - .getAsString()); + obj.get(UPGRADE_NAME) + .getAsString()); if (upgrade == null) { return null; } upgrade = upgrade.copy(); upgrade.setUpgradeCurrentStage( - obj.get(UPGRADE_CURRENT_STAGE) - .getAsInt()); + obj.get(UPGRADE_CURRENT_STAGE) + .getAsInt()); return upgrade; } } private static class SpaceTeamProjectsMapAdapter - implements JsonSerializer, ISpaceProject>>>, - JsonDeserializer, ISpaceProject>>> { + implements JsonSerializer, ISpaceProject>>>, + JsonDeserializer, ISpaceProject>>> { @Override public JsonElement serialize(Map, ISpaceProject>> src, Type typeOfSrc, - JsonSerializationContext context) { + JsonSerializationContext context) { JsonArray map = new JsonArray(); for (Entry, ISpaceProject>> firstEntry : src.entrySet()) { JsonObject teamMap = new JsonObject(); teamMap.add(MAP_UUID, context.serialize(firstEntry.getKey())); JsonArray teamProjectMap = new JsonArray(); for (Entry, ISpaceProject> secondEntry : firstEntry.getValue() - .entrySet()) { + .entrySet()) { JsonObject projectMap = new JsonObject(); projectMap.add(MAP_PAIR, context.serialize(secondEntry.getKey())); projectMap.add(MAP_PROJECT, context.serialize(secondEntry.getValue())); @@ -311,7 +297,7 @@ public class SpaceProjectWorldSavedData extends WorldSavedData { @Override public Map, ISpaceProject>> deserialize(JsonElement json, Type typeOfT, - JsonDeserializationContext context) throws JsonParseException { + JsonDeserializationContext context) throws JsonParseException { JsonArray mapArray = json.getAsJsonArray(); Map, ISpaceProject>> map = new HashMap<>(); for (JsonElement teamMapElement : mapArray) { @@ -319,7 +305,7 @@ public class SpaceProjectWorldSavedData extends WorldSavedData { UUID uuid = context.deserialize(teamMap.get(MAP_UUID), UUID.class); Map, ISpaceProject> projectMap = new HashMap<>(); for (JsonElement teamProjectMapElement : teamMap.get(MAP_MAP) - .getAsJsonArray()) { + .getAsJsonArray()) { JsonObject teamProjectMap = teamProjectMapElement.getAsJsonObject(); Pair 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 a4b8d5aa5b..9fc3bd955b 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 @@ -295,20 +295,20 @@ public class SP_Upgrade implements ISP_Upgrade { } if (requirements.getBodyType() != null && !requirements.getBodyType() - .equals(SpaceBodyType.NONE)) { + .equals(SpaceBodyType.NONE)) { if (!requirements.getBodyType() - .equals( - projectBelongingTo.getProjectLocation() - .getType())) { + .equals( + projectBelongingTo.getProjectLocation() + .getType())) { return false; } } if (requirements.getStarType() != null) { if (!requirements.getStarType() - .equals( - projectBelongingTo.getProjectLocation() - .getStarType())) { + .equals( + projectBelongingTo.getProjectLocation() + .getStarType())) { return false; } } @@ -335,13 +335,13 @@ 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); + .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 dfbcf96dc6..201b7c27a9 100644 --- a/src/main/java/gregtech/common/misc/spaceprojects/base/SpaceProject.java +++ b/src/main/java/gregtech/common/misc/spaceprojects/base/SpaceProject.java @@ -369,14 +369,14 @@ 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); + .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; @@ -406,14 +406,14 @@ public class SpaceProject implements ISpaceProject { if (requirements.getBodyType() != null && checkLocation) { if (!requirements.getBodyType() - .equals(location.getType())) { + .equals(location.getType())) { return false; } } if (requirements.getStarType() != null && checkLocation) { if (!requirements.getStarType() - .equals(location.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 f3c93c25b6..bb08ad47fb 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 @@ -56,7 +56,7 @@ public class SPM_Command extends CommandBase { case RESET: if (!sender.canCommandSenderUseCommand(4, getCommandName())) { sender.addChatMessage( - new ChatComponentText("You don't have the permissions to execute this command")); + new ChatComponentText("You don't have the permissions to execute this command")); return; } processReset(sender, arguments.length >= 2 ? arguments[1] : sender.getCommandSenderName()); @@ -64,41 +64,41 @@ public class SPM_Command extends CommandBase { case UNLOCK: if (!sender.canCommandSenderUseCommand(4, getCommandName())) { sender.addChatMessage( - new ChatComponentText("You don't have the permissions to execute this command")); + new ChatComponentText("You don't have the permissions to execute this command")); return; } if (arguments.length < 3) { sender.addChatMessage( - new ChatComponentText("Not enough arguments. Needs to mention a project and a location")); + new ChatComponentText("Not enough arguments. Needs to mention a project and a location")); return; } processUnlock( - sender, - arguments[1], - arguments[2], - arguments.length >= 4 ? arguments[3] : sender.getCommandSenderName()); + sender, + arguments[1], + arguments[2], + arguments.length >= 4 ? arguments[3] : sender.getCommandSenderName()); break; case LOCK: if (!sender.canCommandSenderUseCommand(4, getCommandName())) { sender.addChatMessage( - new ChatComponentText("You don't have the permissions to execute this command")); + new ChatComponentText("You don't have the permissions to execute this command")); return; } if (arguments.length < 3) { sender.addChatMessage( - new ChatComponentText("Not enough arguments. Needs to mention a project and a location")); + new ChatComponentText("Not enough arguments. Needs to mention a project and a location")); return; } processLock( - sender, - arguments[1], - arguments[2], - arguments.length >= 4 ? arguments[3] : sender.getCommandSenderName()); + sender, + arguments[1], + arguments[2], + arguments.length >= 4 ? arguments[3] : sender.getCommandSenderName()); case LIST: if (arguments.length < 2) { sender.addChatMessage( - new ChatComponentText( - "No Argument for list subCommand. Usage /spm list -all, -available or -unlocked")); + new ChatComponentText( + "No Argument for list subCommand. Usage /spm list -all, -available or -unlocked")); return; } processList(sender, arguments[1], arguments.length >= 3 ? arguments[2] : sender.getCommandSenderName()); @@ -106,7 +106,7 @@ public class SPM_Command extends CommandBase { case COPY: if (!sender.canCommandSenderUseCommand(4, getCommandName())) { sender.addChatMessage( - new ChatComponentText("You don't have the permissions to execute this command")); + new ChatComponentText("You don't have the permissions to execute this command")); return; } if (arguments.length < 3) { @@ -149,24 +149,24 @@ public class SPM_Command extends CommandBase { } String finalFilter = filter; return autoComplete.stream() - .filter(s -> finalFilter.isEmpty() || s.startsWith(finalFilter)) - .collect(Collectors.toList()); + .filter(s -> finalFilter.isEmpty() || s.startsWith(finalFilter)) + .collect(Collectors.toList()); } private String[] getPlayers() { return MinecraftServer.getServer() - .getAllUsernames(); + .getAllUsernames(); } private String[] getLocations() { return SpaceProjectManager.getLocationNames() - .toArray(new String[0]); + .toArray(new String[0]); } private String[] getProjects() { return SpaceProjectManager.getProjectsMap() - .keySet() - .toArray(new String[0]); + .keySet() + .toArray(new String[0]); } private String[] getSubCommands() { @@ -206,7 +206,7 @@ public class SPM_Command extends CommandBase { switch (argument) { case ALL -> { for (String project : SpaceProjectManager.getProjectsMap() - .keySet()) { + .keySet()) { sender.addChatMessage(new ChatComponentText(project)); } } 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 29ae7e9432..84c5626e69 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 @@ -70,11 +70,11 @@ public class SP_Command extends CommandBase { EntityPlayerMP teamMember = getPlayer(sender, playerInvited); invite.add(Pair.of(teamMember, teamLeader)); String message = EnumChatFormatting.GOLD + teamLeader.getCommandSenderName() - + EnumChatFormatting.RESET - + " has sent you an invite to join their team. Accept it with" - + EnumChatFormatting.GOLD - + " /sp accept " - + teamLeader.getCommandSenderName(); + + EnumChatFormatting.RESET + + " has sent you an invite to join their team. Accept it with" + + EnumChatFormatting.GOLD + + " /sp accept " + + teamLeader.getCommandSenderName(); GT_Utility.sendChatToPlayer(teamMember, message); } @@ -83,8 +83,8 @@ public class SP_Command extends CommandBase { EntityPlayerMP teamLeader = getPlayer(sender, playerInviter); if (invite.contains(Pair.of(teamMember, teamLeader))) { String message = EnumChatFormatting.GOLD + teamMember.getCommandSenderName() - + EnumChatFormatting.RESET - + " has accepted the invite."; + + EnumChatFormatting.RESET + + " has accepted the invite."; SpaceProjectManager.putInTeam(teamMember.getUniqueID(), teamLeader.getUniqueID()); GT_Utility.sendChatToPlayer(teamLeader, message); invite.remove(Pair.of(teamMember, teamLeader)); @@ -94,10 +94,10 @@ public class SP_Command extends CommandBase { private void processLeave(ICommandSender sender) { EntityPlayerMP player = getCommandSenderAsPlayer(sender); String message = "Are you sure you want to leave the team. You will lose all progress. Use " - + EnumChatFormatting.GOLD - + "/sp confirm" - + EnumChatFormatting.RESET - + " to confirm this. This does nothing if you are the team leader."; + + EnumChatFormatting.GOLD + + "/sp confirm" + + EnumChatFormatting.RESET + + " to confirm this. This does nothing if you are the team leader."; GT_Utility.sendChatToPlayer(player, message); confirm.add(player); } diff --git a/src/main/java/gregtech/common/power/FusionPower.java b/src/main/java/gregtech/common/power/FusionPower.java index c253d51be0..d3b7fe5e0f 100644 --- a/src/main/java/gregtech/common/power/FusionPower.java +++ b/src/main/java/gregtech/common/power/FusionPower.java @@ -21,7 +21,7 @@ public class FusionPower extends BasicMachineEUPower { // It's safe to assume fusion is above ULV. We put this as safety check here anyway if (tier > 0) { int maxPossibleOverclocks = FusionSpecialValueFormatter.getFusionTier(this.specialValue, V[tier - 1]) - - FusionSpecialValueFormatter.getFusionTier(specialValue, euPerTick); + - FusionSpecialValueFormatter.getFusionTier(specialValue, euPerTick); // Isn't too low EUt check? long tempEUt = Math.max(euPerTick, V[1]); @@ -46,7 +46,7 @@ public class FusionPower extends BasicMachineEUPower { @Override public String getTierString() { return GT_Values.TIER_COLORS[tier] + "MK " - + FusionSpecialValueFormatter.getFusionTier(specialValue, recipeEuPerTick) - + EnumChatFormatting.RESET; + + FusionSpecialValueFormatter.getFusionTier(specialValue, recipeEuPerTick) + + EnumChatFormatting.RESET; } } diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BasicLogic.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BasicLogic.java index 3e179aee11..34093a95de 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BasicLogic.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BasicLogic.java @@ -28,39 +28,39 @@ public class GT_Circuit_BasicLogic extends GT_CircuitryBehavior { public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { if (aCircuitData[0] < 2) { aRedstoneCircuitBlock.setRedstone( - (byte) (aCircuitData[0] % 2 == (getAnyRedstone(aRedstoneCircuitBlock) ? 0 : 1) ? 15 : 0), - aRedstoneCircuitBlock.getOutputFacing()); + (byte) (aCircuitData[0] % 2 == (getAnyRedstone(aRedstoneCircuitBlock) ? 0 : 1) ? 15 : 0), + aRedstoneCircuitBlock.getOutputFacing()); } else if (aCircuitData[0] < 4) { aRedstoneCircuitBlock.setRedstone( - (byte) (aCircuitData[0] % 2 == (getOneRedstone(aRedstoneCircuitBlock) ? 0 : 1) ? 15 : 0), - aRedstoneCircuitBlock.getOutputFacing()); + (byte) (aCircuitData[0] % 2 == (getOneRedstone(aRedstoneCircuitBlock) ? 0 : 1) ? 15 : 0), + aRedstoneCircuitBlock.getOutputFacing()); } else if (aCircuitData[0] < 6) { aRedstoneCircuitBlock.setRedstone( - (byte) (aCircuitData[0] % 2 == (getAllRedstone(aRedstoneCircuitBlock) ? 0 : 1) ? 15 : 0), - aRedstoneCircuitBlock.getOutputFacing()); + (byte) (aCircuitData[0] % 2 == (getAllRedstone(aRedstoneCircuitBlock) ? 0 : 1) ? 15 : 0), + aRedstoneCircuitBlock.getOutputFacing()); } else if (aCircuitData[0] < 7) { aRedstoneCircuitBlock.setRedstone( - (byte) (15 - getStrongestRedstone(aRedstoneCircuitBlock)), - aRedstoneCircuitBlock.getOutputFacing()); + (byte) (15 - getStrongestRedstone(aRedstoneCircuitBlock)), + aRedstoneCircuitBlock.getOutputFacing()); } else if (aCircuitData[0] < 9) { aRedstoneCircuitBlock.setRedstone( - (byte) ((aCircuitData[0] % 2 == 0 ? 15 : 0) ^ (getStrongestRedstone(aRedstoneCircuitBlock) - | getWeakestRedstone(aRedstoneCircuitBlock))), - aRedstoneCircuitBlock.getOutputFacing()); + (byte) ((aCircuitData[0] % 2 == 0 ? 15 : 0) + ^ (getStrongestRedstone(aRedstoneCircuitBlock) | getWeakestRedstone(aRedstoneCircuitBlock))), + aRedstoneCircuitBlock.getOutputFacing()); } else if (aCircuitData[0] < 11) { aRedstoneCircuitBlock.setRedstone( - (byte) ((aCircuitData[0] % 2 == 0 ? 15 : 0) ^ getStrongestRedstone(aRedstoneCircuitBlock) - ^ getWeakestRedstone(aRedstoneCircuitBlock)), - aRedstoneCircuitBlock.getOutputFacing()); + (byte) ((aCircuitData[0] % 2 == 0 ? 15 : 0) ^ getStrongestRedstone(aRedstoneCircuitBlock) + ^ getWeakestRedstone(aRedstoneCircuitBlock)), + aRedstoneCircuitBlock.getOutputFacing()); } else if (aCircuitData[0] < 13) { aRedstoneCircuitBlock.setRedstone( - (byte) ((aCircuitData[0] % 2 == 0 ? 15 : 0) - ^ getStrongestRedstone(aRedstoneCircuitBlock) & getWeakestRedstone(aRedstoneCircuitBlock)), - aRedstoneCircuitBlock.getOutputFacing()); + (byte) ((aCircuitData[0] % 2 == 0 ? 15 : 0) + ^ getStrongestRedstone(aRedstoneCircuitBlock) & getWeakestRedstone(aRedstoneCircuitBlock)), + aRedstoneCircuitBlock.getOutputFacing()); } else if (aCircuitData[0] < 14) { aRedstoneCircuitBlock.setRedstone( - (byte) (getStrongestRedstone(aRedstoneCircuitBlock) ^ 0xF), - aRedstoneCircuitBlock.getOutputFacing()); + (byte) (getStrongestRedstone(aRedstoneCircuitBlock) ^ 0xF), + aRedstoneCircuitBlock.getOutputFacing()); } } diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BitAnd.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BitAnd.java index f5d2fca824..f5f83a7e10 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BitAnd.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_BitAnd.java @@ -48,11 +48,10 @@ public class GT_Circuit_BitAnd extends GT_CircuitryBehavior { @Override public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { aRedstoneCircuitBlock.setRedstone( - (byte) ((getStrongestRedstone(aRedstoneCircuitBlock) - & (aCircuitData[0] | aCircuitData[1] << 1 | aCircuitData[2] << 2 | aCircuitData[3] << 3)) != 0 - ? 15 - : 0), - aRedstoneCircuitBlock.getOutputFacing()); + (byte) ((getStrongestRedstone(aRedstoneCircuitBlock) + & (aCircuitData[0] | aCircuitData[1] << 1 | aCircuitData[2] << 2 | aCircuitData[3] << 3)) != 0 ? 15 + : 0), + aRedstoneCircuitBlock.getOutputFacing()); } @Override diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Equals.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Equals.java index 5e230d3363..9e9af183e8 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Equals.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Equals.java @@ -34,10 +34,9 @@ public class GT_Circuit_Equals extends GT_CircuitryBehavior { @Override public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { aRedstoneCircuitBlock.setRedstone( - ((byte) (((aCircuitData[1] != 0) == (getStrongestRedstone(aRedstoneCircuitBlock) == aCircuitData[0])) - ? 0 - : 15)), - aRedstoneCircuitBlock.getOutputFacing()); + ((byte) (((aCircuitData[1] != 0) == (getStrongestRedstone(aRedstoneCircuitBlock) == aCircuitData[0])) ? 0 + : 15)), + aRedstoneCircuitBlock.getOutputFacing()); } @Override diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Pulser.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Pulser.java index 672fddf7fb..8663758535 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Pulser.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Pulser.java @@ -35,7 +35,7 @@ public class GT_Circuit_Pulser extends GT_CircuitryBehavior { @Override public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { byte tRedstone = aCircuitData[1] == 0 ? getWeakestNonZeroRedstone(aRedstoneCircuitBlock) - : getStrongestRedstone(aRedstoneCircuitBlock); + : getStrongestRedstone(aRedstoneCircuitBlock); if (aCircuitData[4] == 0) { aCircuitData[5] = tRedstone; } @@ -49,9 +49,9 @@ public class GT_Circuit_Pulser extends GT_CircuitryBehavior { } } aRedstoneCircuitBlock.setRedstone( - (aCircuitData[4] > 0) && (aCircuitData[4] <= aCircuitData[0]) ? (byte) aCircuitData[1] - : (aCircuitData[1] <= 0) || (aCircuitData[1] > 15) ? (byte) aCircuitData[5] : 0, - aRedstoneCircuitBlock.getOutputFacing()); + (aCircuitData[4] > 0) && (aCircuitData[4] <= aCircuitData[0]) ? (byte) aCircuitData[1] + : (aCircuitData[1] <= 0) || (aCircuitData[1] > 15) ? (byte) aCircuitData[5] : 0, + aRedstoneCircuitBlock.getOutputFacing()); } @Override 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 6557f0277c..336bf9928d 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Randomizer.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Randomizer.java @@ -46,9 +46,8 @@ 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/redstonecircuits/GT_Circuit_RedstoneMeter.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_RedstoneMeter.java index 491fe72c87..4db261fcf0 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_RedstoneMeter.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_RedstoneMeter.java @@ -51,9 +51,10 @@ public class GT_Circuit_RedstoneMeter extends GT_CircuitryBehavior { @Override public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { byte tRedstone = getStrongestRedstone(aRedstoneCircuitBlock); - aRedstoneCircuitBlock.setRedstone( + aRedstoneCircuitBlock + .setRedstone( ((tRedstone >= aCircuitData[0]) && (tRedstone <= aCircuitData[1]) ? 1 : 0) - != (aCircuitData[2] != 0 ? 1 : 0) ? (byte) aCircuitData[3] : 0, + != (aCircuitData[2] != 0 ? 1 : 0) ? (byte) aCircuitData[3] : 0, aRedstoneCircuitBlock.getOutputFacing()); } diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Timer.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Timer.java index b7ff2096c6..026c83dfbc 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Timer.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Timer.java @@ -59,8 +59,8 @@ public class GT_Circuit_Timer extends GT_CircuitryBehavior { aCircuitData[4] = 0; } else { aRedstoneCircuitBlock.setRedstone( - (byte) ((aCircuitData[4] - aCircuitData[0]) % aCircuitData[2] == 0 ? 15 : 0), - aRedstoneCircuitBlock.getOutputFacing()); + (byte) ((aCircuitData[4] - aCircuitData[0]) % aCircuitData[2] == 0 ? 15 : 0), + aRedstoneCircuitBlock.getOutputFacing()); } } else { aRedstoneCircuitBlock.setRedstone((byte) 15, 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 6254a9df79..ec9ef2880c 100644 --- a/src/main/java/gregtech/common/render/GT_CapeRenderer.java +++ b/src/main/java/gregtech/common/render/GT_CapeRenderer.java @@ -20,14 +20,13 @@ import gregtech.api.util.GT_Utility; public class GT_CapeRenderer extends RenderPlayer { private final ResourceLocation[] mCapes = { new ResourceLocation("gregtech:textures/BrainTechCape.png"), - new ResourceLocation("gregtech:textures/GregTechCape.png"), - new ResourceLocation("gregtech:textures/MrBrainCape.png"), - new ResourceLocation("gregtech:textures/GregoriusCape.png"), - new ResourceLocation("gregtech:textures/DonorCape.png"), - new ResourceLocation("gregtech:textures/DevCape.png"), new ResourceLocation("gregtech:textures/Steam.png"), - new ResourceLocation("gregtech:textures/Titanium.png"), - new ResourceLocation("gregtech:textures/Neutronium.png"), - new ResourceLocation("gregtech:textures/Stargate.png") }; + new ResourceLocation("gregtech:textures/GregTechCape.png"), + new ResourceLocation("gregtech:textures/MrBrainCape.png"), + new ResourceLocation("gregtech:textures/GregoriusCape.png"), + new ResourceLocation("gregtech:textures/DonorCape.png"), new ResourceLocation("gregtech:textures/DevCape.png"), + new ResourceLocation("gregtech:textures/Steam.png"), new ResourceLocation("gregtech:textures/Titanium.png"), + new ResourceLocation("gregtech:textures/Neutronium.png"), + new ResourceLocation("gregtech:textures/Stargate.png") }; private final Collection mCapeList; public GT_CapeRenderer(Collection aCapeList) { @@ -51,50 +50,50 @@ public class GT_CapeRenderer extends RenderPlayer { try { ResourceLocation tResource = aPlayer.getLocationCape(); if (aPlayer.getDisplayName() - .equalsIgnoreCase("Friedi4321")) { + .equalsIgnoreCase("Friedi4321")) { tResource = this.mCapes[0]; } if (this.mCapeList.contains( - aPlayer.getDisplayName() - .toLowerCase())) { + aPlayer.getDisplayName() + .toLowerCase())) { tResource = this.mCapes[1]; } if (aPlayer.getDisplayName() - .equalsIgnoreCase("Mr_Brain")) { + .equalsIgnoreCase("Mr_Brain")) { tResource = this.mCapes[2]; } if (aPlayer.getDisplayName() - .equalsIgnoreCase("GregoriusT")) { + .equalsIgnoreCase("GregoriusT")) { tResource = this.mCapes[3]; } if (this.mCapeList.contains( - aPlayer.getDisplayName() - .toLowerCase() + ":capedonor")) { + aPlayer.getDisplayName() + .toLowerCase() + ":capedonor")) { tResource = this.mCapes[4]; } if (this.mCapeList.contains( - aPlayer.getDisplayName() - .toLowerCase() + ":capedev")) { + aPlayer.getDisplayName() + .toLowerCase() + ":capedev")) { tResource = this.mCapes[5]; } if (this.mCapeList.contains( - aPlayer.getDisplayName() - .toLowerCase() + ":cape_steam")) { + aPlayer.getDisplayName() + .toLowerCase() + ":cape_steam")) { tResource = this.mCapes[6]; } if (this.mCapeList.contains( - aPlayer.getDisplayName() - .toLowerCase() + ":cape_titanium")) { + aPlayer.getDisplayName() + .toLowerCase() + ":cape_titanium")) { tResource = this.mCapes[7]; } if (this.mCapeList.contains( - aPlayer.getDisplayName() - .toLowerCase() + ":cape_neutronium")) { + aPlayer.getDisplayName() + .toLowerCase() + ":cape_neutronium")) { tResource = this.mCapes[8]; } if (this.mCapeList.contains( - aPlayer.getDisplayName() - .toLowerCase() + ":cape_stargate")) { + aPlayer.getDisplayName() + .toLowerCase() + ":cape_stargate")) { tResource = this.mCapes[9]; } @@ -103,13 +102,13 @@ public class GT_CapeRenderer extends RenderPlayer { GL11.glPushMatrix(); GL11.glTranslatef(0.0F, 0.0F, 0.125F); double d0 = aPlayer.field_71091_bM + (aPlayer.field_71094_bP - aPlayer.field_71091_bM) * aPartialTicks - - (aPlayer.prevPosX + (aPlayer.posX - aPlayer.prevPosX) * aPartialTicks); + - (aPlayer.prevPosX + (aPlayer.posX - aPlayer.prevPosX) * aPartialTicks); double d1 = aPlayer.field_71096_bN + (aPlayer.field_71095_bQ - aPlayer.field_71096_bN) * aPartialTicks - - (aPlayer.prevPosY + (aPlayer.posY - aPlayer.prevPosY) * aPartialTicks); + - (aPlayer.prevPosY + (aPlayer.posY - aPlayer.prevPosY) * aPartialTicks); double d2 = aPlayer.field_71097_bO + (aPlayer.field_71085_bR - aPlayer.field_71097_bO) * aPartialTicks - - (aPlayer.prevPosZ + (aPlayer.posZ - aPlayer.prevPosZ) * aPartialTicks); + - (aPlayer.prevPosZ + (aPlayer.posZ - aPlayer.prevPosZ) * aPartialTicks); float f6 = aPlayer.prevRenderYawOffset - + (aPlayer.renderYawOffset - aPlayer.prevRenderYawOffset) * aPartialTicks; + + (aPlayer.renderYawOffset - aPlayer.prevRenderYawOffset) * aPartialTicks; double d3 = MathHelper.sin(f6 * (float) Math.PI / 180.0F); double d4 = -MathHelper.cos(f6 * (float) Math.PI / 180.0F); float f7 = (float) d1 * 10.0F; @@ -126,11 +125,10 @@ public class GT_CapeRenderer extends RenderPlayer { } float f10 = aPlayer.prevCameraYaw + (aPlayer.cameraYaw - aPlayer.prevCameraYaw) * aPartialTicks; f7 += MathHelper.sin( - (aPlayer.prevDistanceWalkedModified - + (aPlayer.distanceWalkedModified - aPlayer.prevDistanceWalkedModified) * aPartialTicks) - * 6.0F) - * 32.0F - * f10; + (aPlayer.prevDistanceWalkedModified + + (aPlayer.distanceWalkedModified - aPlayer.prevDistanceWalkedModified) * aPartialTicks) * 6.0F) + * 32.0F + * f10; if (aPlayer.isSneaking()) { f7 += 25.0F; } diff --git a/src/main/java/gregtech/common/render/GT_CopiedBlockTexture.java b/src/main/java/gregtech/common/render/GT_CopiedBlockTexture.java index fe9f378047..421d2f648b 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 90caaf85cd..e4304af15d 100644 --- a/src/main/java/gregtech/common/render/GT_CopiedCTMBlockTexture.java +++ b/src/main/java/gregtech/common/render/GT_CopiedCTMBlockTexture.java @@ -43,9 +43,7 @@ class GT_CopiedCTMBlockTexture extends GT_TextureBase implements ITexture, IBloc 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)); + .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; @@ -56,9 +54,7 @@ class GT_CopiedCTMBlockTexture extends GT_TextureBase implements ITexture, IBloc 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)); + .setupColor(ForgeDirection.WEST.ordinal(), mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ)); aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, aIcon); draw(aRenderer); } @@ -68,9 +64,7 @@ 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); } @@ -80,9 +74,7 @@ class GT_CopiedCTMBlockTexture extends GT_TextureBase implements ITexture, IBloc 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)); + .setupColor(ForgeDirection.DOWN.ordinal(), mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ)); aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, aIcon); draw(aRenderer); } @@ -92,9 +84,7 @@ class GT_CopiedCTMBlockTexture extends GT_TextureBase implements ITexture, IBloc 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)); + .setupColor(ForgeDirection.SOUTH.ordinal(), mBlock.colorMultiplier(getBlockAccess(aRenderer), aX, aY, aZ)); aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, aIcon); draw(aRenderer); } @@ -105,9 +95,7 @@ class GT_CopiedCTMBlockTexture extends GT_TextureBase implements ITexture, IBloc 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)); + .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 bf29fe0528..52d5d91ee0 100644 --- a/src/main/java/gregtech/common/render/GT_FlaskRenderer.java +++ b/src/main/java/gregtech/common/render/GT_FlaskRenderer.java @@ -57,9 +57,9 @@ public final class GT_FlaskRenderer implements IItemRenderer { if (fs != null) { IIcon iconWindow = cell.iconWindow; IIcon fluidicon = fs.getFluid() - .getIcon(fs); + .getIcon(fs); int fluidColor = fs.getFluid() - .getColor(fs); + .getColor(fs); Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture); GL11.glBlendFunc(GL11.GL_ZERO, GL11.GL_ONE); if (type.equals(ItemRenderType.INVENTORY)) { @@ -90,14 +90,14 @@ public final class GT_FlaskRenderer implements IItemRenderer { DrawUtil.renderIcon(icon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { ItemRenderer.renderItemIn2D( - Tessellator.instance, - icon.getMaxU(), - icon.getMinV(), - icon.getMinU(), - icon.getMaxV(), - icon.getIconWidth(), - icon.getIconHeight(), - 0.0625F); + Tessellator.instance, + icon.getMaxU(), + icon.getMinV(), + icon.getMinU(), + icon.getMaxV(), + icon.getIconWidth(), + icon.getIconHeight(), + 0.0625F); } GL11.glDisable(GL11.GL_ALPHA_TEST); GL11.glDisable(GL11.GL_BLEND); diff --git a/src/main/java/gregtech/common/render/GT_FluidDisplayStackRenderer.java b/src/main/java/gregtech/common/render/GT_FluidDisplayStackRenderer.java index 9d8d2afe70..9a35f6bc57 100644 --- a/src/main/java/gregtech/common/render/GT_FluidDisplayStackRenderer.java +++ b/src/main/java/gregtech/common/render/GT_FluidDisplayStackRenderer.java @@ -47,9 +47,9 @@ public class GT_FluidDisplayStackRenderer implements IItemRenderer { Materials associatedFluidMaterial = Materials.get(item.stackTagCompound.getString("mFluidMaterialName")); if (associatedFluidMaterial.renderer == null - || !associatedFluidMaterial.renderer.renderFluidDisplayItem(type, item, data)) { + || !associatedFluidMaterial.renderer.renderFluidDisplayItem(type, item, data)) { IIcon icon = item.getItem() - .getIconFromDamage(item.getItemDamage()); + .getIconFromDamage(item.getItemDamage()); Tessellator tess = Tessellator.instance; tess.startDrawingQuads(); // draw a simple rectangle for the inventory icon @@ -72,9 +72,9 @@ public class GT_FluidDisplayStackRenderer implements IItemRenderer { // Render Fluid amount text long fluidAmount = item.getTagCompound() - .getLong("mFluidDisplayAmount"); + .getLong("mFluidDisplayAmount"); if (fluidAmount > 0L && !item.getTagCompound() - .getBoolean("mHideStackSize")) { + .getBoolean("mHideStackSize")) { String amountString; if (fluidAmount < 10_000) { @@ -89,12 +89,8 @@ public class GT_FluidDisplayStackRenderer implements IItemRenderer { GL11.glPushMatrix(); GL11.glScalef(smallTextScale, smallTextScale, 1.0f); - fontRender.drawString( - amountString, - 0, - (int) (16 / smallTextScale) - fontRender.FONT_HEIGHT + 1, - 0xFFFFFF, - true); + fontRender + .drawString(amountString, 0, (int) (16 / smallTextScale) - fontRender.FONT_HEIGHT + 1, 0xFFFFFF, true); GL11.glPopMatrix(); GL11.glDisable(GL11.GL_ALPHA_TEST); } 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 12dcec1291..d984bc0dca 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 @@ -33,14 +33,14 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer { return false; } return (aType == IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON) - || (aType == IItemRenderer.ItemRenderType.INVENTORY) - || (aType == IItemRenderer.ItemRenderType.EQUIPPED) - || (aType == IItemRenderer.ItemRenderType.ENTITY); + || (aType == IItemRenderer.ItemRenderType.INVENTORY) + || (aType == IItemRenderer.ItemRenderType.EQUIPPED) + || (aType == IItemRenderer.ItemRenderType.ENTITY); } @Override public boolean shouldUseRenderHelper(IItemRenderer.ItemRenderType aType, ItemStack aStack, - IItemRenderer.ItemRendererHelper aHelper) { + IItemRenderer.ItemRendererHelper aHelper) { if (GT_Utility.isStackInvalid(aStack)) { return false; } @@ -80,14 +80,14 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer { GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { ItemRenderer.renderItemIn2D( - Tessellator.instance, - tIcon.getMaxU(), - tIcon.getMinV(), - tIcon.getMinU(), - tIcon.getMaxV(), - tIcon.getIconWidth(), - tIcon.getIconHeight(), - 0.0625F); + Tessellator.instance, + tIcon.getMaxU(), + tIcon.getMinV(), + tIcon.getMinU(), + tIcon.getMaxV(), + tIcon.getIconWidth(), + tIcon.getIconHeight(), + 0.0625F); } GL11.glColor3f(1.0F, 1.0F, 1.0F); } @@ -98,14 +98,14 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer { GT_RenderUtil.renderItemIcon(tOverlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { ItemRenderer.renderItemIn2D( - Tessellator.instance, - tOverlay.getMaxU(), - tOverlay.getMinV(), - tOverlay.getMinU(), - tOverlay.getMaxV(), - tOverlay.getIconWidth(), - tOverlay.getIconHeight(), - 0.0625F); + Tessellator.instance, + tOverlay.getMaxU(), + tOverlay.getMinV(), + tOverlay.getMinU(), + tOverlay.getMaxV(), + tOverlay.getIconWidth(), + tOverlay.getIconHeight(), + 0.0625F); } } } @@ -122,14 +122,14 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer { GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { ItemRenderer.renderItemIn2D( - Tessellator.instance, - tIcon.getMaxU(), - tIcon.getMinV(), - tIcon.getMinU(), - tIcon.getMaxV(), - tIcon.getIconWidth(), - tIcon.getIconHeight(), - 0.0625F); + Tessellator.instance, + tIcon.getMaxU(), + tIcon.getMinV(), + tIcon.getMinU(), + tIcon.getMaxV(), + tIcon.getIconWidth(), + tIcon.getIconHeight(), + 0.0625F); } GL11.glColor3f(1.0F, 1.0F, 1.0F); } @@ -140,19 +140,19 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer { GT_RenderUtil.renderItemIcon(tOverlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { ItemRenderer.renderItemIn2D( - Tessellator.instance, - tOverlay.getMaxU(), - tOverlay.getMinV(), - tOverlay.getMinU(), - tOverlay.getMaxV(), - tOverlay.getIconWidth(), - tOverlay.getIconHeight(), - 0.0625F); + Tessellator.instance, + tOverlay.getMaxU(), + tOverlay.getMinV(), + tOverlay.getMinU(), + tOverlay.getMaxV(), + tOverlay.getIconWidth(), + tOverlay.getIconHeight(), + 0.0625F); } } } if ((aType == IItemRenderer.ItemRenderType.INVENTORY) - && (GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) != Materials._NULL)) { + && (GT_MetaGenerated_Tool.getPrimaryMaterial(aStack) != Materials._NULL)) { long tDamage = GT_MetaGenerated_Tool.getToolDamage(aStack); long tMaxDamage = GT_MetaGenerated_Tool.getToolMaxDamage(aStack); if (tDamage <= 0L) { @@ -160,9 +160,8 @@ 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(); @@ -174,14 +173,14 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer { GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { ItemRenderer.renderItemIn2D( - Tessellator.instance, - tIcon.getMaxU(), - tIcon.getMinV(), - tIcon.getMinU(), - tIcon.getMaxV(), - tIcon.getIconWidth(), - tIcon.getIconHeight(), - 0.0625F); + Tessellator.instance, + tIcon.getMaxU(), + tIcon.getMinV(), + tIcon.getMinU(), + tIcon.getMaxV(), + tIcon.getIconWidth(), + tIcon.getIconHeight(), + 0.0625F); } } if (tOverlay != null) { @@ -191,14 +190,14 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer { GT_RenderUtil.renderItemIcon(tOverlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { ItemRenderer.renderItemIn2D( - Tessellator.instance, - tOverlay.getMaxU(), - tOverlay.getMinV(), - tOverlay.getMinU(), - tOverlay.getMaxV(), - tOverlay.getIconWidth(), - tOverlay.getIconHeight(), - 0.0625F); + Tessellator.instance, + tOverlay.getMaxU(), + tOverlay.getMinV(), + tOverlay.getMinU(), + tOverlay.getMaxV(), + tOverlay.getIconWidth(), + tOverlay.getIconHeight(), + 0.0625F); } } } @@ -210,9 +209,8 @@ 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; @@ -227,14 +225,14 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer { GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { ItemRenderer.renderItemIn2D( - Tessellator.instance, - tIcon.getMaxU(), - tIcon.getMinV(), - tIcon.getMinU(), - tIcon.getMaxV(), - tIcon.getIconWidth(), - tIcon.getIconHeight(), - 0.0625F); + Tessellator.instance, + tIcon.getMaxU(), + tIcon.getMinV(), + tIcon.getMinU(), + tIcon.getMaxV(), + tIcon.getIconWidth(), + tIcon.getIconHeight(), + 0.0625F); } } if (tOverlay != null) { @@ -244,14 +242,14 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer { GT_RenderUtil.renderItemIcon(tOverlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { ItemRenderer.renderItemIn2D( - Tessellator.instance, - tOverlay.getMaxU(), - tOverlay.getMinV(), - tOverlay.getMinU(), - tOverlay.getMaxV(), - tOverlay.getIconWidth(), - tOverlay.getIconHeight(), - 0.0625F); + Tessellator.instance, + tOverlay.getMaxU(), + tOverlay.getMinV(), + tOverlay.getMinU(), + tOverlay.getMaxV(), + tOverlay.getIconWidth(), + tOverlay.getIconHeight(), + 0.0625F); } } } diff --git a/src/main/java/gregtech/common/render/GT_PollutionRenderer.java b/src/main/java/gregtech/common/render/GT_PollutionRenderer.java index e98d90c659..d975ac7952 100644 --- a/src/main/java/gregtech/common/render/GT_PollutionRenderer.java +++ b/src/main/java/gregtech/common/render/GT_PollutionRenderer.java @@ -58,8 +58,8 @@ public class GT_PollutionRenderer { public void preLoad() { net.minecraftforge.common.MinecraftForge.EVENT_BUS.register(this); FMLCommonHandler.instance() - .bus() - .register(this); + .bus() + .register(this); } public void processPacket(ChunkCoordIntPair chunk, int pollution) { @@ -133,8 +133,7 @@ public class GT_PollutionRenderer { if (!GT_Mod.gregtechproxy.mRenderPollutionFog) return; if ((!DEBUG && Minecraft.getMinecraft().thePlayer.capabilities.isCreativeMode) - || (fogIntensityLastTick <= 0 && fogIntensityLastTick >= FOG_START_EXP_RATIO)) - return; + || (fogIntensityLastTick <= 0 && fogIntensityLastTick >= FOG_START_EXP_RATIO)) return; if (event.fogMode == 0) { double v = 1 - fogIntensityLastTick / FOG_START_EXP_RATIO; @@ -153,9 +152,8 @@ public class GT_PollutionRenderer { if (!DEBUG && Minecraft.getMinecraft().thePlayer.capabilities.isCreativeMode) return; if (event.entity.isPotionActive(Potion.blindness) || (fogIntensityLastTick < FOG_START_EXP_RATIO) - || event.block.getMaterial() == Material.water - || event.block.getMaterial() == Material.lava) - return; + || event.block.getMaterial() == Material.water + || event.block.getMaterial() == Material.lava) return; GL11.glFogi(GL11.GL_FOG_MODE, GL11.GL_EXP2); event.density = (float) Math.pow(fogIntensityLastTick - FOG_START_EXP_RATIO, .75F) / 5 + 0.01F; @@ -191,14 +189,14 @@ public class GT_PollutionRenderer { } else if (DEBUG) { drawPollution("Intensity: " + (fogIntensityLastTick * 10000), 0); drawPollution( - "Pollution: " + pollutionMap.getPollution( - Minecraft.getMinecraft().thePlayer.lastTickPosX, - Minecraft.getMinecraft().thePlayer.lastTickPosZ), - 20); + "Pollution: " + pollutionMap.getPollution( + Minecraft.getMinecraft().thePlayer.lastTickPosX, + Minecraft.getMinecraft().thePlayer.lastTickPosZ), + 20); drawPollution( - "Density: " + ((float) (Math.pow(fogIntensityLastTick - FOG_START_EXP_RATIO, .75F) / 5 + 0.01F) - * 10000), - 40); + "Density: " + + ((float) (Math.pow(fogIntensityLastTick - FOG_START_EXP_RATIO, .75F) / 5 + 0.01F) * 10000), + 40); } } @@ -233,10 +231,10 @@ public class GT_PollutionRenderer { if (block.getMaterial() == Material.air) { EntityFX fx = new GT_EntityFXPollution( - w, - (float) i1 + w.rand.nextFloat(), - (float) j1 + w.rand.nextFloat(), - (float) k1 + w.rand.nextFloat()); + w, + (float) i1 + w.rand.nextFloat(), + (float) j1 + w.rand.nextFloat(), + (float) k1 + w.rand.nextFloat()); mc.effectRenderer.addEffect(fx); } } diff --git a/src/main/java/gregtech/common/render/GT_RenderUtil.java b/src/main/java/gregtech/common/render/GT_RenderUtil.java index 1919b7975c..6cba823a66 100644 --- a/src/main/java/gregtech/common/render/GT_RenderUtil.java +++ b/src/main/java/gregtech/common/render/GT_RenderUtil.java @@ -23,7 +23,7 @@ public class GT_RenderUtil { } public static void renderBlockIcon(RenderBlocks aRenderer, Block aBlock, double aX, double aY, double aZ, - IIcon aIcon, byte aSide) { + IIcon aIcon, byte aSide) { switch (aSide) { case 0 -> { aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, aIcon); @@ -57,7 +57,7 @@ public class GT_RenderUtil { } public static void renderItemIcon(IIcon icon, double xStart, double yStart, double xEnd, double yEnd, double z, - float nx, float ny, float nz) { + float nx, float ny, float nz) { if (icon == null) { return; } diff --git a/src/main/java/gregtech/common/render/GT_RenderedTexture.java b/src/main/java/gregtech/common/render/GT_RenderedTexture.java index bc36628324..34b8c879ae 100644 --- a/src/main/java/gregtech/common/render/GT_RenderedTexture.java +++ b/src/main/java/gregtech/common/render/GT_RenderedTexture.java @@ -35,7 +35,7 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol private final boolean useExtFacing; protected GT_RenderedTexture(IIconContainer aIcon, short[] aRGBa, boolean allowAlpha, boolean glow, - boolean stdOrient, boolean extFacing) { + boolean stdOrient, boolean extFacing) { if (aRGBa.length != 4) throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GT_RenderedTexture"); mIconContainer = aIcon; mRGBa = aRGBa; @@ -64,7 +64,7 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol if (enableAO) lighting.setBrightnessOverride(MAX_BRIGHTNESS); } lighting.setupLightingXPos(aBlock, aX, aY, aZ) - .setupColor(ForgeDirection.EAST.ordinal(), mRGBa); + .setupColor(ForgeDirection.EAST.ordinal(), mRGBa); final ExtendedFacing rotation = getExtendedFacing(aX, aY, aZ); renderFaceXPos(aRenderer, aX, aY, aZ, mIconContainer.getIcon(), rotation); if (mIconContainer.getOverlayIcon() != null) { @@ -90,7 +90,7 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol lighting.setBrightnessOverride(MAX_BRIGHTNESS); } lighting.setupLightingXNeg(aBlock, aX, aY, aZ) - .setupColor(ForgeDirection.WEST.ordinal(), mRGBa); + .setupColor(ForgeDirection.WEST.ordinal(), mRGBa); final ExtendedFacing rotation = getExtendedFacing(aX, aY, aZ); renderFaceXNeg(aRenderer, aX, aY, aZ, mIconContainer.getIcon(), rotation); if (mIconContainer.getOverlayIcon() != null) { @@ -116,7 +116,7 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol lighting.setBrightnessOverride(MAX_BRIGHTNESS); } lighting.setupLightingYPos(aBlock, aX, aY, aZ) - .setupColor(ForgeDirection.UP.ordinal(), mRGBa); + .setupColor(ForgeDirection.UP.ordinal(), mRGBa); final ExtendedFacing rotation = getExtendedFacing(aX, aY, aZ); renderFaceYPos(aRenderer, aX, aY, aZ, mIconContainer.getIcon(), rotation); if (mIconContainer.getOverlayIcon() != null) { @@ -142,7 +142,7 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol lighting.setBrightnessOverride(MAX_BRIGHTNESS); } lighting.setupLightingYNeg(aBlock, aX, aY, aZ) - .setupColor(ForgeDirection.DOWN.ordinal(), mRGBa); + .setupColor(ForgeDirection.DOWN.ordinal(), mRGBa); final ExtendedFacing rotation = getExtendedFacing(aX, aY, aZ); renderFaceYNeg(aRenderer, aX, aY, aZ, mIconContainer.getIcon(), rotation); if (mIconContainer.getOverlayIcon() != null) { @@ -168,7 +168,7 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol lighting.setBrightnessOverride(MAX_BRIGHTNESS); } lighting.setupLightingZPos(aBlock, aX, aY, aZ) - .setupColor(ForgeDirection.SOUTH.ordinal(), mRGBa); + .setupColor(ForgeDirection.SOUTH.ordinal(), mRGBa); final ExtendedFacing rotation = getExtendedFacing(aX, aY, aZ); renderFaceZPos(aRenderer, aX, aY, aZ, mIconContainer.getIcon(), rotation); if (mIconContainer.getOverlayIcon() != null) { @@ -194,7 +194,7 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol lighting.setBrightnessOverride(MAX_BRIGHTNESS); } lighting.setupLightingZNeg(aBlock, aX, aY, aZ) - .setupColor(ForgeDirection.NORTH.ordinal(), mRGBa); + .setupColor(ForgeDirection.NORTH.ordinal(), mRGBa); final ExtendedFacing rotation = getExtendedFacing(aX, aY, aZ); renderFaceZNeg(aRenderer, aX, aY, aZ, mIconContainer.getIcon(), rotation); if (mIconContainer.getOverlayIcon() != null) { @@ -219,7 +219,7 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol * Renders the given texture to the bottom face of the block. Args: block, x, y, z, texture */ protected void renderFaceYNeg(RenderBlocks aRenderer, double x, double y, double z, IIcon icon, - ExtendedFacing extendedFacing) { + ExtendedFacing extendedFacing) { switch (useExtFacing ? extendedFacing.getRotation() : Rotation.NORMAL) { case COUNTER_CLOCKWISE -> aRenderer.uvRotateBottom = 2; @@ -230,16 +230,13 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol final Flip aFlip = extendedFacing.getFlip(); aRenderer.renderFaceYNeg( - Blocks.air, - x, - y, - z, - useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped - ? new GT_IconFlipped( - icon, - aFlip.isHorizontallyFlipped() ^ !stdOrient, - aFlip.isVerticallyFliped()) - : new GT_IconFlipped(icon, !stdOrient, false)); + Blocks.air, + x, + y, + z, + useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped + ? new GT_IconFlipped(icon, aFlip.isHorizontallyFlipped() ^ !stdOrient, aFlip.isVerticallyFliped()) + : new GT_IconFlipped(icon, !stdOrient, false)); aRenderer.uvRotateBottom = 0; } @@ -247,7 +244,7 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol * Renders the given texture to the top face of the block. Args: block, x, y, z, texture */ protected void renderFaceYPos(RenderBlocks aRenderer, double x, double y, double z, IIcon icon, - ExtendedFacing extendedFacing) { + ExtendedFacing extendedFacing) { switch (useExtFacing ? extendedFacing.getRotation() : Rotation.NORMAL) { case COUNTER_CLOCKWISE -> aRenderer.uvRotateTop = 2; @@ -258,13 +255,13 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol final Flip aFlip = extendedFacing.getFlip(); aRenderer.renderFaceYPos( - Blocks.air, - x, - y, - z, - useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped - ? new GT_IconFlipped(icon, aFlip.isHorizontallyFlipped(), aFlip.isVerticallyFliped()) - : icon); + Blocks.air, + x, + y, + z, + useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped + ? new GT_IconFlipped(icon, aFlip.isHorizontallyFlipped(), aFlip.isVerticallyFliped()) + : icon); aRenderer.uvRotateTop = 0; } @@ -272,7 +269,7 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol * Renders the given texture to the north (z-negative) face of the block. Args: block, x, y, z, texture */ protected void renderFaceZNeg(RenderBlocks aRenderer, double x, double y, double z, IIcon icon, - ExtendedFacing extendedFacing) { + ExtendedFacing extendedFacing) { aRenderer.field_152631_f = true; // **NOT A BUG**: aRenderer.uvRotateEast REALLY CONTROLS THE ROTATION OF THE NORTH SIDE switch (useExtFacing ? extendedFacing.getRotation() : Rotation.NORMAL) { @@ -284,13 +281,13 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol final Flip aFlip = extendedFacing.getFlip(); aRenderer.renderFaceZNeg( - Blocks.air, - x, - y, - z, - useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped - ? new GT_IconFlipped(icon, aFlip.isHorizontallyFlipped(), aFlip.isVerticallyFliped()) - : icon); + Blocks.air, + x, + y, + z, + useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped + ? new GT_IconFlipped(icon, aFlip.isHorizontallyFlipped(), aFlip.isVerticallyFliped()) + : icon); aRenderer.uvRotateEast = 0; aRenderer.field_152631_f = false; } @@ -299,7 +296,7 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol * Renders the given texture to the south (z-positive) face of the block. Args: block, x, y, z, texture */ protected void renderFaceZPos(RenderBlocks aRenderer, double x, double y, double z, IIcon icon, - ExtendedFacing extendedFacing) { + ExtendedFacing extendedFacing) { // **NOT A BUG**: aRenderer.uvRotateWest REALLY CONTROLS THE ROTATION OF THE SOUTH SIDE switch (useExtFacing ? extendedFacing.getRotation() : Rotation.NORMAL) { case COUNTER_CLOCKWISE -> aRenderer.uvRotateWest = 2; @@ -310,13 +307,13 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol final Flip aFlip = extendedFacing.getFlip(); aRenderer.renderFaceZPos( - Blocks.air, - x, - y, - z, - useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped - ? new GT_IconFlipped(icon, aFlip.isHorizontallyFlipped(), aFlip.isVerticallyFliped()) - : icon); + Blocks.air, + x, + y, + z, + useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped + ? new GT_IconFlipped(icon, aFlip.isHorizontallyFlipped(), aFlip.isVerticallyFliped()) + : icon); aRenderer.uvRotateWest = 0; } @@ -324,7 +321,7 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol * Renders the given texture to the west (x-negative) face of the block. Args: block, x, y, z, texture */ protected void renderFaceXNeg(RenderBlocks aRenderer, double x, double y, double z, IIcon icon, - ExtendedFacing extendedFacing) { + ExtendedFacing extendedFacing) { // **NOT A BUG**: aRenderer.uvRotateNorth REALLY CONTROLS THE ROTATION OF THE WEST SIDE switch (useExtFacing ? extendedFacing.getRotation() : Rotation.NORMAL) { case COUNTER_CLOCKWISE -> aRenderer.uvRotateNorth = 2; @@ -335,13 +332,13 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol final Flip aFlip = extendedFacing.getFlip(); aRenderer.renderFaceXNeg( - Blocks.air, - x, - y, - z, - useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped - ? new GT_IconFlipped(icon, aFlip.isHorizontallyFlipped(), aFlip.isVerticallyFliped()) - : icon); + Blocks.air, + x, + y, + z, + useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped + ? new GT_IconFlipped(icon, aFlip.isHorizontallyFlipped(), aFlip.isVerticallyFliped()) + : icon); aRenderer.uvRotateNorth = 0; } @@ -349,7 +346,7 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol * Renders the given texture to the east (x-positive) face of the block. Args: block, x, y, z, texture */ protected void renderFaceXPos(RenderBlocks aRenderer, double x, double y, double z, IIcon icon, - ExtendedFacing extendedFacing) { + ExtendedFacing extendedFacing) { aRenderer.field_152631_f = true; // **NOT A BUG**: aRenderer.uvRotateSouth REALLY CONTROLS THE ROTATION OF THE EAST SIDE switch (useExtFacing ? extendedFacing.getRotation() : Rotation.NORMAL) { @@ -361,13 +358,13 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol final Flip aFlip = extendedFacing.getFlip(); aRenderer.renderFaceXPos( - Blocks.air, - x, - y, - z, - useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped - ? new GT_IconFlipped(icon, aFlip.isHorizontallyFlipped(), aFlip.isVerticallyFliped()) - : icon); + Blocks.air, + x, + y, + z, + useExtFacing && GT_Mod.gregtechproxy.mRenderFlippedMachinesFlipped + ? new GT_IconFlipped(icon, aFlip.isHorizontallyFlipped(), aFlip.isVerticallyFliped()) + : icon); aRenderer.uvRotateSouth = 0; aRenderer.field_152631_f = false; } @@ -386,9 +383,9 @@ public class GT_RenderedTexture extends GT_TextureBase implements ITexture, ICol alignment = ((IAlignmentProvider) meta).getAlignment(); } else if (meta != null) { return ExtendedFacing.of( - ForgeDirection.getOrientation( - meta.getBaseMetaTileEntity() - .getFrontFacing())); + 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 ca9997f333..7646ee31fa 100644 --- a/src/main/java/gregtech/common/render/GT_Renderer_Block.java +++ b/src/main/java/gregtech/common/render/GT_Renderer_Block.java @@ -67,43 +67,43 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { } public static boolean renderStandardBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, - RenderBlocks aRenderer) { + RenderBlocks aRenderer) { final TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if ((tTileEntity instanceof IPipeRenderedTileEntity)) { return renderStandardBlock( - aWorld, - aX, - aY, - aZ, - aBlock, - aRenderer, - new ITexture[][] { ((IPipeRenderedTileEntity) tTileEntity).getTextureCovered((byte) DOWN.ordinal()), - ((IPipeRenderedTileEntity) tTileEntity).getTextureCovered((byte) UP.ordinal()), - ((IPipeRenderedTileEntity) tTileEntity).getTextureCovered((byte) NORTH.ordinal()), - ((IPipeRenderedTileEntity) tTileEntity).getTextureCovered((byte) SOUTH.ordinal()), - ((IPipeRenderedTileEntity) tTileEntity).getTextureCovered((byte) WEST.ordinal()), - ((IPipeRenderedTileEntity) tTileEntity).getTextureCovered((byte) EAST.ordinal()) }); + aWorld, + aX, + aY, + aZ, + aBlock, + aRenderer, + new ITexture[][] { ((IPipeRenderedTileEntity) tTileEntity).getTextureCovered((byte) DOWN.ordinal()), + ((IPipeRenderedTileEntity) tTileEntity).getTextureCovered((byte) UP.ordinal()), + ((IPipeRenderedTileEntity) tTileEntity).getTextureCovered((byte) NORTH.ordinal()), + ((IPipeRenderedTileEntity) tTileEntity).getTextureCovered((byte) SOUTH.ordinal()), + ((IPipeRenderedTileEntity) tTileEntity).getTextureCovered((byte) WEST.ordinal()), + ((IPipeRenderedTileEntity) tTileEntity).getTextureCovered((byte) EAST.ordinal()) }); } if ((tTileEntity instanceof ITexturedTileEntity)) { return renderStandardBlock( - aWorld, - aX, - aY, - aZ, - aBlock, - aRenderer, - new ITexture[][] { ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) DOWN.ordinal()), - ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) UP.ordinal()), - ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) NORTH.ordinal()), - ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) SOUTH.ordinal()), - ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) WEST.ordinal()), - ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) EAST.ordinal()) }); + aWorld, + aX, + aY, + aZ, + aBlock, + aRenderer, + new ITexture[][] { ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) DOWN.ordinal()), + ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) UP.ordinal()), + ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) NORTH.ordinal()), + ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) SOUTH.ordinal()), + ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) WEST.ordinal()), + ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) EAST.ordinal()) }); } return false; } public static boolean renderStandardBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, - RenderBlocks aRenderer, ITexture[][] aTextures) { + RenderBlocks aRenderer, ITexture[][] aTextures) { aBlock.setBlockBounds(blockMin, blockMin, blockMin, blockMax, blockMax, blockMax); aRenderer.setRenderBoundsFromBlock(aBlock); @@ -117,7 +117,7 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { } public static boolean renderPipeBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, - IPipeRenderedTileEntity aTileEntity, RenderBlocks aRenderer) { + IPipeRenderedTileEntity aTileEntity, RenderBlocks aRenderer) { final byte aConnections = aTileEntity.getConnections(); if ((aConnections & (HAS_FRESHFOAM | HAS_HARDENEDFOAM)) != 0) { return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer); @@ -474,7 +474,7 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { @SideOnly(Side.CLIENT) public static void addHitEffects(EffectRenderer effectRenderer, Block block, World world, int x, int y, int z, - int side) { + int side) { double rX = x + XSTR.XSTR_INSTANCE.nextDouble() * 0.8 + 0.1; double rY = y + XSTR.XSTR_INSTANCE.nextDouble() * 0.8 + 0.1; double rZ = z + XSTR.XSTR_INSTANCE.nextDouble() * 0.8 + 0.1; @@ -492,19 +492,10 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { rX = x + 1.1; } effectRenderer.addEffect( - (new EntityDiggingFX( - world, - rX, - rY, - rZ, - 0.0, - 0.0, - 0.0, - block, - block.getDamageValue(world, x, y, z), - side)).applyColourMultiplier(x, y, z) - .multiplyVelocity(0.2F) - .multipleParticleScaleBy(0.6F)); + (new EntityDiggingFX(world, rX, rY, rZ, 0.0, 0.0, 0.0, block, block.getDamageValue(world, x, y, z), side)) + .applyColourMultiplier(x, y, z) + .multiplyVelocity(0.2F) + .multipleParticleScaleBy(0.6F)); } @SideOnly(Side.CLIENT) @@ -516,16 +507,16 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { final double bY = y + (iY + 0.5) / 4.0; final double bZ = z + (iZ + 0.5) / 4.0; effectRenderer.addEffect( - (new EntityDiggingFX( - world, - bX, - bY, - bZ, - bX - x - 0.5, - bY - y - 0.5, - bZ - z - 0.5, - block, - block.getDamageValue(world, x, y, z))).applyColourMultiplier(x, y, z)); + (new EntityDiggingFX( + world, + bX, + bY, + bZ, + bX - x - 0.5, + bY - y - 0.5, + bZ - z - 0.5, + block, + block.getDamageValue(world, x, y, z))).applyColourMultiplier(x, y, z)); } } } @@ -556,349 +547,349 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { } renderNegativeYFacing( - null, - aRenderer, - aBlock, - 0, - 0, - 0, - tRenderer.getTexture(aBlock, (byte) DOWN.ordinal(), true, i), - !tNeedsToSetBounds); - renderPositiveYFacing( - null, - aRenderer, - aBlock, - 0, - 0, - 0, - tRenderer.getTexture(aBlock, (byte) UP.ordinal(), true, i), - !tNeedsToSetBounds); - renderNegativeZFacing( - null, - aRenderer, - aBlock, - 0, - 0, - 0, - tRenderer.getTexture(aBlock, (byte) NORTH.ordinal(), true, i), - !tNeedsToSetBounds); - renderPositiveZFacing( - null, - aRenderer, - aBlock, - 0, - 0, - 0, - tRenderer.getTexture(aBlock, (byte) SOUTH.ordinal(), true, i), - !tNeedsToSetBounds); - renderNegativeXFacing( - null, - aRenderer, - aBlock, - 0, - 0, - 0, - tRenderer.getTexture(aBlock, (byte) WEST.ordinal(), true, i), - !tNeedsToSetBounds); - renderPositiveXFacing( - null, - aRenderer, - aBlock, - 0, - 0, - 0, - tRenderer.getTexture(aBlock, (byte) EAST.ordinal(), true, i), - !tNeedsToSetBounds); - } - } - if (tNeedsToSetBounds) aBlock.setBlockBounds(0, 0, 0, 1, 1, 1); - - } else { - if (aBlock instanceof GT_Block_Ores_Abstract) { - final GT_TileEntity_Ores tTileEntity = new GT_TileEntity_Ores(); - tTileEntity.mMetaData = ((short) aMeta); - - aBlock.setBlockBoundsForItemRender(); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing( null, aRenderer, aBlock, 0, 0, 0, - tTileEntity.getTexture(aBlock, (byte) DOWN.ordinal()), - true); - renderPositiveYFacing( + tRenderer.getTexture(aBlock, (byte) DOWN.ordinal(), true, i), + !tNeedsToSetBounds); + renderPositiveYFacing( null, aRenderer, aBlock, 0, 0, 0, - tTileEntity.getTexture(aBlock, (byte) UP.ordinal()), - true); - renderNegativeZFacing( + tRenderer.getTexture(aBlock, (byte) UP.ordinal(), true, i), + !tNeedsToSetBounds); + renderNegativeZFacing( null, aRenderer, aBlock, 0, 0, 0, - tTileEntity.getTexture(aBlock, (byte) NORTH.ordinal()), - true); - renderPositiveZFacing( + tRenderer.getTexture(aBlock, (byte) NORTH.ordinal(), true, i), + !tNeedsToSetBounds); + renderPositiveZFacing( null, aRenderer, aBlock, 0, 0, 0, - tTileEntity.getTexture(aBlock, (byte) SOUTH.ordinal()), - true); - renderNegativeXFacing( + tRenderer.getTexture(aBlock, (byte) SOUTH.ordinal(), true, i), + !tNeedsToSetBounds); + renderNegativeXFacing( null, aRenderer, aBlock, 0, 0, 0, - tTileEntity.getTexture(aBlock, (byte) WEST.ordinal()), - true); - renderPositiveXFacing( + tRenderer.getTexture(aBlock, (byte) WEST.ordinal(), true, i), + !tNeedsToSetBounds); + renderPositiveXFacing( null, aRenderer, aBlock, 0, 0, 0, - tTileEntity.getTexture(aBlock, (byte) EAST.ordinal()), - true); - } else if (aMeta > 0 && (aMeta < GregTech_API.METATILEENTITIES.length) - && aBlock instanceof GT_Block_Machines - && (GregTech_API.METATILEENTITIES[aMeta] != null) - && (!GregTech_API.METATILEENTITIES[aMeta].renderInInventory(aBlock, aMeta, aRenderer))) { - renderNormalInventoryMetaTileEntity(aBlock, aMeta, aRenderer); - } - aBlock.setBlockBounds(blockMin, blockMin, blockMin, blockMax, blockMax, blockMax); - } - - aRenderer.setRenderBoundsFromBlock(aBlock); - - GL11.glTranslatef(0.5F, 0.5F, 0.5F); - aRenderer.useInventoryTint = false; - } - - private static void renderNormalInventoryMetaTileEntity(Block aBlock, int aMeta, RenderBlocks aRenderer) { - if ((aMeta <= 0) || (aMeta >= GregTech_API.METATILEENTITIES.length)) { - return; - } - final IMetaTileEntity tMetaTileEntity = GregTech_API.METATILEENTITIES[aMeta]; - if (tMetaTileEntity == null) { - return; - } - aBlock.setBlockBoundsForItemRender(); - aRenderer.setRenderBoundsFromBlock(aBlock); - - final IGregTechTileEntity iGregTechTileEntity = tMetaTileEntity.getBaseMetaTileEntity(); + tRenderer.getTexture(aBlock, (byte) EAST.ordinal(), true, i), + !tNeedsToSetBounds); + } + } + if (tNeedsToSetBounds) aBlock.setBlockBounds(0, 0, 0, 1, 1, 1); - if ((iGregTechTileEntity instanceof IPipeRenderedTileEntity)) { - final float tThickness = ((IPipeRenderedTileEntity) iGregTechTileEntity).getThickNess(); - final float pipeMin = (blockMax - tThickness) / 2.0F; - final float pipeMax = blockMax - pipeMin; + } else { + if (aBlock instanceof GT_Block_Ores_Abstract) { + final GT_TileEntity_Ores tTileEntity = new GT_TileEntity_Ores(); + tTileEntity.mMetaData = ((short) aMeta); - aBlock.setBlockBounds(blockMin, pipeMin, pipeMin, blockMax, pipeMax, pipeMax); - aRenderer.setRenderBoundsFromBlock(aBlock); - renderNegativeYFacing( + aBlock.setBlockBoundsForItemRender(); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderNegativeYFacing( null, aRenderer, aBlock, 0, 0, 0, - tMetaTileEntity.getTexture( - iGregTechTileEntity, - (byte) DOWN.ordinal(), - (byte) (CONNECTED_WEST | CONNECTED_EAST), - (byte) -1, - false, - false), + tTileEntity.getTexture(aBlock, (byte) DOWN.ordinal()), true); - renderPositiveYFacing( + renderPositiveYFacing( null, aRenderer, aBlock, 0, 0, 0, - tMetaTileEntity.getTexture( - iGregTechTileEntity, - (byte) UP.ordinal(), - (byte) (CONNECTED_WEST | CONNECTED_EAST), - (byte) -1, - false, - false), + tTileEntity.getTexture(aBlock, (byte) UP.ordinal()), true); - renderNegativeZFacing( + renderNegativeZFacing( null, aRenderer, aBlock, 0, 0, 0, - tMetaTileEntity.getTexture( - iGregTechTileEntity, - (byte) NORTH.ordinal(), - (byte) (CONNECTED_WEST | CONNECTED_EAST), - (byte) -1, - false, - false), + tTileEntity.getTexture(aBlock, (byte) NORTH.ordinal()), true); - renderPositiveZFacing( + renderPositiveZFacing( null, aRenderer, aBlock, 0, 0, 0, - tMetaTileEntity.getTexture( - iGregTechTileEntity, - (byte) SOUTH.ordinal(), - (byte) (CONNECTED_WEST | CONNECTED_EAST), - (byte) -1, - false, - false), + tTileEntity.getTexture(aBlock, (byte) SOUTH.ordinal()), true); - renderNegativeXFacing( + renderNegativeXFacing( null, aRenderer, aBlock, 0, 0, 0, - tMetaTileEntity.getTexture( - iGregTechTileEntity, - (byte) WEST.ordinal(), - (byte) (CONNECTED_WEST | CONNECTED_EAST), - (byte) -1, - true, - false), + tTileEntity.getTexture(aBlock, (byte) WEST.ordinal()), true); - renderPositiveXFacing( + renderPositiveXFacing( null, aRenderer, aBlock, 0, 0, 0, - tMetaTileEntity.getTexture( - iGregTechTileEntity, - (byte) EAST.ordinal(), - (byte) (CONNECTED_WEST | CONNECTED_EAST), - (byte) -1, - true, - false), + tTileEntity.getTexture(aBlock, (byte) EAST.ordinal()), true); + } else if (aMeta > 0 && (aMeta < GregTech_API.METATILEENTITIES.length) + && aBlock instanceof GT_Block_Machines + && (GregTech_API.METATILEENTITIES[aMeta] != null) + && (!GregTech_API.METATILEENTITIES[aMeta].renderInInventory(aBlock, aMeta, aRenderer))) { + renderNormalInventoryMetaTileEntity(aBlock, aMeta, aRenderer); + } + aBlock.setBlockBounds(blockMin, blockMin, blockMin, blockMax, blockMax, blockMax); + } + + aRenderer.setRenderBoundsFromBlock(aBlock); + + GL11.glTranslatef(0.5F, 0.5F, 0.5F); + aRenderer.useInventoryTint = false; + } + + private static void renderNormalInventoryMetaTileEntity(Block aBlock, int aMeta, RenderBlocks aRenderer) { + if ((aMeta <= 0) || (aMeta >= GregTech_API.METATILEENTITIES.length)) { + return; + } + final IMetaTileEntity tMetaTileEntity = GregTech_API.METATILEENTITIES[aMeta]; + if (tMetaTileEntity == null) { + return; + } + aBlock.setBlockBoundsForItemRender(); + aRenderer.setRenderBoundsFromBlock(aBlock); + + final IGregTechTileEntity iGregTechTileEntity = tMetaTileEntity.getBaseMetaTileEntity(); + + if ((iGregTechTileEntity instanceof IPipeRenderedTileEntity)) { + final float tThickness = ((IPipeRenderedTileEntity) iGregTechTileEntity).getThickNess(); + final float pipeMin = (blockMax - tThickness) / 2.0F; + final float pipeMax = blockMax - pipeMin; + + aBlock.setBlockBounds(blockMin, pipeMin, pipeMin, blockMax, pipeMax, pipeMax); + aRenderer.setRenderBoundsFromBlock(aBlock); + renderNegativeYFacing( + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tMetaTileEntity.getTexture( + iGregTechTileEntity, + (byte) DOWN.ordinal(), + (byte) (CONNECTED_WEST | CONNECTED_EAST), + (byte) -1, + false, + false), + true); + renderPositiveYFacing( + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tMetaTileEntity.getTexture( + iGregTechTileEntity, + (byte) UP.ordinal(), + (byte) (CONNECTED_WEST | CONNECTED_EAST), + (byte) -1, + false, + false), + true); + renderNegativeZFacing( + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tMetaTileEntity.getTexture( + iGregTechTileEntity, + (byte) NORTH.ordinal(), + (byte) (CONNECTED_WEST | CONNECTED_EAST), + (byte) -1, + false, + false), + true); + renderPositiveZFacing( + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tMetaTileEntity.getTexture( + iGregTechTileEntity, + (byte) SOUTH.ordinal(), + (byte) (CONNECTED_WEST | CONNECTED_EAST), + (byte) -1, + false, + false), + true); + renderNegativeXFacing( + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tMetaTileEntity.getTexture( + iGregTechTileEntity, + (byte) WEST.ordinal(), + (byte) (CONNECTED_WEST | CONNECTED_EAST), + (byte) -1, + true, + false), + true); + renderPositiveXFacing( + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tMetaTileEntity.getTexture( + iGregTechTileEntity, + (byte) EAST.ordinal(), + (byte) (CONNECTED_WEST | CONNECTED_EAST), + (byte) -1, + true, + false), + true); } else { renderNegativeYFacing( - null, - aRenderer, - aBlock, - 0, - 0, - 0, - tMetaTileEntity.getTexture( - iGregTechTileEntity, - (byte) DOWN.ordinal(), - (byte) WEST.ordinal(), - (byte) -1, - true, - false), - true); + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tMetaTileEntity.getTexture( + iGregTechTileEntity, + (byte) DOWN.ordinal(), + (byte) WEST.ordinal(), + (byte) -1, + true, + false), + true); renderPositiveYFacing( - null, - aRenderer, - aBlock, - 0, - 0, - 0, - tMetaTileEntity.getTexture( - iGregTechTileEntity, - (byte) UP.ordinal(), - (byte) WEST.ordinal(), - (byte) -1, - true, - false), - true); + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tMetaTileEntity.getTexture( + iGregTechTileEntity, + (byte) UP.ordinal(), + (byte) WEST.ordinal(), + (byte) -1, + true, + false), + true); renderNegativeZFacing( - null, - aRenderer, - aBlock, - 0, - 0, - 0, - tMetaTileEntity.getTexture( - iGregTechTileEntity, - (byte) NORTH.ordinal(), - (byte) WEST.ordinal(), - (byte) -1, - true, - false), - true); + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tMetaTileEntity.getTexture( + iGregTechTileEntity, + (byte) NORTH.ordinal(), + (byte) WEST.ordinal(), + (byte) -1, + true, + false), + true); renderPositiveZFacing( - null, - aRenderer, - aBlock, - 0, - 0, - 0, - tMetaTileEntity.getTexture( - iGregTechTileEntity, - (byte) SOUTH.ordinal(), - (byte) WEST.ordinal(), - (byte) -1, - true, - false), - true); + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tMetaTileEntity.getTexture( + iGregTechTileEntity, + (byte) SOUTH.ordinal(), + (byte) WEST.ordinal(), + (byte) -1, + true, + false), + true); renderNegativeXFacing( - null, - aRenderer, - aBlock, - 0, - 0, - 0, - tMetaTileEntity.getTexture( - iGregTechTileEntity, - (byte) WEST.ordinal(), - (byte) WEST.ordinal(), - (byte) -1, - true, - false), - true); + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tMetaTileEntity.getTexture( + iGregTechTileEntity, + (byte) WEST.ordinal(), + (byte) WEST.ordinal(), + (byte) -1, + true, + false), + true); renderPositiveXFacing( - null, - aRenderer, - aBlock, - 0, - 0, - 0, - tMetaTileEntity.getTexture( - iGregTechTileEntity, - (byte) EAST.ordinal(), - (byte) WEST.ordinal(), - (byte) -1, - true, - false), - true); + null, + aRenderer, + aBlock, + 0, + 0, + 0, + tMetaTileEntity.getTexture( + iGregTechTileEntity, + (byte) EAST.ordinal(), + (byte) WEST.ordinal(), + (byte) -1, + true, + false), + true); } } public static void renderNegativeYFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, - int aZ, ITexture[] aIcon, boolean aFullBlock) { + 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) { @@ -909,11 +900,11 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { } public static void renderPositiveYFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, - int aZ, ITexture[] aIcon, boolean aFullBlock) { + 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) { @@ -924,11 +915,11 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { } public static void renderNegativeZFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, - int aZ, ITexture[] aIcon, boolean aFullBlock) { + 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) { @@ -939,11 +930,11 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { } public static void renderPositiveZFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, - int aZ, ITexture[] aIcon, boolean aFullBlock) { + 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) { @@ -954,11 +945,11 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { } public static void renderNegativeXFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, - int aZ, ITexture[] aIcon, boolean aFullBlock) { + 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) { @@ -969,11 +960,11 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { } public static void renderPositiveXFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, - int aZ, ITexture[] aIcon, boolean aFullBlock) { + 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) { @@ -985,7 +976,7 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { @Override public boolean renderWorldBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, int aModelID, - RenderBlocks aRenderer) { + RenderBlocks aRenderer) { aRenderer.enableAO = Minecraft.isAmbientOcclusionEnabled() && GT_Mod.gregtechproxy.mRenderTileAmbientOcclusion; aRenderer.useInventoryTint = false; if (aBlock instanceof IRenderedBlock) { @@ -999,18 +990,11 @@ 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)) { @@ -1023,59 +1007,59 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { tNeedsToSetBounds = false; } renderNegativeYFacing( - aWorld, - aRenderer, - aBlock, - aX, - aY, - aZ, - tRenderer.getTexture(aBlock, (byte) DOWN.ordinal(), i, tSides), - tSides[DOWN.ordinal()]); + aWorld, + aRenderer, + aBlock, + aX, + aY, + aZ, + tRenderer.getTexture(aBlock, (byte) DOWN.ordinal(), i, tSides), + tSides[DOWN.ordinal()]); renderPositiveYFacing( - aWorld, - aRenderer, - aBlock, - aX, - aY, - aZ, - tRenderer.getTexture(aBlock, (byte) UP.ordinal(), i, tSides), - tSides[UP.ordinal()]); + aWorld, + aRenderer, + aBlock, + aX, + aY, + aZ, + tRenderer.getTexture(aBlock, (byte) UP.ordinal(), i, tSides), + tSides[UP.ordinal()]); renderNegativeZFacing( - aWorld, - aRenderer, - aBlock, - aX, - aY, - aZ, - tRenderer.getTexture(aBlock, (byte) NORTH.ordinal(), i, tSides), - tSides[NORTH.ordinal()]); + aWorld, + aRenderer, + aBlock, + aX, + aY, + aZ, + tRenderer.getTexture(aBlock, (byte) NORTH.ordinal(), i, tSides), + tSides[NORTH.ordinal()]); renderPositiveZFacing( - aWorld, - aRenderer, - aBlock, - aX, - aY, - aZ, - tRenderer.getTexture(aBlock, (byte) SOUTH.ordinal(), i, tSides), - tSides[SOUTH.ordinal()]); + aWorld, + aRenderer, + aBlock, + aX, + aY, + aZ, + tRenderer.getTexture(aBlock, (byte) SOUTH.ordinal(), i, tSides), + tSides[SOUTH.ordinal()]); renderNegativeXFacing( - aWorld, - aRenderer, - aBlock, - aX, - aY, - aZ, - tRenderer.getTexture(aBlock, (byte) WEST.ordinal(), i, tSides), - tSides[WEST.ordinal()]); + aWorld, + aRenderer, + aBlock, + aX, + aY, + aZ, + tRenderer.getTexture(aBlock, (byte) WEST.ordinal(), i, tSides), + tSides[WEST.ordinal()]); renderPositiveXFacing( - aWorld, - aRenderer, - aBlock, - aX, - aY, - aZ, - tRenderer.getTexture(aBlock, (byte) EAST.ordinal(), i, tSides), - tSides[EAST.ordinal()]); + aWorld, + aRenderer, + aBlock, + aX, + aY, + aZ, + tRenderer.getTexture(aBlock, (byte) EAST.ordinal(), i, tSides), + tSides[EAST.ordinal()]); } } if (tNeedsToSetBounds) aBlock.setBlockBounds(0, 0, 0, 1, 1, 1); @@ -1089,13 +1073,13 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler { if (tileEntity instanceof IGregTechTileEntity) { final IMetaTileEntity metaTileEntity; if ((metaTileEntity = ((IGregTechTileEntity) tileEntity).getMetaTileEntity()) != null - && metaTileEntity.renderInWorld(aWorld, aX, aY, aZ, aBlock, aRenderer)) { + && metaTileEntity.renderInWorld(aWorld, aX, aY, aZ, aBlock, aRenderer)) { aRenderer.enableAO = false; return true; } } if (tileEntity instanceof IPipeRenderedTileEntity - && renderPipeBlock(aWorld, aX, aY, aZ, aBlock, (IPipeRenderedTileEntity) tileEntity, aRenderer)) { + && renderPipeBlock(aWorld, aX, aY, aZ, aBlock, (IPipeRenderedTileEntity) tileEntity, aRenderer)) { aRenderer.enableAO = false; return true; } diff --git a/src/main/java/gregtech/common/render/GT_SidedTexture.java b/src/main/java/gregtech/common/render/GT_SidedTexture.java index 912e339208..7a851fd1e7 100644 --- a/src/main/java/gregtech/common/render/GT_SidedTexture.java +++ b/src/main/java/gregtech/common/render/GT_SidedTexture.java @@ -19,12 +19,12 @@ public class GT_SidedTexture extends GT_TextureBase implements ITexture, IColorM private final short[] mRGBa; protected GT_SidedTexture(IIconContainer aIcon0, IIconContainer aIcon1, IIconContainer aIcon2, - IIconContainer aIcon3, IIconContainer aIcon4, IIconContainer aIcon5, short[] aRGBa, boolean aAllowAlpha) { + IIconContainer aIcon3, IIconContainer aIcon4, IIconContainer aIcon5, short[] aRGBa, boolean aAllowAlpha) { if (aRGBa.length != 4) throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GT_RenderedTexture"); mTextures = new ITexture[] { TextureFactory.of(aIcon0, aRGBa, aAllowAlpha), - TextureFactory.of(aIcon1, aRGBa, aAllowAlpha), TextureFactory.of(aIcon2, aRGBa, aAllowAlpha), - TextureFactory.of(aIcon3, aRGBa, aAllowAlpha), TextureFactory.of(aIcon4, aRGBa, aAllowAlpha), - TextureFactory.of(aIcon5, aRGBa, aAllowAlpha) }; + TextureFactory.of(aIcon1, aRGBa, aAllowAlpha), TextureFactory.of(aIcon2, aRGBa, aAllowAlpha), + TextureFactory.of(aIcon3, aRGBa, aAllowAlpha), TextureFactory.of(aIcon4, aRGBa, aAllowAlpha), + TextureFactory.of(aIcon5, aRGBa, aAllowAlpha) }; mRGBa = aRGBa; } diff --git a/src/main/java/gregtech/common/render/GT_TextureBuilder.java b/src/main/java/gregtech/common/render/GT_TextureBuilder.java index 56009c2971..af8a590fc1 100644 --- a/src/main/java/gregtech/common/render/GT_TextureBuilder.java +++ b/src/main/java/gregtech/common/render/GT_TextureBuilder.java @@ -121,23 +121,21 @@ public class GT_TextureBuilder implements ITextureBuilder { return switch (iconContainerList.size()) { case 1 -> new GT_RenderedTexture(iconContainerList.get(0), rgba, allowAlpha, glow, stdOrient, extFacing); case 6 -> new GT_SidedTexture( - iconContainerList.get(ForgeDirection.DOWN.ordinal()), - iconContainerList.get(ForgeDirection.UP.ordinal()), - iconContainerList.get(ForgeDirection.NORTH.ordinal()), - iconContainerList.get(ForgeDirection.SOUTH.ordinal()), - iconContainerList.get(ForgeDirection.WEST.ordinal()), - iconContainerList.get(ForgeDirection.EAST.ordinal()), - rgba, - allowAlpha); + iconContainerList.get(ForgeDirection.DOWN.ordinal()), + iconContainerList.get(ForgeDirection.UP.ordinal()), + iconContainerList.get(ForgeDirection.NORTH.ordinal()), + iconContainerList.get(ForgeDirection.SOUTH.ordinal()), + iconContainerList.get(ForgeDirection.WEST.ordinal()), + iconContainerList.get(ForgeDirection.EAST.ordinal()), + rgba, + allowAlpha); default -> throw new IllegalStateException("Invalid sideIconContainer count"); }; } 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/CosmicNeutroniumRenderer.java b/src/main/java/gregtech/common/render/items/CosmicNeutroniumRenderer.java index 5577e41d30..717a36b78f 100644 --- a/src/main/java/gregtech/common/render/items/CosmicNeutroniumRenderer.java +++ b/src/main/java/gregtech/common/render/items/CosmicNeutroniumRenderer.java @@ -94,14 +94,14 @@ public class CosmicNeutroniumRenderer extends GT_GeneratedMaterial_Renderer { } else { GL11.glEnable(GL11.GL_DEPTH_TEST); ItemRenderer.renderItemIn2D( - Tessellator.instance, - icon.getMaxU(), - icon.getMinV(), - icon.getMinU(), - icon.getMaxV(), - icon.getIconWidth(), - icon.getIconHeight(), - 0.0625F); + Tessellator.instance, + icon.getMaxU(), + icon.getMinV(), + icon.getMinU(), + icon.getMaxV(), + icon.getIconWidth(), + icon.getIconHeight(), + 0.0625F); } GL11.glPopMatrix(); } 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 fbd3798b76..1d3346a675 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 @@ -31,8 +31,8 @@ public class GT_GeneratedItem_Renderer implements IItemRenderer { @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { return type == ItemRenderType.EQUIPPED || type == ItemRenderType.EQUIPPED_FIRST_PERSON - || type == ItemRenderType.INVENTORY - || type == ItemRenderType.ENTITY; + || type == ItemRenderType.INVENTORY + || type == ItemRenderType.ENTITY; } @Override @@ -62,7 +62,7 @@ public class GT_GeneratedItem_Renderer implements IItemRenderer { tIcon = aItem.mIconList[(aMetaData - aItem.mOffset)][8]; } else { tIcon = aItem.mIconList[(aMetaData - aItem.mOffset)][(7 - - (int) Math.max(0L, Math.min(5L, (tStats[0] - tCharge) * 6L / tStats[0])))]; + - (int) Math.max(0L, Math.min(5L, (tStats[0] - tCharge) * 6L / tStats[0])))]; } } } else { @@ -87,14 +87,14 @@ public class GT_GeneratedItem_Renderer implements IItemRenderer { GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { ItemRenderer.renderItemIn2D( - Tessellator.instance, - tIcon.getMaxU(), - tIcon.getMinV(), - tIcon.getMinU(), - tIcon.getMaxV(), - tIcon.getIconWidth(), - tIcon.getIconHeight(), - 0.0625F); + Tessellator.instance, + tIcon.getMaxU(), + tIcon.getMinV(), + tIcon.getMinU(), + tIcon.getMaxV(), + tIcon.getIconWidth(), + tIcon.getIconHeight(), + 0.0625F); } GL11.glDisable(GL11.GL_BLEND); } @@ -134,23 +134,23 @@ public class GT_GeneratedItem_Renderer implements IItemRenderer { GT_RenderUtil.renderItemIcon(inner, 16.0D, -0.001D, 0.0F, 0.0F, -1.0F); } else { ItemRenderer.renderItemIn2D( - Tessellator.instance, - inner.getMaxU(), - inner.getMinV(), - inner.getMinU(), - inner.getMaxV(), - inner.getIconWidth(), - inner.getIconHeight(), - 0.0625F); + Tessellator.instance, + inner.getMaxU(), + inner.getMinV(), + inner.getMinU(), + inner.getMaxV(), + inner.getIconWidth(), + inner.getIconHeight(), + 0.0625F); } FluidStack fluidStack = GT_Utility.getFluidForFilledItem(stack, true); if (fluidStack != null && fluidStack.getFluid() != null) { IIcon fluidIcon = fluidStack.getFluid() - .getIcon(fluidStack); + .getIcon(fluidStack); int fluidColor = fluidStack.getFluid() - .getColor(fluidStack); + .getColor(fluidStack); Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture); markNeedsAnimationUpdate(fluidIcon); @@ -161,14 +161,14 @@ public class GT_GeneratedItem_Renderer implements IItemRenderer { GT_RenderUtil.renderItemIcon(fluidIcon, 16.0D, -0.001D, 0.0F, 0.0F, -1.0F); } else { ItemRenderer.renderItemIn2D( - Tessellator.instance, - fluidIcon.getMaxU(), - fluidIcon.getMinV(), - fluidIcon.getMinU(), - fluidIcon.getMaxV(), - fluidIcon.getIconWidth(), - fluidIcon.getIconHeight(), - 0.0625F); + Tessellator.instance, + fluidIcon.getMaxU(), + fluidIcon.getMinV(), + fluidIcon.getMinU(), + fluidIcon.getMaxV(), + fluidIcon.getIconWidth(), + fluidIcon.getIconHeight(), + 0.0625F); } GL11.glColor3ub((byte) -1, (byte) -1, (byte) -1); 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 ebfb06bcbe..449d4500f6 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 @@ -24,8 +24,8 @@ public class GT_GeneratedMaterial_Renderer implements IItemRenderer { @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { return type == ItemRenderType.EQUIPPED || type == ItemRenderType.EQUIPPED_FIRST_PERSON - || type == ItemRenderType.INVENTORY - || type == ItemRenderType.ENTITY; + || type == ItemRenderType.INVENTORY + || type == ItemRenderType.ENTITY; } @Override @@ -72,7 +72,7 @@ public class GT_GeneratedMaterial_Renderer implements IItemRenderer { if (tOverlay != null && aFluid != null && aFluid.getFluid() != null) { IIcon fluidIcon = aFluid.getFluid() - .getIcon(aFluid); + .getIcon(aFluid); if (fluidIcon != null) { markNeedsAnimationUpdate(fluidIcon); // Adds colour to a cells fluid. Does not colour full fluid icons as shown in NEI etc. @@ -92,7 +92,7 @@ public class GT_GeneratedMaterial_Renderer implements IItemRenderer { } protected void renderRegularItem(ItemRenderType type, ItemStack aStack, IIcon icon, boolean shouldModulateColor, - int pass, Object... data) { + int pass, Object... data) { renderRegularItem(type, aStack, icon, shouldModulateColor); } @@ -108,14 +108,14 @@ public class GT_GeneratedMaterial_Renderer implements IItemRenderer { GT_RenderUtil.renderItemIcon(icon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { ItemRenderer.renderItemIn2D( - Tessellator.instance, - icon.getMaxU(), - icon.getMinV(), - icon.getMinU(), - icon.getMaxV(), - icon.getIconWidth(), - icon.getIconHeight(), - 0.0625F); + Tessellator.instance, + icon.getMaxU(), + icon.getMinV(), + icon.getMinU(), + icon.getMaxV(), + icon.getIconWidth(), + icon.getIconHeight(), + 0.0625F); } } @@ -130,14 +130,14 @@ public class GT_GeneratedMaterial_Renderer implements IItemRenderer { GT_RenderUtil.renderItemIcon(fluidIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { ItemRenderer.renderItemIn2D( - Tessellator.instance, - fluidIcon.getMaxU(), - fluidIcon.getMinV(), - fluidIcon.getMinU(), - fluidIcon.getMaxV(), - fluidIcon.getIconWidth(), - fluidIcon.getIconHeight(), - 0.0625F); + Tessellator.instance, + fluidIcon.getMaxU(), + fluidIcon.getMinV(), + fluidIcon.getMinU(), + fluidIcon.getMaxV(), + fluidIcon.getIconWidth(), + fluidIcon.getIconHeight(), + 0.0625F); } GL11.glDepthFunc(GL11.GL_LEQUAL); } @@ -147,14 +147,14 @@ public class GT_GeneratedMaterial_Renderer implements IItemRenderer { GT_RenderUtil.renderItemIcon(overlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { ItemRenderer.renderItemIn2D( - Tessellator.instance, - overlay.getMaxU(), - overlay.getMinV(), - overlay.getMinU(), - overlay.getMaxV(), - overlay.getIconWidth(), - overlay.getIconHeight(), - 0.0625F); + Tessellator.instance, + overlay.getMaxU(), + overlay.getMinV(), + overlay.getMinU(), + overlay.getMaxV(), + overlay.getIconWidth(), + overlay.getIconHeight(), + 0.0625F); } } diff --git a/src/main/java/gregtech/common/render/items/GT_MetaGenerated_Item_Renderer.java b/src/main/java/gregtech/common/render/items/GT_MetaGenerated_Item_Renderer.java index 8dac142cb1..78f8401abb 100644 --- a/src/main/java/gregtech/common/render/items/GT_MetaGenerated_Item_Renderer.java +++ b/src/main/java/gregtech/common/render/items/GT_MetaGenerated_Item_Renderer.java @@ -28,8 +28,8 @@ public class GT_MetaGenerated_Item_Renderer implements IItemRenderer { @Override public boolean handleRenderType(ItemStack aStack, ItemRenderType aType) { if ((GT_Utility.isStackInvalid(aStack)) || (aStack.getItemDamage() < 0) - || !(aStack.getItem() instanceof IGT_ItemWithMaterialRenderer) - || !((IGT_ItemWithMaterialRenderer) aStack.getItem()).shouldUseCustomRenderer(aStack.getItemDamage())) { + || !(aStack.getItem() instanceof IGT_ItemWithMaterialRenderer) + || !((IGT_ItemWithMaterialRenderer) aStack.getItem()).shouldUseCustomRenderer(aStack.getItemDamage())) { return false; } return getRendererForItemStack(aStack).handleRenderType(aStack, aType); diff --git a/src/main/java/gregtech/common/render/items/GaiaSpiritRenderer.java b/src/main/java/gregtech/common/render/items/GaiaSpiritRenderer.java index 5f226f6c98..97f5096948 100644 --- a/src/main/java/gregtech/common/render/items/GaiaSpiritRenderer.java +++ b/src/main/java/gregtech/common/render/items/GaiaSpiritRenderer.java @@ -28,14 +28,14 @@ public class GaiaSpiritRenderer extends GT_GeneratedMaterial_Renderer { GT_RenderUtil.renderItemIcon(icon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { ItemRenderer.renderItemIn2D( - Tessellator.instance, - icon.getMaxU(), - icon.getMinV(), - icon.getMinU(), - icon.getMaxV(), - icon.getIconWidth(), - icon.getIconHeight(), - 0.0625F); + Tessellator.instance, + icon.getMaxU(), + icon.getMinV(), + icon.getMinU(), + icon.getMaxV(), + icon.getIconWidth(), + icon.getIconHeight(), + 0.0625F); } } } diff --git a/src/main/java/gregtech/common/render/items/InfinityRenderer.java b/src/main/java/gregtech/common/render/items/InfinityRenderer.java index 3187ab8bcb..9e8b60ad5a 100644 --- a/src/main/java/gregtech/common/render/items/InfinityRenderer.java +++ b/src/main/java/gregtech/common/render/items/InfinityRenderer.java @@ -61,7 +61,7 @@ public class InfinityRenderer extends GT_GeneratedMaterial_Renderer { if (tOverlay != null && aFluid != null && aFluid.getFluid() != null) { IIcon fluidIcon = aFluid.getFluid() - .getIcon(aFluid); + .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/TranscendentMetalRenderer.java b/src/main/java/gregtech/common/render/items/TranscendentMetalRenderer.java index 866c426e59..d9149f3ec9 100644 --- a/src/main/java/gregtech/common/render/items/TranscendentMetalRenderer.java +++ b/src/main/java/gregtech/common/render/items/TranscendentMetalRenderer.java @@ -21,19 +21,19 @@ public class TranscendentMetalRenderer extends GT_GeneratedMaterial_Renderer { // frameIndex should not have 3 or more frames with same value (unless it's meant to be still) // otherwise the primitive linear interpolation will render the animation in a pretty sluggish way private final int[] frameIndex = new int[] { 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 7, 8, 9, 10, 12, 13, 14, 16, 17, 19, 21, - 22, 24, 25, 27, 29, 30, 32, 33, 35, 36, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 50, 49, 48, 47, 46, - 45, 44, 43, 42, 40, 39, 38, 36, 35, 33, 32, 30, 29, 27, 25, 24, 22, 21, 19, 17, 16, 14, 13, 12, 10, 9, 8, 7, - 5, 4, 3, 2, 1, 1, 0, 0, 0, 0 }; + 22, 24, 25, 27, 29, 30, 32, 33, 35, 36, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 50, 49, 48, 47, 46, 45, + 44, 43, 42, 40, 39, 38, 36, 35, 33, 32, 30, 29, 27, 25, 24, 22, 21, 19, 17, 16, 14, 13, 12, 10, 9, 8, 7, 5, 4, + 3, 2, 1, 1, 0, 0, 0, 0 }; private final float[] frameRotation = new float[] { 0, 7, 14, 21, 28, 36, 43, 50, 57, 64, 72, 79, 86, 93, 100, 108, - 115, 122, 129, 136, 144, 151, 158, 165, 172, 180, 187, 194, 201, 208, 216, 223, 230, 237, 244, 252, 259, - 266, 273, 280, 288, 295, 302, 309, 316, 324, 331, 338, 345, 352, 360 }; + 115, 122, 129, 136, 144, 151, 158, 165, 172, 180, 187, 194, 201, 208, 216, 223, 230, 237, 244, 252, 259, 266, + 273, 280, 288, 295, 302, 309, 316, 324, 331, 338, 345, 352, 360 }; private final float[] frameAlpha = new float[] { 100 / 255f, 106 / 255f, 112 / 255f, 118 / 255f, 124 / 255f, - 131 / 255f, 137 / 255f, 143 / 255f, 149 / 255f, 155 / 255f, 162 / 255f, 168 / 255f, 174 / 255f, 180 / 255f, - 186 / 255f, 193 / 255f, 199 / 255f, 205 / 255f, 211 / 255f, 217 / 255f, 224 / 255f, 230 / 255f, 236 / 255f, - 242 / 255f, 248 / 255f, 255 / 255f, 248 / 255f, 242 / 255f, 236 / 255f, 230 / 255f, 224 / 255f, 217 / 255f, - 211 / 255f, 205 / 255f, 199 / 255f, 193 / 255f, 186 / 255f, 180 / 255f, 174 / 255f, 168 / 255f, 162 / 255f, - 155 / 255f, 149 / 255f, 143 / 255f, 137 / 255f, 131 / 255f, 124 / 255f, 118 / 255f, 112 / 255f, 106 / 255f, - 100 / 255f }; + 131 / 255f, 137 / 255f, 143 / 255f, 149 / 255f, 155 / 255f, 162 / 255f, 168 / 255f, 174 / 255f, 180 / 255f, + 186 / 255f, 193 / 255f, 199 / 255f, 205 / 255f, 211 / 255f, 217 / 255f, 224 / 255f, 230 / 255f, 236 / 255f, + 242 / 255f, 248 / 255f, 255 / 255f, 248 / 255f, 242 / 255f, 236 / 255f, 230 / 255f, 224 / 255f, 217 / 255f, + 211 / 255f, 205 / 255f, 199 / 255f, 193 / 255f, 186 / 255f, 180 / 255f, 174 / 255f, 168 / 255f, 162 / 255f, + 155 / 255f, 149 / 255f, 143 / 255f, 137 / 255f, 131 / 255f, 124 / 255f, 118 / 255f, 112 / 255f, 106 / 255f, + 100 / 255f }; private static float linearInterpolation(float[] controlPoints, int frameA, int frameB, float partial) { float a = controlPoints[frameA], b = controlPoints[frameB]; @@ -61,14 +61,14 @@ public class TranscendentMetalRenderer extends GT_GeneratedMaterial_Renderer { GT_RenderUtil.renderItemIcon(fluidIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } else { ItemRenderer.renderItemIn2D( - Tessellator.instance, - fluidIcon.getMaxU(), - fluidIcon.getMinV(), - fluidIcon.getMinU(), - fluidIcon.getMaxV(), - fluidIcon.getIconWidth(), - fluidIcon.getIconHeight(), - 0.0625F); + Tessellator.instance, + fluidIcon.getMaxU(), + fluidIcon.getMinV(), + fluidIcon.getMinU(), + fluidIcon.getMaxV(), + fluidIcon.getIconWidth(), + fluidIcon.getIconHeight(), + 0.0625F); } GL11.glDepthFunc(GL11.GL_LEQUAL); GL11.glPopMatrix(); @@ -102,10 +102,10 @@ public class TranscendentMetalRenderer extends GT_GeneratedMaterial_Renderer { if (shouldModulateColor) { GL11.glColor4f( - modulation[0] / 255.0F, - modulation[1] / 255.0F, - modulation[2] / 255.0F, - linearInterpolation(frameAlpha, frameCurrent, frameNext, partialTicks)); + modulation[0] / 255.0F, + modulation[1] / 255.0F, + modulation[2] / 255.0F, + linearInterpolation(frameAlpha, frameCurrent, frameNext, partialTicks)); } else { GL11.glColor4f(1f, 1f, 1f, linearInterpolation(frameAlpha, frameCurrent, frameNext, partialTicks)); } diff --git a/src/main/java/gregtech/common/render/items/UniversiumRenderer.java b/src/main/java/gregtech/common/render/items/UniversiumRenderer.java index 8f75bfb03e..b0d09348db 100644 --- a/src/main/java/gregtech/common/render/items/UniversiumRenderer.java +++ b/src/main/java/gregtech/common/render/items/UniversiumRenderer.java @@ -33,12 +33,12 @@ public class UniversiumRenderer extends GT_GeneratedMaterial_Renderer { @Override public boolean renderFluidDisplayItem(ItemRenderType type, ItemStack aStack, Object... data) { magicRenderMethod( - type, - ItemList.Emitter_UEV.get(1), // hack to make it render correctly - aStack.getItem() - .getIconFromDamage(aStack.getItemDamage()), - true, - data); + type, + ItemList.Emitter_UEV.get(1), // hack to make it render correctly + aStack.getItem() + .getIconFromDamage(aStack.getItemDamage()), + true, + data); return true; } @@ -79,7 +79,7 @@ public class UniversiumRenderer extends GT_GeneratedMaterial_Renderer { } private void magicRenderMethod(ItemRenderType type, ItemStack aStack, IIcon tIcon, boolean fluidDisplay, - Object... data) { + Object... data) { if (!GregTech_API.mEternalSingularity) return; RenderItem r = RenderItem.getInstance(); @@ -111,9 +111,9 @@ public class UniversiumRenderer extends GT_GeneratedMaterial_Renderer { if (fluidDisplay) { // this somehow makes shader render correctly ResourceLocation resourcelocation = mc.getTextureManager() - .getResourceLocation(aStack.getItemSpriteNumber()); + .getResourceLocation(aStack.getItemSpriteNumber()); mc.getTextureManager() - .bindTexture(resourcelocation); + .bindTexture(resourcelocation); } else { r.renderItemIntoGUI(mc.fontRenderer, mc.getTextureManager(), aStack, 0, 0, true); } @@ -181,15 +181,8 @@ 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); @@ -203,14 +196,14 @@ public class UniversiumRenderer extends GT_GeneratedMaterial_Renderer { // RENDER COSMIC OVERLAY IN HAND ItemRenderer.renderItemIn2D( - Tessellator.instance, - maxu, - minv, - minu, - maxv, - icon.getIconWidth(), - icon.getIconHeight(), - scale); + Tessellator.instance, + maxu, + minv, + minu, + maxv, + icon.getIconWidth(), + icon.getIconHeight(), + scale); CosmicRenderStuffs.releaseShader(); GL11.glDepthFunc(GL11.GL_LEQUAL); GL11.glEnable(GL11.GL_ALPHA_TEST); @@ -227,20 +220,20 @@ public class UniversiumRenderer extends GT_GeneratedMaterial_Renderer { EntityItem ent = (EntityItem) (data[1]); if (ent != null) { CosmicRenderStuffs.setLightFromLocation( - ent.worldObj, - MathHelper.floor_double(ent.posX), - MathHelper.floor_double(ent.posY), - MathHelper.floor_double(ent.posZ)); + ent.worldObj, + MathHelper.floor_double(ent.posX), + MathHelper.floor_double(ent.posY), + MathHelper.floor_double(ent.posZ)); } } case EQUIPPED, EQUIPPED_FIRST_PERSON -> { EntityLivingBase ent = (EntityLivingBase) (data[1]); if (ent != null) { CosmicRenderStuffs.setLightFromLocation( - ent.worldObj, - MathHelper.floor_double(ent.posX), - MathHelper.floor_double(ent.posY), - MathHelper.floor_double(ent.posZ)); + ent.worldObj, + MathHelper.floor_double(ent.posX), + MathHelper.floor_double(ent.posY), + MathHelper.floor_double(ent.posZ)); } } case INVENTORY -> { 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 f1641bda0b..1711529de2 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 @@ -22,53 +22,53 @@ public class GT_MetaTileEntity_ChestBuffer extends GT_MetaTileEntity_Buffer impl public GT_MetaTileEntity_ChestBuffer(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 28, - new String[] { "Buffers up to 27 Item Stacks", "Use Screwdriver to regulate output stack size", - "Does not consume energy to move Item", getTickRateDesc(aTier) }); + aID, + aName, + aNameRegional, + aTier, + 28, + new String[] { "Buffers up to 27 Item Stacks", "Use Screwdriver to regulate output stack size", + "Does not consume energy to move Item", getTickRateDesc(aTier) }); } public GT_MetaTileEntity_ChestBuffer(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, - String aDescription) { + String aDescription) { super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription); } public GT_MetaTileEntity_ChestBuffer(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, - String[] aDescription) { + String[] aDescription) { super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription); } public GT_MetaTileEntity_ChestBuffer(String aName, int aTier, int aInvSlotCount, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } public GT_MetaTileEntity_ChestBuffer(String aName, int aTier, int aInvSlotCount, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_ChestBuffer( - this.mName, - this.mTier, - this.mInventory.length, - this.mDescriptionArray, - this.mTextures); + this.mName, + this.mTier, + this.mInventory.length, + this.mDescriptionArray, + this.mTextures); } @Override public ITexture getOverlayIcon() { return TextureFactory.of( - TextureFactory.of(AUTOMATION_CHESTBUFFER), - TextureFactory.builder() - .addIcon(AUTOMATION_CHESTBUFFER_GLOW) - .glow() - .build()); + TextureFactory.of(AUTOMATION_CHESTBUFFER), + TextureFactory.builder() + .addIcon(AUTOMATION_CHESTBUFFER_GLOW) + .glow() + .build()); } @Override @@ -125,9 +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 6fc2b45289..c6c73cb02f 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 @@ -28,43 +28,43 @@ public class GT_MetaTileEntity_Filter extends GT_MetaTileEntity_Buffer implement public GT_MetaTileEntity_Filter(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 19, - new String[] { "Filters up to 9 different Items", "Use Screwdriver to regulate output stack size", - "Does not consume energy to move Item" }); + aID, + aName, + aNameRegional, + aTier, + 19, + new String[] { "Filters up to 9 different Items", "Use Screwdriver to regulate output stack size", + "Does not consume energy to move Item" }); } public GT_MetaTileEntity_Filter(String aName, int aTier, int aInvSlotCount, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } public GT_MetaTileEntity_Filter(String aName, int aTier, int aInvSlotCount, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Filter( - this.mName, - this.mTier, - this.mInventory.length, - this.mDescriptionArray, - this.mTextures); + this.mName, + this.mTier, + this.mInventory.length, + this.mDescriptionArray, + this.mTextures); } @Override public ITexture getOverlayIcon() { return TextureFactory.of( - TextureFactory.of(AUTOMATION_FILTER), - TextureFactory.builder() - .addIcon(AUTOMATION_FILTER_GLOW) - .glow() - .build()); + TextureFactory.of(AUTOMATION_FILTER), + TextureFactory.builder() + .addIcon(AUTOMATION_FILTER_GLOW) + .glow() + .build()); } @Override @@ -123,69 +123,67 @@ public class GT_MetaTileEntity_Filter extends GT_MetaTileEntity_Buffer implement bInvertFilter = !bInvertFilter; if (bInvertFilter) { GT_Utility.sendChatToPlayer( - widget.getContext() - .getPlayer(), - GT_Utility.trans("124", "Invert Filter")); + widget.getContext() + .getPlayer(), + GT_Utility.trans("124", "Invert Filter")); } else { GT_Utility.sendChatToPlayer( - widget.getContext() - .getPlayer(), - GT_Utility.trans("125", "Don't invert Filter")); + 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) - .applyForWidget( - widget -> widget.disableShiftInsert() - .setBackground(GT_UITextures.TRANSPARENT)) - .build() - .setPos(16, 4)) - .widget( - SlotGroup.ofItemHandler(inventoryHandler, 3) - .startFromSlot(0) - .endAtSlot(8) - .build() - .setPos(97, 4)); + .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() + .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 97bf8190b0..7b2978d701 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 @@ -29,49 +29,48 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer public GT_MetaTileEntity_ItemDistributor(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 28, - new String[] { "Distributes Items between different Machine Sides", "Default Items per Machine Side: 0", - "Use Screwdriver to increase/decrease Items per Side", - "Does not consume energy to move Item" }); + aID, + aName, + aNameRegional, + aTier, + 28, + new String[] { "Distributes Items between different Machine Sides", "Default Items per Machine Side: 0", + "Use Screwdriver to increase/decrease Items per Side", "Does not consume energy to move Item" }); } public GT_MetaTileEntity_ItemDistributor(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, - String aDescription) { + String aDescription) { super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription); } public GT_MetaTileEntity_ItemDistributor(String aName, int aTier, int aInvSlotCount, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } public GT_MetaTileEntity_ItemDistributor(String aName, int aTier, int aInvSlotCount, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_ItemDistributor( - this.mName, - this.mTier, - this.mInventory.length, - this.mDescriptionArray, - this.mTextures); + this.mName, + this.mTier, + this.mInventory.length, + this.mDescriptionArray, + this.mTextures); } @Override public ITexture getOverlayIcon() { return TextureFactory.of( - TextureFactory.of(AUTOMATION_ITEMDISTRIBUTOR), - TextureFactory.builder() - .addIcon(AUTOMATION_ITEMDISTRIBUTOR_GLOW) - .glow() - .build()); + TextureFactory.of(AUTOMATION_ITEMDISTRIBUTOR), + TextureFactory.builder() + .addIcon(AUTOMATION_ITEMDISTRIBUTOR_GLOW) + .glow() + .build()); } @Override @@ -81,7 +80,7 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + boolean aActive, boolean aRedstone) { if (aSide == aFacing) { return mTextures[0][aColorIndex + 1]; } else { @@ -142,16 +141,16 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer } } movedItems = GT_Utility.moveOneItemStack( - aBaseMetaTileEntity, - adjacentTileEntity, - currentSide, - GT_Utility.getOppositeSide(currentSide), - null, - false, - (byte) 64, - (byte) 1, - (byte) (itemsPerSide[currentSide] - currentSideItemCount), - (byte) 1); + aBaseMetaTileEntity, + adjacentTileEntity, + currentSide, + GT_Utility.getOppositeSide(currentSide), + null, + false, + (byte) 64, + (byte) 1, + (byte) (itemsPerSide[currentSide] - currentSideItemCount), + (byte) 1); currentSideItemCount += movedItems; if (currentSideItemCount >= itemsPerSide[currentSide]) { currentSide = (byte) ((currentSide + 1) % 6); @@ -191,9 +190,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 60500310e0..f8e54f9edf 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 @@ -26,21 +26,21 @@ public class GT_MetaTileEntity_RecipeFilter extends GT_MetaTileEntity_SpecialFil public GT_MetaTileEntity_RecipeFilter(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - new String[] { "Filters 1 Recipe Type", "Use Screwdriver to regulate output stack size", - "Does not consume energy to move Item" }); + aID, + aName, + aNameRegional, + aTier, + new String[] { "Filters 1 Recipe Type", "Use Screwdriver to regulate output stack size", + "Does not consume energy to move Item" }); } public GT_MetaTileEntity_RecipeFilter(String aName, int aTier, int aInvSlotCount, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } public GT_MetaTileEntity_RecipeFilter(String aName, int aTier, int aInvSlotCount, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @@ -64,21 +64,21 @@ public class GT_MetaTileEntity_RecipeFilter extends GT_MetaTileEntity_SpecialFil @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_RecipeFilter( - this.mName, - this.mTier, - this.mInventory.length, - this.mDescriptionArray, - this.mTextures); + this.mName, + this.mTier, + this.mInventory.length, + this.mDescriptionArray, + this.mTextures); } @Override public ITexture getOverlayIcon() { return TextureFactory.of( - TextureFactory.of(AUTOMATION_RECIPEFILTER), - TextureFactory.builder() - .addIcon(AUTOMATION_RECIPEFILTER_GLOW) - .glow() - .build()); + TextureFactory.of(AUTOMATION_RECIPEFILTER), + 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 e743dd47e4..9b0824aed1 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 @@ -33,43 +33,43 @@ public class GT_MetaTileEntity_Regulator extends GT_MetaTileEntity_Buffer implem public GT_MetaTileEntity_Regulator(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 20, - new String[] { "Filters up to 9 different Items", "Allows Item-specific output stack size", - "Allows Item-specific output slot", "Does not consume energy to move Item" }); + aID, + aName, + aNameRegional, + aTier, + 20, + new String[] { "Filters up to 9 different Items", "Allows Item-specific output stack size", + "Allows Item-specific output slot", "Does not consume energy to move Item" }); } public GT_MetaTileEntity_Regulator(String aName, int aTier, int aInvSlotCount, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } public GT_MetaTileEntity_Regulator(String aName, int aTier, int aInvSlotCount, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Regulator( - this.mName, - this.mTier, - this.mInventory.length, - this.mDescriptionArray, - this.mTextures); + this.mName, + this.mTier, + this.mInventory.length, + this.mDescriptionArray, + this.mTextures); } @Override public ITexture getOverlayIcon() { return TextureFactory.of( - TextureFactory.of(AUTOMATION_REGULATOR), - TextureFactory.builder() - .addIcon(AUTOMATION_REGULATOR_GLOW) - .glow() - .build()); + TextureFactory.of(AUTOMATION_REGULATOR), + TextureFactory.builder() + .addIcon(AUTOMATION_REGULATOR_GLOW) + .glow() + .build()); } @Override @@ -115,16 +115,16 @@ public class GT_MetaTileEntity_Regulator extends GT_MetaTileEntity_Buffer implem for (int i = 0, tCosts; i < 9; i++) { if (this.mInventory[(i + 9)] != null) { tCosts = GT_Utility.moveOneItemStackIntoSlot( - getBaseMetaTileEntity(), - getBaseMetaTileEntity().getTileEntityAtSide(getBaseMetaTileEntity().getBackFacing()), - getBaseMetaTileEntity().getBackFacing(), - this.mTargetSlots[i], - Collections.singletonList(this.mInventory[(i + 9)]), - false, - (byte) this.mInventory[(i + 9)].stackSize, - (byte) this.mInventory[(i + 9)].stackSize, - (byte) 64, - (byte) 1) * 3; + getBaseMetaTileEntity(), + getBaseMetaTileEntity().getTileEntityAtSide(getBaseMetaTileEntity().getBackFacing()), + getBaseMetaTileEntity().getBackFacing(), + this.mTargetSlots[i], + Collections.singletonList(this.mInventory[(i + 9)]), + false, + (byte) this.mInventory[(i + 9)].stackSize, + (byte) this.mInventory[(i + 9)].stackSize, + (byte) 64, + (byte) 1) * 3; if (tCosts > 0) { this.mSuccess = 50; break; @@ -136,8 +136,8 @@ public class GT_MetaTileEntity_Regulator extends GT_MetaTileEntity_Buffer implem @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack) && aIndex >= 0 - && aIndex <= 8 - && GT_Utility.areStacksEqual(aStack, this.mInventory[(aIndex + 9)]); + && aIndex <= 8 + && GT_Utility.areStacksEqual(aStack, this.mInventory[(aIndex + 9)]); } @Override @@ -174,33 +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) - .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)); + 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)); int xBase = 117, yBase = 5; for (int i = 0; i < mTargetSlots.length; i++) { @@ -211,18 +211,17 @@ public class GT_MetaTileEntity_Regulator extends GT_MetaTileEntity_Buffer implem @Override protected void phantomClick(ClickData clickData, ItemStack cursorStack) { mTargetSlots[index] = Math.min( - 99, - Math.max( - 0, - mTargetSlots[index] - + (clickData.mouseButton == 0 ? -1 : 1) * (clickData.shift ? 16 : 1))); + 99, + Math.max( + 0, + 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))); + .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 1b913af896..4687b62fa1 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 @@ -24,43 +24,43 @@ public class GT_MetaTileEntity_SuperBuffer extends GT_MetaTileEntity_ChestBuffer public GT_MetaTileEntity_SuperBuffer(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 257, - new String[] { "Buffers up to 256 Item Stacks", "Use Screwdriver to regulate output stack size", - "Does not consume energy to move Item", getTickRateDesc(aTier) }); + aID, + aName, + aNameRegional, + aTier, + 257, + new String[] { "Buffers up to 256 Item Stacks", "Use Screwdriver to regulate output stack size", + "Does not consume energy to move Item", getTickRateDesc(aTier) }); } public GT_MetaTileEntity_SuperBuffer(String aName, int aTier, int aInvSlotCount, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } public GT_MetaTileEntity_SuperBuffer(String aName, int aTier, int aInvSlotCount, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_SuperBuffer( - this.mName, - this.mTier, - this.mInventory.length, - this.mDescriptionArray, - this.mTextures); + this.mName, + this.mTier, + this.mInventory.length, + this.mDescriptionArray, + this.mTextures); } @Override public ITexture getOverlayIcon() { return TextureFactory.of( - TextureFactory.of(AUTOMATION_SUPERBUFFER), - TextureFactory.builder() - .addIcon(AUTOMATION_SUPERBUFFER_GLOW) - .glow() - .build()); + TextureFactory.of(AUTOMATION_SUPERBUFFER), + TextureFactory.builder() + .addIcon(AUTOMATION_SUPERBUFFER_GLOW) + .glow() + .build()); } @Override @@ -86,7 +86,7 @@ public class GT_MetaTileEntity_SuperBuffer extends GT_MetaTileEntity_ChestBuffer do { int slot = validSlots.get(i); mInventory[slot] = stacks.get(entry.getKey()) - .copy(); + .copy(); int toSet = Math.min(entry.getValue(), mInventory[slot].getMaxStackSize()); mInventory[slot].stackSize = toSet; entry.setValue(entry.getValue() - toSet); @@ -98,8 +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 609342ed82..ee79766e30 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 @@ -30,58 +30,58 @@ public class GT_MetaTileEntity_TypeFilter extends GT_MetaTileEntity_SpecialFilte public OrePrefixes mPrefix = OrePrefixes.ore; public static ImmutableList OREBLOCK_PREFIXES = ImmutableList.of( - OrePrefixes.oreBlackgranite, - OrePrefixes.oreDense, - OrePrefixes.oreEnd, - OrePrefixes.oreEndstone, - OrePrefixes.oreNether, - OrePrefixes.oreNetherrack, - OrePrefixes.oreNormal, - OrePrefixes.orePoor, - OrePrefixes.oreRedgranite, - OrePrefixes.oreRich, - OrePrefixes.oreSmall, - OrePrefixes.oreBasalt, - OrePrefixes.oreMarble); + OrePrefixes.oreBlackgranite, + OrePrefixes.oreDense, + OrePrefixes.oreEnd, + OrePrefixes.oreEndstone, + OrePrefixes.oreNether, + OrePrefixes.oreNetherrack, + OrePrefixes.oreNormal, + OrePrefixes.orePoor, + OrePrefixes.oreRedgranite, + OrePrefixes.oreRich, + OrePrefixes.oreSmall, + OrePrefixes.oreBasalt, + OrePrefixes.oreMarble); public GT_MetaTileEntity_TypeFilter(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - new String[] { "Filters 1 Item Type", "Use Screwdriver to regulate output stack size", - "Does not consume energy to move Item" }); + aID, + aName, + aNameRegional, + aTier, + new String[] { "Filters 1 Item Type", "Use Screwdriver to regulate output stack size", + "Does not consume energy to move Item" }); } public GT_MetaTileEntity_TypeFilter(String aName, int aTier, int aInvSlotCount, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } public GT_MetaTileEntity_TypeFilter(String aName, int aTier, int aInvSlotCount, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_TypeFilter( - this.mName, - this.mTier, - this.mInventory.length, - this.mDescriptionArray, - this.mTextures); + this.mName, + this.mTier, + this.mInventory.length, + this.mDescriptionArray, + this.mTextures); } @Override public ITexture getOverlayIcon() { return TextureFactory.of( - TextureFactory.of(AUTOMATION_TYPEFILTER), - TextureFactory.builder() - .addIcon(AUTOMATION_TYPEFILTER_GLOW) - .glow() - .build()); + TextureFactory.of(AUTOMATION_TYPEFILTER), + TextureFactory.builder() + .addIcon(AUTOMATION_TYPEFILTER_GLOW) + .glow() + .build()); } @Override @@ -112,7 +112,7 @@ public class GT_MetaTileEntity_TypeFilter extends GT_MetaTileEntity_SpecialFilte } while (OrePrefixes.values()[i].mPrefixedItems.isEmpty()); } if (!OrePrefixes.values()[i].mPrefixedItems.isEmpty() - && OrePrefixes.values()[i].mPrefixInto == OrePrefixes.values()[i]) + && OrePrefixes.values()[i].mPrefixInto == OrePrefixes.values()[i]) mPrefix = OrePrefixes.values()[i]; } } @@ -130,9 +130,9 @@ public class GT_MetaTileEntity_TypeFilter extends GT_MetaTileEntity_SpecialFilte return; } this.mInventory[SPECIAL_SLOT_INDEX] = GT_Utility.copyAmount( - 1L, - this.mPrefix.mPrefixedItems.get( - this.mRotationIndex = (this.mRotationIndex + 1) % this.mPrefix.mPrefixedItems.size())); + 1L, + 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()); @@ -164,9 +164,9 @@ public class GT_MetaTileEntity_TypeFilter extends GT_MetaTileEntity_SpecialFilte @Override protected List getItemExtraTooltip() { return Arrays.asList( - EnumChatFormatting.DARK_GRAY - + StatCollector.translateToLocal("GT5U.type_filter.representation_slot.tooltip.0"), - EnumChatFormatting.DARK_GRAY - + StatCollector.translateToLocal("GT5U.type_filter.representation_slot.tooltip.1")); + EnumChatFormatting.DARK_GRAY + + StatCollector.translateToLocal("GT5U.type_filter.representation_slot.tooltip.0"), + EnumChatFormatting.DARK_GRAY + + StatCollector.translateToLocal("GT5U.type_filter.representation_slot.tooltip.1")); } } 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 ed22d41f70..fbcc8f62ce 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 @@ -41,7 +41,7 @@ import gregtech.api.util.WorldSpawnedEventBuilder.ParticleEventBuilder; import gregtech.common.GT_Pollution; public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTank - implements IGetTitleColor, IAddUIWidgets { + implements IGetTitleColor, IAddUIWidgets { public static final byte SOUND_EVENT_LET_OFF_EXCESS_STEAM = 1; public int mTemperature = 20; @@ -52,12 +52,12 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa private int mExcessWater = 0; public GT_MetaTileEntity_Boiler(int aID, String aName, String aNameRegional, String aDescription, - ITexture... aTextures) { + ITexture... aTextures) { super(aID, aName, aNameRegional, 0, 4, aDescription, aTextures); } public GT_MetaTileEntity_Boiler(int aID, String aName, String aNameRegional, String[] aDescription, - ITexture... aTextures) { + ITexture... aTextures) { super(aID, aName, aNameRegional, 0, 4, aDescription, aTextures); } @@ -71,9 +71,9 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + boolean aActive, boolean aRedstone) { ITexture[] tmp = mTextures[aSide >= 2 ? aSide != aFacing ? 2 : ((byte) (aActive ? 4 : 3)) : aSide][aColorIndex - + 1]; + + 1]; if (aSide != aFacing && tmp.length == 2) { tmp = new ITexture[] { tmp[0] }; } @@ -136,7 +136,7 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa if (!aPlayer.capabilities.isCreativeMode) { aPlayer.getCurrentEquippedItem() - .func_150996_a(Items.bucket); + .func_150996_a(Items.bucket); } } else { GT_UIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer); @@ -199,7 +199,7 @@ 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(); + .isSimpleCover(); } @Override @@ -275,7 +275,7 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa private void calculateHeatUp(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if ((this.mTemperature < getMaxTemperature()) && (this.mProcessingEnergy > 0) - && (aTick % getHeatUpRate() == 0L)) { + && (aTick % getHeatUpRate() == 0L)) { this.mProcessingEnergy -= getEnergyConsumption(); this.mTemperature += getHeatUpAmount(); } @@ -330,22 +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); + ForgeDirection.getOrientation(aSide) + .getOpposite(), + tDrained, + false); if (tFilledAmount <= 0) return; tTileEntity.fill( - ForgeDirection.getOrientation(aSide) - .getOpposite(), - aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(aSide), tFilledAmount, true), - true); + ForgeDirection.getOrientation(aSide) + .getOpposite(), + aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(aSide), tFilledAmount, true), + true); } /** @@ -388,15 +386,12 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa GT_Utility.doSoundAtClient(SoundResource.RANDOM_FIZZ, 2, 1.0F, aX, aY, aZ); new ParticleEventBuilder().setIdentifier(ParticleFX.CLOUD) - .setWorld(getBaseMetaTileEntity().getWorld()) - .setMotion(0D, 0D, 0D) - .times( - 8, - x -> x.setPosition( - aX - 0.5D + XSTR_INSTANCE.nextFloat(), - aY, - aZ - 0.5D + XSTR_INSTANCE.nextFloat()) - .run()); + .setWorld(getBaseMetaTileEntity().getWorld()) + .setMotion(0D, 0D, 0D) + .times( + 8, + x -> x.setPosition(aX - 0.5D + XSTR_INSTANCE.nextFloat(), aY, aZ - 0.5D + XSTR_INSTANCE.nextFloat()) + .run()); } } @@ -437,12 +432,12 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa protected IDrawable[] getFuelSlotBackground() { return new IDrawable[] { getGUITextureSet().getItemSlot(), - GT_UITextures.OVERLAY_SLOT_COAL_STEAM.get(getSteamVariant()) }; + GT_UITextures.OVERLAY_SLOT_COAL_STEAM.get(getSteamVariant()) }; } protected IDrawable[] getAshSlotBackground() { return new IDrawable[] { getGUITextureSet().getItemSlot(), - GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(getSteamVariant()) }; + GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(getSteamVariant()) }; } @Override @@ -453,59 +448,54 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa @Override 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)); + 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)); } protected SlotWidget createFuelSlot() { return (SlotWidget) new SlotWidget(inventoryHandler, 2).setPos(115, 61) - .setBackground(getFuelSlotBackground()); + .setBackground(getFuelSlotBackground()); } protected SlotWidget createAshSlot() { return (SlotWidget) new SlotWidget(inventoryHandler, 3).setAccess(true, false) - .setPos(115, 25) - .setBackground(getAshSlotBackground()); + .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 0e617312df..d375d285d2 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 @@ -35,12 +35,11 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler { public GT_MetaTileEntity_Boiler_Bronze(int aID, String aName, String aNameRegional) { super( - aID, - aName, - aNameRegional, - new String[] { "An early way to get Steam Power", "Produces 120L of Steam per second", - "Causes " + GT_Mod.gregtechproxy.mPollutionSmallCoalBoilerPerSecond - + " Pollution per second" }); + aID, + aName, + aNameRegional, + new String[] { "An early way to get Steam Power", "Produces 120L of Steam per second", + "Causes " + GT_Mod.gregtechproxy.mPollutionSmallCoalBoilerPerSecond + " Pollution per second" }); } public GT_MetaTileEntity_Boiler_Bronze(int aID, String aName, String aNameRegional, String[] aDescription) { @@ -59,18 +58,18 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler { public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[5][17][]; final ITexture[] texBottom = { TextureFactory.of(MACHINE_BRONZEBRICKS_BOTTOM) }, - 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() }, - texFrontActive = { TextureFactory.of(MACHINE_BRONZEBRICKS_SIDE), TextureFactory.of(BOILER_FRONT_ACTIVE), - TextureFactory.builder() - .addIcon(BOILER_FRONT_ACTIVE_GLOW) - .glow() - .build() }; + 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() }, + texFrontActive = { TextureFactory.of(MACHINE_BRONZEBRICKS_SIDE), TextureFactory.of(BOILER_FRONT_ACTIVE), + TextureFactory.builder() + .addIcon(BOILER_FRONT_ACTIVE_GLOW) + .glow() + .build() }; for (int i = 0; i < 17; i++) { rTextures[0][i] = texBottom; rTextures[1][i] = texTop; @@ -104,7 +103,7 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler { final byte frontFacing = aBaseMetaTileEntity.getFrontFacing(); if (frontFacing > 1 && aBaseMetaTileEntity.getCoverIDAtSide(frontFacing) == 0 - && !aBaseMetaTileEntity.getOpacityAtSide(frontFacing)) { + && !aBaseMetaTileEntity.getOpacityAtSide(frontFacing)) { final double oX = aBaseMetaTileEntity.getOffsetX(frontFacing, 1) + 8D / 16D; final double oY = aBaseMetaTileEntity.getOffsetY(frontFacing, 1); @@ -132,13 +131,12 @@ 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()); + .setPosition(x, y, z) + .setWorld(getBaseMetaTileEntity().getWorld()); particleEventBuilder.setIdentifier(ParticleFX.SMOKE) - .run(); + .run(); particleEventBuilder.setIdentifier(ParticleFX.FLAME) - .run(); + .run(); } } } @@ -147,8 +145,8 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler { public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPostTick(aBaseMetaTileEntity, aTick); if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L) - && this.mProcessingEnergy > 0 - && (aTick % 20L == 0L)) { + && this.mProcessingEnergy > 0 + && (aTick % 20L == 0L)) { GT_Pollution.addPollution(getBaseMetaTileEntity(), getPollution()); } } @@ -182,142 +180,127 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler { protected void updateFuel(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (this.mInventory[2] == null) return; if ((GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Coal) + && !GT_Utility.isPartOfOrePrefix(this.mInventory[2], OrePrefixes.block)) + || (GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Charcoal) && !GT_Utility.isPartOfOrePrefix(this.mInventory[2], OrePrefixes.block)) - || (GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Charcoal) - && !GT_Utility.isPartOfOrePrefix(this.mInventory[2], OrePrefixes.block)) - || (GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Lignite) - && !GT_Utility.isPartOfOrePrefix(this.mInventory[2], OrePrefixes.block)) - || (GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Diamond) - && !GT_Utility.isPartOfOrePrefix(this.mInventory[2], OrePrefixes.block)) - || GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCoke") - || GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCactusCharcoal") - || GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCactusCoke") - || GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelSugarCharcoal") - || GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelSugarCoke")) { + || (GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Lignite) + && !GT_Utility.isPartOfOrePrefix(this.mInventory[2], OrePrefixes.block)) + || (GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Diamond) + && !GT_Utility.isPartOfOrePrefix(this.mInventory[2], OrePrefixes.block)) + || GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCoke") + || GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCactusCharcoal") + || GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCactusCoke") + || GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelSugarCharcoal") + || GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelSugarCoke")) { if ((TileEntityFurnace.getItemBurnTime(this.mInventory[2]) / 10) > 0) { this.mProcessingEnergy += (TileEntityFurnace.getItemBurnTime(this.mInventory[2]) / 10); aBaseMetaTileEntity.decrStackSize(2, 1); if (XSTR.XSTR_INSTANCE.nextInt( - GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Coal) - || GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Charcoal) ? 3 - : GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Lignite) ? 8 : 2) - == 0) { + GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Coal) + || GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Charcoal) ? 3 + : GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Lignite) ? 8 : 2) + == 0) { aBaseMetaTileEntity.addStackToSlot( - 3, - GT_OreDictUnificator.get( - OrePrefixes.dustTiny, - (GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Lignite) - || GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Coal)) - ? Materials.DarkAsh - : Materials.Ash, - 1L)); + 3, + GT_OreDictUnificator.get( + OrePrefixes.dustTiny, + (GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Lignite) + || GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Coal)) ? Materials.DarkAsh + : Materials.Ash, + 1L)); } } } 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 - ( - // 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"))))) { - // 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); - aBaseMetaTileEntity.decrStackSize(2, 1); - aBaseMetaTileEntity.addStackToSlot( - 3, - GT_OreDictUnificator.get( - OrePrefixes.dust, - (GT_Utility.isPartOfMaterials( - this.mInventory[2], - Materials.Lignite) - || GT_Utility.isPartOfMaterials( - this.mInventory[2], - Materials.Coal) - || Block.getBlockFromItem( - this.mInventory[2].getItem()) - .getUnlocalizedName() - .toLowerCase() - .contains("coal") - || Block.getBlockFromItem( - this.mInventory[2].getItem()) - .getUnlocalizedName() - .toLowerCase() - .contains("lignite")) - ? Materials.DarkAsh - : Materials.Ash, - 1L)); - } - // enables every other fuel with at least 2000 burntime as a fuel, - // i.e. peat, Magic/Solid Super Fuel, Coal - // Singularities, Nitor, while bucket of creosite should be blocked - // same goes for lava - } else + // 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 + ( + // 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"))))) { + // 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); + aBaseMetaTileEntity.decrStackSize(2, 1); + aBaseMetaTileEntity.addStackToSlot( + 3, + GT_OreDictUnificator.get( + OrePrefixes.dust, + (GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Lignite) + || GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Coal) + || Block.getBlockFromItem(this.mInventory[2].getItem()) + .getUnlocalizedName() + .toLowerCase() + .contains("coal") + || Block.getBlockFromItem(this.mInventory[2].getItem()) + .getUnlocalizedName() + .toLowerCase() + .contains("lignite")) ? Materials.DarkAsh : Materials.Ash, + 1L)); + } + // enables every other fuel with at least 2000 burntime as a fuel, + // i.e. peat, Magic/Solid Super Fuel, Coal + // Singularities, Nitor, while bucket of creosite should be blocked + // 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 0f03f6bee4..6ffcd37f28 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 @@ -66,17 +66,15 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler { public GT_MetaTileEntity_Boiler_Lava(int aID, String aName, String aNameRegional) { super( - aID, - aName, - aNameRegional, - new String[] { "A Boiler running off Lava", - "Produces " + PRODUCTION_PER_SECOND + "L of Steam per second", - "Causes " + GT_Mod.gregtechproxy.mPollutionHighPressureLavaBoilerPerSecond - + " Pollution per second", - "Consumes " + ((double) CONSUMPTION_PER_HEATUP / ENERGY_PER_LAVA) - + "L of Lava every " - + COOLDOWN_INTERVAL - + " ticks when fully heat up" }); + aID, + aName, + aNameRegional, + new String[] { "A Boiler running off Lava", "Produces " + PRODUCTION_PER_SECOND + "L of Steam per second", + "Causes " + GT_Mod.gregtechproxy.mPollutionHighPressureLavaBoilerPerSecond + " Pollution per second", + "Consumes " + ((double) CONSUMPTION_PER_HEATUP / ENERGY_PER_LAVA) + + "L of Lava every " + + COOLDOWN_INTERVAL + + " ticks when fully heat up" }); } public GT_MetaTileEntity_Boiler_Lava(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { @@ -89,7 +87,7 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler { @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + boolean aActive, boolean aRedstone) { final ForgeDirection sideDirection = ForgeDirection.getOrientation(aSide); final ForgeDirection facingDirection = ForgeDirection.getOrientation(aFacing); final ForgeDirection rearDirection = facingDirection.getOpposite(); @@ -118,18 +116,18 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler { short[] colorModulation = Dyes.getModulation(color, Dyes._NULL.mRGBa); rTextures[0][i] = new ITexture[] { TextureFactory.of(MACHINE_STEELBRICKS_BOTTOM, colorModulation) }; rTextures[1][i] = new ITexture[] { TextureFactory.of(MACHINE_STEELBRICKS_TOP, colorModulation), - TextureFactory.of(OVERLAY_DRAIN), TextureFactory.of(FLUID_IN_SIGN) }; + TextureFactory.of(OVERLAY_DRAIN), TextureFactory.of(FLUID_IN_SIGN) }; rTextures[2][i] = new ITexture[] { TextureFactory.of(MACHINE_STEELBRICKS_SIDE, colorModulation), - TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(FLUID_IN_SIGN) }; + TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(FLUID_IN_SIGN) }; rTextures[3][i] = new ITexture[] { TextureFactory.of(MACHINE_STEELBRICKS_SIDE, colorModulation), - TextureFactory.of(BOILER_LAVA_FRONT, colorModulation), TextureFactory.of(BOILER_LAVA_FRONT_GLOW) }; + 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) }; + TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(FLUID_OUT_SIGN) }; } return rTextures; } @@ -224,13 +222,13 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler { 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)); + .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); } @@ -246,9 +244,9 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler { public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); if (lavaTank.getFluid() != null) aNBT.setTag( - "mLava", - lavaTank.getFluid() - .writeToNBT(new NBTTagCompound())); + "mLava", + lavaTank.getFluid() + .writeToNBT(new NBTTagCompound())); aNBT.setInteger("mCooledLava", this.mCooledLava); } @@ -268,10 +266,10 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler { protected void pushSteamToInventories(IGregTechTileEntity aBaseMetaTileEntity) { if (mSteam == null || mSteam.amount == 0) return; pushSteamToSide( - aBaseMetaTileEntity, - ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()) - .getOpposite() - .ordinal()); + aBaseMetaTileEntity, + ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()) + .getOpposite() + .ordinal()); } /** @@ -284,14 +282,14 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler { if (upTank == null) return; // Simulates drain of maximum lava amount up to 1000L that can fit the internal tank final FluidStack drainableLavaStack = upTank.drain( - ForgeDirection.DOWN, - FluidRegistry.getFluidStack( - "lava", - Math.min( - this.lavaTank.getCapacity() - - (this.lavaTank.getFluid() != null ? this.lavaTank.getFluid().amount : 0), - 1000)), - false); + ForgeDirection.DOWN, + FluidRegistry.getFluidStack( + "lava", + Math.min( + this.lavaTank.getCapacity() + - (this.lavaTank.getFluid() != null ? this.lavaTank.getFluid().amount : 0), + 1000)), + false); if (!GT_ModHandler.isLava(drainableLavaStack) || drainableLavaStack.amount <= 0) return; // Performs actual drain up and fill internal tank this.lavaTank.fill(upTank.drain(ForgeDirection.DOWN, drainableLavaStack, true), true); @@ -327,7 +325,7 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler { final ForgeDirection frontDirection = ForgeDirection.getOrientation(frontFacing); if (frontFacing > 1 && aBaseMetaTileEntity.getCoverIDAtSide(frontFacing) == 0 - && !aBaseMetaTileEntity.getOpacityAtSide(frontFacing)) { + && !aBaseMetaTileEntity.getOpacityAtSide(frontFacing)) { final double oX = aBaseMetaTileEntity.getOffsetX(frontFacing, 1) + 8D / 16D; final double oY = aBaseMetaTileEntity.getOffsetY(frontFacing, 1); @@ -359,13 +357,12 @@ 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()); + .setPosition(x, y, z) + .setWorld(getBaseMetaTileEntity().getWorld()); particleEventBuilder.setIdentifier(ParticleFX.SMOKE) - .run(); + .run(); particleEventBuilder.setIdentifier(ParticleFX.FLAME) - .run(); + .run(); } } } @@ -381,11 +378,11 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler { final FluidStack containedFluidStack = GT_Utility.getFluidForFilledItem(mInventory[getInputSlot()], true); if (GT_ModHandler.isWater(containedFluidStack)) super.onPreTick(aBaseMetaTileEntity, aTick); if (GT_ModHandler.isLava(containedFluidStack) - && lavaTank.fill(containedFluidStack, false) == containedFluidStack.amount - && aBaseMetaTileEntity.addStackToSlot( - getOutputSlot(), - GT_Utility.getContainerForFilledItem(mInventory[getInputSlot()], true), - 1)) { + && lavaTank.fill(containedFluidStack, false) == containedFluidStack.amount + && aBaseMetaTileEntity.addStackToSlot( + getOutputSlot(), + GT_Utility.getContainerForFilledItem(mInventory[getInputSlot()], true), + 1)) { lavaTank.fill(containedFluidStack, true); aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); } @@ -412,28 +409,25 @@ 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, - 1.0F, - // Sound emitted from center of rear face (Steam Output) - aX + 0.5 * rearDirection.offsetX, - aY, - aZ + 0.5 * rearDirection.offsetZ); + SoundResource.RANDOM_FIZZ, + 2, + 1.0F, + // Sound emitted from center of rear face (Steam Output) + aX + 0.5 * rearDirection.offsetX, + 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) - .times( - 8, - // Particles emitted from center of rear face (Steam Output) - x -> x.setPosition( - aX + rearDirection.offsetX / 2D, - aY, - aZ + rearDirection.offsetZ / 2D) - .run()); + .setWorld(getBaseMetaTileEntity().getWorld()) + // Particles emitted with a 1 block/s velocity toward rear + .setMotion(rearDirection.offsetX / 20D, 0D, rearDirection.offsetZ / 20D) + .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 @@ -467,67 +461,59 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler { @Override public FluidTankInfo[] getTankInfo(ForgeDirection aSide) { return new FluidTankInfo[] { super.getTankInfo(aSide)[0], - new FluidTankInfo(this.lavaTank.getFluid(), this.lavaTank.getCapacity()), - new FluidTankInfo(getDrainableStack(), getCapacity()) }; + new FluidTankInfo(this.lavaTank.getFluid(), this.lavaTank.getCapacity()), + new FluidTankInfo(getDrainableStack(), getCapacity()) }; } @Override protected IDrawable[] getAshSlotBackground() { return new IDrawable[] { getGUITextureSet().getItemSlot(), - GT_UITextures.OVERLAY_SLOT_BLOCK_STEAM.get(getSteamVariant()) }; + GT_UITextures.OVERLAY_SLOT_BLOCK_STEAM.get(getSteamVariant()) }; } @Override 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)); + 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)); } 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 04fa676c16..38c0d6e9e2 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 @@ -37,10 +37,10 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { public static final String LPS_FMT = "%s L/s"; private static final String localizedDescFormat = GT_LanguageManager.addStringLocalization( - "gt.blockmachines.boiler.solar.desc.format", - "Steam Power by the Sun%n" + "Produces %sL of Steam per second%n" - + "Calcifies over time, reducing Steam output to %sL/s%n" - + "Break and replace to descale"); + "gt.blockmachines.boiler.solar.desc.format", + "Steam Power by the Sun%n" + "Produces %sL of Steam per second%n" + + "Calcifies over time, reducing Steam output to %sL/s%n" + + "Break and replace to descale"); protected final Config mConfig; protected int basicTemperatureMod = 5; // Base Celsius gain or loss private int mRunTimeTicks = 0; @@ -61,7 +61,7 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { } protected GT_MetaTileEntity_Boiler_Solar(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, - Config aConfig) { + Config aConfig) { super(aName, aTier, aDescription, aTextures); mConfig = aConfig; } @@ -97,11 +97,12 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { @Override public String[] getDescription() { - return String.format( + return String + .format( localizedDescFormat, GT_Utility.formatNumbers(getMaxOutputPerSecond()), GT_Utility.formatNumbers(getMinOutputPerSecond())) - .split("\\R"); + .split("\\R"); } public int getMinOutputPerSecond() { @@ -115,20 +116,20 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { int i = color + 1; short[] colorModulation = Dyes.getModulation(color, Dyes._NULL.mRGBa); rTextures[0][i] = new ITexture[] { - TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, colorModulation) }; + TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, colorModulation) }; rTextures[1][i] = new ITexture[] { TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_TOP, colorModulation), - TextureFactory.of(BlockIcons.BOILER_SOLAR) }; + TextureFactory.of(BlockIcons.BOILER_SOLAR) }; rTextures[2][i] = new ITexture[] { - TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_SIDE, colorModulation) }; + TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_SIDE, colorModulation) }; rTextures[3][i] = new ITexture[] { TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_SIDE, colorModulation), - TextureFactory.of(BlockIcons.OVERLAY_PIPE) }; + TextureFactory.of(BlockIcons.OVERLAY_PIPE) }; } return rTextures; } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + boolean aActive, boolean aRedstone) { int i = aColorIndex + 1; if (aSide >= 2) { if (aSide != aFacing) return mTextures[2][i]; @@ -189,8 +190,8 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { * maximum output per second, and return this or the minimum output per second */ return mConfig.getMaxOutputPerSecond() - - mConfig.getMaxOutputPerSecond() * (mRunTimeTicks - mConfig.getCalcificationTicks()) - / mConfig.getCalcificationTicks(); + - mConfig.getMaxOutputPerSecond() * (mRunTimeTicks - mConfig.getCalcificationTicks()) + / mConfig.getCalcificationTicks(); } else { return mConfig.getMaxOutputPerSecond(); } @@ -253,34 +254,35 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { @Override public String[] getInfoData() { - return String.format( + return String + .format( "Heat Capacity: " + EnumChatFormatting.GREEN - + "%s %%" - + EnumChatFormatting.RESET - + " Hot time: " - + EnumChatFormatting.RED - + "%s s" - + EnumChatFormatting.RESET - + "%n" - + "Min output: " - + EnumChatFormatting.RED - + LPS_FMT - + EnumChatFormatting.RESET - + " Max output: " - + EnumChatFormatting.RED - + LPS_FMT - + EnumChatFormatting.RESET - + "%n" - + "Current Output: " - + EnumChatFormatting.YELLOW - + LPS_FMT - + EnumChatFormatting.RESET, + + "%s %%" + + EnumChatFormatting.RESET + + " Hot time: " + + EnumChatFormatting.RED + + "%s s" + + EnumChatFormatting.RESET + + "%n" + + "Min output: " + + EnumChatFormatting.RED + + LPS_FMT + + EnumChatFormatting.RESET + + " Max output: " + + EnumChatFormatting.RED + + LPS_FMT + + EnumChatFormatting.RESET + + "%n" + + "Current Output: " + + EnumChatFormatting.YELLOW + + LPS_FMT + + EnumChatFormatting.RESET, GT_Utility.formatNumbers(getHeatCapacityPercent()), GT_Utility.formatNumbers(getHotTimeSeconds()), GT_Utility.formatNumbers(getMinOutputPerSecond()), GT_Utility.formatNumbers(getMaxOutputPerSecond()), GT_Utility.formatNumbers(getProductionPerSecond())) - .split("\\R"); + .split("\\R"); } public int getHeatCapacityPercent() { @@ -320,20 +322,20 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { @Override public void getWailaBody(ItemStack itemStack, List currentTip, IWailaDataAccessor accessor, - IWailaConfigHandler config) { + IWailaConfigHandler config) { final NBTTagCompound tag = accessor.getNBTData(); currentTip.add( - String.format( - (GOLD + "Solar Boiler Output: " + RESET + "%d/%d L/s"), - tag.getInteger("calcificationOutput"), - tag.getInteger("maxCalcificationOutput"))); + String.format( + (GOLD + "Solar Boiler Output: " + RESET + "%d/%d L/s"), + tag.getInteger("calcificationOutput"), + tag.getInteger("maxCalcificationOutput"))); super.getWailaBody(itemStack, currentTip, accessor, config); } @Override public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, - int z) { + int z) { super.getWailaNBTData(player, tile, tag, world, x, y, z); tag.setInteger("calcificationOutput", (getProductionPerSecond())); tag.setInteger("maxCalcificationOutput", (getMaxOutputPerSecond())); @@ -348,34 +350,34 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { private final int maxRuntimeTicks; public Config(String aCategory, int aDefaultCalcificationTicks, int aDefaultMinOutputPerSecond, - int aDefaultMaxOutputPerSecond, int aDefaultCoolDownTicks) { + int aDefaultMaxOutputPerSecond, int aDefaultCoolDownTicks) { calcificationTicks = get( - aCategory, - "CalcificationTicks", - aDefaultCalcificationTicks, - "Number of run-time ticks before boiler starts calcification.", - "100% calcification and minimal output will be reached at 2 times this."); + aCategory, + "CalcificationTicks", + aDefaultCalcificationTicks, + "Number of run-time ticks before boiler starts calcification.", + "100% calcification and minimal output will be reached at 2 times this."); minOutputPerSecond = get(aCategory, "MinOutputPerSecond", aDefaultMinOutputPerSecond); maxOutputPerSecond = get(aCategory, "MaxOutputPerSecond", aDefaultMaxOutputPerSecond); coolDownTicks = get( - aCategory, - "CoolDownTicks", - aDefaultCoolDownTicks, - "Number of ticks it takes to lose 1°C."); + aCategory, + "CoolDownTicks", + aDefaultCoolDownTicks, + "Number of ticks it takes to lose 1°C."); // After which min output is reached. maxRuntimeTicks = (getMaxOutputPerSecond() - getMinOutputPerSecond()) * getCalcificationTicks() - / getMaxOutputPerSecond() + getCalcificationTicks(); + / getMaxOutputPerSecond() + getCalcificationTicks(); } protected int get(final String aCategory, final String aKey, final int aDefaultValue, - final String... aComments) { + final String... aComments) { final StringBuilder tCommentBuilder = new StringBuilder(); for (String tComment : aComments) tCommentBuilder.append(tComment) - .append('\n'); + .append('\n'); tCommentBuilder.append("Default: ") - .append(aDefaultValue); + .append(aDefaultValue); return sMachineFile.mConfig.get(aCategory, aKey, aDefaultValue, tCommentBuilder.toString()) - .getInt(); + .getInt(); } public int getCalcificationTicks() { diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar_Steel.java index 45e22c29fb..c20ea4018a 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar_Steel.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar_Steel.java @@ -17,17 +17,17 @@ public class GT_MetaTileEntity_Boiler_Solar_Steel extends GT_MetaTileEntity_Boil } public GT_MetaTileEntity_Boiler_Solar_Steel(String aName, int aTier, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } public GT_MetaTileEntity_Boiler_Solar_Steel(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } public GT_MetaTileEntity_Boiler_Solar_Steel(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures, Config aConfig) { + ITexture[][][] aTextures, Config aConfig) { super(aName, aTier, aDescription, aTextures, aConfig); } @@ -44,13 +44,13 @@ public class GT_MetaTileEntity_Boiler_Solar_Steel extends GT_MetaTileEntity_Boil int i = color + 1; short[] colorModulation = Dyes.getModulation(color, Dyes._NULL.mRGBa); rTextures[0][i] = new ITexture[] { - TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_BOTTOM, colorModulation) }; + TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_BOTTOM, colorModulation) }; rTextures[1][i] = new ITexture[] { TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_TOP, colorModulation), - TextureFactory.of(BlockIcons.BOILER_SOLAR) }; + TextureFactory.of(BlockIcons.BOILER_SOLAR) }; rTextures[2][i] = new ITexture[] { - TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_SIDE, colorModulation) }; + TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_SIDE, colorModulation) }; rTextures[3][i] = new ITexture[] { TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_SIDE, colorModulation), - TextureFactory.of(BlockIcons.OVERLAY_PIPE) }; + TextureFactory.of(BlockIcons.OVERLAY_PIPE) }; } return rTextures; } @@ -68,10 +68,10 @@ public class GT_MetaTileEntity_Boiler_Solar_Steel extends GT_MetaTileEntity_Boil @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Boiler_Solar_Steel( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures, - this.mConfig); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mConfig); } } 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 67e821f636..12374c3313 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 @@ -20,12 +20,11 @@ public class GT_MetaTileEntity_Boiler_Steel extends GT_MetaTileEntity_Boiler_Bro public GT_MetaTileEntity_Boiler_Steel(int aID, String aName, String aNameRegional) { super( - aID, - aName, - aNameRegional, - new String[] { "Faster than the Bronze Boiler", "Produces 300L of Steam per second", - "Causes " + GT_Mod.gregtechproxy.mPollutionHighPressureCoalBoilerPerSecond - + " Pollution per second" }); + aID, + aName, + aNameRegional, + new String[] { "Faster than the Bronze Boiler", "Produces 300L of Steam per second", + "Causes " + GT_Mod.gregtechproxy.mPollutionHighPressureCoalBoilerPerSecond + " Pollution per second" }); } public GT_MetaTileEntity_Boiler_Steel(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { @@ -40,18 +39,18 @@ public class GT_MetaTileEntity_Boiler_Steel extends GT_MetaTileEntity_Boiler_Bro public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[5][17][]; final ITexture[] texBottom = { TextureFactory.of(MACHINE_STEELBRICKS_BOTTOM) }, - 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() }, - texFrontActive = { TextureFactory.of(MACHINE_STEELBRICKS_SIDE), TextureFactory.of(BOILER_FRONT_ACTIVE), - TextureFactory.builder() - .addIcon(BOILER_FRONT_ACTIVE_GLOW) - .glow() - .build() }; + 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() }, + texFrontActive = { TextureFactory.of(MACHINE_STEELBRICKS_SIDE), TextureFactory.of(BOILER_FRONT_ACTIVE), + 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 ef57f40e65..06bb75c62f 100644 --- a/src/main/java/gregtech/common/tileentities/casings/upgrade/InventoryUpgrade.java +++ b/src/main/java/gregtech/common/tileentities/casings/upgrade/InventoryUpgrade.java @@ -86,19 +86,16 @@ 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)); + 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 5f77c09e15..deb71f93cf 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 @@ -45,10 +45,10 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachi import gregtech.api.render.TextureFactory; public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity_TieredMachineBlock - implements IAddGregtechLogo, IAddUIWidgets { + implements IAddGregtechLogo, IAddUIWidgets { private static final HashMap bondingBoxes = new HashMap<>( - 1); + 1); private final BoundHighlighter boundingBox = new BoundHighlighter(); private final short[] numbers = new short[6]; private boolean transpose = false; @@ -60,7 +60,7 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity } public GT_MetaTileEntity_AdvDebugStructureWriter(String aName, int aTier, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, 0, aDescription, aTextures); } @@ -71,18 +71,18 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + 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()) }; + ? TextureFactory.of( + TextureFactory.builder() + .addIcon(Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE) + .glow() + .build()) + : TextureFactory.of( + TextureFactory.builder() + .addIcon(Textures.BlockIcons.STRUCTURE_MARK) + .glow() + .build()) }; } @Override @@ -132,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; @@ -143,17 +143,17 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity abc[2] = -numbers[2] - 0.5; writerFacing.getWorldOffset(abc, xyz); boundingBox.pos1 = new Vec3Impl( - aBaseMetaTileEntity.getXCoord() + (int) (xyz[0] + 0.5), - aBaseMetaTileEntity.getYCoord() + (int) (xyz[1] + 0.5), - aBaseMetaTileEntity.getZCoord() + (int) (xyz[2] + 0.5)); + aBaseMetaTileEntity.getXCoord() + (int) (xyz[0] + 0.5), + aBaseMetaTileEntity.getYCoord() + (int) (xyz[1] + 0.5), + aBaseMetaTileEntity.getZCoord() + (int) (xyz[2] + 0.5)); abc[0] = -numbers[0] + numbers[3] - 0.5; abc[1] = -numbers[1] + numbers[4] - 0.5; abc[2] = -numbers[2] + numbers[5] - 0.5; writerFacing.getWorldOffset(abc, xyz); boundingBox.pos2 = new Vec3Impl( - aBaseMetaTileEntity.getXCoord() + (int) (xyz[0] + 0.5), - aBaseMetaTileEntity.getYCoord() + (int) (xyz[1] + 0.5), - aBaseMetaTileEntity.getZCoord() + (int) (xyz[2] + 0.5)); + aBaseMetaTileEntity.getXCoord() + (int) (xyz[0] + 0.5), + aBaseMetaTileEntity.getYCoord() + (int) (xyz[1] + 0.5), + aBaseMetaTileEntity.getZCoord() + (int) (xyz[2] + 0.5)); } } @@ -172,24 +172,24 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity public void printStructure(EntityPlayer aPlayer) { IGregTechTileEntity aBaseMetaTileEntity = getBaseMetaTileEntity(); String pseudoJavaCode = StructureUtility.getPseudoJavaCode( - aBaseMetaTileEntity.getWorld(), - ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())), - aBaseMetaTileEntity.getXCoord(), - aBaseMetaTileEntity.getYCoord(), - aBaseMetaTileEntity.getZCoord(), - numbers[0], - numbers[1], - numbers[2], - te -> te.getClass() - .getCanonicalName(), - numbers[3], - numbers[4], - numbers[5], - transpose); + aBaseMetaTileEntity.getWorld(), + ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())), + aBaseMetaTileEntity.getXCoord(), + aBaseMetaTileEntity.getYCoord(), + aBaseMetaTileEntity.getZCoord(), + numbers[0], + numbers[1], + numbers[2], + te -> te.getClass() + .getCanonicalName(), + numbers[3], + numbers[4], + numbers[5], + transpose); GT_FML_LOGGER.info(pseudoJavaCode); result = pseudoJavaCode.split("\\n"); aPlayer.addChatMessage( - new ChatComponentTranslation(translateToLocal("GT5U.machines.advdebugstructurewriter.printed"))); + new ChatComponentTranslation(translateToLocal("GT5U.machines.advdebugstructurewriter.printed"))); } @Override @@ -216,9 +216,9 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity @Override public String[] getDescription() { return new String[] { translateToLocal("GT5U.machines.advdebugstructurewriter.tooltip"), // Scans Blocks Around - translateToLocal("GT5U.machines.advdebugstructurewriter.tooltip.1"), // Prints Multiblock NonTE - // structure check code - translateToLocal("GT5U.machines.advdebugstructurewriter.tooltip.2") // ABC axes aligned to machine front + translateToLocal("GT5U.machines.advdebugstructurewriter.tooltip.1"), // Prints Multiblock NonTE + // structure check code + translateToLocal("GT5U.machines.advdebugstructurewriter.tooltip.2") // ABC axes aligned to machine front }; } @@ -240,86 +240,69 @@ 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); @@ -327,16 +310,16 @@ public class GT_MetaTileEntity_AdvDebugStructureWriter extends GT_MetaTileEntity } private void addChangeNumberButtons(ModularWindow.Builder builder, IDrawable overlay, int addNumberShift, - int addNumber, int xPos) { + int addNumber, int xPos) { int[] yPos = new int[] { 4, 22, 40, 62, 80, 98 }; for (int i = 0; i < yPos.length; i++) { final int index = i; // needed for lambda 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])); + new ButtonWidget() + .setOnClick((clickData, widget) -> numbers[index] += clickData.shift ? addNumberShift : addNumber) + .setBackground(GT_UITextures.BUTTON_STANDARD, overlay) + .setSize(18, 18) + .setPos(xPos, yPos[index])); } } @@ -348,9 +331,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 3db3a5eef9..e2aea182fb 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 @@ -31,15 +31,15 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe public GT_MetaTileEntity_DieselGenerator(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - new String[] { "Requires liquid Fuel", - "Causes " - + (int) (GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond - * GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier[aTier]) - + " Pollution per second" }); + aID, + aName, + aNameRegional, + aTier, + new String[] { "Requires liquid Fuel", + "Causes " + + (int) (GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond + * GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier[aTier]) + + " Pollution per second" }); onConfigLoad(); } @@ -75,9 +75,9 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe public void onConfigLoad() { this.mEfficiency = GregTech_API.sMachineFile.get( - ConfigCategories.machineconfig, - "DieselGenerator.efficiency.tier." + this.mTier, - (100 - this.mTier * 5)); + ConfigCategories.machineconfig, + "DieselGenerator.efficiency.tier." + this.mTier, + (100 - this.mTier * 5)); } @Override @@ -102,13 +102,13 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aTick % 100 == 0 && mFluid != null && mFluid.amount > this.getCapacity()) { GT_Log.err.println( - "Dupe Abuse: " + aBaseMetaTileEntity.getOwnerName() - + " Coords: " - + aBaseMetaTileEntity.getXCoord() - + " " - + aBaseMetaTileEntity.getYCoord() - + " " - + aBaseMetaTileEntity.getZCoord()); + "Dupe Abuse: " + aBaseMetaTileEntity.getOwnerName() + + " Coords: " + + aBaseMetaTileEntity.getXCoord() + + " " + + aBaseMetaTileEntity.getYCoord() + + " " + + aBaseMetaTileEntity.getZCoord()); aBaseMetaTileEntity.setToFire(); } super.onPostTick(aBaseMetaTileEntity, aTick); @@ -127,19 +127,19 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe final byte topFacing = (byte) ForgeDirection.UP.ordinal(); if (aBaseMetaTileEntity.getCoverIDAtSide(topFacing) == 0 - && !aBaseMetaTileEntity.getOpacityAtSide(topFacing)) { + && !aBaseMetaTileEntity.getOpacityAtSide(topFacing)) { final double x = aBaseMetaTileEntity.getOffsetX(topFacing, 1) + 2D / 16D - + XSTR_INSTANCE.nextFloat() * 14D / 16D; + + XSTR_INSTANCE.nextFloat() * 14D / 16D; final double y = aBaseMetaTileEntity.getOffsetY(topFacing, 1) + 1D / 32D; final double z = aBaseMetaTileEntity.getOffsetZ(topFacing, 1) + 2D / 16D - + XSTR_INSTANCE.nextFloat() * 14D / 16D; + + XSTR_INSTANCE.nextFloat() * 14D / 16D; new ParticleEventBuilder().setMotion(0D, 0D, 0D) - .setPosition(x, y, z) - .setWorld(getBaseMetaTileEntity().getWorld()) - .setIdentifier(ParticleFX.SMOKE) - .run(); + .setPosition(x, y, z) + .setWorld(getBaseMetaTileEntity().getWorld()) + .setIdentifier(ParticleFX.SMOKE) + .run(); } } } @@ -147,118 +147,118 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe @Override public ITexture[] getFront(byte aColor) { return new ITexture[] { super.getFront(aColor)[0], - TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_FRONT), - TextureFactory.builder() - .addIcon(DIESEL_GENERATOR_FRONT_GLOW) - .glow() - .build()), - OVERLAYS_ENERGY_OUT[this.mTier] }; + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_FRONT), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_FRONT_GLOW) + .glow() + .build()), + OVERLAYS_ENERGY_OUT[this.mTier] }; } @Override public ITexture[] getBack(byte aColor) { return new ITexture[] { super.getBack(aColor)[0], - TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_BACK), - TextureFactory.builder() - .addIcon(DIESEL_GENERATOR_BACK_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_BACK), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_BACK_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getBottom(byte aColor) { return new ITexture[] { super.getBottom(aColor)[0], - TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_BOTTOM), - TextureFactory.builder() - .addIcon(DIESEL_GENERATOR_BOTTOM_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_BOTTOM), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_BOTTOM_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getTop(byte aColor) { return new ITexture[] { super.getTop(aColor)[0], - TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_TOP), - TextureFactory.builder() - .addIcon(DIESEL_GENERATOR_TOP_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_TOP), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_TOP_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getSides(byte aColor) { return new ITexture[] { super.getSides(aColor)[0], - TextureFactory.of( - TextureFactory.of(DIESEL_GENERATOR_SIDE), - TextureFactory.builder() - .addIcon(DIESEL_GENERATOR_SIDE_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_SIDE), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_SIDE_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getFrontActive(byte aColor) { 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()), - OVERLAYS_ENERGY_OUT[this.mTier] }; + TextureFactory.of( + TextureFactory.of(DIESEL_GENERATOR_FRONT_ACTIVE), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_FRONT_ACTIVE_GLOW) + .glow() + .build()), + OVERLAYS_ENERGY_OUT[this.mTier] }; } @Override public ITexture[] getBackActive(byte aColor) { 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.of( + TextureFactory.of(DIESEL_GENERATOR_BACK_ACTIVE), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_BACK_ACTIVE_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getBottomActive(byte aColor) { 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.of( + TextureFactory.of(DIESEL_GENERATOR_BOTTOM_ACTIVE), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_BOTTOM_ACTIVE_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getTopActive(byte aColor) { 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.of( + TextureFactory.of(DIESEL_GENERATOR_TOP_ACTIVE), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_TOP_ACTIVE_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getSidesActive(byte aColor) { 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.of( + TextureFactory.of(DIESEL_GENERATOR_SIDE_ACTIVE), + TextureFactory.builder() + .addIcon(DIESEL_GENERATOR_SIDE_ACTIVE_GLOW) + .glow() + .build()) }; } @Override public int getPollution() { return (int) (GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond - * GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier[mTier]); + * GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier[mTier]); } } 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 2e0279552a..1c8aeebb40 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 @@ -19,30 +19,30 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat @Deprecated public GT_MetaTileEntity_GasTurbine(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - new String[] { "Requires flammable Gasses", - "Causes " - + (int) (GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond - * GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier[aTier]) - + " Pollution per second" }); + aID, + aName, + aNameRegional, + aTier, + new String[] { "Requires flammable Gasses", + "Causes " + + (int) (GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond + * GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier[aTier]) + + " Pollution per second" }); this.mEfficiency = 100 - aTier * 5; onConfigLoad(); } public GT_MetaTileEntity_GasTurbine(int aID, String aName, String aNameRegional, int aTier, int mEfficiency) { super( - aID, - aName, - aNameRegional, - aTier, - new String[] { "Requires flammable Gasses", - "Causes " - + (int) (GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond - * GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier[aTier]) - + " Pollution per second" }); + aID, + aName, + aNameRegional, + aTier, + new String[] { "Requires flammable Gasses", + "Causes " + + (int) (GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond + * GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier[aTier]) + + " Pollution per second" }); this.mEfficiency = mEfficiency; onConfigLoad(); } @@ -62,7 +62,7 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat } public GT_MetaTileEntity_GasTurbine(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, - int mEfficiency) { + int mEfficiency) { super(aName, aTier, aDescription, aTextures); this.mEfficiency = mEfficiency; onConfigLoad(); @@ -76,11 +76,11 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_GasTurbine( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures, - this.mEfficiency); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mEfficiency); } @Override @@ -94,10 +94,8 @@ 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,118 +106,118 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat @Override public ITexture[] getFront(byte aColor) { return new ITexture[] { super.getFront(aColor)[0], - TextureFactory.of( - TextureFactory.of(GAS_TURBINE_FRONT), - TextureFactory.builder() - .addIcon(GAS_TURBINE_FRONT_GLOW) - .glow() - .build()), - OVERLAYS_ENERGY_OUT[this.mTier] }; + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_FRONT), + TextureFactory.builder() + .addIcon(GAS_TURBINE_FRONT_GLOW) + .glow() + .build()), + OVERLAYS_ENERGY_OUT[this.mTier] }; } @Override public ITexture[] getBack(byte aColor) { return new ITexture[] { super.getBack(aColor)[0], - TextureFactory.of( - TextureFactory.of(GAS_TURBINE_BACK), - TextureFactory.builder() - .addIcon(GAS_TURBINE_BACK_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_BACK), + TextureFactory.builder() + .addIcon(GAS_TURBINE_BACK_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getBottom(byte aColor) { return new ITexture[] { super.getBottom(aColor)[0], - TextureFactory.of( - TextureFactory.of(GAS_TURBINE_BOTTOM), - TextureFactory.builder() - .addIcon(GAS_TURBINE_BOTTOM_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_BOTTOM), + TextureFactory.builder() + .addIcon(GAS_TURBINE_BOTTOM_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getTop(byte aColor) { return new ITexture[] { super.getTop(aColor)[0], - TextureFactory.of( - TextureFactory.of(GAS_TURBINE_TOP), - TextureFactory.builder() - .addIcon(GAS_TURBINE_TOP_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_TOP), + TextureFactory.builder() + .addIcon(GAS_TURBINE_TOP_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getSides(byte aColor) { return new ITexture[] { super.getSides(aColor)[0], - TextureFactory.of( - TextureFactory.of(GAS_TURBINE_SIDE), - TextureFactory.builder() - .addIcon(GAS_TURBINE_SIDE_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_SIDE), + TextureFactory.builder() + .addIcon(GAS_TURBINE_SIDE_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getFrontActive(byte aColor) { 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()), - OVERLAYS_ENERGY_OUT[this.mTier] }; + TextureFactory.of( + TextureFactory.of(GAS_TURBINE_FRONT_ACTIVE), + TextureFactory.builder() + .addIcon(GAS_TURBINE_FRONT_ACTIVE_GLOW) + .glow() + .build()), + OVERLAYS_ENERGY_OUT[this.mTier] }; } @Override public ITexture[] getBackActive(byte aColor) { 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.of( + TextureFactory.of(GAS_TURBINE_BACK_ACTIVE), + TextureFactory.builder() + .addIcon(GAS_TURBINE_BACK_ACTIVE_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getBottomActive(byte aColor) { 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.of( + TextureFactory.of(GAS_TURBINE_BOTTOM_ACTIVE), + TextureFactory.builder() + .addIcon(GAS_TURBINE_BOTTOM_ACTIVE_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getTopActive(byte aColor) { 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.of( + TextureFactory.of(GAS_TURBINE_TOP_ACTIVE), + TextureFactory.builder() + .addIcon(GAS_TURBINE_TOP_ACTIVE_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getSidesActive(byte aColor) { 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.of( + TextureFactory.of(GAS_TURBINE_SIDE_ACTIVE), + TextureFactory.builder() + .addIcon(GAS_TURBINE_SIDE_ACTIVE_GLOW) + .glow() + .build()) }; } @Override public int getPollution() { return (int) (GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond - * GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier[mTier]); + * GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier[mTier]); } } 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 152a849d5a..33066f7617 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 @@ -24,31 +24,29 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach } public GT_MetaTileEntity_LightningRod(String aName, int aTier, int aInvSlotCount, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } public GT_MetaTileEntity_LightningRod(String aName, int aTier, int aInvSlotCount, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + boolean aActive, boolean aRedstone) { if (aSide != ForgeDirection.UP.ordinal()) { return new ITexture[] { BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], - BlockIcons.OVERLAYS_ENERGY_OUT_POWER[mTier] }; + BlockIcons.OVERLAYS_ENERGY_OUT_POWER[mTier] }; } 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() }; + 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() }; } @Override @@ -59,11 +57,11 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_LightningRod( - this.mName, - this.mTier, - this.mInventory.length, - this.mDescriptionArray, - this.mTextures); + this.mName, + this.mTier, + this.mInventory.length, + this.mDescriptionArray, + this.mTextures); } @Override @@ -86,8 +84,8 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach for (int i = aBaseMetaTileEntity.getYCoord() + 1; i < aWorld.getHeight() - 1; i++) { if (isRodValid && aBaseMetaTileEntity.getBlock(aX, i, aZ) - .getUnlocalizedName() - .equals("blockFenceIron")) { + .getUnlocalizedName() + .equals("blockFenceIron")) { aRodValue++; } else { isRodValid = false; @@ -99,9 +97,8 @@ 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 b67993770d..17089403c3 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 @@ -29,13 +29,13 @@ public class GT_MetaTileEntity_MagicEnergyConverter extends GT_MetaTileEntity_Ba } public GT_MetaTileEntity_MagicEnergyConverter(String aName, int aTier, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); onConfigLoad(); } public GT_MetaTileEntity_MagicEnergyConverter(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); onConfigLoad(); } @@ -48,10 +48,10 @@ public class GT_MetaTileEntity_MagicEnergyConverter extends GT_MetaTileEntity_Ba @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_MagicEnergyConverter( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures); } @Override @@ -66,9 +66,9 @@ public class GT_MetaTileEntity_MagicEnergyConverter extends GT_MetaTileEntity_Ba public void onConfigLoad() { this.mEfficiency = GregTech_API.sMachineFile.get( - ConfigCategories.machineconfig, - "MagicEnergyConverter.efficiency.tier." + this.mTier, - 100 - this.mTier * 5); + ConfigCategories.machineconfig, + "MagicEnergyConverter.efficiency.tier." + this.mTier, + 100 - this.mTier * 5); } @Override @@ -79,93 +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(), - OVERLAYS_ENERGY_OUT[mTier] }; + 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(), - OVERLAYS_ENERGY_OUT[mTier] }; + 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 dded37de09..b95f79c0f5 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 @@ -69,13 +69,13 @@ interface MagicalEnergyBBListener { } public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_BasicGenerator - implements MagicalEnergyBBListener { + implements MagicalEnergyBBListener { private static final boolean THAUMCRAFT_LOADED = Thaumcraft.isModLoaded(); private static final ConcurrentHashMap sSubscribedCrystals = new ConcurrentHashMap<>( - 4); + 4); private static final List sPrimalAspects = (THAUMCRAFT_LOADED) ? Aspect.getPrimalAspects() - : new ArrayList<>(); + : new ArrayList<>(); private static final Map sAspectsEnergy = new HashMap<>(); private static boolean sAllowMultipleEggs = false; private static GT_MetaTileEntity_MagicalEnergyAbsorber sActiveSiphon = null; @@ -97,7 +97,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B } private GT_MetaTileEntity_MagicalEnergyAbsorber(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); onConfigLoad(GregTech_API.sMachineFile); } @@ -118,12 +118,12 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B for (Aspect tAspect : Aspect.aspects.values()) { // noinspection UnstableApiUsage sAspectsEnergy.put( - tAspect, - Enums.getIfPresent( - TC_Aspects.class, - tAspect.getTag() - .toUpperCase(Locale.ENGLISH)) - .or(TC_Aspects.AER).mValue * sEnergyPerEssentia); + tAspect, + Enums.getIfPresent( + TC_Aspects.class, + tAspect.getTag() + .toUpperCase(Locale.ENGLISH)) + .or(TC_Aspects.AER).mValue * sEnergyPerEssentia); } } } @@ -137,9 +137,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B sharedConfigLoad(aConfig); mEfficiency = aConfig.get(machineconfig, "MagicEnergyAbsorber.efficiency.tier." + mTier, 100 - mTier * 10); mMaxVisPerDrain = (int) Math.round( - Math.sqrt( - (double) (V[mTier] * 10000) - / (sEnergyFromVis * (getEfficiency() != 0 ? getEfficiency() : 100)))); + Math.sqrt((double) (V[mTier] * 10000) / (sEnergyFromVis * (getEfficiency() != 0 ? getEfficiency() : 100)))); if (Math.pow(mMaxVisPerDrain, 2) * sEnergyFromVis * (getEfficiency() != 0 ? getEfficiency() : 100) < V[mTier]) { mMaxVisPerDrain += 1; } @@ -150,13 +148,13 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B if (aPlayer.isSneaking()) mMagicalEnergyBB.decreaseTier(); else mMagicalEnergyBB.increaseTier(); GT_Utility.sendChatToPlayer( - aPlayer, - String.format( - GT_LanguageManager.addStringLocalization( - "Interaction_DESCRIPTION_MagicalEnergyAbsorber_Screwdriver", - "Absorption range: %s blocks"), - mMagicalEnergyBB.getRange(), - true)); + aPlayer, + String.format( + GT_LanguageManager.addStringLocalization( + "Interaction_DESCRIPTION_MagicalEnergyAbsorber_Screwdriver", + "Absorption range: %s blocks"), + mMagicalEnergyBB.getRange(), + true)); mMagicalEnergyBB.update(); } @@ -208,43 +206,43 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B final String LI = "- %%%"; final String EU_PER = "%%%EU per "; List description = new ArrayList<>(); + description + .add(UNDERLINE + "Feasts on " + LIGHT_PURPLE + UNDERLINE + "magic" + GRAY + UNDERLINE + " close to it:"); description.add( - UNDERLINE + "Feasts on " + LIGHT_PURPLE + UNDERLINE + "magic" + GRAY + UNDERLINE + " close to it:"); - description.add( - LI + (sAllowMultipleEggs ? "A " : "An " + YELLOW + UNDERLINE + "EXCLUSIVE" + RESET) - + GRAY - + " " - + LIGHT_PURPLE - + "Dragon Egg" - + GRAY - + " atop"); + LI + (sAllowMultipleEggs ? "A " : "An " + YELLOW + UNDERLINE + "EXCLUSIVE" + RESET) + + GRAY + + " " + + LIGHT_PURPLE + + "Dragon Egg" + + GRAY + + " atop"); if (sEnergyPerEndercrystal > 0) { description.add(LI + sEnergyPerEndercrystal + EU_PER + LIGHT_PURPLE + "Ender Crystal" + GRAY + " in range"); } if (THAUMCRAFT_LOADED) { description.add(LI + mMaxVisPerDrain + "%%%CV/t from an " + LIGHT_PURPLE + "Energised Node" + GRAY); description.add( - LI + (sEnergyPerEssentia * getEfficiency()) / 100 - + EU_PER - + LIGHT_PURPLE - + "Essentia" - + GRAY - + " Aspect-Value from containers in range"); + LI + (sEnergyPerEssentia * getEfficiency()) / 100 + + EU_PER + + LIGHT_PURPLE + + "Essentia" + + GRAY + + " Aspect-Value from containers in range"); } description.add(" "); description.add(UNDERLINE + "Lookup range (Use Screwdriver to change):"); description.add("Default: %%%" + GREEN + mMagicalEnergyBB.getDefaultRange()); description.add("Max: %%%" + GREEN + mMagicalEnergyBB.getMaxRange()); description.add(" "); + description + .add(UNDERLINE + "Fuels on " + LIGHT_PURPLE + UNDERLINE + "enchantments" + GRAY + UNDERLINE + " input:"); description.add( - UNDERLINE + "Fuels on " + LIGHT_PURPLE + UNDERLINE + "enchantments" + GRAY + UNDERLINE + " input:"); - description.add( - "- Item: %%%" + (10000 * getEfficiency()) / 100 - + EU_PER - + LIGHT_PURPLE - + "enchant" - + GRAY - + " weight × level / max"); + "- Item: %%%" + (10000 * getEfficiency()) / 100 + + EU_PER + + LIGHT_PURPLE + + "enchant" + + GRAY + + " weight × level / max"); description.add("- Book: %%%" + 10000 + EU_PER + LIGHT_PURPLE + "enchant" + GRAY + " weight × level / max"); description.add(" "); description.add("Efficiency: %%%" + GREEN + getEfficiency() + "%"); @@ -254,29 +252,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(), - OVERLAYS_ENERGY_OUT[mTier] }; + 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 @@ -287,56 +285,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(), - OVERLAYS_ENERGY_OUT[mTier] }; + 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 @@ -379,8 +377,8 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B } aBaseMetaTileEntity.increaseStoredEnergyUnits(tGeneratedEU, true); aBaseMetaTileEntity.setActive( - aBaseMetaTileEntity.isAllowedToWork() - && aBaseMetaTileEntity.getUniversalEnergyStored() >= maxEUOutput() + getMinimumStoredEU()); + aBaseMetaTileEntity.isAllowedToWork() + && aBaseMetaTileEntity.getUniversalEnergyStored() >= maxEUOutput() + getMinimumStoredEU()); } } @@ -403,10 +401,9 @@ 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; @@ -423,8 +420,8 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B final double mZ = dZ * 4D; particleEventBuilder.setMotion(mX, mY, mZ) - .setPosition(x, y, z) - .run(); + .setPosition(x, y, z) + .run(); } } } @@ -458,8 +455,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B private boolean isDisenchantableItem(ItemStack aStack) { return ((aStack.isItemEnchanted()) && (aStack.getItem() - .getItemEnchantability() - > 0)); + .getItemEnchantability() > 0)); } private boolean isEnchantedBook(ItemStack aStack) { @@ -507,7 +503,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B // Only consume input when it can store EU and push output if ((getBaseMetaTileEntity().getStoredEU() + tEU) < getBaseMetaTileEntity().getEUCapacity() - && getBaseMetaTileEntity().addStackToSlot(getOutputSlot(), tOutputStack)) { + && getBaseMetaTileEntity().addStackToSlot(getOutputSlot(), tOutputStack)) { decrStackSize(getInputSlot(), 1); } else { tEU = 0; @@ -524,11 +520,11 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B if (!hasEgg()) return 0; if (!sAllowMultipleEggs) { if (sActiveSiphon != null && sActiveSiphon != this - && sActiveSiphon.getBaseMetaTileEntity() != null - && !sActiveSiphon.getBaseMetaTileEntity() - .isInvalidTileEntity() - && sActiveSiphon.isChunkLoaded() - && sActiveSiphon.hasEgg()) { + && sActiveSiphon.getBaseMetaTileEntity() != null + && !sActiveSiphon.getBaseMetaTileEntity() + .isInvalidTileEntity() + && sActiveSiphon.isChunkLoaded() + && sActiveSiphon.hasEgg()) { getBaseMetaTileEntity().doExplosion(Integer.MAX_VALUE); } else { setActiveSiphon(this); @@ -538,9 +534,9 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B if (egg == Blocks.dragon_egg) { return sDragonEggEnergyPerTick; } else if (egg.getUnlocalizedName() - .contains("creeperEgg")) { - return sCreeperEggEnergyPerTick; - } + .contains("creeperEgg")) { + return sCreeperEggEnergyPerTick; + } return 0; } @@ -591,10 +587,10 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B Aspect aspect = mAvailableEssentiaAspects.get(i); long tAspectEU = ((long) sAspectsEnergy.get(aspect) * getEfficiency()) / 100; if (tAspectEU <= tEUtoGen && AspectSourceHelper.drainEssentia( - (TileEntity) getBaseMetaTileEntity(), - aspect, - ForgeDirection.UNKNOWN, - mMagicalEnergyBB.getRange())) { + (TileEntity) getBaseMetaTileEntity(), + aspect, + ForgeDirection.UNKNOWN, + mMagicalEnergyBB.getRange())) { tEUtoGen -= tAspectEU; tEU += tAspectEU; } @@ -608,7 +604,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B if (aBlock == Blocks.dragon_egg) return true; if (aBlock instanceof BlockDragonEgg) return true; return (aBlock.getUnlocalizedName() - .equals("tile.dragonEgg")); + .equals("tile.dragonEgg")); } private boolean isChunkLoaded() { @@ -713,18 +709,13 @@ 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(); + .getWorld(); mLivingCrystalIDs.clear(); for (EntityEnderCrystal o : tWorld.getEntitiesWithinAABB(EntityEnderCrystal.class, getAxisAlignedBB())) { if (o.isEntityAlive()) { @@ -740,8 +731,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B int tRange = getRange(); int tY = tBaseMetaTileEntity.getYCoord(); int tMaxY = tBaseMetaTileEntity.getWorld() - .getHeight() - - 1; + .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); @@ -783,12 +773,9 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B if (mAbsorber == null) return; if (mAbsorber.getBaseMetaTileEntity() == null) return; if (mAbsorber.getBaseMetaTileEntity() - .isInvalidTileEntity()) - return; + .isInvalidTileEntity()) return; if (mAbsorber.getBaseMetaTileEntity() - .getWorld() - == null) - return; + .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 b81b0b956b..7e9fff95aa 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 @@ -16,7 +16,7 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe private int mEfficiency; public GT_MetaTileEntity_NaquadahReactor(int aID, String aName, String[] aDescription, String aNameRegional, - int aTier) { + int aTier) { super(aID, aName, aNameRegional, aTier, aDescription); if (aTier > 8 || aTier < 4) { new Exception("Tier without Recipe Map!").printStackTrace(); @@ -35,7 +35,7 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe @Override public boolean isOutputFacing(byte aSide) { return (aSide > 1) && (aSide != getBaseMetaTileEntity().getFrontFacing()) - && (aSide != getBaseMetaTileEntity().getBackFacing()); + && (aSide != getBaseMetaTileEntity().getBackFacing()); } @Override @@ -84,111 +84,108 @@ 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 public ITexture[] getFront(byte aColor) { 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.of( + TextureFactory.of(NAQUADAH_REACTOR_SOLID_FRONT), + TextureFactory.builder() + .addIcon(NAQUADAH_REACTOR_SOLID_FRONT_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getBack(byte aColor) { 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.of( + TextureFactory.of(NAQUADAH_REACTOR_SOLID_BACK), + TextureFactory.builder() + .addIcon(NAQUADAH_REACTOR_SOLID_BACK_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getBottom(byte aColor) { 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.of( + TextureFactory.of(NAQUADAH_REACTOR_SOLID_BOTTOM), + TextureFactory.builder() + .addIcon(NAQUADAH_REACTOR_SOLID_BOTTOM_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getTop(byte aColor) { 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.of( + TextureFactory.of(NAQUADAH_REACTOR_SOLID_TOP), + TextureFactory.builder() + .addIcon(NAQUADAH_REACTOR_SOLID_TOP_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getSides(byte aColor) { 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.of( + TextureFactory.of(NAQUADAH_REACTOR_SOLID_SIDE), + 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 6e4bbe2dc7..c1370cce63 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 @@ -36,7 +36,7 @@ public class GT_MetaTileEntity_PlasmaGenerator extends GT_MetaTileEntity_BasicGe @Override public ITexture[] getFront(byte aColor) { return new ITexture[] { super.getFront(aColor)[0], TextureFactory.of(MACHINE_CASING_FUSION_GLASS), - OVERLAYS_ENERGY_OUT[mTier] }; + OVERLAYS_ENERGY_OUT[mTier] }; } @Override @@ -62,47 +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(), - OVERLAYS_ENERGY_OUT[mTier] }; + 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 @@ -132,9 +132,9 @@ public class GT_MetaTileEntity_PlasmaGenerator extends GT_MetaTileEntity_BasicGe public void onConfigLoad() { this.mEfficiency = GregTech_API.sMachineFile.get( - ConfigCategories.machineconfig, - "PlasmaGenerator.efficiency.tier." + this.mTier, - Math.max(10, 10 + Math.min(90, this.mTier * 10))); + ConfigCategories.machineconfig, + "PlasmaGenerator.efficiency.tier." + this.mTier, + Math.max(10, 10 + Math.min(90, this.mTier * 10))); } @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 6d59c050d0..a875fd521c 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 @@ -20,11 +20,11 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener public GT_MetaTileEntity_SteamTurbine(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - new String[] { "Converts Steam into EU", "Base rate: 2L of Steam -> 1 EU" }); + aID, + aName, + aNameRegional, + aTier, + new String[] { "Converts Steam into EU", "Base rate: 2L of Steam -> 1 EU" }); onConfigLoad(); } @@ -59,9 +59,8 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); desc[mDescriptionArray.length] = "Fuel Efficiency: " + (600 / getEfficiency()) + "%"; desc[mDescriptionArray.length + 1] = String.format( - "Consumes up to %sL of Steam per second", - (int) (4000 * (8 * Math.pow(4, mTier) + Math.pow(2, Math.max(mTier - 1, 0))) - / (600 / getEfficiency()))); + "Consumes up to %sL of Steam per second", + (int) (4000 * (8 * Math.pow(4, mTier) + Math.pow(2, Math.max(mTier - 1, 0))) / (600 / getEfficiency()))); return desc; } @@ -71,10 +70,8 @@ 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,113 +93,113 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener @Override public ITexture[] getFront(byte aColor) { return new ITexture[] { super.getFront(aColor)[0], - TextureFactory.of( - TextureFactory.of(STEAM_TURBINE_FRONT), - TextureFactory.builder() - .addIcon(STEAM_TURBINE_FRONT_GLOW) - .glow() - .build()), - OVERLAYS_ENERGY_OUT[this.mTier] }; + TextureFactory.of( + TextureFactory.of(STEAM_TURBINE_FRONT), + TextureFactory.builder() + .addIcon(STEAM_TURBINE_FRONT_GLOW) + .glow() + .build()), + OVERLAYS_ENERGY_OUT[this.mTier] }; } @Override public ITexture[] getBack(byte aColor) { return new ITexture[] { super.getBack(aColor)[0], - TextureFactory.of( - TextureFactory.of(STEAM_TURBINE_BACK), - TextureFactory.builder() - .addIcon(STEAM_TURBINE_BACK_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(STEAM_TURBINE_BACK), + TextureFactory.builder() + .addIcon(STEAM_TURBINE_BACK_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getBottom(byte aColor) { return new ITexture[] { super.getBottom(aColor)[0], - TextureFactory.of( - TextureFactory.of(STEAM_TURBINE_BOTTOM), - TextureFactory.builder() - .addIcon(STEAM_TURBINE_BOTTOM_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(STEAM_TURBINE_BOTTOM), + TextureFactory.builder() + .addIcon(STEAM_TURBINE_BOTTOM_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getTop(byte aColor) { return new ITexture[] { super.getTop(aColor)[0], - TextureFactory.of( - TextureFactory.of(STEAM_TURBINE_TOP), - TextureFactory.builder() - .addIcon(STEAM_TURBINE_TOP_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(STEAM_TURBINE_TOP), + TextureFactory.builder() + .addIcon(STEAM_TURBINE_TOP_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getSides(byte aColor) { return new ITexture[] { super.getSides(aColor)[0], - TextureFactory.of( - TextureFactory.of(STEAM_TURBINE_SIDE), - TextureFactory.builder() - .addIcon(STEAM_TURBINE_SIDE_GLOW) - .glow() - .build()) }; + TextureFactory.of( + TextureFactory.of(STEAM_TURBINE_SIDE), + TextureFactory.builder() + .addIcon(STEAM_TURBINE_SIDE_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getFrontActive(byte aColor) { 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()), - OVERLAYS_ENERGY_OUT[this.mTier] }; + TextureFactory.of( + TextureFactory.of(STEAM_TURBINE_FRONT_ACTIVE), + TextureFactory.builder() + .addIcon(STEAM_TURBINE_FRONT_ACTIVE_GLOW) + .glow() + .build()), + OVERLAYS_ENERGY_OUT[this.mTier] }; } @Override public ITexture[] getBackActive(byte aColor) { 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.of( + TextureFactory.of(STEAM_TURBINE_BACK_ACTIVE), + TextureFactory.builder() + .addIcon(STEAM_TURBINE_BACK_ACTIVE_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getBottomActive(byte aColor) { 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.of( + TextureFactory.of(STEAM_TURBINE_BOTTOM_ACTIVE), + TextureFactory.builder() + .addIcon(STEAM_TURBINE_BOTTOM_ACTIVE_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getTopActive(byte aColor) { 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.of( + TextureFactory.of(STEAM_TURBINE_TOP_ACTIVE), + TextureFactory.builder() + .addIcon(STEAM_TURBINE_TOP_ACTIVE_GLOW) + .glow() + .build()) }; } @Override public ITexture[] getSidesActive(byte aColor) { 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.of( + TextureFactory.of(STEAM_TURBINE_SIDE_ACTIVE), + 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 bf027be770..252cc6a5b8 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 @@ -11,7 +11,7 @@ import gregtech.api.render.TextureFactory; public class GT_MetaTileEntity_BasicHull_Bronze extends GT_MetaTileEntity_BasicHull_NonElectric { public GT_MetaTileEntity_BasicHull_Bronze(int aID, String aName, String aNameRegional, int aTier, - String aDescription) { + String aDescription) { super(aID, aName, aNameRegional, aTier, aDescription); } @@ -20,7 +20,7 @@ public class GT_MetaTileEntity_BasicHull_Bronze extends GT_MetaTileEntity_BasicH } public GT_MetaTileEntity_BasicHull_Bronze(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @@ -33,15 +33,12 @@ 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 6be36f5798..ee788ba8c0 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 @@ -11,44 +11,41 @@ import gregtech.api.render.TextureFactory; public class GT_MetaTileEntity_BasicHull_BronzeBricks extends GT_MetaTileEntity_BasicHull_NonElectric { public GT_MetaTileEntity_BasicHull_BronzeBricks(int aID, String aName, String aNameRegional, int aTier, - String aDescription) { + String aDescription) { super(aID, aName, aNameRegional, aTier, aDescription); } public GT_MetaTileEntity_BasicHull_BronzeBricks(String aName, int aTier, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } public GT_MetaTileEntity_BasicHull_BronzeBricks(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_BasicHull_BronzeBricks( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures); } @Override 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 72785918b6..85e461bf47 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 @@ -11,7 +11,7 @@ import gregtech.api.render.TextureFactory; public class GT_MetaTileEntity_BasicHull_Steel extends GT_MetaTileEntity_BasicHull_NonElectric { public GT_MetaTileEntity_BasicHull_Steel(int aID, String aName, String aNameRegional, int aTier, - String aDescription) { + String aDescription) { super(aID, aName, aNameRegional, aTier, aDescription); } @@ -32,16 +32,14 @@ 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)) }; + 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 39cd8fec3c..cd5f547d22 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 @@ -11,44 +11,41 @@ import gregtech.api.render.TextureFactory; public class GT_MetaTileEntity_BasicHull_SteelBricks extends GT_MetaTileEntity_BasicHull_NonElectric { public GT_MetaTileEntity_BasicHull_SteelBricks(int aID, String aName, String aNameRegional, int aTier, - String aDescription) { + String aDescription) { super(aID, aName, aNameRegional, aTier, aDescription); } public GT_MetaTileEntity_BasicHull_SteelBricks(String aName, int aTier, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } public GT_MetaTileEntity_BasicHull_SteelBricks(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_BasicHull_SteelBricks( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures); } @Override 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 6910fd9de5..2b78fd5c55 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 @@ -62,7 +62,7 @@ import gregtech.api.util.GT_Utility; import gregtech.common.gui.modularui.widget.AESlotWidget; public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch_InputBus - implements IConfigurationCircuitSupport, IAddGregtechLogo, IAddUIWidgets, IPowerChannelState { + implements IConfigurationCircuitSupport, IAddGregtechLogo, IAddUIWidgets, IPowerChannelState { private static final int SLOT_COUNT = 16; private BaseActionSource requestSource = null; @@ -76,22 +76,22 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch public GT_MetaTileEntity_Hatch_InputBus_ME(int aID, String aName, String aNameRegional) { super( - aID, - aName, - aNameRegional, - 1, - SLOT_COUNT * 2 + 1, - new String[] { "Advanced item input for Multiblocks", "Retrieves directly from ME", - "Keeps 16 item types in stock", - "Auto-Pull from ME mode will automatically stock the first 16 items in the ME system, updated every 5 seconds.", - "Toggle by right-clicking with screwdriver, or use the GUI.", - "Use the GUI to limit the minimum stack size for Auto-Pulling.", - "Configuration data can be copy+pasted using a data stick." }); + aID, + aName, + aNameRegional, + 1, + SLOT_COUNT * 2 + 1, + new String[] { "Advanced item input for Multiblocks", "Retrieves directly from ME", + "Keeps 16 item types in stock", + "Auto-Pull from ME mode will automatically stock the first 16 items in the ME system, updated every 5 seconds.", + "Toggle by right-clicking with screwdriver, or use the GUI.", + "Use the GUI to limit the minimum stack size for Auto-Pulling.", + "Configuration data can be copy+pasted using a data stick." }); disableSort = true; } public GT_MetaTileEntity_Hatch_InputBus_ME(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, SLOT_COUNT * 2 + 1, aDescription, aTextures); disableSort = true; } @@ -135,14 +135,14 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch if (gridProxy == null) { if (getBaseMetaTileEntity() instanceof IGridProxyable) { gridProxy = new AENetworkProxy( - (IGridProxyable) getBaseMetaTileEntity(), - "proxy", - ItemList.Hatch_Output_Bus_ME.get(1), - true); + (IGridProxyable) getBaseMetaTileEntity(), + "proxy", + ItemList.Hatch_Output_Bus_ME.get(1), + true); gridProxy.setFlags(GridFlags.REQUIRE_CHANNEL); if (getBaseMetaTileEntity().getWorld() != null) gridProxy.setOwner( - getBaseMetaTileEntity().getWorld() - .getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName())); + getBaseMetaTileEntity().getWorld() + .getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName())); } } return this.gridProxy; @@ -217,10 +217,8 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch public String[] getInfoData() { if (GregTech_API.mAE2) { return new String[] { - "The bus is " - + ((getProxy() != null && getProxy().isActive()) ? EnumChatFormatting.GREEN + "online" - : EnumChatFormatting.RED + "offline" + getAEDiagnostics()) - + EnumChatFormatting.RESET }; + "The bus is " + ((getProxy() != null && getProxy().isActive()) ? EnumChatFormatting.GREEN + "online" + : EnumChatFormatting.RED + "offline" + getAEDiagnostics()) + EnumChatFormatting.RESET }; } else return new String[] {}; } @@ -245,7 +243,7 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch @Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, - float aY, float aZ) { + float aY, float aZ) { if (!(aPlayer instanceof EntityPlayerMP)) return super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ); ItemStack dataStick = aPlayer.inventory.getCurrentItem(); @@ -332,7 +330,7 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch } try { IMEMonitor sg = proxy.getStorage() - .getItemInventory(); + .getItemInventory(); IAEItemStack request = AEItemStack.create(mInventory[aIndex]); request.setStackSize(Integer.MAX_VALUE); IAEItemStack result = sg.extractItems(request, Actionable.SIMULATE, getRequestSource()); @@ -377,9 +375,9 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch AENetworkProxy proxy = getProxy(); try { IMEMonitor sg = proxy.getStorage() - .getItemInventory(); + .getItemInventory(); Iterator iterator = sg.getStorageList() - .iterator(); + .iterator(); int index = 0; while (iterator.hasNext() && index < SLOT_COUNT) { IAEItemStack currItem = iterator.next(); @@ -413,12 +411,12 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch AENetworkProxy proxy = getProxy(); try { IMEMonitor sg = proxy.getStorage() - .getItemInventory(); + .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); + .extractAEPower(request.getStackSize(), Actionable.MODULATE, PowerMultiplier.CONFIG); setInventorySlotContents(i + SLOT_COUNT, oldStack); } catch (final GridAccessException ignored) {} } @@ -442,7 +440,7 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch } try { IMEMonitor sg = proxy.getStorage() - .getItemInventory(); + .getItemInventory(); IAEItemStack request = AEItemStack.create(mInventory[aIndex]); request.setStackSize(Integer.MAX_VALUE); IAEItemStack result = sg.extractItems(request, Actionable.SIMULATE, getRequestSource()); @@ -465,77 +463,76 @@ 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(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 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)); + .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 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) { @@ -548,39 +545,37 @@ 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))); + (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)); + 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 public void getWailaBody(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, - IWailaConfigHandler config) { + IWailaConfigHandler config) { NBTTagCompound tag = accessor.getNBTData(); boolean autopull = tag.getBoolean("autoPull"); int minSize = tag.getInteger("minStackSize"); @@ -591,7 +586,7 @@ public class GT_MetaTileEntity_Hatch_InputBus_ME extends GT_MetaTileEntity_Hatch @Override public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, - int z) { + int z) { tag.setBoolean("autoPull", autoPullItemList); tag.setInteger("minStackSize", minAutoPullStackSize); super.getWailaNBTData(player, tile, tag, world, x, y, z); 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 606c0b8157..22afe4b9fe 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 @@ -43,14 +43,13 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatch_OutputBus - implements IPowerChannelState { + implements IPowerChannelState { private BaseActionSource requestSource = null; private AENetworkProxy gridProxy = null; IItemList itemCache = GregTech_API.mAE2 ? AEApi.instance() - .storage() - .createItemList() - : null; + .storage() + .createItemList() : null; long lastOutputTick = 0; long tickCounter = 0; boolean lastOutputFailed = false; @@ -58,16 +57,16 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc public GT_MetaTileEntity_Hatch_OutputBus_ME(int aID, String aName, String aNameRegional) { super( - aID, - aName, - aNameRegional, - 1, - new String[] { "Item Output for Multiblocks", "Stores directly into ME", }, - 0); + aID, + aName, + aNameRegional, + 1, + new String[] { "Item Output for Multiblocks", "Stores directly into ME", }, + 0); } public GT_MetaTileEntity_Hatch_OutputBus_ME(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, 0, aDescription, aTextures); } @@ -108,9 +107,9 @@ 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)); + AEApi.instance() + .storage() + .createItemStack(stack)); return 0; } @@ -132,12 +131,10 @@ 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; + .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 @@ -145,14 +142,14 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc if (gridProxy == null) { if (getBaseMetaTileEntity() instanceof IGridProxyable) { gridProxy = new AENetworkProxy( - (IGridProxyable) getBaseMetaTileEntity(), - "proxy", - ItemList.Hatch_Output_Bus_ME.get(1), - true); + (IGridProxyable) getBaseMetaTileEntity(), + "proxy", + ItemList.Hatch_Output_Bus_ME.get(1), + true); gridProxy.setFlags(GridFlags.REQUIRE_CHANNEL); if (getBaseMetaTileEntity().getWorld() != null) gridProxy.setOwner( - getBaseMetaTileEntity().getWorld() - .getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName())); + getBaseMetaTileEntity().getWorld() + .getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName())); } } return this.gridProxy; @@ -170,7 +167,7 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc } try { IMEMonitor sg = proxy.getStorage() - .getItemInventory(); + .getItemInventory(); for (IAEItemStack s : itemCache) { if (s.getStackSize() == 0) continue; IAEItemStack rest = Platform.poweredInsert(proxy.getEnergy(), sg, s, getRequest()); @@ -217,7 +214,7 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc NBTTagCompound tag = new NBTTagCompound(); NBTTagCompound tagItemStack = new NBTTagCompound(); s.getItemStack() - .writeToNBT(tagItemStack); + .writeToNBT(tagItemStack); tag.setTag("itemStack", tagItemStack); tag.setLong("size", s.getStackSize()); items.appendTag(tag); @@ -234,30 +231,30 @@ 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))); + AEApi.instance() + .storage() + .createItemStack(GT_Utility.loadItem((NBTTagCompound) t))); t = aNBT.getTag("cachedItems"); if (t instanceof NBTTagList l) { for (int i = 0; i < l.tagCount(); ++i) { 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)); + .storage() + .createItemStack(GT_Utility.loadItem(tagItemStack)); if (s != null) { s.setStackSize(tag.getLong("size")); itemCache.add(s); } else { GT_Mod.GT_FML_LOGGER.warn( - "An error occurred while loading contents of ME Output Bus, some items have been voided"); + "An error occurred while loading contents of ME Output Bus, some items have been voided"); } } } @@ -279,8 +276,8 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc if (!GregTech_API.mAE2) return new String[] {}; List ss = new ArrayList<>(); ss.add( - "The bus is " + ((getProxy() != null && getProxy().isActive()) ? EnumChatFormatting.GREEN + "online" - : EnumChatFormatting.RED + "offline" + getAEDiagnostics()) + EnumChatFormatting.RESET); + "The bus is " + ((getProxy() != null && getProxy().isActive()) ? EnumChatFormatting.GREEN + "online" + : EnumChatFormatting.RED + "offline" + getAEDiagnostics()) + EnumChatFormatting.RESET); if (itemCache.isEmpty()) { ss.add("The bus has no cached items"); } else { @@ -289,11 +286,11 @@ 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()) + ": " - + EnumChatFormatting.GOLD - + nc.toWideReadableForm(s.getStackSize()) - + EnumChatFormatting.RESET); + s.getItem() + .getItemStackDisplayName(s.getItemStack()) + ": " + + EnumChatFormatting.GOLD + + nc.toWideReadableForm(s.getStackSize()) + + EnumChatFormatting.RESET); if (++counter > 100) break; } } 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 780a6c03de..0c65d1bc2e 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 @@ -52,9 +52,8 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O private BaseActionSource requestSource = null; private AENetworkProxy gridProxy = null; IItemList fluidCache = GregTech_API.mAE2 ? AEApi.instance() - .storage() - .createFluidList() - : null; + .storage() + .createFluidList() : null; long lastOutputTick = 0; long tickCounter = 0; boolean lastOutputFailed = false; @@ -62,12 +61,12 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O public GT_MetaTileEntity_Hatch_Output_ME(int aID, String aName, String aNameRegional) { super( - aID, - aName, - aNameRegional, - 1, - new String[] { "Fluid Output for Multiblocks", "Stores directly into ME", }, - 0); + aID, + aName, + aNameRegional, + 1, + new String[] { "Fluid Output for Multiblocks", "Stores directly into ME", }, + 0); } public GT_MetaTileEntity_Hatch_Output_ME(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { @@ -115,9 +114,9 @@ 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)); + AEApi.instance() + .storage() + .createFluidStack(aFluid)); return aFluid.amount; } @@ -153,12 +152,11 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O 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; + .isGUIClickable()) return; infiniteCache = !infiniteCache; GT_Utility.sendChatToPlayer( - aPlayer, - StatCollector.translateToLocal("GT5U.hatch.infiniteCacheFluid." + infiniteCache)); + aPlayer, + StatCollector.translateToLocal("GT5U.hatch.infiniteCacheFluid." + infiniteCache)); } @Override @@ -166,14 +164,14 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O if (gridProxy == null) { if (getBaseMetaTileEntity() instanceof IGridProxyable) { gridProxy = new AENetworkProxy( - (IGridProxyable) getBaseMetaTileEntity(), - "proxy", - ItemList.Hatch_Output_ME.get(1), - true); + (IGridProxyable) getBaseMetaTileEntity(), + "proxy", + ItemList.Hatch_Output_ME.get(1), + true); gridProxy.setFlags(GridFlags.REQUIRE_CHANNEL); if (getBaseMetaTileEntity().getWorld() != null) gridProxy.setOwner( - getBaseMetaTileEntity().getWorld() - .getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName())); + getBaseMetaTileEntity().getWorld() + .getPlayerEntityByName(getBaseMetaTileEntity().getOwnerName())); } } return this.gridProxy; @@ -191,7 +189,7 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O } try { IMEMonitor sg = proxy.getStorage() - .getFluidInventory(); + .getFluidInventory(); for (IAEFluidStack s : fluidCache) { if (s.getStackSize() == 0) continue; IAEFluidStack rest = fluidAEInsert(proxy.getEnergy(), sg, s, getRequest()); @@ -237,7 +235,7 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O NBTTagCompound tag = new NBTTagCompound(); NBTTagCompound tagFluidStack = new NBTTagCompound(); s.getFluidStack() - .writeToNBT(tagFluidStack); + .writeToNBT(tagFluidStack); tag.setTag("fluidStack", tagFluidStack); tag.setLong("size", s.getStackSize()); fluids.appendTag(tag); @@ -257,14 +255,14 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O NBTTagCompound tag = l.getCompoundTagAt(i); NBTTagCompound tagFluidStack = tag.getCompoundTag("fluidStack"); final IAEFluidStack s = AEApi.instance() - .storage() - .createFluidStack(GT_Utility.loadFluid(tagFluidStack)); + .storage() + .createFluidStack(GT_Utility.loadFluid(tagFluidStack)); if (s != null) { s.setStackSize(tag.getLong("size")); fluidCache.add(s); } else { GT_Mod.GT_FML_LOGGER.warn( - "An error occurred while loading contents of ME Output Hatch, some fluids have been voided"); + "An error occurred while loading contents of ME Output Hatch, some fluids have been voided"); } } } @@ -286,8 +284,8 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O if (!GregTech_API.mAE2) return new String[] {}; List ss = new ArrayList<>(); ss.add( - "The hatch is " + ((getProxy() != null && getProxy().isActive()) ? EnumChatFormatting.GREEN + "online" - : EnumChatFormatting.RED + "offline" + getAEDiagnostics()) + EnumChatFormatting.RESET); + "The hatch is " + ((getProxy() != null && getProxy().isActive()) ? EnumChatFormatting.GREEN + "online" + : EnumChatFormatting.RED + "offline" + getAEDiagnostics()) + EnumChatFormatting.RESET); if (fluidCache.isEmpty()) { ss.add("The bus has no cached fluids"); } else { @@ -296,12 +294,12 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O int counter = 0; for (IAEFluidStack s : fluidCache) { ss.add( - s.getFluidStack() - .getLocalizedName() + ": " - + EnumChatFormatting.GOLD - + nc.toWideReadableForm(s.getStackSize()) - + " mB" - + EnumChatFormatting.RESET); + s.getFluidStack() + .getLocalizedName() + ": " + + EnumChatFormatting.GOLD + + nc.toWideReadableForm(s.getStackSize()) + + " mB" + + EnumChatFormatting.RESET); if (++counter > 100) break; } } @@ -309,7 +307,7 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O } public static IAEFluidStack fluidAEInsert(final IEnergySource energy, final IMEInventory cell, - final IAEFluidStack input, final BaseActionSource src) { + final IAEFluidStack input, final BaseActionSource src) { final IAEFluidStack possible = cell.injectItems(input.copy(), Actionable.SIMULATE, src); long stored = input.getStackSize(); 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 ad55276576..089713f01a 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 @@ -42,66 +42,66 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba int cZ; public GT_MetaTileEntity_AdvSeismicProspector(int aID, String aName, String aNameRegional, int aTier, int aRadius, - int aStep) { + int aStep) { super( - aID, - aName, - aNameRegional, - aTier, - 1, // amperage - "", - 1, // input slot count - 1, // output slot count - "Default.png", // GUI name - "", // NEI name - TextureFactory.of( - TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), - 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())); + aID, + aName, + aNameRegional, + aTier, + 1, // amperage + "", + 1, // input slot count + 1, // output slot count + "Default.png", // GUI name + "", // NEI name + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), + 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())); radius = aRadius; step = aStep; } @@ -109,14 +109,14 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba @Override public String[] getDescription() { return new String[] { "Place, activate with explosives", - "2 Powderbarrels, " + "4 Glyceryl Trinitrate, " + "16 TNT, or " + "8 ITNT", - "Use Data Stick, Scan Data Stick, Print Data Stick, Bind Pages into Book", - "Ore prospecting area = " + radius * 2 + "x" + radius * 2 + " ONLY blocks below prospector", - "Oil prospecting area 3x3 oilfields, each is 8x8 chunks" }; + "2 Powderbarrels, " + "4 Glyceryl Trinitrate, " + "16 TNT, or " + "8 ITNT", + "Use Data Stick, Scan Data Stick, Print Data Stick, Bind Pages into Book", + "Ore prospecting area = " + radius * 2 + "x" + radius * 2 + " ONLY blocks below prospector", + "Oil prospecting area 3x3 oilfields, each is 8x8 chunks" }; } protected GT_MetaTileEntity_AdvSeismicProspector(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures, String aGUIName, String aNEIName, int aRadius, int aStep) { + ITexture[][][] aTextures, String aGUIName, String aNEIName, int aRadius, int aStep) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); radius = aRadius; step = aStep; @@ -125,14 +125,14 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_AdvSeismicProspector( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures, - this.mGUIName, - this.mNEIName, - this.radius, - this.step); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName, + this.radius, + this.step); } @Override @@ -141,43 +141,43 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba ItemStack aStack = aPlayer.getCurrentEquippedItem(); if (!ready && (GT_Utility.consumeItems(aPlayer, aStack, Item.getItemFromBlock(Blocks.tnt), 16) - || GT_Utility.consumeItems(aPlayer, aStack, Ic2Items.industrialTnt.getItem(), 8) - || GT_Utility.consumeItems(aPlayer, aStack, Materials.Glyceryl, 4) - || GT_Utility.consumeItems(aPlayer, aStack, ItemList.Block_Powderbarrel.getItem(), 2))) { + || GT_Utility.consumeItems(aPlayer, aStack, Ic2Items.industrialTnt.getItem(), 8) + || GT_Utility.consumeItems(aPlayer, aStack, Materials.Glyceryl, 4) + || GT_Utility.consumeItems(aPlayer, aStack, ItemList.Block_Powderbarrel.getItem(), 2))) { this.ready = true; this.mMaxProgresstime = (aPlayer.capabilities.isCreativeMode ? 20 : 800); } else if (ready && mMaxProgresstime == 0 - && aStack != null - && aStack.stackSize == 1 - && aStack.getItem() == ItemList.Tool_DataStick.getItem()) { - this.ready = false; - - // prospecting ores - HashMap tOres = new HashMap<>(36); - - prospectOres(tOres); - - // prospecting oils - ArrayList tOils = new ArrayList<>(); - prospectOils(tOils); - - GT_Utility.ItemNBT.setAdvancedProspectionData( - mTier, - aStack, - this.getBaseMetaTileEntity() - .getXCoord(), - this.getBaseMetaTileEntity() - .getYCoord(), - this.getBaseMetaTileEntity() - .getZCoord(), - this.getBaseMetaTileEntity() - .getWorld().provider.dimensionId, - tOils, - GT_Utility.sortByValueToList(tOres), - radius); - } + && aStack != null + && aStack.stackSize == 1 + && aStack.getItem() == ItemList.Tool_DataStick.getItem()) { + this.ready = false; + + // prospecting ores + HashMap tOres = new HashMap<>(36); + + prospectOres(tOres); + + // prospecting oils + ArrayList tOils = new ArrayList<>(); + prospectOils(tOils); + + GT_Utility.ItemNBT.setAdvancedProspectionData( + mTier, + aStack, + this.getBaseMetaTileEntity() + .getXCoord(), + this.getBaseMetaTileEntity() + .getYCoord(), + this.getBaseMetaTileEntity() + .getZCoord(), + this.getBaseMetaTileEntity() + .getWorld().provider.dimensionId, + tOils, + GT_Utility.sortByValueToList(tOres), + radius); + } } return true; @@ -202,9 +202,7 @@ 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); + .getChunkFromChunkCoords(xChunk + i + x * oilfieldSize, zChunk + j + z * oilfieldSize); FluidStack tFluid = undergroundOilReadInformation(tChunk); if (tFluid != null) { if (tFluid.amount > max) max = tFluid.amount; @@ -217,13 +215,13 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba } aOils.add( - ++oilFieldCount + "," - + min - + "-" - + max - + "," - + tFluids.get(cInts) - .getLocalizedName()); + ++oilFieldCount + "," + + min + + "-" + + max + + "," + + tFluids.get(cInts) + .getLocalizedName()); } } } catch (Exception ignored) {} @@ -231,13 +229,11 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba private void prospectOres(Map aOres) { int tLeftXBound = this.getBaseMetaTileEntity() - .getXCoord() - - radius; + .getXCoord() - radius; int tRightXBound = tLeftXBound + 2 * radius; int tLeftZBound = this.getBaseMetaTileEntity() - .getZCoord() - - radius; + .getZCoord() - radius; int tRightZBound = tLeftZBound + 2 * radius; for (int i = tLeftXBound; i <= tRightXBound; i += step) { @@ -258,7 +254,7 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba private void prospectHole(int i, int k, Map aOres) { String tFoundOre; for (int j = this.getBaseMetaTileEntity() - .getYCoord(); j > 0; j--) { + .getYCoord(); j > 0; j--) { tFoundOre = checkForOre(i, j, k); if (tFoundOre != null) countOre(aOres, tFoundOre, cX, cZ); } @@ -266,28 +262,27 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba private String checkForOre(int x, int y, int z) { Block tBlock = this.getBaseMetaTileEntity() - .getBlock(x, y, z); + .getBlock(x, y, z); if (tBlock instanceof GT_Block_Ores_Abstract) { TileEntity tTileEntity = getBaseMetaTileEntity().getWorld() - .getTileEntity(x, y, z); + .getTileEntity(x, y, z); if ((tTileEntity instanceof GT_TileEntity_Ores) && (((GT_TileEntity_Ores) tTileEntity).mMetaData < 16000)) { // Filtering // small // ores Materials tMaterial = GregTech_API.sGeneratedMaterials[((GT_TileEntity_Ores) tTileEntity).mMetaData - % 1000]; + % 1000]; if ((tMaterial != null) && (tMaterial != Materials._NULL)) return tMaterial.mDefaultLocalName; } } else { int tMetaID = getBaseMetaTileEntity().getWorld() - .getBlockMetadata(x, y, z); + .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"))) - return association.mMaterial.mMaterial.mDefaultLocalName; + .startsWith("ore"))) return association.mMaterial.mMaterial.mDefaultLocalName; else if (GT_Utility.isOre(tBlock, tMetaID)) return tBlock.getLocalizedName(); } return null; 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 1b30282781..02c1897522 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 @@ -22,85 +22,85 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine public GT_MetaTileEntity_Boxinator(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 1, - "Puts things into Boxes", - 2, - 1, - "Packager.png", - "", - TextureFactory.of( - TextureFactory.of(OVERLAY_SIDE_BOXINATOR_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_FRONT_BOXINATOR_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_TOP_BOXINATOR_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_BOTTOM_BOXINATOR_ACTIVE), - 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())); + aID, + aName, + aNameRegional, + aTier, + 1, + "Puts things into Boxes", + 2, + 1, + "Packager.png", + "", + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_BOXINATOR_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_FRONT_BOXINATOR_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_TOP_BOXINATOR_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_BOTTOM_BOXINATOR_ACTIVE), + 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())); } public GT_MetaTileEntity_Boxinator(String aName, int aTier, String aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 2, 1, aGUIName, aNEIName); } public GT_MetaTileEntity_Boxinator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 2, 1, aGUIName, aNEIName); } @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Boxinator( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures, - this.mGUIName, - this.mNEIName); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName); } @Override @@ -110,10 +110,9 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine private boolean hasValidCache(ItemStack mItem, int mType, boolean mClearOnFailure) { if (aInputCache != null && aOutputCache != null - && aTypeCache == mType - && aInputCache.isItemEqual(mItem) - && ItemStack.areItemStackTagsEqual(mItem, aInputCache)) - return true; + && aTypeCache == mType + && aInputCache.isItemEqual(mItem) + && ItemStack.areItemStackTagsEqual(mItem, aInputCache)) return true; // clear cache if it was invalid if (mClearOnFailure) { aInputCache = null; @@ -138,7 +137,7 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine ItemStack tSlot0 = getInputAt(0); ItemStack tSlot1 = getInputAt(1); if ((GT_Utility.isStackValid(tSlot0)) && (GT_Utility.isStackValid(tSlot1)) - && (GT_Utility.getContainerItem(tSlot0, true) == null)) { + && (GT_Utility.getContainerItem(tSlot0, true) == null)) { if ((ItemList.Schematic_1by1.isStackEqual(tSlot1)) && (tSlot0.stackSize >= 1)) { boolean tIsCached = hasValidCache(tSlot0, 1, true); this.mOutputItems[0] = tIsCached ? aOutputCache.copy() : GT_ModHandler.getRecipeOutput(tSlot0); @@ -158,7 +157,7 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine if ((ItemList.Schematic_2by2.isStackEqual(tSlot1)) && (getInputAt(0).stackSize >= 4)) { boolean tIsCached = hasValidCache(tSlot0, 2, true); this.mOutputItems[0] = tIsCached ? aOutputCache.copy() - : GT_ModHandler.getRecipeOutput(tSlot0, tSlot0, null, tSlot0, tSlot0); + : GT_ModHandler.getRecipeOutput(tSlot0, tSlot0, null, tSlot0, tSlot0); if (this.mOutputItems[0] != null) { if (canOutput(this.mOutputItems[0])) { getInputAt(0).stackSize -= 4; @@ -175,16 +174,8 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine if ((ItemList.Schematic_3by3.isStackEqual(tSlot1)) && (getInputAt(0).stackSize >= 9)) { boolean tIsCached = hasValidCache(tSlot0, 3, true); this.mOutputItems[0] = tIsCached ? aOutputCache.copy() - : GT_ModHandler.getRecipeOutput( - tSlot0, - tSlot0, - tSlot0, - tSlot0, - tSlot0, - tSlot0, - tSlot0, - tSlot0, - tSlot0); + : GT_ModHandler + .getRecipeOutput(tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0, tSlot0); if (this.mOutputItems[0] != null) { if (canOutput(this.mOutputItems[0])) { getInputAt(0).stackSize -= 9; @@ -204,39 +195,31 @@ public class GT_MetaTileEntity_Boxinator extends GT_MetaTileEntity_BasicMachine @Override protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, - ItemStack aStack) { + ItemStack aStack) { if (!super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack)) { return false; } ItemStack tInput1 = getInputAt(1); if ((ItemList.Schematic_1by1.isStackEqual(tInput1)) || (ItemList.Schematic_2by2.isStackEqual(tInput1)) - || (ItemList.Schematic_3by3.isStackEqual(tInput1))) { + || (ItemList.Schematic_3by3.isStackEqual(tInput1))) { if (hasValidCache(aStack, aTypeCache, false)) return true; if (GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.findRecipe( - getBaseMetaTileEntity(), - true, - gregtech.api.enums.GT_Values.V[mTier], - null, - GT_Utility.copyAmount(64L, aStack), - tInput1) != null) { + getBaseMetaTileEntity(), + true, + gregtech.api.enums.GT_Values.V[mTier], + null, + GT_Utility.copyAmount(64L, aStack), + tInput1) != null) { return true; } if (ItemList.Schematic_1by1.isStackEqual(getInputAt(1)) && GT_ModHandler.getRecipeOutput(aStack) != null) return true; if (ItemList.Schematic_2by2.isStackEqual(getInputAt(1)) - && GT_ModHandler.getRecipeOutput(aStack, aStack, null, aStack, aStack) != null) { + && 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_Charger.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java index f273197026..de43fd715e 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java @@ -14,17 +14,17 @@ import gregtech.api.util.GT_Utility; public class GT_MetaTileEntity_Charger extends GT_MetaTileEntity_BasicBatteryBuffer { public GT_MetaTileEntity_Charger(int aID, String aName, String aNameRegional, int aTier, String aDescription, - int aSlotCount) { + int aSlotCount) { super(aID, aName, aNameRegional, aTier, aDescription, aSlotCount); } public GT_MetaTileEntity_Charger(String aName, int aTier, String aDescription, ITexture[][][] aTextures, - int aSlotCount) { + int aSlotCount) { super(aName, aTier, aDescription, aTextures, aSlotCount); } public GT_MetaTileEntity_Charger(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, - int aSlotCount) { + int aSlotCount) { super(aName, aTier, aDescription, aTextures, aSlotCount); } @@ -62,40 +62,41 @@ public class GT_MetaTileEntity_Charger extends GT_MetaTileEntity_BasicBatteryBuf if (mBaseMetaTileEntity.getMetaTileEntity() instanceof MetaTileEntity mMetaTileEntity) { // for (int t = 0; t < 6; t++) { if (mMetaTileEntity.dechargerSlotCount() > 0 - && mBaseMetaTileEntity.getStoredEU() < mBaseMetaTileEntity.getEUCapacity()) { + && mBaseMetaTileEntity.getStoredEU() < mBaseMetaTileEntity.getEUCapacity()) { for (int i = mMetaTileEntity.dechargerSlotStartIndex(), - k = mMetaTileEntity.dechargerSlotCount() + i; i < k; i++) { + k = mMetaTileEntity.dechargerSlotCount() + i; i < k; i++) { if (mMetaTileEntity.mInventory[i] != null - && mBaseMetaTileEntity.getStoredEU() < mBaseMetaTileEntity.getEUCapacity()) { + && mBaseMetaTileEntity.getStoredEU() < mBaseMetaTileEntity.getEUCapacity()) { mBaseMetaTileEntity.increaseStoredEnergyUnits( - GT_ModHandler.dischargeElectricItem( - mMetaTileEntity.mInventory[i], - GT_Utility.safeInt( - Math.min( - V[mTier] * 15, - mBaseMetaTileEntity.getEUCapacity() - - mBaseMetaTileEntity.getStoredEU())), - (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getInputTier()), - true, - false, - false), - true); + GT_ModHandler.dischargeElectricItem( + mMetaTileEntity.mInventory[i], + GT_Utility.safeInt( + Math.min( + V[mTier] * 15, + mBaseMetaTileEntity.getEUCapacity() + - mBaseMetaTileEntity.getStoredEU())), + (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getInputTier()), + true, + false, + false), + true); if (mMetaTileEntity.mInventory[i].stackSize <= 0) mMetaTileEntity.mInventory[i] = null; } } } if (mMetaTileEntity.rechargerSlotCount() > 0 && mBaseMetaTileEntity.getStoredEU() > 0) { for (int i = mMetaTileEntity.rechargerSlotStartIndex(), - k = mMetaTileEntity.rechargerSlotCount() + i; i < k; i++) { + k = mMetaTileEntity.rechargerSlotCount() + i; i < k; i++) { if (mBaseMetaTileEntity.getStoredEU() > 0 && mMetaTileEntity.mInventory[i] != null) { - mBaseMetaTileEntity.decreaseStoredEU( + mBaseMetaTileEntity + .decreaseStoredEU( GT_ModHandler.chargeElectricItem( - mMetaTileEntity.mInventory[i], - GT_Utility.safeInt( - Math.min(V[mTier] * 15, mBaseMetaTileEntity.getStoredEU())), - (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getOutputTier()), - true, - false), + mMetaTileEntity.mInventory[i], + GT_Utility + .safeInt(Math.min(V[mTier] * 15, mBaseMetaTileEntity.getStoredEU())), + (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getOutputTier()), + true, + false), true); if (mMetaTileEntity.mInventory[i].stackSize <= 0) mMetaTileEntity.mInventory[i] = null; } 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 fb0bbfb4c2..01832d0d96 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 @@ -21,55 +21,52 @@ public class GT_MetaTileEntity_CuringOven extends GT_MetaTileEntity_BasicMachine public GT_MetaTileEntity_CuringOven(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 1, - "Heats tools for hardening", - 1, - 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")), - 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"))); + aID, + aName, + aNameRegional, + aTier, + 1, + "Heats tools for hardening", + 1, + 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")), + 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"))); } public GT_MetaTileEntity_CuringOven(String aName, int aTier, String aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } public GT_MetaTileEntity_CuringOven(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_CuringOven( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures, - this.mGUIName, - this.mNEIName); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName); } @Override protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, - ItemStack aStack) { + ItemStack aStack) { return (super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack)) - && ItemList.Cell_Empty.isStackEqual(aStack); + && ItemList.Cell_Empty.isStackEqual(aStack); } @Override @@ -81,34 +78,34 @@ public class GT_MetaTileEntity_CuringOven extends GT_MetaTileEntity_BasicMachine public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aBaseMetaTileEntity.isServerSide()) { for (ItemStack tStack : mInventory) if (tStack != null && tStack.getItem() instanceof GT_MetaGenerated_Tool - && getBaseMetaTileEntity().getStoredEU() > 0) { - getBaseMetaTileEntity().decreaseStoredEnergyUnits(24, true); - NBTTagCompound aNBT = tStack.getTagCompound(); - if (aNBT != null) { - int tHeat = 300; - long tWorldTime = getBaseMetaTileEntity().getWorld() - .getTotalWorldTime(); - aNBT = aNBT.getCompoundTag("GT.ToolStats"); - if (aNBT != null && aNBT.hasKey("Heat")) { - tHeat = aNBT.getInteger("Heat"); - if (aNBT.hasKey("HeatTime")) { - long tHeatTime = aNBT.getLong("HeatTime"); - if (tWorldTime > (tHeatTime + 10)) { - tHeat = (int) (tHeat - ((tWorldTime - tHeatTime) / 10)); - if (tHeat < 300) tHeat = 300; - } + && getBaseMetaTileEntity().getStoredEU() > 0) { + getBaseMetaTileEntity().decreaseStoredEnergyUnits(24, true); + NBTTagCompound aNBT = tStack.getTagCompound(); + if (aNBT != null) { + int tHeat = 300; + long tWorldTime = getBaseMetaTileEntity().getWorld() + .getTotalWorldTime(); + aNBT = aNBT.getCompoundTag("GT.ToolStats"); + if (aNBT != null && aNBT.hasKey("Heat")) { + tHeat = aNBT.getInteger("Heat"); + if (aNBT.hasKey("HeatTime")) { + long tHeatTime = aNBT.getLong("HeatTime"); + if (tWorldTime > (tHeatTime + 10)) { + tHeat = (int) (tHeat - ((tWorldTime - tHeatTime) / 10)); + if (tHeat < 300) tHeat = 300; } } - tHeat++; - if (aNBT != null) { - aNBT.setInteger("Heat", tHeat); - aNBT.setLong("HeatTime", tWorldTime); - } - if (tHeat > GT_MetaGenerated_Tool.getPrimaryMaterial(tStack).mMeltingPoint) { - mInventory[0] = null; - } + } + tHeat++; + if (aNBT != null) { + aNBT.setInteger("Heat", tHeat); + aNBT.setLong("HeatTime", tWorldTime); + } + if (tHeat > GT_MetaGenerated_Tool.getPrimaryMaterial(tStack).mMeltingPoint) { + mInventory[0] = null; } } + } } } 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 70b9ecbc22..a0e5561559 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 @@ -76,7 +76,7 @@ import gregtech.api.util.GT_Utility; import gregtech.common.GT_Client; public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicMachine - implements IBeeHousing, IBeeHousingInventory, IErrorLogic, IBeeModifier, IBeeListener, IAddUIWidgets { + implements IBeeHousing, IBeeHousingInventory, IErrorLogic, IBeeModifier, IBeeListener, IAddUIWidgets { public static final int beeCycleLength = 550; public static final int baseEUtUsage = 37; @@ -95,85 +95,85 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM public GT_MetaTileEntity_IndustrialApiary(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 4, - new String[] { "BEES GOES BRRRR", EnumChatFormatting.GRAY + AuthorKuba }, - 6, - 9, - "IndustrialApiary.png", - "", - TextureFactory.of( - TextureFactory.of(OVERLAY_SIDE_INDUSTRIAL_APIARY_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_FRONT_INDUSTRIAL_APIARY_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_TOP_INDUSTRIAL_APIARY_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_BOTTOM_INDUSTRIAL_APIARY_ACTIVE), - 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())); + aID, + aName, + aNameRegional, + aTier, + 4, + new String[] { "BEES GOES BRRRR", EnumChatFormatting.GRAY + AuthorKuba }, + 6, + 9, + "IndustrialApiary.png", + "", + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_INDUSTRIAL_APIARY_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_FRONT_INDUSTRIAL_APIARY_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_TOP_INDUSTRIAL_APIARY_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_BOTTOM_INDUSTRIAL_APIARY_ACTIVE), + 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())); } public GT_MetaTileEntity_IndustrialApiary(String aName, int aTier, String aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 4, aDescription, aTextures, 6, 9, aGUIName, aNEIName); } public GT_MetaTileEntity_IndustrialApiary(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 4, aDescription, aTextures, 6, 9, aGUIName, aNEIName); } @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_IndustrialApiary( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures, - this.mGUIName, - this.mNEIName); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName); } @Override @@ -195,11 +195,11 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM private void openGUI(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { IndustrialApiaryUI.open( - aPlayer, - aBaseMetaTileEntity.getWorld(), - aBaseMetaTileEntity.getXCoord(), - aBaseMetaTileEntity.getYCoord(), - aBaseMetaTileEntity.getZCoord()); + aPlayer, + aBaseMetaTileEntity.getWorld(), + aBaseMetaTileEntity.getXCoord(), + aBaseMetaTileEntity.getYCoord(), + aBaseMetaTileEntity.getZCoord()); } @Override @@ -256,13 +256,13 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM if (isRetrievingPollen && floweringMod > 0f) { final int icycles = (int) cycles - + (getWorld().rand.nextFloat() < (cycles - (float) ((int) cycles)) ? 1 : 0); + + (getWorld().rand.nextFloat() < (cycles - (float) ((int) cycles)) ? 1 : 0); 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()); + .getSpeciesRoot() + .getMemberStack(p, EnumGermlingType.POLLEN.ordinal()); if (s != null) { final GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(s); pollen.computeIfAbsent(id, k -> { @@ -290,45 +290,37 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM final HashMap dropstacks = new HashMap<>(); for (Map.Entry entry : primary.getProductChances() - .entrySet()) { + .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); + id, + Bee.getFinalChance(entry.getValue(), speed, prodMod, 8f) * (float) entry.getKey().stackSize + * cycles, + Float::sum); dropstacks.computeIfAbsent(id, k -> entry.getKey()); } for (Map.Entry entry : secondary.getProductChances() - .entrySet()) { + .entrySet()) { final GT_Utility.ItemId id = GT_Utility.ItemId.createNoCopy(entry.getKey()); drops.merge( - id, - Bee.getFinalChance(entry.getValue() / 2f, speed, prodMod, 8f) - * (float) entry.getKey().stackSize - * cycles, - Float::sum); + id, + Bee.getFinalChance(entry.getValue() / 2f, speed, prodMod, 8f) * (float) entry.getKey().stackSize + * cycles, + Float::sum); dropstacks.computeIfAbsent(id, k -> entry.getKey()); } if (primary.isJubilant(genome, this) && secondary.isJubilant(genome, this)) for (Map.Entry 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()); - } + .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; @@ -370,11 +362,11 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM for (Map.Entry entry : drops.entrySet()) { final ItemStack s = dropstacks.get(entry.getKey()) - .copy(); + .copy(); s.stackSize = entry.getValue() - .intValue() - + (getWorld().rand.nextFloat() < (entry.getValue() - (float) entry.getValue() - .intValue()) ? 1 : 0); + .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; @@ -426,7 +418,7 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM this.mOutputItems[0] = new ItemStack(PluginApiculture.items.beeQueenGE); this.mOutputItems[0].setTagCompound(nbttagcompound); beeRoot.getBreedingTracker(getWorld(), getOwner()) - .registerQueen(princess); + .registerQueen(princess); setQueen(null); getDrone().stackSize -= 1; @@ -484,12 +476,12 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM if (effect instanceof IAlleleBeeAcceleratableEffect) { effectData[0] = effect.validateStorage(effectData[0]); effectData[0] = ((IAlleleBeeAcceleratableEffect) effect).doEffectAccelerated( - genome, - effectData[0], - this, - usedBeeLife / (effect instanceof AlleleEffectThrottled - ? (float) AlleleBeeEffectThrottledField.getInt(effect) - : 1f)); + genome, + effectData[0], + this, + usedBeeLife / (effect instanceof AlleleEffectThrottled + ? (float) AlleleBeeEffectThrottledField.getInt(effect) + : 1f)); } if (!effect.isCombinable()) return; @@ -500,12 +492,12 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM if (secondary instanceof IAlleleBeeAcceleratableEffect) { effectData[1] = secondary.validateStorage(effectData[1]); effectData[1] = ((IAlleleBeeAcceleratableEffect) secondary).doEffectAccelerated( - genome, - effectData[0], - this, - usedBeeLife / (secondary instanceof AlleleEffectThrottled - ? (float) AlleleBeeEffectThrottledField.getInt(secondary) - : 1f)); + genome, + effectData[0], + this, + usedBeeLife / (secondary instanceof AlleleEffectThrottled + ? (float) AlleleBeeEffectThrottledField.getInt(secondary) + : 1f)); } } catch (Exception ex) { ex.printStackTrace(); @@ -542,9 +534,9 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM if (!aBaseMetaTileEntity.isActive()) { if (aBaseMetaTileEntity.isAllowedToWork() - && (aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0 - || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) - && hasEnoughEnergyToCheckRecipe()) { + && (aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0 + || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) + && hasEnoughEnergyToCheckRecipe()) { final int check = checkRecipe(); if (check == FOUND_AND_SUCCESSFULLY_USED_RECIPE) { aBaseMetaTileEntity.setActive(true); @@ -577,11 +569,10 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM if (usedQueenBee == null) usedQueenBee = beeRoot.getMember(usedQueen); doEffect(); if (!retrievingPollenInThisOperation && floweringMod > 0f - && this.mProgresstime % pollinationDelay == 0) { + && this.mProgresstime % pollinationDelay == 0) { if (retrievedpollen == null) retrievedpollen = usedQueenBee.retrievePollen(this); if (retrievedpollen != null && (usedQueenBee.pollinateRandom(this, retrievedpollen) - || this.mProgresstime % (pollinationDelay * 5) == 0)) - retrievedpollen = null; + || this.mProgresstime % (pollinationDelay * 5) == 0)) retrievedpollen = null; } } @@ -599,16 +590,15 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM if (mOutputItems[i] != null) for (int j = 0; j < mOutputItems.length; j++) { if (j == 0 && isAutomated) { if (beeRoot.isMember(mOutputItems[i], EnumBeeType.QUEEN.ordinal()) - || beeRoot.isMember(mOutputItems[i], EnumBeeType.PRINCESS.ordinal())) { + || beeRoot.isMember(mOutputItems[i], EnumBeeType.PRINCESS.ordinal())) { if (aBaseMetaTileEntity.addStackToSlot(queen, mOutputItems[i])) break; } else if (beeRoot.isMember(mOutputItems[i], EnumBeeType.DRONE.ordinal())) if (aBaseMetaTileEntity.addStackToSlot(drone, mOutputItems[i])) break; } 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); @@ -619,24 +609,24 @@ 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; moveMultipleItemStacks( - aBaseMetaTileEntity, - tTileEntity2, - aBaseMetaTileEntity.getFrontFacing(), - aBaseMetaTileEntity.getBackFacing(), - null, - false, - (byte) 64, - (byte) 1, - (byte) 64, - (byte) 1, - tMaxStacks); + aBaseMetaTileEntity, + tTileEntity2, + aBaseMetaTileEntity.getFrontFacing(), + aBaseMetaTileEntity.getBackFacing(), + null, + false, + (byte) 64, + (byte) 1, + (byte) 64, + (byte) 1, + tMaxStacks); } if (aBaseMetaTileEntity.isAllowedToWork() && checkRecipe() == FOUND_AND_SUCCESSFULLY_USED_RECIPE) @@ -648,11 +638,11 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM public void cancelProcess() { if (this.getBaseMetaTileEntity() - .isActive() - && this.getBaseMetaTileEntity() - .isServerSide() - && usedQueen != null - && beeRoot.isMember(usedQueen, EnumBeeType.QUEEN.ordinal())) { + .isActive() + && this.getBaseMetaTileEntity() + .isServerSide() + && usedQueen != null + && beeRoot.isMember(usedQueen, EnumBeeType.QUEEN.ordinal())) { Arrays.fill(mOutputItems, null); mEUt = 0; mProgresstime = 0; @@ -671,7 +661,7 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM if (aStack == null) return false; if (aIndex < getInputSlot()) return true; if (aIndex == queen) return beeRoot.isMember(aStack, EnumBeeType.QUEEN.ordinal()) - || beeRoot.isMember(aStack, EnumBeeType.PRINCESS.ordinal()); + || beeRoot.isMember(aStack, EnumBeeType.PRINCESS.ordinal()); else if (aIndex == drone) return beeRoot.isMember(aStack, EnumBeeType.DRONE.ordinal()); else if (aIndex < getOutputSlot()) { if (!GT_ApiaryUpgrade.isUpgrade(aStack)) return false; @@ -682,12 +672,10 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM if (GT_Utility.areStacksEqual(getStackInSlot(i), aStack)) return false; if (GT_ApiaryUpgrade.isUpgrade(aStack)) { if (!GT_ApiaryUpgrade.getUpgrade(aStack) - .isAllowedToWorkWith(getStackInSlot(i))) - return false; + .isAllowedToWorkWith(getStackInSlot(i))) return false; } else if (GT_ApiaryUpgrade.isUpgrade(s)) { if (!GT_ApiaryUpgrade.getUpgrade(s) - .isAllowedToWorkWith(aStack)) - return false; + .isAllowedToWorkWith(aStack)) return false; } } return true; @@ -735,19 +723,19 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM @Override public int getBlockLightValue() { return this.getBaseMetaTileEntity() - .getLightLevelAtSide((byte) 1); + .getLightLevelAtSide((byte) 1); } @Override public boolean canBlockSeeTheSky() { return this.getBaseMetaTileEntity() - .getSkyAtSide((byte) 1); + .getSkyAtSide((byte) 1); } @Override public World getWorld() { return this.getBaseMetaTileEntity() - .getWorld(); + .getWorld(); } GameProfile owner = null; @@ -755,25 +743,25 @@ 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; } @Override public Vec3 getBeeFXCoordinates() { return Vec3.createVectorHelper( - getBaseMetaTileEntity().getXCoord() + 0.5, - getBaseMetaTileEntity().getYCoord() + 0.5, - getBaseMetaTileEntity().getZCoord() + 0.5); + getBaseMetaTileEntity().getXCoord() + 0.5, + getBaseMetaTileEntity().getYCoord() + 0.5, + getBaseMetaTileEntity().getZCoord() + 0.5); } @Override public BiomeGenBase getBiome() { if (biomeOverride == null) return this.getBaseMetaTileEntity() - .getBiome(); + .getBiome(); return biomeOverride; } @@ -796,7 +784,7 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM @Override public ChunkCoordinates getCoordinates() { return this.getBaseMetaTileEntity() - .getCoords(); + .getCoords(); } // endregion @@ -878,26 +866,20 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM private boolean checkFlower(IBee bee) { final String flowerType = bee.getGenome() - .getFlowerProvider() - .getFlowerType(); + .getFlowerProvider() + .getFlowerType(); if (!this.flowerType.equals(flowerType)) flowercoords = null; if (flowercoords != null) { if (getWorld().getBlock(flowercoords.posX, flowercoords.posY, flowercoords.posZ) != flowerBlock - || getWorld().getBlockMetadata(flowercoords.posX, flowercoords.posY, flowercoords.posZ) - != flowerBlockMeta) - if (!FlowerManager.flowerRegistry.isAcceptedFlower( - flowerType, - getWorld(), - flowercoords.posX, - flowercoords.posY, - flowercoords.posZ)) + || getWorld().getBlockMetadata(flowercoords.posX, flowercoords.posY, flowercoords.posZ) + != flowerBlockMeta) + if (!FlowerManager.flowerRegistry + .isAcceptedFlower(flowerType, getWorld(), flowercoords.posX, flowercoords.posY, flowercoords.posZ)) 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) { @@ -1111,12 +1093,12 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM }; private static final String POWER_SOURCE_POWER = "GT5U.machines.powersource.power", - CANCEL_PROCESS_TOOLTIP = "GT5U.machines.industrialapiary.cancel.tooltip", - SPEED_TOOLTIP = "GT5U.machines.industrialapiary.speed.tooltip", - SPEED_LOCKED_TOOLTIP = "GT5U.machines.industrialapiary.speedlocked.tooltip", - INFO_TOOLTIP = "GT5U.machines.industrialapiary.info.tooltip", - INFO_WITH_BEE_TOOLTIP = "GT5U.machines.industrialapiary.infoextended.tooltip", - UPGRADE_TOOLTIP = "GT5U.machines.industrialapiary.upgradeslot.tooltip"; + CANCEL_PROCESS_TOOLTIP = "GT5U.machines.industrialapiary.cancel.tooltip", + SPEED_TOOLTIP = "GT5U.machines.industrialapiary.speed.tooltip", + SPEED_LOCKED_TOOLTIP = "GT5U.machines.industrialapiary.speedlocked.tooltip", + INFO_TOOLTIP = "GT5U.machines.industrialapiary.info.tooltip", + INFO_WITH_BEE_TOOLTIP = "GT5U.machines.industrialapiary.infoextended.tooltip", + UPGRADE_TOOLTIP = "GT5U.machines.industrialapiary.upgradeslot.tooltip"; @Override public boolean useModularUI() { @@ -1125,150 +1107,126 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { - builder.widget( + 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) - .slotCreator(i -> new ApiarySlot(inventoryHandler, i)) - .applyForWidget( - widget -> widget.setGTTooltip(() -> mTooltipCache.getData(UPGRADE_TOOLTIP)) - .setTooltipShowUpDelay(TOOLTIP_DELAY)) - .build() - .setPos(61, 23)); + .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)); 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)); + 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)); } @Override @@ -1295,37 +1253,26 @@ 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()); + .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 getErrorDescriptions() { if (!mErrorStates.isEmpty()) { return mErrorStates.stream() - .map( - state -> EnumChatFormatting.RED - + StatCollector.translateToLocal("for." + state.getDescription())) - .collect(Collectors.toList()); + .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(); } @@ -1368,8 +1315,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 { @@ -1395,7 +1342,7 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM 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(); + .getMaxNumber(); if (slotStack != null) max = Math.max(0, max - slotStack.stackSize); max = Math.min(max, s.stackSize); if (max == 0) return null; @@ -1424,7 +1371,7 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM if (!GT_Utility.areStacksEqual(aStack, iStack)) continue; } int max = GT_ApiaryUpgrade.getUpgrade(aStack) - .getMaxNumber(); + .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 2c1e46ea9e..fd9062cbd4 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 @@ -32,75 +32,75 @@ public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMac public GT_MetaTileEntity_Massfabricator(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 1, - "UUM = Matter * Fabrication Squared", - 1, - 1, - "Massfabricator.png", - "", - TextureFactory.of( - TextureFactory.of(OVERLAY_SIDE_MASSFAB_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_FRONT_MASSFAB_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_TOP_MASSFAB_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_BOTTOM_MASSFAB_ACTIVE), - 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())); + aID, + aName, + aNameRegional, + aTier, + 1, + "UUM = Matter * Fabrication Squared", + 1, + 1, + "Massfabricator.png", + "", + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_MASSFAB_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_FRONT_MASSFAB_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_TOP_MASSFAB_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_BOTTOM_MASSFAB_ACTIVE), + 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())); EUt = V[1] * (long) Math.pow(2, mTier + 2); } public GT_MetaTileEntity_Massfabricator(String aName, int aTier, String aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); EUt = V[1] * (long) Math.pow(2, mTier + 2); } public GT_MetaTileEntity_Massfabricator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); EUt = V[1] * (long) Math.pow(2, mTier + 2); } @@ -108,12 +108,12 @@ public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMac @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Massfabricator( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures, - this.mGUIName, - this.mNEIName); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName); } @Override @@ -129,10 +129,8 @@ 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); @@ -155,8 +153,8 @@ public class GT_MetaTileEntity_Massfabricator extends GT_MetaTileEntity_BasicMac if ((tFluid == null) || (tFluid.amount < getCapacity())) { this.mOutputFluid = Materials.UUMatter.getFluid(1L); calculateOverclockedNess( - (int) EUt, - containsUUA(getFillableStack()) ? sDurationMultiplier / sUUASpeedBonus : sDurationMultiplier); + (int) EUt, + containsUUA(getFillableStack()) ? sDurationMultiplier / sUUASpeedBonus : sDurationMultiplier); // In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; @@ -165,9 +163,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 b72c456683..3db90597f6 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 @@ -44,7 +44,7 @@ import gregtech.api.util.GT_Config; import gregtech.api.util.GT_Utility; public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEntity_BasicTank - implements IAddGregtechLogo, IAddUIWidgets { + implements IAddGregtechLogo, IAddUIWidgets { private static boolean sInterDimensionalTeleportAllowed = true; private static int mMaxLoss = 50; @@ -64,22 +64,22 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt public GT_MetaTileEntity_MicrowaveEnergyTransmitter(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 3, - new String[] { "Transmits Energy Wirelessly", "Use Nitrogen Plasma", - "for Inter-dimensional transmission", "0.004EU Loss per 100 Blocks" }); + aID, + aName, + aNameRegional, + aTier, + 3, + new String[] { "Transmits Energy Wirelessly", "Use Nitrogen Plasma", "for Inter-dimensional transmission", + "0.004EU Loss per 100 Blocks" }); } public GT_MetaTileEntity_MicrowaveEnergyTransmitter(String aName, int aTier, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, 3, aDescription, aTextures); } public GT_MetaTileEntity_MicrowaveEnergyTransmitter(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, 3, aDescription, aTextures); } @@ -94,41 +94,41 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_MicrowaveEnergyTransmitter( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures); } @Override public String[] getInfoData() { return new String[] { "Coordinates:", - "X: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTargetX) + EnumChatFormatting.RESET, - "Y: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTargetY) + EnumChatFormatting.RESET, - "Z: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTargetZ) + EnumChatFormatting.RESET, - "Dimension: " + EnumChatFormatting.GREEN + this.mTargetD + EnumChatFormatting.RESET, - "Dimension Valid: " + (GT_Utility.isRealDimension(this.mTargetD) - ? EnumChatFormatting.GREEN + "Yes" + EnumChatFormatting.RESET - : EnumChatFormatting.RED + "No" + EnumChatFormatting.RESET), - "Dimension Registered: " + (DimensionManager.isDimensionRegistered(this.mTargetD) - ? EnumChatFormatting.GREEN + "Yes" + EnumChatFormatting.RESET - : EnumChatFormatting.RED + "No" + EnumChatFormatting.RESET) }; + "X: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTargetX) + EnumChatFormatting.RESET, + "Y: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTargetY) + EnumChatFormatting.RESET, + "Z: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTargetZ) + EnumChatFormatting.RESET, + "Dimension: " + EnumChatFormatting.GREEN + this.mTargetD + EnumChatFormatting.RESET, + "Dimension Valid: " + (GT_Utility.isRealDimension(this.mTargetD) + ? EnumChatFormatting.GREEN + "Yes" + EnumChatFormatting.RESET + : EnumChatFormatting.RED + "No" + EnumChatFormatting.RESET), + "Dimension Registered: " + (DimensionManager.isDimensionRegistered(this.mTargetD) + ? EnumChatFormatting.GREEN + "Yes" + EnumChatFormatting.RESET + : EnumChatFormatting.RED + "No" + EnumChatFormatting.RESET) }; } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + 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 @@ -153,10 +153,8 @@ 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); @@ -180,7 +178,7 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt for (byte j = -5; j <= 5; j = (byte) (j + 1)) { for (byte k = -5; k <= 5; k = (byte) (k + 1)) { if (getBaseMetaTileEntity().getBlockOffset(i, j, k) == GregTech_API.sBlockMetal5 - && getBaseMetaTileEntity().getMetaIDOffset(i, j, k) == 8) { // require osmiridium block + && getBaseMetaTileEntity().getMetaIDOffset(i, j, k) == 8) { // require osmiridium block return true; } } @@ -191,12 +189,12 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt public boolean hasDimensionalTeleportCapability() { return this.mDebug || (sInterDimensionalTeleportAllowed && (this.hasBlock - || mFluid != null && mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) && mFluid.amount >= 1000)); + || mFluid != null && mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) && mFluid.amount >= 1000)); } public boolean isDimensionalTeleportAvailable() { return this.mDebug || (hasDimensionalTeleportCapability() && GT_Utility.isRealDimension(this.mTargetD) - && GT_Utility.isRealDimension(getBaseMetaTileEntity().getWorld().provider.dimensionId)); + && GT_Utility.isRealDimension(getBaseMetaTileEntity().getWorld().provider.dimensionId)); } @Override @@ -215,8 +213,8 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt getBaseMetaTileEntity().decreaseStoredEnergyUnits(2L << (mTier - 1), false); } if (hasDimensionalTeleportCapability() - && this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId - && mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1))) { + && this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId + && mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1))) { mFluid.amount--; if (mFluid.amount < 1) { mFluid = null; @@ -248,8 +246,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)) { @@ -269,12 +267,12 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt private int distanceCalculation() { return Math.abs( - ((this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId) - && (isDimensionalTeleportAvailable()) ? 100 : 1) - * (int) Math.sqrt( - Math.pow(getBaseMetaTileEntity().getXCoord() - this.mTargetX, 2.0D) - + Math.pow(getBaseMetaTileEntity().getYCoord() - this.mTargetY, 2.0D) - + Math.pow(getBaseMetaTileEntity().getZCoord() - this.mTargetZ, 2.0D))); + ((this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId) + && (isDimensionalTeleportAvailable()) ? 100 : 1) + * (int) Math.sqrt( + Math.pow(getBaseMetaTileEntity().getXCoord() - this.mTargetX, 2.0D) + + Math.pow(getBaseMetaTileEntity().getYCoord() - this.mTargetY, 2.0D) + + Math.pow(getBaseMetaTileEntity().getZCoord() - this.mTargetZ, 2.0D))); } @Override @@ -415,32 +413,31 @@ 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); @@ -448,40 +445,40 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt addChangeNumberButtons(builder, GT_UITextures.OVERLAY_BUTTON_PLUS_LARGE, 512, 64, 151); addChangeNumberButton( - builder, - GT_UITextures.OVERLAY_BUTTON_MINUS_LARGE, - val -> mTargetD += val, - -16, - -8, - 7, - 58); + builder, + GT_UITextures.OVERLAY_BUTTON_MINUS_LARGE, + val -> mTargetD += val, + -16, + -8, + 7, + 58); addChangeNumberButton( - builder, - GT_UITextures.OVERLAY_BUTTON_MINUS_SMALL, - val -> mTargetD += val, - -4, - -1, - 25, - 58); + builder, + GT_UITextures.OVERLAY_BUTTON_MINUS_SMALL, + val -> mTargetD += val, + -4, + -1, + 25, + 58); addChangeNumberButton(builder, GT_UITextures.OVERLAY_BUTTON_PLUS_SMALL, val -> mTargetD += val, 4, 1, 133, 58); addChangeNumberButton(builder, GT_UITextures.OVERLAY_BUTTON_PLUS_LARGE, val -> mTargetD += val, 16, 8, 151, 58); } private void addChangeNumberButtons(ModularWindow.Builder builder, IDrawable overlay, int addNumberShift, - int addNumber, int xPos) { + int addNumber, int xPos) { addChangeNumberButton(builder, overlay, val -> mTargetX += val, addNumberShift, addNumber, xPos, 4); addChangeNumberButton(builder, overlay, val -> mTargetY += val, addNumberShift, addNumber, xPos, 22); addChangeNumberButton(builder, overlay, val -> mTargetZ += val, addNumberShift, addNumber, xPos, 40); } private void addChangeNumberButton(ModularWindow.Builder builder, IDrawable overlay, Consumer setter, - int addNumberShift, int addNumber, int xPos, int yPos) { + 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 @@ -492,8 +489,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 8d605599e7..8186d716df 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 @@ -42,7 +42,7 @@ import gregtech.common.misc.GT_IDrillingLogicDelegateOwner; @SuppressWarnings("ObjectEquality") public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine - implements GT_IDrillingLogicDelegateOwner, IAddUIWidgets { + implements GT_IDrillingLogicDelegateOwner, IAddUIWidgets { static final int[] RADIUS = { 8, 8, 16, 24, 32 }; // Miner radius per tier static final int[] SPEED = { 160, 160, 80, 40, 20 }; // Miner cycle time per tier @@ -60,100 +60,81 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine public GT_MetaTileEntity_Miner(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 1, - new String[] { "Digging ore instead of you", "Use Screwdriver to regulate work area", - "Use Soft Mallet to disable and retract the pipe", - String.format("%d EU/t, %d sec per block, no stuttering", ENERGY[aTier], SPEED[aTier] / 20), - String.format("Maximum work area %dx%d", (RADIUS[aTier] * 2 + 1), (RADIUS[aTier] * 2 + 1)), - String.format("Fortune bonus of %d", aTier) }, - 2, - 2, - "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( - TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE")), - TextureFactory.builder() - .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( - TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT")), - TextureFactory.builder() - .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.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()), - 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( - TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM")), - TextureFactory.builder() - .addIcon( - new Textures.BlockIcons.CustomIcon( - "basicmachines/miner/OVERLAY_BOTTOM_GLOW")) - .glow() - .build())); + aID, + aName, + aNameRegional, + aTier, + 1, + new String[] { "Digging ore instead of you", "Use Screwdriver to regulate work area", + "Use Soft Mallet to disable and retract the pipe", + String.format("%d EU/t, %d sec per block, no stuttering", ENERGY[aTier], SPEED[aTier] / 20), + String.format("Maximum work area %dx%d", (RADIUS[aTier] * 2 + 1), (RADIUS[aTier] * 2 + 1)), + String.format("Fortune bonus of %d", aTier) }, + 2, + 2, + "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( + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE")), + TextureFactory.builder() + .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( + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT")), + TextureFactory.builder() + .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.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()), + 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( + TextureFactory.of(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM")), + TextureFactory.builder() + .addIcon(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_GLOW")) + .glow() + .build())); mSpeed = SPEED[aTier]; radiusConfig = RADIUS[mTier]; } public GT_MetaTileEntity_Miner(String aName, int aTier, String aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); mSpeed = SPEED[aTier]; radiusConfig = RADIUS[mTier]; } public GT_MetaTileEntity_Miner(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 2, 2, aGUIName, aNEIName); mSpeed = SPEED[aTier]; radiusConfig = RADIUS[mTier]; @@ -172,9 +153,9 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine @Override protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, - ItemStack aStack) { + ItemStack aStack) { return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) // - && aStack.getItem() == GT_DrillingLogicDelegate.MINING_PIPE_STACK.getItem(); + && aStack.getItem() == GT_DrillingLogicDelegate.MINING_PIPE_STACK.getItem(); } /** Both output slots must be free to work */ @@ -208,12 +189,12 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine } GT_Utility.sendChatToPlayer( - aPlayer, - String.format( - "%s %dx%d", - StatCollector.translateToLocal("GT5U.machines.workareaset"), - (radiusConfig * 2 + 1), - (radiusConfig * 2 + 1))); + aPlayer, + String.format( + "%s %dx%d", + StatCollector.translateToLocal("GT5U.machines.workareaset"), + (radiusConfig * 2 + 1), + (radiusConfig * 2 + 1))); // Rebuild ore cache after change config fillOreList(getBaseMetaTileEntity()); @@ -251,9 +232,9 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine mMaxProgresstime = 0; if (debugBlockMiner) { GT_Log.out.println( - "MINER: Not enough energy yet, want " + (ENERGY[mTier] * mSpeed) - + " have " - + aBaseMetaTileEntity.getUniversalEnergyStored()); + "MINER: Not enough energy yet, want " + (ENERGY[mTier] * mSpeed) + + " have " + + aBaseMetaTileEntity.getUniversalEnergyStored()); } return; } @@ -283,17 +264,15 @@ 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)); + oreBlock, + aBaseMetaTileEntity.getWorld() + .getBlockMetadata(x, y, z)); } // someone else might have removed the block while (!isOre && !oreBlockPositions.isEmpty()); @@ -351,7 +330,7 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine @Override public boolean pushOutputs(ItemStack stack, int count, boolean simulate, boolean allowInputSlots) { return allowInputSlots && pushOutput(getInputSlot(), getInputSlot() + mInputSlotCount, stack, count, simulate) - || pushOutput(getOutputSlot(), getOutputSlot() + mOutputItems.length, stack, count, simulate); + || pushOutput(getOutputSlot(), getOutputSlot() + mOutputItems.length, stack, count, simulate); } private boolean pushOutput(int startIndex, int endIndex, ItemStack stack, int count, boolean simulate) { @@ -405,18 +384,18 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine @Override public String[] getInfoData() { return new String[] { - String.format( - "%s%s%s", - EnumChatFormatting.BLUE, - StatCollector.translateToLocal("GT5U.machines.miner"), - EnumChatFormatting.RESET), - String.format( - "%s: %s%d%s %s", - StatCollector.translateToLocal("GT5U.machines.workarea"), - EnumChatFormatting.GREEN, - (radiusConfig * 2 + 1), - EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.machines.blocks")) }; + String.format( + "%s%s%s", + EnumChatFormatting.BLUE, + StatCollector.translateToLocal("GT5U.machines.miner"), + EnumChatFormatting.RESET), + String.format( + "%s: %s%d%s %s", + StatCollector.translateToLocal("GT5U.machines.workarea"), + EnumChatFormatting.GREEN, + (radiusConfig * 2 + 1), + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.machines.blocks")) }; } @Override @@ -461,18 +440,18 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine } private static final FallbackableUITexture progressBarTexture = new FallbackableUITexture( - UITexture.fullImage(GregTech.ID, "gui/progressbar/miner"), - GT_UITextures.PROGRESSBAR_CANNER); + UITexture.fullImage(GregTech.ID, "gui/progressbar/miner"), + GT_UITextures.PROGRESSBAR_CANNER); @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { super.addUIWidgets(builder, buildContext); builder.widget( - createProgressBar( - progressBarTexture.get(), - 20, - ProgressBar.Direction.RIGHT, - new Pos2d(78, 24), - new Size(20, 18))); + createProgressBar( + progressBarTexture.get(), + 20, + ProgressBar.Direction.RIGHT, + new Pos2d(78, 24), + new Size(20, 18))); } } 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 7a786228e4..7306e89986 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 @@ -26,65 +26,65 @@ public class GT_MetaTileEntity_MonsterRepellent extends GT_MetaTileEntity_Tiered public GT_MetaTileEntity_MonsterRepellent(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 0, - "Repels nasty Creatures. Range: " + (4 + (12 * aTier)) - + " unpowered / " - + (16 + (48 * aTier)) - + " powered. Costs " - + (1L << (aTier * 2)) - + " EU/t"); + aID, + aName, + aNameRegional, + aTier, + 0, + "Repels nasty Creatures. Range: " + (4 + (12 * aTier)) + + " unpowered / " + + (16 + (48 * aTier)) + + " powered. Costs " + + (1L << (aTier * 2)) + + " EU/t"); } public GT_MetaTileEntity_MonsterRepellent(String aName, int aTier, int aInvSlotCount, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } public GT_MetaTileEntity_MonsterRepellent(String aName, int aTier, int aInvSlotCount, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_MonsterRepellent( - this.mName, - this.mTier, - this.mInventory.length, - this.mDescriptionArray, - this.mTextures); + this.mName, + this.mTier, + this.mInventory.length, + this.mDescriptionArray, + this.mTextures); } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + 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 public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { if (aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.isServerSide()) { int[] tCoords = { aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), - aBaseMetaTileEntity.getZCoord(), aBaseMetaTileEntity.getWorld().provider.dimensionId }; + aBaseMetaTileEntity.getZCoord(), aBaseMetaTileEntity.getWorld().provider.dimensionId }; if ((aTimer % 600 == 0) && !GT_SpawnEventHandler.mobReps.contains(tCoords)) { GT_SpawnEventHandler.mobReps.add(tCoords); } if (aBaseMetaTileEntity.isUniversalEnergyStored(getMinimumStoredEU()) - && aBaseMetaTileEntity.decreaseStoredEnergyUnits(1L << (this.mTier * 2), false)) { + && aBaseMetaTileEntity.decreaseStoredEnergyUnits(1L << (this.mTier * 2), false)) { mRange = GT_SpawnEventHandler.getPoweredRepellentRange(mTier); } else { mRange = GT_SpawnEventHandler.getUnpoweredRepellentRange(mTier); @@ -95,20 +95,20 @@ public class GT_MetaTileEntity_MonsterRepellent extends GT_MetaTileEntity_Tiered @Override public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { int[] tCoords = { aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), - aBaseMetaTileEntity.getZCoord(), aBaseMetaTileEntity.getWorld().provider.dimensionId }; + aBaseMetaTileEntity.getZCoord(), aBaseMetaTileEntity.getWorld().provider.dimensionId }; GT_SpawnEventHandler.mobReps.add(tCoords); } @Override public void onRemoval() { int[] tCoords = { this.getBaseMetaTileEntity() - .getXCoord(), - this.getBaseMetaTileEntity() - .getYCoord(), - this.getBaseMetaTileEntity() - .getZCoord(), - this.getBaseMetaTileEntity() - .getWorld().provider.dimensionId }; + .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 bae01940f9..ad73047507 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 @@ -22,85 +22,85 @@ public class GT_MetaTileEntity_PotionBrewer extends GT_MetaTileEntity_BasicMachi public GT_MetaTileEntity_PotionBrewer(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 1, - "Brewing your Drinks", - 1, - 0, - "PotionBrewer.png", - "", - TextureFactory.of( - TextureFactory.of(OVERLAY_SIDE_POTIONBREWER_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_FRONT_POTIONBREWER_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_TOP_POTIONBREWER_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_BOTTOM_POTIONBREWER_ACTIVE), - 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())); + aID, + aName, + aNameRegional, + aTier, + 1, + "Brewing your Drinks", + 1, + 0, + "PotionBrewer.png", + "", + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_POTIONBREWER_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_FRONT_POTIONBREWER_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_TOP_POTIONBREWER_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_BOTTOM_POTIONBREWER_ACTIVE), + 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())); } public GT_MetaTileEntity_PotionBrewer(String aName, int aTier, String aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 0, aGUIName, aNEIName); } public GT_MetaTileEntity_PotionBrewer(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 0, aGUIName, aNEIName); } @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_PotionBrewer( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures, - this.mGUIName, - this.mNEIName); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName); } @Override @@ -123,7 +123,7 @@ 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(); + .getName(); if (tInputName.startsWith("potion.")) { tInputName = tInputName.replaceFirst("potion.", ""); int tFirstDot = tInputName.indexOf('.') + 1; @@ -159,11 +159,11 @@ public class GT_MetaTileEntity_PotionBrewer extends GT_MetaTileEntity_BasicMachi return setOutput("potion.weakness"); } if (GT_Utility.areStacksEqual( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), - getInputAt(0))) { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), + getInputAt(0))) { if (!tModifier.startsWith("strong")) { return setOutput( - "potion." + tInputName + ".strong" + (tModifier.isEmpty() ? "" : "." + tModifier)); + "potion." + tInputName + ".strong" + (tModifier.isEmpty() ? "" : "." + tModifier)); } if (tModifier.startsWith("long")) { return setOutput("potion." + tInputName + tModifier.replaceFirst("long", "")); @@ -171,11 +171,11 @@ public class GT_MetaTileEntity_PotionBrewer extends GT_MetaTileEntity_BasicMachi return setOutput("potion.thick"); } if (GT_Utility.areStacksEqual( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), - getInputAt(0))) { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), + getInputAt(0))) { if (!tModifier.startsWith("long")) { return setOutput( - "potion." + tInputName + ".long" + (tModifier.isEmpty() ? "" : "." + tModifier)); + "potion." + tInputName + ".long" + (tModifier.isEmpty() ? "" : "." + tModifier)); } if (tModifier.startsWith("strong")) { return setOutput("potion." + tInputName + tModifier.replaceFirst("strong", "")); @@ -183,8 +183,8 @@ public class GT_MetaTileEntity_PotionBrewer extends GT_MetaTileEntity_BasicMachi return setOutput("potion.mundane"); } if (GT_Utility.areStacksEqual( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gunpowder, 1L), - getInputAt(0))) { + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gunpowder, 1L), + getInputAt(0))) { if (!tInputName.endsWith(".splash")) { return setOutput("potion." + tInputName + ".splash"); } @@ -212,17 +212,16 @@ public class GT_MetaTileEntity_PotionBrewer extends GT_MetaTileEntity_BasicMachi @Override public boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, - ItemStack aStack) { + ItemStack aStack) { return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) - && getRecipeList().containsInput(aStack); + && getRecipeList().containsInput(aStack); } @Override public boolean isFluidInputAllowed(FluidStack aFluid) { return (aFluid.getFluid() - .getName() - .startsWith("potion.")) - || (super.isFluidInputAllowed(aFluid)); + .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 444121cc79..b0ffcaedcc 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 @@ -17,20 +17,20 @@ public class GT_MetaTileEntity_Printer extends GT_MetaTileEntity_BasicMachine { public GT_MetaTileEntity_Printer(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 1, - "It can copy Books and paint Stuff", - 1, - 1, - "Printer.png", - GT_Recipe.GT_Recipe_Map.sPrinterRecipes.mNEIName); + aID, + aName, + aNameRegional, + aTier, + 1, + "It can copy Books and paint Stuff", + 1, + 1, + "Printer.png", + GT_Recipe.GT_Recipe_Map.sPrinterRecipes.mNEIName); } public GT_MetaTileEntity_Printer(String aName, int aTier, String aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 2, 2, aGUIName, aNEIName); } @@ -39,26 +39,26 @@ public class GT_MetaTileEntity_Printer extends GT_MetaTileEntity_BasicMachine { if (getOutputAt(0) != null) { this.mOutputBlocked += 1; } else if ((GT_Utility.isStackValid(getInputAt(0))) && (getInputAt(0).stackSize > 0) - && (GT_Utility.isStackInvalid(getSpecialSlot())) - && (OrePrefixes.block.contains(getInputAt(0)))) { - ArrayList tList = GT_OreDictUnificator.getOres( - GT_OreDictUnificator.getAssociation(getInputAt(0))); - if (tList.size() > 1) { - tList.add(tList.get(0)); - int i = 0; - for (int j = tList.size() - 1; i < j; i++) { - if (GT_Utility.areStacksEqual(getInputAt(0), tList.get(i))) { - this.mOutputItems[0] = GT_Utility.copyAmount(1L, tList.get(i + 1)); - calculateOverclockedNess(1, 32); - // In case recipe is too OP for that machine - if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) - return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; - getInputAt(0).stackSize -= 1; - return 2; - } + && (GT_Utility.isStackInvalid(getSpecialSlot())) + && (OrePrefixes.block.contains(getInputAt(0)))) { + ArrayList tList = GT_OreDictUnificator + .getOres(GT_OreDictUnificator.getAssociation(getInputAt(0))); + if (tList.size() > 1) { + tList.add(tList.get(0)); + int i = 0; + for (int j = tList.size() - 1; i < j; i++) { + if (GT_Utility.areStacksEqual(getInputAt(0), tList.get(i))) { + this.mOutputItems[0] = GT_Utility.copyAmount(1L, tList.get(i + 1)); + calculateOverclockedNess(1, 32); + // In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + getInputAt(0).stackSize -= 1; + return 2; } } } + } this.mMaxProgresstime = 0; return 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 db9aedb9eb..db0a889205 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))); @@ -64,21 +64,21 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { public GT_MetaTileEntity_Pump(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 3, - new String[] { "The best way to empty Oceans! Outputs on top", - getEuUsagePerTier(aTier) + " EU/operation, " - + GT_Utility.safeInt(160 / 20 / (long) Math.pow(2, aTier)) - + " sec per bucket, no stuttering", - "Maximum pumping area: " + (getMaxDistanceForTier(aTier) * 2 + 1) - + "x" - + (getMaxDistanceForTier(aTier) * 2 + 1), - "Use Screwdriver to regulate pumping area", "Use Soft Mallet to disable and retract the pipe", - "Disable the bottom pump to retract the pipe!", - "Use Soldering Iron to auto retract the pipe when hitting a rock", }); + aID, + aName, + aNameRegional, + aTier, + 3, + new String[] { "The best way to empty Oceans! Outputs on top", + getEuUsagePerTier(aTier) + " EU/operation, " + + GT_Utility.safeInt(160 / 20 / (long) Math.pow(2, aTier)) + + " sec per bucket, no stuttering", + "Maximum pumping area: " + (getMaxDistanceForTier(aTier) * 2 + 1) + + "x" + + (getMaxDistanceForTier(aTier) * 2 + 1), + "Use Screwdriver to regulate pumping area", "Use Soft Mallet to disable and retract the pipe", + "Disable the bottom pump to retract the pipe!", + "Use Soldering Iron to auto retract the pipe when hitting a rock", }); radiusConfig = getMaxDistanceForTier(mTier); } @@ -102,21 +102,20 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { boolean wasPumping = this.wasPumping || !this.mPumpList.isEmpty(); if (debugBlockPump) { GT_Log.out.println( - "PUMP: NBT:Save - WasPumping - " + wasPumping - + " blocks (" - + this.mPrimaryPumpedBlock - + ", " - + this.mSecondaryPumpedBlock - + ")"); + "PUMP: NBT:Save - WasPumping - " + wasPumping + + " blocks (" + + this.mPrimaryPumpedBlock + + ", " + + this.mSecondaryPumpedBlock + + ")"); } super.saveNBTData(aNBT); aNBT.setString( - "mPumpedBlock1", - this.mPrimaryPumpedBlock == null ? "" : Block.blockRegistry.getNameForObject(this.mPrimaryPumpedBlock)); + "mPumpedBlock1", + this.mPrimaryPumpedBlock == null ? "" : Block.blockRegistry.getNameForObject(this.mPrimaryPumpedBlock)); aNBT.setString( - "mPumpedBlock2", - this.mSecondaryPumpedBlock == null ? "" - : Block.blockRegistry.getNameForObject(this.mSecondaryPumpedBlock)); + "mPumpedBlock2", + this.mSecondaryPumpedBlock == null ? "" : Block.blockRegistry.getNameForObject(this.mSecondaryPumpedBlock)); aNBT.setBoolean("wasPumping", wasPumping); aNBT.setInteger("radiusConfig", radiusConfig); aNBT.setBoolean("mRetractDone", mRetractDone); @@ -135,11 +134,11 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { if (debugBlockPump) { GT_Log.out.println( - "PUMP: NBT:Load - WasPumping - " + this.wasPumping - + "(" - + aNBT.getString("mPumpedBlock1") - + ") " - + this.mPrimaryPumpedBlock); + "PUMP: NBT:Load - WasPumping - " + this.wasPumping + + "(" + + aNBT.getString("mPumpedBlock1") + + ") " + + this.mPrimaryPumpedBlock); } } @@ -166,24 +165,24 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { if (radiusConfig > max) radiusConfig = 0; } GT_Utility.sendChatToPlayer( - aPlayer, - StatCollector.translateToLocal("GT5U.machines.workareaset") + " " - + (radiusConfig * 2 + 1) - + "x" - + (radiusConfig * 2 + 1)); // TODO Add translation support + aPlayer, + StatCollector.translateToLocal("GT5U.machines.workareaset") + " " + + (radiusConfig * 2 + 1) + + "x" + + (radiusConfig * 2 + 1)); // TODO Add translation support clearQueue(false); } @Override public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, - float aZ) { + float aZ) { if (super.onSolderingToolRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ)) return true; mDisallowRetract = !mDisallowRetract; GT_Utility.sendChatToPlayer( - aPlayer, - StatCollector.translateToLocal( - mDisallowRetract ? "GT5U.machines.autoretract.disabled" : "GT5U.machines.autoretract.enabled")); + aPlayer, + StatCollector.translateToLocal( + mDisallowRetract ? "GT5U.machines.autoretract.disabled" : "GT5U.machines.autoretract.enabled")); return true; } @@ -235,9 +234,9 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { IGregTechTileEntity tTileEntity; for (int i = 1; (i < 21) - && ((tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance((byte) 0, i)) - != null) - && ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Pump)); i++) { + && ((tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance((byte) 0, i)) + != null) + && ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Pump)); i++) { // Apparently someone might stack 21 pumps on top of each other, so let's check for that getBaseMetaTileEntity().setActive(tTileEntity.isActive()); this.mPumpCountBelow += 1; @@ -252,16 +251,16 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { if (getBaseMetaTileEntity().isAllowedToWork()) { mRetractDone = false; if ((getBaseMetaTileEntity().isUniversalEnergyStored(this.getEuUsagePerAction())) - && ((this.mFluid == null) || (this.mFluid.amount + 1000 <= getCapacity()))) { + && ((this.mFluid == null) || (this.mFluid.amount + 1000 <= getCapacity()))) { boolean tMovedOneDown = false; if ((this.mPumpList.isEmpty()) && (getBaseMetaTileEntity().getTimer() % 100L == 0L)) { if (!this.wasPumping) { tMovedOneDown = moveOneDown(); if (!tMovedOneDown) { if (canMoveDown( - getBaseMetaTileEntity().getXCoord(), - Math.max(getYOfPumpHead() - 1, 1), - getBaseMetaTileEntity().getZCoord())) { + getBaseMetaTileEntity().getXCoord(), + Math.max(getYOfPumpHead() - 1, 1), + getBaseMetaTileEntity().getZCoord())) { if (debugBlockPump) { GT_Log.out.println("PUMP: No pipe left. Idle for a little longer."); } @@ -287,11 +286,11 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { if (debugBlockPump && this.mPrimaryPumpedBlock != null) { GT_Log.out.println( - "PUMP: Had an invalid pump block. Trying to find a fluid at Y: " + y - + " Previous blocks 1: " - + this.mPrimaryPumpedBlock - + " 2: " - + this.mSecondaryPumpedBlock); + "PUMP: Had an invalid pump block. Trying to find a fluid at Y: " + y + + " Previous blocks 1: " + + this.mPrimaryPumpedBlock + + " 2: " + + this.mSecondaryPumpedBlock); } // First look down checkForFluidToPump(x, y - 1, z); @@ -311,9 +310,8 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { } else if (getYOfPumpHead() < getBaseMetaTileEntity().getYCoord()) { // We didn't just look for a block, and the pump head is below the pump if ((tMovedOneDown) || this.wasPumping - || ((this.mPumpList.isEmpty()) - && (getBaseMetaTileEntity().getTimer() % 200L == 100L)) - || (getBaseMetaTileEntity().getTimer() % 72000L == 100L)) { + || ((this.mPumpList.isEmpty()) && (getBaseMetaTileEntity().getTimer() % 200L == 100L)) + || (getBaseMetaTileEntity().getTimer() % 72000L == 100L)) { // Rebuild the list to pump if any of the following conditions are true: // 1) We just moved down // 2) We were previously pumping (and possibly just reloaded) @@ -321,11 +319,11 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { // 4) A long while has passed if (debugBlockPump) { GT_Log.out.println( - "PUMP: Rebuilding pump list - Size " + this.mPumpList.size() - + " WasPumping: " - + this.wasPumping - + " Timer " - + getBaseMetaTileEntity().getTimer()); + "PUMP: Rebuilding pump list - Size " + this.mPumpList.size() + + " WasPumping: " + + this.wasPumping + + " Timer " + + getBaseMetaTileEntity().getTimer()); } int yPump = getBaseMetaTileEntity().getYCoord() - 1, yHead = getYOfPumpHead(); @@ -357,29 +355,27 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { } } else { if (!mRetractDone && ((aTick % 5) == 0) - && ((this.mInventory[0] == null) || this.mInventory[0].stackSize == 0 - || (GT_Utility.areStacksEqual(this.mInventory[0], MINING_PIPE) - && (this.mInventory[0].stackSize - < this.mInventory[0].getMaxStackSize())))) { + && ((this.mInventory[0] == null) || this.mInventory[0].stackSize == 0 + || (GT_Utility.areStacksEqual(this.mInventory[0], MINING_PIPE) + && (this.mInventory[0].stackSize < this.mInventory[0].getMaxStackSize())))) { // try retract if all of these conditions are met // 1. not retracted yet // 2. once per 5 tick // 3. can hold retracted pipe in inventory int tHeadY = getYOfPumpHead(); if (tHeadY < this.getBaseMetaTileEntity() - .getYCoord()) { + .getYCoord()) { final int tXCoord = this.getBaseMetaTileEntity() - .getXCoord(); + .getXCoord(); final int tZCoord = this.getBaseMetaTileEntity() - .getZCoord(); + .getZCoord(); this.getBaseMetaTileEntity() .getWorld() .setBlockToAir(tXCoord, tHeadY, tZCoord); if (tHeadY < this.getBaseMetaTileEntity() - .getYCoord() - - 1) { + .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(); @@ -430,7 +426,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { private boolean moveOneDown() { if ((this.mInventory[0] == null) || (this.mInventory[0].stackSize < 1) - || (!GT_Utility.areStacksEqual(this.mInventory[0], MINING_PIPE))) { + || (!GT_Utility.areStacksEqual(this.mInventory[0], MINING_PIPE))) { // No mining pipes if (debugBlockPump) { GT_Log.out.println("PUMP: No mining pipes"); @@ -450,11 +446,7 @@ 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"); @@ -463,13 +455,13 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { } // Try to set the block below us to a tip if (!GT_Utility.setBlockByFakePlayer( - getFakePlayer(getBaseMetaTileEntity()), - x, - yHead - 1, - z, - MINING_PIPE_TIP_BLOCK, - 0, - false)) { + getFakePlayer(getBaseMetaTileEntity()), + x, + yHead - 1, + z, + MINING_PIPE_TIP_BLOCK, + 0, + false)) { if (debugBlockPump) { GT_Log.out.println("PUMP: Could not set block below to new tip"); } @@ -478,7 +470,7 @@ 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); + .setBlock(x, yHead, z, MINING_PIPE_BLOCK); } getBaseMetaTileEntity().decrStackSize(0, 1); if (debugBlockPump) { @@ -492,7 +484,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { // TODO: Handle pipe|pipe|head|pipe|pipe int y = getBaseMetaTileEntity().getYCoord() - 1, x = getBaseMetaTileEntity().getXCoord(), - z = getBaseMetaTileEntity().getZCoord(); + z = getBaseMetaTileEntity().getZCoord(); while (y > 0) { Block curBlock = getBaseMetaTileEntity().getBlock(x, y, z); @@ -504,7 +496,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { // 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); + .setBlock(x, y, z, MINING_PIPE_BLOCK); if (debugBlockPump) { GT_Log.out.println("PUMP: Hit pipes already in place, trying to merge"); } @@ -518,12 +510,12 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { if (getBaseMetaTileEntity().getBlock(x, y, z) != MINING_PIPE_TIP_BLOCK) { if (y != getBaseMetaTileEntity().getYCoord() - 1 - && getBaseMetaTileEntity().getBlock(x, y + 1, z) == MINING_PIPE_BLOCK) { + && getBaseMetaTileEntity().getBlock(x, y + 1, z) == MINING_PIPE_BLOCK) { // 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); + .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"); } @@ -582,7 +574,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { } private boolean queueFluid(int aX, int aY, int aZ, ArrayDeque fluidsFound, - Set checked) { + Set checked) { // If we haven't already looked at this coordinate set, and it's not already in the list of fluids found, see if // there is // a valid fluid and add it to the fluids found @@ -630,10 +622,10 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { Block aBlock = getBaseMetaTileEntity().getBlock(aX, aY, aZ); return aBlock != null && (aBlock == Blocks.water || aBlock == Blocks.flowing_water - || aBlock == Blocks.lava - || aBlock == Blocks.flowing_lava - || aBlock instanceof IFluidBlock - || aBlock.isAir(getBaseMetaTileEntity().getWorld(), aX, aY, aZ)); + || aBlock == Blocks.lava + || aBlock == Blocks.flowing_lava + || aBlock instanceof IFluidBlock + || aBlock.isAir(getBaseMetaTileEntity().getWorld(), aX, aY, aZ)); } private boolean consumeFluid(int aX, int aY, int aZ) { @@ -645,7 +637,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { if (aBlock != null && ((this.mPrimaryPumpedBlock == aBlock) || (this.mSecondaryPumpedBlock == aBlock))) { boolean isWaterOrLava = ((this.mPrimaryPumpedBlock == Blocks.water - || this.mPrimaryPumpedBlock == Blocks.lava)); + || this.mPrimaryPumpedBlock == Blocks.lava)); if (isWaterOrLava && getBaseMetaTileEntity().getMetaID(aX, aY, aZ) != 0) { // Water/Lava that isn't a source block - do nothing here, but set the block to air and consume energy @@ -662,27 +654,27 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { this.mFluid = ((IFluidBlock) aBlock).drain(getBaseMetaTileEntity().getWorld(), aX, aY, aZ, true); } } else if (GT_ModHandler.isWater(this.mFluid) || GT_ModHandler.isLava(this.mFluid) - || this.mFluid.isFluidEqual( - ((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.mFluid.amount += 1000; + || this.mFluid.isFluidEqual( + ((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.mFluid.amount += 1000; - } else { - if (debugBlockPump) { - GT_Log.out.println("PUMP: Couldn't consume " + aBlock); - } - // We didn't do anything - return false; - } + } else { + if (debugBlockPump) { + GT_Log.out.println("PUMP: Couldn't consume " + aBlock); + } + // We didn't do anything + return false; + } getBaseMetaTileEntity().decreaseStoredEnergyUnits(this.getEuUsagePerAction(), true); getBaseMetaTileEntity().getWorld() - .setBlock(aX, aY, aZ, Blocks.air, 0, 2); + .setBlock(aX, aY, aZ, Blocks.air, 0, 2); return true; } return false; @@ -696,28 +688,26 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { @Override public ArrayList getSpecialDebugInfo(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, - int aLogLevel, ArrayList aList) { + int aLogLevel, ArrayList aList) { aList.addAll( - Arrays.asList( - EnumChatFormatting.BLUE + StatCollector.translateToLocal("GT5U.machines.pump") - + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.machines.workarea") + ": " - + EnumChatFormatting.GREEN - + (radiusConfig * 2 + 1) - + EnumChatFormatting.RESET - + " " - + StatCollector.translateToLocal("GT5U.machines.blocks"), - "Primary pumping fluid: " - + (this.mPrimaryPumpedBlock != null ? this.mPrimaryPumpedBlock.getLocalizedName() - : "None"), - "Secondary pumping fluid: " - + (this.mSecondaryPumpedBlock != null ? this.mSecondaryPumpedBlock.getLocalizedName() - : "None"), - "Pumps below: " + mPumpCountBelow, - "Queue size: " + mPumpList.size(), - "Pump head at Y: " + getYOfPumpHead(), - "Pump timer: " + mPumpTimer, - "Meta Entity Timer: " + getBaseMetaTileEntity().getTimer())); + Arrays.asList( + EnumChatFormatting.BLUE + StatCollector.translateToLocal("GT5U.machines.pump") + + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.machines.workarea") + ": " + + EnumChatFormatting.GREEN + + (radiusConfig * 2 + 1) + + EnumChatFormatting.RESET + + " " + + StatCollector.translateToLocal("GT5U.machines.blocks"), + "Primary pumping fluid: " + + (this.mPrimaryPumpedBlock != null ? this.mPrimaryPumpedBlock.getLocalizedName() : "None"), + "Secondary pumping fluid: " + + (this.mSecondaryPumpedBlock != null ? this.mSecondaryPumpedBlock.getLocalizedName() : "None"), + "Pumps below: " + mPumpCountBelow, + "Queue size: " + mPumpList.size(), + "Pump head at Y: " + getYOfPumpHead(), + "Pump timer: " + mPumpTimer, + "Meta Entity Timer: " + getBaseMetaTileEntity().getTimer())); return aList; } @@ -813,10 +803,10 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + boolean aActive, boolean aRedstone) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], - (aSide == 0 || aSide == 1) ? TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) - : TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP) }; + (aSide == 0 || aSide == 1) ? TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + : TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP) }; } @Override @@ -827,9 +817,9 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { return new ITexture[] { TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP), - TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP), - TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP), - TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP), }; + TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP), + TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP), + TextureFactory.of(Textures.BlockIcons.OVERLAY_ADV_PUMP), }; } private FakePlayer mFakePlayer = null; @@ -844,14 +834,13 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { @Override public String[] getInfoData() { return new String[] { - EnumChatFormatting.BLUE + StatCollector.translateToLocal("GT5U.machines.pump") - + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.machines.workarea") + ": " - + EnumChatFormatting.GREEN - + (radiusConfig * 2 + 1) - + EnumChatFormatting.RESET - + " " - + StatCollector.translateToLocal("GT5U.machines.blocks") }; + EnumChatFormatting.BLUE + StatCollector.translateToLocal("GT5U.machines.pump") + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.machines.workarea") + ": " + + EnumChatFormatting.GREEN + + (radiusConfig * 2 + 1) + + EnumChatFormatting.RESET + + " " + + StatCollector.translateToLocal("GT5U.machines.blocks") }; } @Override 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 739db376c1..45abd16d9f 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 @@ -40,85 +40,85 @@ public class GT_MetaTileEntity_Replicator extends GT_MetaTileEntity_BasicMachine public GT_MetaTileEntity_Replicator(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 1, - "Producing Elemental Matter", - 1, - 1, - "Replicator.png", - "", - TextureFactory.of( - TextureFactory.of(OVERLAY_SIDE_REPLICATOR_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_FRONT_REPLICATOR_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_TOP_REPLICATOR_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_BOTTOM_REPLICATOR_ACTIVE), - 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())); + aID, + aName, + aNameRegional, + aTier, + 1, + "Producing Elemental Matter", + 1, + 1, + "Replicator.png", + "", + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_REPLICATOR_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_FRONT_REPLICATOR_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_TOP_REPLICATOR_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_BOTTOM_REPLICATOR_ACTIVE), + 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())); } public GT_MetaTileEntity_Replicator(String aName, int aTier, String aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } public GT_MetaTileEntity_Replicator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Replicator( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures, - this.mGUIName, - this.mNEIName); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName); } public static long cubicFluidMultiplier(long amount) { @@ -131,8 +131,7 @@ public class GT_MetaTileEntity_Replicator extends GT_MetaTileEntity_BasicMachine 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"))) { + .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)) { @@ -144,9 +143,9 @@ public class GT_MetaTileEntity_Replicator extends GT_MetaTileEntity_BasicMachine if ((this.mOutputItems[0] = GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial, 1L)) == null) { if ((this.mOutputItems[0] = GT_OreDictUnificator.get(OrePrefixes.cell, tMaterial, 1L)) - != null) { + != null) { if ((this.mOutputFluid = GT_Utility.getFluidForFilledItem(this.mOutputItems[0], true)) - == null) { + == null) { if (ItemList.Cell_Empty.isStackEqual(getInputAt(0))) { if (canOutput(this.mOutputItems[0])) { getInputAt(0).stackSize -= 1; @@ -157,8 +156,8 @@ public class GT_MetaTileEntity_Replicator extends GT_MetaTileEntity_BasicMachine } else { this.mOutputItems[0] = null; if ((getDrainableStack() == null) - || ((getDrainableStack().isFluidEqual(this.mOutputFluid)) - && (getDrainableStack().amount < 16000))) { + || ((getDrainableStack().isFluidEqual(this.mOutputFluid)) + && (getDrainableStack().amount < 16000))) { tFluid.amount = ((int) (tFluid.amount - tMass)); return 2; } @@ -181,9 +180,9 @@ public class GT_MetaTileEntity_Replicator extends GT_MetaTileEntity_BasicMachine @Override protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, - ItemStack aStack) { + ItemStack aStack) { return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) - && ItemList.Cell_Empty.isStackEqual(aStack); + && ItemList.Cell_Empty.isStackEqual(aStack); } @Override @@ -195,11 +194,11 @@ public class GT_MetaTileEntity_Replicator extends GT_MetaTileEntity_BasicMachine 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); + .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 ace1e90f71..2c16cbad2a 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 @@ -20,85 +20,85 @@ public class GT_MetaTileEntity_RockBreaker extends GT_MetaTileEntity_BasicMachin public GT_MetaTileEntity_RockBreaker(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 1, - "Put Lava and Water adjacent", - 1, - 1, - "RockBreaker.png", - "", - TextureFactory.of( - TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), - 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())); + aID, + aName, + aNameRegional, + aTier, + 1, + "Put Lava and Water adjacent", + 1, + 1, + "RockBreaker.png", + "", + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), + 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())); } public GT_MetaTileEntity_RockBreaker(String aName, int aTier, String aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } public GT_MetaTileEntity_RockBreaker(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_RockBreaker( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures, - this.mGUIName, - this.mNEIName); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName); } @Override @@ -108,9 +108,9 @@ public class GT_MetaTileEntity_RockBreaker extends GT_MetaTileEntity_BasicMachin @Override protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, - ItemStack aStack) { + ItemStack aStack) { return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) - && getRecipeList().containsInput(aStack); + && getRecipeList().containsInput(aStack); } @Override @@ -122,23 +122,23 @@ public class GT_MetaTileEntity_RockBreaker extends GT_MetaTileEntity_BasicMachin public int checkRecipe() { IGregTechTileEntity aBaseMetaTileEntity = getBaseMetaTileEntity(); if ((aBaseMetaTileEntity.getBlockOffset(0, 0, 1) == Blocks.water) - || (aBaseMetaTileEntity.getBlockOffset(0, 0, -1) == Blocks.water) - || (aBaseMetaTileEntity.getBlockOffset(-1, 0, 0) == Blocks.water) - || (aBaseMetaTileEntity.getBlockOffset(1, 0, 0) == Blocks.water)) { + || (aBaseMetaTileEntity.getBlockOffset(0, 0, -1) == Blocks.water) + || (aBaseMetaTileEntity.getBlockOffset(-1, 0, 0) == Blocks.water) + || (aBaseMetaTileEntity.getBlockOffset(1, 0, 0) == Blocks.water)) { ItemStack tOutput = null; if (aBaseMetaTileEntity.getBlockOffset(0, 1, 0) == Blocks.lava) { tOutput = new ItemStack(Blocks.stone, 1); } else if ((aBaseMetaTileEntity.getBlockOffset(0, 0, 1) == Blocks.lava) - || (aBaseMetaTileEntity.getBlockOffset(0, 0, -1) == Blocks.lava) - || (aBaseMetaTileEntity.getBlockOffset(-1, 0, 0) == Blocks.lava) - || (aBaseMetaTileEntity.getBlockOffset(1, 0, 0) == Blocks.lava)) { - tOutput = new ItemStack(Blocks.cobblestone, 1); - } + || (aBaseMetaTileEntity.getBlockOffset(0, 0, -1) == Blocks.lava) + || (aBaseMetaTileEntity.getBlockOffset(-1, 0, 0) == Blocks.lava) + || (aBaseMetaTileEntity.getBlockOffset(1, 0, 0) == Blocks.lava)) { + tOutput = new ItemStack(Blocks.cobblestone, 1); + } if (tOutput != null) { if (GT_Utility.areStacksEqual(getStackInSlot(getCircuitSlot()), GT_Utility.getIntegratedCircuit(1))) { if (GT_Utility.areStacksEqual( - getInputAt(0), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L))) { + getInputAt(0), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L))) { tOutput = new ItemStack(Blocks.obsidian, 1); if (canOutput(tOutput)) { getInputAt(0).stackSize -= 1; 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 ca2182c0b8..ef4dc2ec3b 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 @@ -38,85 +38,85 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { public GT_MetaTileEntity_Scanner(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 1, - "Scans Crops and other things.", - 1, - 1, - "Scanner.png", - "", - TextureFactory.of( - TextureFactory.of(OVERLAY_SIDE_SCANNER_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_FRONT_SCANNER_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_TOP_SCANNER_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_BOTTOM_SCANNER_ACTIVE), - 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())); + aID, + aName, + aNameRegional, + aTier, + 1, + "Scans Crops and other things.", + 1, + 1, + "Scanner.png", + "", + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_SCANNER_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_FRONT_SCANNER_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_TOP_SCANNER_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_BOTTOM_SCANNER_ACTIVE), + 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())); } public GT_MetaTileEntity_Scanner(String aName, int aTier, String aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } public GT_MetaTileEntity_Scanner(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Scanner( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures, - this.mGUIName, - this.mNEIName); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName); } @Override @@ -187,10 +187,10 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { } ItemData tData = GT_OreDictUnificator.getAssociation(aStack); if ((tData != null) && ((tData.mPrefix == OrePrefixes.dust) || (tData.mPrefix == OrePrefixes.cell)) - && (tData.mMaterial.mMaterial.mElement != null) - && (!tData.mMaterial.mMaterial.mElement.mIsIsotope) - && (tData.mMaterial.mMaterial != Materials.Magic) - && (tData.mMaterial.mMaterial.getMass() > 0L)) { + && (tData.mMaterial.mMaterial.mElement != null) + && (!tData.mMaterial.mMaterial.mElement.mIsIsotope) + && (tData.mMaterial.mMaterial != Materials.Magic) + && (tData.mMaterial.mMaterial.getMass() > 0L)) { getSpecialSlot().stackSize -= 1; aStack.stackSize -= 1; @@ -234,10 +234,8 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { this.mOutputItems[0] = GT_Utility.copyAmount(1L, getSpecialSlot()); assert this.mOutputItems[0] != null; this.mOutputItems[0].setTagCompound( - GT_Utility.getNBTContainingShort( - new NBTTagCompound(), - "map_id", - (short) aStack.getItemDamage())); + GT_Utility + .getNBTContainingShort(new NBTTagCompound(), "map_id", (short) aStack.getItemDamage())); calculateOverclockedNess(30, 128); // In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) @@ -246,87 +244,71 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { } if ((aStack.getItem() - .getUnlocalizedName() - .contains("Schematic") - || aStack.getItem() - .getUnlocalizedName() - .contains("schematic")) - && !aStack.getItem() - .getUnlocalizedName() - .contains("Schematics")) { + .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 = ""; int stackItemID = Item.getIdFromItem(aStack.getItem()); int stackItemDamage = aStack.getItemDamage(); if (stackItemID == Item.getIdFromItem( - Objects.requireNonNull( - GT_ModHandler.getModItem(GalacticraftCore.ID, "item.schematic", 1L, 0)) - .getItem())) { + Objects.requireNonNull(GT_ModHandler.getModItem(GalacticraftCore.ID, "item.schematic", 1L, 0)) + .getItem())) { if (stackItemDamage == 0 && aStack.toString() - .equals( - Objects.requireNonNull( - GT_ModHandler.getModItem( - GalacticraftCore.ID, - "item.schematic", - 1L, - 0)) - .copy() - .toString())) + .equals( + Objects + .requireNonNull( + GT_ModHandler.getModItem(GalacticraftCore.ID, "item.schematic", 1L, 0)) + .copy() + .toString())) sTier = "100"; else if (stackItemDamage == 1 && aStack.toString() - .equals( - Objects.requireNonNull( - GT_ModHandler.getModItem( - GalacticraftCore.ID, - "item.schematic", - 1L, - 1)) - .copy() - .toString())) + .equals( + Objects + .requireNonNull( + GT_ModHandler.getModItem(GalacticraftCore.ID, "item.schematic", 1L, 1)) + .copy() + .toString())) sTier = "2"; } else { if (stackItemID == Item.getIdFromItem( - Objects.requireNonNull( - GT_ModHandler.getModItem(GalacticraftMars.ID, "item.schematic", 1L, 0)) - .getItem())) { + Objects + .requireNonNull(GT_ModHandler.getModItem(GalacticraftMars.ID, "item.schematic", 1L, 0)) + .getItem())) { if (stackItemDamage == 0 && aStack.toString() - .equals( - Objects.requireNonNull( - GT_ModHandler.getModItem( - GalacticraftMars.ID, - "item.schematic", - 1L, - 0)) - .copy() - .toString())) + .equals( + Objects + .requireNonNull( + GT_ModHandler.getModItem(GalacticraftMars.ID, "item.schematic", 1L, 0)) + .copy() + .toString())) sTier = "3"; else if (stackItemDamage == 1 && aStack.toString() - .equals( - Objects.requireNonNull( - GT_ModHandler.getModItem( - GalacticraftMars.ID, - "item.schematic", - 1L, - 1)) - .copy() - .toString())) + .equals( + Objects + .requireNonNull( + GT_ModHandler.getModItem(GalacticraftMars.ID, "item.schematic", 1L, 1)) + .copy() + .toString())) sTier = "101"; else if (stackItemDamage == 2 && aStack.toString() - .equals( - Objects.requireNonNull( - GT_ModHandler.getModItem( - GalacticraftMars.ID, - "item.schematic", - 1L, - 2)) - .copy() - .toString())) + .equals( + Objects + .requireNonNull( + GT_ModHandler.getModItem(GalacticraftMars.ID, "item.schematic", 1L, 2)) + .copy() + .toString())) sTier = "102"; } else if (aStack.getUnlocalizedName() - .matches(".*\\d+.*")) + .matches(".*\\d+.*")) sTier = aStack.getUnlocalizedName() - .split("(?<=\\D)(?=\\d)")[1].substring(0, 1); + .split("(?<=\\D)(?=\\d)")[1].substring(0, 1); else sTier = "1"; } @@ -336,10 +318,7 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { this.mOutputItems[0] = GT_Utility.copyAmount(1L, getSpecialSlot()); assert this.mOutputItems[0] != null; this.mOutputItems[0].setTagCompound( - GT_Utility.getNBTContainingShort( - new NBTTagCompound(), - "rocket_tier", - Short.parseShort(sTier))); + GT_Utility.getNBTContainingShort(new NBTTagCompound(), "rocket_tier", Short.parseShort(sTier))); calculateOverclockedNess(480, 36000); // In case recipe is too OP for that machine @@ -350,7 +329,7 @@ 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")) { + .equals("Raw Prospection Data")) { GT_Utility.ItemNBT.setBookTitle(aStack, "Analyzed Prospection Data"); GT_Utility.ItemNBT.convertProspectionData(aStack); aStack.stackSize -= 1; @@ -400,11 +379,11 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { 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"))) { + .equals("gt.metaitem.01.32707"))) { GT_Mod.achievements.issueAchievement( - aBaseMetaTileEntity.getWorld() - .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), - "scanning"); + aBaseMetaTileEntity.getWorld() + .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), + "scanning"); } } super.onPostTick(aBaseMetaTileEntity, aTick); @@ -422,9 +401,9 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { @Override protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, - ItemStack aStack) { + ItemStack aStack) { return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) - && getRecipeList().containsInput(aStack); + && getRecipeList().containsInput(aStack); } @Override 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 021511032b..02a2c2da99 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 @@ -35,85 +35,85 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic public GT_MetaTileEntity_SeismicProspector(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 1, - "(DEPRECATED, DO NOT USE! SWAP TO ADVANCED VERSION USING SHAPELESS RECIPE!)", - 1, - 1, - "Default.png", - "", - TextureFactory.of( - TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), - 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.of( - TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), - 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())); + aID, + aName, + aNameRegional, + aTier, + 1, + "(DEPRECATED, DO NOT USE! SWAP TO ADVANCED VERSION USING SHAPELESS RECIPE!)", + 1, + 1, + "Default.png", + "", + TextureFactory.of( + TextureFactory.of(OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_TOP_ROCK_BREAKER_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), + 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.of( + TextureFactory.of(OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), + 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())); } public GT_MetaTileEntity_SeismicProspector(String aName, int aTier, String aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } public GT_MetaTileEntity_SeismicProspector(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, - String aGUIName, String aNEIName) { + String aGUIName, String aNEIName) { super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_SeismicProspector( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures, - this.mGUIName, - this.mNEIName); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mGUIName, + this.mNEIName); } @Override @@ -122,15 +122,15 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic ItemStack aStack = aPlayer.getCurrentEquippedItem(); ItemData stackData = GT_OreDictUnificator.getItemData(aStack); if (!ready && (aStack != null) - && ((aStack.getItem() == Item.getItemFromBlock(Blocks.tnt) && aStack.stackSize >= 2) - || (aStack.getItem() == Ic2Items.industrialTnt.getItem() && aStack.stackSize >= 1) - || (aStack.getItem() == Ic2Items.dynamite.getItem() && aStack.stackSize >= 4) - || (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.stackSize >= 8))) { + && ((aStack.getItem() == Item.getItemFromBlock(Blocks.tnt) && aStack.stackSize >= 2) + || (aStack.getItem() == Ic2Items.industrialTnt.getItem() && aStack.stackSize >= 1) + || (aStack.getItem() == Ic2Items.dynamite.getItem() && aStack.stackSize >= 4) + || (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.stackSize >= 8))) { if ((!aPlayer.capabilities.isCreativeMode) && (aStack.stackSize != 111)) { if (aStack.getItem() == Item.getItemFromBlock(Blocks.tnt)) { aStack.stackSize -= 2; @@ -139,99 +139,92 @@ 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; } else if (ready && mMaxProgresstime == 0 - && aStack != null - && aStack.stackSize == 1 - && aStack.getItem() == ItemList.Tool_DataStick.getItem()) { - this.ready = false; - GT_Utility.ItemNBT.setBookTitle(aPlayer.getCurrentEquippedItem(), "Raw Prospection Data"); - List tStringList = new ArrayList<>(); - - // range by tier - int min = -range(); - int max = range(); - int step = step(); - - 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); - if ((tBlock instanceof GT_Block_Ores_Abstract)) { - 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 - % 1000)]; - if ((tMaterial != null) && (tMaterial != Materials._NULL)) { - if (!tStringList.contains(tMaterial.mDefaultLocalName)) { - tStringList.add(tMaterial.mDefaultLocalName); - } + && aStack != null + && aStack.stackSize == 1 + && aStack.getItem() == ItemList.Tool_DataStick.getItem()) { + this.ready = false; + GT_Utility.ItemNBT.setBookTitle(aPlayer.getCurrentEquippedItem(), "Raw Prospection Data"); + List tStringList = new ArrayList<>(); + + // range by tier + int min = -range(); + int max = range(); + int step = step(); + + 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); + if ((tBlock instanceof GT_Block_Ores_Abstract)) { + 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 + % 1000)]; + if ((tMaterial != null) && (tMaterial != Materials._NULL)) { + if (!tStringList.contains(tMaterial.mDefaultLocalName)) { + tStringList.add(tMaterial.mDefaultLocalName); } } } - } 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)) { - tStringList.add(tAssotiation.mMaterial.mMaterial.mDefaultLocalName); - } + } + } 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)) { + tStringList.add(tAssotiation.mMaterial.mMaterial.mDefaultLocalName); } } } } } - if (tStringList.size() < 1) { - tStringList.add("No Ores found."); - } - FluidStack tFluid = GT_UndergroundOil.undergroundOilReadInformation(getBaseMetaTileEntity()); - String[] tStringArray = new String[tStringList.size()]; - { - for (int i = 0; i < tStringArray.length; i++) { - tStringArray[i] = tStringList.get(i); - } + } + if (tStringList.size() < 1) { + tStringList.add("No Ores found."); + } + FluidStack tFluid = GT_UndergroundOil.undergroundOilReadInformation(getBaseMetaTileEntity()); + String[] tStringArray = new String[tStringList.size()]; + { + for (int i = 0; i < tStringArray.length; i++) { + tStringArray[i] = tStringList.get(i); } - GT_Utility.ItemNBT.setProspectionData( - aPlayer.getCurrentEquippedItem(), - this.getBaseMetaTileEntity() - .getXCoord(), - this.getBaseMetaTileEntity() - .getYCoord(), - this.getBaseMetaTileEntity() - .getZCoord(), - this.getBaseMetaTileEntity() - .getWorld().provider.dimensionId, - tFluid, - tStringArray); } + GT_Utility.ItemNBT.setProspectionData( + aPlayer.getCurrentEquippedItem(), + this.getBaseMetaTileEntity() + .getXCoord(), + this.getBaseMetaTileEntity() + .getYCoord(), + this.getBaseMetaTileEntity() + .getZCoord(), + this.getBaseMetaTileEntity() + .getWorld().provider.dimensionId, + tFluid, + tStringArray); + } } return true; 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 08b5897298..ffff8801a5 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 @@ -64,7 +64,7 @@ import gregtech.api.util.GT_Config; import gregtech.api.util.GT_Utility; public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank - implements IAddGregtechLogo, IAddUIWidgets { + implements IAddGregtechLogo, IAddUIWidgets { private static boolean sInterDimensionalTeleportAllowed = true; private static int sPassiveEnergyDrain = 2048; @@ -79,13 +79,13 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank public GT_MetaTileEntity_Teleporter(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 3, - new String[] { "Teleport long distances with this little device.", - "Use a Dragon Egg or Nitrogen Plasma", "for Inter-dimensional transmission" }); + aID, + aName, + aNameRegional, + aTier, + 3, + new String[] { "Teleport long distances with this little device.", "Use a Dragon Egg or Nitrogen Plasma", + "for Inter-dimensional transmission" }); } public GT_MetaTileEntity_Teleporter(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { @@ -116,8 +116,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank 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); + .getMaxStackSize() > 1 ? tPlayer.inventory.getStackInSlot(i).stackSize : 64); } } for (int i = 0; i < 4; i++) { @@ -128,11 +127,11 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank return Math.min(5.0F, tCount / 666.6F); } if (GT_Utility.getClassName(aEntity) - .equals("EntityItnt")) { + .equals("EntityItnt")) { return 5.0F; } if (GT_Utility.getClassName(aEntity) - .equals("EntityNuke")) { + .equals("EntityNuke")) { return 50.0F; } if ((aEntity instanceof EntityArrow)) { @@ -198,38 +197,38 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank @Override public String[] getInfoData() { return new String[] { "Coordinates:", - "X: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTargetX) + EnumChatFormatting.RESET, - "Y: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTargetY) + EnumChatFormatting.RESET, - "Z: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTargetZ) + EnumChatFormatting.RESET, - "Dimension: " + EnumChatFormatting.GREEN + this.mTargetD + EnumChatFormatting.RESET, - "Dimension Valid: " + (GT_Utility.isRealDimension(this.mTargetD) - ? EnumChatFormatting.GREEN + "Yes" + EnumChatFormatting.RESET - : EnumChatFormatting.RED + "No" + EnumChatFormatting.RESET), - "Dimension Registered: " + (DimensionManager.isDimensionRegistered(this.mTargetD) - ? EnumChatFormatting.GREEN + "Yes" + EnumChatFormatting.RESET - : EnumChatFormatting.RED + "No" + EnumChatFormatting.RESET) }; + "X: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTargetX) + EnumChatFormatting.RESET, + "Y: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTargetY) + EnumChatFormatting.RESET, + "Z: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(this.mTargetZ) + EnumChatFormatting.RESET, + "Dimension: " + EnumChatFormatting.GREEN + this.mTargetD + EnumChatFormatting.RESET, + "Dimension Valid: " + (GT_Utility.isRealDimension(this.mTargetD) + ? EnumChatFormatting.GREEN + "Yes" + EnumChatFormatting.RESET + : EnumChatFormatting.RED + "No" + EnumChatFormatting.RESET), + "Dimension Registered: " + (DimensionManager.isDimensionRegistered(this.mTargetD) + ? EnumChatFormatting.GREEN + "Yes" + EnumChatFormatting.RESET + : EnumChatFormatting.RED + "No" + EnumChatFormatting.RESET) }; } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + boolean aActive, boolean aRedstone) { if (aSide != this.getBaseMetaTileEntity() - .getFrontFacing()) + .getFrontFacing()) return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], - TextureFactory.of(OVERLAY_TELEPORTER_SIDES), TextureFactory.builder() - .addIcon(OVERLAY_TELEPORTER_SIDES_GLOW) - .glow() - .build() }; + 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 @@ -254,14 +253,10 @@ 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; } @@ -270,8 +265,8 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { if (getBaseMetaTileEntity().isServerSide()) { if ((this.mTargetX == 0) && (this.mTargetY == 0) - && (this.mTargetZ == 0) - && (this.mTargetD == Integer.MIN_VALUE)) { + && (this.mTargetZ == 0) + && (this.mTargetD == Integer.MIN_VALUE)) { this.mTargetX = aBaseMetaTileEntity.getXCoord(); this.mTargetY = aBaseMetaTileEntity.getYCoord(); this.mTargetZ = aBaseMetaTileEntity.getZCoord(); @@ -297,7 +292,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank public boolean hasDimensionalTeleportCapability() { return this.mDebug || // ( - sInterDimensionalTeleportAllowed // && + sInterDimensionalTeleportAllowed // && // ( // this.hasEgg || // mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) && mFluid.amount >= 1000 @@ -308,7 +303,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank public boolean isDimensionalTeleportAvailable() { return this.mDebug || (hasDimensionalTeleportCapability() && GT_Utility.isRealDimension(this.mTargetD) - && GT_Utility.isRealDimension(getBaseMetaTileEntity().getWorld().provider.dimensionId)); + && GT_Utility.isRealDimension(getBaseMetaTileEntity().getWorld().provider.dimensionId)); } @Override @@ -346,54 +341,42 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank if (tTile instanceof IInventory) { int tStacksize = mInventory[0].stackSize; GT_Utility.moveOneItemStack( - this, - tTile, - (byte) 0, - (byte) 0, - null, - false, - (byte) 64, - (byte) 1, - (byte) 64, - (byte) 1); + this, + tTile, + (byte) 0, + (byte) 0, + null, + false, + (byte) 64, + (byte) 1, + (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); + (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)); + .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 tEntity)) && (!((Entity) tObject).isDead)) { // GT_FML_LOGGER.info("teleport"+(Math.pow(tDistance, 1.5))); if (getBaseMetaTileEntity().decreaseStoredEnergyUnits( - (long) (Math.pow(tDistance, 1.5) * weightCalculation(tEntity) * sFPowerMultiplyer), - false)) { + (long) (Math.pow(tDistance, 1.5) * weightCalculation(tEntity) * sFPowerMultiplyer), + false)) { // if (hasDimensionalTeleportCapability() && this.mTargetD != // getBaseMetaTileEntity().getWorld().provider.dimensionId && (hasEgg || // mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)))) { @@ -410,23 +393,23 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank tEntity.riddenByEntity.mountEntity(null); } if ((this.mTargetD == getBaseMetaTileEntity().getWorld().provider.dimensionId) - || (!isDimensionalTeleportAvailable()) - || (!GT_Utility.moveEntityToDimensionAtCoords( - tEntity, - this.mTargetD, - this.mTargetX + 0.5D, - this.mTargetY + 0.5D, - this.mTargetZ + 0.5D))) { + || (!isDimensionalTeleportAvailable()) + || (!GT_Utility.moveEntityToDimensionAtCoords( + tEntity, + this.mTargetD, + this.mTargetX + 0.5D, + this.mTargetY + 0.5D, + this.mTargetZ + 0.5D))) { if ((tEntity instanceof EntityLivingBase)) { ((EntityLivingBase) tEntity).setPositionAndUpdate( - this.mTargetX + 0.5D, - this.mTargetY + 0.5D, - this.mTargetZ + 0.5D); + this.mTargetX + 0.5D, + this.mTargetY + 0.5D, + this.mTargetZ + 0.5D); } else { tEntity.setPosition( - this.mTargetX + 0.5D, - this.mTargetY + 0.5D, - this.mTargetZ + 0.5D); + this.mTargetX + 0.5D, + this.mTargetY + 0.5D, + this.mTargetZ + 0.5D); } } } @@ -442,15 +425,13 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank private int distanceCalculation() { return Math.abs( - ((this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId) - && (isDimensionalTeleportAvailable()) - ? 4000 - : (int) Math.sqrt( - Math.pow(getBaseMetaTileEntity().getXCoord() - this.mTargetX, 2.0D) - + Math.pow(getBaseMetaTileEntity().getYCoord() - this.mTargetY, 2.0D) - + Math.pow( - getBaseMetaTileEntity().getZCoord() - this.mTargetZ, - 2.0D)))); + ((this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId) + && (isDimensionalTeleportAvailable()) + ? 4000 + : (int) Math.sqrt( + Math.pow(getBaseMetaTileEntity().getXCoord() - this.mTargetX, 2.0D) + + Math.pow(getBaseMetaTileEntity().getYCoord() - this.mTargetY, 2.0D) + + Math.pow(getBaseMetaTileEntity().getZCoord() - this.mTargetZ, 2.0D)))); } @Override @@ -591,32 +572,31 @@ 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,40 +604,40 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank addChangeNumberButtons(builder, GT_UITextures.OVERLAY_BUTTON_PLUS_LARGE, 512, 64, 151); addChangeNumberButton( - builder, - GT_UITextures.OVERLAY_BUTTON_MINUS_LARGE, - val -> mTargetD += val, - -16, - -8, - 7, - 58); + builder, + GT_UITextures.OVERLAY_BUTTON_MINUS_LARGE, + val -> mTargetD += val, + -16, + -8, + 7, + 58); addChangeNumberButton( - builder, - GT_UITextures.OVERLAY_BUTTON_MINUS_SMALL, - val -> mTargetD += val, - -4, - -1, - 25, - 58); + builder, + GT_UITextures.OVERLAY_BUTTON_MINUS_SMALL, + val -> mTargetD += val, + -4, + -1, + 25, + 58); addChangeNumberButton(builder, GT_UITextures.OVERLAY_BUTTON_PLUS_SMALL, val -> mTargetD += val, 4, 1, 133, 58); addChangeNumberButton(builder, GT_UITextures.OVERLAY_BUTTON_PLUS_LARGE, val -> mTargetD += val, 16, 8, 151, 58); } private void addChangeNumberButtons(ModularWindow.Builder builder, IDrawable overlay, int addNumberShift, - int addNumber, int xPos) { + int addNumber, int xPos) { addChangeNumberButton(builder, overlay, val -> mTargetX += val, addNumberShift, addNumber, xPos, 4); addChangeNumberButton(builder, overlay, val -> mTargetY += val, addNumberShift, addNumber, xPos, 22); addChangeNumberButton(builder, overlay, val -> mTargetZ += val, addNumberShift, addNumber, xPos, 40); } private void addChangeNumberButton(ModularWindow.Builder builder, IDrawable overlay, Consumer setter, - int addNumberShift, int addNumber, int xPos, int yPos) { + 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 @@ -668,8 +648,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 898d819109..b868d151f2 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 @@ -66,12 +66,12 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta protected GT_MetaTileEntity_LongDistancePipelineBase mTooCloseTarget = null, mTooCloseSender = null; public GT_MetaTileEntity_LongDistancePipelineBase(int aID, String aName, String aNameRegional, int aTier, - String aDescription) { + String aDescription) { super(aID, aName, aNameRegional, aTier, aDescription); } public GT_MetaTileEntity_LongDistancePipelineBase(String aName, int aTier, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @@ -91,9 +91,9 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta super.loadNBTData(aNBT); if (aNBT.hasKey("target")) { mTargetPos = new ChunkCoordinates( - aNBT.getInteger("target.x"), - aNBT.getInteger("target.y"), - aNBT.getInteger("target.z")); + aNBT.getInteger("target.x"), + aNBT.getInteger("target.y"), + aNBT.getInteger("target.z")); if (getDistanceToSelf(mTargetPos) < minimalDistancePoints) mTargetPos = null; } } @@ -136,8 +136,9 @@ 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) - && isSameClass((GT_MetaTileEntity_LongDistancePipelineBase) tMeta)) { + && ((tMeta = ((BaseMetaTileEntity) te) + .getMetaTileEntity()) instanceof GT_MetaTileEntity_LongDistancePipelineBase) + && isSameClass((GT_MetaTileEntity_LongDistancePipelineBase) tMeta)) { // It's the right type! mTarget = (GT_MetaTileEntity_LongDistancePipelineBase) tMeta; } else if (te != null) { @@ -151,8 +152,8 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta mTooCloseSender = null; if (mTarget == null || mTarget == this) return false; if (mTarget.mSender == null || mTarget.mSender.isDead() - || mTarget.mSender.mTarget == null - || mTarget.mSender.mTarget.isDead()) { + || mTarget.mSender.mTarget == null + || mTarget.mSender.mTarget.isDead()) { mTarget.mSender = this; mTarget.mTooCloseSender = null; } @@ -162,22 +163,22 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta @Override public ArrayList getSpecialDebugInfo(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, - int aLogLevel, ArrayList aList) { + int aLogLevel, ArrayList aList) { if (mSender != null && !mSender.isDead() && mSender.mTarget == this) { final ChunkCoordinates coords = mSender.getCoords(); aList.addAll( - Arrays.asList( - "Is the Target", - "Sender is at: X: " + coords.posX + " Y: " + coords.posY + " Z: " + coords.posZ)); + Arrays.asList( + "Is the Target", + "Sender is at: X: " + coords.posX + " Y: " + coords.posY + " Z: " + coords.posZ)); } else { aList.addAll( - Arrays.asList( - checkTarget() ? "Has Target" : "Has no loaded Target", - "Target should be around: X: " + mTargetPos.posX - + " Y: " - + mTargetPos.posY - + " Z: " - + mTargetPos.posZ)); + Arrays.asList( + checkTarget() ? "Has Target" : "Has no loaded Target", + "Target should be around: X: " + mTargetPos.posX + + " Y: " + + mTargetPos.posY + + " Z: " + + mTargetPos.posZ)); } return aList; @@ -208,15 +209,15 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta if (aMetaData != getPipeMeta()) return; HashSet tVisited = new HashSet<>(Collections.singletonList(getCoords())), - tWires = new HashSet<>(); + tWires = new HashSet<>(); Queue tQueue = new LinkedList<>( - Collections.singletonList(getFacingOffset(gtTile, gtTile.getBackFacing()))); + Collections.singletonList(getFacingOffset(gtTile, gtTile.getBackFacing()))); while (!tQueue.isEmpty()) { final ChunkCoordinates aCoords = tQueue.poll(); if (world.getBlock(aCoords.posX, aCoords.posY, aCoords.posZ) == aBlock - && world.getBlockMetadata(aCoords.posX, aCoords.posY, aCoords.posZ) == aMetaData) { + && world.getBlockMetadata(aCoords.posX, aCoords.posY, aCoords.posZ) == aMetaData) { // We've got another pipe/wire block // TODO: Make sure it's the right type of pipe/wire via meta ChunkCoordinates tCoords; @@ -240,11 +241,12 @@ 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 tGtTile) { + && ((BaseMetaTileEntity) tTileEntity) + .getMetaTileEntity() instanceof GT_MetaTileEntity_LongDistancePipelineBase tGtTile) { if (isSameClass(tGtTile) && tWires.contains( - tGtTile.getFacingOffset( - (BaseMetaTileEntity) tTileEntity, - ((BaseMetaTileEntity) tTileEntity).getFrontFacing()))) { + tGtTile.getFacingOffset( + (BaseMetaTileEntity) tTileEntity, + ((BaseMetaTileEntity) tTileEntity).getFrontFacing()))) { // If it's the same class, and we've scanned a wire in front of it (the input side), we've // found our target // still need to check if it's distant enough @@ -273,15 +275,15 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta protected int getDistanceToSelf(ChunkCoordinates aCoords) { return Math.abs(getBaseMetaTileEntity().getXCoord() - aCoords.posX) - + Math.abs(getBaseMetaTileEntity().getYCoord() - aCoords.posY) / 2 - + Math.abs(getBaseMetaTileEntity().getZCoord() - aCoords.posZ); + + Math.abs(getBaseMetaTileEntity().getYCoord() - aCoords.posY) / 2 + + Math.abs(getBaseMetaTileEntity().getZCoord() - aCoords.posZ); } public ChunkCoordinates getFacingOffset(IGregTechTileEntity gt_tile, byte aSide) { return new ChunkCoordinates( - gt_tile.getOffsetX(aSide, 1), - gt_tile.getOffsetY(aSide, 1), - gt_tile.getOffsetZ(aSide, 1)); + gt_tile.getOffsetX(aSide, 1), + gt_tile.getOffsetY(aSide, 1), + gt_tile.getOffsetZ(aSide, 1)); } public ChunkCoordinates getCoords() { @@ -308,11 +310,11 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta @Override public void getWailaBody(ItemStack itemStack, List currentTip, IWailaDataAccessor accessor, - IWailaConfigHandler config) { + IWailaConfigHandler config) { final NBTTagCompound tag = accessor.getNBTData(); final int facing = getBaseMetaTileEntity().getFrontFacing(); final int side = (byte) accessor.getSide() - .ordinal(); + .ordinal(); if (side == facing) currentTip.add(GOLD + "Pipeline Input" + RESET); else if (side == ForgeDirection.OPPOSITES[facing]) currentTip.add(BLUE + "Pipeline Output" + RESET); @@ -333,7 +335,7 @@ public abstract class GT_MetaTileEntity_LongDistancePipelineBase extends GT_Meta @Override public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, - int z) { + int z) { super.getWailaNBTData(player, tile, tag, world, x, y, z); tag.setBoolean("hasSender", mSender != null); 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 2b4f4fe377..6b95d20d5c 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 @@ -46,7 +46,7 @@ public class GT_MetaTileEntity_LongDistancePipelineFluid extends GT_MetaTileEnti } public GT_MetaTileEntity_LongDistancePipelineFluid(String aName, int aTier, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @@ -110,15 +110,15 @@ public class GT_MetaTileEntity_LongDistancePipelineFluid extends GT_MetaTileEnti @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + boolean aActive, boolean aRedstone) { if (aSide == aFacing) return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], - TextureFactory.of(OVERLAY_PIPELINE_FLUID_FRONT) }; + TextureFactory.of(OVERLAY_PIPELINE_FLUID_FRONT) }; else if (aSide == GT_Utility.getOppositeSide(aFacing)) return new ITexture[] { - MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_PIPELINE_FLUID_BACK) }; + 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 85c009b350..dc3956d2a6 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 @@ -44,7 +44,7 @@ public class GT_MetaTileEntity_LongDistancePipelineItem extends GT_MetaTileEntit } public GT_MetaTileEntity_LongDistancePipelineItem(String aName, int aTier, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @@ -189,15 +189,15 @@ public class GT_MetaTileEntity_LongDistancePipelineItem extends GT_MetaTileEntit @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + boolean aActive, boolean aRedstone) { if (aSide == aFacing) return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], - TextureFactory.of(OVERLAY_PIPELINE_ITEM_FRONT) }; + TextureFactory.of(OVERLAY_PIPELINE_ITEM_FRONT) }; else if (aSide == GT_Utility.getOppositeSide(aFacing)) return new ITexture[] { - MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_PIPELINE_ITEM_BACK) }; + 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_AbstractMultiFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AbstractMultiFurnace.java index 51c7c2eb13..01638c4427 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AbstractMultiFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AbstractMultiFurnace.java @@ -7,7 +7,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase; public abstract class GT_MetaTileEntity_AbstractMultiFurnace> - extends GT_MetaTileEntity_EnhancedMultiBlockBase { + extends GT_MetaTileEntity_EnhancedMultiBlockBase { private HeatingCoilLevel mCoilLevel; @@ -26,9 +26,9 @@ public abstract class GT_MetaTileEntity_AbstractMultiFurnace implements ISurvivalConstructable { +public class GT_MetaTileEntity_AssemblyLine + extends GT_MetaTileEntity_EnhancedMultiBlockBase implements ISurvivalConstructable { public ArrayList mDataAccessHatches = new ArrayList<>(); 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 STRUCTURE_DEFINITION = StructureDefinition.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( - IndustrialCraft2.ID, - "blockAlloyGlass", - 0, - true), - ofBlockUnlocalizedName( - BartWorks.ID, - "BW_GlasBlocks", - 0, - true), - ofBlockUnlocalizedName( - BartWorks.ID, - "BW_GlasBlocks2", - 0, - true), - // warded - // glass - ofBlockUnlocalizedName( - Thaumcraft.ID, - "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 STRUCTURE_DEFINITION = StructureDefinition + .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(IndustrialCraft2.ID, "blockAlloyGlass", 0, true), + ofBlockUnlocalizedName(BartWorks.ID, "BW_GlasBlocks", 0, true), + ofBlockUnlocalizedName(BartWorks.ID, "BW_GlasBlocks2", 0, true), + // warded + // glass + ofBlockUnlocalizedName(Thaumcraft.ID, "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); @@ -242,54 +145,52 @@ public class GT_MetaTileEntity_AssemblyLine extends 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"); + .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; } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + 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() }; + .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() }; + .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] }; } @@ -323,9 +224,8 @@ 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; @@ -347,11 +247,11 @@ public class GT_MetaTileEntity_AssemblyLine extends if (mInputBusses.size() < tRecipe.mInputs.length || mInputHatches.size() < tRecipe.mFluidInputs.length) { if (GT_Values.D1) { GT_FML_LOGGER.info( - "Not enough sources: Need ({}, {}), has ({}, {})", - mInputBusses.size(), - tRecipe.mInputs.length, - mInputHatches.size(), - tRecipe.mFluidInputs.length); + "Not enough sources: Need ({}, {}), has ({}, {})", + mInputBusses.size(), + tRecipe.mInputs.length, + mInputHatches.size(), + tRecipe.mFluidInputs.length); } continue; } @@ -384,8 +284,7 @@ public class GT_MetaTileEntity_AssemblyLine extends } else { if (mInputHatches.get(i) instanceof GT_MetaTileEntity_Hatch_MultiInput tMultiHatch) { if (!tMultiHatch.hasFluid(tRecipe.mFluidInputs[i]) - || tMultiHatch.getFluidAmount(tRecipe.mFluidInputs[i]) - < tRecipe.mFluidInputs[i].amount) { + || tMultiHatch.getFluidAmount(tRecipe.mFluidInputs[i]) < tRecipe.mFluidInputs[i].amount) { continue nextDataStick; } tFluids[i] = tRecipe.mFluidInputs[i].amount; @@ -393,7 +292,7 @@ public class GT_MetaTileEntity_AssemblyLine extends } else { FluidStack fluidInHatch = mInputHatches.get(i).mFluid; if (!GT_Utility.areFluidsEqual(fluidInHatch, tRecipe.mFluidInputs[i], true) - || fluidInHatch.amount < tRecipe.mFluidInputs[i].amount) { + || fluidInHatch.amount < tRecipe.mFluidInputs[i].amount) { continue nextDataStick; } tFluids[i] = tRecipe.mFluidInputs[i].amount; @@ -433,7 +332,7 @@ public class GT_MetaTileEntity_AssemblyLine extends } for (int i = 0; i < tStack.length; i++) { ItemStack stackInSlot = mInputBusses.get(i) - .getStackInSlot(0); + .getStackInSlot(0); stackInSlot.stackSize -= tStack[i]; } @@ -535,17 +434,15 @@ 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++) { + .getSizeInventory(); i++) { if (tHatch.getBaseMetaTileEntity() - .getStackInSlot(i) - != null - && isCorrectDataItem( - tHatch.getBaseMetaTileEntity() - .getStackInSlot(i), - state)) + .getStackInSlot(i) != null && isCorrectDataItem( + tHatch.getBaseMetaTileEntity() + .getStackInSlot(i), + state)) rList.add( - tHatch.getBaseMetaTileEntity() - .getStackInSlot(i)); + 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 96b4c19b93..b650619966 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 @@ -18,17 +18,16 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; public class GT_MetaTileEntity_BrickedBlastFurnace extends GT_MetaTileEntity_PrimitiveBlastFurnace - implements ISecondaryDescribable { + implements ISecondaryDescribable { 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() }; + 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 GT_Multiblock_Tooltip_Builder tooltipBuilder; public GT_MetaTileEntity_BrickedBlastFurnace(int aID, String aName, String aNameRegional) { @@ -61,25 +60,25 @@ public class GT_MetaTileEntity_BrickedBlastFurnace extends GT_MetaTileEntity_Pri 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"); + .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; } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + boolean aActive, boolean aRedstone) { if (aSide == aFacing) { return aActive ? FACING_ACTIVE : FACING_FRONT; } 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 1710b33513..2341f6a046 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,10 +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); @@ -40,7 +40,7 @@ public class GT_MetaTileEntity_BronzeBlastFurnace extends GT_MetaTileEntity_Prim @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + boolean aActive, boolean aRedstone) { if (aSide == aFacing) { return aActive ? FACING_ACTIVE : FACING_FRONT; } 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 8780bdb038..9e1912ca51 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 @@ -33,7 +33,7 @@ import gregtech.api.util.WorldSpawnedEventBuilder; import gregtech.common.GT_Pollution; public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMultiBlockBase - implements ISecondaryDescribable { + implements ISecondaryDescribable { private boolean running = false; @@ -110,16 +110,16 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul if (running) { for (ChunkPosition tPos : tList1) { if (isWoodLog( - getBaseMetaTileEntity().getBlockOffset(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ), - getBaseMetaTileEntity().getMetaIDOffset(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ))) + 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); + .setBlock( + getBaseMetaTileEntity().getXCoord() + tPos.chunkPosX, + getBaseMetaTileEntity().getYCoord() + tPos.chunkPosY, + getBaseMetaTileEntity().getZCoord() + tPos.chunkPosZ, + GregTech_API.sBlockReinforced, + 4, + 3); } running = false; return false; @@ -133,16 +133,15 @@ 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; + .equals("logWood")) return true; } String tTool = log.getHarvestTool(meta); return OrePrefixes.log.contains(new ItemStack(log, 1, meta)) && ("axe".equals(tTool)) - && (log.getMaterial() == Material.wood); + && (log.getMaterial() == Material.wood); } private boolean checkAllBlockSides(int aX, int aY, int aZ, ArrayList aList1, - ArrayList aList2) { + ArrayList aList2) { boolean expandToChunkXPos = false; boolean expandToChunkXNeg = false; boolean expandToChunkYPos = false; @@ -153,8 +152,7 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul Block blockXPos = getBaseMetaTileEntity().getBlockOffset(aX + 1, aY, aZ); if (aX + 1 < 6 && (isWoodLog(blockXPos, getBaseMetaTileEntity().getMetaIDOffset(aX + 1, aY, aZ)))) { if (!aList1.contains(new ChunkPosition(aX + 1, aY, aZ)) - && (!aList2.contains(new ChunkPosition(aX + 1, aY, aZ)))) - expandToChunkXPos = true; + && (!aList2.contains(new ChunkPosition(aX + 1, aY, aZ)))) expandToChunkXPos = true; } else if (!(blockXPos == Blocks.dirt || blockXPos == Blocks.grass)) { return false; } @@ -162,8 +160,7 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul Block blockXNeg = getBaseMetaTileEntity().getBlockOffset(aX - 1, aY, aZ); if (aX - 1 > -6 && (isWoodLog(blockXNeg, getBaseMetaTileEntity().getMetaIDOffset(aX - 1, aY, aZ)))) { if (!aList1.contains(new ChunkPosition(aX - 1, aY, aZ)) - && (!aList2.contains(new ChunkPosition(aX - 1, aY, aZ)))) - expandToChunkXNeg = true; + && (!aList2.contains(new ChunkPosition(aX - 1, aY, aZ)))) expandToChunkXNeg = true; } else if (!(blockXNeg == Blocks.dirt || blockXNeg == Blocks.grass)) { return false; } @@ -171,18 +168,16 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul Block blockYPos = getBaseMetaTileEntity().getBlockOffset(aX, aY + 1, aZ); if (aY + 1 < 1 && (isWoodLog(blockYPos, getBaseMetaTileEntity().getMetaIDOffset(aX, aY + 1, aZ)))) { if (!aList1.contains(new ChunkPosition(aX, aY + 1, aZ)) - && (!aList2.contains(new ChunkPosition(aX, aY + 1, aZ)))) - expandToChunkYPos = true; + && (!aList2.contains(new ChunkPosition(aX, aY + 1, aZ)))) expandToChunkYPos = true; } else if (!(blockYPos == Blocks.dirt || blockYPos == Blocks.grass - || (aX == 0 && aY == -1 && aZ == 0 && blockYPos == GregTech_API.sBlockMachines))) { - return false; - } + || (aX == 0 && aY == -1 && aZ == 0 && blockYPos == GregTech_API.sBlockMachines))) { + return false; + } Block blockYNeg = getBaseMetaTileEntity().getBlockOffset(aX, aY - 1, aZ); if (aY - 1 > -6 && (isWoodLog(blockYNeg, getBaseMetaTileEntity().getMetaIDOffset(aX, aY - 1, aZ)))) { if (!aList1.contains(new ChunkPosition(aX, aY - 1, aZ)) - && (!aList2.contains(new ChunkPosition(aX, aY - 1, aZ)))) - expandToChunkYNeg = true; + && (!aList2.contains(new ChunkPosition(aX, aY - 1, aZ)))) expandToChunkYNeg = true; } else if (blockYNeg != Blocks.brick_block) { return false; } @@ -190,8 +185,7 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul Block blockZPos = getBaseMetaTileEntity().getBlockOffset(aX, aY, aZ + 1); if (aZ + 1 < 6 && (isWoodLog(blockZPos, getBaseMetaTileEntity().getMetaIDOffset(aX, aY, aZ + 1)))) { if (!aList1.contains(new ChunkPosition(aX, aY, aZ + 1)) - && (!aList2.contains(new ChunkPosition(aX, aY, aZ + 1)))) - expandToChunkZPos = true; + && (!aList2.contains(new ChunkPosition(aX, aY, aZ + 1)))) expandToChunkZPos = true; } else if (!(blockZPos == Blocks.dirt || blockZPos == Blocks.grass)) { return false; } @@ -199,8 +193,7 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul Block blockZNeg = getBaseMetaTileEntity().getBlockOffset(aX, aY, aZ - 1); if (aZ - 1 > -6 && (isWoodLog(blockZNeg, getBaseMetaTileEntity().getMetaIDOffset(aX, aY, aZ - 1)))) { if (!aList1.contains(new ChunkPosition(aX, aY, aZ - 1)) - && (!aList2.contains(new ChunkPosition(aX, aY, aZ - 1)))) - expandToChunkZNeg = true; + && (!aList2.contains(new ChunkPosition(aX, aY, aZ - 1)))) expandToChunkZNeg = true; } else if (!(blockZNeg == Blocks.dirt || blockZNeg == Blocks.grass)) { return false; } @@ -258,36 +251,35 @@ 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"); + .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; } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + boolean aActive, boolean aRedstone) { 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() }; + 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() }; 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] }; } @@ -305,15 +297,13 @@ 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 0d18ce040b..76b867bcbf 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 @@ -33,7 +33,7 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiBlockBase - implements IConstructable, ISecondaryDescribable { + implements IConstructable, ISecondaryDescribable { private int mHeight = -1; @@ -54,29 +54,29 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB 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"); + .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; } @@ -190,7 +190,7 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) { if (debugCleanroom) { GT_Log.out.println( - "Cleanroom: Non reinforced block on top face interior? tMeta != 11"); + "Cleanroom: Non reinforced block on top face interior? tMeta != 11"); } return false; } @@ -198,12 +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))) { + && (!this.addEnergyInputToMachineList(tTileEntity, 210))) { if (tBlock instanceof ic2.core.block.BlockIC2Door) { if ((tMeta & 8) == 0) { // let's not fiddle with bits anymore. @@ -228,8 +226,7 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB } else { if (debugCleanroom) { GT_Log.out.println( - "Cleanroom: Incorrect GT block? " - + tBlock.getUnlocalizedName()); + "Cleanroom: Incorrect GT block? " + tBlock.getUnlocalizedName()); } return false; } @@ -243,7 +240,7 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB otherBlocks.compute(key, (k, v) -> v == null ? 1 : v + 1); } else { if (debugCleanroom) GT_Log.out.println( - "Cleanroom: not allowed block " + tBlock.getUnlocalizedName()); + "Cleanroom: not allowed block " + tBlock.getUnlocalizedName()); return false; } } @@ -256,8 +253,8 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB } } if (this.mMaintenanceHatches.size() != 1 || this.mEnergyHatches.size() != 1 - || mDoorCount > 4 - || mHullCount > 10) { + || mDoorCount > 4 + || mHullCount > 10) { return false; } if (mPlascreteCount < 20) return false; @@ -310,8 +307,8 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB @SuppressWarnings("unchecked") private void checkAndSetCallback(IMachineCallback iMachineCallback) { if (debugCleanroom) GT_Log.out.println( - "Cleanroom: IMachineCallback detected, checking for cleanroom: " - + (iMachineCallback.getType() == this.getClass())); + "Cleanroom: IMachineCallback detected, checking for cleanroom: " + + (iMachineCallback.getType() == this.getClass())); if (iMachineCallback.getType() == this.getClass()) ((IMachineCallback) iMachineCallback).setCallbackBase(this); } @@ -323,21 +320,21 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + boolean aActive, boolean aRedstone) { if (aSide == ForgeDirection.DOWN.ordinal() || aSide == ForgeDirection.UP.ordinal()) { 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.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()) }; } return new ITexture[] { TextureFactory.of(BLOCK_PLASCRETE) }; } @@ -426,45 +423,45 @@ 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()) { + .getChildren()) { final String name = cc.get("Name") - .getString(); + .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())); + 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, + 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())); + 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, + 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 2b902349bc..869d96f2c4 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 @@ -30,27 +30,27 @@ public abstract class GT_MetaTileEntity_ConcreteBackfillerBase extends GT_MetaTi protected GT_Multiblock_Tooltip_Builder createTooltip(String aStructureName) { String casings = getCasingBlockItem().get(0) - .getDisplayName(); + .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"); + .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; } @@ -78,7 +78,7 @@ public abstract class GT_MetaTileEntity_ConcreteBackfillerBase extends GT_MetaTi @Override protected boolean workingUpward(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, - int yHead, int oldYHead) { + int yHead, int oldYHead) { if (isRefillableBlock(xPipe, yHead - 1, zPipe)) return tryRefillBlock(xPipe, yHead - 1, zPipe); int radius = getRadius(); if (mLastXOff == 0 && mLastZOff == 0) { @@ -111,19 +111,12 @@ 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()) + .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; } @@ -131,7 +124,7 @@ public abstract class GT_MetaTileEntity_ConcreteBackfillerBase extends GT_MetaTi private boolean tryRefillBlock(int aX, int aY, int aZ) { if (!tryConsumeFluid()) return false; getBaseMetaTileEntity().getWorld() - .setBlock(aX, aY, aZ, GregTech_API.sBlockConcretes, 8, 3); + .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 7e6ff95da1..069afffacf 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 @@ -42,8 +42,8 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; -public class GT_MetaTileEntity_DieselEngine extends - GT_MetaTileEntity_EnhancedMultiBlockBase implements ISurvivalConstructable { +public class GT_MetaTileEntity_DieselEngine + extends GT_MetaTileEntity_EnhancedMultiBlockBase implements ISurvivalConstructable { private static final String STRUCTURE_PIECE_MAIN = "main"; private static final ClassValue> STRUCTURE_DEFINITION = new ClassValue<>() { @@ -51,33 +51,24 @@ public class GT_MetaTileEntity_DieselEngine extends @Override protected IStructureDefinition computeValue(Class type) { return StructureDefinition.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(); + .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; @@ -97,53 +88,52 @@ public class GT_MetaTileEntity_DieselEngine extends 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"); + .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; } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + 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() }; + .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() }; + .addIcon(OVERLAY_FRONT_DIESEL_ENGINE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_DIESEL_ENGINE_GLOW) + .extFacing() + .glow() + .build() }; } return new ITexture[] { casingTexturePages[0][50] }; } @@ -238,7 +228,7 @@ public class GT_MetaTileEntity_DieselEngine extends // Deplete Lubricant. 1000L should = 1 hour of runtime (if baseEU = 2048) if ((mRuntime % 72 == 0 || mRuntime == 0) - && !depleteInput(Materials.Lubricant.getFluid((boostEu ? 2L : 1L) * getAdditiveFactor()))) + && !depleteInput(Materials.Lubricant.getFluid((boostEu ? 2L : 1L) * getAdditiveFactor()))) return false; fuelRemaining = tFluid.amount; // Record available fuel @@ -262,7 +252,7 @@ public class GT_MetaTileEntity_DieselEngine extends @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { return checkPiece(STRUCTURE_PIECE_MAIN, 1, 1, 1) && !mMufflerHatches.isEmpty() - && mMaintenanceHatches.size() == 1; + && mMaintenanceHatches.size() == 1; } public Block getCasingBlock() { @@ -295,9 +285,9 @@ public class GT_MetaTileEntity_DieselEngine extends private boolean addToMachineList(IGregTechTileEntity tTileEntity) { return ((addMaintenanceToMachineList(tTileEntity, getCasingTextureIndex())) - || (addInputToMachineList(tTileEntity, getCasingTextureIndex())) - || (addOutputToMachineList(tTileEntity, getCasingTextureIndex())) - || (addMufflerToMachineList(tTileEntity, getCasingTextureIndex()))); + || (addInputToMachineList(tTileEntity, getCasingTextureIndex())) + || (addOutputToMachineList(tTileEntity, getCasingTextureIndex())) + || (addMufflerToMachineList(tTileEntity, getCasingTextureIndex()))); } @Override @@ -349,57 +339,57 @@ public class GT_MetaTileEntity_DieselEngine extends for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) { if (isValidMetaTileEntity(tHatch)) { storedEnergy += tHatch.getBaseMetaTileEntity() - .getStoredEU(); + .getStoredEU(); maxEnergy += tHatch.getBaseMetaTileEntity() - .getEUCapacity(); + .getEUCapacity(); } } return new String[] { EnumChatFormatting.BLUE + "Diesel Engine" + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " - + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(storedEnergy) - + EnumChatFormatting.RESET - + " EU / " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(maxEnergy) - + EnumChatFormatting.RESET - + " EU", - getIdealStatus() == getRepairStatus() - ? EnumChatFormatting.GREEN + StatCollector.translateToLocal("GT5U.turbine.maintenance.false") - + EnumChatFormatting.RESET - : EnumChatFormatting.RED + StatCollector.translateToLocal("GT5U.turbine.maintenance.true") - + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.engine.output") + ": " - + EnumChatFormatting.RED - + GT_Utility.formatNumbers((mEUt * mEfficiency / 10000)) - + EnumChatFormatting.RESET - + " EU/t", - StatCollector.translateToLocal("GT5U.engine.consumption") + ": " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(fuelConsumption) - + EnumChatFormatting.RESET - + " L/t", - StatCollector.translateToLocal("GT5U.engine.value") + ": " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(fuelValue) - + EnumChatFormatting.RESET - + " EU/L", - StatCollector.translateToLocal("GT5U.turbine.fuel") + ": " - + EnumChatFormatting.GOLD - + GT_Utility.formatNumbers(fuelRemaining) - + EnumChatFormatting.RESET - + " L", - StatCollector.translateToLocal("GT5U.engine.efficiency") + ": " - + EnumChatFormatting.YELLOW - + (mEfficiency / 100F) - + EnumChatFormatting.YELLOW - + " %", - StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " - + EnumChatFormatting.GREEN - + mPollutionReduction - + EnumChatFormatting.RESET - + " %" }; + StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(storedEnergy) + + EnumChatFormatting.RESET + + " EU / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(maxEnergy) + + EnumChatFormatting.RESET + + " EU", + getIdealStatus() == getRepairStatus() + ? EnumChatFormatting.GREEN + StatCollector.translateToLocal("GT5U.turbine.maintenance.false") + + EnumChatFormatting.RESET + : EnumChatFormatting.RED + StatCollector.translateToLocal("GT5U.turbine.maintenance.true") + + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.engine.output") + ": " + + EnumChatFormatting.RED + + GT_Utility.formatNumbers((mEUt * mEfficiency / 10000)) + + EnumChatFormatting.RESET + + " EU/t", + StatCollector.translateToLocal("GT5U.engine.consumption") + ": " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(fuelConsumption) + + EnumChatFormatting.RESET + + " L/t", + StatCollector.translateToLocal("GT5U.engine.value") + ": " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(fuelValue) + + EnumChatFormatting.RESET + + " EU/L", + StatCollector.translateToLocal("GT5U.turbine.fuel") + ": " + + EnumChatFormatting.GOLD + + GT_Utility.formatNumbers(fuelRemaining) + + EnumChatFormatting.RESET + + " L", + StatCollector.translateToLocal("GT5U.engine.efficiency") + ": " + + EnumChatFormatting.YELLOW + + (mEfficiency / 100F) + + EnumChatFormatting.YELLOW + + " %", + StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + + EnumChatFormatting.GREEN + + mPollutionReduction + + EnumChatFormatting.RESET + + " %" }; } @Override 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 716634998f..2d7fcdda22 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 @@ -41,9 +41,8 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; -public class GT_MetaTileEntity_DistillationTower - extends GT_MetaTileEntity_EnhancedMultiBlockBase - implements ISurvivalConstructable { +public class GT_MetaTileEntity_DistillationTower extends + GT_MetaTileEntity_EnhancedMultiBlockBase implements ISurvivalConstructable { protected static final int CASING_INDEX = 49; protected static final String STRUCTURE_PIECE_BASE = "base"; @@ -53,104 +52,62 @@ public class GT_MetaTileEntity_DistillationTower private static final IStructureDefinition STRUCTURE_DEFINITION; static { - IHatchElement layeredOutputHatch = OutputHatch.withCount( - GT_MetaTileEntity_DistillationTower::getCurrentLayerOutputHatchCount) - .withAdder( - GT_MetaTileEntity_DistillationTower::addLayerOutputHatch); + IHatchElement layeredOutputHatch = OutputHatch + .withCount(GT_MetaTileEntity_DistillationTower::getCurrentLayerOutputHatchCount) + .withAdder(GT_MetaTileEntity_DistillationTower::addLayerOutputHatch); STRUCTURE_DEFINITION = StructureDefinition.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> mOutputHatchesByLayer = new ArrayList<>(); @@ -175,46 +132,45 @@ public class GT_MetaTileEntity_DistillationTower 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"); + .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; } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + 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() }; + 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() }; + .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) }; } @@ -270,11 +226,11 @@ public class GT_MetaTileEntity_DistillationTower FluidStack[] tFluids = tFluidList.toArray(new FluidStack[0]); for (FluidStack tFluid : tFluids) { tRecipe = GT_Recipe.GT_Recipe_Map.sDistillationRecipes.findRecipe( - getBaseMetaTileEntity(), - false, - gregtech.api.enums.GT_Values.V[tTier], - new FluidStack[] { tFluid }, - inputs); + getBaseMetaTileEntity(), + false, + gregtech.api.enums.GT_Values.V[tTier], + new FluidStack[] { tFluid }, + inputs); if (tRecipe != null) { if (tRecipe.isRecipeInputEqual(true, tFluids, inputs)) { this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); @@ -308,18 +264,17 @@ 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) { if (aTileEntity == null || aTileEntity.isDead() - || !(aTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Output tHatch)) - return false; + || !(aTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Output tHatch)) return false; while (mOutputHatchesByLayer.size() < mHeight) mOutputHatchesByLayer.add(new ArrayList<>()); tHatch.updateTexture(aBaseCasingIndex); return mOutputHatchesByLayer.get(mHeight - 1) - .add(tHatch); + .add(tHatch); } @Override @@ -350,7 +305,7 @@ public class GT_MetaTileEntity_DistillationTower return false; } if (mOutputHatchesByLayer.size() < mHeight || mOutputHatchesByLayer.get(mHeight - 1) - .isEmpty()) + .isEmpty()) // layer without output hatch return false; if (mTopLayerFound) { @@ -410,28 +365,28 @@ public class GT_MetaTileEntity_DistillationTower for (int i = 1; i < tTotalHeight - 1; i++) { mHeight = i; built = survivialBuildPiece( - STRUCTURE_PIECE_LAYER_HINT, - stackSize, - 1, - i, - 0, - elementBudget, - env, - false, - true); - if (built >= 0) return built; - } - mHeight = tTotalHeight - 1; - return survivialBuildPiece( - STRUCTURE_PIECE_TOP_HINT, + STRUCTURE_PIECE_LAYER_HINT, stackSize, 1, - tTotalHeight - 1, + i, 0, elementBudget, env, false, true); + if (built >= 0) return built; + } + mHeight = tTotalHeight - 1; + return survivialBuildPiece( + STRUCTURE_PIECE_TOP_HINT, + stackSize, + 1, + tTotalHeight - 1, + 0, + elementBudget, + env, + false, + true); } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java index f7993fd2f4..e7879cbe0d 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 @@ -50,8 +50,8 @@ import gregtech.api.util.GT_Utility; import gregtech.api.util.IGT_HatchAdder; public abstract class GT_MetaTileEntity_DrillerBase - extends GT_MetaTileEntity_EnhancedMultiBlockBase - implements IChunkLoader, ISurvivalConstructable { + extends GT_MetaTileEntity_EnhancedMultiBlockBase + implements IChunkLoader, ISurvivalConstructable { private static final ItemStack miningPipe = GT_ModHandler.getIC2Item("miningPipe", 0); private static final ItemStack miningPipeTip = GT_ModHandler.getIC2Item("miningPipeTip", 0); @@ -63,41 +63,36 @@ public abstract class GT_MetaTileEntity_DrillerBase @Override protected IStructureDefinition computeValue(Class type) { return StructureDefinition.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(); } }; @@ -139,39 +134,37 @@ public abstract class GT_MetaTileEntity_DrillerBase private void initFields() { casingBlock = getCasingBlockItem().getBlock(); casingMeta = getCasingBlockItem().get(0) - .getItemDamage(); + .getItemDamage(); int frameId = 4096 + getFrameMaterial().mMetaItemSubID; frameMeta = GregTech_API.METATILEENTITIES[frameId] != null - ? GregTech_API.METATILEENTITIES[frameId].getTileEntityBaseType() - : W; + ? GregTech_API.METATILEENTITIES[frameId].getTileEntityBaseType() + : W; casingTextureIndex = getCasingTextureIndex(); workState = STATE_DOWNWARD; } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + 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() }; + .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() }; + .addIcon(OVERLAY_FRONT_ORE_DRILL) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_ORE_DRILL_GLOW) + .extFacing() + .glow() + .build() }; } return new ITexture[] { getCasingTextureForId(casingTextureIndex) }; } @@ -197,20 +190,20 @@ public abstract class GT_MetaTileEntity_DrillerBase if (aNBT.hasKey("chunkLoadingEnabled")) mChunkLoadingEnabled = aNBT.getBoolean("chunkLoadingEnabled"); if (aNBT.getBoolean("isChunkloading")) { mCurrentChunk = new ChunkCoordIntPair( - aNBT.getInteger("loadedChunkXPos"), - aNBT.getInteger("loadedChunkZPos")); + aNBT.getInteger("loadedChunkXPos"), + aNBT.getInteger("loadedChunkZPos")); } } @Override public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, - float aZ) { + float aZ) { if (aSide == getBaseMetaTileEntity().getFrontFacing()) { mChunkLoadingEnabled = !mChunkLoadingEnabled; GT_Utility.sendChatToPlayer( - aPlayer, - mChunkLoadingEnabled ? GT_Utility.trans("502", "Mining chunk loading enabled") - : GT_Utility.trans("503", "Mining chunk loading disabled")); + aPlayer, + mChunkLoadingEnabled ? GT_Utility.trans("502", "Mining chunk loading enabled") + : GT_Utility.trans("503", "Mining chunk loading disabled")); return true; } return super.onSolderingToolRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ); @@ -226,8 +219,8 @@ public abstract class GT_MetaTileEntity_DrillerBase public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPostTick(aBaseMetaTileEntity, aTick); if (aBaseMetaTileEntity.isServerSide() && mCurrentChunk != null - && !mWorkChunkNeedsReload - && !aBaseMetaTileEntity.isAllowedToWork()) { + && !mWorkChunkNeedsReload + && !aBaseMetaTileEntity.isAllowedToWork()) { // if machine has stopped, stop chunkloading GT_ChunkManager.releaseTicket((TileEntity) aBaseMetaTileEntity); mWorkChunkNeedsReload = true; @@ -238,13 +231,9 @@ public abstract class GT_MetaTileEntity_DrillerBase if (yHead == yDrill) return isPickingPipes = false; if (tryOutputPipe()) { if (checkBlockAndMeta(xPipe, yHead + 1, zPipe, miningPipeBlock, W)) getBaseMetaTileEntity().getWorld() - .setBlock( - xPipe, - yHead + 1, - zPipe, - miningPipeTipBlock); + .setBlock(xPipe, yHead + 1, zPipe, miningPipeTipBlock); getBaseMetaTileEntity().getWorld() - .setBlockToAir(xPipe, yHead, zPipe); + .setBlockToAir(xPipe, yHead, zPipe); return isPickingPipes = true; } return isPickingPipes = false; @@ -284,17 +273,16 @@ public abstract class GT_MetaTileEntity_DrillerBase Block b = getBaseMetaTileEntity().getBlock(xPipe, yHead - 1, zPipe); if (b != miningPipeTipBlock && !GT_Utility.setBlockByFakePlayer( - getFakePlayer(getBaseMetaTileEntity()), - xPipe, - yHead - 1, - zPipe, - miningPipeTipBlock, - 0, - isSimulating)) - return 3; + getFakePlayer(getBaseMetaTileEntity()), + xPipe, + yHead - 1, + zPipe, + miningPipeTipBlock, + 0, + isSimulating)) return 3; if (!isSimulating) { if (yHead != yDrill) getBaseMetaTileEntity().getWorld() - .setBlock(xPipe, yHead, zPipe, miningPipeBlock); + .setBlock(xPipe, yHead, zPipe, miningPipeBlock); if (b != miningPipeBlock && b != miningPipeTipBlock) getBaseMetaTileEntity().decrStackSize(1, 1); } @@ -375,7 +363,7 @@ public abstract class GT_MetaTileEntity_DrillerBase } protected boolean workingDownward(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, - int yHead, int oldYHead) { + int yHead, int oldYHead) { switch (tryLowerPipeState()) { case 2 -> { mMaxProgresstime = 0; @@ -396,7 +384,7 @@ public abstract class GT_MetaTileEntity_DrillerBase } protected boolean workingAtBottom(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, - int yHead, int oldYHead) { + int yHead, int oldYHead) { if (tryLowerPipeState(true) == 0) { workState = STATE_DOWNWARD; return true; @@ -406,7 +394,7 @@ public abstract class GT_MetaTileEntity_DrillerBase } protected boolean workingUpward(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, - int yHead, int oldYHead) { + int yHead, int oldYHead) { if (tryPickPipe()) { return true; } else { @@ -448,8 +436,8 @@ public abstract class GT_MetaTileEntity_DrillerBase public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { updateCoordinates(); return checkPiece(STRUCTURE_PIECE_MAIN, 1, 6, 0) && checkHatches() - && GT_Utility.getTier(getMaxInputVoltage()) >= getMinTier() - && mMaintenanceHatches.size() == 1; + && GT_Utility.getTier(getMaxInputVoltage()) >= getMinTier() + && mMaintenanceHatches.size() == 1; } private void updateCoordinates() { @@ -468,7 +456,7 @@ public abstract class GT_MetaTileEntity_DrillerBase if (checkBlockAndMeta(xPipe, yHead, zPipe, miningPipeTipBlock, W) || ++yHead == yDrill) return true; // pipe column is broken - try fix getBaseMetaTileEntity().getWorld() - .setBlock(xPipe, yHead, zPipe, miningPipeTipBlock); + .setBlock(xPipe, yHead, zPipe, miningPipeTipBlock); return true; } @@ -491,7 +479,7 @@ public abstract class GT_MetaTileEntity_DrillerBase private boolean checkBlockAndMeta(int x, int y, int z, Block block, int meta) { return (meta == W || getBaseMetaTileEntity().getMetaID(x, y, z) == meta) - && getBaseMetaTileEntity().getBlock(x, y, z) == block; + && getBaseMetaTileEntity().getBlock(x, y, z) == block; } private FakePlayer mFakePlayer = null; @@ -569,17 +557,15 @@ 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++) { + .getSizeInventory(); i++) { if (tHatch.getBaseMetaTileEntity() - .getStackInSlot(i) - != null - && isCorrectDataItem( - tHatch.getBaseMetaTileEntity() - .getStackInSlot(i), - state)) + .getStackInSlot(i) != null && isCorrectDataItem( + tHatch.getBaseMetaTileEntity() + .getStackInSlot(i), + state)) rList.add( - tHatch.getBaseMetaTileEntity() - .getStackInSlot(i)); + tHatch.getBaseMetaTileEntity() + .getStackInSlot(i)); } } } @@ -589,7 +575,7 @@ public abstract class GT_MetaTileEntity_DrillerBase @Override public boolean addToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { return super.addToMachineList(aTileEntity, aBaseCasingIndex) - || addDataAccessToMachineList(aTileEntity, aBaseCasingIndex); + || addDataAccessToMachineList(aTileEntity, aBaseCasingIndex); } public boolean addDataAccessToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { @@ -621,14 +607,14 @@ public abstract class GT_MetaTileEntity_DrillerBase protected List> getAllowedHatches() { return ImmutableList.of( - InputHatch, - OutputHatch, - InputBus, - OutputBus, - Muffler, - Maintenance, - Energy, - DataHatchElement.DataAccess); + InputHatch, + OutputHatch, + InputBus, + OutputBus, + Muffler, + Maintenance, + Energy, + DataHatchElement.DataAccess); } protected enum DataHatchElement implements IHatchElement { 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 c4795c1507..acd87c1687 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 @@ -35,73 +35,46 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; -public class GT_MetaTileEntity_ElectricBlastFurnace - extends GT_MetaTileEntity_AbstractMultiFurnace - implements ISurvivalConstructable { +public class GT_MetaTileEntity_ElectricBlastFurnace extends + GT_MetaTileEntity_AbstractMultiFurnace implements ISurvivalConstructable { private int mHeatingCapacity = 0; protected final ArrayList mPollutionOutputHatches = new ArrayList<>(); protected final FluidStack[] pollutionFluidStacks = { Materials.CarbonDioxide.getGas(1000), - Materials.CarbonMonoxide.getGas(1000), Materials.SulfurDioxide.getGas(1000) }; + Materials.CarbonMonoxide.getGas(1000), Materials.SulfurDioxide.getGas(1000) }; protected static final int CASING_INDEX = 11; protected static final String STRUCTURE_PIECE_MAIN = "main"; - private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.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 STRUCTURE_DEFINITION = StructureDefinition + .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); @@ -120,56 +93,54 @@ public class GT_MetaTileEntity_ElectricBlastFurnace 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"); + .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; } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + 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() }; + .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() }; + .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] }; } @@ -204,13 +175,12 @@ public class GT_MetaTileEntity_ElectricBlastFurnace if (isValidMetaTileEntity(tBus)) { for (int i = tBus.getBaseMetaTileEntity() - .getSizeInventory() - - 1; i >= 0; i--) { + .getSizeInventory() - 1; i >= 0; i--) { if (tBus.getBaseMetaTileEntity() - .getStackInSlot(i) != null) { + .getStackInSlot(i) != null) { tInputs.add( - tBus.getBaseMetaTileEntity() - .getStackInSlot(i)); + tBus.getBaseMetaTileEntity() + .getStackInSlot(i)); } } } @@ -231,12 +201,8 @@ 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; @@ -382,66 +348,66 @@ public class GT_MetaTileEntity_ElectricBlastFurnace for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) { if (!isValidMetaTileEntity(tHatch)) continue; storedEnergy += tHatch.getBaseMetaTileEntity() - .getStoredEU(); + .getStoredEU(); maxEnergy += tHatch.getBaseMetaTileEntity() - .getEUCapacity(); + .getEUCapacity(); } return new String[] { - StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " - + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(mProgresstime / 20) - + EnumChatFormatting.RESET - + " s / " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(mMaxProgresstime / 20) - + EnumChatFormatting.RESET - + " s", - StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " - + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(storedEnergy) - + EnumChatFormatting.RESET - + " EU / " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(maxEnergy) - + EnumChatFormatting.RESET - + " EU", - StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " - + EnumChatFormatting.RED - + GT_Utility.formatNumbers(-mEUt) - + EnumChatFormatting.RESET - + " EU/t", - StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(getMaxInputVoltage()) - + EnumChatFormatting.RESET - + " EU/t(*2A) " - + StatCollector.translateToLocal("GT5U.machines.tier") - + ": " - + EnumChatFormatting.YELLOW - + VN[GT_Utility.getTier(getMaxInputVoltage())] - + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " - + EnumChatFormatting.RED - + (getIdealStatus() - getRepairStatus()) - + EnumChatFormatting.RESET - + " " - + StatCollector.translateToLocal("GT5U.multiblock.efficiency") - + ": " - + EnumChatFormatting.YELLOW - + mEfficiency / 100.0F - + EnumChatFormatting.RESET - + " %", - StatCollector.translateToLocal("GT5U.EBF.heat") + ": " - + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(mHeatingCapacity) - + EnumChatFormatting.RESET - + " K", - StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " - + EnumChatFormatting.GREEN - + mPollutionReduction - + EnumChatFormatting.RESET - + " %" }; + StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(mProgresstime / 20) + + EnumChatFormatting.RESET + + " s / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(mMaxProgresstime / 20) + + EnumChatFormatting.RESET + + " s", + StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(storedEnergy) + + EnumChatFormatting.RESET + + " EU / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(maxEnergy) + + EnumChatFormatting.RESET + + " EU", + StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + + EnumChatFormatting.RED + + GT_Utility.formatNumbers(-mEUt) + + EnumChatFormatting.RESET + + " EU/t", + StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(getMaxInputVoltage()) + + EnumChatFormatting.RESET + + " EU/t(*2A) " + + StatCollector.translateToLocal("GT5U.machines.tier") + + ": " + + EnumChatFormatting.YELLOW + + VN[GT_Utility.getTier(getMaxInputVoltage())] + + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " + + EnumChatFormatting.RED + + (getIdealStatus() - getRepairStatus()) + + EnumChatFormatting.RESET + + " " + + StatCollector.translateToLocal("GT5U.multiblock.efficiency") + + ": " + + EnumChatFormatting.YELLOW + + mEfficiency / 100.0F + + EnumChatFormatting.RESET + + " %", + StatCollector.translateToLocal("GT5U.EBF.heat") + ": " + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(mHeatingCapacity) + + EnumChatFormatting.RESET + + " K", + StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + + EnumChatFormatting.GREEN + + mPollutionReduction + + EnumChatFormatting.RESET + + " %" }; } @Override @@ -459,8 +425,8 @@ public class GT_MetaTileEntity_ElectricBlastFurnace public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { inputSeparation = !inputSeparation; GT_Utility.sendChatToPlayer( - aPlayer, - StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + inputSeparation); + aPlayer, + StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + inputSeparation); } @Override 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 e9ed294fc2..f156d4ffbd 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 @@ -38,27 +38,27 @@ public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_Die 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"); + .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; } @@ -69,28 +69,26 @@ public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_Die @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + 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() }; + .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() }; + .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] }; } @@ -184,56 +182,56 @@ public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_Die for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) { if (isValidMetaTileEntity(tHatch)) { storedEnergy += tHatch.getBaseMetaTileEntity() - .getStoredEU(); + .getStoredEU(); maxEnergy += tHatch.getBaseMetaTileEntity() - .getEUCapacity(); + .getEUCapacity(); } } return new String[] { EnumChatFormatting.BLUE + "Extreme Diesel Engine" + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " - + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(storedEnergy) - + EnumChatFormatting.RESET - + " EU / " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(maxEnergy) - + EnumChatFormatting.RESET - + " EU", - getIdealStatus() == getRepairStatus() - ? EnumChatFormatting.GREEN + StatCollector.translateToLocal("GT5U.turbine.maintenance.false") - + EnumChatFormatting.RESET - : EnumChatFormatting.RED + StatCollector.translateToLocal("GT5U.turbine.maintenance.true") - + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.engine.output") + ": " - + EnumChatFormatting.RED - + GT_Utility.formatNumbers(-mEUt * mEfficiency / 10000) - + EnumChatFormatting.RESET - + " EU/t", - StatCollector.translateToLocal("GT5U.engine.consumption") + ": " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(fuelConsumption) - + EnumChatFormatting.RESET - + " L/t", - StatCollector.translateToLocal("GT5U.engine.value") + ": " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(fuelValue) - + EnumChatFormatting.RESET - + " EU/L", - StatCollector.translateToLocal("GT5U.turbine.fuel") + ": " - + EnumChatFormatting.GOLD - + GT_Utility.formatNumbers(fuelRemaining) - + EnumChatFormatting.RESET - + " L", - StatCollector.translateToLocal("GT5U.engine.efficiency") + ": " - + EnumChatFormatting.YELLOW - + (mEfficiency / 100F) - + EnumChatFormatting.YELLOW - + " %", - StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " - + EnumChatFormatting.GREEN - + mPollutionReduction - + EnumChatFormatting.RESET - + " %" }; + StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(storedEnergy) + + EnumChatFormatting.RESET + + " EU / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(maxEnergy) + + EnumChatFormatting.RESET + + " EU", + getIdealStatus() == getRepairStatus() + ? EnumChatFormatting.GREEN + StatCollector.translateToLocal("GT5U.turbine.maintenance.false") + + EnumChatFormatting.RESET + : EnumChatFormatting.RED + StatCollector.translateToLocal("GT5U.turbine.maintenance.true") + + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.engine.output") + ": " + + EnumChatFormatting.RED + + GT_Utility.formatNumbers(-mEUt * mEfficiency / 10000) + + EnumChatFormatting.RESET + + " EU/t", + StatCollector.translateToLocal("GT5U.engine.consumption") + ": " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(fuelConsumption) + + EnumChatFormatting.RESET + + " L/t", + StatCollector.translateToLocal("GT5U.engine.value") + ": " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(fuelValue) + + EnumChatFormatting.RESET + + " EU/L", + StatCollector.translateToLocal("GT5U.turbine.fuel") + ": " + + EnumChatFormatting.GOLD + + GT_Utility.formatNumbers(fuelRemaining) + + EnumChatFormatting.RESET + + " L", + StatCollector.translateToLocal("GT5U.engine.efficiency") + ": " + + EnumChatFormatting.YELLOW + + (mEfficiency / 100F) + + EnumChatFormatting.YELLOW + + " %", + StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + + EnumChatFormatting.GREEN + + mPollutionReduction + + EnumChatFormatting.RESET + + " %" }; } } 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 73b26c6a59..a67b050abb 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 @@ -56,8 +56,8 @@ import gregtech.common.power.FusionPower; import gregtech.common.power.Power; public abstract class GT_MetaTileEntity_FusionComputer - extends GT_MetaTileEntity_EnhancedMultiBlockBase - implements ISurvivalConstructable, IAddUIWidgets { + extends GT_MetaTileEntity_EnhancedMultiBlockBase + implements ISurvivalConstructable, IAddUIWidgets { protected FusionPower power; @@ -67,84 +67,53 @@ public abstract class GT_MetaTileEntity_FusionComputer @Override protected IStructureDefinition computeValue(Class type) { return StructureDefinition.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(); + .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; @@ -152,17 +121,17 @@ public abstract class GT_MetaTileEntity_FusionComputer static { 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())); + 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())); } public GT_MetaTileEntity_FusionComputer(int aID, String aName, String aNameRegional, int tier) { @@ -211,20 +180,20 @@ public abstract class GT_MetaTileEntity_FusionComputer 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"); + .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; } @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { if (checkPiece(STRUCTURE_PIECE_MAIN, 7, 1, 12) && mInputHatches.size() > 1 - && !mOutputHatches.isEmpty() - && !mEnergyHatches.isEmpty()) { + && !mOutputHatches.isEmpty() + && !mEnergyHatches.isEmpty()) { mWrench = true; mScrewdriver = true; mSoftHammer = true; @@ -275,17 +244,16 @@ public abstract class GT_MetaTileEntity_FusionComputer @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + boolean aActive, boolean aRedstone) { if (aSide == aFacing) return new ITexture[] { TextureFactory.builder() - .addIcon(MACHINE_CASING_FUSION_GLASS) - .extFacing() - .build(), - getTextureOverlay() }; + .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() }; + .addIcon(MACHINE_CASING_FUSION_GLASS) + .extFacing() + .build() }; } /** @@ -333,19 +301,11 @@ 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(), - this.mLastRecipe, - false, - GT_Values.V[tier()], - tFluids); + tRecipe = GT_Recipe.GT_Recipe_Map.sComplexFusionRecipes + .findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, false, GT_Values.V[tier()], tFluids); } if ((tRecipe == null && !mRunningOnLoad) || (maxEUStore() < tRecipe.mSpecialValue)) { @@ -411,8 +371,8 @@ public abstract class GT_MetaTileEntity_FusionComputer if (isValidMetaTileEntity(tHatch)) { long energyToMove = GT_Values.V[tier()] / 16; if (aBaseMetaTileEntity.getStoredEU() + energyToMove < maxEUStore() - && tHatch.getBaseMetaTileEntity() - .decreaseStoredEnergyUnits(energyToMove, false)) { + && tHatch.getBaseMetaTileEntity() + .decreaseStoredEnergyUnits(energyToMove, false)) { aBaseMetaTileEntity.increaseStoredEnergyUnits(energyToMove, true); } } @@ -428,9 +388,8 @@ public abstract class GT_MetaTileEntity_FusionComputer for (ItemStack tStack : mOutputItems) if (tStack != null) addOutput(tStack); if (mOutputFluids != null) for (FluidStack tStack : mOutputFluids) if (tStack != null) addOutput(tStack); - mEfficiency = Math.max( - 0, - Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]))); + mEfficiency = Math + .max(0, Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]))); mOutputItems = null; mProgresstime = 0; mMaxProgresstime = 0; @@ -438,10 +397,9 @@ public abstract class GT_MetaTileEntity_FusionComputer if (mOutputFluids != null && mOutputFluids.length > 0) { try { GT_Mod.achievements.issueAchivementHatchFluid( - aBaseMetaTileEntity.getWorld() - .getPlayerEntityByName( - aBaseMetaTileEntity.getOwnerName()), - mOutputFluids[0]); + aBaseMetaTileEntity.getWorld() + .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), + mOutputFluids[0]); } catch (Exception ignored) {} } this.mEUStore = aBaseMetaTileEntity.getStoredEU(); @@ -449,7 +407,7 @@ public abstract class GT_MetaTileEntity_FusionComputer } } else { if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled() - || aBaseMetaTileEntity.hasInventoryBeenModified()) { + || aBaseMetaTileEntity.hasInventoryBeenModified()) { turnCasingActive(mMaxProgresstime > 0); if (aBaseMetaTileEntity.isAllowedToWork()) { this.mEUStore = aBaseMetaTileEntity.getStoredEU(); @@ -457,9 +415,8 @@ public abstract class GT_MetaTileEntity_FusionComputer if (this.mEUStore < this.mLastRecipe.mSpecialValue - this.mEUt) { criticalStopMachine(); } - aBaseMetaTileEntity.decreaseStoredEnergyUnits( - this.mLastRecipe.mSpecialValue - this.mEUt, - true); + aBaseMetaTileEntity + .decreaseStoredEnergyUnits(this.mLastRecipe.mSpecialValue - this.mEUt, true); } } if (mMaxProgresstime <= 0) mEfficiency = Math.max(0, mEfficiency - 1000); @@ -470,8 +427,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); } } @@ -522,8 +479,8 @@ public abstract class GT_MetaTileEntity_FusionComputer @Override public String[] getInfoData() { String tier = tier() == 6 ? EnumChatFormatting.RED + "I" + EnumChatFormatting.RESET - : tier() == 7 ? EnumChatFormatting.YELLOW + "II" + EnumChatFormatting.RESET - : tier() == 8 ? EnumChatFormatting.GRAY + "III" + EnumChatFormatting.RESET : "IV"; + : tier() == 7 ? EnumChatFormatting.YELLOW + "II" + EnumChatFormatting.RESET + : tier() == 8 ? EnumChatFormatting.GRAY + "III" + EnumChatFormatting.RESET : "IV"; float plasmaOut = 0; int powerRequired = 0; if (this.mLastRecipe != null) { @@ -534,25 +491,25 @@ public abstract class GT_MetaTileEntity_FusionComputer } return new String[] { EnumChatFormatting.BLUE + "Fusion Reactor MK " + EnumChatFormatting.RESET + tier, - StatCollector.translateToLocal("GT5U.fusion.req") + ": " - + EnumChatFormatting.RED - + GT_Utility.formatNumbers(powerRequired) - + EnumChatFormatting.RESET - + "EU/t", - StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " - + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(mEUStore) - + EnumChatFormatting.RESET - + " EU / " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(maxEUStore()) - + EnumChatFormatting.RESET - + " EU", - StatCollector.translateToLocal("GT5U.fusion.plasma") + ": " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(plasmaOut) - + EnumChatFormatting.RESET - + "L/t" }; + StatCollector.translateToLocal("GT5U.fusion.req") + ": " + + EnumChatFormatting.RED + + GT_Utility.formatNumbers(powerRequired) + + EnumChatFormatting.RESET + + "EU/t", + StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(mEUStore) + + EnumChatFormatting.RESET + + " EU / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(maxEUStore()) + + EnumChatFormatting.RESET + + " EU", + StatCollector.translateToLocal("GT5U.fusion.plasma") + ": " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(plasmaOut) + + EnumChatFormatting.RESET + + "L/t" }; } @Override @@ -584,9 +541,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 @@ -606,79 +563,71 @@ public abstract class GT_MetaTileEntity_FusionComputer @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { - builder.widget( + 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 382e2c6c6e..cd44756d62 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,15 +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); @@ -75,22 +75,22 @@ public class GT_MetaTileEntity_FusionComputer1 extends GT_MetaTileEntity_FusionC 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"); + .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 5a5e884cb8..7b77ddcf66 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,15 +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); @@ -75,22 +75,22 @@ public class GT_MetaTileEntity_FusionComputer2 extends GT_MetaTileEntity_FusionC 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"); + .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 2d5c6111fd..271e28713d 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,15 +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); @@ -75,22 +75,22 @@ public class GT_MetaTileEntity_FusionComputer3 extends GT_MetaTileEntity_FusionC 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"); + .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 ceb901c5ad..bdaf5209ce 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 @@ -36,74 +36,41 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Utility; public class GT_MetaTileEntity_HeatExchanger extends - GT_MetaTileEntity_EnhancedMultiBlockBase implements ISurvivalConstructable { + GT_MetaTileEntity_EnhancedMultiBlockBase implements ISurvivalConstructable { private int dryHeatCounter = 0; // Counts up to dryHeatMaximum to check for explosion conditions 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 STRUCTURE_DEFINITION = StructureDefinition.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 STRUCTURE_DEFINITION = StructureDefinition + .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; @@ -129,23 +96,23 @@ public class GT_MetaTileEntity_HeatExchanger extends 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"); + .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; } @@ -165,28 +132,26 @@ public class GT_MetaTileEntity_HeatExchanger extends @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + 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() }; + .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() }; + .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] }; } @@ -218,7 +183,7 @@ public class GT_MetaTileEntity_HeatExchanger extends // Do we have an integrated circuit with a valid configuration? if (mInventory[1] != null && mInventory[1].getUnlocalizedName() - .startsWith("gt.integrated_circuit")) { + .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. @@ -234,25 +199,24 @@ public class GT_MetaTileEntity_HeatExchanger extends 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; - } + .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 @@ -391,43 +355,43 @@ public class GT_MetaTileEntity_HeatExchanger extends @Override public String[] getInfoData() { return new String[] { - StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " - + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(mProgresstime / 20) - + EnumChatFormatting.RESET - + " s / " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(mMaxProgresstime / 20) - + EnumChatFormatting.RESET - + " s", - StatCollector.translateToLocal("GT5U.multiblock.usage") + " " - + StatCollector.translateToLocal("GT5U.LHE.steam") - + ": " - + (superheated ? EnumChatFormatting.RED : EnumChatFormatting.YELLOW) - + GT_Utility.formatNumbers(superheated ? -2 * mEUt : -mEUt) - + EnumChatFormatting.RESET - + " EU/t", - StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " - + EnumChatFormatting.RED - + (getIdealStatus() - getRepairStatus()) - + EnumChatFormatting.RESET - + " " - + StatCollector.translateToLocal("GT5U.multiblock.efficiency") - + ": " - + EnumChatFormatting.YELLOW - + mEfficiency / 100.0F - + EnumChatFormatting.RESET - + " %", - StatCollector.translateToLocal("GT5U.LHE.superheated") + ": " - + (superheated ? EnumChatFormatting.RED : EnumChatFormatting.BLUE) - + superheated - + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.LHE.superheated") + " " - + StatCollector.translateToLocal("GT5U.LHE.threshold") - + ": " - + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(superheated_threshold) - + EnumChatFormatting.RESET }; + StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(mProgresstime / 20) + + EnumChatFormatting.RESET + + " s / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(mMaxProgresstime / 20) + + EnumChatFormatting.RESET + + " s", + StatCollector.translateToLocal("GT5U.multiblock.usage") + " " + + StatCollector.translateToLocal("GT5U.LHE.steam") + + ": " + + (superheated ? EnumChatFormatting.RED : EnumChatFormatting.YELLOW) + + GT_Utility.formatNumbers(superheated ? -2 * mEUt : -mEUt) + + EnumChatFormatting.RESET + + " EU/t", + StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " + + EnumChatFormatting.RED + + (getIdealStatus() - getRepairStatus()) + + EnumChatFormatting.RESET + + " " + + StatCollector.translateToLocal("GT5U.multiblock.efficiency") + + ": " + + EnumChatFormatting.YELLOW + + mEfficiency / 100.0F + + EnumChatFormatting.RESET + + " %", + StatCollector.translateToLocal("GT5U.LHE.superheated") + ": " + + (superheated ? EnumChatFormatting.RED : EnumChatFormatting.BLUE) + + superheated + + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.LHE.superheated") + " " + + StatCollector.translateToLocal("GT5U.LHE.threshold") + + ": " + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(superheated_threshold) + + EnumChatFormatting.RESET }; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java index fede7c283d..f21d814838 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 @@ -25,7 +25,7 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; public class GT_MetaTileEntity_ImplosionCompressor - extends GT_MetaTileEntity_CubicMultiBlockBase { + extends GT_MetaTileEntity_CubicMultiBlockBase { public GT_MetaTileEntity_ImplosionCompressor(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -44,53 +44,51 @@ public class GT_MetaTileEntity_ImplosionCompressor 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"); + .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; } @Override public boolean addToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { return super.addToMachineList(aTileEntity, aBaseCasingIndex) - || addMufflerToMachineList(aTileEntity, aBaseCasingIndex); + || addMufflerToMachineList(aTileEntity, aBaseCasingIndex); } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + 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() }; + .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() }; + .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] }; } @@ -125,12 +123,8 @@ 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 ef0eae45a8..23fa445868 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 @@ -49,192 +49,70 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; -public class GT_MetaTileEntity_IntegratedOreFactory - extends GT_MetaTileEntity_EnhancedMultiBlockBase - implements ISurvivalConstructable { +public class GT_MetaTileEntity_IntegratedOreFactory extends + GT_MetaTileEntity_EnhancedMultiBlockBase implements ISurvivalConstructable { private static final int CASING_INDEX1 = 183; 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 STRUCTURE_DEFINITION = StructureDefinition.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( - IndustrialCraft2.ID, - "blockAlloyGlass", - 0, - true), - ofBlockUnlocalizedName( - BartWorks.ID, - "BW_GlasBlocks", - 0, - true), - ofBlockUnlocalizedName( - BartWorks.ID, - "BW_GlasBlocks2", - 0, - true), - // warded - // glass - ofBlockUnlocalizedName( - Thaumcraft.ID, - "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 STRUCTURE_DEFINITION = StructureDefinition + .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(IndustrialCraft2.ID, "blockAlloyGlass", 0, true), + ofBlockUnlocalizedName(BartWorks.ID, "BW_GlasBlocks", 0, true), + ofBlockUnlocalizedName(BartWorks.ID, "BW_GlasBlocks2", 0, true), + // warded + // glass + ofBlockUnlocalizedName(Thaumcraft.ID, "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 isCrushedOre = new HashSet<>(); private static final HashSet isCrushedPureOre = new HashSet<>(); @@ -311,30 +189,30 @@ public class GT_MetaTileEntity_IntegratedOreFactory 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"); + .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; } @@ -405,10 +283,10 @@ public class GT_MetaTileEntity_IntegratedOreFactory int tID = GT_Utility.stackToInt(ore); if (tID == 0) continue; if (isPureDust.contains(tID) || isImpureDust.contains(tID) - || isCrushedPureOre.contains(tID) - || isThermal.contains(tID) - || isCrushedOre.contains(tID) - || isOre.contains(tID)) { + || isCrushedPureOre.contains(tID) + || isThermal.contains(tID) + || isCrushedOre.contains(tID) + || isOre.contains(tID)) { if (ore.stackSize <= tCharged) { tRealUsed += ore.stackSize; tOres.add(GT_Utility.copy(ore)); @@ -497,8 +375,8 @@ public class GT_MetaTileEntity_IntegratedOreFactory if (aPlayer.isSneaking()) { sVoidStone = !sVoidStone; GT_Utility.sendChatToPlayer( - aPlayer, - StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.void", sVoidStone)); + aPlayer, + StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.void", sVoidStone)); return; } sMode = (sMode + 1) % 5; @@ -529,12 +407,8 @@ 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 { @@ -556,11 +430,11 @@ public class GT_MetaTileEntity_IntegratedOreFactory int tID = GT_Utility.stackToInt(aStack); if (checkTypes(tID, aTables)) { GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sOreWasherRecipes.findRecipe( - getBaseMetaTileEntity(), - false, - GT_Values.V[15], - new FluidStack[] { GT_ModHandler.getDistilledWater(Integer.MAX_VALUE) }, - aStack); + getBaseMetaTileEntity(), + false, + GT_Values.V[15], + new FluidStack[] { GT_ModHandler.getDistilledWater(Integer.MAX_VALUE) }, + aStack); if (tRecipe != null) { tProduct.addAll(getOutputStack(tRecipe, aStack.stackSize)); } else { @@ -581,12 +455,8 @@ 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 { @@ -607,12 +477,8 @@ 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 { @@ -633,12 +499,8 @@ 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 { @@ -660,14 +522,14 @@ public class GT_MetaTileEntity_IntegratedOreFactory int tID = GT_Utility.stackToInt(aStack); if (checkTypes(tID, aTables)) { GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes.findRecipe( - getBaseMetaTileEntity(), - false, - GT_Values.V[15], - getStoredFluids().toArray(new FluidStack[0]), - aStack); + getBaseMetaTileEntity(), + false, + GT_Values.V[15], + getStoredFluids().toArray(new FluidStack[0]), + aStack); if (tRecipe != null && tRecipe.getRepresentativeFluidInput(0) != null) { FluidStack tInputFluid = tRecipe.getRepresentativeFluidInput(0) - .copy(); + .copy(); int tStored = getFluidAmount(tInputFluid); int tWashed = Math.min(tStored / tInputFluid.amount, aStack.stackSize); depleteInput(new FluidStack(tInputFluid.getFluid(), tWashed * tInputFluid.amount)); @@ -712,13 +574,13 @@ public class GT_MetaTileEntity_IntegratedOreFactory double e = aTime * (tChance / 10000D) * (1 - (tChance / 10000D)); Random random = new Random(); int tAmount = (int) Math.ceil(Math.sqrt(e) * random.nextGaussian() + u); - tOutput.add( - GT_Utility.copyAmountUnsafe(tAmount * aRecipe.getOutput(i).stackSize, aRecipe.getOutput(i))); + tOutput + .add(GT_Utility.copyAmountUnsafe(tAmount * aRecipe.getOutput(i).stackSize, aRecipe.getOutput(i))); } } return tOutput.stream() - .filter(i -> (i != null && i.stackSize > 0)) - .collect(Collectors.toList()); + .filter(i -> (i != null && i.stackSize > 0)) + .collect(Collectors.toList()); } private void doCompress(List aList) { @@ -750,7 +612,7 @@ public class GT_MetaTileEntity_IntegratedOreFactory @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { return checkPiece(STRUCTURE_PIECE_MAIN, 8, 9, 1) && mMaintenanceHatches.size() <= 1 - && !mMufflerHatches.isEmpty(); + && !mMufflerHatches.isEmpty(); } @Override @@ -790,9 +652,9 @@ public class GT_MetaTileEntity_IntegratedOreFactory public String[] getInfoData() { List informationData = new ArrayList<>(Arrays.asList(super.getInfoData())); String parallelism = StatCollector.translateToLocal("GT5U.multiblock.parallelism") + ": " - + EnumChatFormatting.BLUE - + getCurrentParallelism() - + EnumChatFormatting.RESET; + + EnumChatFormatting.BLUE + + getCurrentParallelism() + + EnumChatFormatting.RESET; informationData.add(parallelism); informationData.add(StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.void", sVoidStone)); informationData.addAll(getDisplayMode(sMode)); @@ -801,28 +663,27 @@ public class GT_MetaTileEntity_IntegratedOreFactory @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + 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() }; + 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() }; + .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) }; } @@ -831,13 +692,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 des = new ArrayList<>(); @@ -883,24 +744,24 @@ public class GT_MetaTileEntity_IntegratedOreFactory @Override public void getWailaBody(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, - IWailaConfigHandler config) { + IWailaConfigHandler config) { super.getWailaBody(itemStack, currenttip, accessor, config); NBTTagCompound tag = accessor.getNBTData(); currenttip.add( - StatCollector.translateToLocal("GT5U.multiblock.parallelism") + ": " - + EnumChatFormatting.BLUE - + tag.getInteger("currentParallelism") - + EnumChatFormatting.RESET); + StatCollector.translateToLocal("GT5U.multiblock.parallelism") + ": " + + EnumChatFormatting.BLUE + + tag.getInteger("currentParallelism") + + EnumChatFormatting.RESET); currenttip.addAll(getDisplayMode(tag.getInteger("ssMode"))); - currenttip.add( - StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.void", tag.getBoolean("ssStone"))); + currenttip + .add(StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.void", tag.getBoolean("ssStone"))); } @Override public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, - int z) { + int z) { super.getWailaNBTData(player, tile, tag, world, x, y, z); tag.setInteger("ssMode", sMode); tag.setBoolean("ssStone", sVoidStone); 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 fa2ebcb2a4..a2086307f1 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 @@ -43,8 +43,8 @@ import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; -public abstract class GT_MetaTileEntity_LargeBoiler extends - GT_MetaTileEntity_EnhancedMultiBlockBase implements ISurvivalConstructable { +public abstract class GT_MetaTileEntity_LargeBoiler + extends GT_MetaTileEntity_EnhancedMultiBlockBase implements ISurvivalConstructable { private static final String STRUCTURE_PIECE_MAIN = "main"; private static final ClassValue> STRUCTURE_DEFINITION = new ClassValue<>() { @@ -52,46 +52,34 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends @Override protected IStructureDefinition computeValue(Class type) { return StructureDefinition.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(); + .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; @@ -117,46 +105,46 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); tt.addMachineType("Boiler") - .addInfo("Controller block for the Large " + getCasingMaterial() + " 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()) { tt.addInfo( - "Produces " + formatNumbers((getEUt() * 40) * ((runtimeBoost(20) / (20f)) / superToNormalSteam)) - + "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!"); + "Produces " + formatNumbers((getEUt() * 40) * ((runtimeBoost(20) / (20f)) / superToNormalSteam)) + + "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!"); } 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"); + "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"); } 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"); + 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"); return tt; } @@ -193,35 +181,34 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends public int getPollutionPerSecond(ItemStack aStack) { // allows for 0 pollution if circuit throttle is too high return Math.max( - 0, - (int) (pollutionPerSecond - * (1 - GT_Mod.gregtechproxy.mPollutionReleasedByThrottle * getIntegratedCircuitConfig()))); + 0, + (int) (pollutionPerSecond + * (1 - GT_Mod.gregtechproxy.mPollutionReleasedByThrottle * getIntegratedCircuitConfig()))); } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + 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() }; + 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() }; + .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()) }; } @@ -235,7 +222,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends if (!isSuperheated()) return true; for (ItemStack input : getStoredInputs()) { if (!GT_Recipe.GT_Recipe_Map_LargeBoilerFakeFuels.isAllowedSolidFuel(input) - && !Circuit_Integrated.isStackEqual(input, true, true)) { + && !Circuit_Integrated.isStackEqual(input, true, true)) { // if any item is not in ALLOWED_SOLID_FUELS, operation cannot be allowed because it might still be // consumed this.mMaxProgresstime = 0; @@ -281,7 +268,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends tFluid.amount = 1000; if (depleteInput(tFluid)) { this.mMaxProgresstime = adjustBurnTimeForConfig( - Math.max(1, runtimeBoost(tRecipe.mSpecialValue * 2))); + Math.max(1, runtimeBoost(tRecipe.mSpecialValue * 2))); this.mEUt = adjustEUtForConfig(getEUt()); this.mEfficiencyIncrease = this.mMaxProgresstime * getEfficiencyIncrease(); return true; @@ -296,7 +283,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends for (ItemStack tInput : tInputList) { if (tInput != GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Lava, 1)) { if (GT_Utility.getFluidForFilledItem(tInput, true) == null - && (this.mMaxProgresstime = GT_ModHandler.getFuelValue(tInput) / 80) > 0) { + && (this.mMaxProgresstime = GT_ModHandler.getFuelValue(tInput) / 80) > 0) { this.excessFuel += GT_ModHandler.getFuelValue(tInput) % 80; this.mMaxProgresstime += this.excessFuel / 80; this.excessFuel %= 80; @@ -320,9 +307,9 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends // Solid fuels with burn values below getEUt are ignored (mostly items like sticks), and also // those with very high fuel values that would cause an overflow error. if (GT_Utility.getFluidForFilledItem(tInput, true) == null - && (this.mMaxProgresstime = GT_ModHandler.getFuelValue(tInput) / 80) > 0 - && (GT_ModHandler.getFuelValue(tInput) * 2 / this.getEUt()) > 1 - && GT_ModHandler.getFuelValue(tInput) < 100000000) { + && (this.mMaxProgresstime = GT_ModHandler.getFuelValue(tInput) / 80) > 0 + && (GT_ModHandler.getFuelValue(tInput) * 2 / this.getEUt()) > 1 + && GT_ModHandler.getFuelValue(tInput) < 100000000) { this.excessFuel += GT_ModHandler.getFuelValue(tInput) % 80; this.mMaxProgresstime += this.excessFuel / 80; this.excessFuel %= 80; @@ -357,10 +344,10 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends public boolean onRunningTick(ItemStack aStack) { if (this.mEUt > 0) { if (this.mSuperEfficencyIncrease > 0) mEfficiency = Math.max( - 0, - Math.min( - mEfficiency + mSuperEfficencyIncrease, - getMaxEfficiency(mInventory[1]) - ((getIdealStatus() - getRepairStatus()) * 1000))); + 0, + Math.min( + mEfficiency + mSuperEfficencyIncrease, + getMaxEfficiency(mInventory[1]) - ((getIdealStatus() - getRepairStatus()) * 1000))); int tGeneratedEU = (int) (this.mEUt * 2L * this.mEfficiency / 10000L); if (tGeneratedEU > 0) { long amount = (tGeneratedEU + STEAM_PER_WATER) / STEAM_PER_WATER; @@ -371,18 +358,18 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends // Consumes only one third of the water if producing Superheated Steam, to maintain water in the // chain. if (depleteInput(Materials.Water.getFluid(amount / superToNormalSteam)) - || depleteInput(GT_ModHandler.getDistilledWater(amount / superToNormalSteam))) { + || depleteInput(GT_ModHandler.getDistilledWater(amount / superToNormalSteam))) { // Outputs Superheated Steam instead of Steam, at one third of the amount (equivalent in power // output to the normal Steam amount). addOutput( - FluidRegistry.getFluidStack("ic2superheatedsteam", tGeneratedEU / superToNormalSteam)); + FluidRegistry.getFluidStack("ic2superheatedsteam", tGeneratedEU / superToNormalSteam)); } else { GT_Log.exp.println("Boiler " + this.mName + " had no Water!"); explodeMultiblock(); } } else { if (depleteInput(Materials.Water.getFluid(amount)) - || depleteInput(GT_ModHandler.getDistilledWater(amount))) { + || depleteInput(GT_ModHandler.getDistilledWater(amount))) { addOutput(GT_ModHandler.getSteam(tGeneratedEU)); } else { GT_Log.exp.println("Boiler " + this.mName + " had no Water!"); @@ -416,9 +403,9 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends if (mProgresstime > 0 && firstRun) { firstRun = false; GT_Mod.achievements.issueAchievement( - aBaseMetaTileEntity.getWorld() - .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), - "extremepressure"); + aBaseMetaTileEntity.getWorld() + .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), + "extremepressure"); } super.onPostTick(aBaseMetaTileEntity, aTick); } @@ -441,9 +428,9 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends mCasingAmount = 0; mFireboxAmount = 0; return checkPiece(STRUCTURE_PIECE_MAIN, 1, 4, 0) && mCasingAmount >= 24 - && mFireboxAmount >= 3 - && mMaintenanceHatches.size() == 1 - && !mMufflerHatches.isEmpty(); + && mFireboxAmount >= 3 + && mMaintenanceHatches.size() == 1 + && !mMufflerHatches.isEmpty(); } @Override 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 4c717a85a8..ee7821ddb8 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 @@ -37,70 +37,39 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Single_Recipe_Check; import gregtech.api.util.GT_Utility; -public class GT_MetaTileEntity_LargeChemicalReactor - extends GT_MetaTileEntity_EnhancedMultiBlockBase - implements ISurvivalConstructable { +public class GT_MetaTileEntity_LargeChemicalReactor extends + GT_MetaTileEntity_EnhancedMultiBlockBase implements ISurvivalConstructable { private static final int CASING_INDEX = 176; private static final String STRUCTURE_PIECE_MAIN = "main"; - private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.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 STRUCTURE_DEFINITION = StructureDefinition + .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; @@ -122,50 +91,48 @@ public class GT_MetaTileEntity_LargeChemicalReactor 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"); + .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; } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + 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() }; + .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() }; + .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] }; } @@ -212,16 +179,16 @@ public class GT_MetaTileEntity_LargeChemicalReactor // 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(); + .setBefore(); } tRecipe = GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.findRecipe( - getBaseMetaTileEntity(), - false, - false, - gregtech.api.enums.GT_Values.V[tier], - fluids, - inputs); + getBaseMetaTileEntity(), + false, + false, + gregtech.api.enums.GT_Values.V[tier], + fluids, + inputs); if (tRecipe == null || !tRecipe.isRecipeInputEqual(true, fluids, inputs)) { return false; @@ -229,8 +196,8 @@ public class GT_MetaTileEntity_LargeChemicalReactor if (mLockedToSingleRecipe) { mSingleRecipeCheck = tSingleRecipeCheckBuilder.setAfter() - .setRecipe(tRecipe) - .build(); + .setRecipe(tRecipe) + .build(); } } @@ -268,9 +235,9 @@ public class GT_MetaTileEntity_LargeChemicalReactor mCasingAmount = 0; mCoilAmount = 0; return checkPiece(STRUCTURE_PIECE_MAIN, 1, 1, 0) && mCasingAmount >= 8 - && mCoilAmount == 1 - && !mEnergyHatches.isEmpty() - && mMaintenanceHatches.size() == 1; + && mCoilAmount == 1 + && !mEnergyHatches.isEmpty() + && mMaintenanceHatches.size() == 1; } @Override @@ -309,7 +276,7 @@ public class GT_MetaTileEntity_LargeChemicalReactor public boolean check(GT_MetaTileEntity_LargeChemicalReactor t, World world, int x, int y, int z) { Block block = world.getBlock(x, y, z); if (block instanceof IHeatingCoil - && ((IHeatingCoil) block).getCoilHeat(world.getBlockMetadata(x, y, z)) != HeatingCoilLevel.None) { + && ((IHeatingCoil) block).getCoilHeat(world.getBlockMetadata(x, y, z)) != HeatingCoilLevel.None) { return t.mCoilAmount++ == 0; } else { return false; @@ -318,14 +285,14 @@ public class GT_MetaTileEntity_LargeChemicalReactor @Override public boolean spawnHint(GT_MetaTileEntity_LargeChemicalReactor t, World world, int x, int y, int z, - ItemStack trigger) { + ItemStack trigger) { StructureLibAPI.hintParticle(world, x, y, z, GregTech_API.sBlockCasings5, 0); return true; } @Override public boolean placeBlock(GT_MetaTileEntity_LargeChemicalReactor t, World world, int x, int y, int z, - ItemStack trigger) { + ItemStack trigger) { if (t.mCoilAmount > 0) return false; boolean b = world.setBlock(x, y, z, GregTech_API.sBlockCasings5, 0, 3); if (b) t.mCoilAmount++; @@ -334,41 +301,41 @@ public class GT_MetaTileEntity_LargeChemicalReactor @Override public PlaceResult survivalPlaceBlock(GT_MetaTileEntity_LargeChemicalReactor t, World world, int x, int y, - int z, ItemStack trigger, IItemSource s, EntityPlayerMP actor, Consumer chatter) { + int z, ItemStack trigger, IItemSource s, EntityPlayerMP actor, Consumer chatter) { return survivalPlaceBlock(t, world, x, y, z, trigger, AutoPlaceEnvironment.fromLegacy(s, actor, chatter)); } @Override public BlocksToPlace getBlocksToPlace( - GT_MetaTileEntity_LargeChemicalReactor gt_metaTileEntity_largeChemicalReactor, World world, int x, - int y, int z, ItemStack trigger, AutoPlaceEnvironment env) { + 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 public PlaceResult survivalPlaceBlock(GT_MetaTileEntity_LargeChemicalReactor t, World world, int x, int y, - int z, ItemStack trigger, AutoPlaceEnvironment env) { + int z, ItemStack trigger, AutoPlaceEnvironment env) { 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); + .takeOne(ItemStackPredicate.from(GregTech_API.sBlockCasings5), true); if (result == null) return PlaceResult.REJECT; PlaceResult ret = StructureUtility.survivalPlaceBlock( - result, - ItemStackPredicate.NBTMode.EXACT, - null, - true, - world, - x, - y, - z, - env.getSource(), - env.getActor(), - env.getChatter()); + result, + ItemStackPredicate.NBTMode.EXACT, + null, + true, + world, + x, + y, + z, + env.getSource(), + env.getActor(), + env.getChatter()); if (ret == PlaceResult.ACCEPT) t.mCoilAmount++; return ret; } 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 d14b06313f..8ffd401646 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 @@ -40,8 +40,8 @@ import gregtech.api.util.LightingHelper; import gregtech.common.items.GT_MetaGenerated_Tool_01; import gregtech.common.render.GT_RenderUtil; -public abstract class GT_MetaTileEntity_LargeTurbine extends - GT_MetaTileEntity_EnhancedMultiBlockBase implements ISurvivalConstructable { +public abstract class GT_MetaTileEntity_LargeTurbine + extends GT_MetaTileEntity_EnhancedMultiBlockBase implements ISurvivalConstructable { private static final String STRUCTURE_PIECE_MAIN = "main"; private static final ClassValue> STRUCTURE_DEFINITION = new ClassValue<>() { @@ -49,34 +49,25 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends @Override protected IStructureDefinition computeValue(Class type) { return StructureDefinition.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(); } }; @@ -116,7 +107,7 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { return checkPiece(STRUCTURE_PIECE_MAIN, 2, 2, 1) && mMaintenanceHatches.size() == 1 - && mMufflerHatches.isEmpty() == (getPollutionPerTick(null) == 0); + && mMufflerHatches.isEmpty() == (getPollutionPerTick(null) == 0); } public abstract Block getCasingBlock(); @@ -172,21 +163,21 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends // we skip the occlusion test, as we always require a working turbine to have a block of air before it // so the front face cannot be occluded whatsoever in the most cases. Tessellator.instance.setBrightness( - tBlock.getMixedBrightnessForBlock( - aWorld, - aX + tDirection.offsetX, - tY + tDirection.offsetY, - aZ + tDirection.offsetZ)); + tBlock.getMixedBrightnessForBlock( + aWorld, + aX + tDirection.offsetX, + tY + tDirection.offsetY, + aZ + tDirection.offsetZ)); tLighting.setupLighting(tBlock, tX, tY, tZ, tFacing) - .setupColor(tFacing, Dyes._NULL.mRGBa); + .setupColor(tFacing, Dyes._NULL.mRGBa); GT_RenderUtil.renderBlockIcon( - aRenderer, - tBlock, - tX + tDirection.offsetX * 0.01, - tY + tDirection.offsetY * 0.01, - tZ + tDirection.offsetZ * 0.01, - tTextures[i].getIcon(), - tFacing); + aRenderer, + tBlock, + tX + tDirection.offsetX * 0.01, + tY + tDirection.offsetY * 0.01, + tZ + tDirection.offsetZ * 0.01, + tTextures[i].getIcon(), + tFacing); } if (++tABCCoord[0] == 2) { tABCCoord[0] = -1; @@ -213,9 +204,9 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends @Override public boolean addToMachineList(IGregTechTileEntity tTileEntity, int aBaseCasingIndex) { return addMaintenanceToMachineList(tTileEntity, getCasingTextureIndex()) - || addInputToMachineList(tTileEntity, getCasingTextureIndex()) - || addOutputToMachineList(tTileEntity, getCasingTextureIndex()) - || addMufflerToMachineList(tTileEntity, getCasingTextureIndex()); + || addInputToMachineList(tTileEntity, getCasingTextureIndex()) + || addOutputToMachineList(tTileEntity, getCasingTextureIndex()) + || addMufflerToMachineList(tTileEntity, getCasingTextureIndex()); } @Override @@ -231,8 +222,8 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends @Override public boolean checkRecipe(ItemStack aStack) { if ((counter & 7) == 0 && (aStack == null || !(aStack.getItem() instanceof GT_MetaGenerated_Tool) - || aStack.getItemDamage() < 170 - || aStack.getItemDamage() > 179)) { + || aStack.getItemDamage() < 170 + || aStack.getItemDamage() > 179)) { stopMachine(); return false; } @@ -240,21 +231,21 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends if (!tFluids.isEmpty()) { if (baseEff == 0 || optFlow == 0 - || counter >= 512 - || this.getBaseMetaTileEntity() - .hasWorkJustBeenEnabled() - || this.getBaseMetaTileEntity() - .hasInventoryBeenModified()) { + || counter >= 512 + || 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) ((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.getPrimaryMaterial(aStack).mToolSpeed - * 50)); + Float.MIN_NORMAL, + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack) + .getSpeedMultiplier() * GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolSpeed + * 50)); overflowMultiplier = getOverflowMultiplier(aStack); @@ -301,7 +292,7 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends } abstract int fluidIntoPower(ArrayList aFluids, int aOptFlow, int aBaseEff, int overflowMultiplier, - float[] flowMultipliers); + float[] flowMultipliers); abstract float getOverflowEfficiency(int totalFlow, int actualOptimalFlow, int overflowMultiplier); @@ -361,21 +352,21 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends } String tRunning = mMaxProgresstime > 0 - ? EnumChatFormatting.GREEN + StatCollector.translateToLocal("GT5U.turbine.running.true") - + EnumChatFormatting.RESET - : EnumChatFormatting.RED + StatCollector.translateToLocal("GT5U.turbine.running.false") - + EnumChatFormatting.RESET; + ? EnumChatFormatting.GREEN + StatCollector.translateToLocal("GT5U.turbine.running.true") + + EnumChatFormatting.RESET + : EnumChatFormatting.RED + StatCollector.translateToLocal("GT5U.turbine.running.false") + + EnumChatFormatting.RESET; String tMaintainance = getIdealStatus() == getRepairStatus() - ? EnumChatFormatting.GREEN + StatCollector.translateToLocal("GT5U.turbine.maintenance.false") - + EnumChatFormatting.RESET - : EnumChatFormatting.RED + StatCollector.translateToLocal("GT5U.turbine.maintenance.true") - + EnumChatFormatting.RESET; + ? EnumChatFormatting.GREEN + StatCollector.translateToLocal("GT5U.turbine.maintenance.false") + + EnumChatFormatting.RESET + : EnumChatFormatting.RED + StatCollector.translateToLocal("GT5U.turbine.maintenance.true") + + EnumChatFormatting.RESET; int tDura = 0; if (mInventory[1] != null && mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01) { tDura = GT_Utility.safeInt( - (long) (100.0f / GT_MetaGenerated_Tool.getToolMaxDamage(mInventory[1]) - * (GT_MetaGenerated_Tool.getToolDamage(mInventory[1])) + 1)); + (long) (100.0f / GT_MetaGenerated_Tool.getToolMaxDamage(mInventory[1]) + * (GT_MetaGenerated_Tool.getToolDamage(mInventory[1])) + 1)); } long storedEnergy = 0; @@ -383,73 +374,70 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) { if (isValidMetaTileEntity(tHatch)) { storedEnergy += tHatch.getBaseMetaTileEntity() - .getStoredEU(); + .getStoredEU(); maxEnergy += tHatch.getBaseMetaTileEntity() - .getEUCapacity(); + .getEUCapacity(); } } String[] ret = new String[] { - // 8 Lines available for information panels - tRunning + ": " - + EnumChatFormatting.RED - + GT_Utility.formatNumbers(((long) mEUt * mEfficiency) / 10000) - + EnumChatFormatting.RESET - + " EU/t", /* 1 */ - tMaintainance, /* 2 */ - StatCollector.translateToLocal("GT5U.turbine.efficiency") + ": " - + EnumChatFormatting.YELLOW - + (mEfficiency / 100F) - + EnumChatFormatting.RESET - + "%", /* 2 */ - StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " - + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(storedEnergy) - + EnumChatFormatting.RESET - + " EU / " - + /* 3 */ EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(maxEnergy) - + EnumChatFormatting.RESET - + " EU", - StatCollector.translateToLocal("GT5U.turbine.flow") + ": " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(GT_Utility.safeInt((long) realOptFlow)) - + EnumChatFormatting.RESET - + " L/t" - + /* 4 */ EnumChatFormatting.YELLOW - + " (" - + (looseFit ? StatCollector.translateToLocal("GT5U.turbine.loose") - : StatCollector.translateToLocal("GT5U.turbine.tight")) - + ")", /* 5 */ - StatCollector.translateToLocal("GT5U.turbine.fuel") + ": " - + EnumChatFormatting.GOLD - + GT_Utility.formatNumbers(storedFluid) - + EnumChatFormatting.RESET - + "L", /* 6 */ - StatCollector.translateToLocal("GT5U.turbine.dmg") + ": " - + EnumChatFormatting.RED - + tDura - + EnumChatFormatting.RESET - + "%", /* 7 */ - StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " - + EnumChatFormatting.GREEN - + mPollutionReduction - + EnumChatFormatting.RESET - + " %" /* 8 */ + // 8 Lines available for information panels + tRunning + ": " + + EnumChatFormatting.RED + + GT_Utility.formatNumbers(((long) mEUt * mEfficiency) / 10000) + + EnumChatFormatting.RESET + + " EU/t", /* 1 */ + tMaintainance, /* 2 */ + StatCollector.translateToLocal("GT5U.turbine.efficiency") + ": " + + EnumChatFormatting.YELLOW + + (mEfficiency / 100F) + + EnumChatFormatting.RESET + + "%", /* 2 */ + StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(storedEnergy) + + EnumChatFormatting.RESET + + " EU / " + + /* 3 */ EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(maxEnergy) + + EnumChatFormatting.RESET + + " EU", + StatCollector.translateToLocal("GT5U.turbine.flow") + ": " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(GT_Utility.safeInt((long) realOptFlow)) + + EnumChatFormatting.RESET + + " L/t" + + /* 4 */ EnumChatFormatting.YELLOW + + " (" + + (looseFit ? StatCollector.translateToLocal("GT5U.turbine.loose") + : StatCollector.translateToLocal("GT5U.turbine.tight")) + + ")", /* 5 */ + StatCollector.translateToLocal("GT5U.turbine.fuel") + ": " + + EnumChatFormatting.GOLD + + GT_Utility.formatNumbers(storedFluid) + + EnumChatFormatting.RESET + + "L", /* 6 */ + StatCollector.translateToLocal( + "GT5U.turbine.dmg") + ": " + EnumChatFormatting.RED + tDura + EnumChatFormatting.RESET + "%", /* 7 */ + StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + + EnumChatFormatting.GREEN + + mPollutionReduction + + EnumChatFormatting.RESET + + " %" /* 8 */ }; if (!this.getClass() - .getName() - .contains("Steam")) + .getName() + .contains("Steam")) ret[4] = StatCollector.translateToLocal("GT5U.turbine.flow") + ": " - + EnumChatFormatting.YELLOW - + GT_Utility.safeInt((long) realOptFlow) - + EnumChatFormatting.RESET - + " L/t"; + + EnumChatFormatting.YELLOW + + GT_Utility.safeInt((long) realOptFlow) + + EnumChatFormatting.RESET + + " L/t"; return ret; } public boolean hasTurbine() { return getBaseMetaTileEntity() != null && getBaseMetaTileEntity().isClientSide() ? mHasTurbine - : this.getMaxEfficiency(mInventory[1]) > 0; + : this.getMaxEfficiency(mInventory[1]) > 0; } @Override 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 6b7abb526e..d48f27a7a4 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 @@ -31,39 +31,39 @@ 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()) - : casingTexturePages[0][58] }; + 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()) + : 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"); + .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; } @@ -106,7 +106,7 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT @Override int fluidIntoPower(ArrayList aFluids, int aOptFlow, int aBaseEff, int overflowMultiplier, - float[] flowMultipliers) { + float[] flowMultipliers) { if (aFluids.size() >= 1) { int tEU = 0; int actualOptimalFlow = 0; @@ -189,7 +189,7 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT if (totalFlow > actualOptimalFlow) { efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow)) - / ((float) actualOptimalFlow * ((overflowMultiplier * 3) - 1)); + / ((float) actualOptimalFlow * ((overflowMultiplier * 3) - 1)); } else { efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow) / (float) actualOptimalFlow); } 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 559f7ae32f..81bd201b38 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 @@ -31,39 +31,39 @@ 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()) - : casingTexturePages[1][57] }; + 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()) + : 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"); + .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; } @@ -106,7 +106,7 @@ public class GT_MetaTileEntity_LargeTurbine_GasAdvanced extends GT_MetaTileEntit @Override int fluidIntoPower(ArrayList aFluids, int aOptFlow, int aBaseEff, int overflowMultiplier, - float[] flowMultipliers) { + float[] flowMultipliers) { if (aFluids.size() >= 1) { int tEU = 0; int actualOptimalFlow = 0; @@ -187,7 +187,7 @@ public class GT_MetaTileEntity_LargeTurbine_GasAdvanced extends GT_MetaTileEntit if (totalFlow > actualOptimalFlow) { efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow)) - / ((float) actualOptimalFlow * ((overflowMultiplier * 3) - 1)); + / ((float) actualOptimalFlow * ((overflowMultiplier * 3) - 1)); } else { efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow) / (float) actualOptimalFlow); } 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 ef288cf1ec..fc1e7fe3ce 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 @@ -37,38 +37,38 @@ 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()) - : casingTexturePages[0][59] }; + 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()) + : 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"); + .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; } @@ -99,7 +99,7 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La @Override int fluidIntoPower(ArrayList aFluids, int aOptFlow, int aBaseEff, int overflowEfficiency, - float[] flowMultipliers) { + float[] flowMultipliers) { if (looseFit) { float[] calculatedFlow = calculateLooseFlow(aOptFlow, aBaseEff); aOptFlow = GT_Utility.safeInt((long) calculatedFlow[0]); @@ -133,12 +133,12 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La if (!achievement) { try { GT_Mod.achievements.issueAchievement( - this.getBaseMetaTileEntity() - .getWorld() - .getPlayerEntityByName( - this.getBaseMetaTileEntity() - .getOwnerName()), - "efficientsteam"); + this.getBaseMetaTileEntity() + .getWorld() + .getPlayerEntityByName( + this.getBaseMetaTileEntity() + .getOwnerName()), + "efficientsteam"); } catch (Exception ignored) {} achievement = true; } @@ -153,9 +153,9 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La tEU = GT_Utility.safeInt((long) tEU * (long) aBaseEff / 10000L); } else { float efficiency = getOverflowEfficiency( - totalFlow, - (GT_Utility.safeInt((long) realOptFlow)), - overflowMultiplier); + totalFlow, + (GT_Utility.safeInt((long) realOptFlow)), + overflowMultiplier); tEU *= efficiency; tEU = Math.max(1, GT_Utility.safeInt((long) tEU * (long) aBaseEff / 10000L)); } @@ -182,8 +182,8 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La float efficiency = 0; if (totalFlow > actualOptimalFlow) { - efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow)) - / ((float) actualOptimalFlow * (overflowMultiplier + 2)); + efficiency = 1.0f + - Math.abs((totalFlow - actualOptimalFlow)) / ((float) actualOptimalFlow * (overflowMultiplier + 2)); } else { efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow) / (float) actualOptimalFlow); } @@ -196,9 +196,9 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La if (aSide == getBaseMetaTileEntity().getFrontFacing()) { looseFit ^= true; GT_Utility.sendChatToPlayer( - aPlayer, - looseFit ? GT_Utility.trans("500", "Fitting: Loose - More Flow") - : GT_Utility.trans("501", "Fitting: Tight - More Efficiency")); + aPlayer, + looseFit ? GT_Utility.trans("500", "Fitting: Loose - More Flow") + : GT_Utility.trans("501", "Fitting: Tight - More Efficiency")); } } 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 e6a707b9a1..c6a4155b03 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 @@ -37,36 +37,36 @@ 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()) - : casingTexturePages[0][60] }; + 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()) + : 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"); + .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; } @@ -104,7 +104,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar @Override int fluidIntoPower(ArrayList aFluids, int aOptFlow, int aBaseEff, int overflowMultiplier, - float[] flowMultipliers) { + float[] flowMultipliers) { if (aFluids.size() >= 1) { aOptFlow *= 800; // CHANGED THINGS HERE, check recipe runs once per 20 ticks int tEU = 0; @@ -114,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. @@ -188,7 +188,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar if (totalFlow > actualOptimalFlow) { efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow)) - / ((float) actualOptimalFlow * ((overflowMultiplier * 3) + 1)); + / ((float) actualOptimalFlow * ((overflowMultiplier * 3) + 1)); } else { efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow) / (float) actualOptimalFlow); } @@ -199,30 +199,29 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar @Override public boolean checkRecipe(ItemStack aStack) { if ((counter & 7) == 0 && (aStack == null || !(aStack.getItem() instanceof GT_MetaGenerated_Tool) - || aStack.getItemDamage() < 170 - || aStack.getItemDamage() > 179)) { + || aStack.getItemDamage() < 170 + || aStack.getItemDamage() > 179)) { stopMachine(); return false; } ArrayList tFluids = getStoredFluids(); if (!tFluids.isEmpty()) { if (baseEff == 0 || optFlow == 0 - || counter >= 512 - || this.getBaseMetaTileEntity() - .hasWorkJustBeenEnabled() - || this.getBaseMetaTileEntity() - .hasInventoryBeenModified()) { + || counter >= 512 + || this.getBaseMetaTileEntity() + .hasWorkJustBeenEnabled() + || this.getBaseMetaTileEntity() + .hasInventoryBeenModified()) { counter = 0; baseEff = GT_Utility.safeInt( - (long) ((5F + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolCombatDamage(aStack)) * 1000F)); + (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 - * 50)); + (long) Math.max( + Float.MIN_NORMAL, + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack) + .getSpeedMultiplier() + * ((GT_MetaGenerated_Tool) aStack.getItem()).getPrimaryMaterial(aStack).mToolSpeed + * 50)); overflowMultiplier = getOverflowMultiplier(aStack); flowMultipliers[0] = GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mSteamMultiplier; @@ -279,21 +278,21 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar } String tRunning = mMaxProgresstime > 0 - ? EnumChatFormatting.GREEN + StatCollector.translateToLocal("GT5U.turbine.running.true") - + EnumChatFormatting.RESET - : EnumChatFormatting.RED + StatCollector.translateToLocal("GT5U.turbine.running.false") - + EnumChatFormatting.RESET; + ? EnumChatFormatting.GREEN + StatCollector.translateToLocal("GT5U.turbine.running.true") + + EnumChatFormatting.RESET + : EnumChatFormatting.RED + StatCollector.translateToLocal("GT5U.turbine.running.false") + + EnumChatFormatting.RESET; String tMaintainance = getIdealStatus() == getRepairStatus() - ? EnumChatFormatting.GREEN + StatCollector.translateToLocal("GT5U.turbine.maintenance.false") - + EnumChatFormatting.RESET - : EnumChatFormatting.RED + StatCollector.translateToLocal("GT5U.turbine.maintenance.true") - + EnumChatFormatting.RESET; + ? EnumChatFormatting.GREEN + StatCollector.translateToLocal("GT5U.turbine.maintenance.false") + + EnumChatFormatting.RESET + : EnumChatFormatting.RED + StatCollector.translateToLocal("GT5U.turbine.maintenance.true") + + EnumChatFormatting.RESET; int tDura = 0; if (mInventory[1] != null && mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01) { tDura = GT_Utility.safeInt( - (long) (100.0f / GT_MetaGenerated_Tool.getToolMaxDamage(mInventory[1]) - * (GT_MetaGenerated_Tool.getToolDamage(mInventory[1])) + 1)); + (long) (100.0f / GT_MetaGenerated_Tool.getToolMaxDamage(mInventory[1]) + * (GT_MetaGenerated_Tool.getToolDamage(mInventory[1])) + 1)); } long storedEnergy = 0; @@ -301,67 +300,64 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) { if (isValidMetaTileEntity(tHatch)) { storedEnergy += tHatch.getBaseMetaTileEntity() - .getStoredEU(); + .getStoredEU(); maxEnergy += tHatch.getBaseMetaTileEntity() - .getEUCapacity(); + .getEUCapacity(); } } String[] ret = new String[] { - // 8 Lines available for information panels - tRunning + ": " - + EnumChatFormatting.RED - + GT_Utility.formatNumbers(((long) mEUt * mEfficiency) / 10000) - + EnumChatFormatting.RESET - + " EU/t", /* 1 */ - tMaintainance, /* 2 */ - StatCollector.translateToLocal("GT5U.turbine.efficiency") + ": " - + EnumChatFormatting.YELLOW - + (mEfficiency / 100F) - + EnumChatFormatting.RESET - + "%", /* 2 */ - StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " - + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(storedEnergy) - + EnumChatFormatting.RESET - + " EU / " - + /* 3 */ EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(maxEnergy) - + EnumChatFormatting.RESET - + " EU", - StatCollector.translateToLocal("GT5U.turbine.flow") + ": " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(GT_Utility.safeInt((long) realOptFlow)) - + EnumChatFormatting.RESET - + " L/s" - + /* 4 */ EnumChatFormatting.YELLOW - + " (" - + (looseFit ? StatCollector.translateToLocal("GT5U.turbine.loose") - : StatCollector.translateToLocal("GT5U.turbine.tight")) - + ")", /* 5 */ - StatCollector.translateToLocal("GT5U.turbine.fuel") + ": " - + EnumChatFormatting.GOLD - + GT_Utility.formatNumbers(storedFluid) - + EnumChatFormatting.RESET - + "L", /* 6 */ - StatCollector.translateToLocal("GT5U.turbine.dmg") + ": " - + EnumChatFormatting.RED - + tDura - + EnumChatFormatting.RESET - + "%", /* 7 */ - StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " - + EnumChatFormatting.GREEN - + mPollutionReduction - + EnumChatFormatting.RESET - + " %" /* 8 */ + // 8 Lines available for information panels + tRunning + ": " + + EnumChatFormatting.RED + + GT_Utility.formatNumbers(((long) mEUt * mEfficiency) / 10000) + + EnumChatFormatting.RESET + + " EU/t", /* 1 */ + tMaintainance, /* 2 */ + StatCollector.translateToLocal("GT5U.turbine.efficiency") + ": " + + EnumChatFormatting.YELLOW + + (mEfficiency / 100F) + + EnumChatFormatting.RESET + + "%", /* 2 */ + StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(storedEnergy) + + EnumChatFormatting.RESET + + " EU / " + + /* 3 */ EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(maxEnergy) + + EnumChatFormatting.RESET + + " EU", + StatCollector.translateToLocal("GT5U.turbine.flow") + ": " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(GT_Utility.safeInt((long) realOptFlow)) + + EnumChatFormatting.RESET + + " L/s" + + /* 4 */ EnumChatFormatting.YELLOW + + " (" + + (looseFit ? StatCollector.translateToLocal("GT5U.turbine.loose") + : StatCollector.translateToLocal("GT5U.turbine.tight")) + + ")", /* 5 */ + StatCollector.translateToLocal("GT5U.turbine.fuel") + ": " + + EnumChatFormatting.GOLD + + GT_Utility.formatNumbers(storedFluid) + + EnumChatFormatting.RESET + + "L", /* 6 */ + StatCollector.translateToLocal( + "GT5U.turbine.dmg") + ": " + EnumChatFormatting.RED + tDura + EnumChatFormatting.RESET + "%", /* 7 */ + StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + + EnumChatFormatting.GREEN + + mPollutionReduction + + EnumChatFormatting.RESET + + " %" /* 8 */ }; if (!this.getClass() - .getName() - .contains("Steam")) + .getName() + .contains("Steam")) ret[4] = StatCollector.translateToLocal("GT5U.turbine.flow") + ": " - + EnumChatFormatting.YELLOW - + GT_Utility.safeInt((long) realOptFlow) - + EnumChatFormatting.RESET - + " L/s"; + + EnumChatFormatting.YELLOW + + GT_Utility.safeInt((long) realOptFlow) + + EnumChatFormatting.RESET + + " L/s"; return ret; } } 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 1f5c7a5bb6..1a6a6f678a 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 @@ -38,38 +38,38 @@ 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()) - : casingTexturePages[0][57] }; + 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()) + : 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"); + .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; } @@ -107,7 +107,7 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg @Override int fluidIntoPower(ArrayList aFluids, int aOptFlow, int aBaseEff, int overflowEfficiency, - float[] flowMultipliers) { + float[] flowMultipliers) { if (looseFit) { float[] calculatedFlow = calculateLooseFlow(aOptFlow, aBaseEff); aOptFlow = GT_Utility.safeInt((long) calculatedFlow[0]); @@ -141,12 +141,12 @@ 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()), - "muchsteam"); + this.getBaseMetaTileEntity() + .getWorld() + .getPlayerEntityByName( + this.getBaseMetaTileEntity() + .getOwnerName()), + "muchsteam"); achievement = true; } } else if (GT_ModHandler.isSuperHeatedSteam(aFluidStack)) { @@ -161,9 +161,9 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg tEU = GT_Utility.safeInt((long) tEU * (long) aBaseEff / 20000L); } else { float efficiency = getOverflowEfficiency( - totalFlow, - (GT_Utility.safeInt((long) realOptFlow)), - overflowMultiplier); + totalFlow, + (GT_Utility.safeInt((long) realOptFlow)), + overflowMultiplier); tEU *= efficiency; tEU = Math.max(1, GT_Utility.safeInt((long) tEU * (long) aBaseEff / 20000L)); } @@ -189,8 +189,8 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg float efficiency = 0; if (totalFlow > actualOptimalFlow) { - efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow)) - / ((float) actualOptimalFlow * (overflowMultiplier + 1)); + efficiency = 1.0f + - Math.abs((totalFlow - actualOptimalFlow)) / ((float) actualOptimalFlow * (overflowMultiplier + 1)); } else { efficiency = 1.0f - Math.abs((totalFlow - actualOptimalFlow) / (float) actualOptimalFlow); } @@ -237,9 +237,9 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg if (aSide == getBaseMetaTileEntity().getFrontFacing()) { looseFit ^= true; GT_Utility.sendChatToPlayer( - aPlayer, - looseFit ? GT_Utility.trans("500", "Fitting: Loose - More Flow") - : GT_Utility.trans("501", "Fitting: Tight - More Efficiency")); + aPlayer, + looseFit ? GT_Utility.trans("500", "Fitting: Loose - More Flow") + : GT_Utility.trans("501", "Fitting: Tight - More Efficiency")); } } 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 0d90438020..c9f32c76f7 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 @@ -41,58 +41,35 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_StructureUtility; import gregtech.api.util.GT_Utility; -public class GT_MetaTileEntity_MultiFurnace extends - GT_MetaTileEntity_AbstractMultiFurnace implements ISurvivalConstructable { +public class GT_MetaTileEntity_MultiFurnace + extends GT_MetaTileEntity_AbstractMultiFurnace implements ISurvivalConstructable { private int mLevel = 0; private int mCostDiscount = 1; private static final int CASING_INDEX = 11; private static final String STRUCTURE_PIECE_MAIN = "main"; - private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.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.buildHatchAdder() - .atLeast( - Maintenance, - InputBus, - OutputBus, - Energy) - .casingIndex( - CASING_INDEX) - .dot( - 1) - .build(), - ofBlock( - GregTech_API.sBlockCasings1, - CASING_INDEX))) - .build(); + private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition + .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.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); @@ -111,47 +88,46 @@ public class GT_MetaTileEntity_MultiFurnace extends 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"); + .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; } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + 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() }; + .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() }; + .addIcon(OVERLAY_FRONT_MULTI_SMELTER) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_MULTI_SMELTER_GLOW) + .extFacing() + .glow() + .build() }; } @Override @@ -256,9 +232,9 @@ public class GT_MetaTileEntity_MultiFurnace extends if ((xPos == tX) && (zPos == tZ)) continue; tUsedMeta = aBaseMetaTileEntity.getMetaID(xPos, tY + 1, zPos); if (tUsedMeta >= 12 && tUsedMeta <= 14 - && aBaseMetaTileEntity.getBlock(xPos, tY + 1, zPos) == GregTech_API.sBlockCasings1) + && 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); } } @@ -272,69 +248,69 @@ public class GT_MetaTileEntity_MultiFurnace extends long maxEnergy = 0; for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) if (isValidMetaTileEntity(tHatch)) { storedEnergy += tHatch.getBaseMetaTileEntity() - .getStoredEU(); + .getStoredEU(); maxEnergy += tHatch.getBaseMetaTileEntity() - .getEUCapacity(); + .getEUCapacity(); } return new String[] { - StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " - + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(mProgresstime / 20) - + EnumChatFormatting.RESET - + " s / " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(mMaxProgresstime / 20) - + EnumChatFormatting.RESET - + " s", - StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " - + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(storedEnergy) - + EnumChatFormatting.RESET - + " EU / " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(maxEnergy) - + EnumChatFormatting.RESET - + " EU", - StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " - + EnumChatFormatting.RED - + GT_Utility.formatNumbers(-mEUt) - + EnumChatFormatting.RESET - + " EU/t", - StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(getMaxInputVoltage()) - + EnumChatFormatting.RESET - + " EU/t(*2A) " - + StatCollector.translateToLocal("GT5U.machines.tier") - + ": " - + EnumChatFormatting.YELLOW - + VN[GT_Utility.getTier(getMaxInputVoltage())] - + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " - + EnumChatFormatting.RED - + (getIdealStatus() - getRepairStatus()) - + EnumChatFormatting.RESET - + " " - + StatCollector.translateToLocal("GT5U.multiblock.efficiency") - + ": " - + EnumChatFormatting.YELLOW - + mEfficiency / 100.0F - + EnumChatFormatting.RESET - + " %", - StatCollector.translateToLocal("GT5U.MS.multismelting") + ": " - + EnumChatFormatting.GREEN - + mLevel - + EnumChatFormatting.RESET - + " Discount: (EU/t) / " - + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(mCostDiscount) - + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " - + EnumChatFormatting.GREEN - + mPollutionReduction - + EnumChatFormatting.RESET - + " %" }; + StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(mProgresstime / 20) + + EnumChatFormatting.RESET + + " s / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(mMaxProgresstime / 20) + + EnumChatFormatting.RESET + + " s", + StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(storedEnergy) + + EnumChatFormatting.RESET + + " EU / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(maxEnergy) + + EnumChatFormatting.RESET + + " EU", + StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + + EnumChatFormatting.RED + + GT_Utility.formatNumbers(-mEUt) + + EnumChatFormatting.RESET + + " EU/t", + StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(getMaxInputVoltage()) + + EnumChatFormatting.RESET + + " EU/t(*2A) " + + StatCollector.translateToLocal("GT5U.machines.tier") + + ": " + + EnumChatFormatting.YELLOW + + VN[GT_Utility.getTier(getMaxInputVoltage())] + + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " + + EnumChatFormatting.RED + + (getIdealStatus() - getRepairStatus()) + + EnumChatFormatting.RESET + + " " + + StatCollector.translateToLocal("GT5U.multiblock.efficiency") + + ": " + + EnumChatFormatting.YELLOW + + mEfficiency / 100.0F + + EnumChatFormatting.RESET + + " %", + StatCollector.translateToLocal("GT5U.MS.multismelting") + ": " + + EnumChatFormatting.GREEN + + mLevel + + EnumChatFormatting.RESET + + " Discount: (EU/t) / " + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(mCostDiscount) + + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + + EnumChatFormatting.GREEN + + mPollutionReduction + + EnumChatFormatting.RESET + + " %" }; } @Override @@ -347,8 +323,8 @@ public class GT_MetaTileEntity_MultiFurnace extends IMetaTileEntity tMTE = aTileEntity.getMetaTileEntity(); if (tMTE == null) return false; return tMTE instanceof GT_MetaTileEntity_Hatch_Energy || tMTE instanceof GT_MetaTileEntity_Hatch_InputBus - || tMTE instanceof GT_MetaTileEntity_Hatch_OutputBus - || tMTE instanceof GT_MetaTileEntity_Hatch_Maintenance; + || tMTE instanceof GT_MetaTileEntity_Hatch_OutputBus + || tMTE instanceof GT_MetaTileEntity_Hatch_Maintenance; } @Override 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 c4d4c3548c..9d8912f0c5 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 @@ -46,13 +46,14 @@ import gregtech.api.util.GT_Utility; import gregtech.common.blocks.GT_Block_Casings8; public class GT_MetaTileEntity_NanoForge extends - GT_MetaTileEntity_ExtendedPowerMultiBlockBase implements ISurvivalConstructable { + GT_MetaTileEntity_ExtendedPowerMultiBlockBase implements ISurvivalConstructable { 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 STRUCTURE_DEFINITION = StructureDefinition.builder() - // spotless:off + private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition + .builder() + // spotless:off .addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] { {" "," "," F "," C "," C "," C "," C "," F "," "," "}, {" "," "," F "," C "," C "," C "," C "," F "," "," "}, @@ -140,39 +141,17 @@ 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) { @@ -206,33 +185,33 @@ public class GT_MetaTileEntity_NanoForge extends @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + boolean aActive, boolean aRedstone) { 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() }; + 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() }; 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() }; + 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() }; } return new ITexture[] { - BlockIcons.getCasingTextureForId(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 10)) }; + BlockIcons.getCasingTextureForId(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 10)) }; } @Override @@ -271,15 +250,8 @@ 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; @@ -291,11 +263,11 @@ public class GT_MetaTileEntity_NanoForge extends this.mMaxProgresstime = tRecipe.mDuration; this.lEUt = -tRecipe.mEUt; calculateOverclockedNessMultiInternal( - tRecipe.mEUt, - tRecipe.mDuration, - 1, - tTotalEU, - tRecipe.mSpecialValue < mSpecialTier); + tRecipe.mEUt, + tRecipe.mDuration, + 1, + tTotalEU, + tRecipe.mSpecialValue < mSpecialTier); if (this.lEUt == Long.MAX_VALUE - 1 || this.mMaxProgresstime == Integer.MAX_VALUE - 1) return false; @@ -330,19 +302,19 @@ public class GT_MetaTileEntity_NanoForge extends } if (aStack.isItemEqual(Materials.Neutronium.getNanite(1)) && checkPiece(STRUCTURE_PIECE_MAIN, 4, 37, 1) - && checkPiece(STRUCTURE_PIECE_TIER2, -7, 14, 4)) { + && checkPiece(STRUCTURE_PIECE_TIER2, -7, 14, 4)) { mSpecialTier = 2; } if (aStack.isItemEqual(Materials.TranscendentMetal.getNanite(1)) && checkPiece(STRUCTURE_PIECE_MAIN, 4, 37, 1) - && checkPiece(STRUCTURE_PIECE_TIER2, -7, 14, 4) - && checkPiece(STRUCTURE_PIECE_TIER3, 14, 26, 4)) { + && checkPiece(STRUCTURE_PIECE_TIER2, -7, 14, 4) + && checkPiece(STRUCTURE_PIECE_TIER3, 14, 26, 4)) { mSpecialTier = 3; } if (mMaintenanceHatches.size() != 1 || mInputBusses.isEmpty() - || mOutputBusses.isEmpty() - || mInputHatches.isEmpty()) { + || mOutputBusses.isEmpty() + || mInputHatches.isEmpty()) { return false; } @@ -406,111 +378,109 @@ public class GT_MetaTileEntity_NanoForge extends 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(); + .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))); + 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))); } @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"); + .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; } @@ -518,8 +488,8 @@ public class GT_MetaTileEntity_NanoForge extends public final void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { inputSeparation = !inputSeparation; GT_Utility.sendChatToPlayer( - aPlayer, - StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + inputSeparation); + aPlayer, + StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + inputSeparation); } @Override 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 1f2feb3657..233e754548 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 @@ -38,86 +38,59 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMultiBlockBase - implements ISurvivalConstructable { + implements ISurvivalConstructable { private static final byte CASING_INDEX = 49; private static final String STRUCTURE_PIECE_MAIN = "main"; - private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.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 STRUCTURE_DEFINITION = StructureDefinition + .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 mMiddleInputHatches = new ArrayList<>(); // 0 -> left, 1 -> right, any other -> not found @@ -137,55 +110,53 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult 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"); + .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; } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + 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() }; + .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() }; + .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] }; } @@ -203,11 +174,11 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); GT_Recipe tRecipe = getRecipeMap().findRecipe( - getBaseMetaTileEntity(), - false, - gregtech.api.enums.GT_Values.V[tTier], - tFluidInputs, - mInventory[1]); + getBaseMetaTileEntity(), + false, + gregtech.api.enums.GT_Values.V[tTier], + tFluidInputs, + mInventory[1]); if (tRecipe == null) return false; @@ -319,10 +290,10 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult mOutputOnSide = -1; replaceDeprecatedCoils(aBaseMetaTileEntity); return checkPiece(STRUCTURE_PIECE_MAIN, 2, 1, 0) && mInputOnSide != -1 - && mOutputOnSide != -1 - && mCasingAmount >= 18 - && mMaintenanceHatches.size() == 1 - && !mMiddleInputHatches.isEmpty(); + && mOutputOnSide != -1 + && mCasingAmount >= 18 + && mMaintenanceHatches.size() == 1 + && !mMiddleInputHatches.isEmpty(); } @Override @@ -366,7 +337,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 310703cd3f..c945e8c861 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 @@ -55,28 +55,26 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + 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() }; + .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() }; + .addIcon(OVERLAY_FRONT_OIL_DRILL) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_OIL_DRILL_GLOW) + .extFacing() + .glow() + .build() }; } return new ITexture[] { getCasingTextureForId(casingTextureIndex) }; } @@ -97,27 +95,27 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D protected GT_Multiblock_Tooltip_Builder createTooltip(String tierSuffix) { String casings = getCasingBlockItem().get(0) - .getDisplayName(); + .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; } @@ -140,12 +138,12 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D } if (oldChunkRange != chunkRangeConfig) mOilFieldChunks.clear(); GT_Utility.sendChatToPlayer( - aPlayer, - StatCollector.translateToLocal("GT5U.machines.workareaset") + " " - + chunkRangeConfig - + "x" - + chunkRangeConfig - + StatCollector.translateToLocal("GT5U.machines.chunks")); // TODO Add translation support + aPlayer, + StatCollector.translateToLocal("GT5U.machines.workareaset") + " " + + chunkRangeConfig + + "x" + + chunkRangeConfig + + StatCollector.translateToLocal("GT5U.machines.chunks")); // TODO Add translation support } @Override @@ -165,9 +163,9 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D int tier = Math.max(0, GT_Utility.getTier(getMaxInputVoltage())); this.mEUt = -7 << (tier << 1); // (1/4) A of current tier when at bottom (7/8) A of current tier while mining this.mMaxProgresstime = Math.max( - 1, - (workState == STATE_AT_BOTTOM ? (64 * (chunkRangeConfig * chunkRangeConfig)) >> (getMinTier() - 1) - : 120) >> tier); + 1, + (workState == STATE_AT_BOTTOM ? (64 * (chunkRangeConfig * chunkRangeConfig)) >> (getMinTier() - 1) : 120) + >> tier); } protected float computeSpeed() { @@ -176,7 +174,7 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D @Override protected boolean workingAtBottom(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, - int yHead, int oldYHead) { + int yHead, int oldYHead) { switch (tryLowerPipeState(true)) { case 0 -> { workState = STATE_DOWNWARD; @@ -222,9 +220,7 @@ 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. @@ -232,13 +228,13 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D int zChunk = Math.floorDiv(tChunk.zPosition, range) * range; if (debugDriller) { GT_Log.out.println( - "tChunk.xPosition = " + tChunk.xPosition - + " tChunk.zPosition = " - + tChunk.zPosition - + " xChunk = " - + xChunk - + " zChunk = " - + zChunk); + "tChunk.xPosition = " + tChunk.xPosition + + " tChunk.zPosition = " + + tChunk.zPosition + + " xChunk = " + + xChunk + + " zChunk = " + + zChunk); } for (int i = 0; i < range; i++) { for (int j = 0; j < range; j++) { @@ -246,12 +242,12 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D GT_Log.out.println(" getChunkX = " + (xChunk + i) + " getChunkZ = " + (zChunk + j)); } tChunk = getBaseMetaTileEntity().getWorld() - .getChunkFromChunkCoords(xChunk + i, zChunk + j); + .getChunkFromChunkCoords(xChunk + i, zChunk + j); tFluid = undergroundOilReadInformation(tChunk); if (debugDriller) { GT_Log.out.println( - " Fluid in chunk = " + tFluid.getFluid() - .getID()); + " Fluid in chunk = " + tFluid.getFluid() + .getID()); } if (tOil.isFluidEqual(tFluid) && tFluid.amount > 0) { mOilFieldChunks.add(tChunk); @@ -282,9 +278,9 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D tFluid = undergroundOil(tChunk, speed); if (debugDriller) { GT_Log.out.println( - " chunkX = " + tChunk.getChunkCoordIntPair().chunkXPos - + " chunkZ = " - + tChunk.getChunkCoordIntPair().chunkZPos); + " chunkX = " + tChunk.getChunkCoordIntPair().chunkXPos + + " chunkZ = " + + tChunk.getChunkCoordIntPair().chunkZPos); if (tFluid != null) { GT_Log.out.println(" Fluid pumped = " + tFluid.amount); } else { @@ -309,27 +305,25 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D @Override public String[] getInfoData() { List l = new ArrayList<>( - Arrays.asList( - EnumChatFormatting.BLUE + StatCollector.translateToLocal("GT5U.machines.oilfluidpump") - + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.machines.workarea") + ": " - + EnumChatFormatting.GREEN - + (chunkRangeConfig) - + " x " - + (chunkRangeConfig) - + EnumChatFormatting.RESET - + " " - + StatCollector.translateToLocal("GT5U.machines.chunks"), - "Drilling fluid: " + EnumChatFormatting.GREEN - + (mOilId > 0 ? FluidRegistry.getFluid(mOilId) - .getName() - : "None") - + EnumChatFormatting.RESET, - "Drilling flow: " + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers( - this.mMaxProgresstime > 0 ? (mOilFlow / this.mMaxProgresstime) : 0) - + EnumChatFormatting.RESET - + " L/t")); + Arrays.asList( + EnumChatFormatting.BLUE + StatCollector.translateToLocal("GT5U.machines.oilfluidpump") + + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.machines.workarea") + ": " + + EnumChatFormatting.GREEN + + (chunkRangeConfig) + + " x " + + (chunkRangeConfig) + + EnumChatFormatting.RESET + + " " + + StatCollector.translateToLocal("GT5U.machines.chunks"), + "Drilling fluid: " + EnumChatFormatting.GREEN + + (mOilId > 0 ? FluidRegistry.getFluid(mOilId) + .getName() : "None") + + EnumChatFormatting.RESET, + "Drilling flow: " + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(this.mMaxProgresstime > 0 ? (mOilFlow / this.mMaxProgresstime) : 0) + + EnumChatFormatting.RESET + + " L/t")); l.addAll(Arrays.asList(super.getInfoData())); return l.toArray(new String[0]); } 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 b92fcfae7f..2c86218bfb 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 @@ -24,23 +24,23 @@ public class GT_MetaTileEntity_OilDrillInfinite extends GT_MetaTileEntity_OilDri @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { String casings = getCasingBlockItem().get(0) - .getDisplayName(); + .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"); + .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 ba6a2604a5..de6b5c5144 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 @@ -86,16 +86,16 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile if (chunkRadiusConfig > getRadiusInChunks()) chunkRadiusConfig = 1; } GT_Utility.sendChatToPlayer( - aPlayer, - StatCollector.translateToLocal("GT5U.machines.workareaset") + " " - + (chunkRadiusConfig << 4) - + " " - + StatCollector.translateToLocal("GT5U.machines.radius")); + aPlayer, + StatCollector.translateToLocal("GT5U.machines.workareaset") + " " + + (chunkRadiusConfig << 4) + + " " + + StatCollector.translateToLocal("GT5U.machines.radius")); } @Override public boolean onWireCutterRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, - float aZ) { + float aZ) { replaceWithCobblestone = !replaceWithCobblestone; GT_Utility.sendChatToPlayer(aPlayer, "Replace with cobblestone " + replaceWithCobblestone); return true; @@ -103,7 +103,7 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile @Override protected boolean workingDownward(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, - int yHead, int oldYHead) { + int yHead, int oldYHead) { if (yHead != oldYHead) oreBlockPositions.clear(); if (mWorkChunkNeedsReload && mChunkLoadingEnabled) { // ask to load machine itself @@ -146,7 +146,7 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile if (GT_Utility.eraseBlockByFakePlayer(getFakePlayer(getBaseMetaTileEntity()), x, y, z, true)) oreBlock = getBaseMetaTileEntity().getBlock(x, y, z); oreBlockMetadata = getBaseMetaTileEntity().getWorld() - .getBlockMetadata(x, y, z); + .getBlockMetadata(x, y, z); } if (!tryConsumeDrillingFluid()) { @@ -164,19 +164,10 @@ 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); } @@ -185,7 +176,7 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile @Override protected boolean workingAtBottom(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, - int yHead, int oldYHead) { + int yHead, int oldYHead) { if (!mChunkLoadingEnabled) return super.workingAtBottom(aStack, xDrill, yDrill, zDrill, xPipe, zPipe, yHead, oldYHead); @@ -217,15 +208,15 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile final int leftRight = (getXDrill() - (centerX << 4)) < 8 ? 0 : 1; final int topBottom = (getZDrill() - (centerZ << 4)) < 8 ? 0 : 1; mCurrentChunk = new ChunkCoordIntPair( - centerX - chunkRadiusConfig + leftRight, - centerZ - chunkRadiusConfig + topBottom); + centerX - chunkRadiusConfig + leftRight, + centerZ - chunkRadiusConfig + topBottom); GT_ChunkManager.requestChunkLoad((TileEntity) getBaseMetaTileEntity(), mCurrentChunk); mWorkChunkNeedsReload = false; } @Override protected boolean workingUpward(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, - int yHead, int oldYHead) { + int yHead, int oldYHead) { if (!mChunkLoadingEnabled || oreBlockPositions.isEmpty()) return super.workingUpward(aStack, xDrill, yDrill, zDrill, xPipe, zPipe, yHead, oldYHead); boolean result = processOreList(); @@ -263,17 +254,16 @@ 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; } @Override protected boolean checkHatches() { return !mMaintenanceHatches.isEmpty() && !mInputHatches.isEmpty() - && !mOutputBusses.isEmpty() - && !mEnergyHatches.isEmpty(); + && !mOutputBusses.isEmpty() + && !mEnergyHatches.isEmpty(); } @Override @@ -288,7 +278,7 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile int tier = Math.max(1, GT_Utility.getTier(getMaxInputVoltage())); this.mEUt = -3 * (1 << (tier << 1)); this.mMaxProgresstime = ((workState == STATE_DOWNWARD || workState == STATE_AT_BOTTOM) ? getBaseProgressTime() - : 80) / (1 << tier); + : 80) / (1 << tier); this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); } @@ -300,12 +290,8 @@ 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; @@ -323,13 +309,13 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile private boolean doUseMaceratorRecipe(ItemStack currentItem) { ItemData itemData = GT_OreDictUnificator.getItemData(currentItem); return itemData == null || itemData.mPrefix != OrePrefixes.crushed && itemData.mPrefix != OrePrefixes.dustImpure - && itemData.mPrefix != OrePrefixes.dust - && itemData.mPrefix != OrePrefixes.gem - && itemData.mPrefix != OrePrefixes.gemChipped - && itemData.mPrefix != OrePrefixes.gemExquisite - && itemData.mPrefix != OrePrefixes.gemFlawed - && itemData.mPrefix != OrePrefixes.gemFlawless - && itemData.mMaterial.mMaterial != Materials.Oilsands; + && itemData.mPrefix != OrePrefixes.dust + && itemData.mPrefix != OrePrefixes.gem + && itemData.mPrefix != OrePrefixes.gemChipped + && itemData.mPrefix != OrePrefixes.gemExquisite + && itemData.mPrefix != OrePrefixes.gemFlawed + && itemData.mPrefix != OrePrefixes.gemFlawless + && itemData.mMaterial.mMaterial != Materials.Oilsands; } private ItemStack multiplyStackSize(ItemStack itemStack) { @@ -399,30 +385,30 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile protected GT_Multiblock_Tooltip_Builder createTooltip(String tierSuffix) { String casings = getCasingBlockItem().get(0) - .getDisplayName(); + .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; } @@ -435,15 +421,15 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile public String[] getInfoData() { final int diameter = chunkRadiusConfig * 2; return new String[] { - EnumChatFormatting.BLUE + StatCollector.translateToLocal("GT5U.machines.minermulti") - + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.machines.workarea") + ": " - + EnumChatFormatting.GREEN - + diameter - + "x" - + diameter - + EnumChatFormatting.RESET - + " " - + StatCollector.translateToLocal("GT5U.machines.chunks") }; + EnumChatFormatting.BLUE + StatCollector.translateToLocal("GT5U.machines.minermulti") + + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.machines.workarea") + ": " + + EnumChatFormatting.GREEN + + diameter + + "x" + + diameter + + EnumChatFormatting.RESET + + " " + + StatCollector.translateToLocal("GT5U.machines.chunks") }; } } 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 8e6508b465..759500b767 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 @@ -76,7 +76,7 @@ import gregtech.common.blocks.GT_Block_Casings8; @SuppressWarnings("SpellCheckingInspection") public class GT_MetaTileEntity_PCBFactory extends - GT_MetaTileEntity_ExtendedPowerMultiBlockBase implements ISurvivalConstructable { + GT_MetaTileEntity_ExtendedPowerMultiBlockBase implements ISurvivalConstructable { private static final String tier1 = "tier1"; private static final String tier2 = "tier2"; @@ -88,7 +88,7 @@ public class GT_MetaTileEntity_PCBFactory extends private int mTier = 1, mSetTier = 1, mUpgradesInstalled = 0, mCurrentParallel = 0, mMaxParallel = 0; private boolean mBioUpgrade = false, mBioRotate = false, mOCTier1 = false, mOCTier2 = false; private int[] mBioOffsets = new int[] { -5, -1 }, mOCTier1Offsets = new int[] { 2, -11 }, - mOCTier2Offsets = new int[] { 2, -11 }; + mOCTier2Offsets = new int[] { 2, -11 }; private GT_MetaTileEntity_Hatch_Input mCoolantInputHatch; private static final int mBioRotateBitMap = 0b1000000; private static final int mOCTier2BitMap = 0b100000; @@ -98,12 +98,13 @@ 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 STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape( - tier1, - transpose( - new String[][] { - // spotless:off + private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition + .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"}, @@ -111,12 +112,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"," "}, @@ -125,12 +126,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 "," "," "," "}, @@ -154,12 +155,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"}, @@ -168,12 +169,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"}, @@ -185,12 +186,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"}, @@ -202,172 +203,60 @@ 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( - IndustrialCraft2.ID, - "blockAlloyGlass", - 0, - true), - ofBlockUnlocalizedName( - BartWorks.ID, - "BW_GlasBlocks", - 0, - true), - ofBlockUnlocalizedName( - BartWorks.ID, - "BW_GlasBlocks2", - 0, - true), - // warded - // glass - ofBlockUnlocalizedName( - Thaumcraft.ID, - "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(IndustrialCraft2.ID, "blockAlloyGlass", 0, true), + ofBlockUnlocalizedName(BartWorks.ID, "BW_GlasBlocks", 0, true), + ofBlockUnlocalizedName(BartWorks.ID, "BW_GlasBlocks2", 0, true), + // warded + // glass + ofBlockUnlocalizedName(Thaumcraft.ID, "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) { @@ -384,18 +273,18 @@ public class GT_MetaTileEntity_PCBFactory extends if (mBioRotate) { final IGregTechTileEntity tTile = getBaseMetaTileEntity(); getStructureDefinition().buildOrHints( - this, - stackSize, - bioUpgrade, - tTile.getWorld(), - transformFacing(getExtendedFacing()), - tTile.getXCoord(), - tTile.getYCoord(), - tTile.getZCoord(), - mBioOffsets[1], - 6, - mBioOffsets[0], - hintsOnly); + this, + stackSize, + bioUpgrade, + tTile.getWorld(), + transformFacing(getExtendedFacing()), + tTile.getXCoord(), + tTile.getYCoord(), + tTile.getZCoord(), + mBioOffsets[1], + 6, + mBioOffsets[0], + hintsOnly); } else { buildPiece(bioUpgrade, stackSize, hintsOnly, mBioOffsets[0], 6, mBioOffsets[1]); } @@ -426,57 +315,57 @@ public class GT_MetaTileEntity_PCBFactory extends if (mBioRotate) { final IGregTechTileEntity tTile = getBaseMetaTileEntity(); getStructureDefinition().survivalBuild( - this, - stackSize, - bioUpgrade, - tTile.getWorld(), - transformFacing(getExtendedFacing()), - tTile.getXCoord(), - tTile.getYCoord(), - tTile.getZCoord(), - mBioOffsets[1], - 6, - mBioOffsets[0], - elementBudget, - env, - false); + this, + stackSize, + bioUpgrade, + tTile.getWorld(), + transformFacing(getExtendedFacing()), + tTile.getXCoord(), + tTile.getYCoord(), + tTile.getZCoord(), + mBioOffsets[1], + 6, + mBioOffsets[0], + elementBudget, + env, + false); } else { built += survivialBuildPiece( - bioUpgrade, - stackSize, - mBioOffsets[0], - 6, - mBioOffsets[1], - elementBudget, - env, - false, - true); - } - } - - if (mOCTier1 && !mOCTier2) { - built += survivialBuildPiece( - ocTier1Upgrade, + bioUpgrade, stackSize, - mOCTier1Offsets[0], - 9, - mOCTier1Offsets[1], + mBioOffsets[0], + 6, + mBioOffsets[1], elementBudget, env, false, true); + } + } + + if (mOCTier1 && !mOCTier2) { + built += survivialBuildPiece( + ocTier1Upgrade, + stackSize, + mOCTier1Offsets[0], + 9, + mOCTier1Offsets[1], + elementBudget, + env, + false, + true); } if (!mOCTier1 && mOCTier2) { built += survivialBuildPiece( - ocTier2Upgrade, - stackSize, - mOCTier2Offsets[0], - 9, - mOCTier2Offsets[1], - elementBudget, - env, - false, - true); + ocTier2Upgrade, + stackSize, + mOCTier2Offsets[0], + 9, + mOCTier2Offsets[1], + elementBudget, + env, + false, + true); } return built; @@ -497,38 +386,39 @@ public class GT_MetaTileEntity_PCBFactory extends @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + boolean aActive, boolean aRedstone) { if (aSide == aFacing) { - if (aActive) return new ITexture[] { + if (aActive) + return new ITexture[] { BlockIcons.getCasingTextureForId( - getTier() < 3 ? GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 11) - : GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 13)), + 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(), + .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE) + .extFacing() + .build(), TextureFactory.builder() - .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW) - .extFacing() - .glow() - .build() }; + .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() }; + 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() }; } return new ITexture[] { BlockIcons.getCasingTextureForId( - mSetTier < 3 ? ((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(11) - : ((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(13)) }; + mSetTier < 3 ? ((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(11) + : ((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(13)) }; } @Override @@ -564,17 +454,17 @@ public class GT_MetaTileEntity_PCBFactory extends if (mBioRotate) { final IGregTechTileEntity tTile = getBaseMetaTileEntity(); if (!getStructureDefinition().check( - this, - bioUpgrade, - tTile.getWorld(), - transformFacing(getExtendedFacing()), - tTile.getXCoord(), - tTile.getYCoord(), - tTile.getZCoord(), - mBioOffsets[1], - 6, - mBioOffsets[0], - !mMachine)) { + this, + bioUpgrade, + tTile.getWorld(), + transformFacing(getExtendedFacing()), + tTile.getXCoord(), + tTile.getYCoord(), + tTile.getZCoord(), + mBioOffsets[1], + 6, + mBioOffsets[0], + !mMachine)) { return false; } } else { @@ -608,8 +498,8 @@ public class GT_MetaTileEntity_PCBFactory extends getBaseMetaTileEntity().sendBlockEvent(GregTechTileClientEvents.CHANGE_CUSTOM_DATA, getUpdateData()); if (mMaintenanceHatches.size() != 1 || mOutputBusses.isEmpty() - || mInputBusses.isEmpty() - || mInputHatches.isEmpty()) { + || mInputBusses.isEmpty() + || mInputHatches.isEmpty()) { return false; } @@ -649,7 +539,7 @@ public class GT_MetaTileEntity_PCBFactory extends } private boolean processRecipe(ItemStack aStack, ItemStack[] aItemInputs, FluidStack[] aFluidInputs, - GT_Recipe.GT_Recipe_Map aMap) { + GT_Recipe.GT_Recipe_Map aMap) { mOutputItems = null; mOutputFluids = null; if (aItemInputs == null || aFluidInputs == null) { @@ -660,15 +550,8 @@ 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; @@ -696,19 +579,19 @@ public class GT_MetaTileEntity_PCBFactory extends } boolean recipeAllowed = (((recipeBitMap & mTier1BitMap) == mTier1BitMap && (mTier >= 1)) - || ((recipeBitMap & mTier2BitMap) == mTier2BitMap && (mTier >= 2)) - || ((recipeBitMap & mTier3BitMap) == mTier3BitMap && (mTier >= 3))) - && ((recipeBitMap & mBioBitMap) == 0 || ((recipeBitMap & mBioBitMap) == mBioBitMap && mBioUpgrade)); + || ((recipeBitMap & mTier2BitMap) == mTier2BitMap && (mTier >= 2)) + || ((recipeBitMap & mTier3BitMap) == mTier3BitMap && (mTier >= 3))) + && ((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(); + .setItemInputs(aItemInputs) + .setFluidInputs(aFluidInputs) + .setMaxParallel(aMaxParallel) + .setAvailableEUt(getMaxInputEu()) + .setEUtModifier(aExtraPower) + .enableConsumption() + .build(); mCurrentParallel = helper.getCurrentParallel(); if (mCurrentParallel > 0) { @@ -719,14 +602,11 @@ 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(); } @@ -895,7 +775,7 @@ public class GT_MetaTileEntity_PCBFactory extends } } else if (curRotation == Rotation.CLOCKWISE || curRotation == Rotation.COUNTER_CLOCKWISE) { newFlip = curRotation == Rotation.CLOCKWISE ? curFlip == Flip.NONE ? Flip.NONE : Flip.HORIZONTAL - : curFlip != Flip.NONE ? Flip.NONE : Flip.HORIZONTAL; + : curFlip != Flip.NONE ? Flip.NONE : Flip.HORIZONTAL; newDirection = curRotation == Rotation.CLOCKWISE ? ForgeDirection.UP : ForgeDirection.DOWN; } else { newDirection = switch (curDirection) { @@ -936,7 +816,7 @@ public class GT_MetaTileEntity_PCBFactory extends @Override protected void calculateOverclockedNessMultiInternal(long aEUt, int aDuration, int mAmperage, long maxInputVoltage, - boolean perfectOC) { + boolean perfectOC) { int hatches = Math.max(getExoticEnergyHatches().size(), 1); long zMaxInputVoltage = maxInputVoltage; long zTime = aDuration; @@ -982,8 +862,8 @@ public class GT_MetaTileEntity_PCBFactory extends public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { inputSeparation = !inputSeparation; GT_Utility.sendChatToPlayer( - aPlayer, - StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + inputSeparation); + aPlayer, + StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + inputSeparation); } @Override @@ -1000,181 +880,180 @@ public class GT_MetaTileEntity_PCBFactory extends for (GT_MetaTileEntity_Hatch tHatch : getExoticAndNormalEnergyHatchList()) { if (isValidMetaTileEntity(tHatch)) { storedEnergy += tHatch.getBaseMetaTileEntity() - .getStoredEU(); + .getStoredEU(); maxEnergy += tHatch.getBaseMetaTileEntity() - .getEUCapacity(); + .getEUCapacity(); } } long voltage = getAverageInputVoltage(); long amps = getMaxInputAmps(); return new String[] { - /* 1 */ StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " - + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(mProgresstime / 20) - + EnumChatFormatting.RESET - + " s / " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(mMaxProgresstime / 20) - + EnumChatFormatting.RESET - + " s", - /* 2 */ StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " - + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(storedEnergy) - + EnumChatFormatting.RESET - + " EU / " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(maxEnergy) - + EnumChatFormatting.RESET - + " EU", - /* 3 */ StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " - + EnumChatFormatting.RED - + GT_Utility.formatNumbers(getActualEnergyUsage()) - + EnumChatFormatting.RESET - + " EU/t", - /* 4 */ StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(voltage) - + EnumChatFormatting.RESET - + " EU/t(*" - + amps - + " A)" - + StatCollector.translateToLocal("GT5U.machines.tier") - + ": " - + EnumChatFormatting.YELLOW - + VN[GT_Utility.getTier(voltage)] - + EnumChatFormatting.RESET, - /* 5 */ StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " - + EnumChatFormatting.RED - + (getIdealStatus() - getRepairStatus()) - + EnumChatFormatting.RESET - + " " - + StatCollector.translateToLocal("GT5U.multiblock.efficiency") - + ": " - + EnumChatFormatting.YELLOW - + mEfficiency / 100.0F - + EnumChatFormatting.RESET - + " %", - /* 6 */ StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " - + EnumChatFormatting.GREEN - + mPollutionReduction - + EnumChatFormatting.RESET - + " %", - /* 7 */ StatCollector.translateToLocal("GT5U.multiblock.parallelism") + ": " - + EnumChatFormatting.GREEN - + mMaxParallel, - /* 8 */ StatCollector.translateToLocal("GT5U.multiblock.curparallelism") + ": " - + EnumChatFormatting.GREEN - + mCurrentParallel }; + /* 1 */ StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(mProgresstime / 20) + + EnumChatFormatting.RESET + + " s / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(mMaxProgresstime / 20) + + EnumChatFormatting.RESET + + " s", + /* 2 */ StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(storedEnergy) + + EnumChatFormatting.RESET + + " EU / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(maxEnergy) + + EnumChatFormatting.RESET + + " EU", + /* 3 */ StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + + EnumChatFormatting.RED + + GT_Utility.formatNumbers(getActualEnergyUsage()) + + EnumChatFormatting.RESET + + " EU/t", + /* 4 */ StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(voltage) + + EnumChatFormatting.RESET + + " EU/t(*" + + amps + + " A)" + + StatCollector.translateToLocal("GT5U.machines.tier") + + ": " + + EnumChatFormatting.YELLOW + + VN[GT_Utility.getTier(voltage)] + + EnumChatFormatting.RESET, + /* 5 */ StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " + + EnumChatFormatting.RED + + (getIdealStatus() - getRepairStatus()) + + EnumChatFormatting.RESET + + " " + + StatCollector.translateToLocal("GT5U.multiblock.efficiency") + + ": " + + EnumChatFormatting.YELLOW + + mEfficiency / 100.0F + + EnumChatFormatting.RESET + + " %", + /* 6 */ StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + + EnumChatFormatting.GREEN + + mPollutionReduction + + EnumChatFormatting.RESET + + " %", + /* 7 */ StatCollector.translateToLocal("GT5U.multiblock.parallelism") + ": " + + EnumChatFormatting.GREEN + + mMaxParallel, + /* 8 */ StatCollector.translateToLocal("GT5U.multiblock.curparallelism") + ": " + + EnumChatFormatting.GREEN + + mCurrentParallel }; } @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"); + .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; } @@ -1265,35 +1144,35 @@ public class GT_MetaTileEntity_PCBFactory extends super.addUIWidgets(builder, buildContext); buildContext.addSyncedWindow(10, this::createConfigurationWindow); builder.widget( - new ButtonWidget().setOnClick( - (clickData, widget) -> { - if (!widget.isClient()) widget.getContext() - .openSyncedWindow(10); - }) - .setSize(16, 16) - .setBackground(() -> { - List 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)); + new ButtonWidget().setOnClick( + (clickData, widget) -> { + if (!widget.isClient()) widget.getContext() + .openSyncedWindow(10); + }) + .setSize(16, 16) + .setBackground(() -> { + List 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) { @@ -1301,350 +1180,189 @@ 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 25c3b7157e..5f32ec190d 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 @@ -44,7 +44,7 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMultiFurnace - implements ISurvivalConstructable { + implements ISurvivalConstructable { // 3600 seconds in an hour, 8 hours, 20 ticks in a second. private static final double max_efficiency_time_in_ticks = 3600d * 8d * 20d; @@ -52,8 +52,7 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul // Valid fuels which the discount will get applied to. private static final FluidStack[] valid_fuels = { Materials.ExcitedDTEC.getFluid(1L), - Materials.ExcitedDTRC.getFluid(1L), Materials.ExcitedDTPC.getFluid(1L), - Materials.ExcitedDTCC.getFluid(1L), }; + Materials.ExcitedDTRC.getFluid(1L), Materials.ExcitedDTPC.getFluid(1L), Materials.ExcitedDTCC.getFluid(1L), }; // Saves recomputing this every recipe check for overclocking. private static final double log4 = log(4); @@ -75,403 +74,399 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul private long EU_per_tick = 0; @SuppressWarnings("SpellCheckingInspection") - private static final String[][] structure_string = new String[][] { - { " ", " N N N N ", - " N N N N ", " N N N N ", - " ", " ", - " ", " N N N N ", - " N N N N ", " NNN NNN N N NNN NNN ", - " ", " ", - " ", " NNN NNN NNN NNN ", - " ", " ", - " ", " ", - " ", " NNN NNN NNN NNN ", - " ", " ", - " ", " NNN NNN NNN NNN " }, - { " N N N N ", " bCCCb bCCCb ", - " bCCCb bCCCb ", " bCCCb bCCCb ", - " N N N N ", " ", - " N N N N ", " bCCCb bCCCb ", - " bCCCb bCCCb ", "NbbbN NbbNCCCb bCCCNbbN NbbbN", - " CCC CCC N N CCC CCC ", " CCC CCC CCC CCC ", - " CCC CCC CCC CCC ", "NbbbN NbbbN NbbbN NbbbN", - " N N N N ", " N N N N ", - " ", " N N N N ", - " N N N N ", "NbbbN NbbbN NbbbN NbbbN", - " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", - " CCC CCC CCC CCC ", "NbbbN NbbbN N N NbbbN NbbbN", }, - { " N N N N ", " bCCCb bCCCb ", - " NNNbbbbbNNsNNbbbbbNNN ", " ss bCCCb bCCCb ss ", - " s N N N N s ", " s s ", - " N N N N N N ", " N bCCCb bCCCb N ", - " N sbbbbbNNsNNbbbbbs N ", "NbbbN NbbNCCCb bCCCNbbN NbbbN", - " CbC CbC N N CbC CbC ", " CbC CbC CbC CbC ", - " CbC CbC CbC CbC ", "NbbbN NbbbN NbbbN NbbbN", - " NNN NNN NNN NNN ", " NNN NNN NNN NNN ", - " s s s s ", " NNN NNN NNN NNN ", - " NNN NNN NNN NNN ", "NbbbN NbbbN NbbbN NbbbN", - " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", - " CbC CbC CbC CbC ", "NbbbN NbbbNNNNNsNsNNNNNbbbN NbbbN", }, - { " N N N N ", " bCCCb bCCCb ", - " ss bCCCb bCCCb ss ", " bCCCb bCCCb ", - " s NCCCN NCCCN s ", " s NCCCN NCCCN s ", - " NCCCN NCCCN ", " bCCCb bCCCb ", - " bCCCb bCCCb ", "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", - " CCCCCCCCC N N CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", - " CCCCCCCCC CCCCCCCCC ", "NbbbNNNbbbN NbbbNNNbbbN", - " N N N N ", " N N N N ", - " ", " N N N N ", - " N N N N ", "NbbbNNNbbbN NbbbNNNbbbN", - " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", - " CCCCCCCCC CCCCCCCCC ", "NbbbNNNbbbN NbN NbbbNNNbbbN", }, - { " ", " N N N N ", - " s N N N N s ", " s NCCCN NCCCN s ", - " ", " ", - " ", " NCCCN NCCCN ", - " N N N N ", " NNN NN N N NN NNN ", - " C C C C ", " C C C C ", - " C C C C ", " NNN NNN NNN NNN ", - " ", " ", - " ", " ", - " ", " NNN NNN NNN NNN ", - " C C C C ", " C C C C ", - " C C C C ", " NNN NNN NbN NNN NNN ", }, - { " ", " ", - " s s ", " s NCCCN NCCCN s ", - " ", " ", - " ", " NCCCN NCCCN ", - " ", " N N N N ", - " C C C C ", " C C C C ", - " C C C C ", " N N N N ", - " ", " ", - " ", " ", - " ", " N N N N ", - " C C C C ", " C C C C ", - " C C C C ", " N N NbN N N ", }, - { " ", " N N N N ", - " N N N N N N ", " NCCCN NCCCN ", - " ", " ", - " ", " NCCCN NCCCN ", - " N N N N ", " NNN NN N N NN NNN ", - " C C C C ", " C C C C ", - " C C C C ", " NNN NNN NNN NNN ", - " ", " ", - " ", " ", - " ", " NNN NNN NNN NNN ", - " C C C C ", " C C C C ", - " C C C C ", " NNN NNN NbN NNN NNN ", }, - { " N N N N ", " bCCCb bCCCb ", - " N bCCCb bCCCb N ", " bCCCb bCCCb ", - " NCCCN NCCCN ", " NCCCN NCCCN ", - " NCCCN NCCCN ", " bCCCb bCCCb ", - " bCCCb bCCCb ", "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", - " CCCCCCCCC N N CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", - " CCCCCCCCC CCCCCCCCC ", "NbbbNNNbbbN NbbbNNNbbbN", - " N N N N ", " N N N N ", - " ", " N N N N ", - " N N N N ", "NbbbNNNbbbN NbbbNNNbbbN", - " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", - " CCCCCCCCC CCCCCCCCC ", "NbbbNNNbbbN NbN NbbbNNNbbbN", }, - { " N N N N ", " bCCCb bCCCb ", - " N sbbbbbNNsNNbbbbbs N ", " bCCCb bCCCb ", - " N N N N ", " ", - " N N N N ", " bCCCb bCCCb ", - " s sbbbbbNNsNNbbbbbs s ", "NbbbN NbbNCCCb bCCCNbbN NbbbN", - " CbC CbC N N CbC CbC ", " CbC CbC CbC CbC ", - " CbC CbC CbC CbC ", "NbbbN NbbbN NbbbN NbbbN", - " NNN NNN NNN NNN ", " NNN NNN NNN NNN ", - " s s s s ", " NNN NNN NNN NNN ", - " NNN NNN NNN NNN ", "NbbbN NbbbN NbbbN NbbbN", - " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", - " CbC CbC CbC CbC ", "NbbbN NbbbNNNNNsNsNNNNNbbbN NbbbN", }, - { " NNN NNN N N NNN NNN ", "NbbbN NbbNCCCb bCCCNbbN NbbbN", - "NbbbN NbbNCCCb bCCCNbbN NbbbN", "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", - " NNN NNN N N NNN NNN ", " N N N N ", - " NNN NNN N N NNN NNN ", "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", - "NbbbN NbbNCCCb bCCCNbbN NbbbN", "NNNN NNNCCCb bCCCNNN NNNN", - " CCC CCC N N CCC CCC ", " CCC CCC CCC CCC ", - " CCC CCC CCC CCC ", "NbbbN NbbbN NbbbN NbbbN", - " N N N N ", " N N N N ", - " ", " N N N N ", - " N N N N ", "NbbbN NbbbN NbbbN NbbbN", - " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", - " CCC CCC CCC CCC ", "NbbbN NbbbN NbN NbbbN NbbbN", }, - { " ", " CCC CCC N N CCC CCC ", - " CbC CbC N N CbC CbC ", " CCCCCCCCC N N CCCCCCCCC ", - " C C C C ", " C C C C ", - " C C C C ", " CCCCCCCCC N N CCCCCCCCC ", - " CbC CbC N N CbC CbC ", " CCC CCC N N CCC CCC ", - " ", " ", - " ", " NNN NNN NNN NNN ", - " ", " ", - " ", " ", - " ", " NNN NNN NNN NNN ", - " ", " ", - " ", " NNN NNN NbN NNN NNN ", }, - { " ", " CCC CCC CCC CCC ", - " CbC CbC CbC CbC ", " CCCCCCCCC CCCCCCCCC ", - " C C C C ", " C C C C ", - " C C C C ", " CCCCCCCCC CCCCCCCCC ", - " CbC CbC CbC CbC ", " CCC CCC CCC CCC ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " N N NbN N N ", }, - { " ", " CCC CCC CCC CCC ", - " CbC CbC CbC CbC ", " CCCCCCCCC CCCCCCCCC ", - " C C C C ", " C C C C ", - " C C C C ", " CCCCCCCCC CCCCCCCCC ", - " CbC CbC CbC CbC ", " CCC CCC CCC CCC ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " N N NbN N N ", }, - { " NNN NNN NNN NNN ", "NbbbN NbbbN NbbbN NbbbN", - "NbbbN NbbbN NbbbN NbbbN", "NbbbNNNbbbN NbbbNNNbbbN", - " NNN NNN NNN NNN ", " N N N N ", - " NNN NNN NNN NNN ", "NbbbNNNbbbN NbbbNNNbbbN", - "NbbbN NbbbN NbbbN NbbbN", "NbbbN NbbbN NbbbN NbbbN", - " NNN NNN NNN NNN ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " N N NsNsN N N ", }, - { " ", " ", - " N N N N ", " ", - " ", " ", - " ", " ", - " N N N N ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " N N NbbbbbN N N ", }, - { " ", " ", - " N N N N ", " ", - " ", " ", - " ", " ", - " N N N N ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " N ", " NsNNNNNsNNNNsbbbbbsNNNNsNNNNNsN ", }, - { " ", " ", - " s s s s ", " ", - " ", " ", - " ", " ", - " s s s s ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ~ ", - " NNN ", " NbbbbbNbbbbNbbbbbNbbbbNbbbbbN ", }, - { " ", " ", - " N N N N ", " ", - " ", " ", - " ", " ", - " N N N N ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " N ", " NsNNNNNsNNNNsbbbbbsNNNNsNNNNNsN ", }, - { " ", " ", - " N N N N ", " ", - " ", " ", - " ", " ", - " N N N N ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " N N NbbbbbN N N ", }, - { " NNN NNN NNN NNN ", "NbbbN NbbbN NbbbN NbbbN", - "NbbbN NbbbN NbbbN NbbbN", "NbbbNNNbbbN NbbbNNNbbbN", - " NNN NNN NNN NNN ", " N N N N ", - " NNN NNN NNN NNN ", "NbbbNNNbbbN NbbbNNNbbbN", - "NbbbN NbbbN NbbbN NbbbN", "NbbbN NbbbN NbbbN NbbbN", - " NNN NNN NNN NNN ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " N N NsNsN N N ", }, - { " ", " CCC CCC CCC CCC ", - " CbC CbC CbC CbC ", " CCCCCCCCC CCCCCCCCC ", - " C C C C ", " C C C C ", - " C C C C ", " CCCCCCCCC CCCCCCCCC ", - " CbC CbC CbC CbC ", " CCC CCC CCC CCC ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " N N NbN N N ", }, - { " ", " CCC CCC CCC CCC ", - " CbC CbC CbC CbC ", " CCCCCCCCC CCCCCCCCC ", - " C C C C ", " C C C C ", - " C C C C ", " CCCCCCCCC CCCCCCCCC ", - " CbC CbC CbC CbC ", " CCC CCC CCC CCC ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " ", - " ", " N N NbN N N ", }, - { " ", " CCC CCC N N CCC CCC ", - " CbC CbC N N CbC CbC ", " CCCCCCCCC N N CCCCCCCCC ", - " C C C C ", " C C C C ", - " C C C C ", " CCCCCCCCC N N CCCCCCCCC ", - " CbC CbC N N CbC CbC ", " CCC CCC N N CCC CCC ", - " ", " ", - " ", " NNN NNN NNN NNN ", - " ", " ", - " ", " ", - " ", " NNN NNN NNN NNN ", - " ", " ", - " ", " NNN NNN NbN NNN NNN ", }, - { " NNN NNN N N NNN NNN ", "NbbbN NbbNCCCb bCCCNbbN NbbbN", - "NbbbN NbbNCCCb bCCCNbbN NbbbN", "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", - " NNN NNN N N NNN NNN ", " N N N N ", - " NNN NNN N N NNN NNN ", "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", - "NbbbN NbbNCCCb bCCCNbbN NbbbN", "NNNN NNNCCCb bCCCNNN NNNN", - " CCC CCC N N CCC CCC ", " CCC CCC CCC CCC ", - " CCC CCC CCC CCC ", "NbbbN NbbbN NbbbN NbbbN", - " N N N N ", " N N N N ", - " ", " N N N N ", - " N N N N ", "NbbbN NbbbN NbbbN NbbbN", - " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", - " CCC CCC CCC CCC ", "NbbbN NbbbN NbN NbbbN NbbbN", }, - { " N N N N ", " bCCCb bCCCb ", - " N sbbbbbNNsNNbbbbbs N ", " bCCCb bCCCb ", - " N N N N ", " ", - " N N N N ", " bCCCb bCCCb ", - " s sbbbbbNNsNNbbbbbs s ", "NbbbN NbbNCCCb bCCCNbbN NbbbN", - " CbC CbC N N CbC CbC ", " CbC CbC CbC CbC ", - " CbC CbC CbC CbC ", "NbbbN NbbbN NbbbN NbbbN", - " NNN NNN NNN NNN ", " NNN NNN NNN NNN ", - " s s s s ", " NNN NNN NNN NNN ", - " NNN NNN NNN NNN ", "NbbbN NbbbN NbbbN NbbbN", - " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", - " CbC CbC CbC CbC ", "NbbbN NbbbNNNNNsNsNNNNNbbbN NbbbN", }, - { " N N N N ", " bCCCb bCCCb ", - " N bCCCb bCCCb N ", " bCCCb bCCCb ", - " NCCCN NCCCN ", " NCCCN NCCCN ", - " NCCCN NCCCN ", " bCCCb bCCCb ", - " bCCCb bCCCb ", "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", - " CCCCCCCCC N N CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", - " CCCCCCCCC CCCCCCCCC ", "NbbbNNNbbbN NbbbNNNbbbN", - " N N N N ", " N N N N ", - " ", " N N N N ", - " N N N N ", "NbbbNNNbbbN NbbbNNNbbbN", - " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", - " CCCCCCCCC CCCCCCCCC ", "NbbbNNNbbbN NbN NbbbNNNbbbN", }, - { " ", " N N N N ", - " N N N N N N ", " NCCCN NCCCN ", - " ", " ", - " ", " NCCCN NCCCN ", - " N N N N ", " NNN NN N N NN NNN ", - " C C C C ", " C C C C ", - " C C C C ", " NNN NNN NNN NNN ", - " ", " ", - " ", " ", - " ", " NNN NNN NNN NNN ", - " C C C C ", " C C C C ", - " C C C C ", " NNN NNN NbN NNN NNN ", }, - { " ", " ", - " s s ", " s NCCCN NCCCN s ", - " ", " ", - " ", " NCCCN NCCCN ", - " ", " N N N N ", - " C C C C ", " C C C C ", - " C C C C ", " N N N N ", - " ", " ", - " ", " ", - " ", " N N N N ", - " C C C C ", " C C C C ", - " C C C C ", " N N NbN N N ", }, - { " ", " N N N N ", - " s N N N N s ", " s NCCCN NCCCN s ", - " ", " ", - " ", " NCCCN NCCCN ", - " N N N N ", " NNN NN N N NN NNN ", - " C C C C ", " C C C C ", - " C C C C ", " NNN NNN NNN NNN ", - " ", " ", - " ", " ", - " ", " NNN NNN NNN NNN ", - " C C C C ", " C C C C ", - " C C C C ", " NNN NNN NbN NNN NNN ", }, - { " N N N N ", " bCCCb bCCCb ", - " ss bCCCb bCCCb ss ", " bCCCb bCCCb ", - " s NCCCN NCCCN s ", " s NCCCN NCCCN s ", - " NCCCN NCCCN ", " bCCCb bCCCb ", - " bCCCb bCCCb ", "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", - " CCCCCCCCC N N CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", - " CCCCCCCCC CCCCCCCCC ", "NbbbNNNbbbN NbbbNNNbbbN", - " N N N N ", " N N N N ", - " ", " N N N N ", - " N N N N ", "NbbbNNNbbbN NbbbNNNbbbN", - " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", - " CCCCCCCCC CCCCCCCCC ", "NbbbNNNbbbN NbN NbbbNNNbbbN", }, - { " N N N N ", " bCCCb bCCCb ", - " NNNbbbbbNNsNNbbbbbNNN ", " ss bCCCb bCCCb ss ", - " s N N N N s ", " s s ", - " N N N N N N ", " N bCCCb bCCCb N ", - " N sbbbbbNNsNNbbbbbs N ", "NbbbN NbbNCCCb bCCCNbbN NbbbN", - " CbC CbC N N CbC CbC ", " CbC CbC CbC CbC ", - " CbC CbC CbC CbC ", "NbbbN NbbbN NbbbN NbbbN", - " NNN NNN NNN NNN ", " NNN NNN NNN NNN ", - " s s s s ", " NNN NNN NNN NNN ", - " NNN NNN NNN NNN ", "NbbbN NbbbN NbbbN NbbbN", - " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", - " CbC CbC CbC CbC ", "NbbbN NbbbNNNNNsNsNNNNNbbbN NbbbN", }, - { " N N N N ", " bCCCb bCCCb ", - " bCCCb bCCCb ", " bCCCb bCCCb ", - " N N N N ", " ", - " N N N N ", " bCCCb bCCCb ", - " bCCCb bCCCb ", "NbbbN NbbNCCCb bCCCNbbN NbbbN", - " CCC CCC N N CCC CCC ", " CCC CCC CCC CCC ", - " CCC CCC CCC CCC ", "NbbbN NbbbN NbbbN NbbbN", - " N N N N ", " N N N N ", - " ", " N N N N ", - " N N N N ", "NbbbN NbbbN NbbbN NbbbN", - " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", - " CCC CCC CCC CCC ", "NbbbN NbbbN N N NbbbN NbbbN", }, - { " ", " N N N N ", - " N N N N ", " N N N N ", - " ", " ", - " ", " N N N N ", - " N N N N ", " NNN NNN N N NNN NNN ", - " ", " ", - " ", " NNN NNN NNN NNN ", - " ", " ", - " ", " ", - " ", " NNN NNN NNN NNN ", - " ", " ", - " ", " NNN NNN NNN NNN ", } }; + private static final String[][] structure_string = new String[][] { { " ", + " N N N N ", " N N N N ", " N N N N ", + " ", " ", " ", + " N N N N ", " N N N N ", " NNN NNN N N NNN NNN ", + " ", " ", " ", + " NNN NNN NNN NNN ", " ", " ", + " ", " ", " ", + " NNN NNN NNN NNN ", " ", " ", + " ", " NNN NNN NNN NNN " }, + { " N N N N ", " bCCCb bCCCb ", " bCCCb bCCCb ", + " bCCCb bCCCb ", " N N N N ", + " ", " N N N N ", + " bCCCb bCCCb ", " bCCCb bCCCb ", + "NbbbN NbbNCCCb bCCCNbbN NbbbN", " CCC CCC N N CCC CCC ", + " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", + "NbbbN NbbbN NbbbN NbbbN", " N N N N ", + " N N N N ", " ", + " N N N N ", " N N N N ", + "NbbbN NbbbN NbbbN NbbbN", " CCC CCC CCC CCC ", + " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", + "NbbbN NbbbN N N NbbbN NbbbN", }, + { " N N N N ", " bCCCb bCCCb ", " NNNbbbbbNNsNNbbbbbNNN ", + " ss bCCCb bCCCb ss ", " s N N N N s ", + " s s ", " N N N N N N ", + " N bCCCb bCCCb N ", " N sbbbbbNNsNNbbbbbs N ", + "NbbbN NbbNCCCb bCCCNbbN NbbbN", " CbC CbC N N CbC CbC ", + " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", + "NbbbN NbbbN NbbbN NbbbN", " NNN NNN NNN NNN ", + " NNN NNN NNN NNN ", " s s s s ", + " NNN NNN NNN NNN ", " NNN NNN NNN NNN ", + "NbbbN NbbbN NbbbN NbbbN", " CbC CbC CbC CbC ", + " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", + "NbbbN NbbbNNNNNsNsNNNNNbbbN NbbbN", }, + { " N N N N ", " bCCCb bCCCb ", " ss bCCCb bCCCb ss ", + " bCCCb bCCCb ", " s NCCCN NCCCN s ", + " s NCCCN NCCCN s ", " NCCCN NCCCN ", + " bCCCb bCCCb ", " bCCCb bCCCb ", + "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", " CCCCCCCCC N N CCCCCCCCC ", + " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", + "NbbbNNNbbbN NbbbNNNbbbN", " N N N N ", + " N N N N ", " ", + " N N N N ", " N N N N ", + "NbbbNNNbbbN NbbbNNNbbbN", " CCCCCCCCC CCCCCCCCC ", + " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", + "NbbbNNNbbbN NbN NbbbNNNbbbN", }, + { " ", " N N N N ", " s N N N N s ", + " s NCCCN NCCCN s ", " ", + " ", " ", + " NCCCN NCCCN ", " N N N N ", + " NNN NN N N NN NNN ", " C C C C ", + " C C C C ", " C C C C ", + " NNN NNN NNN NNN ", " ", + " ", " ", + " ", " ", + " NNN NNN NNN NNN ", " C C C C ", + " C C C C ", " C C C C ", + " NNN NNN NbN NNN NNN ", }, + { " ", " ", " s s ", + " s NCCCN NCCCN s ", " ", + " ", " ", + " NCCCN NCCCN ", " ", + " N N N N ", " C C C C ", + " C C C C ", " C C C C ", + " N N N N ", " ", + " ", " ", + " ", " ", + " N N N N ", " C C C C ", + " C C C C ", " C C C C ", + " N N NbN N N ", }, + { " ", " N N N N ", " N N N N N N ", + " NCCCN NCCCN ", " ", + " ", " ", + " NCCCN NCCCN ", " N N N N ", + " NNN NN N N NN NNN ", " C C C C ", + " C C C C ", " C C C C ", + " NNN NNN NNN NNN ", " ", + " ", " ", + " ", " ", + " NNN NNN NNN NNN ", " C C C C ", + " C C C C ", " C C C C ", + " NNN NNN NbN NNN NNN ", }, + { " N N N N ", " bCCCb bCCCb ", " N bCCCb bCCCb N ", + " bCCCb bCCCb ", " NCCCN NCCCN ", + " NCCCN NCCCN ", " NCCCN NCCCN ", + " bCCCb bCCCb ", " bCCCb bCCCb ", + "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", " CCCCCCCCC N N CCCCCCCCC ", + " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", + "NbbbNNNbbbN NbbbNNNbbbN", " N N N N ", + " N N N N ", " ", + " N N N N ", " N N N N ", + "NbbbNNNbbbN NbbbNNNbbbN", " CCCCCCCCC CCCCCCCCC ", + " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", + "NbbbNNNbbbN NbN NbbbNNNbbbN", }, + { " N N N N ", " bCCCb bCCCb ", " N sbbbbbNNsNNbbbbbs N ", + " bCCCb bCCCb ", " N N N N ", + " ", " N N N N ", + " bCCCb bCCCb ", " s sbbbbbNNsNNbbbbbs s ", + "NbbbN NbbNCCCb bCCCNbbN NbbbN", " CbC CbC N N CbC CbC ", + " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", + "NbbbN NbbbN NbbbN NbbbN", " NNN NNN NNN NNN ", + " NNN NNN NNN NNN ", " s s s s ", + " NNN NNN NNN NNN ", " NNN NNN NNN NNN ", + "NbbbN NbbbN NbbbN NbbbN", " CbC CbC CbC CbC ", + " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", + "NbbbN NbbbNNNNNsNsNNNNNbbbN NbbbN", }, + { " NNN NNN N N NNN NNN ", "NbbbN NbbNCCCb bCCCNbbN NbbbN", "NbbbN NbbNCCCb bCCCNbbN NbbbN", + "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", " NNN NNN N N NNN NNN ", + " N N N N ", " NNN NNN N N NNN NNN ", + "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", "NbbbN NbbNCCCb bCCCNbbN NbbbN", + "NNNN NNNCCCb bCCCNNN NNNN", " CCC CCC N N CCC CCC ", + " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", + "NbbbN NbbbN NbbbN NbbbN", " N N N N ", + " N N N N ", " ", + " N N N N ", " N N N N ", + "NbbbN NbbbN NbbbN NbbbN", " CCC CCC CCC CCC ", + " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", + "NbbbN NbbbN NbN NbbbN NbbbN", }, + { " ", " CCC CCC N N CCC CCC ", " CbC CbC N N CbC CbC ", + " CCCCCCCCC N N CCCCCCCCC ", " C C C C ", + " C C C C ", " C C C C ", + " CCCCCCCCC N N CCCCCCCCC ", " CbC CbC N N CbC CbC ", + " CCC CCC N N CCC CCC ", " ", + " ", " ", + " NNN NNN NNN NNN ", " ", + " ", " ", + " ", " ", + " NNN NNN NNN NNN ", " ", + " ", " ", + " NNN NNN NbN NNN NNN ", }, + { " ", " CCC CCC CCC CCC ", " CbC CbC CbC CbC ", + " CCCCCCCCC CCCCCCCCC ", " C C C C ", + " C C C C ", " C C C C ", + " CCCCCCCCC CCCCCCCCC ", " CbC CbC CbC CbC ", + " CCC CCC CCC CCC ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " N N NbN N N ", }, + { " ", " CCC CCC CCC CCC ", " CbC CbC CbC CbC ", + " CCCCCCCCC CCCCCCCCC ", " C C C C ", + " C C C C ", " C C C C ", + " CCCCCCCCC CCCCCCCCC ", " CbC CbC CbC CbC ", + " CCC CCC CCC CCC ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " N N NbN N N ", }, + { " NNN NNN NNN NNN ", "NbbbN NbbbN NbbbN NbbbN", "NbbbN NbbbN NbbbN NbbbN", + "NbbbNNNbbbN NbbbNNNbbbN", " NNN NNN NNN NNN ", + " N N N N ", " NNN NNN NNN NNN ", + "NbbbNNNbbbN NbbbNNNbbbN", "NbbbN NbbbN NbbbN NbbbN", + "NbbbN NbbbN NbbbN NbbbN", " NNN NNN NNN NNN ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " N N NsNsN N N ", }, + { " ", " ", " N N N N ", + " ", " ", + " ", " ", + " ", " N N N N ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " N N NbbbbbN N N ", }, + { " ", " ", " N N N N ", + " ", " ", + " ", " ", + " ", " N N N N ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " N ", + " NsNNNNNsNNNNsbbbbbsNNNNsNNNNNsN ", }, + { " ", " ", " s s s s ", + " ", " ", + " ", " ", + " ", " s s s s ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ~ ", " NNN ", + " NbbbbbNbbbbNbbbbbNbbbbNbbbbbN ", }, + { " ", " ", " N N N N ", + " ", " ", + " ", " ", + " ", " N N N N ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " N ", + " NsNNNNNsNNNNsbbbbbsNNNNsNNNNNsN ", }, + { " ", " ", " N N N N ", + " ", " ", + " ", " ", + " ", " N N N N ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " N N NbbbbbN N N ", }, + { " NNN NNN NNN NNN ", "NbbbN NbbbN NbbbN NbbbN", "NbbbN NbbbN NbbbN NbbbN", + "NbbbNNNbbbN NbbbNNNbbbN", " NNN NNN NNN NNN ", + " N N N N ", " NNN NNN NNN NNN ", + "NbbbNNNbbbN NbbbNNNbbbN", "NbbbN NbbbN NbbbN NbbbN", + "NbbbN NbbbN NbbbN NbbbN", " NNN NNN NNN NNN ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " N N NsNsN N N ", }, + { " ", " CCC CCC CCC CCC ", " CbC CbC CbC CbC ", + " CCCCCCCCC CCCCCCCCC ", " C C C C ", + " C C C C ", " C C C C ", + " CCCCCCCCC CCCCCCCCC ", " CbC CbC CbC CbC ", + " CCC CCC CCC CCC ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " N N NbN N N ", }, + { " ", " CCC CCC CCC CCC ", " CbC CbC CbC CbC ", + " CCCCCCCCC CCCCCCCCC ", " C C C C ", + " C C C C ", " C C C C ", + " CCCCCCCCC CCCCCCCCC ", " CbC CbC CbC CbC ", + " CCC CCC CCC CCC ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " ", " ", + " N N NbN N N ", }, + { " ", " CCC CCC N N CCC CCC ", " CbC CbC N N CbC CbC ", + " CCCCCCCCC N N CCCCCCCCC ", " C C C C ", + " C C C C ", " C C C C ", + " CCCCCCCCC N N CCCCCCCCC ", " CbC CbC N N CbC CbC ", + " CCC CCC N N CCC CCC ", " ", + " ", " ", + " NNN NNN NNN NNN ", " ", + " ", " ", + " ", " ", + " NNN NNN NNN NNN ", " ", + " ", " ", + " NNN NNN NbN NNN NNN ", }, + { " NNN NNN N N NNN NNN ", "NbbbN NbbNCCCb bCCCNbbN NbbbN", "NbbbN NbbNCCCb bCCCNbbN NbbbN", + "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", " NNN NNN N N NNN NNN ", + " N N N N ", " NNN NNN N N NNN NNN ", + "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", "NbbbN NbbNCCCb bCCCNbbN NbbbN", + "NNNN NNNCCCb bCCCNNN NNNN", " CCC CCC N N CCC CCC ", + " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", + "NbbbN NbbbN NbbbN NbbbN", " N N N N ", + " N N N N ", " ", + " N N N N ", " N N N N ", + "NbbbN NbbbN NbbbN NbbbN", " CCC CCC CCC CCC ", + " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", + "NbbbN NbbbN NbN NbbbN NbbbN", }, + { " N N N N ", " bCCCb bCCCb ", " N sbbbbbNNsNNbbbbbs N ", + " bCCCb bCCCb ", " N N N N ", + " ", " N N N N ", + " bCCCb bCCCb ", " s sbbbbbNNsNNbbbbbs s ", + "NbbbN NbbNCCCb bCCCNbbN NbbbN", " CbC CbC N N CbC CbC ", + " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", + "NbbbN NbbbN NbbbN NbbbN", " NNN NNN NNN NNN ", + " NNN NNN NNN NNN ", " s s s s ", + " NNN NNN NNN NNN ", " NNN NNN NNN NNN ", + "NbbbN NbbbN NbbbN NbbbN", " CbC CbC CbC CbC ", + " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", + "NbbbN NbbbNNNNNsNsNNNNNbbbN NbbbN", }, + { " N N N N ", " bCCCb bCCCb ", " N bCCCb bCCCb N ", + " bCCCb bCCCb ", " NCCCN NCCCN ", + " NCCCN NCCCN ", " NCCCN NCCCN ", + " bCCCb bCCCb ", " bCCCb bCCCb ", + "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", " CCCCCCCCC N N CCCCCCCCC ", + " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", + "NbbbNNNbbbN NbbbNNNbbbN", " N N N N ", + " N N N N ", " ", + " N N N N ", " N N N N ", + "NbbbNNNbbbN NbbbNNNbbbN", " CCCCCCCCC CCCCCCCCC ", + " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", + "NbbbNNNbbbN NbN NbbbNNNbbbN", }, + { " ", " N N N N ", " N N N N N N ", + " NCCCN NCCCN ", " ", + " ", " ", + " NCCCN NCCCN ", " N N N N ", + " NNN NN N N NN NNN ", " C C C C ", + " C C C C ", " C C C C ", + " NNN NNN NNN NNN ", " ", + " ", " ", + " ", " ", + " NNN NNN NNN NNN ", " C C C C ", + " C C C C ", " C C C C ", + " NNN NNN NbN NNN NNN ", }, + { " ", " ", " s s ", + " s NCCCN NCCCN s ", " ", + " ", " ", + " NCCCN NCCCN ", " ", + " N N N N ", " C C C C ", + " C C C C ", " C C C C ", + " N N N N ", " ", + " ", " ", + " ", " ", + " N N N N ", " C C C C ", + " C C C C ", " C C C C ", + " N N NbN N N ", }, + { " ", " N N N N ", " s N N N N s ", + " s NCCCN NCCCN s ", " ", + " ", " ", + " NCCCN NCCCN ", " N N N N ", + " NNN NN N N NN NNN ", " C C C C ", + " C C C C ", " C C C C ", + " NNN NNN NNN NNN ", " ", + " ", " ", + " ", " ", + " NNN NNN NNN NNN ", " C C C C ", + " C C C C ", " C C C C ", + " NNN NNN NbN NNN NNN ", }, + { " N N N N ", " bCCCb bCCCb ", " ss bCCCb bCCCb ss ", + " bCCCb bCCCb ", " s NCCCN NCCCN s ", + " s NCCCN NCCCN s ", " NCCCN NCCCN ", + " bCCCb bCCCb ", " bCCCb bCCCb ", + "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", " CCCCCCCCC N N CCCCCCCCC ", + " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", + "NbbbNNNbbbN NbbbNNNbbbN", " N N N N ", + " N N N N ", " ", + " N N N N ", " N N N N ", + "NbbbNNNbbbN NbbbNNNbbbN", " CCCCCCCCC CCCCCCCCC ", + " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", + "NbbbNNNbbbN NbN NbbbNNNbbbN", }, + { " N N N N ", " bCCCb bCCCb ", " NNNbbbbbNNsNNbbbbbNNN ", + " ss bCCCb bCCCb ss ", " s N N N N s ", + " s s ", " N N N N N N ", + " N bCCCb bCCCb N ", " N sbbbbbNNsNNbbbbbs N ", + "NbbbN NbbNCCCb bCCCNbbN NbbbN", " CbC CbC N N CbC CbC ", + " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", + "NbbbN NbbbN NbbbN NbbbN", " NNN NNN NNN NNN ", + " NNN NNN NNN NNN ", " s s s s ", + " NNN NNN NNN NNN ", " NNN NNN NNN NNN ", + "NbbbN NbbbN NbbbN NbbbN", " CbC CbC CbC CbC ", + " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", + "NbbbN NbbbNNNNNsNsNNNNNbbbN NbbbN", }, + { " N N N N ", " bCCCb bCCCb ", " bCCCb bCCCb ", + " bCCCb bCCCb ", " N N N N ", + " ", " N N N N ", + " bCCCb bCCCb ", " bCCCb bCCCb ", + "NbbbN NbbNCCCb bCCCNbbN NbbbN", " CCC CCC N N CCC CCC ", + " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", + "NbbbN NbbbN NbbbN NbbbN", " N N N N ", + " N N N N ", " ", + " N N N N ", " N N N N ", + "NbbbN NbbbN NbbbN NbbbN", " CCC CCC CCC CCC ", + " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", + "NbbbN NbbbN N N NbbbN NbbbN", }, + { " ", " N N N N ", " N N N N ", + " N N N N ", " ", + " ", " ", + " N N N N ", " N N N N ", + " NNN NNN N N NNN NNN ", " ", + " ", " ", + " NNN NNN NNN NNN ", " ", + " ", " ", + " ", " ", + " NNN NNN NNN NNN ", " ", + " ", " ", + " NNN NNN NNN NNN ", } }; protected static final int DIM_TRANS_CASING = 12; protected static final int DIM_INJECTION_CASING = 13; @@ -480,44 +475,22 @@ 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 STRUCTURE_DEFINITION = StructureDefinition.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 STRUCTURE_DEFINITION = StructureDefinition + .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) { @@ -542,87 +515,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; } @@ -634,22 +607,21 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + 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() }; + .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() }; + .addIcon(OVERLAY_DTPF_OFF) + .extFacing() + .build() }; } return new ITexture[] { casingTexturePages[0][DIM_BRIDGE_CASING] }; } @@ -692,12 +664,8 @@ 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; @@ -847,69 +815,67 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul for (GT_MetaTileEntity_Hatch tHatch : mExoticEnergyHatches) { if (isValidMetaTileEntity(tHatch)) { storedEnergy += tHatch.getBaseMetaTileEntity() - .getStoredEU(); + .getStoredEU(); maxEnergy += tHatch.getBaseMetaTileEntity() - .getEUCapacity(); + .getEUCapacity(); } } return new String[] { "------------ Critical Information ------------", - StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " - + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(mProgresstime) - + EnumChatFormatting.RESET - + "t / " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(mMaxProgresstime) - + EnumChatFormatting.RESET - + "t", - StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " - + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(storedEnergy) - + EnumChatFormatting.RESET - + " EU / " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(maxEnergy) - + EnumChatFormatting.RESET - + " EU", - StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " - + EnumChatFormatting.RED - + GT_Utility.formatNumbers(-EU_per_tick) - + EnumChatFormatting.RESET - + " EU/t", - StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers( - GT_ExoticEnergyInputHelper.getAverageInputVoltageMulti( - getExoticAndNormalEnergyHatchList())) - + EnumChatFormatting.RESET - + " EU/t(*" - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers( - GT_ExoticEnergyInputHelper.getMaxWorkingInputAmpsMulti( - getExoticAndNormalEnergyHatchList())) - + EnumChatFormatting.RESET - + "A) " - + StatCollector.translateToLocal("GT5U.machines.tier") - + ": " - + EnumChatFormatting.YELLOW - + VN[GT_Utility.getTier( - GT_ExoticEnergyInputHelper.getTotalEuMulti(getExoticAndNormalEnergyHatchList()))] - + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.EBF.heat") + ": " - + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(mHeatingCapacity) - + EnumChatFormatting.RESET - + " K", - "Ticks run: " + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(running_time) - + EnumChatFormatting.RESET - + ", Fuel Discount: " - + EnumChatFormatting.RED - + GT_Utility.formatNumbers(100 * (1 - discount)) - + EnumChatFormatting.RESET - + "%", - "-----------------------------------------" }; + StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(mProgresstime) + + EnumChatFormatting.RESET + + "t / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(mMaxProgresstime) + + EnumChatFormatting.RESET + + "t", + StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(storedEnergy) + + EnumChatFormatting.RESET + + " EU / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(maxEnergy) + + EnumChatFormatting.RESET + + " EU", + StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + + EnumChatFormatting.RED + + GT_Utility.formatNumbers(-EU_per_tick) + + EnumChatFormatting.RESET + + " EU/t", + StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers( + GT_ExoticEnergyInputHelper.getAverageInputVoltageMulti(getExoticAndNormalEnergyHatchList())) + + EnumChatFormatting.RESET + + " EU/t(*" + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers( + GT_ExoticEnergyInputHelper.getMaxWorkingInputAmpsMulti(getExoticAndNormalEnergyHatchList())) + + EnumChatFormatting.RESET + + "A) " + + StatCollector.translateToLocal("GT5U.machines.tier") + + ": " + + EnumChatFormatting.YELLOW + + VN[GT_Utility + .getTier(GT_ExoticEnergyInputHelper.getTotalEuMulti(getExoticAndNormalEnergyHatchList()))] + + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.EBF.heat") + ": " + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(mHeatingCapacity) + + EnumChatFormatting.RESET + + " K", + "Ticks run: " + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(running_time) + + EnumChatFormatting.RESET + + ", Fuel Discount: " + + EnumChatFormatting.RED + + GT_Utility.formatNumbers(100 * (1 - discount)) + + EnumChatFormatting.RESET + + "%", + "-----------------------------------------" }; } public List getExoticAndNormalEnergyHatchList() { @@ -941,32 +907,32 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul int ControllerZCoordinate = ((TileEntity) aBaseMetaTileEntity).zCoord; GT_ChunkManager.requestChunkLoad( - (TileEntity) aBaseMetaTileEntity, - new ChunkCoordIntPair(ControllerXCoordinate, ControllerZCoordinate)); + (TileEntity) aBaseMetaTileEntity, + new ChunkCoordIntPair(ControllerXCoordinate, ControllerZCoordinate)); GT_ChunkManager.requestChunkLoad( - (TileEntity) aBaseMetaTileEntity, - new ChunkCoordIntPair(ControllerXCoordinate + 16, ControllerZCoordinate)); + (TileEntity) aBaseMetaTileEntity, + new ChunkCoordIntPair(ControllerXCoordinate + 16, ControllerZCoordinate)); GT_ChunkManager.requestChunkLoad( - (TileEntity) aBaseMetaTileEntity, - new ChunkCoordIntPair(ControllerXCoordinate - 16, ControllerZCoordinate)); + (TileEntity) aBaseMetaTileEntity, + new ChunkCoordIntPair(ControllerXCoordinate - 16, ControllerZCoordinate)); GT_ChunkManager.requestChunkLoad( - (TileEntity) aBaseMetaTileEntity, - new ChunkCoordIntPair(ControllerXCoordinate, ControllerZCoordinate + 16)); + (TileEntity) aBaseMetaTileEntity, + new ChunkCoordIntPair(ControllerXCoordinate, ControllerZCoordinate + 16)); GT_ChunkManager.requestChunkLoad( - (TileEntity) aBaseMetaTileEntity, - new ChunkCoordIntPair(ControllerXCoordinate, ControllerZCoordinate - 16)); + (TileEntity) aBaseMetaTileEntity, + new ChunkCoordIntPair(ControllerXCoordinate, ControllerZCoordinate - 16)); GT_ChunkManager.requestChunkLoad( - (TileEntity) aBaseMetaTileEntity, - new ChunkCoordIntPair(ControllerXCoordinate + 16, ControllerZCoordinate + 16)); + (TileEntity) aBaseMetaTileEntity, + new ChunkCoordIntPair(ControllerXCoordinate + 16, ControllerZCoordinate + 16)); GT_ChunkManager.requestChunkLoad( - (TileEntity) aBaseMetaTileEntity, - new ChunkCoordIntPair(ControllerXCoordinate + 16, ControllerZCoordinate - 16)); + (TileEntity) aBaseMetaTileEntity, + new ChunkCoordIntPair(ControllerXCoordinate + 16, ControllerZCoordinate - 16)); GT_ChunkManager.requestChunkLoad( - (TileEntity) aBaseMetaTileEntity, - new ChunkCoordIntPair(ControllerXCoordinate - 16, ControllerZCoordinate + 16)); + (TileEntity) aBaseMetaTileEntity, + new ChunkCoordIntPair(ControllerXCoordinate - 16, ControllerZCoordinate + 16)); GT_ChunkManager.requestChunkLoad( - (TileEntity) aBaseMetaTileEntity, - new ChunkCoordIntPair(ControllerXCoordinate - 16, ControllerZCoordinate - 16)); + (TileEntity) aBaseMetaTileEntity, + new ChunkCoordIntPair(ControllerXCoordinate - 16, ControllerZCoordinate - 16)); isMultiChunkloaded = true; } 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 4c847e0fb7..ccd536d341 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 @@ -44,7 +44,7 @@ import gregtech.api.util.WorldSpawnedEventBuilder.ParticleEventBuilder; import gregtech.common.GT_Pollution; public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEntity - implements IAlignment, ISurvivalConstructable, IAddUIWidgets, IGetTitleColor { + implements IAlignment, ISurvivalConstructable, IAddUIWidgets, IGetTitleColor { public static final int INPUT_SLOTS = 3, OUTPUT_SLOTS = 3; private static final ClassValue> STRUCTURE_DEFINITION = new ClassValue<>() { @@ -52,20 +52,16 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn @Override protected IStructureDefinition computeValue(Class type) { return IStructureDefinition.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(); } }; @@ -160,8 +156,7 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn @Override public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) { return (GregTech_API.getCoverBehaviorNew(aCoverID.toStack()) - .isSimpleCover()) - && (super.allowCoverOnSide(aSide, aCoverID)); + .isSimpleCover()) && (super.allowCoverOnSide(aSide, aCoverID)); } @Override @@ -207,8 +202,8 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn @Override public void setExtendedFacing(ExtendedFacing alignment) { getBaseMetaTileEntity().setFrontFacing( - (byte) alignment.getDirection() - .ordinal()); + (byte) alignment.getDirection() + .ordinal()); } @Override @@ -218,18 +213,18 @@ 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); + .check( + this, + "main", + getBaseMetaTileEntity().getWorld(), + getExtendedFacing(), + getBaseMetaTileEntity().getXCoord(), + getBaseMetaTileEntity().getYCoord(), + getBaseMetaTileEntity().getZCoord(), + 1, + 2, + 0, + !mMachine); } protected abstract Block getCasingBlock(); @@ -248,15 +243,13 @@ 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) { @@ -275,9 +268,9 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn this.mProgresstime = 0; this.mMaxProgresstime = 0; GT_Mod.achievements.issueAchievement( - aBaseMetaTileEntity.getWorld() - .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), - "steel"); + aBaseMetaTileEntity.getWorld() + .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), + "steel"); } } else if (aBaseMetaTileEntity.isAllowedToWork()) { checkRecipe(); @@ -285,8 +278,8 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn } if (this.mMaxProgresstime > 0 && (aTimer % 20L == 0L)) { GT_Pollution.addPollution( - this.getBaseMetaTileEntity(), - GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond); + this.getBaseMetaTileEntity(), + GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond); } aBaseMetaTileEntity.setActive((this.mMaxProgresstime > 0) && (this.mMachine)); @@ -294,12 +287,12 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn if (aBaseMetaTileEntity.isActive()) { if (aBaseMetaTileEntity.getAir(lavaX, lavaY, lavaZ)) { aBaseMetaTileEntity.getWorld() - .setBlock(lavaX, lavaY, lavaZ, Blocks.lava, 1, 2); + .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); + .setBlock(lavaX, lavaY + 1, lavaZ, Blocks.lava, 1, 2); this.mUpdate = 1; } } else { @@ -307,12 +300,12 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn Block upperLava = aBaseMetaTileEntity.getBlock(lavaX, lavaY + 1, lavaZ); if (lowerLava == Blocks.lava) { aBaseMetaTileEntity.getWorld() - .setBlock(lavaX, lavaY, lavaZ, Blocks.air, 0, 2); + .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); + .setBlock(lavaX, lavaY + 1, lavaZ, Blocks.air, 0, 2); this.mUpdate = 1; } } @@ -364,13 +357,12 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn } ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder()).setMotion(0D, 0D, 0D) - .setPosition(x, y, z) - .setWorld( - getBaseMetaTileEntity().getWorld()); + .setPosition(x, y, z) + .setWorld(getBaseMetaTileEntity().getWorld()); particleEventBuilder.setIdentifier(ParticleFX.SMOKE) - .run(); + .run(); particleEventBuilder.setIdentifier(ParticleFX.FLAME) - .run(); + .run(); } } @@ -394,8 +386,8 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn this.mInventory[absi] = GT_Utility.copyOrNull(this.mOutputItems[i]); } else if (GT_Utility.areStacksEqual(this.mInventory[absi], this.mOutputItems[i])) { this.mInventory[absi].stackSize = Math.min( - this.mInventory[absi].getMaxStackSize(), - this.mInventory[absi].stackSize + this.mOutputItems[i].stackSize); + this.mInventory[absi].getMaxStackSize(), + this.mInventory[absi].stackSize + this.mOutputItems[i].stackSize); } } } @@ -406,8 +398,8 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn return true; } return ((this.mInventory[absoluteSlot].stackSize + outputStack.stackSize - <= this.mInventory[absoluteSlot].getMaxStackSize()) - && (GT_Utility.areStacksEqual(this.mInventory[absoluteSlot], outputStack))); + <= this.mInventory[absoluteSlot].getMaxStackSize()) + && (GT_Utility.areStacksEqual(this.mInventory[absoluteSlot], outputStack))); } private boolean checkRecipe() { @@ -469,21 +461,21 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn 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); + .survivalBuild( + this, + stackSize, + "main", + getBaseMetaTileEntity().getWorld(), + getExtendedFacing(), + getBaseMetaTileEntity().getXCoord(), + getBaseMetaTileEntity().getYCoord(), + getBaseMetaTileEntity().getZCoord(), + 1, + 2, + 0, + elementBudget, + env, + false); } @Override @@ -494,19 +486,19 @@ 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); + .buildOrHints( + this, + stackSize, + "main", + getBaseMetaTileEntity().getWorld(), + getExtendedFacing(), + getBaseMetaTileEntity().getXCoord(), + getBaseMetaTileEntity().getYCoord(), + getBaseMetaTileEntity().getZCoord(), + 1, + 2, + 0, + hintsOnly); } @Override @@ -516,54 +508,49 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { - builder.widget( + 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)); + .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 d50b7debfa..6e60396af4 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 @@ -59,7 +59,7 @@ import gregtech.api.util.GT_Utility; import gregtech.common.blocks.GT_Item_Machines; public class GT_MetaTileEntity_ProcessingArray - extends GT_MetaTileEntity_CubicMultiBlockBase { + extends GT_MetaTileEntity_CubicMultiBlockBase { private GT_Recipe_Map mLastRecipeMap; private GT_Recipe mLastRecipe; @@ -87,57 +87,55 @@ public class GT_MetaTileEntity_ProcessingArray 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"); + .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; } @Override public boolean addToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { return super.addToMachineList(aTileEntity, aBaseCasingIndex) - || addExoticEnergyInputToMachineList(aTileEntity, aBaseCasingIndex); + || addExoticEnergyInputToMachineList(aTileEntity, aBaseCasingIndex); } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + 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() }; + .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() }; + .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] }; } @@ -156,9 +154,9 @@ public class GT_MetaTileEntity_ProcessingArray public GT_Recipe_Map getRecipeMap() { if (isCorrectMachinePart(mInventory[1])) { int length = mInventory[1].getUnlocalizedName() - .length(); + .length(); String aMachineName = mInventory[1].getUnlocalizedName() - .substring(17, length - 8); + .substring(17, length - 8); return GT_ProcessingArray_Manager.giveRecipeMap(aMachineName); } return null; @@ -167,7 +165,7 @@ public class GT_MetaTileEntity_ProcessingArray @Override public boolean isCorrectMachinePart(ItemStack aStack) { return aStack != null && aStack.getUnlocalizedName() - .startsWith("gt.blockmachines."); + .startsWith("gt.blockmachines."); } @Override @@ -190,9 +188,9 @@ public class GT_MetaTileEntity_ProcessingArray boolean result = checkRecipe(mInventory[1]); if (result) { int length = mInventory[1].getUnlocalizedName() - .length(); + .length(); String aMachineName = mInventory[1].getUnlocalizedName() - .substring(17, length - 8); + .substring(17, length - 8); SoundResource sound = GT_ProcessingArray_Manager.getSoundResource(aMachineName); if (sound != null) { sendLoopStart((byte) sound.id); @@ -265,32 +263,31 @@ public class GT_MetaTileEntity_ProcessingArray int parallel = tSingleRecipeCheck.checkRecipeInputs(true, machines); return processRecipeOutputs( - tSingleRecipeCheck.getRecipe(), - tSingleRecipeCheck.getRecipeAmperage(), - parallel, - 1); + tSingleRecipeCheck.getRecipe(), + tSingleRecipeCheck.getRecipeAmperage(), + parallel, + 1); } public boolean processRecipe(ItemStack[] tInputs, FluidStack[] tFluids, GT_Recipe.GT_Recipe_Map map) { if (tInputs.length <= 0 && tFluids.length <= 0) return false; GT_Recipe tRecipe = map.findRecipe( - getBaseMetaTileEntity(), - mLastRecipe, - false, - gregtech.api.enums.GT_Values.V[tTier], - tFluids, - tInputs); + getBaseMetaTileEntity(), + mLastRecipe, + false, + gregtech.api.enums.GT_Values.V[tTier], + tFluids, + tInputs); if (tRecipe == null) return false; if (GT_Mod.gregtechproxy.mLowGravProcessing && tRecipe.mSpecialValue == -100 - && !isValidForLowGravity(tRecipe, getBaseMetaTileEntity().getWorld().provider.dimensionId)) - return false; + && !isValidForLowGravity(tRecipe, getBaseMetaTileEntity().getWorld().provider.dimensionId)) return false; GT_Single_Recipe_Check_Processing_Array.Builder tSingleRecipeCheckBuilder = null; 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_Processing_Array.processingArrayBuilder(this) - .setBefore(tInputs, tFluids); + .setBefore(tInputs, tFluids); } boolean recipeLocked = false; @@ -303,9 +300,9 @@ public class GT_MetaTileEntity_ProcessingArray } 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(); + .setRecipe(tRecipe) + .setRecipeAmperage(map.mAmperage) + .build(); recipeLocked = true; } } @@ -335,11 +332,11 @@ public class GT_MetaTileEntity_ProcessingArray this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; ProcessingArrayCalculateOverclock( - aRecipe.mEUt, - aRecipe.mDuration * multiplier, - aAmperage, - GT_Values.V[tTier], - false); + aRecipe.mEUt, + aRecipe.mDuration * multiplier, + aAmperage, + GT_Values.V[tTier], + false); // In case recipe is too OP for that machine if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUPerTick == Long.MAX_VALUE - 1) return false; mEUPerTick = mEUPerTick * parallel; @@ -352,14 +349,14 @@ public class GT_MetaTileEntity_ProcessingArray for (int h = 0; h < aRecipe.mOutputs.length; h++) { if (aRecipe.getOutput(h) != null) { tOut[h] = aRecipe.getOutput(h) - .copy(); + .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(); + .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++) { @@ -378,10 +375,10 @@ public class GT_MetaTileEntity_ProcessingArray } 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); + .filter(Objects::nonNull) + .flatMap(GT_MetaTileEntity_ProcessingArray::splitOversizedStack) + .filter(is -> is.stackSize > 0) + .toArray(ItemStack[]::new); this.mOutputFluids = tFOut; updateSlots(); return true; @@ -463,14 +460,14 @@ public class GT_MetaTileEntity_ProcessingArray } else { inputSeparation = !inputSeparation; GT_Utility.sendChatToPlayer( - aPlayer, - StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + inputSeparation); + aPlayer, + StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + inputSeparation); } } @Override public boolean onWireCutterRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, - float aZ) { + float aZ) { if (aPlayer.isSneaking()) { batchMode = !batchMode; if (batchMode) { @@ -504,15 +501,8 @@ public class GT_MetaTileEntity_ProcessingArray @Override protected List>> getAllowedHatches() { - return ImmutableList.of( - InputHatch, - OutputHatch, - InputBus, - OutputBus, - Muffler, - Maintenance, - Energy, - ExoticEnergy); + return ImmutableList + .of(InputHatch, OutputHatch, InputBus, OutputBus, Muffler, Maintenance, Energy, ExoticEnergy); } @Override @@ -533,78 +523,77 @@ public class GT_MetaTileEntity_ProcessingArray for (GT_MetaTileEntity_Hatch tHatch : mExoticEnergyHatches) { if (isValidMetaTileEntity(tHatch)) { storedEnergy += tHatch.getBaseMetaTileEntity() - .getStoredEU(); + .getStoredEU(); maxEnergy += tHatch.getBaseMetaTileEntity() - .getEUCapacity(); + .getEUCapacity(); } } return new String[] { - StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " - + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(mProgresstime / 20) - + EnumChatFormatting.RESET - + " s / " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(mMaxProgresstime / 20) - + EnumChatFormatting.RESET - + " s", - StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " - + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(storedEnergy) - + EnumChatFormatting.RESET - + " EU / " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(maxEnergy) - + EnumChatFormatting.RESET - + " EU", - StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " - + EnumChatFormatting.RED - + GT_Utility.formatNumbers(-mEUPerTick) - + EnumChatFormatting.RESET - + " EU/t", - StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers( - GT_ExoticEnergyInputHelper.getMaxInputVoltageMulti(getExoticAndNormalEnergyHatchList())) - + EnumChatFormatting.RESET - + " EU/t(*" - + GT_Utility.formatNumbers( - GT_ExoticEnergyInputHelper.getMaxInputAmpsMulti(getExoticAndNormalEnergyHatchList())) - + "A) " - + StatCollector.translateToLocal("GT5U.machines.tier") - + ": " - + EnumChatFormatting.YELLOW - + VN[GT_Utility.getTier( - GT_ExoticEnergyInputHelper.getMaxInputVoltageMulti( - getExoticAndNormalEnergyHatchList()))] - + EnumChatFormatting.RESET, - StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " - + EnumChatFormatting.RED - + (getIdealStatus() - getRepairStatus()) - + EnumChatFormatting.RESET - + " " - + StatCollector.translateToLocal("GT5U.multiblock.efficiency") - + ": " - + EnumChatFormatting.YELLOW - + mEfficiency / 100.0F - + EnumChatFormatting.RESET - + " %", - StatCollector.translateToLocal("GT5U.PA.machinetier") + ": " - + EnumChatFormatting.GREEN - + tTier - + EnumChatFormatting.RESET - + " " - + StatCollector.translateToLocal("GT5U.PA.discount") - + ": " - + EnumChatFormatting.GREEN - + 1 - + EnumChatFormatting.RESET - + " x", - StatCollector.translateToLocal("GT5U.PA.parallel") + ": " - + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers((mInventory[1] != null) ? (mInventory[1].stackSize << mMult) : 0) - + EnumChatFormatting.RESET }; + StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(mProgresstime / 20) + + EnumChatFormatting.RESET + + " s / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(mMaxProgresstime / 20) + + EnumChatFormatting.RESET + + " s", + StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(storedEnergy) + + EnumChatFormatting.RESET + + " EU / " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(maxEnergy) + + EnumChatFormatting.RESET + + " EU", + StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + + EnumChatFormatting.RED + + GT_Utility.formatNumbers(-mEUPerTick) + + EnumChatFormatting.RESET + + " EU/t", + StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers( + GT_ExoticEnergyInputHelper.getMaxInputVoltageMulti(getExoticAndNormalEnergyHatchList())) + + EnumChatFormatting.RESET + + " EU/t(*" + + GT_Utility + .formatNumbers(GT_ExoticEnergyInputHelper.getMaxInputAmpsMulti(getExoticAndNormalEnergyHatchList())) + + "A) " + + StatCollector.translateToLocal("GT5U.machines.tier") + + ": " + + EnumChatFormatting.YELLOW + + VN[GT_Utility + .getTier(GT_ExoticEnergyInputHelper.getMaxInputVoltageMulti(getExoticAndNormalEnergyHatchList()))] + + EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " + + EnumChatFormatting.RED + + (getIdealStatus() - getRepairStatus()) + + EnumChatFormatting.RESET + + " " + + StatCollector.translateToLocal("GT5U.multiblock.efficiency") + + ": " + + EnumChatFormatting.YELLOW + + mEfficiency / 100.0F + + EnumChatFormatting.RESET + + " %", + StatCollector.translateToLocal("GT5U.PA.machinetier") + ": " + + EnumChatFormatting.GREEN + + tTier + + EnumChatFormatting.RESET + + " " + + StatCollector.translateToLocal("GT5U.PA.discount") + + ": " + + EnumChatFormatting.GREEN + + 1 + + EnumChatFormatting.RESET + + " x", + StatCollector.translateToLocal("GT5U.PA.parallel") + ": " + + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers((mInventory[1] != null) ? (mInventory[1].stackSize << mMult) : 0) + + EnumChatFormatting.RESET }; } public List getExoticAndNormalEnergyHatchList() { @@ -627,7 +616,7 @@ public class GT_MetaTileEntity_ProcessingArray } protected void ProcessingArrayCalculateOverclock(long aEUt, int aDuration, int mAmperage, long maxInputVoltage, - boolean perfectOC) { + boolean perfectOC) { byte mTier = (byte) Math.max(0, GT_Utility.getTier(maxInputVoltage)); if (mTier == 0) { // Long time calculation @@ -689,22 +678,22 @@ public class GT_MetaTileEntity_ProcessingArray super.addUIWidgets(builder, buildContext); builder.widget( - new ButtonWidget().setOnClick((clickData, widget) -> downtierUEV = !downtierUEV) - .setPlayClickSound(true) - .setBackground(() -> { - List 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 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 b674560fa5..00b3a1ff10 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 @@ -38,8 +38,8 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Single_Recipe_Check; import gregtech.api.util.GT_Utility; -public class GT_MetaTileEntity_PyrolyseOven extends - GT_MetaTileEntity_EnhancedMultiBlockBase implements ISurvivalConstructable { +public class GT_MetaTileEntity_PyrolyseOven + extends GT_MetaTileEntity_EnhancedMultiBlockBase implements ISurvivalConstructable { private HeatingCoilLevel coilHeat; // public static GT_CopiedBlockTexture mTextureULV = new @@ -50,53 +50,35 @@ public class GT_MetaTileEntity_PyrolyseOven extends private static IStructureDefinition createStructureDefinition() { IStructureElement tCasingElement = NewHorizonsCoreMod.isModLoaded() - ? ofBlockUnlocalizedName(NewHorizonsCoreMod.ID, "gt.blockcasingsNH", 2) - : ofBlock(GregTech_API.sBlockCasings1, 0); + ? ofBlockUnlocalizedName(NewHorizonsCoreMod.ID, "gt.blockcasingsNH", 2) + : ofBlock(GregTech_API.sBlockCasings1, 0); return StructureDefinition.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; @@ -113,52 +95,50 @@ public class GT_MetaTileEntity_PyrolyseOven extends 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"); + .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; } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + 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() }; + .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() }; + .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] }; } @@ -196,22 +176,18 @@ public class GT_MetaTileEntity_PyrolyseOven extends // 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(); + .setBefore(); } - tRecipe = GT_Recipe.GT_Recipe_Map.sPyrolyseRecipes.findRecipe( - getBaseMetaTileEntity(), - false, - gregtech.api.enums.GT_Values.V[tTier], - tFluids, - tInputs); + tRecipe = GT_Recipe.GT_Recipe_Map.sPyrolyseRecipes + .findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs); if (tRecipe == null || !tRecipe.isRecipeInputEqual(true, tFluids, tInputs)) return false; if (mLockedToSingleRecipe) { mSingleRecipeCheck = tSingleRecipeCheckBuilder.setAfter() - .setRecipe(tRecipe) - .build(); + .setRecipe(tRecipe) + .build(); } } @@ -252,8 +228,8 @@ public class GT_MetaTileEntity_PyrolyseOven extends mCasingAmount = 0; replaceDeprecatedCoils(aBaseMetaTileEntity); return checkPiece("main", 2, 3, 0) && mCasingAmount >= 60 - && mMaintenanceHatches.size() == 1 - && !mMufflerHatches.isEmpty(); + && mMaintenanceHatches.size() == 1 + && !mMufflerHatches.isEmpty(); } @Override @@ -295,9 +271,9 @@ public class GT_MetaTileEntity_PyrolyseOven extends for (int xPos = tX - 1; xPos <= tX + 1; xPos++) { 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.getMetaID(xPos, tY, zPos) == 13) { aBaseMetaTileEntity.getWorld() - .setBlock(xPos, tY, zPos, GregTech_API.sBlockCasings5, 1, 3); + .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 e60e999e0c..b8d9b008e2 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 @@ -32,47 +32,30 @@ import gregtech.api.util.GT_Recipe; import gregtech.common.items.GT_IntegratedCircuit_Item; public class GT_MetaTileEntity_TranscendentPlasmaMixer - extends GT_MetaTileEntity_EnhancedMultiBlockBase - implements IGlobalWirelessEnergy, ISurvivalConstructable { + extends GT_MetaTileEntity_EnhancedMultiBlockBase + implements IGlobalWirelessEnergy, ISurvivalConstructable { private static final String[][] structure = new String[][] { - { " CAC ", " ABA ", " ABA ", " A~A ", " ABA ", " ABA ", " CAC " }, - { "CBBBC", "A A", "A A", "A A", "A A", "A A", "CBBBC" }, - { "ABBBA", "B B", "B B", "B B", "B B", "B B", "ABBBA" }, - { "CBBBC", "A A", "A A", "A A", "A A", "A A", "CBBBC" }, - { " CAC ", " ABA ", " ABA ", " ABA ", " ABA ", " ABA ", " CAC " } }; + { " CAC ", " ABA ", " ABA ", " A~A ", " ABA ", " ABA ", " CAC " }, + { "CBBBC", "A A", "A A", "A A", "A A", "A A", "CBBBC" }, + { "ABBBA", "B B", "B B", "B B", "B B", "B B", "ABBBA" }, + { "CBBBC", "A A", "A A", "A A", "A A", "A A", "CBBBC" }, + { " CAC ", " ABA ", " ABA ", " ABA ", " ABA ", " ABA ", " CAC " } }; private static final String STRUCTURE_PIECE_MAIN = "MAIN"; - private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.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 STRUCTURE_DEFINITION = StructureDefinition + .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; @@ -93,19 +76,19 @@ public class GT_MetaTileEntity_TranscendentPlasmaMixer 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"); + .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; } @@ -116,22 +99,21 @@ public class GT_MetaTileEntity_TranscendentPlasmaMixer @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + 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() }; + .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() }; + .addIcon(OVERLAY_DTPF_OFF) + .extFacing() + .build() }; } return new ITexture[] { casingTexturePages[0][DIM_TRANS_CASING] }; @@ -156,12 +138,8 @@ 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; @@ -217,15 +195,15 @@ public class GT_MetaTileEntity_TranscendentPlasmaMixer @Override public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBuildEnvironment env) { return survivialBuildPiece( - STRUCTURE_PIECE_MAIN, - stackSize, - HORIZONTAL_OFFSET, - VERTICAL_OFFSET, - DEPTH_OFFSET, - elementBudget, - env, - false, - true); + STRUCTURE_PIECE_MAIN, + stackSize, + HORIZONTAL_OFFSET, + VERTICAL_OFFSET, + DEPTH_OFFSET, + elementBudget, + env, + false, + true); } @Override 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 eabdd8ee35..520fc01de0 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 @@ -23,7 +23,7 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; public class GT_MetaTileEntity_VacuumFreezer - extends GT_MetaTileEntity_CubicMultiBlockBase { + extends GT_MetaTileEntity_CubicMultiBlockBase { public GT_MetaTileEntity_VacuumFreezer(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -42,49 +42,47 @@ public class GT_MetaTileEntity_VacuumFreezer 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"); + .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; } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + boolean aActive, boolean aRedstone) { 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() }; + .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() }; + .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] }; @@ -109,12 +107,8 @@ public class GT_MetaTileEntity_VacuumFreezer long tVoltage = getMaxInputVoltage(); byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - GT_Recipe tRecipe = getRecipeMap().findRecipe( - getBaseMetaTileEntity(), - false, - gregtech.api.enums.GT_Values.V[tTier], - tFluidList, - tInputList); + GT_Recipe tRecipe = getRecipeMap() + .findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluidList, tInputList); if (tRecipe != null) { if (tRecipe.isRecipeInputEqual(true, tFluidList, tInputList)) { this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); 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 4114ee5564..66e9333961 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 @@ -34,7 +34,7 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.common.tileentities.machines.multiblock.logic.CokeOvenProcessingLogic; public class MultiBlock_CokeOven extends MultiBlockController - implements PollutionLogicHost, ProcessingLogicHost { + implements PollutionLogicHost, ProcessingLogicHost { private static IStructureDefinition STRUCTURE_DEFINITION = null; private static final Vec3Impl OFFSET = new Vec3Impl(1, 1, 0); @@ -79,11 +79,11 @@ public class MultiBlock_CokeOven extends MultiBlockController getStructureDefinition() { if (STRUCTURE_DEFINITION == null) { STRUCTURE_DEFINITION = StructureDefinition.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(); + .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; } @@ -120,11 +113,11 @@ public class MultiBlock_CokeOven extends MultiBlockController titleLines = fontRenderer.listFormattedStringToWidth( - title, - getGUIWidth() - (TAB_PADDING + TITLE_PADDING) * 2); + final List titleLines = fontRenderer + .listFormattedStringToWidth(title, getGUIWidth() - (TAB_PADDING + TITLE_PADDING) * 2); titleWidth = titleLines.size() > 1 ? getGUIWidth() - (TAB_PADDING + TITLE_PADDING) * 2 - : fontRenderer.getStringWidth(title); + : fontRenderer.getStringWidth(title); // noinspection PointlessArithmeticExpression titleHeight = titleLines.size() * fontRenderer.FONT_HEIGHT + (titleLines.size() - 1); } 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); + .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); + .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); + .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 acd611ab12..c2bf782d40 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,67 +50,30 @@ public class MultiBlock_Macerator extends MultiBlock_Stackable getStructureDefinition() { if (STRUCTURE_DEFINITION == null) { STRUCTURE_DEFINITION = StructureDefinition.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; } @@ -134,19 +97,19 @@ public class MultiBlock_Macerator extends MultiBlock_Stackable 1 && aBaseMetaTileEntity.getCoverIDAtSide(mainFacing) == 0 - && !aBaseMetaTileEntity.getOpacityAtSide(mainFacing)) { + && !aBaseMetaTileEntity.getOpacityAtSide(mainFacing)) { final double oX = aBaseMetaTileEntity.getXCoord(); final double oY = aBaseMetaTileEntity.getYCoord(); @@ -182,11 +179,10 @@ 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()); + .setPosition(x, y, z) + .setWorld(getBaseMetaTileEntity().getWorld()); particleEventBuilder.setIdentifier(ParticleFX.LAVA) - .run(); + .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 22292c814b..75aaf48078 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,77 +58,74 @@ 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() }; } /** @@ -146,7 +143,7 @@ public class GT_MetaTileEntity_ForgeHammer_Steel extends GT_MetaTileEntity_Basic final byte mainFacing = (byte) this.mMainFacing; if (mainFacing > 1 && aBaseMetaTileEntity.getCoverIDAtSide(mainFacing) == 0 - && !aBaseMetaTileEntity.getOpacityAtSide(mainFacing)) { + && !aBaseMetaTileEntity.getOpacityAtSide(mainFacing)) { final double oX = aBaseMetaTileEntity.getXCoord(); final double oY = aBaseMetaTileEntity.getYCoord(); @@ -182,11 +179,10 @@ 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()); + .setPosition(x, y, z) + .setWorld(getBaseMetaTileEntity().getWorld()); particleEventBuilder.setIdentifier(ParticleFX.LAVA) - .run(); + .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 deb0d6c2d8..088292548a 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 @@ -55,9 +55,9 @@ public class GT_MetaTileEntity_Furnace_Bronze extends GT_MetaTileEntity_BasicMac @Override protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, - ItemStack aStack) { + ItemStack aStack) { return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) - && GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64L, aStack), false, null) != null; + && GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64L, aStack), false, null) != null; } @Override @@ -75,79 +75,75 @@ 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 public ITexture[] getBottomFacingInactive(byte aColor) { 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.of( + 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_Furnace_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java index 285e85943f..49663fd852 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 @@ -55,9 +55,9 @@ public class GT_MetaTileEntity_Furnace_Steel extends GT_MetaTileEntity_BasicMach @Override protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, - ItemStack aStack) { + ItemStack aStack) { return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) - && GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64L, aStack), false, null) != null; + && GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(64L, aStack), false, null) != null; } @Override @@ -75,78 +75,73 @@ 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 936b75bc8c..7481b8716a 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 @@ -47,20 +47,17 @@ public class GT_MetaTileEntity_Macerator_Bronze extends GT_MetaTileEntity_BasicM final byte topFacing = (byte) ForgeDirection.UP.ordinal(); if (aBaseMetaTileEntity.getFrontFacing() != topFacing - && aBaseMetaTileEntity.getCoverIDAtSide(topFacing) == 0 - && !aBaseMetaTileEntity.getOpacityAtSide(topFacing)) { + && 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(); + .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(); } } } @@ -72,14 +69,8 @@ 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)) { @@ -96,9 +87,9 @@ public class GT_MetaTileEntity_Macerator_Bronze extends GT_MetaTileEntity_BasicM @Override protected boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, - ItemStack aStack) { + ItemStack aStack) { return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) - && GT_Recipe_Map.sMaceratorRecipes.containsInput(GT_Utility.copyAmount(64L, aStack)); + && GT_Recipe_Map.sMaceratorRecipes.containsInput(GT_Utility.copyAmount(64L, aStack)); } @Override @@ -116,79 +107,73 @@ 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 64b44a5510..fb270fc95f 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 @@ -47,20 +47,17 @@ public class GT_MetaTileEntity_Macerator_Steel extends GT_MetaTileEntity_BasicMa final byte topFacing = (byte) ForgeDirection.UP.ordinal(); if (aBaseMetaTileEntity.getFrontFacing() != topFacing - && aBaseMetaTileEntity.getCoverIDAtSide(topFacing) == 0 - && !aBaseMetaTileEntity.getOpacityAtSide(topFacing)) { + && aBaseMetaTileEntity.getCoverIDAtSide(topFacing) == 0 + && !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(); } } } @@ -72,14 +69,8 @@ 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)) { @@ -96,9 +87,9 @@ public class GT_MetaTileEntity_Macerator_Steel extends GT_MetaTileEntity_BasicMa @Override public boolean allowPutStackValidated(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, - ItemStack aStack) { + ItemStack aStack) { return super.allowPutStackValidated(aBaseMetaTileEntity, aIndex, aSide, aStack) - && GT_Recipe_Map.sMaceratorRecipes.containsInput(GT_Utility.copyAmount(64L, aStack)); + && GT_Recipe_Map.sMaceratorRecipes.containsInput(GT_Utility.copyAmount(64L, aStack)); } @Override @@ -116,79 +107,73 @@ 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 23bf3d7c46..c9a3ad7650 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 @@ -41,7 +41,7 @@ import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEntity_TieredMachineBlock - implements appeng.api.storage.IMEMonitor, IAddUIWidgets { + implements appeng.api.storage.IMEMonitor, IAddUIWidgets { protected boolean mVoidOverflow = false; protected boolean mDisableFilter; @@ -49,14 +49,13 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti public GT_MetaTileEntity_DigitalChestBase(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 3, - new String[] { "This Chest stores " + GT_Utility.formatNumbers(commonSizeCompute(aTier)) + " Blocks", - "Use a screwdriver to enable", "voiding items on overflow", - "Will keep its contents when harvested", }); + aID, + aName, + aNameRegional, + aTier, + 3, + new String[] { "This Chest stores " + GT_Utility.formatNumbers(commonSizeCompute(aTier)) + " Blocks", + "Use a screwdriver to enable", "voiding items on overflow", "Will keep its contents when harvested", }); } protected static int commonSizeCompute(int tier) { @@ -80,53 +79,53 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti } public GT_MetaTileEntity_DigitalChestBase(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, 3, aDescription, aTextures); } @Override public void addAdditionalTooltipInformation(ItemStack stack, List tooltip) { if (stack.hasTagCompound() && stack.stackTagCompound.hasKey("mItemStack")) { - final ItemStack tContents = ItemStack.loadItemStackFromNBT( - stack.stackTagCompound.getCompoundTag("mItemStack")); + final ItemStack tContents = ItemStack + .loadItemStackFromNBT(stack.stackTagCompound.getCompoundTag("mItemStack")); final int tSize = stack.stackTagCompound.getInteger("mItemCount"); if (tContents != null && tSize > 0) { tooltip.add( - GT_LanguageManager.addStringLocalization( - "TileEntity_CHEST_INFO", - "Contains Item: ", - !GregTech_API.sPostloadFinished) + EnumChatFormatting.YELLOW - + tContents.getDisplayName() - + EnumChatFormatting.GRAY); + GT_LanguageManager.addStringLocalization( + "TileEntity_CHEST_INFO", + "Contains Item: ", + !GregTech_API.sPostloadFinished) + EnumChatFormatting.YELLOW + + tContents.getDisplayName() + + EnumChatFormatting.GRAY); tooltip.add( - GT_LanguageManager.addStringLocalization( - "TileEntity_CHEST_AMOUNT", - "Item Amount: ", - !GregTech_API.sPostloadFinished) + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(tSize) - + EnumChatFormatting.GRAY); + GT_LanguageManager.addStringLocalization( + "TileEntity_CHEST_AMOUNT", + "Item Amount: ", + !GregTech_API.sPostloadFinished) + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(tSize) + + EnumChatFormatting.GRAY); } } } public static void registerAEIntegration() { appeng.api.AEApi.instance() - .registries() - .externalStorage() - .addExternalStorageInterface(new AE2DigitalChestHandler()); + .registries() + .externalStorage() + .addExternalStorageInterface(new AE2DigitalChestHandler()); } @Override public void addListener( - appeng.api.storage.IMEMonitorHandlerReceiver imeMonitorHandlerReceiver, - Object o) { + appeng.api.storage.IMEMonitorHandlerReceiver imeMonitorHandlerReceiver, + Object o) { if (listeners == null) listeners = new HashMap<>(); listeners.put(imeMonitorHandlerReceiver, o); } @Override public void removeListener( - appeng.api.storage.IMEMonitorHandlerReceiver imeMonitorHandlerReceiver) { + appeng.api.storage.IMEMonitorHandlerReceiver imeMonitorHandlerReceiver) { if (listeners == null) listeners = new HashMap<>(); listeners.remove(imeMonitorHandlerReceiver); } @@ -171,7 +170,7 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti @Override public appeng.api.storage.data.IItemList getAvailableItems( - final appeng.api.storage.data.IItemList out) { + final appeng.api.storage.data.IItemList out) { ItemStack storedStack = getItemStack(); if (storedStack != null) { appeng.util.item.AEItemStack s = appeng.util.item.AEItemStack.create(storedStack); @@ -210,7 +209,7 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti @Override public appeng.api.storage.data.IAEItemStack injectItems(final appeng.api.storage.data.IAEItemStack input, - final appeng.api.config.Actionable mode, final appeng.api.networking.security.BaseActionSource src) { + final appeng.api.config.Actionable mode, final appeng.api.networking.security.BaseActionSource src) { final ItemStack inputStack = input.getItemStack(); if (inputStack == null) return null; if (getBaseMetaTileEntity() == null) return input; @@ -246,7 +245,7 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti @Override public appeng.api.storage.data.IAEItemStack extractItems(final appeng.api.storage.data.IAEItemStack request, - final appeng.api.config.Actionable mode, final appeng.api.networking.security.BaseActionSource src) { + final appeng.api.config.Actionable mode, final appeng.api.networking.security.BaseActionSource src) { if (request.isSameType(getItemStack())) { if (getBaseMetaTileEntity() == null) return null; if (mode != appeng.api.config.Actionable.SIMULATE) getBaseMetaTileEntity().markDirty(); @@ -273,22 +272,22 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti public final void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { mVoidOverflow = !mVoidOverflow; GT_Utility.sendChatToPlayer( - aPlayer, - StatCollector.translateToLocal( - mVoidOverflow ? "GT5U.machines.digitalchest.voidoverflow.enabled" - : "GT5U.machines.digitalchest.voidoverflow.disabled")); + aPlayer, + StatCollector.translateToLocal( + mVoidOverflow ? "GT5U.machines.digitalchest.voidoverflow.enabled" + : "GT5U.machines.digitalchest.voidoverflow.disabled")); } @Override public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, - float aZ) { + float aZ) { if (super.onSolderingToolRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ)) return true; mDisableFilter = !mDisableFilter; GT_Utility.sendChatToPlayer( - aPlayer, - StatCollector.translateToLocal( - mDisableFilter ? "GT5U.machines.digitalchest.inputfilter.disabled" - : "GT5U.machines.digitalchest.inputfilter.enabled")); + aPlayer, + StatCollector.translateToLocal( + mDisableFilter ? "GT5U.machines.digitalchest.inputfilter.disabled" + : "GT5U.machines.digitalchest.inputfilter.enabled")); return true; } @@ -308,7 +307,7 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti int savedCount = count; if ((mInventory[0] != null) && ((count < getMaxItemCount()) || mVoidOverflow) - && GT_Utility.areStacksEqual(mInventory[0], stack)) { + && GT_Utility.areStacksEqual(mInventory[0], stack)) { count += mInventory[0].stackSize; if (count <= getMaxItemCount()) { mInventory[0] = null; @@ -326,11 +325,11 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti mInventory[1].stackSize = Math.min(stack.getMaxStackSize(), count); count -= mInventory[1].stackSize; } else if ((count > 0) && GT_Utility.areStacksEqual(mInventory[1], stack) - && mInventory[1].getMaxStackSize() > mInventory[1].stackSize) { - int tmp = Math.min(count, mInventory[1].getMaxStackSize() - mInventory[1].stackSize); - mInventory[1].stackSize += tmp; - count -= tmp; - } + && mInventory[1].getMaxStackSize() > mInventory[1].stackSize) { + int tmp = Math.min(count, mInventory[1].getMaxStackSize() - mInventory[1].stackSize); + mInventory[1].stackSize += tmp; + count -= tmp; + } setItemCount(count); if (stack != null) { mInventory[2] = stack.copy(); @@ -373,7 +372,7 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti @Override public int getProgresstime() { return getItemCount() + (mInventory[0] == null ? 0 : mInventory[0].stackSize) - + (mInventory[1] == null ? 0 : mInventory[1].stackSize); + + (mInventory[1] == null ? 0 : mInventory[1].stackSize); } @Override @@ -391,22 +390,22 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti if (getItemStack() == null) { return new String[] { EnumChatFormatting.BLUE + chestName() + EnumChatFormatting.RESET, "Stored Items:", - EnumChatFormatting.GOLD + "No Items" + EnumChatFormatting.RESET, - EnumChatFormatting.GREEN + "0" - + EnumChatFormatting.RESET - + " " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(getMaxItemCount()) - + EnumChatFormatting.RESET }; + EnumChatFormatting.GOLD + "No Items" + EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + "0" + + EnumChatFormatting.RESET + + " " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(getMaxItemCount()) + + EnumChatFormatting.RESET }; } return new String[] { EnumChatFormatting.BLUE + chestName() + EnumChatFormatting.RESET, "Stored Items:", - EnumChatFormatting.GOLD + getItemStack().getDisplayName() + EnumChatFormatting.RESET, - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(getItemCount()) - + EnumChatFormatting.RESET - + " " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(getMaxItemCount()) - + EnumChatFormatting.RESET }; + EnumChatFormatting.GOLD + getItemStack().getDisplayName() + EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(getItemCount()) + + EnumChatFormatting.RESET + + " " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(getMaxItemCount()) + + EnumChatFormatting.RESET }; } @Override @@ -434,7 +433,8 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti private boolean hasActiveMEConnection() { if (listeners == null || listeners.isEmpty()) return false; - for (Map.Entry, Object> e : listeners.entrySet()) { + for (Map.Entry, 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; @@ -480,25 +480,25 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + 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 public void getWailaBody(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, - IWailaConfigHandler config) { + IWailaConfigHandler config) { super.getWailaBody(itemStack, currenttip, accessor, config); NBTTagCompound tag = accessor.getNBTData(); 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"); } @@ -506,7 +506,7 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti @Override public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, - int z) { + int z) { super.getWailaNBTData(player, tile, tag, world, x, y, z); ItemStack is = getItemStack(); if (GT_Utility.isStackInvalid(is)) return; @@ -525,36 +525,33 @@ 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 1bf8705279..14f1501527 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 @@ -46,7 +46,7 @@ import gregtech.api.util.GT_Utility; import gregtech.common.gui.modularui.widget.FluidDisplaySlotWidget; public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntity_BasicTank - implements IFluidLockable, IAddUIWidgets { + implements IFluidLockable, IAddUIWidgets { public boolean mOutputFluid = false, mVoidFluidPart = false, mVoidFluidFull = false, mLockFluid = false; protected String lockedFluidName = null; @@ -54,16 +54,16 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit public GT_MetaTileEntity_DigitalTankBase(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 3, - new String[] { - StatCollector.translateToLocalFormatted( - "GT5U.machines.digitaltank.tooltip", - GT_Utility.formatNumbers(commonSizeCompute(aTier))), - StatCollector.translateToLocal("GT5U.machines.digitaltank.tooltip1"), }); + aID, + aName, + aNameRegional, + aTier, + 3, + new String[] { + StatCollector.translateToLocalFormatted( + "GT5U.machines.digitaltank.tooltip", + GT_Utility.formatNumbers(commonSizeCompute(aTier))), + StatCollector.translateToLocal("GT5U.machines.digitaltank.tooltip1"), }); } protected static int commonSizeCompute(int tier) { @@ -114,24 +114,24 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit @Override public void addAdditionalTooltipInformation(ItemStack stack, List tooltip) { if (stack.hasTagCompound() && stack.stackTagCompound.hasKey("mFluid")) { - final FluidStack tContents = FluidStack.loadFluidStackFromNBT( - stack.stackTagCompound.getCompoundTag("mFluid")); + final FluidStack tContents = FluidStack + .loadFluidStackFromNBT(stack.stackTagCompound.getCompoundTag("mFluid")); if (tContents != null && tContents.amount > 0) { tooltip.add( - GT_LanguageManager.addStringLocalization( - "TileEntity_TANK_INFO", - "Contains Fluid: ", - !GregTech_API.sPostloadFinished) + EnumChatFormatting.YELLOW - + tContents.getLocalizedName() - + EnumChatFormatting.GRAY); + GT_LanguageManager.addStringLocalization( + "TileEntity_TANK_INFO", + "Contains Fluid: ", + !GregTech_API.sPostloadFinished) + EnumChatFormatting.YELLOW + + tContents.getLocalizedName() + + EnumChatFormatting.GRAY); tooltip.add( - GT_LanguageManager.addStringLocalization( - "TileEntity_TANK_AMOUNT", - "Fluid Amount: ", - !GregTech_API.sPostloadFinished) + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers(tContents.amount) - + " L" - + EnumChatFormatting.GRAY); + GT_LanguageManager.addStringLocalization( + "TileEntity_TANK_AMOUNT", + "Fluid Amount: ", + !GregTech_API.sPostloadFinished) + EnumChatFormatting.GREEN + + GT_Utility.formatNumbers(tContents.amount) + + " L" + + EnumChatFormatting.GRAY); } } } @@ -178,9 +178,9 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit @Override public boolean isFluidInputAllowed(FluidStack aFluid) { return !mLockFluid || lockedFluidName == null - || lockedFluidName.equals( - aFluid.getFluid() - .getName()); + || lockedFluidName.equals( + aFluid.getFluid() + .getName()); } @Override @@ -192,7 +192,7 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit public void onEmptyingContainerWhenEmpty() { if (this.lockedFluidName == null && this.mFluid != null) { this.lockedFluidName = this.mFluid.getFluid() - .getName(); + .getName(); } } @@ -269,17 +269,17 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + boolean aActive, boolean aRedstone) { if (aSide != ForgeDirection.UP.ordinal()) { if (aSide == aBaseMetaTileEntity.getFrontFacing()) { return new ITexture[] { MACHINE_CASINGS[mTier][aColorIndex + 1], TextureFactory.of(OVERLAY_PIPE) }; } 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 @@ -293,8 +293,8 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit if (aSide == getBaseMetaTileEntity().getFrontFacing()) { mAllowInputFromOutputSide = !mAllowInputFromOutputSide; GT_Utility.sendChatToPlayer( - aPlayer, - mAllowInputFromOutputSide ? GT_Utility.getTrans("095") : GT_Utility.getTrans("096")); + aPlayer, + mAllowInputFromOutputSide ? GT_Utility.getTrans("095") : GT_Utility.getTrans("096")); } } @@ -338,9 +338,9 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit if ((tFluid.amount <= getRealCapacity()) || mVoidFluidPart) { tFluid = tFluid.copy(); if (aBaseMetaTileEntity.addStackToSlot( - getOutputSlot(), - GT_Utility.getContainerForFilledItem(mInventory[getInputSlot()], true), - 1)) { + getOutputSlot(), + GT_Utility.getContainerForFilledItem(mInventory[getInputSlot()], true), + 1)) { setFillableStack(tFluid); this.onEmptyingContainerWhenEmpty(); aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); @@ -350,15 +350,14 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit } else { if (tFluid.isFluidEqual(getFillableStack())) { if ((((long) tFluid.amount + getFillableStack().amount) <= (long) getRealCapacity()) - || mVoidFluidPart - || mVoidFluidFull) { + || mVoidFluidPart + || mVoidFluidFull) { if (aBaseMetaTileEntity.addStackToSlot( - getOutputSlot(), - GT_Utility.getContainerForFilledItem(mInventory[getInputSlot()], true), - 1)) { - getFillableStack().amount += Math.min( - tFluid.amount, - getRealCapacity() - getFillableStack().amount); + getOutputSlot(), + GT_Utility.getContainerForFilledItem(mInventory[getInputSlot()], true), + 1)) { + getFillableStack().amount += Math + .min(tFluid.amount, getRealCapacity() - getFillableStack().amount); aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); } } @@ -368,11 +367,8 @@ 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); @@ -386,9 +382,7 @@ 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)) - return 0; + .getID() <= 0 || aFluid.amount <= 0 || !canTankBeFilled() || !isFluidInputAllowed(aFluid)) return 0; if (getFillableStack() != null && !getFillableStack().isFluidEqual(aFluid)) { return 0; } @@ -417,14 +411,12 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit if (tTank != null) { FluidStack tDrained = drain(20 * (1 << (3 + 2 * tierPump(mTier))), false); if (tDrained != null) { - int tFilledAmount = tTank.fill( - ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), - tDrained, - false); + int tFilledAmount = tTank + .fill(ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), tDrained, false); if (tFilledAmount > 0) tTank.fill( - ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), - drain(tFilledAmount, true), - true); + ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()), + drain(tFilledAmount, true), + true); } } } @@ -492,16 +484,15 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit @Override public void getWailaBody(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, - IWailaConfigHandler config) { + IWailaConfigHandler config) { super.getWailaBody(itemStack, currenttip, accessor, config); NBTTagCompound tag = accessor.getNBTData(); 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"); } @@ -509,7 +500,7 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit @Override public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, - int z) { + int z) { super.getWailaNBTData(player, tile, tag, world, x, y, z); FluidStack fluid = getFluid(); if (fluid != null) tag.setTag("mFluid", fluid.writeToNBT(new NBTTagCompound())); @@ -524,161 +515,142 @@ 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/tileentities/storage/GT_MetaTileEntity_Locker.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java index 3d81076bc9..32d1694cc8 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java @@ -58,10 +58,10 @@ public class GT_MetaTileEntity_Locker extends GT_MetaTileEntity_TieredMachineBlo @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, - boolean aActive, boolean aRedstone) { + boolean aActive, boolean aRedstone) { if (aSide == aFacing) { return new ITexture[] { this.mTextures[2][(aColorIndex + 1)][0], this.mTextures[2][(aColorIndex + 1)][1], - LOCKERS[Math.abs(this.mType % LOCKERS.length)] }; + LOCKERS[Math.abs(this.mType % LOCKERS.length)] }; } return this.mTextures[0][(aColorIndex + 1)]; } @@ -177,7 +177,7 @@ public class GT_MetaTileEntity_Locker extends GT_MetaTileEntity_TieredMachineBlo @Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, - float aY, float aZ) { + float aY, float aZ) { if ((aBaseMetaTileEntity.isServerSide()) && (aSide == aBaseMetaTileEntity.getFrontFacing())) { for (int i = 0; i < 4; i++) { ItemStack tSwapStack = this.mInventory[i]; diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java index d6a936c745..4d51d0b634 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java @@ -31,25 +31,25 @@ public class GT_MetaTileEntity_QuantumTank extends GT_MetaTileEntity_DigitalTank if (mFluid == null) { return new String[] { EnumChatFormatting.BLUE + "Quantum Tank" + EnumChatFormatting.RESET, "Stored Fluid:", - EnumChatFormatting.GOLD + "No Fluid" + EnumChatFormatting.RESET, - EnumChatFormatting.GREEN + Integer.toString(0) - + " L" - + EnumChatFormatting.RESET - + " " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(getCapacity()) - + " L" - + EnumChatFormatting.RESET }; + EnumChatFormatting.GOLD + "No Fluid" + EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + Integer.toString(0) + + " L" + + EnumChatFormatting.RESET + + " " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(getCapacity()) + + " L" + + EnumChatFormatting.RESET }; } return new String[] { EnumChatFormatting.BLUE + "Quantum Tank" + EnumChatFormatting.RESET, "Stored Fluid:", - EnumChatFormatting.GOLD + mFluid.getLocalizedName() + EnumChatFormatting.RESET, - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mFluid.amount) - + " L" - + EnumChatFormatting.RESET - + " " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(getCapacity()) - + " L" - + EnumChatFormatting.RESET }; + EnumChatFormatting.GOLD + mFluid.getLocalizedName() + EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mFluid.amount) + + " L" + + EnumChatFormatting.RESET + + " " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(getCapacity()) + + " L" + + EnumChatFormatting.RESET }; } } diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperTank.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperTank.java index 5dac66e49a..4493d57bd3 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperTank.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_SuperTank.java @@ -31,24 +31,24 @@ public class GT_MetaTileEntity_SuperTank extends GT_MetaTileEntity_DigitalTankBa if (mFluid == null) { return new String[] { EnumChatFormatting.BLUE + "Super Tank" + EnumChatFormatting.RESET, "Stored Fluid:", - EnumChatFormatting.GOLD + "No Fluid" + EnumChatFormatting.RESET, - EnumChatFormatting.GREEN + "0 L" - + EnumChatFormatting.RESET - + " " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(getCapacity()) - + " L" - + EnumChatFormatting.RESET }; + EnumChatFormatting.GOLD + "No Fluid" + EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + "0 L" + + EnumChatFormatting.RESET + + " " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(getCapacity()) + + " L" + + EnumChatFormatting.RESET }; } return new String[] { EnumChatFormatting.BLUE + "Super Tank" + EnumChatFormatting.RESET, "Stored Fluid:", - EnumChatFormatting.GOLD + mFluid.getLocalizedName() + EnumChatFormatting.RESET, - EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mFluid.amount) - + " L" - + EnumChatFormatting.RESET - + " " - + EnumChatFormatting.YELLOW - + GT_Utility.formatNumbers(getCapacity()) - + " L" - + EnumChatFormatting.RESET }; + EnumChatFormatting.GOLD + mFluid.getLocalizedName() + EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mFluid.amount) + + " L" + + EnumChatFormatting.RESET + + " " + + EnumChatFormatting.YELLOW + + GT_Utility.formatNumbers(getCapacity()) + + " L" + + EnumChatFormatting.RESET }; } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool.java b/src/main/java/gregtech/common/tools/GT_Tool.java index 178005c6c5..ac3fe66542 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool.java +++ b/src/main/java/gregtech/common/tools/GT_Tool.java @@ -130,19 +130,19 @@ public abstract class GT_Tool implements IToolStats { @Override public DamageSource getDamageSource(EntityLivingBase aPlayer, Entity aEntity) { return GT_DamageSources.getCombatDamage( - (aPlayer instanceof EntityPlayer) ? "player" : "mob", - aPlayer, - (aEntity instanceof EntityLivingBase) ? getDeathMessage(aPlayer, (EntityLivingBase) aEntity) : null); + (aPlayer instanceof EntityPlayer) ? "player" : "mob", + aPlayer, + (aEntity instanceof EntityLivingBase) ? getDeathMessage(aPlayer, (EntityLivingBase) aEntity) : null); } 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 public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, - int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { return 0; } @@ -173,19 +173,19 @@ public abstract class GT_Tool implements IToolStats { @Override public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, - EntityPlayer aPlayer) { + EntityPlayer aPlayer) { return aOriginalDamage; } @Override public float getMagicDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, - EntityPlayer aPlayer) { + EntityPlayer aPlayer) { return aOriginalDamage; } @Override public float getMiningSpeed(Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World worldObj, - int aX, int aY, int aZ) { + int aX, int aY, int aZ) { return aDefault; } } 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 bb5649a453..787803911b 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Axe.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Axe.java @@ -94,19 +94,19 @@ public class GT_Tool_Axe extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "axe") - || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, Material.wood); + || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, Material.wood); } @Override public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, - int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { int rAmount = 0; if ((GregTech_API.sTimber) && (!aPlayer.isSneaking()) - && (OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData)))) { + && (OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData)))) { int tY = aY + 1; for (int tH = aPlayer.worldObj.getHeight(); tY < tH; tY++) { if ((aPlayer.worldObj.getBlock(aX, tY, aZ) != aBlock) - || (!aPlayer.worldObj.func_147480_a(aX, tY, aZ, true))) { + || (!aPlayer.worldObj.func_147480_a(aX, tY, aZ, true))) { break; } rAmount++; @@ -117,15 +117,15 @@ public class GT_Tool_Axe extends GT_Tool { @Override public float getMiningSpeed(Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World aWorld, - int aX, int aY, int aZ) { + int aX, int aY, int aZ) { if (aBlock.isWood(aPlayer.worldObj, aX, aY, aZ) - && OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData))) { + && OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData))) { float rAmount = 1.0F; float tIncrement = 1.0F; if ((GregTech_API.sTimber) && !aPlayer.isSneaking()) { int tY = aY + 1; for (int tH = aPlayer.worldObj.getHeight(); (tY < tH) - && (aPlayer.worldObj.getBlock(aX, tY, aZ) == aBlock); tY++) { + && (aPlayer.worldObj.getBlock(aX, tY, aZ) == aBlock); tY++) { tIncrement += 0.1F; rAmount += tIncrement; } @@ -133,8 +133,8 @@ public class GT_Tool_Axe extends GT_Tool { return 2.0F * aDefault / rAmount; } return (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) - || (aBlock.getMaterial() == Material.plants) - || (aBlock.getMaterial() == Material.gourd) ? aDefault / 4.0F : aDefault; + || (aBlock.getMaterial() == Material.plants) + || (aBlock.getMaterial() == Material.gourd) ? aDefault / 4.0F : aDefault; } @Override @@ -145,16 +145,14 @@ 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 public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override @@ -163,11 +161,11 @@ public class GT_Tool_Axe extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.RED + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE - + " has been chopped by " - + EnumChatFormatting.GREEN - + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE); + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " has been chopped by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } 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 833f169e61..a8b83a0221 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java @@ -45,14 +45,14 @@ public class GT_Tool_BranchCutter extends GT_Tool { @Override public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, - int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + 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)); + 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)) { @@ -74,7 +74,7 @@ public class GT_Tool_BranchCutter extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "grafter") - || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, Material.leaves); + || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, Material.leaves); } @Override @@ -85,17 +85,17 @@ public class GT_Tool_BranchCutter extends GT_Tool { @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.RED + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE - + " has been trimmed by " - + EnumChatFormatting.GREEN - + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE); + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " has been trimmed by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_ButcheryKnife.java b/src/main/java/gregtech/common/tools/GT_Tool_ButcheryKnife.java index a99dac9e57..bdfe66401a 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_ButcheryKnife.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_ButcheryKnife.java @@ -83,18 +83,18 @@ public class GT_Tool_ButcheryKnife extends GT_Tool { @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE - + " has butchered " - + EnumChatFormatting.RED - + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE); + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE + + " has butchered " + + EnumChatFormatting.RED + + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE); } @Override diff --git a/src/main/java/gregtech/common/tools/GT_Tool_BuzzSaw.java b/src/main/java/gregtech/common/tools/GT_Tool_BuzzSaw.java index b12b8d37ea..4d7192ce93 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_BuzzSaw.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_BuzzSaw.java @@ -57,25 +57,25 @@ public class GT_Tool_BuzzSaw extends GT_Tool_Saw { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return !aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadBuzzSaw.mTextureIndex] - : Textures.ItemIcons.HANDLE_BUZZSAW; + ? GT_MetaGenerated_Tool.getPrimaryMaterial( + aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadBuzzSaw.mTextureIndex] + : Textures.ItemIcons.HANDLE_BUZZSAW; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.RED + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE - + " got buzzed by " - + EnumChatFormatting.GREEN - + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE); + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " got buzzed by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_HV.java b/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_HV.java index 1895eff282..38c1d3acb8 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_HV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_HV.java @@ -50,8 +50,8 @@ public class GT_Tool_Chainsaw_HV extends GT_Tool_Chainsaw_LV { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead - ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadChainsaw.mTextureIndex] - : Textures.ItemIcons.POWER_UNIT_HV; + ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial( + aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadChainsaw.mTextureIndex] + : Textures.ItemIcons.POWER_UNIT_HV; } } 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 56f623f771..a99d54993a 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 @@ -107,34 +107,29 @@ public class GT_Tool_Chainsaw_LV extends GT_Tool_Saw { @Override public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, - int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { int rAmount = 0; 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 tDrops = ((IShearable) aBlock).onSheared( - aStack, - aPlayer.worldObj, - aX, - aY, - aZ, - aFortune); + ArrayList tDrops = ((IShearable) aBlock) + .onSheared(aStack, aPlayer.worldObj, aX, aY, aZ, aFortune); aDrops.clear(); } aPlayer.worldObj.setBlock(aX, aY, aZ, Blocks.air, 0, 0); } else if (((aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce)) - && (aDrops.isEmpty())) { - aDrops.add(new ItemStack(aBlock, 1, aMetaData)); - aPlayer.worldObj.setBlockToAir(aX, aY, aZ); - aEvent.dropChance = 1.0F; - return 1; - } + && (aDrops.isEmpty())) { + aDrops.add(new ItemStack(aBlock, 1, aMetaData)); + aPlayer.worldObj.setBlockToAir(aX, aY, aZ); + aEvent.dropChance = 1.0F; + return 1; + } if ((GregTech_API.sTimber) && (!aPlayer.isSneaking()) - && (OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData)))) { + && (OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData)))) { int tY = aY + 1; for (int tH = aPlayer.worldObj.getHeight(); tY < tH; tY++) { if ((aPlayer.worldObj.getBlock(aX, tY, aZ) != aBlock) - || (!aPlayer.worldObj.func_147480_a(aX, tY, aZ, true))) { + || (!aPlayer.worldObj.func_147480_a(aX, tY, aZ, true))) { break; } rAmount++; @@ -145,15 +140,15 @@ public class GT_Tool_Chainsaw_LV extends GT_Tool_Saw { @Override public float getMiningSpeed(Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World aWorld, - int aX, int aY, int aZ) { + int aX, int aY, int aZ) { if (aBlock.isWood(aPlayer.worldObj, aX, aY, aZ) - && OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData))) { + && OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData))) { float rAmount = 1.0F; float tIncrement = 1.0F; if ((GregTech_API.sTimber) && !aPlayer.isSneaking()) { int tY = aY + 1; for (int tH = aPlayer.worldObj.getHeight(); (tY < tH) - && (aPlayer.worldObj.getBlock(aX, tY, aZ) == aBlock); tY++) { + && (aPlayer.worldObj.getBlock(aX, tY, aZ) == aBlock); tY++) { tIncrement += 0.1F; rAmount += tIncrement; } @@ -161,32 +156,32 @@ public class GT_Tool_Chainsaw_LV extends GT_Tool_Saw { return 2.0F * aDefault / rAmount; } return (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) - || (aBlock.getMaterial() == Material.plants) - || (aBlock.getMaterial() == Material.gourd) ? aDefault / 4.0F : aDefault; + || (aBlock.getMaterial() == Material.plants) + || (aBlock.getMaterial() == Material.gourd) ? aDefault / 4.0F : aDefault; } @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadChainsaw.mTextureIndex] - : Textures.ItemIcons.POWER_UNIT_LV; + ? GT_MetaGenerated_Tool.getPrimaryMaterial( + aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadChainsaw.mTextureIndex] + : Textures.ItemIcons.POWER_UNIT_LV; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.RED + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE - + " was massacred by " - + EnumChatFormatting.GREEN - + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE); + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " was massacred by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_MV.java b/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_MV.java index 863c26ac82..6c88895e48 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_MV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_MV.java @@ -50,8 +50,8 @@ public class GT_Tool_Chainsaw_MV extends GT_Tool_Chainsaw_LV { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead - ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadChainsaw.mTextureIndex] - : Textures.ItemIcons.POWER_UNIT_MV; + ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial( + aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadChainsaw.mTextureIndex] + : Textures.ItemIcons.POWER_UNIT_MV; } } 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 b5cc684469..f9f82fd373 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Crowbar.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Crowbar.java @@ -98,7 +98,7 @@ 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()) { + .iterator(); i$.hasNext(); i$.next()) { if (((i$ instanceof GT_Tool_Crowbar)) && (!((IToolStats) i$).isMinableBlock(aBlock, aMetaData))) { return false; } @@ -131,11 +131,11 @@ public class GT_Tool_Crowbar extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.RED + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE - + " was removed by " - + EnumChatFormatting.GREEN - + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE); + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " was removed by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Drill_HV.java b/src/main/java/gregtech/common/tools/GT_Tool_Drill_HV.java index 77ab501e46..fa62c99ea8 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Drill_HV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Drill_HV.java @@ -61,8 +61,8 @@ public class GT_Tool_Drill_HV extends GT_Tool_Drill_LV { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead - ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadDrill.mTextureIndex] - : Textures.ItemIcons.POWER_UNIT_HV; + ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial( + aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadDrill.mTextureIndex] + : Textures.ItemIcons.POWER_UNIT_HV; } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Drill_LV.java b/src/main/java/gregtech/common/tools/GT_Tool_Drill_LV.java index 395c7753ff..911374dc15 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Drill_LV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Drill_LV.java @@ -92,17 +92,17 @@ public class GT_Tool_Drill_LV extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "pickaxe", "shovel") - || GT_ToolHarvestHelper.isAppropriateMaterial( - aBlock, - Material.rock, - Material.iron, - Material.anvil, - Material.sand, - Material.grass, - Material.ground, - Material.snow, - Material.clay, - Material.glass); + || GT_ToolHarvestHelper.isAppropriateMaterial( + aBlock, + Material.rock, + Material.iron, + Material.anvil, + Material.sand, + Material.grass, + Material.ground, + Material.snow, + Material.clay, + Material.glass); } @Override @@ -113,15 +113,15 @@ public class GT_Tool_Drill_LV extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadDrill.mTextureIndex] - : Textures.ItemIcons.POWER_UNIT_LV; + ? GT_MetaGenerated_Tool.getPrimaryMaterial( + aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadDrill.mTextureIndex] + : Textures.ItemIcons.POWER_UNIT_LV; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override @@ -141,12 +141,12 @@ public class GT_Tool_Drill_LV extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.RED + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE - + " got the Drill! (by " - + EnumChatFormatting.GREEN - + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE - + ")"); + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " got the Drill! (by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE + + ")"); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Drill_MV.java b/src/main/java/gregtech/common/tools/GT_Tool_Drill_MV.java index e9aa60aa69..02e7a08dfc 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Drill_MV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Drill_MV.java @@ -51,8 +51,8 @@ public class GT_Tool_Drill_MV extends GT_Tool_Drill_LV { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead - ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadDrill.mTextureIndex] - : Textures.ItemIcons.POWER_UNIT_MV; + ? gregtech.api.items.GT_MetaGenerated_Tool.getPrimaryMaterial( + aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadDrill.mTextureIndex] + : Textures.ItemIcons.POWER_UNIT_MV; } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_File.java b/src/main/java/gregtech/common/tools/GT_Tool_File.java index b642592775..0a8610a462 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_File.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_File.java @@ -97,15 +97,15 @@ public class GT_Tool_File extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return !aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadFile.mTextureIndex] - : Textures.ItemIcons.HANDLE_FILE; + ? GT_MetaGenerated_Tool.getPrimaryMaterial( + aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadFile.mTextureIndex] + : Textures.ItemIcons.HANDLE_FILE; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override @@ -114,11 +114,11 @@ public class GT_Tool_File extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.RED + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE - + " has been filed D for 'Dead' by " - + EnumChatFormatting.GREEN - + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE); + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " has been filed D for 'Dead' by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } 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 ac1ea88cc9..becca365e6 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java @@ -28,15 +28,14 @@ import gregtech.common.items.behaviors.Behaviour_Prospecting; public class GT_Tool_HardHammer extends GT_Tool { - public static final List mEffectiveList = Arrays.asList( - EntityIronGolem.class.getName(), - "EntityTowerGuardian"); + public static final List mEffectiveList = Arrays + .asList(EntityIronGolem.class.getName(), "EntityTowerGuardian"); @Override public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, - EntityPlayer aPlayer) { + EntityPlayer aPlayer) { String tName = aEntity.getClass() - .getName(); + .getName(); tName = tName.substring(tName.lastIndexOf('.') + 1); return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage; } @@ -124,33 +123,21 @@ 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_Recipe.GT_Recipe_Map.sHammerRecipes.containsInput(new ItemStack(aBlock, 1, aMetaData)); + || GT_ToolHarvestHelper + .isAppropriateMaterial(aBlock, Material.rock, Material.glass, Material.ice, Material.packedIce) + || GT_Recipe.GT_Recipe_Map.sHammerRecipes.containsInput(new ItemStack(aBlock, 1, aMetaData)); } @Override public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, - int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + 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) { @@ -177,16 +164,16 @@ public class GT_Tool_HardHammer extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadHammer.mTextureIndex] - : GT_MetaGenerated_Tool.getSecondaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; + ? GT_MetaGenerated_Tool.getPrimaryMaterial( + aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadHammer.mTextureIndex] + : GT_MetaGenerated_Tool + .getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override @@ -197,12 +184,12 @@ public class GT_Tool_HardHammer extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.RED + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE - + " was squashed by " - + EnumChatFormatting.GREEN - + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE); + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " was squashed by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } @Override diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Hoe.java b/src/main/java/gregtech/common/tools/GT_Tool_Hoe.java index a108e7014c..2dc5496176 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Hoe.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Hoe.java @@ -85,7 +85,7 @@ public class GT_Tool_Hoe extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "hoe") - || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, Material.gourd); + || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, Material.gourd); } @Override @@ -96,16 +96,16 @@ public class GT_Tool_Hoe extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadHoe.mTextureIndex] - : GT_MetaGenerated_Tool.getSecondaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; + ? GT_MetaGenerated_Tool + .getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadHoe.mTextureIndex] + : GT_MetaGenerated_Tool + .getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override @@ -122,11 +122,11 @@ public class GT_Tool_Hoe extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.RED + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE - + " has been called a stupid Hoe by " - + EnumChatFormatting.GREEN - + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE); + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " has been called a stupid Hoe by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } 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 2fc1c8f8e9..d6c609236e 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_JackHammer.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_JackHammer.java @@ -64,33 +64,25 @@ public class GT_Tool_JackHammer extends GT_Tool_Drill_LV { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "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 // + ); } @Override public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, - int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + 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, tDrop)); + tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes + .findRecipe(null, true, 2147483647L, null, GT_Utility.copyAmount(1L, tDrop)); if (tRecipe != null) { ItemStack tHammeringOutput = tRecipe.getOutput(0); if (tHammeringOutput != null) { @@ -125,11 +117,11 @@ public class GT_Tool_JackHammer extends GT_Tool_Drill_LV { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.RED + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE - + " has been jackhammered into pieces by " - + EnumChatFormatting.GREEN - + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE); + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " has been jackhammered into pieces by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Knife.java b/src/main/java/gregtech/common/tools/GT_Tool_Knife.java index 8354840ed7..152476fa2d 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Knife.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Knife.java @@ -60,17 +60,17 @@ public class GT_Tool_Knife extends GT_Tool_Sword { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - "<" + EnumChatFormatting.RED - + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE - + "> " - + EnumChatFormatting.GREEN - + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE - + " what are you doing?, " - + EnumChatFormatting.GREEN - + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE - + "?!? STAHP!!!"); + "<" + EnumChatFormatting.RED + + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + "> " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE + + " what are you doing?, " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE + + "?!? STAHP!!!"); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Mortar.java b/src/main/java/gregtech/common/tools/GT_Tool_Mortar.java index e7aae56c05..8e74d3bcc1 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Mortar.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Mortar.java @@ -110,11 +110,11 @@ public class GT_Tool_Mortar extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.RED + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE - + " was grounded by " - + EnumChatFormatting.GREEN - + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE); + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " was grounded by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Pickaxe.java b/src/main/java/gregtech/common/tools/GT_Tool_Pickaxe.java index 58394491eb..71bf9cfb17 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Pickaxe.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Pickaxe.java @@ -85,12 +85,12 @@ public class GT_Tool_Pickaxe extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "pickaxe") // - || GT_ToolHarvestHelper.isAppropriateMaterial( - aBlock, // - Material.rock, - Material.iron, - Material.anvil, - Material.glass); + || GT_ToolHarvestHelper.isAppropriateMaterial( + aBlock, // + Material.rock, + Material.iron, + Material.anvil, + Material.glass); } @Override @@ -101,16 +101,16 @@ public class GT_Tool_Pickaxe extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadPickaxe.mTextureIndex] - : GT_MetaGenerated_Tool.getSecondaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; + ? GT_MetaGenerated_Tool.getPrimaryMaterial( + aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadPickaxe.mTextureIndex] + : GT_MetaGenerated_Tool + .getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override @@ -129,11 +129,11 @@ public class GT_Tool_Pickaxe extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.RED + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE - + " got mined by " - + EnumChatFormatting.GREEN - + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE); + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " got mined by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } 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 1c49c196f3..93db2f3627 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Plow.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Plow.java @@ -25,7 +25,7 @@ public class GT_Tool_Plow extends GT_Tool { @Override public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, - EntityPlayer aPlayer) { + EntityPlayer aPlayer) { return (aEntity instanceof EntitySnowman) ? aOriginalDamage * 4.0F : aOriginalDamage; } @@ -37,12 +37,12 @@ public class GT_Tool_Plow extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "plow") - || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, Material.snow, Material.craftedSnow); + || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, Material.snow, Material.craftedSnow); } @Override public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, - int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { int rConversions = 0; if ((this.sIsHarvestingRightNow.get() == null) && ((aPlayer instanceof EntityPlayerMP))) { this.sIsHarvestingRightNow.set(this); @@ -50,21 +50,13 @@ public class GT_Tool_Plow extends GT_Tool { 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))) { + .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++; } } @@ -78,26 +70,26 @@ public class GT_Tool_Plow extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadPlow.mTextureIndex] - : GT_MetaGenerated_Tool.getSecondaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; + ? GT_MetaGenerated_Tool.getPrimaryMaterial( + aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadPlow.mTextureIndex] + : GT_MetaGenerated_Tool + .getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE - + " plew through the yard of " - + EnumChatFormatting.RED - + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE); + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE + + " plew through the yard of " + + EnumChatFormatting.RED + + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Plunger.java b/src/main/java/gregtech/common/tools/GT_Tool_Plunger.java index baf8b4b3cf..dc550989a0 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Plunger.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Plunger.java @@ -57,7 +57,7 @@ public class GT_Tool_Plunger extends GT_Tool { @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override @@ -67,11 +67,11 @@ public class GT_Tool_Plunger extends GT_Tool { aItem.addItemBehavior(aID, new Behaviour_Plunger_Fluid(getToolDamagePerDropConversion())); try { Object tObject = GT_Utility.callConstructor( - "gregtech.common.items.behaviors.Behaviour_Plunger_Essentia", - 0, - null, - false, - getToolDamagePerDropConversion()); + "gregtech.common.items.behaviors.Behaviour_Plunger_Essentia", + 0, + null, + false, + getToolDamagePerDropConversion()); if ((tObject instanceof IItemBehaviour)) { aItem.addItemBehavior(aID, (IItemBehaviour) tObject); } @@ -81,11 +81,11 @@ public class GT_Tool_Plunger extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.RED + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE - + " got stuck trying to escape through a Pipe while fighting " - + EnumChatFormatting.GREEN - + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE); + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " got stuck trying to escape through a Pipe while fighting " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_RollingPin.java b/src/main/java/gregtech/common/tools/GT_Tool_RollingPin.java index ca9b9d3fa8..9933c4eb13 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_RollingPin.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_RollingPin.java @@ -60,11 +60,11 @@ public class GT_Tool_RollingPin extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.RED + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE - + " got flattened by " - + EnumChatFormatting.GREEN - + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE); + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " got flattened by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } 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 124127c28c..204fbc4aae 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Saw.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Saw.java @@ -79,43 +79,38 @@ public class GT_Tool_Saw extends GT_Tool { @Override public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, - int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { 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 tDrops = ((IShearable) aBlock).onSheared( - aStack, - aPlayer.worldObj, - aX, - aY, - aZ, - aFortune); + ArrayList tDrops = ((IShearable) aBlock) + .onSheared(aStack, aPlayer.worldObj, aX, aY, aZ, aFortune); aDrops.clear(); aDrops.addAll(tDrops); aEvent.dropChance = 1.0F; } aPlayer.worldObj.setBlock(aX, aY, aZ, Blocks.air, 0, 0); } else if (((aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce)) - && (aDrops.isEmpty())) { - aDrops.add(new ItemStack(aBlock, 1, aMetaData)); - aPlayer.worldObj.setBlockToAir(aX, aY, aZ); - aEvent.dropChance = 1.0F; - return 1; - } + && (aDrops.isEmpty())) { + aDrops.add(new ItemStack(aBlock, 1, aMetaData)); + aPlayer.worldObj.setBlockToAir(aX, aY, aZ); + aEvent.dropChance = 1.0F; + return 1; + } return 0; } @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "axe", "saw") - || GT_ToolHarvestHelper.isAppropriateMaterial( - aBlock, - Material.leaves, - Material.vine, - Material.wood, - Material.cactus, - Material.ice, - Material.packedIce); + || GT_ToolHarvestHelper.isAppropriateMaterial( + aBlock, + Material.leaves, + Material.vine, + Material.wood, + Material.cactus, + Material.ice, + Material.packedIce); } @Override @@ -126,15 +121,15 @@ public class GT_Tool_Saw extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadSaw.mTextureIndex] - : Textures.ItemIcons.HANDLE_SAW; + ? GT_MetaGenerated_Tool + .getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadSaw.mTextureIndex] + : Textures.ItemIcons.HANDLE_SAW; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override @@ -143,11 +138,11 @@ public class GT_Tool_Saw extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.RED + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE - + " was getting cut down by " - + EnumChatFormatting.GREEN - + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE); + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " was getting cut down by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Scoop.java b/src/main/java/gregtech/common/tools/GT_Tool_Scoop.java index 3784fbc7bc..3181e108bf 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Scoop.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Scoop.java @@ -89,7 +89,7 @@ public class GT_Tool_Scoop extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "scoop") - || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, sBeeHiveMaterial); + || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, sBeeHiveMaterial); } @Override @@ -105,7 +105,7 @@ public class GT_Tool_Scoop extends GT_Tool { @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override @@ -120,11 +120,11 @@ public class GT_Tool_Scoop extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.RED + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE - + " got scooped up by " - + EnumChatFormatting.GREEN - + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE); + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " got scooped up by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } 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 f300abf5aa..1d7f4e655d 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java @@ -25,18 +25,18 @@ import gregtech.common.items.behaviors.Behaviour_Screwdriver; public class GT_Tool_Screwdriver extends GT_Tool { public static final List mEffectiveList = Arrays.asList( - EntityCaveSpider.class.getName(), - EntitySpider.class.getName(), - "EntityTFHedgeSpider", - "EntityTFKingSpider", - "EntityTFSwarmSpider", - "EntityTFTowerBroodling"); + EntityCaveSpider.class.getName(), + EntitySpider.class.getName(), + "EntityTFHedgeSpider", + "EntityTFKingSpider", + "EntityTFSwarmSpider", + "EntityTFTowerBroodling"); @Override public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, - EntityPlayer aPlayer) { + EntityPlayer aPlayer) { String tName = aEntity.getClass() - .getName(); + .getName(); tName = tName.substring(tName.lastIndexOf('.') + 1); return mEffectiveList.contains(tName) ? aOriginalDamage * 2.0F : aOriginalDamage; } @@ -119,7 +119,7 @@ public class GT_Tool_Screwdriver extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "screwdriver") - || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, Material.circuits); + || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, Material.circuits); } @Override @@ -130,15 +130,15 @@ public class GT_Tool_Screwdriver extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return !aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadScrewdriver.mTextureIndex] - : Textures.ItemIcons.HANDLE_SCREWDRIVER; + ? GT_MetaGenerated_Tool.getPrimaryMaterial( + aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadScrewdriver.mTextureIndex] + : Textures.ItemIcons.HANDLE_SCREWDRIVER; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override @@ -149,12 +149,12 @@ public class GT_Tool_Screwdriver extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.RED + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE - + " is screwed! (by " - + EnumChatFormatting.GREEN - + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE - + ")"); + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " is screwed! (by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE + + ")"); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver_LV.java b/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver_LV.java index acb032b26e..e49e020b7b 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver_LV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver_LV.java @@ -21,14 +21,14 @@ public class GT_Tool_Screwdriver_LV extends GT_Tool_Screwdriver { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return !aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadScrewdriver.mTextureIndex] - : Textures.ItemIcons.HANDLE_ELECTRIC_SCREWDRIVER; + ? GT_MetaGenerated_Tool.getPrimaryMaterial( + aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadScrewdriver.mTextureIndex] + : Textures.ItemIcons.HANDLE_ELECTRIC_SCREWDRIVER; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } } 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 051193c3bc..ef699d4d15 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Sense.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Sense.java @@ -35,12 +35,12 @@ public class GT_Tool_Sense extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "sense", "scythe") - || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, Material.plants, Material.leaves); + || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, Material.plants, Material.leaves); } @Override public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, - int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { int rConversions = 0; if ((this.sIsHarvestingRightNow.get() == null) && ((aPlayer instanceof EntityPlayerMP))) { this.sIsHarvestingRightNow.set(this); @@ -48,21 +48,13 @@ public class GT_Tool_Sense extends GT_Tool { 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))) { + .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++; } } @@ -76,16 +68,16 @@ public class GT_Tool_Sense extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadSense.mTextureIndex] - : GT_MetaGenerated_Tool.getSecondaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; + ? GT_MetaGenerated_Tool.getPrimaryMaterial( + aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadSense.mTextureIndex] + : GT_MetaGenerated_Tool + .getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override @@ -96,11 +88,11 @@ public class GT_Tool_Sense extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE - + " has taken the Soul of " - + EnumChatFormatting.RED - + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE); + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE + + " has taken the Soul of " + + EnumChatFormatting.RED + + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Shovel.java b/src/main/java/gregtech/common/tools/GT_Tool_Shovel.java index 91a0802c3d..886ca126e0 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Shovel.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Shovel.java @@ -82,13 +82,13 @@ public class GT_Tool_Shovel extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "shovel") - || GT_ToolHarvestHelper.isAppropriateMaterial( - aBlock, - Material.sand, - Material.grass, - Material.ground, - Material.snow, - Material.clay); + || GT_ToolHarvestHelper.isAppropriateMaterial( + aBlock, + Material.sand, + Material.grass, + Material.ground, + Material.snow, + Material.clay); } @Override @@ -99,16 +99,16 @@ public class GT_Tool_Shovel extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadShovel.mTextureIndex] - : GT_MetaGenerated_Tool.getSecondaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; + ? GT_MetaGenerated_Tool.getPrimaryMaterial( + aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadShovel.mTextureIndex] + : GT_MetaGenerated_Tool + .getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override @@ -117,11 +117,11 @@ public class GT_Tool_Shovel extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.RED + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE - + " got dug up by " - + EnumChatFormatting.GREEN - + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE); + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " got dug up by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java b/src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java index 0745359227..cc3f5e738b 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java @@ -109,16 +109,16 @@ public class GT_Tool_SoftHammer extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadMallet.mTextureIndex] - : GT_MetaGenerated_Tool.getSecondaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.handleMallet.mTextureIndex]; + ? GT_MetaGenerated_Tool.getPrimaryMaterial( + aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadMallet.mTextureIndex] + : GT_MetaGenerated_Tool.getSecondaryMaterial( + aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.handleMallet.mTextureIndex]; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override @@ -129,11 +129,11 @@ public class GT_Tool_SoftHammer extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.RED + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE - + " was hammered to death by " - + EnumChatFormatting.GREEN - + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE); + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " was hammered to death by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } 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 98a3820106..9b5ef3a638 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 @@ -25,18 +25,18 @@ import gregtech.common.items.behaviors.Behaviour_Screwdriver; public class GT_Tool_Soldering_Iron extends GT_Tool { public static final List mEffectiveList = Arrays.asList( - EntityCaveSpider.class.getName(), - EntitySpider.class.getName(), - "EntityTFHedgeSpider", - "EntityTFKingSpider", - "EntityTFSwarmSpider", - "EntityTFTowerBroodling"); + EntityCaveSpider.class.getName(), + EntitySpider.class.getName(), + "EntityTFHedgeSpider", + "EntityTFKingSpider", + "EntityTFSwarmSpider", + "EntityTFTowerBroodling"); @Override public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, - EntityPlayer aPlayer) { + EntityPlayer aPlayer) { String tName = aEntity.getClass() - .getName(); + .getName(); tName = tName.substring(tName.lastIndexOf('.') + 1); return mEffectiveList.contains(tName) ? aOriginalDamage * 2.0F : aOriginalDamage; } @@ -114,7 +114,7 @@ public class GT_Tool_Soldering_Iron extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "soldering_iron") - || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, Material.circuits); + || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, Material.circuits); } @Override @@ -125,13 +125,13 @@ public class GT_Tool_Soldering_Iron extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[49] - : Textures.ItemIcons.HANDLE_SOLDERING; + : Textures.ItemIcons.HANDLE_SOLDERING; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override @@ -142,12 +142,12 @@ public class GT_Tool_Soldering_Iron extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.RED + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE - + " got soldert! (by " - + EnumChatFormatting.GREEN - + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE - + ")"); + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " got soldert! (by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE + + ")"); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Sword.java b/src/main/java/gregtech/common/tools/GT_Tool_Sword.java index bb8222d221..7bfaaee797 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Sword.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Sword.java @@ -86,19 +86,19 @@ public class GT_Tool_Sword extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "sword") - || GT_ToolHarvestHelper.isAppropriateMaterial( - aBlock, - Material.leaves, - Material.gourd, - Material.vine, - Material.web, - Material.cloth, - Material.carpet, - Material.plants, - Material.cactus, - Material.cake, - Material.tnt, - Material.sponge); + || GT_ToolHarvestHelper.isAppropriateMaterial( + aBlock, + Material.leaves, + Material.gourd, + Material.vine, + Material.web, + Material.cloth, + Material.carpet, + Material.plants, + Material.cactus, + Material.cake, + Material.tnt, + Material.sponge); } @Override @@ -109,15 +109,15 @@ public class GT_Tool_Sword extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return !aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadSword.mTextureIndex] - : Textures.ItemIcons.HANDLE_SWORD; + ? GT_MetaGenerated_Tool.getPrimaryMaterial( + aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadSword.mTextureIndex] + : Textures.ItemIcons.HANDLE_SWORD; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return !aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Turbine.java b/src/main/java/gregtech/common/tools/GT_Tool_Turbine.java index 12d4d79884..daaf2c4438 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Turbine.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Turbine.java @@ -33,14 +33,14 @@ public abstract class GT_Tool_Turbine extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE - + " put " - + EnumChatFormatting.RED - + aEntity.getCommandSenderName() - + "s" - + EnumChatFormatting.WHITE - + " head into a turbine"); + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE + + " put " + + EnumChatFormatting.RED + + aEntity.getCommandSenderName() + + "s" + + EnumChatFormatting.WHITE + + " head into a turbine"); } public abstract IIconContainer getTurbineIcon(); diff --git a/src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java b/src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java index 1038c60dc4..184d506872 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java @@ -91,26 +91,26 @@ public class GT_Tool_UniversalSpade extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "shovel", "axe", "saw", "sword", "crowbar") - || GT_ToolHarvestHelper.isAppropriateMaterial( - aBlock, - Material.sand, - Material.grass, - Material.ground, - Material.snow, - Material.clay, - Material.leaves, - Material.vine, - Material.wood, - Material.cactus, - Material.circuits, - Material.gourd, - Material.web, - Material.cloth, - Material.carpet, - Material.plants, - Material.cake, - Material.tnt, - Material.sponge); + || GT_ToolHarvestHelper.isAppropriateMaterial( + aBlock, + Material.sand, + Material.grass, + Material.ground, + Material.snow, + Material.clay, + Material.leaves, + Material.vine, + Material.wood, + Material.cactus, + Material.circuits, + Material.gourd, + Material.web, + Material.cloth, + Material.carpet, + Material.plants, + Material.cake, + Material.tnt, + Material.sponge); } @Override @@ -121,16 +121,16 @@ public class GT_Tool_UniversalSpade extends GT_Tool { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadUniversalSpade.mTextureIndex] - : GT_MetaGenerated_Tool.getSecondaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; + ? GT_MetaGenerated_Tool.getPrimaryMaterial( + aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadUniversalSpade.mTextureIndex] + : GT_MetaGenerated_Tool + .getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.stick.mTextureIndex]; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override @@ -150,11 +150,11 @@ public class GT_Tool_UniversalSpade extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.RED + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE - + " has been digged by " - + EnumChatFormatting.GREEN - + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE); + EnumChatFormatting.RED + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE + + " has been digged by " + + EnumChatFormatting.GREEN + + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_WireCutter.java b/src/main/java/gregtech/common/tools/GT_Tool_WireCutter.java index 2080d435ee..54b76e6d81 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_WireCutter.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_WireCutter.java @@ -98,7 +98,7 @@ public class GT_Tool_WireCutter extends GT_Tool { @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } @Override @@ -107,11 +107,11 @@ public class GT_Tool_WireCutter extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE - + " has cut the Cable for the Life Support Machine of " - + EnumChatFormatting.RED - + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE); + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE + + " has cut the Cable for the Life Support Machine of " + + EnumChatFormatting.RED + + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE); } } 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 71e35372ce..14206b26ee 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java @@ -24,15 +24,14 @@ import gregtech.common.items.behaviors.Behaviour_Wrench; public class GT_Tool_Wrench extends GT_Tool { - public static final List mEffectiveList = Arrays.asList( - EntityIronGolem.class.getName(), - "EntityTowerGuardian"); + public static final List mEffectiveList = Arrays + .asList(EntityIronGolem.class.getName(), "EntityTowerGuardian"); @Override public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, - EntityPlayer aPlayer) { + EntityPlayer aPlayer) { String tName = aEntity.getClass() - .getName(); + .getName(); tName = tName.substring(tName.lastIndexOf('.') + 1); return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage; } @@ -115,8 +114,8 @@ public class GT_Tool_Wrench extends GT_Tool { @Override public boolean isMinableBlock(Block aBlock, byte aMetaData) { return GT_ToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "wrench") - || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, Material.piston) - || GT_ToolHarvestHelper.isSpecialBlock(aBlock, Blocks.hopper, Blocks.dispenser, Blocks.dropper); + || GT_ToolHarvestHelper.isAppropriateMaterial(aBlock, Material.piston) + || GT_ToolHarvestHelper.isSpecialBlock(aBlock, Blocks.hopper, Blocks.dispenser, Blocks.dropper); } @Override @@ -142,11 +141,11 @@ public class GT_Tool_Wrench extends GT_Tool { @Override public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) { return new ChatComponentText( - EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() - + EnumChatFormatting.WHITE - + " threw a Monkey Wrench into the Plans of " - + EnumChatFormatting.RED - + aEntity.getCommandSenderName() - + EnumChatFormatting.WHITE); + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + + EnumChatFormatting.WHITE + + " threw a Monkey Wrench into the Plans of " + + EnumChatFormatting.RED + + aEntity.getCommandSenderName() + + EnumChatFormatting.WHITE); } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Wrench_HV.java b/src/main/java/gregtech/common/tools/GT_Tool_Wrench_HV.java index 812c29dcec..7a7c725f8f 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Wrench_HV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Wrench_HV.java @@ -56,14 +56,14 @@ public class GT_Tool_Wrench_HV extends GT_Tool_Wrench_LV { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadWrench.mTextureIndex] - : Textures.ItemIcons.POWER_UNIT_HV; + ? GT_MetaGenerated_Tool.getPrimaryMaterial( + aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadWrench.mTextureIndex] + : Textures.ItemIcons.POWER_UNIT_HV; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Wrench_LV.java b/src/main/java/gregtech/common/tools/GT_Tool_Wrench_LV.java index 1ee87b442c..5f82a7d5b1 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Wrench_LV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Wrench_LV.java @@ -12,7 +12,7 @@ public class GT_Tool_Wrench_LV extends GT_Tool_Wrench { @Override public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, - EntityPlayer aPlayer) { + EntityPlayer aPlayer) { return aOriginalDamage; } @@ -64,14 +64,14 @@ public class GT_Tool_Wrench_LV extends GT_Tool_Wrench { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadWrench.mTextureIndex] - : Textures.ItemIcons.POWER_UNIT_LV; + ? GT_MetaGenerated_Tool.getPrimaryMaterial( + aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadWrench.mTextureIndex] + : Textures.ItemIcons.POWER_UNIT_LV; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } } diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Wrench_MV.java b/src/main/java/gregtech/common/tools/GT_Tool_Wrench_MV.java index b8218eb3df..cc5b649647 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_Wrench_MV.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_Wrench_MV.java @@ -56,14 +56,14 @@ public class GT_Tool_Wrench_MV extends GT_Tool_Wrench_LV { @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead - ? GT_MetaGenerated_Tool.getPrimaryMaterial( - aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadWrench.mTextureIndex] - : Textures.ItemIcons.POWER_UNIT_MV; + ? GT_MetaGenerated_Tool.getPrimaryMaterial( + aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadWrench.mTextureIndex] + : Textures.ItemIcons.POWER_UNIT_MV; } @Override public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) { return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa - : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; + : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mRGBa; } } -- cgit