From 0d9aab72aa570f13dc3e32e0d32b3f3a95f95e0a Mon Sep 17 00:00:00 2001 From: Jason Mitchell Date: Mon, 30 Jan 2023 10:56:42 -0800 Subject: [ci skip] spotlessApply with the new settings --- src/main/java/gregtech/common/GT_Client.java | 330 +- src/main/java/gregtech/common/GT_DummyWorld.java | 102 +- .../java/gregtech/common/GT_IteratorRandom.java | 1 + src/main/java/gregtech/common/GT_Network.java | 50 +- .../gregtech/common/GT_PlayerActivityLogger.java | 9 +- src/main/java/gregtech/common/GT_Pollution.java | 168 +- src/main/java/gregtech/common/GT_Proxy.java | 2073 +++---- src/main/java/gregtech/common/GT_RecipeAdder.java | 1762 +++--- src/main/java/gregtech/common/GT_Server.java | 1 + .../java/gregtech/common/GT_ThaumcraftCompat.java | 86 +- .../java/gregtech/common/GT_UndergroundOil.java | 82 +- .../gregtech/common/GT_Worldgen_GT_Ore_Layer.java | 437 +- .../common/GT_Worldgen_GT_Ore_SmallPieces.java | 88 +- .../java/gregtech/common/GT_Worldgen_Stone.java | 235 +- .../java/gregtech/common/GT_Worldgenerator.java | 353 +- .../gregtech/common/bees/GT_AlleleBeeSpecies.java | 20 +- .../java/gregtech/common/bees/GT_AlleleHelper.java | 97 +- .../java/gregtech/common/bees/GT_Bee_Mutation.java | 48 +- .../gregtech/common/blocks/GT_Block_Casings1.java | 31 +- .../gregtech/common/blocks/GT_Block_Casings2.java | 19 +- .../gregtech/common/blocks/GT_Block_Casings3.java | 15 +- .../gregtech/common/blocks/GT_Block_Casings4.java | 114 +- .../gregtech/common/blocks/GT_Block_Casings5.java | 8 +- .../gregtech/common/blocks/GT_Block_Casings6.java | 8 +- .../gregtech/common/blocks/GT_Block_Casings8.java | 65 +- .../gregtech/common/blocks/GT_Block_Casings9.java | 10 +- .../common/blocks/GT_Block_Casings_Abstract.java | 21 +- .../gregtech/common/blocks/GT_Block_Concretes.java | 15 +- .../gregtech/common/blocks/GT_Block_Granites.java | 10 +- .../gregtech/common/blocks/GT_Block_Machines.java | 115 +- .../gregtech/common/blocks/GT_Block_Metal.java | 8 +- .../java/gregtech/common/blocks/GT_Block_Ores.java | 75 +- .../common/blocks/GT_Block_Ores_Abstract.java | 86 +- .../gregtech/common/blocks/GT_Block_Ores_UB1.java | 60 +- .../gregtech/common/blocks/GT_Block_Ores_UB2.java | 64 +- .../gregtech/common/blocks/GT_Block_Ores_UB3.java | 64 +- .../common/blocks/GT_Block_Reinforced.java | 87 +- .../gregtech/common/blocks/GT_Block_Stones.java | 18 +- .../common/blocks/GT_Block_Stones_Abstract.java | 47 +- .../gregtech/common/blocks/GT_Block_Storage.java | 10 +- .../gregtech/common/blocks/GT_Cyclotron_Coils.java | 10 +- .../common/blocks/GT_Cyclotron_Item_Casings.java | 1 + .../gregtech/common/blocks/GT_Item_Casings1.java | 1 + .../gregtech/common/blocks/GT_Item_Casings2.java | 2 + .../gregtech/common/blocks/GT_Item_Casings3.java | 1 + .../gregtech/common/blocks/GT_Item_Casings4.java | 1 + .../gregtech/common/blocks/GT_Item_Casings5.java | 19 +- .../gregtech/common/blocks/GT_Item_Casings6.java | 1 + .../gregtech/common/blocks/GT_Item_Casings8.java | 1 + .../gregtech/common/blocks/GT_Item_Casings9.java | 1 + .../common/blocks/GT_Item_Casings_Abstract.java | 55 +- .../gregtech/common/blocks/GT_Item_Concretes.java | 9 +- .../gregtech/common/blocks/GT_Item_Granites.java | 1 + .../common/blocks/GT_Item_LongDistancePipe.java | 15 +- .../gregtech/common/blocks/GT_Item_Machines.java | 245 +- .../java/gregtech/common/blocks/GT_Item_Ores.java | 39 +- .../common/blocks/GT_Item_Stones_Abstract.java | 11 +- .../gregtech/common/blocks/GT_Item_Storage.java | 5 +- .../common/blocks/GT_Material_Casings.java | 1 + .../common/blocks/GT_Material_Machines.java | 1 + .../common/blocks/GT_Material_Reinforced.java | 1 + .../gregtech/common/blocks/GT_Packet_Ores.java | 9 +- .../gregtech/common/blocks/GT_TileEntity_Ores.java | 159 +- .../java/gregtech/common/covers/CoverInfo.java | 27 +- .../java/gregtech/common/covers/GT_Cover_Arm.java | 236 +- .../common/covers/GT_Cover_ControlsWork.java | 132 +- .../gregtech/common/covers/GT_Cover_Conveyor.java | 161 +- .../gregtech/common/covers/GT_Cover_Crafting.java | 51 +- .../gregtech/common/covers/GT_Cover_DoesWork.java | 114 +- .../gregtech/common/covers/GT_Cover_Drain.java | 110 +- .../gregtech/common/covers/GT_Cover_EUMeter.java | 160 +- .../gregtech/common/covers/GT_Cover_FacadeAE.java | 4 +- .../common/covers/GT_Cover_FacadeBase.java | 223 +- .../common/covers/GT_Cover_FluidLimiter.java | 63 +- .../common/covers/GT_Cover_FluidRegulator.java | 325 +- .../covers/GT_Cover_FluidStorageMonitor.java | 157 +- .../common/covers/GT_Cover_Fluidfilter.java | 319 +- .../common/covers/GT_Cover_ItemFilter.java | 120 +- .../gregtech/common/covers/GT_Cover_ItemMeter.java | 165 +- .../java/gregtech/common/covers/GT_Cover_Lens.java | 5 +- .../common/covers/GT_Cover_LiquidMeter.java | 121 +- .../common/covers/GT_Cover_NeedMaintainance.java | 220 +- .../common/covers/GT_Cover_PlayerDetector.java | 103 +- .../java/gregtech/common/covers/GT_Cover_Pump.java | 177 +- .../common/covers/GT_Cover_RedstoneConductor.java | 32 +- .../covers/GT_Cover_RedstoneReceiverExternal.java | 15 +- .../covers/GT_Cover_RedstoneReceiverInternal.java | 21 +- .../common/covers/GT_Cover_RedstoneSignalizer.java | 31 +- .../GT_Cover_RedstoneTransmitterExternal.java | 15 +- .../GT_Cover_RedstoneTransmitterInternal.java | 16 +- .../covers/GT_Cover_RedstoneWirelessBase.java | 108 +- .../gregtech/common/covers/GT_Cover_Screen.java | 32 +- .../gregtech/common/covers/GT_Cover_Shutter.java | 124 +- .../common/covers/GT_Cover_SolarPanel.java | 42 +- .../common/covers/GT_Cover_SteamValve.java | 7 +- .../java/gregtech/common/covers/GT_Cover_Vent.java | 21 +- .../GT_Cover_AdvancedRedstoneReceiverBase.java | 61 +- .../GT_Cover_AdvancedRedstoneReceiverExternal.java | 17 +- .../GT_Cover_AdvancedRedstoneReceiverInternal.java | 17 +- .../GT_Cover_AdvancedRedstoneTransmitterBase.java | 64 +- ..._Cover_AdvancedRedstoneTransmitterExternal.java | 13 +- ..._Cover_AdvancedRedstoneTransmitterInternal.java | 17 +- .../GT_Cover_AdvancedWirelessRedstoneBase.java | 117 +- .../redstone/GT_Cover_WirelessFluidDetector.java | 46 +- .../redstone/GT_Cover_WirelessItemDetector.java | 110 +- .../GT_Cover_WirelessMaintenanceDetector.java | 70 +- .../common/entities/GT_EntityFXPollution.java | 1 + .../gregtech/common/entities/GT_Entity_Arrow.java | 156 +- .../common/entities/GT_Entity_Arrow_Potion.java | 30 +- src/main/java/gregtech/common/fluid/GT_Fluid.java | 33 +- .../gregtech/common/fluid/GT_FluidBuilder.java | 18 +- .../gregtech/common/gui/modularui/UIHelper.java | 80 +- .../modularui/uifactory/SelectItemUIFactory.java | 124 +- .../common/gui/modularui/widget/AESlotWidget.java | 7 +- .../modularui/widget/CoverCycleButtonWidget.java | 28 +- .../widget/CoverDataControllerWidget.java | 77 +- .../CoverDataFollower_CycleButtonWidget.java | 5 +- .../widget/CoverDataFollower_SlotWidget.java | 11 +- .../widget/CoverDataFollower_TextFieldWidget.java | 9 +- .../CoverDataFollower_ToggleButtonWidget.java | 8 +- .../gui/modularui/widget/DataControllerWidget.java | 41 +- .../modularui/widget/FluidDisplaySlotWidget.java | 82 +- .../modularui/widget/ItemWatcherSlotWidget.java | 10 +- src/main/java/gregtech/common/items/CombType.java | 39 +- src/main/java/gregtech/common/items/DropType.java | 18 +- .../common/items/GT_DepletetCell_Item.java | 22 +- .../gregtech/common/items/GT_FluidDisplayItem.java | 58 +- .../common/items/GT_IntegratedCircuit_Item.java | 269 +- .../common/items/GT_MetaGenerated_Item_01.java | 6526 +++++++++----------- .../common/items/GT_MetaGenerated_Item_02.java | 4319 +++++++------ .../common/items/GT_MetaGenerated_Item_03.java | 1434 +++-- .../common/items/GT_MetaGenerated_Item_98.java | 76 +- .../common/items/GT_MetaGenerated_Item_99.java | 42 +- .../common/items/GT_MetaGenerated_Tool_01.java | 243 +- .../common/items/GT_NeutronReflector_Item.java | 15 +- .../gregtech/common/items/GT_SensorCard_Item.java | 21 +- .../gregtech/common/items/GT_VolumetricFlask.java | 113 +- src/main/java/gregtech/common/items/ItemComb.java | 1390 ++--- src/main/java/gregtech/common/items/ItemDrop.java | 33 +- .../java/gregtech/common/items/ItemPollen.java | 11 +- .../java/gregtech/common/items/ItemPropolis.java | 38 +- .../java/gregtech/common/items/PollenType.java | 8 +- .../java/gregtech/common/items/PropolisType.java | 7 +- .../common/items/behaviors/Behaviour_Arrow.java | 65 +- .../items/behaviors/Behaviour_Arrow_Potion.java | 40 +- .../items/behaviors/Behaviour_Cover_Tool.java | 94 +- .../common/items/behaviors/Behaviour_Crowbar.java | 24 +- .../common/items/behaviors/Behaviour_DataOrb.java | 7 +- .../items/behaviors/Behaviour_DataStick.java | 7 +- .../common/items/behaviors/Behaviour_Hoe.java | 36 +- .../common/items/behaviors/Behaviour_Lighter.java | 63 +- .../common/items/behaviors/Behaviour_None.java | 62 +- .../behaviors/Behaviour_Plunger_Essentia.java | 45 +- .../items/behaviors/Behaviour_Plunger_Fluid.java | 47 +- .../items/behaviors/Behaviour_Plunger_Item.java | 52 +- .../items/behaviors/Behaviour_PrintedPages.java | 7 +- .../items/behaviors/Behaviour_Prospecting.java | 75 +- .../common/items/behaviors/Behaviour_Scanner.java | 31 +- .../common/items/behaviors/Behaviour_Scoop.java | 42 +- .../items/behaviors/Behaviour_Screwdriver.java | 24 +- .../common/items/behaviors/Behaviour_Sense.java | 29 +- .../items/behaviors/Behaviour_SensorKit.java | 30 +- .../items/behaviors/Behaviour_SoftHammer.java | 65 +- .../items/behaviors/Behaviour_Sonictron.java | 34 +- .../items/behaviors/Behaviour_Spray_Color.java | 40 +- .../items/behaviors/Behaviour_Switch_Metadata.java | 25 +- .../common/items/behaviors/Behaviour_Wrench.java | 67 +- .../items/behaviors/Behaviour_WrittenBook.java | 25 +- .../common/misc/GT_ClientPollutionMap.java | 67 +- src/main/java/gregtech/common/misc/GT_Command.java | 235 +- .../common/misc/GT_DrillingLogicDelegate.java | 56 +- .../misc/GT_IDrillingLogicDelegateOwner.java | 3 +- .../common/misc/GlobalEnergyWorldSavedData.java | 4 +- .../common/net/MessageSetFlaskCapacity.java | 11 +- .../common/net/MessageUpdateFluidDisplayItem.java | 11 +- .../gregtech/common/power/BasicMachineEUPower.java | 6 +- src/main/java/gregtech/common/power/EUPower.java | 1 + src/main/java/gregtech/common/power/Power.java | 1 + .../java/gregtech/common/power/SteamPower.java | 3 +- .../gregtech/common/power/UnspecifiedEUPower.java | 1 + .../redstonecircuits/GT_Circuit_BasicLogic.java | 12 +- .../common/redstonecircuits/GT_Circuit_BitAnd.java | 10 +- .../GT_Circuit_CombinationLock.java | 1 + .../common/redstonecircuits/GT_Circuit_Equals.java | 8 +- .../common/redstonecircuits/GT_Circuit_Pulser.java | 10 +- .../redstonecircuits/GT_Circuit_Randomizer.java | 5 +- .../redstonecircuits/GT_Circuit_RedstoneMeter.java | 8 +- .../redstonecircuits/GT_Circuit_Repeater.java | 1 + .../common/redstonecircuits/GT_Circuit_Timer.java | 1 + .../common/render/CosmicItemRendererGT.java | 4 +- .../gregtech/common/render/GT_CapeRenderer.java | 46 +- .../common/render/GT_CopiedBlockTexture.java | 26 +- .../common/render/GT_CopiedCTMBlockTexture.java | 48 +- .../gregtech/common/render/GT_FlaskRenderer.java | 13 +- .../render/GT_FluidDisplayStackRenderer.java | 20 +- .../gregtech/common/render/GT_IconFlipped.java | 4 +- .../render/GT_MetaGenerated_Tool_Renderer.java | 28 +- .../gregtech/common/render/GT_MultiTexture.java | 14 +- .../common/render/GT_PollutionRenderer.java | 52 +- .../java/gregtech/common/render/GT_RenderUtil.java | 20 +- .../gregtech/common/render/GT_RenderedTexture.java | 69 +- .../gregtech/common/render/GT_Renderer_Block.java | 319 +- .../common/render/GT_Renderer_Entity_Arrow.java | 4 +- .../gregtech/common/render/GT_SidedTexture.java | 32 +- .../gregtech/common/render/GT_TextureBase.java | 6 +- .../gregtech/common/render/GT_TextureBuilder.java | 19 +- .../gregtech/common/render/IRenderedBlock.java | 11 +- .../common/render/IRenderedBlockSideCheck.java | 6 +- .../render/items/CosmicNeutroniumRenderer.java | 11 +- .../render/items/GT_GeneratedItem_Renderer.java | 26 +- .../items/GT_GeneratedMaterial_Renderer.java | 24 +- .../items/GT_MetaGenerated_Item_Renderer.java | 12 +- .../common/render/items/GaiaSpiritRenderer.java | 8 +- .../common/render/items/InfinityRenderer.java | 16 +- .../render/items/TranscendentMetalRenderer.java | 49 +- .../common/render/items/UniversiumRenderer.java | 26 +- .../automation/GT_MetaTileEntity_ChestBuffer.java | 53 +- .../automation/GT_MetaTileEntity_Filter.java | 132 +- .../GT_MetaTileEntity_ItemDistributor.java | 73 +- .../automation/GT_MetaTileEntity_RecipeFilter.java | 43 +- .../automation/GT_MetaTileEntity_Regulator.java | 143 +- .../automation/GT_MetaTileEntity_SuperBuffer.java | 53 +- .../automation/GT_MetaTileEntity_TypeFilter.java | 51 +- .../boilers/GT_MetaTileEntity_Boiler.java | 148 +- .../boilers/GT_MetaTileEntity_Boiler_Bronze.java | 225 +- .../boilers/GT_MetaTileEntity_Boiler_Lava.java | 61 +- .../boilers/GT_MetaTileEntity_Boiler_Solar.java | 163 +- .../GT_MetaTileEntity_Boiler_Solar_Steel.java | 38 +- .../boilers/GT_MetaTileEntity_Boiler_Steel.java | 41 +- .../GT_MetaTileEntity_AdvDebugStructureWriter.java | 201 +- .../GT_MetaTileEntity_DieselGenerator.java | 185 +- .../generators/GT_MetaTileEntity_GasTurbine.java | 182 +- .../generators/GT_MetaTileEntity_LightningRod.java | 69 +- .../GT_MetaTileEntity_MagicEnergyConverter.java | 106 +- .../GT_MetaTileEntity_MagicalEnergyAbsorber.java | 221 +- .../GT_MetaTileEntity_NaquadahReactor.java | 127 +- .../GT_MetaTileEntity_PlasmaGenerator.java | 65 +- .../generators/GT_MetaTileEntity_SteamTurbine.java | 149 +- .../GT_MetaTileEntity_BasicHull_Bronze.java | 24 +- .../GT_MetaTileEntity_BasicHull_BronzeBricks.java | 35 +- .../GT_MetaTileEntity_BasicHull_Steel.java | 18 +- .../GT_MetaTileEntity_BasicHull_SteelBricks.java | 34 +- .../GT_MetaTileEntity_Hatch_InputBus_ME.java | 115 +- .../GT_MetaTileEntity_Hatch_OutputBus_ME.java | 75 +- .../GT_MetaTileEntity_Hatch_Output_ME.java | 78 +- .../GT_MetaTileEntity_AdvSeismicProspector.java | 174 +- .../basic/GT_MetaTileEntity_Boxinator.java | 115 +- .../machines/basic/GT_MetaTileEntity_Charger.java | 29 +- .../basic/GT_MetaTileEntity_CuringOven.java | 94 +- .../basic/GT_MetaTileEntity_Disassembler.java | 197 +- .../basic/GT_MetaTileEntity_IndustrialApiary.java | 474 +- .../basic/GT_MetaTileEntity_Massfabricator.java | 88 +- ..._MetaTileEntity_MicrowaveEnergyTransmitter.java | 235 +- .../machines/basic/GT_MetaTileEntity_Miner.java | 178 +- .../basic/GT_MetaTileEntity_MonsterRepellent.java | 85 +- .../basic/GT_MetaTileEntity_PotionBrewer.java | 83 +- .../machines/basic/GT_MetaTileEntity_Printer.java | 46 +- .../machines/basic/GT_MetaTileEntity_Pump.java | 293 +- .../basic/GT_MetaTileEntity_Replicator.java | 82 +- .../basic/GT_MetaTileEntity_RockBreaker.java | 77 +- .../machines/basic/GT_MetaTileEntity_Scanner.java | 166 +- .../basic/GT_MetaTileEntity_SeismicProspector.java | 213 +- .../basic/GT_MetaTileEntity_Teleporter.java | 387 +- ...GT_MetaTileEntity_LongDistancePipelineBase.java | 113 +- ...T_MetaTileEntity_LongDistancePipelineFluid.java | 67 +- ...GT_MetaTileEntity_LongDistancePipelineItem.java | 65 +- .../GT_MetaTileEntity_AbstractMultiFurnace.java | 3 +- .../multi/GT_MetaTileEntity_AssemblyLine.java | 209 +- .../GT_MetaTileEntity_BrickedBlastFurnace.java | 44 +- .../GT_MetaTileEntity_BronzeBlastFurnace.java | 30 +- .../multi/GT_MetaTileEntity_Charcoal_Pit.java | 115 +- .../multi/GT_MetaTileEntity_Cleanroom.java | 163 +- .../GT_MetaTileEntity_ConcreteBackfiller1.java | 1 + .../GT_MetaTileEntity_ConcreteBackfiller2.java | 1 + .../GT_MetaTileEntity_ConcreteBackfillerBase.java | 35 +- .../multi/GT_MetaTileEntity_DieselEngine.java | 218 +- .../multi/GT_MetaTileEntity_DistillationTower.java | 149 +- .../multi/GT_MetaTileEntity_DrillerBase.java | 183 +- .../GT_MetaTileEntity_ElectricBlastFurnace.java | 247 +- .../GT_MetaTileEntity_ExtremeDieselEngine.java | 143 +- .../multi/GT_MetaTileEntity_FusionComputer.java | 389 +- .../multi/GT_MetaTileEntity_FusionComputer1.java | 27 +- .../multi/GT_MetaTileEntity_FusionComputer2.java | 27 +- .../multi/GT_MetaTileEntity_FusionComputer3.java | 27 +- .../multi/GT_MetaTileEntity_HeatExchanger.java | 210 +- .../GT_MetaTileEntity_ImplosionCompressor.java | 76 +- .../GT_MetaTileEntity_IntegratedOreFactory.java | 235 +- .../multi/GT_MetaTileEntity_LargeBoiler.java | 181 +- .../GT_MetaTileEntity_LargeBoiler_Bronze.java | 3 +- .../multi/GT_MetaTileEntity_LargeBoiler_Steel.java | 4 +- .../GT_MetaTileEntity_LargeBoiler_Titanium.java | 4 +- ...T_MetaTileEntity_LargeBoiler_TungstenSteel.java | 4 +- .../GT_MetaTileEntity_LargeChemicalReactor.java | 198 +- .../multi/GT_MetaTileEntity_LargeTurbine.java | 242 +- .../multi/GT_MetaTileEntity_LargeTurbine_Gas.java | 79 +- ...GT_MetaTileEntity_LargeTurbine_GasAdvanced.java | 77 +- .../GT_MetaTileEntity_LargeTurbine_HPSteam.java | 95 +- .../GT_MetaTileEntity_LargeTurbine_Plasma.java | 218 +- .../GT_MetaTileEntity_LargeTurbine_Steam.java | 92 +- .../multi/GT_MetaTileEntity_MultiFurnace.java | 249 +- .../multi/GT_MetaTileEntity_NanoForge.java | 192 +- .../multi/GT_MetaTileEntity_OilCracker.java | 177 +- .../multi/GT_MetaTileEntity_OilDrill1.java | 1 + .../multi/GT_MetaTileEntity_OilDrill2.java | 1 + .../multi/GT_MetaTileEntity_OilDrill3.java | 1 + .../multi/GT_MetaTileEntity_OilDrillBase.java | 157 +- .../multi/GT_MetaTileEntity_OilDrillInfinite.java | 19 +- .../multi/GT_MetaTileEntity_OreDrillingPlant1.java | 1 + .../multi/GT_MetaTileEntity_OreDrillingPlant2.java | 1 + .../multi/GT_MetaTileEntity_OreDrillingPlant3.java | 1 + .../multi/GT_MetaTileEntity_OreDrillingPlant4.java | 1 + .../GT_MetaTileEntity_OreDrillingPlantBase.java | 128 +- .../multi/GT_MetaTileEntity_PCBFactory.java | 946 ++- .../multi/GT_MetaTileEntity_PlasmaForge.java | 1554 ++--- .../GT_MetaTileEntity_PrimitiveBlastFurnace.java | 237 +- .../multi/GT_MetaTileEntity_ProcessingArray.java | 269 +- .../multi/GT_MetaTileEntity_PyrolyseOven.java | 124 +- .../multi/GT_MetaTileEntity_VacuumFreezer.java | 81 +- .../machines/multiblock/MultiBlock_Macerator.java | 63 +- .../GT_MetaTileEntity_AlloySmelter_Bronze.java | 89 +- .../GT_MetaTileEntity_AlloySmelter_Steel.java | 89 +- .../steam/GT_MetaTileEntity_Compressor_Bronze.java | 88 +- .../steam/GT_MetaTileEntity_Compressor_Steel.java | 88 +- .../steam/GT_MetaTileEntity_Extractor_Bronze.java | 87 +- .../steam/GT_MetaTileEntity_Extractor_Steel.java | 87 +- .../GT_MetaTileEntity_ForgeHammer_Bronze.java | 102 +- .../steam/GT_MetaTileEntity_ForgeHammer_Steel.java | 102 +- .../steam/GT_MetaTileEntity_Furnace_Bronze.java | 95 +- .../steam/GT_MetaTileEntity_Furnace_Steel.java | 93 +- .../steam/GT_MetaTileEntity_Macerator_Bronze.java | 107 +- .../steam/GT_MetaTileEntity_Macerator_Steel.java | 106 +- .../GT_MetaTileEntity_DigitalChestBase.java | 221 +- .../storage/GT_MetaTileEntity_DigitalTankBase.java | 347 +- .../storage/GT_MetaTileEntity_Locker.java | 34 +- .../storage/GT_MetaTileEntity_QuantumChest.java | 8 +- .../storage/GT_MetaTileEntity_QuantumTank.java | 40 +- .../storage/GT_MetaTileEntity_SuperTank.java | 38 +- src/main/java/gregtech/common/tools/GT_Tool.java | 48 +- .../java/gregtech/common/tools/GT_Tool_Axe.java | 71 +- .../common/tools/GT_Tool_BranchCutter.java | 46 +- .../common/tools/GT_Tool_ButcheryKnife.java | 21 +- .../gregtech/common/tools/GT_Tool_BuzzSaw.java | 26 +- .../gregtech/common/tools/GT_Tool_Chainsaw_HV.java | 9 +- .../gregtech/common/tools/GT_Tool_Chainsaw_LV.java | 87 +- .../gregtech/common/tools/GT_Tool_Chainsaw_MV.java | 9 +- .../gregtech/common/tools/GT_Tool_Crowbar.java | 33 +- .../gregtech/common/tools/GT_Tool_Drill_HV.java | 14 +- .../gregtech/common/tools/GT_Tool_Drill_LV.java | 36 +- .../gregtech/common/tools/GT_Tool_Drill_MV.java | 9 +- .../java/gregtech/common/tools/GT_Tool_File.java | 28 +- .../gregtech/common/tools/GT_Tool_HardHammer.java | 77 +- .../java/gregtech/common/tools/GT_Tool_Hoe.java | 33 +- .../gregtech/common/tools/GT_Tool_JackHammer.java | 52 +- .../java/gregtech/common/tools/GT_Tool_Knife.java | 23 +- .../java/gregtech/common/tools/GT_Tool_Mortar.java | 18 +- .../gregtech/common/tools/GT_Tool_Pickaxe.java | 34 +- .../java/gregtech/common/tools/GT_Tool_Plow.java | 64 +- .../gregtech/common/tools/GT_Tool_Plunger.java | 30 +- .../gregtech/common/tools/GT_Tool_RollingPin.java | 20 +- .../java/gregtech/common/tools/GT_Tool_Saw.java | 57 +- .../java/gregtech/common/tools/GT_Tool_Scoop.java | 29 +- .../gregtech/common/tools/GT_Tool_Screwdriver.java | 36 +- .../common/tools/GT_Tool_Screwdriver_LV.java | 12 +- .../java/gregtech/common/tools/GT_Tool_Sense.java | 62 +- .../java/gregtech/common/tools/GT_Tool_Shovel.java | 36 +- .../gregtech/common/tools/GT_Tool_SoftHammer.java | 35 +- .../common/tools/GT_Tool_Soldering_Iron.java | 36 +- .../java/gregtech/common/tools/GT_Tool_Sword.java | 18 +- .../gregtech/common/tools/GT_Tool_Turbine.java | 18 +- .../common/tools/GT_Tool_Turbine_Huge.java | 1 + .../common/tools/GT_Tool_Turbine_Large.java | 1 + .../common/tools/GT_Tool_Turbine_Normal.java | 1 + .../common/tools/GT_Tool_Turbine_Small.java | 1 + .../common/tools/GT_Tool_UniversalSpade.java | 38 +- .../gregtech/common/tools/GT_Tool_WireCutter.java | 25 +- .../java/gregtech/common/tools/GT_Tool_Wrench.java | 33 +- .../gregtech/common/tools/GT_Tool_Wrench_HV.java | 12 +- .../gregtech/common/tools/GT_Tool_Wrench_LV.java | 20 +- .../gregtech/common/tools/GT_Tool_Wrench_MV.java | 12 +- .../tools/pocket/GT_Tool_Pocket_BranchCutter.java | 4 +- .../common/tools/pocket/GT_Tool_Pocket_File.java | 4 +- .../common/tools/pocket/GT_Tool_Pocket_Knife.java | 4 +- .../tools/pocket/GT_Tool_Pocket_Multitool.java | 6 +- .../common/tools/pocket/GT_Tool_Pocket_Saw.java | 4 +- .../tools/pocket/GT_Tool_Pocket_Screwdriver.java | 4 +- .../tools/pocket/GT_Tool_Pocket_WireCutter.java | 4 +- 386 files changed, 21592 insertions(+), 24907 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 20d0eca81f..3978a6383b 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -1,7 +1,7 @@ // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) -// Source File Name: GT_Client.java +// Source File Name: GT_Client.java package gregtech.common; @@ -9,12 +9,44 @@ import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; import static gregtech.api.enums.GT_Values.calculateMaxPlasmaTurbineEfficiency; import static org.lwjgl.opengl.GL11.GL_LINE_LOOP; +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; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.resources.IReloadableResourceManager; +import net.minecraft.client.resources.IResourceManager; +import net.minecraft.client.resources.IResourceManagerReloadListener; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.ChunkCoordIntPair; +import net.minecraft.world.World; +import net.minecraftforge.client.event.DrawBlockHighlightEvent; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.oredict.OreDictionary; + +import org.lwjgl.opengl.GL11; + import codechicken.lib.vec.Rotation; import codechicken.lib.vec.Scale; import codechicken.lib.vec.Transformation; import codechicken.lib.vec.Translation; + import com.gtnewhorizon.structurelib.alignment.IAlignment; import com.gtnewhorizon.structurelib.alignment.IAlignmentProvider; + import cpw.mods.fml.client.event.ConfigChangedEvent; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.Loader; @@ -51,76 +83,33 @@ import gregtech.common.tileentities.debug.GT_MetaTileEntity_AdvDebugStructureWri 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; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.resources.IReloadableResourceManager; -import net.minecraft.client.resources.IResourceManager; -import net.minecraft.client.resources.IResourceManagerReloadListener; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.ChunkCoordIntPair; -import net.minecraft.world.World; -import net.minecraftforge.client.event.DrawBlockHighlightEvent; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.oredict.OreDictionary; -import org.lwjgl.opengl.GL11; // Referenced classes of package gregtech.common: -// GT_Proxy +// GT_Proxy 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(), - }; - 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 - }; + new Scale(0.25).with(new Translation(0, 0, 0.375)).compile(), + new Scale(0.25).with(new Translation(0.375, 0, 0)).compile(), + new Scale(0.25).with(new Translation(0, 0, -0.375)).compile(), + new Scale(0.25).with(new Translation(-0.375, 0, 0)).compile(), }; + private static final int[] ROTATION_MARKER_TRANSFORMS_SIDES = { -1, -1, 2, 0, 3, 1, -1, -1, 0, 2, 3, 1, 0, 2, -1, + -1, 3, 1, 2, 0, -1, -1, 3, 1, 1, 3, 2, 0, -1, -1, 3, 1, 2, 0, -1, -1 }; private static final Transformation[] ROTATION_MARKER_TRANSFORMS_CORNER = { - new Scale(0.25).with(new Translation(0.375, 0, 0.375)).compile(), - new Scale(0.25).with(new Translation(-0.375, 0, 0.375)).compile(), - new Scale(0.25).with(new Translation(0.375, 0, -0.375)).compile(), - new Scale(0.25).with(new Translation(-0.375, 0, -0.375)).compile(), - }; + new Scale(0.25).with(new Translation(0.375, 0, 0.375)).compile(), + new Scale(0.25).with(new Translation(-0.375, 0, 0.375)).compile(), + new Scale(0.25).with(new Translation(0.375, 0, -0.375)).compile(), + new Scale(0.25).with(new Translation(-0.375, 0, -0.375)).compile(), }; private static int rotationMarkerDisplayList; private static boolean rotationMarkerDisplayListCompiled = false; @@ -284,8 +273,8 @@ 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) { + private static void drawGrid(DrawBlockHighlightEvent aEvent, boolean showCoverConnections, boolean aIsWrench, + boolean aIsSneaking) { if (!checkedForChicken) { try { Class.forName("codechicken.lib.vec.Rotation"); @@ -322,8 +311,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; @@ -406,8 +395,8 @@ public class GT_Client extends GT_Proxy implements Runnable { } } else { drawExtendedRotationMarker( - ROTATION_MARKER_TRANSFORMS_SIDES_TRANSFORMS[ - ROTATION_MARKER_TRANSFORMS_SIDES[tSideHit * 6 + direction.ordinal()]], + ROTATION_MARKER_TRANSFORMS_SIDES_TRANSFORMS[ROTATION_MARKER_TRANSFORMS_SIDES[tSideHit * 6 + + direction.ordinal()]], aIsSneaking, true); } @@ -526,39 +515,29 @@ public class GT_Client extends GT_Proxy implements Runnable { super.onPreLoad(); MinecraftForge.EVENT_BUS.register(new ExtraIcons()); - Minecraft.getMinecraft() - .getResourcePackRepository() - .rprMetadataSerializer + Minecraft.getMinecraft().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" - }; + 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" }; for (String tName : arr) { mCapeList.add(tName.toLowerCase()); } @@ -611,9 +590,10 @@ public class GT_Client extends GT_Proxy implements Runnable { } // reobf doesn't work with lambda, so this must be a class - //noinspection Convert2Lambda + // noinspection Convert2Lambda ((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()) .registerReloadListener(new IResourceManagerReloadListener() { + @Override public void onResourceManagerReload(IResourceManager l) { GT_GUIColorOverride.onResourceManagerReload(); @@ -717,9 +697,8 @@ public class GT_Client extends GT_Proxy implements Runnable { recipe.mHidden = false; } } - 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(); @@ -730,22 +709,23 @@ public class GT_Client extends GT_Proxy implements Runnable { 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)); } } } @@ -766,15 +746,15 @@ 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()); + if (aTileEntity instanceof ITurnable || ROTATABLE_VANILLA_BLOCKS.contains(aBlock) + || aTileEntity instanceof IWrenchable) + drawGrid(aEvent, false, true, aEvent.player.isSneaking()); return; } @@ -791,11 +771,10 @@ public class GT_Client extends GT_Proxy implements Runnable { || 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); - return; - } + for (byte tSide : ALL_VALID_SIDES) if (((ICoverable) aTileEntity).getCoverIDAtSide(tSide) > 0) { + drawGrid(aEvent, true, false, true); + return; + } return; } @@ -938,84 +917,79 @@ public class GT_Client extends GT_Proxy implements Runnable { 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 (tString.startsWith("streaming.")) - switch (aStack.stackSize) { - case 1: // '\001' - tString = tString + "13"; - break; + if (tString.startsWith("streaming.")) switch (aStack.stackSize) { + case 1: // '\001' + tString = tString + "13"; + break; - case 2: // '\002' - tString = tString + "cat"; - break; + case 2: // '\002' + tString = tString + "cat"; + break; - case 3: // '\003' - tString = tString + "blocks"; - break; + case 3: // '\003' + tString = tString + "blocks"; + break; - case 4: // '\004' - tString = tString + "chirp"; - break; + case 4: // '\004' + tString = tString + "chirp"; + break; - case 5: // '\005' - tString = tString + "far"; - break; + case 5: // '\005' + tString = tString + "far"; + break; - case 6: // '\006' - tString = tString + "mall"; - break; + case 6: // '\006' + tString = tString + "mall"; + break; - case 7: // '\007' - tString = tString + "mellohi"; - break; + case 7: // '\007' + tString = tString + "mellohi"; + break; - case 8: // '\b' - tString = tString + "stal"; - break; + case 8: // '\b' + tString = tString + "stal"; + break; - case 9: // '\t' - tString = tString + "strad"; - break; + case 9: // '\t' + tString = tString + "strad"; + break; - case 10: // '\n' - tString = tString + "ward"; - break; + case 10: // '\n' + tString = tString + "ward"; + break; - case 11: // '\013' - tString = tString + "11"; - break; + case 11: // '\013' + tString = tString + "11"; + break; - case 12: // '\f' - tString = tString + "wait"; - break; + case 12: // '\f' + tString = tString + "wait"; + break; - default: - tString = tString + "wherearewenow"; - break; - } + default: + tString = tString + "wherearewenow"; + break; + } if (tString.startsWith("streaming.")) { - new WorldSpawnedEventBuilder.RecordEffectEventBuilder() - .setIdentifier(tString.substring(10)) - .setPosition(aX, aY, aZ) - .run(); + new WorldSpawnedEventBuilder.RecordEffectEventBuilder().setIdentifier(tString.substring(10)) + .setPosition(aX, aY, aZ).run(); } else { - new WorldSpawnedEventBuilder.SoundEventBuilder() - .setVolume(3f) - .setPitch( - tString.startsWith("note.") - ? (float) Math.pow(2D, (double) (aStack.stackSize - 13) / 12D) - : 1.0F) - .setIdentifier(tString) - .setPosition(aX, aY, aZ) - .run(); + new WorldSpawnedEventBuilder.SoundEventBuilder().setVolume(3f).setPitch( + tString.startsWith("note.") ? (float) Math.pow(2D, (double) (aStack.stackSize - 13) / 12D) : 1.0F) + .setIdentifier(tString).setPosition(aX, aY, aZ).run(); } } public static int hideValue = 0; /** - *

