From 6f31720697bcc351421a4d86ba3bf749375dd12c Mon Sep 17 00:00:00 2001 From: Raven Szewczyk Date: Sat, 27 Aug 2022 10:19:57 +0100 Subject: Update buildscript & apply spotless (#1306) * Update dependencies * Update buildscript, apply spotless --- src/main/java/gregtech/common/GT_Client.java | 413 +- src/main/java/gregtech/common/GT_DummyWorld.java | 107 +- src/main/java/gregtech/common/GT_Network.java | 94 +- .../gregtech/common/GT_PlayerActivityLogger.java | 1 - src/main/java/gregtech/common/GT_Pollution.java | 887 ++-- src/main/java/gregtech/common/GT_Proxy.java | 1798 +++++-- src/main/java/gregtech/common/GT_RecipeAdder.java | 2296 +++++++-- src/main/java/gregtech/common/GT_Server.java | 3 +- .../java/gregtech/common/GT_ThaumcraftCompat.java | 144 +- .../java/gregtech/common/GT_UndergroundOil.java | 107 +- .../gregtech/common/GT_Worldgen_GT_Ore_Layer.java | 567 ++- .../common/GT_Worldgen_GT_Ore_SmallPieces.java | 128 +- .../java/gregtech/common/GT_Worldgen_Stone.java | 293 +- .../java/gregtech/common/GT_Worldgenerator.java | 436 +- .../gregtech/common/bees/GT_AlleleBeeSpecies.java | 40 +- .../java/gregtech/common/bees/GT_AlleleHelper.java | 115 +- .../java/gregtech/common/bees/GT_Bee_Mutation.java | 36 +- .../gregtech/common/blocks/GT_Block_Casings1.java | 37 +- .../gregtech/common/blocks/GT_Block_Casings2.java | 15 +- .../gregtech/common/blocks/GT_Block_Casings3.java | 12 +- .../gregtech/common/blocks/GT_Block_Casings4.java | 118 +- .../gregtech/common/blocks/GT_Block_Casings5.java | 12 +- .../gregtech/common/blocks/GT_Block_Casings6.java | 4 +- .../gregtech/common/blocks/GT_Block_Casings8.java | 96 +- .../common/blocks/GT_Block_Casings_Abstract.java | 12 +- .../gregtech/common/blocks/GT_Block_Concretes.java | 14 +- .../gregtech/common/blocks/GT_Block_Machines.java | 155 +- .../gregtech/common/blocks/GT_Block_Metal.java | 6 +- .../java/gregtech/common/blocks/GT_Block_Ores.java | 67 +- .../common/blocks/GT_Block_Ores_Abstract.java | 77 +- .../gregtech/common/blocks/GT_Block_Ores_UB1.java | 51 +- .../gregtech/common/blocks/GT_Block_Ores_UB2.java | 52 +- .../gregtech/common/blocks/GT_Block_Ores_UB3.java | 52 +- .../common/blocks/GT_Block_Reinforced.java | 149 +- .../gregtech/common/blocks/GT_Block_Stones.java | 12 +- .../common/blocks/GT_Block_Stones_Abstract.java | 97 +- .../gregtech/common/blocks/GT_Block_Storage.java | 6 +- .../gregtech/common/blocks/GT_Item_Casings1.java | 7 - .../gregtech/common/blocks/GT_Item_Casings2.java | 3 +- .../gregtech/common/blocks/GT_Item_Casings5.java | 9 +- .../common/blocks/GT_Item_Casings_Abstract.java | 41 +- .../gregtech/common/blocks/GT_Item_Concretes.java | 6 +- .../common/blocks/GT_Item_LongDistancePipe.java | 9 +- .../gregtech/common/blocks/GT_Item_Machines.java | 204 +- .../java/gregtech/common/blocks/GT_Item_Ores.java | 45 +- .../common/blocks/GT_Item_Stones_Abstract.java | 6 +- .../gregtech/common/blocks/GT_Item_Storage.java | 19 +- .../gregtech/common/blocks/GT_TileEntity_Ores.java | 157 +- .../java/gregtech/common/covers/GT_Cover_Arm.java | 244 +- .../common/covers/GT_Cover_ControlsWork.java | 66 +- .../gregtech/common/covers/GT_Cover_Conveyor.java | 143 +- .../gregtech/common/covers/GT_Cover_Crafting.java | 35 +- .../gregtech/common/covers/GT_Cover_DoesWork.java | 91 +- .../gregtech/common/covers/GT_Cover_Drain.java | 110 +- .../gregtech/common/covers/GT_Cover_EUMeter.java | 184 +- .../common/covers/GT_Cover_EnergyOnly.java | 40 +- .../gregtech/common/covers/GT_Cover_FacadeAE.java | 36 +- .../common/covers/GT_Cover_FacadeBase.java | 145 +- .../common/covers/GT_Cover_FluidLimiter.java | 56 +- .../common/covers/GT_Cover_FluidRegulator.java | 1010 ++-- .../covers/GT_Cover_FluidStorageMonitor.java | 182 +- .../common/covers/GT_Cover_Fluidfilter.java | 168 +- .../common/covers/GT_Cover_ItemFilter.java | 132 +- .../gregtech/common/covers/GT_Cover_ItemMeter.java | 161 +- .../java/gregtech/common/covers/GT_Cover_Lens.java | 3 +- .../common/covers/GT_Cover_LiquidMeter.java | 88 +- .../common/covers/GT_Cover_NeedMaintainance.java | 145 +- .../common/covers/GT_Cover_PlayerDetector.java | 69 +- .../java/gregtech/common/covers/GT_Cover_Pump.java | 165 +- .../common/covers/GT_Cover_RedstoneConductor.java | 49 +- .../covers/GT_Cover_RedstoneReceiverExternal.java | 15 +- .../covers/GT_Cover_RedstoneReceiverInternal.java | 15 +- .../common/covers/GT_Cover_RedstoneSignalizer.java | 29 +- .../GT_Cover_RedstoneTransmitterExternal.java | 3 +- .../GT_Cover_RedstoneTransmitterInternal.java | 12 +- .../covers/GT_Cover_RedstoneWirelessBase.java | 107 +- .../gregtech/common/covers/GT_Cover_Screen.java | 22 +- .../gregtech/common/covers/GT_Cover_Shutter.java | 101 +- .../common/covers/GT_Cover_SolarPanel.java | 115 +- .../common/covers/GT_Cover_SteamValve.java | 3 +- .../java/gregtech/common/covers/GT_Cover_Vent.java | 18 +- .../common/entities/GT_EntityFXPollution.java | 7 +- .../gregtech/common/entities/GT_Entity_Arrow.java | 185 +- .../common/entities/GT_Entity_Arrow_Potion.java | 17 +- .../gregtech/common/gui/GT_Container_Boiler.java | 21 +- .../common/gui/GT_Container_ChestBuffer.java | 36 +- .../gregtech/common/gui/GT_Container_Filter.java | 44 +- .../common/gui/GT_Container_IndustrialApiary.java | 116 +- .../common/gui/GT_Container_InputBus_ME.java | 58 +- .../common/gui/GT_Container_ItemDistributor.java | 21 +- .../GT_Container_MicrowaveEnergyTransmitter.java | 54 +- .../common/gui/GT_Container_OutputHatch.java | 14 +- .../gui/GT_Container_PrimitiveBlastFurnace.java | 3 +- .../common/gui/GT_Container_Regulator.java | 14 +- .../common/gui/GT_Container_SuperBuffer.java | 36 +- .../common/gui/GT_Container_Teleporter.java | 57 +- .../common/gui/GT_GUIContainerVolumetricFlask.java | 36 +- .../common/gui/GT_GUIContainer_Boiler.java | 3 +- .../gui/GT_GUIContainer_BronzeBlastFurnace.java | 24 +- .../common/gui/GT_GUIContainer_FusionReactor.java | 39 +- .../gui/GT_GUIContainer_IndustrialApiary.java | 157 +- .../common/gui/GT_GUIContainer_InputBus_ME.java | 48 +- .../gui/GT_GUIContainer_ItemDistributor.java | 4 +- ...GT_GUIContainer_MicrowaveEnergyTransmitter.java | 60 +- .../common/gui/GT_GUIContainer_OutputHatch.java | 37 +- .../gui/GT_GUIContainer_PrimitiveBlastFurnace.java | 31 +- .../common/gui/GT_GUIContainer_QuantumChest.java | 24 +- .../common/gui/GT_GUIContainer_RecipeFilter.java | 18 +- .../common/gui/GT_GUIContainer_Regulator.java | 27 +- .../common/gui/GT_GUIContainer_Teleporter.java | 44 +- src/main/java/gregtech/common/items/CombType.java | 61 +- src/main/java/gregtech/common/items/DropType.java | 45 +- .../common/items/GT_DepletetCell_Item.java | 17 +- .../gregtech/common/items/GT_FluidDisplayItem.java | 83 +- .../common/items/GT_IntegratedCircuit_Item.java | 207 +- .../common/items/GT_MetaGenerated_Item_01.java | 5306 +++++++++++++++++--- .../common/items/GT_MetaGenerated_Item_02.java | 2530 +++++++++- .../common/items/GT_MetaGenerated_Item_03.java | 598 ++- .../common/items/GT_MetaGenerated_Item_98.java | 28 +- .../common/items/GT_MetaGenerated_Item_99.java | 48 +- .../common/items/GT_MetaGenerated_Tool_01.java | 788 ++- .../common/items/GT_NeutronReflector_Item.java | 16 +- .../gregtech/common/items/GT_SensorCard_Item.java | 22 +- .../gregtech/common/items/GT_VolumetricFlask.java | 61 +- src/main/java/gregtech/common/items/ItemComb.java | 2544 ++++++++-- src/main/java/gregtech/common/items/ItemDrop.java | 288 +- .../java/gregtech/common/items/ItemPollen.java | 123 +- .../java/gregtech/common/items/ItemPropolis.java | 182 +- .../java/gregtech/common/items/PollenType.java | 11 +- .../java/gregtech/common/items/PropolisType.java | 39 +- .../common/items/behaviors/Behaviour_Arrow.java | 44 +- .../items/behaviors/Behaviour_Arrow_Potion.java | 24 +- .../items/behaviors/Behaviour_Cover_Tool.java | 105 +- .../common/items/behaviors/Behaviour_Crowbar.java | 13 +- .../common/items/behaviors/Behaviour_DataOrb.java | 3 +- .../items/behaviors/Behaviour_DataStick.java | 47 +- .../common/items/behaviors/Behaviour_Hoe.java | 20 +- .../common/items/behaviors/Behaviour_Lighter.java | 56 +- .../common/items/behaviors/Behaviour_None.java | 56 +- .../behaviors/Behaviour_Plunger_Essentia.java | 30 +- .../items/behaviors/Behaviour_Plunger_Fluid.java | 29 +- .../items/behaviors/Behaviour_Plunger_Item.java | 41 +- .../items/behaviors/Behaviour_PrintedPages.java | 3 +- .../items/behaviors/Behaviour_Prospecting.java | 85 +- .../common/items/behaviors/Behaviour_Scanner.java | 43 +- .../common/items/behaviors/Behaviour_Scoop.java | 28 +- .../items/behaviors/Behaviour_Screwdriver.java | 13 +- .../common/items/behaviors/Behaviour_Sense.java | 26 +- .../items/behaviors/Behaviour_SensorKit.java | 22 +- .../items/behaviors/Behaviour_SoftHammer.java | 76 +- .../items/behaviors/Behaviour_Sonictron.java | 19 +- .../items/behaviors/Behaviour_Spray_Color.java | 46 +- .../common/items/behaviors/Behaviour_Wrench.java | 101 +- .../items/behaviors/Behaviour_WrittenBook.java | 19 +- .../common/misc/GT_ClientPollutionMap.java | 94 +- src/main/java/gregtech/common/misc/GT_Command.java | 171 +- .../common/misc/GT_DrillingLogicDelegate.java | 33 +- .../common/net/MessageSetFlaskCapacity.java | 3 +- .../gregtech/common/power/BasicMachineEUPower.java | 24 +- .../redstonecircuits/GT_Circuit_BasicLogic.java | 36 +- .../common/redstonecircuits/GT_Circuit_BitAnd.java | 12 +- .../common/redstonecircuits/GT_Circuit_Equals.java | 7 +- .../common/redstonecircuits/GT_Circuit_Pulser.java | 14 +- .../redstonecircuits/GT_Circuit_Randomizer.java | 3 +- .../redstonecircuits/GT_Circuit_RedstoneMeter.java | 8 +- .../common/redstonecircuits/GT_Circuit_Timer.java | 4 +- .../common/render/CosmicItemRendererGT.java | 112 +- .../gregtech/common/render/GT_CapeRenderer.java | 49 +- .../common/render/GT_CopiedBlockTexture.java | 6 +- .../common/render/GT_CopiedCTMBlockTexture.java | 18 +- .../gregtech/common/render/GT_FlaskRenderer.java | 11 +- .../render/GT_FluidDisplayStackRenderer.java | 36 +- .../render/GT_MetaGenerated_Tool_Renderer.java | 100 +- .../gregtech/common/render/GT_MultiTexture.java | 2 - .../common/render/GT_PollutionRenderer.java | 123 +- .../java/gregtech/common/render/GT_RenderUtil.java | 11 +- .../gregtech/common/render/GT_RenderedTexture.java | 90 +- .../gregtech/common/render/GT_Renderer_Block.java | 526 +- .../gregtech/common/render/GT_SidedTexture.java | 26 +- .../gregtech/common/render/GT_TextureBase.java | 2 +- .../gregtech/common/render/GT_TextureBuilder.java | 14 +- .../gregtech/common/render/IRenderedBlock.java | 57 +- .../render/items/GT_GeneratedItem_Renderer.java | 54 +- .../items/GT_GeneratedMaterial_Renderer.java | 38 +- .../items/GT_MetaGenerated_Item_Renderer.java | 4 +- .../automation/GT_MetaTileEntity_ChestBuffer.java | 59 +- .../automation/GT_MetaTileEntity_Filter.java | 40 +- .../GT_MetaTileEntity_ItemDistributor.java | 64 +- .../automation/GT_MetaTileEntity_RecipeFilter.java | 32 +- .../automation/GT_MetaTileEntity_Regulator.java | 61 +- .../automation/GT_MetaTileEntity_SuperBuffer.java | 54 +- .../automation/GT_MetaTileEntity_TypeFilter.java | 65 +- .../boilers/GT_MetaTileEntity_Boiler.java | 49 +- .../boilers/GT_MetaTileEntity_Boiler_Bronze.java | 230 +- .../boilers/GT_MetaTileEntity_Boiler_Lava.java | 60 +- .../boilers/GT_MetaTileEntity_Boiler_Solar.java | 138 +- .../GT_MetaTileEntity_Boiler_Solar_Steel.java | 37 +- .../boilers/GT_MetaTileEntity_Boiler_Steel.java | 57 +- .../GT_MetaTileEntity_DieselGenerator.java | 175 +- .../generators/GT_MetaTileEntity_GasTurbine.java | 146 +- .../generators/GT_MetaTileEntity_LightningRod.java | 62 +- .../GT_MetaTileEntity_MagicEnergyConverter.java | 153 +- .../GT_MetaTileEntity_MagicalEnergyAbsorber.java | 205 +- .../GT_MetaTileEntity_NaquadahReactor.java | 135 +- .../GT_MetaTileEntity_PlasmaGenerator.java | 98 +- .../generators/GT_MetaTileEntity_SteamTurbine.java | 139 +- .../GT_MetaTileEntity_BasicHull_Bronze.java | 18 +- .../GT_MetaTileEntity_BasicHull_BronzeBricks.java | 26 +- .../GT_MetaTileEntity_BasicHull_Steel.java | 16 +- .../GT_MetaTileEntity_BasicHull_SteelBricks.java | 25 +- .../GT_MetaTileEntity_Hatch_InputBus_ME.java | 105 +- .../GT_MetaTileEntity_Hatch_OutputBus_ME.java | 118 +- .../GT_MetaTileEntity_AdvSeismicProspector.java | 219 +- .../basic/GT_MetaTileEntity_Boxinator.java | 144 +- .../machines/basic/GT_MetaTileEntity_Charger.java | 70 +- .../basic/GT_MetaTileEntity_CuringOven.java | 86 +- .../basic/GT_MetaTileEntity_Disassembler.java | 395 +- .../basic/GT_MetaTileEntity_IndustrialApiary.java | 596 ++- .../basic/GT_MetaTileEntity_Massfabricator.java | 115 +- ..._MetaTileEntity_MicrowaveEnergyTransmitter.java | 142 +- .../machines/basic/GT_MetaTileEntity_Miner.java | 210 +- .../basic/GT_MetaTileEntity_MonsterRepellent.java | 97 +- .../basic/GT_MetaTileEntity_PotionBrewer.java | 98 +- .../machines/basic/GT_MetaTileEntity_Printer.java | 32 +- .../machines/basic/GT_MetaTileEntity_Pump.java | 287 +- .../basic/GT_MetaTileEntity_Replicator.java | 121 +- .../basic/GT_MetaTileEntity_RockBreaker.java | 97 +- .../machines/basic/GT_MetaTileEntity_Scanner.java | 224 +- .../basic/GT_MetaTileEntity_SeismicProspector.java | 207 +- .../basic/GT_MetaTileEntity_Teleporter.java | 265 +- ...GT_MetaTileEntity_LongDistancePipelineBase.java | 191 +- ...T_MetaTileEntity_LongDistancePipelineFluid.java | 58 +- ...GT_MetaTileEntity_LongDistancePipelineItem.java | 69 +- .../GT_MetaTileEntity_AbstractMultiFurnace.java | 11 +- .../multi/GT_MetaTileEntity_AssemblyLine.java | 275 +- .../GT_MetaTileEntity_BrickedBlastFurnace.java | 23 +- .../GT_MetaTileEntity_BronzeBlastFurnace.java | 27 +- .../multi/GT_MetaTileEntity_Charcoal_Pit.java | 112 +- .../multi/GT_MetaTileEntity_Cleanroom.java | 268 +- .../GT_MetaTileEntity_ConcreteBackfillerBase.java | 70 +- .../multi/GT_MetaTileEntity_DieselEngine.java | 224 +- .../multi/GT_MetaTileEntity_DistillationTower.java | 245 +- .../multi/GT_MetaTileEntity_DrillerBase.java | 284 +- .../GT_MetaTileEntity_ElectricBlastFurnace.java | 286 +- .../GT_MetaTileEntity_ExtremeDieselEngine.java | 123 +- .../multi/GT_MetaTileEntity_FusionComputer.java | 244 +- .../multi/GT_MetaTileEntity_FusionComputer1.java | 13 +- .../multi/GT_MetaTileEntity_FusionComputer2.java | 12 +- .../multi/GT_MetaTileEntity_FusionComputer3.java | 13 +- .../multi/GT_MetaTileEntity_HeatExchanger.java | 179 +- .../GT_MetaTileEntity_ImplosionCompressor.java | 101 +- .../GT_MetaTileEntity_IntegratedOreFactory.java | 272 +- .../multi/GT_MetaTileEntity_LargeBoiler.java | 262 +- .../GT_MetaTileEntity_LargeBoiler_Bronze.java | 9 +- .../multi/GT_MetaTileEntity_LargeBoiler_Steel.java | 13 +- .../GT_MetaTileEntity_LargeBoiler_Titanium.java | 18 +- ...T_MetaTileEntity_LargeBoiler_TungstenSteel.java | 14 +- .../GT_MetaTileEntity_LargeChemicalReactor.java | 175 +- .../multi/GT_MetaTileEntity_LargeTurbine.java | 242 +- .../multi/GT_MetaTileEntity_LargeTurbine_Gas.java | 77 +- ...GT_MetaTileEntity_LargeTurbine_GasAdvanced.java | 106 +- .../GT_MetaTileEntity_LargeTurbine_HPSteam.java | 90 +- .../GT_MetaTileEntity_LargeTurbine_Plasma.java | 207 +- .../GT_MetaTileEntity_LargeTurbine_Steam.java | 108 +- .../multi/GT_MetaTileEntity_MultiFurnace.java | 219 +- .../multi/GT_MetaTileEntity_OilCracker.java | 229 +- .../multi/GT_MetaTileEntity_OilDrillBase.java | 219 +- .../multi/GT_MetaTileEntity_OilDrillInfinite.java | 12 +- .../multi/GT_MetaTileEntity_OreDrillingPlant1.java | 4 +- .../multi/GT_MetaTileEntity_OreDrillingPlant2.java | 4 +- .../multi/GT_MetaTileEntity_OreDrillingPlant3.java | 4 +- .../multi/GT_MetaTileEntity_OreDrillingPlant4.java | 4 +- .../GT_MetaTileEntity_OreDrillingPlantBase.java | 200 +- .../multi/GT_MetaTileEntity_PlasmaForge.java | 1192 ++++- .../GT_MetaTileEntity_PrimitiveBlastFurnace.java | 143 +- .../multi/GT_MetaTileEntity_ProcessingArray.java | 233 +- .../multi/GT_MetaTileEntity_PyrolyseOven.java | 169 +- .../multi/GT_MetaTileEntity_VacuumFreezer.java | 73 +- .../machines/multiblock/MultiBlock_Macerator.java | 108 +- .../GT_MetaTileEntity_AlloySmelter_Bronze.java | 75 +- .../GT_MetaTileEntity_AlloySmelter_Steel.java | 75 +- .../steam/GT_MetaTileEntity_Compressor_Bronze.java | 75 +- .../steam/GT_MetaTileEntity_Compressor_Steel.java | 75 +- .../steam/GT_MetaTileEntity_Extractor_Bronze.java | 75 +- .../steam/GT_MetaTileEntity_Extractor_Steel.java | 75 +- .../GT_MetaTileEntity_ForgeHammer_Bronze.java | 86 +- .../steam/GT_MetaTileEntity_ForgeHammer_Steel.java | 86 +- .../steam/GT_MetaTileEntity_Furnace_Bronze.java | 79 +- .../steam/GT_MetaTileEntity_Furnace_Steel.java | 77 +- .../steam/GT_MetaTileEntity_Macerator_Bronze.java | 111 +- .../steam/GT_MetaTileEntity_Macerator_Steel.java | 116 +- .../GT_MetaTileEntity_DigitalChestBase.java | 200 +- .../storage/GT_MetaTileEntity_DigitalTankBase.java | 64 +- .../storage/GT_MetaTileEntity_Locker.java | 27 +- .../storage/GT_MetaTileEntity_QuantumChest.java | 7 +- .../storage/GT_MetaTileEntity_QuantumTank.java | 27 +- .../storage/GT_MetaTileEntity_SuperChest.java | 3 +- .../storage/GT_MetaTileEntity_SuperTank.java | 26 +- src/main/java/gregtech/common/tools/GT_Tool.java | 59 +- .../java/gregtech/common/tools/GT_Tool_Axe.java | 86 +- .../common/tools/GT_Tool_BranchCutter.java | 31 +- .../common/tools/GT_Tool_ButcheryKnife.java | 10 +- .../gregtech/common/tools/GT_Tool_BuzzSaw.java | 14 +- .../gregtech/common/tools/GT_Tool_Chainsaw_HV.java | 6 +- .../gregtech/common/tools/GT_Tool_Chainsaw_LV.java | 86 +- .../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 | 40 +- .../gregtech/common/tools/GT_Tool_Drill_MV.java | 9 +- .../java/gregtech/common/tools/GT_Tool_File.java | 22 +- .../gregtech/common/tools/GT_Tool_HardHammer.java | 57 +- .../java/gregtech/common/tools/GT_Tool_Hoe.java | 20 +- .../gregtech/common/tools/GT_Tool_JackHammer.java | 43 +- .../java/gregtech/common/tools/GT_Tool_Knife.java | 5 +- .../java/gregtech/common/tools/GT_Tool_Mortar.java | 7 +- .../gregtech/common/tools/GT_Tool_Pickaxe.java | 33 +- .../java/gregtech/common/tools/GT_Tool_Plow.java | 53 +- .../gregtech/common/tools/GT_Tool_Plunger.java | 17 +- .../gregtech/common/tools/GT_Tool_RollingPin.java | 7 +- .../java/gregtech/common/tools/GT_Tool_Saw.java | 60 +- .../java/gregtech/common/tools/GT_Tool_Scoop.java | 18 +- .../gregtech/common/tools/GT_Tool_Screwdriver.java | 34 +- .../common/tools/GT_Tool_Screwdriver_LV.java | 10 +- .../java/gregtech/common/tools/GT_Tool_Sense.java | 51 +- .../java/gregtech/common/tools/GT_Tool_Shovel.java | 28 +- .../gregtech/common/tools/GT_Tool_SoftHammer.java | 18 +- .../common/tools/GT_Tool_Soldering_Iron.java | 29 +- .../java/gregtech/common/tools/GT_Tool_Sword.java | 36 +- .../gregtech/common/tools/GT_Tool_Turbine.java | 5 +- .../common/tools/GT_Tool_UniversalSpade.java | 56 +- .../gregtech/common/tools/GT_Tool_WireCutter.java | 13 +- .../java/gregtech/common/tools/GT_Tool_Wrench.java | 19 +- .../gregtech/common/tools/GT_Tool_Wrench_HV.java | 10 +- .../gregtech/common/tools/GT_Tool_Wrench_LV.java | 13 +- .../gregtech/common/tools/GT_Tool_Wrench_MV.java | 10 +- 336 files changed, 31761 insertions(+), 13291 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 be253742e2..15901703af 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -5,6 +5,8 @@ package gregtech.common; +import static org.lwjgl.opengl.GL11.GL_LINE_LOOP; + import codechicken.lib.vec.Rotation; import codechicken.lib.vec.Scale; import codechicken.lib.vec.Transformation; @@ -31,11 +33,11 @@ import gregtech.api.util.ColorsMetadataSection; import gregtech.api.util.ColorsMetadataSectionSerializer; import gregtech.api.util.GT_ClientPreference; import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_PlayedSound; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.api.util.WorldSpawnedEventBuilder; -import gregtech.api.util.GT_ModHandler; import gregtech.common.entities.GT_Entity_Arrow; import gregtech.common.entities.GT_Entity_Arrow_Potion; import gregtech.common.net.MessageUpdateFluidDisplayItem; @@ -44,6 +46,14 @@ import gregtech.common.render.items.GT_MetaGenerated_Item_Renderer; import gregtech.loaders.ExtraIcons; import gregtech.loaders.preload.GT_PreLoad; import ic2.api.tile.IWrenchable; +import java.net.URL; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Scanner; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GLAllocation; @@ -63,64 +73,65 @@ import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.oredict.OreDictionary; import org.lwjgl.opengl.GL11; -import java.net.URL; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Scanner; - -import static org.lwjgl.opengl.GL11.GL_LINE_LOOP; - // Referenced classes of package gregtech.common: // GT_Proxy -public class GT_Client extends GT_Proxy - implements Runnable { +public class GT_Client extends GT_Proxy implements Runnable { - public static final String GTNH_CAPE_LIST_URL = "https://raw.githubusercontent.com/GTNewHorizons/CustomGTCapeHook-Cape-List/master/capes.txt"; - public static final String GT_CAPE_LIST_URL = "http://gregtech.overminddl1.com/com/gregoriust/gregtech/supporterlist.txt"; + public static final String GTNH_CAPE_LIST_URL = + "https://raw.githubusercontent.com/GTNewHorizons/CustomGTCapeHook-Cape-List/master/capes.txt"; + public static final String GT_CAPE_LIST_URL = + "http://gregtech.overminddl1.com/com/gregoriust/gregtech/supporterlist.txt"; 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}, + 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}, }; // 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, -1, 2, 0, 3, 1, + -1, -1, 0, 2, 3, 1, + 0, 2, -1, -1, 3, 1, + 2, 0, -1, -1, 3, 1, + 1, 3, 2, 0, -1, -1, + 3, 1, 2, 0, -1, -1 }; private static final Transformation[] ROTATION_MARKER_TRANSFORMS_CORNER = { - new Scale(0.25).with(new Translation(0.375, 0, 0.375)).compile(), - new Scale(0.25).with(new Translation(-0.375, 0, 0.375)).compile(), - new Scale(0.25).with(new Translation(0.375, 0, -0.375)).compile(), - new Scale(0.25).with(new Translation(-0.375, 0, -0.375)).compile(), + new Scale(0.25).with(new Translation(0.375, 0, 0.375)).compile(), + new Scale(0.25).with(new Translation(-0.375, 0, 0.375)).compile(), + new Scale(0.25).with(new Translation(0.375, 0, -0.375)).compile(), + new Scale(0.25).with(new Translation(-0.375, 0, -0.375)).compile(), }; private static int rotationMarkerDisplayList; private static boolean rotationMarkerDisplayListCompiled = false; 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); + 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); } private final HashSet mCapeList = new HashSet<>(); @@ -147,6 +158,7 @@ public class GT_Client extends GT_Proxy * This is the place to def the value used below **/ private long afterSomeTime; + private boolean mAnimationDirection; private int mLastUpdatedBlockX; private int mLastUpdatedBlockY; @@ -160,38 +172,134 @@ public class GT_Client extends GT_Proxy mCapeRenderer = new GT_CapeRenderer(mCapeList); 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); - 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); - 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); + 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); + 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); + 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); 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); - 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); - 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); + 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); + 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); + 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); mMoltenNegR = Collections.singletonList(Materials.InfusedEntropy); mMoltenNegG = Collections.singletonList(Materials.InfusedEntropy); mMoltenNegB = Collections.singletonList(Materials.InfusedEntropy); } - private static boolean checkedForChicken = false; - private static void drawGrid(DrawBlockHighlightEvent aEvent, boolean showCoverConnections, boolean aIsWrench, boolean aIsSneaking) { + private static void drawGrid( + DrawBlockHighlightEvent aEvent, boolean showCoverConnections, boolean aIsWrench, boolean aIsSneaking) { if (!checkedForChicken) { - try {Class.forName("codechicken.lib.vec.Rotation");} catch (ClassNotFoundException e) {return;} + try { + Class.forName("codechicken.lib.vec.Rotation"); + } catch (ClassNotFoundException e) { + return; + } checkedForChicken = true; } 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)); - GL11.glTranslated((float) aEvent.target.blockX + 0.5F, (float) aEvent.target.blockY + 0.5F, (float) aEvent.target.blockZ + 0.5F); + 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)); + GL11.glTranslated( + (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 @@ -207,18 +315,17 @@ public class GT_Client extends GT_Proxy 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; if (tTile instanceof ICoverable) { if (showCoverConnections) { for (byte i = 0; i < 6; i++) { - if (((ICoverable) tTile).getCoverIDAtSide(i) > 0) - tConnections = (byte) (tConnections + (1 << i)); + if (((ICoverable) tTile).getCoverIDAtSide(i) > 0) tConnections = (byte) (tConnections + (1 << i)); } - } else if (tTile instanceof BaseMetaPipeEntity) - tConnections = ((BaseMetaPipeEntity) tTile).mConnections; + } else if (tTile instanceof BaseMetaPipeEntity) tConnections = ((BaseMetaPipeEntity) tTile).mConnections; } if (tConnections > 0) { @@ -280,7 +387,7 @@ public class GT_Client extends GT_Proxy GL11.glEnd(); // draw turning indicator if (aIsWrench && tTile instanceof IAlignmentProvider) { - final IAlignment tAlignment = ((IAlignmentProvider)(tTile)).getAlignment(); + final IAlignment tAlignment = ((IAlignmentProvider) (tTile)).getAlignment(); if (tAlignment != null) { final ForgeDirection direction = tAlignment.getDirection(); if (direction.ordinal() == tSideHit) @@ -290,7 +397,11 @@ public class GT_Client extends GT_Proxy drawExtendedRotationMarker(t, aIsSneaking, true); } } else { - drawExtendedRotationMarker(ROTATION_MARKER_TRANSFORMS_SIDES_TRANSFORMS[ROTATION_MARKER_TRANSFORMS_SIDES[tSideHit * 6 + direction.ordinal()]], aIsSneaking, true); + drawExtendedRotationMarker( + ROTATION_MARKER_TRANSFORMS_SIDES_TRANSFORMS[ + ROTATION_MARKER_TRANSFORMS_SIDES[tSideHit * 6 + direction.ordinal()]], + aIsSneaking, + true); } } } @@ -298,10 +409,8 @@ public class GT_Client extends GT_Proxy } private static void drawExtendedRotationMarker(Transformation transform, boolean sneaking, boolean small) { - if (sneaking) - drawFlipMarker(transform); - else - drawRotationMarker(transform); + if (sneaking) drawFlipMarker(transform); + else drawRotationMarker(transform); } private static void drawRotationMarker(Transformation transform) { @@ -320,10 +429,16 @@ public class GT_Client extends GT_Proxy GL11.glNewList(displayList, GL11.GL_COMPILE); 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); + 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); } - 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); + 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); } GL11.glVertex3d(0.141114561800, 0, 0); GL11.glVertex3d(0.32, 0, -0.178885438199); @@ -403,22 +518,36 @@ public class GT_Client extends GT_Proxy super.onPreLoad(); MinecraftForge.EVENT_BUS.register(new ExtraIcons()); - Minecraft.getMinecraft().getResourcePackRepository().rprMetadataSerializer.registerMetadataSectionType(new ColorsMetadataSectionSerializer(), ColorsMetadataSection.class); + Minecraft.getMinecraft() + .getResourcePackRepository() + .rprMetadataSerializer + .registerMetadataSectionType(new ColorsMetadataSectionSerializer(), ColorsMetadataSection.class); 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" + "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" }; for (String tName : arr) { mCapeList.add(tName.toLowerCase()); @@ -449,12 +578,11 @@ public class GT_Client extends GT_Proxy try { for (int i = 1; i < GregTech_API.METATILEENTITIES.length; i++) { try { - if (GregTech_API.METATILEENTITIES[i] != null) { + if (GregTech_API.METATILEENTITIES[i] != null) { GregTech_API.METATILEENTITIES[i].getStackForm(1L).getTooltip(null, true); GT_Log.out.println("META " + i + " " + GregTech_API.METATILEENTITIES[i].getMetaName()); } - } - catch (Throwable e) { + } catch (Throwable e) { e.printStackTrace(GT_Log.err); } } @@ -463,10 +591,9 @@ public class GT_Client extends GT_Proxy } if (Loader.isModLoaded("Avaritia")) { - CosmicItemRendererGT.registerItemWithMeta(Item.getItemFromBlock( GregTech_API.sBlockCasings5), 14); + CosmicItemRendererGT.registerItemWithMeta(Item.getItemFromBlock(GregTech_API.sBlockCasings5), 14); CosmicItemRendererGT.init(); } - } @Override @@ -520,13 +647,38 @@ public class GT_Client extends GT_Proxy mFirstTick = false; GT_Values.NW.sendToServer(new GT_Packet_ClientPreference(mPreference)); - if(!Minecraft.getMinecraft().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.addIC2RecipesToGT(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.addIC2RecipesToGT(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); + if (!Minecraft.getMinecraft().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.addIC2RecipesToGT( + 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.addIC2RecipesToGT( + 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); } } afterSomeTime++; @@ -535,12 +687,16 @@ public class GT_Client extends GT_Proxy StatFileWriter sfw = Minecraft.getMinecraft().thePlayer.getStatFileWriter(); try { for (GT_Recipe recipe : GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList) { - recipe.mHidden = GT_Values.hideAssLineRecipes && !sfw.hasAchievementUnlocked(GT_Mod.achievements.getAchievement(recipe.getOutput(0).getUnlocalizedName())); + recipe.mHidden = GT_Values.hideAssLineRecipes + && !sfw.hasAchievementUnlocked(GT_Mod.achievements.getAchievement( + recipe.getOutput(0).getUnlocalizedName())); } } catch (Exception ignored) { } } - for (Iterator> iterator = GT_Utility.sPlayedSoundMap.entrySet().iterator(); iterator.hasNext(); ) { + for (Iterator> iterator = + GT_Utility.sPlayedSoundMap.entrySet().iterator(); + iterator.hasNext(); ) { Map.Entry tEntry = iterator.next(); if (tEntry.getValue() < 0) { iterator.remove(); @@ -551,18 +707,22 @@ public class GT_Client extends GT_Proxy if (!GregTech_API.mServerStarted) GregTech_API.mServerStarted = true; 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)) { + 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; - final TileEntity tileEntity = aEvent.player.worldObj.getTileEntity(trace.blockX, trace.blockY, trace.blockZ); + final TileEntity tileEntity = + aEvent.player.worldObj.getTileEntity(trace.blockX, trace.blockY, trace.blockZ); if (tileEntity instanceof IGregTechTileEntity) { final IGregTechTileEntity gtTile = (IGregTechTileEntity) tileEntity; if (gtTile.getMetaTileEntity() instanceof IHasFluidDisplayItem) { - GT_Values.NW.sendToServer(new MessageUpdateFluidDisplayItem(trace.blockX, trace.blockY, trace.blockZ, gtTile.getWorld().provider.dimensionId)); + GT_Values.NW.sendToServer(new MessageUpdateFluidDisplayItem( + trace.blockX, trace.blockY, trace.blockZ, gtTile.getWorld().provider.dimensionId)); } } } @@ -577,35 +737,36 @@ public class GT_Client extends GT_Proxy // refresh client preference and send to server, since it's the only config we allow changing at runtime. mPreference = new GT_ClientPreference(GregTech_API.sClientDataFile); GT_PreLoad.loadClientConfig(); - if (e.isWorldRunning) - GT_Values.NW.sendToServer(new GT_Packet_ClientPreference(mPreference)); + if (e.isWorldRunning) GT_Values.NW.sendToServer(new GT_Packet_ClientPreference(mPreference)); } } @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()); + if (aTileEntity instanceof ITurnable + || ROTATABLE_VANILLA_BLOCKS.contains(aBlock) + || aTileEntity instanceof IWrenchable) drawGrid(aEvent, false, true, aEvent.player.isSneaking()); return; } - if (!(aTileEntity instanceof ICoverable)) - return; + if (!(aTileEntity instanceof ICoverable)) return; - if (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sWireCutterList) || - GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sSolderingToolList)) { + if (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sWireCutterList) + || 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)) { + if ((aEvent.currentItem == null && aEvent.player.isSneaking()) + || 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 i = 0; i < 6; i++) if (((ICoverable) aTileEntity).getCoverIDAtSide(i) > 0) { @@ -710,7 +871,6 @@ public class GT_Client extends GT_Proxy for (Materials tMaterial : mMoltenNegA) { tMaterial.mMoltenRGBa[3] = getSafeRGBValue(tMaterial.mMoltenRGBa[3], -tDirection); } - } } @@ -723,14 +883,12 @@ public class GT_Client extends GT_Proxy @Override public void doSonictronSound(ItemStack aStack, World aWorld, double aX, double aY, double aZ) { - if (GT_Utility.isStackInvalid(aStack)) - return; + if (GT_Utility.isStackInvalid(aStack)) return; String tString = SoundResource.NOTE_HARP.toString(); int i = 0; int j = mSoundItems.size(); do { - if (i >= j) - break; + if (i >= j) break; if (GT_Utility.areStacksEqual(mSoundItems.get(i), aStack)) { tString = mSoundNames.get(i); break; @@ -738,10 +896,8 @@ public class GT_Client extends GT_Proxy i++; } while (true); if (tString.startsWith(SoundResource.RANDOM_EXPLODE.toString())) - if (aStack.stackSize == 3) - tString = SoundResource.RANDOM_FUSE.toString(); - else if (aStack.stackSize == 2) - tString = "random.old_explode"; + if (aStack.stackSize == 3) tString = SoundResource.RANDOM_FUSE.toString(); + else if (aStack.stackSize == 2) tString = "random.old_explode"; if (tString.startsWith("streaming.")) switch (aStack.stackSize) { case 1: // '\001' @@ -804,7 +960,10 @@ public class GT_Client extends GT_Proxy } else { new WorldSpawnedEventBuilder.SoundEventBuilder() .setVolume(3f) - .setPitch(tString.startsWith("note.") ? (float) Math.pow(2D, (double) (aStack.stackSize - 13) / 12D) : 1.0F) + .setPitch( + tString.startsWith("note.") + ? (float) Math.pow(2D, (double) (aStack.stackSize - 13) / 12D) + : 1.0F) .setIdentifier(tString) .setPosition(aX, aY, aZ) .run(); diff --git a/src/main/java/gregtech/common/GT_DummyWorld.java b/src/main/java/gregtech/common/GT_DummyWorld.java index 756e35863f..cfc89c9df6 100644 --- a/src/main/java/gregtech/common/GT_DummyWorld.java +++ b/src/main/java/gregtech/common/GT_DummyWorld.java @@ -1,5 +1,6 @@ package gregtech.common; +import java.io.File; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; @@ -16,67 +17,69 @@ import net.minecraft.world.storage.IPlayerFileData; import net.minecraft.world.storage.ISaveHandler; import net.minecraft.world.storage.WorldInfo; -import java.io.File; - public class GT_DummyWorld extends World { public GT_IteratorRandom mRandom = new GT_IteratorRandom(); public ItemStack mLastSetBlock = null; - public GT_DummyWorld(ISaveHandler saveHandler, String name, WorldProvider worldProvider, WorldSettings worldSettings, Profiler profiler) { + public GT_DummyWorld( + ISaveHandler saveHandler, + String name, + WorldProvider worldProvider, + WorldSettings worldSettings, + Profiler profiler) { super(saveHandler, name, worldSettings, worldProvider, profiler); this.rand = this.mRandom; } public GT_DummyWorld() { - this(new ISaveHandler() { - @Override - public void saveWorldInfoWithPlayer(WorldInfo worldInfo, NBTTagCompound nbtTagCompound) { - } - - @Override - public void saveWorldInfo(WorldInfo worldInfo) { - } - - @Override - public WorldInfo loadWorldInfo() { - return null; - } - - @Override - public IPlayerFileData getSaveHandler() { - return null; - } - - @Override - public File getMapFileFromName(String mapName) { - return null; - } - - @Override - public IChunkLoader getChunkLoader(WorldProvider worldProvider) { - return null; - } - - @Override - public void flush() { - } - - @Override - public void checkSessionLock() { - } - - @Override - public String getWorldDirectoryName() { - return null; - } - - @Override - public File getWorldDirectory() { - return null; - } - }, "DUMMY_DIMENSION", null, - - new WorldSettings(new WorldInfo(new NBTTagCompound())), new Profiler()); + this( + new ISaveHandler() { + @Override + public void saveWorldInfoWithPlayer(WorldInfo worldInfo, NBTTagCompound nbtTagCompound) {} + + @Override + public void saveWorldInfo(WorldInfo worldInfo) {} + + @Override + public WorldInfo loadWorldInfo() { + return null; + } + + @Override + public IPlayerFileData getSaveHandler() { + return null; + } + + @Override + public File getMapFileFromName(String mapName) { + return null; + } + + @Override + public IChunkLoader getChunkLoader(WorldProvider worldProvider) { + return null; + } + + @Override + public void flush() {} + + @Override + public void checkSessionLock() {} + + @Override + public String getWorldDirectoryName() { + return null; + } + + @Override + public File getWorldDirectory() { + return null; + } + }, + "DUMMY_DIMENSION", + null, + new WorldSettings(new WorldInfo(new NBTTagCompound())), + new Profiler()); } @Override diff --git a/src/main/java/gregtech/common/GT_Network.java b/src/main/java/gregtech/common/GT_Network.java index 8db38d86f7..39f50a9e04 100644 --- a/src/main/java/gregtech/common/GT_Network.java +++ b/src/main/java/gregtech/common/GT_Network.java @@ -1,5 +1,7 @@ package gregtech.common; +import static gregtech.GT_Mod.GT_FML_LOGGER; + import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteStreams; import cpw.mods.fml.common.network.FMLEmbeddedChannel; @@ -18,16 +20,13 @@ import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.SimpleChannelInboundHandler; import io.netty.handler.codec.MessageToMessageCodec; +import java.util.EnumMap; +import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; -import java.util.EnumMap; -import java.util.List; - -import static gregtech.GT_Mod.GT_FML_LOGGER; - @ChannelHandler.Sharable @SuppressWarnings("deprecation") public class GT_Network extends MessageToMessageCodec implements IGT_NetworkHandler { @@ -35,49 +34,49 @@ public class GT_Network extends MessageToMessageCodec private final GT_Packet[] mSubChannels; public GT_Network() { - this("GregTech", - new GT_Packet_TileEntity(), - new GT_Packet_Sound(), - new GT_Packet_Block_Event(), - new GT_Packet_Ores(), - new GT_Packet_Pollution(), - new MessageSetFlaskCapacity(), - new GT_Packet_TileEntityCover(), - new GT_Packet_TileEntityCoverGUI(), - new MessageUpdateFluidDisplayItem(), - new GT_Packet_ClientPreference(), - new GT_Packet_WirelessRedstoneCover(), - new GT_Packet_TileEntityCoverNew(), - new GT_Packet_SetConfigurationCircuit(), - new GT_Packet_UpdateItem(), - new GT_Packet_SetLockedFluid(), - new GT_Packet_GtTileEntityGuiRequest(), -