Client tick counter that is set to 5 on hiding pipes and covers.

- *

It triggers a texture update next client tick when reaching 4, with provision for 3 more update tasks, - * spreading client change detection related work and network traffic on different ticks, until it reaches 0.

+ *

+ * Client tick counter that is set to 5 on hiding pipes and covers. + *

+ *

+ * It triggers a texture update next client tick when reaching 4, with provision for 3 more update tasks, spreading + * client change detection related work and network traffic on different ticks, until it reaches 0. + *

*/ public static int changeDetected = 0; diff --git a/src/main/java/gregtech/common/GT_DummyWorld.java b/src/main/java/gregtech/common/GT_DummyWorld.java index cfc89c9df6..321e0688ce 100644 --- a/src/main/java/gregtech/common/GT_DummyWorld.java +++ b/src/main/java/gregtech/common/GT_DummyWorld.java @@ -1,6 +1,7 @@ package gregtech.common; import java.io.File; + import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; @@ -18,68 +19,61 @@ import net.minecraft.world.storage.ISaveHandler; import net.minecraft.world.storage.WorldInfo; 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_IteratorRandom.java b/src/main/java/gregtech/common/GT_IteratorRandom.java index 1141da4deb..addce0a456 100644 --- a/src/main/java/gregtech/common/GT_IteratorRandom.java +++ b/src/main/java/gregtech/common/GT_IteratorRandom.java @@ -3,6 +3,7 @@ package gregtech.common; import java.util.Random; public class GT_IteratorRandom extends Random { + private static final long serialVersionUID = 1L; public int mIterationStep = 2147483647; diff --git a/src/main/java/gregtech/common/GT_Network.java b/src/main/java/gregtech/common/GT_Network.java index 4e1a58b4db..77a7e3477e 100644 --- a/src/main/java/gregtech/common/GT_Network.java +++ b/src/main/java/gregtech/common/GT_Network.java @@ -2,8 +2,17 @@ package gregtech.common; import static gregtech.GT_Mod.GT_FML_LOGGER; +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 com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteStreams; + import cpw.mods.fml.common.network.FMLEmbeddedChannel; import cpw.mods.fml.common.network.FMLOutboundHandler; import cpw.mods.fml.common.network.NetworkRegistry; @@ -20,16 +29,11 @@ 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; @ChannelHandler.Sharable @SuppressWarnings("deprecation") public class GT_Network extends MessageToMessageCodec implements IGT_NetworkHandler { + private final EnumMap mChannel; private final GT_Packet[] mSubChannels; @@ -55,7 +59,7 @@ public class GT_Network extends MessageToMessageCodec new GT_Packet_SendCoverData(), // 16 new GT_Packet_RequestCoverData(), // 17 new GT_Packet_MultiTileEntity() // 18 - ); + ); } public GT_Network(String channelName, GT_Packet... packetTypes) { @@ -72,15 +76,13 @@ public class GT_Network extends MessageToMessageCodec protected void encode(ChannelHandlerContext aContext, GT_Packet aPacket, List aOutput) throws Exception { final ByteBuf tBuf = Unpooled.buffer().writeByte(aPacket.getPacketID()); aPacket.encode(tBuf); - aOutput.add(new FMLProxyPacket( - tBuf, aContext.channel().attr(NetworkRegistry.FML_CHANNEL).get())); + aOutput.add(new FMLProxyPacket(tBuf, aContext.channel().attr(NetworkRegistry.FML_CHANNEL).get())); } @Override protected void decode(ChannelHandlerContext aContext, FMLProxyPacket aPacket, List aOutput) throws Exception { - final ByteArrayDataInput aData = - ByteStreams.newDataInput(aPacket.payload().array()); + final ByteArrayDataInput aData = ByteStreams.newDataInput(aPacket.payload().array()); final GT_Packet tPacket = this.mSubChannels[aData.readByte()].decode(aData); tPacket.setINetHandler(aPacket.handler()); aOutput.add(tPacket); @@ -96,35 +98,23 @@ public class GT_Network extends MessageToMessageCodec GT_FML_LOGGER.info("player null"); return; } - this.mChannel - .get(Side.SERVER) - .attr(FMLOutboundHandler.FML_MESSAGETARGET) + this.mChannel.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET) .set(FMLOutboundHandler.OutboundTarget.PLAYER); - this.mChannel - .get(Side.SERVER) - .attr(FMLOutboundHandler.FML_MESSAGETARGETARGS) - .set(aPlayer); + this.mChannel.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(aPlayer); this.mChannel.get(Side.SERVER).writeAndFlush(aPacket); } @Override public void sendToAllAround(GT_Packet aPacket, NetworkRegistry.TargetPoint aPosition) { - this.mChannel - .get(Side.SERVER) - .attr(FMLOutboundHandler.FML_MESSAGETARGET) + this.mChannel.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET) .set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT); - this.mChannel - .get(Side.SERVER) - .attr(FMLOutboundHandler.FML_MESSAGETARGETARGS) - .set(aPosition); + this.mChannel.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(aPosition); this.mChannel.get(Side.SERVER).writeAndFlush(aPacket); } @Override public void sendToServer(GT_Packet aPacket) { - this.mChannel - .get(Side.CLIENT) - .attr(FMLOutboundHandler.FML_MESSAGETARGET) + this.mChannel.get(Side.CLIENT).attr(FMLOutboundHandler.FML_MESSAGETARGET) .set(FMLOutboundHandler.OutboundTarget.TOSERVER); this.mChannel.get(Side.CLIENT).writeAndFlush(aPacket); } @@ -138,8 +128,7 @@ public class GT_Network extends MessageToMessageCodec } EntityPlayerMP tPlayer = (EntityPlayerMP) tObject; Chunk tChunk = aWorld.getChunkFromBlockCoords(aX, aZ); - if (tPlayer.getServerForPlayer() - .getPlayerManager() + if (tPlayer.getServerForPlayer().getPlayerManager() .isPlayerWatchingChunk(tPlayer, tChunk.xPosition, tChunk.zPosition)) { sendToPlayer(aPacket, tPlayer); } @@ -149,6 +138,7 @@ public class GT_Network extends MessageToMessageCodec @ChannelHandler.Sharable static final class HandlerShared extends SimpleChannelInboundHandler { + @Override protected void channelRead0(ChannelHandlerContext ctx, GT_Packet aPacket) { final EntityPlayer aPlayer = GT_Values.GT.getThePlayer(); diff --git a/src/main/java/gregtech/common/GT_PlayerActivityLogger.java b/src/main/java/gregtech/common/GT_PlayerActivityLogger.java index 49ddb9dc23..384a3a8eb4 100644 --- a/src/main/java/gregtech/common/GT_PlayerActivityLogger.java +++ b/src/main/java/gregtech/common/GT_PlayerActivityLogger.java @@ -1,14 +1,16 @@ package gregtech.common; +import java.util.ArrayList; + import gregtech.GT_Mod; import gregtech.api.util.GT_Log; -import java.util.ArrayList; public class GT_PlayerActivityLogger implements Runnable { + @Override public void run() { try { - for (; ; ) { + for (;;) { if (GT_Log.pal == null) { return; } @@ -24,7 +26,6 @@ public class GT_PlayerActivityLogger implements Runnable { } Thread.sleep(10000L); } - } catch (Throwable e) { - } + } catch (Throwable e) {} } } diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java index 4d726a2a46..12ea4650e9 100644 --- a/src/main/java/gregtech/common/GT_Pollution.java +++ b/src/main/java/gregtech/common/GT_Pollution.java @@ -3,19 +3,6 @@ package gregtech.common; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; import static gregtech.common.GT_Proxy.dimensionWisePollution; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.gameevent.TickEvent; -import cpw.mods.fml.common.network.NetworkRegistry; -import gregtech.GT_Mod; -import gregtech.api.enums.GT_Values; -import gregtech.api.interfaces.metatileentity.IMachineCallback; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.net.GT_Packet_Pollution; -import gregtech.api.util.GT_ChunkAssociatedData; -import gregtech.api.util.GT_Utility; -import gregtech.common.render.GT_PollutionRenderer; -import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_Cleanroom; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; @@ -24,8 +11,10 @@ import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.function.Consumer; + import javax.annotation.Nullable; import javax.annotation.ParametersAreNonnullByDefault; + import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; @@ -44,45 +33,46 @@ import net.minecraftforge.event.world.ChunkDataEvent; import net.minecraftforge.event.world.ChunkWatchEvent; import net.minecraftforge.event.world.WorldEvent; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.TickEvent; +import cpw.mods.fml.common.network.NetworkRegistry; +import gregtech.GT_Mod; +import gregtech.api.enums.GT_Values; +import gregtech.api.interfaces.metatileentity.IMachineCallback; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.net.GT_Packet_Pollution; +import gregtech.api.util.GT_ChunkAssociatedData; +import gregtech.api.util.GT_Utility; +import gregtech.common.render.GT_PollutionRenderer; +import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_Cleanroom; + public class GT_Pollution { + private static final Storage STORAGE = new Storage(); /** - * Pollution dispersion until effects start: - * Calculation: ((Limit * 0.01) + 2000) * (4 <- spreading rate) + * Pollution dispersion until effects start: Calculation: ((Limit * 0.01) + 2000) * (4 <- spreading rate) *

- * SMOG(500k) 466.7 pollution/sec - * Poison(750k) 633,3 pollution/sec - * Dying Plants(1mio) 800 pollution/sec - * Sour Rain(1.5mio) 1133.3 pollution/sec + * SMOG(500k) 466.7 pollution/sec Poison(750k) 633,3 pollution/sec Dying Plants(1mio) 800 pollution/sec Sour + * Rain(1.5mio) 1133.3 pollution/sec *

- * Pollution producers (pollution/sec) - * Bronze Boiler(20) - * Lava Boiler(20) - * High Pressure Boiler(20) - * Bronze Blast Furnace(50) - * Diesel Generator(40/80/160) - * Gas Turbine(20/40/80) - * Charcoal Pile(100) + * Pollution producers (pollution/sec) Bronze Boiler(20) Lava Boiler(20) High Pressure Boiler(20) Bronze Blast + * Furnace(50) Diesel Generator(40/80/160) Gas Turbine(20/40/80) Charcoal Pile(100) *

- * Large Diesel Engine(320) - * Electric Blast Furnace(100) - * Implosion Compressor(2000) - * Large Boiler(240) - * Large Gas Turbine(160) - * Multi Smelter(100) - * Pyrolyse Oven(400) + * Large Diesel Engine(320) Electric Blast Furnace(100) Implosion Compressor(2000) Large Boiler(240) Large Gas + * Turbine(160) Multi Smelter(100) Pyrolyse Oven(400) *

* Machine Explosion(100,000) *

* Other Random Shit: lots and lots *

- * Muffler Hatch Pollution reduction: ** inaccurate ** - * LV (0%), MV (30%), HV (52%), EV (66%), IV (76%), LuV (84%), ZPM (89%), UV (92%), MAX (95%) + * Muffler Hatch Pollution reduction: ** inaccurate ** LV (0%), MV (30%), HV (52%), EV (66%), IV (76%), LuV (84%), + * ZPM (89%), UV (92%), MAX (95%) */ private List pollutionList = new ArrayList<>(); // chunks left to process in this cycle - private final Set pollutedChunks = - new HashSet<>(); // a glo