From 22f6d159f03be976170add434a10634ef7b0fc52 Mon Sep 17 00:00:00 2001 From: Jason Mitchell Date: Mon, 30 Jan 2023 10:37:15 -0800 Subject: [ci skip] spotlessApply with the new settings Former-commit-id: 40aec322188926e1bc5d4d7742af9730dcf4a7b7 --- .../bartworks/API/API_ConfigValues.java | 30 +- .../bartimaeusnek/bartworks/API/API_REFERENCE.java | 30 +- .../bartworks/API/AcidGenFuelAdder.java | 32 +- .../bartworks/API/BioObjectAdder.java | 88 +- .../bartworks/API/BioObjectGetter.java | 42 +- .../bartworks/API/BioRecipeAdder.java | 163 ++- .../bartworks/API/BioVatLogicAdder.java | 100 +- .../bartworks/API/BorosilicateGlass.java | 77 +- .../bartimaeusnek/bartworks/API/INoiseGen.java | 29 +- .../bartimaeusnek/bartworks/API/IRadMaterial.java | 29 +- .../bartworks/API/ITileAddsInformation.java | 30 +- .../bartworks/API/ITileDropsContent.java | 32 +- .../API/ITileHasDifferentTextureSides.java | 34 +- .../bartworks/API/LoaderReference.java | 30 +- .../bartimaeusnek/bartworks/API/SideReference.java | 43 +- .../bartworks/API/VoidMinerDropAdder.java | 36 +- .../bartimaeusnek/bartworks/API/WerkstoffAPI.java | 29 +- .../bartworks/API/WerkstoffAdderRegistry.java | 29 +- .../bartworks/API/modularUI/BW_UITextures.java | 59 +- .../bartimaeusnek/bartworks/API/package-info.java | 29 +- .../bartimaeusnek/bartworks/ASM/ASMUtils.java | 30 +- .../github/bartimaeusnek/bartworks/ASM/BWCore.java | 40 +- .../bartimaeusnek/bartworks/ASM/BWCorePlugin.java | 40 +- .../ASM/BWCoreStaticReplacementMethodes.java | 45 +- .../bartworks/ASM/BWCoreTransformer.java | 237 ++-- .../github/bartimaeusnek/bartworks/GuiHandler.java | 37 +- .../github/bartimaeusnek/bartworks/MainMod.java | 55 +- .../client/ClientEventHandler/TooltipCache.java | 34 +- .../ClientEventHandler/TooltipEventHandler.java | 104 +- .../bartworks/client/creativetabs/BioTab.java | 32 +- .../bartworks/client/creativetabs/GT2Tab.java | 32 +- .../client/creativetabs/bartworksTab.java | 32 +- .../client/gui/BW_GUIContainer_RotorBlock.java | 61 +- .../client/renderer/BW_CropVisualizer.java | 34 +- .../client/renderer/BW_EICPistonVisualizer.java | 18 +- .../client/renderer/BW_GT_ItemRenderer.java | 82 +- .../client/renderer/BW_GT_Vanilla_Texture.java | 36 +- .../client/renderer/BW_Renderer_Block_Ores.java | 47 +- .../client/renderer/RendererGlasBlock.java | 46 +- .../renderer/RendererSwitchingColorFluid.java | 103 +- .../client/textures/PrefixTextureLinker.java | 84 +- .../bartworks/common/blocks/BW_Blocks.java | 40 +- .../bartworks/common/blocks/BW_GlasBlocks.java | 47 +- .../bartworks/common/blocks/BW_GlasBlocks2.java | 24 +- .../common/blocks/BW_TileEntityContainer.java | 86 +- .../BW_TileEntityContainer_MachineBlock.java | 36 +- .../blocks/BW_TileEntityContainer_Multiple.java | 68 +- .../bartworks/common/blocks/BioFluidBlock.java | 39 +- .../bartworks/common/commands/ChangeConfig.java | 34 +- .../common/commands/ClearCraftingCache.java | 33 +- .../common/commands/GetWorkingDirectory.java | 33 +- .../common/commands/PrintRecipeListToFile.java | 34 +- .../bartworks/common/commands/RunGC.java | 30 +- .../bartworks/common/commands/SummonRuin.java | 45 +- .../bartworks/common/configs/ConfigHandler.java | 384 +++--- .../bartworks/common/items/BW_ItemBlocks.java | 64 +- .../bartworks/common/items/BW_SimpleWindMeter.java | 67 +- .../bartworks/common/items/BW_Stonage_Rotors.java | 75 +- .../bartworks/common/items/Circuit_Programmer.java | 120 +- .../common/items/GT_Destructopack_Item.java | 59 +- .../bartworks/common/items/GT_Rockcutter_Item.java | 73 +- .../bartworks/common/items/GT_Teslastaff_Item.java | 47 +- .../bartworks/common/items/LabModule.java | 34 +- .../bartworks/common/items/LabParts.java | 71 +- .../bartworks/common/items/SimpleIconItem.java | 34 +- .../bartworks/common/items/SimpleSubItemClass.java | 41 +- .../common/loaders/ArtificialMicaLine.java | 49 +- .../bartworks/common/loaders/BeforeGTPreload.java | 58 +- .../bartworks/common/loaders/BioCultureLoader.java | 63 +- .../bartworks/common/loaders/BioItemList.java | 71 +- .../bartworks/common/loaders/BioLabLoader.java | 29 +- .../bartworks/common/loaders/BioRecipeLoader.java | 424 +++---- .../bartworks/common/loaders/FluidLoader.java | 105 +- .../bartworks/common/loaders/GTNHBlocks.java | 42 +- .../bartworks/common/loaders/ItemRegistry.java | 396 +++---- .../common/loaders/LocalisationLoader.java | 68 +- .../common/loaders/RadioHatchMaterialLoader.java | 86 +- .../bartworks/common/loaders/RecipeLoader.java | 1245 +++++++------------- .../common/loaders/RegisterServerCommands.java | 29 +- .../common/loaders/StaticRecipeChangeLoaders.java | 585 +++++---- .../bartworks/common/net/BW_Network.java | 94 +- .../common/net/CircuitProgrammerPacket.java | 50 +- .../bartworks/common/net/EICPacket.java | 7 +- .../bartworks/common/net/EIGPacket.java | 7 +- .../bartworks/common/net/MetaBlockPacket.java | 69 +- .../bartworks/common/net/OreDictCachePacket.java | 37 +- .../bartworks/common/net/RendererPacket.java | 82 +- .../bartworks/common/net/ServerJoinedPackage.java | 40 +- .../classic/BWTileEntityDimIDBridge.java | 32 +- .../common/tileentities/classic/BW_RotorBlock.java | 35 +- .../BW_TileEntity_ExperimentalFloodGate.java | 39 +- .../classic/BW_TileEntity_HeatedWaterPump.java | 179 ++- .../classic/BW_TileEntity_InfinityTank.java | 53 +- .../classic/BW_TileEntity_LESU_Redux.java | 862 +++++++------- .../common/tileentities/debug/CreativeScanner.java | 44 +- .../tileentities/multis/GT_TileEntity_BioVat.java | 394 +++---- .../multis/GT_TileEntity_CircuitAssemblyLine.java | 196 ++- .../multis/GT_TileEntity_CrackingDistillTower.java | 53 +- .../tileentities/multis/GT_TileEntity_DEHP.java | 123 +- .../GT_TileEntity_ElectricImplosionCompressor.java | 351 +++--- .../GT_TileEntity_ExtremeIndustrialGreenhouse.java | 782 ++++++------ .../tileentities/multis/GT_TileEntity_HTGR.java | 581 ++++----- .../tileentities/multis/GT_TileEntity_LESU.java | 258 ++-- .../multis/GT_TileEntity_ManualTrafo.java | 223 ++-- .../tileentities/multis/GT_TileEntity_THTR.java | 413 ++----- .../multis/GT_TileEntity_Windmill.java | 379 +++--- .../mega/GT_TileEntity_MegaBlastFurnace.java | 277 ++--- .../mega/GT_TileEntity_MegaChemicalReactor.java | 220 ++-- .../mega/GT_TileEntity_MegaDistillTower.java | 459 +++----- .../mega/GT_TileEntity_MegaMultiBlockBase.java | 180 +-- .../multis/mega/GT_TileEntity_MegaOilCracker.java | 308 ++--- .../mega/GT_TileEntity_MegaVacuumFreezer.java | 488 ++------ .../tiered/GT_MetaTileEntity_AcidGenerator.java | 140 +-- .../tiered/GT_MetaTileEntity_BioLab.java | 489 ++++---- .../GT_MetaTileEntity_CompressedFluidHatch.java | 42 +- .../tiered/GT_MetaTileEntity_Diode.java | 73 +- .../GT_MetaTileEntity_EnergyDistributor.java | 58 +- .../tiered/GT_MetaTileEntity_GiantOutputHatch.java | 33 +- .../tiered/GT_MetaTileEntity_RadioHatch.java | 265 ++--- .../tiered/GT_MetaTileEntity_Transistor.java | 123 +- .../bartworks/neiHandler/BW_NEI_BioLabHandler.java | 41 +- .../bartworks/neiHandler/BW_NEI_BioVatHandler.java | 42 +- .../bartworks/neiHandler/BW_NEI_OreHandler.java | 90 +- .../bartworks/neiHandler/IMCForNEI.java | 4 +- .../bartworks/neiHandler/NEI_BW_Config.java | 72 +- .../server/EventHandler/ServerEventHandler.java | 46 +- .../system/material/BW_GT_MaterialReference.java | 1106 ++++++++--------- .../material/BW_MetaGeneratedBlock_Item.java | 75 +- .../material/BW_MetaGeneratedBlocks_Casing.java | 68 +- .../BW_MetaGeneratedBlocks_CasingAdvanced_TE.java | 46 +- .../material/BW_MetaGeneratedBlocks_Casing_TE.java | 46 +- .../system/material/BW_MetaGeneratedFrames.java | 69 +- .../system/material/BW_MetaGeneratedOreTE.java | 46 +- .../material/BW_MetaGeneratedSmallOreTE.java | 75 +- .../system/material/BW_MetaGenerated_Block_TE.java | 46 +- .../system/material/BW_MetaGenerated_Blocks.java | 54 +- .../system/material/BW_MetaGenerated_Items.java | 110 +- .../system/material/BW_MetaGenerated_Ores.java | 47 +- .../material/BW_MetaGenerated_SmallOres.java | 42 +- .../BW_MetaGenerated_WerkstoffBlock_TE.java | 47 +- .../material/BW_MetaGenerated_WerkstoffBlocks.java | 42 +- .../system/material/BW_NonMeta_MaterialItems.java | 38 +- .../CircuitGeneration/BW_CircuitsLoader.java | 29 +- .../material/CircuitGeneration/BW_Meta_Items.java | 119 +- .../material/CircuitGeneration/CircuitData.java | 38 +- .../CircuitGeneration/CircuitImprintLoader.java | 167 ++- .../CircuitGeneration/CircuitPartLoader.java | 193 ++- .../material/GT_Enhancement/BWGTMetaItems.java | 113 +- .../GT_Enhancement/GTMetaItemEnhancer.java | 87 +- .../material/GT_Enhancement/LuVTierEnhancer.java | 183 ++- .../GT_Enhancement/PlatinumSludgeOverHaul.java | 621 +++++----- .../bartworks/system/material/Werkstoff.java | 314 ++--- .../bartworks/system/material/WerkstoffLoader.java | 728 +++++------- .../processingLoaders/AdditionalRecipes.java | 383 +++--- .../processingLoaders/AfterLuVTierEnhacement.java | 38 +- .../material/processingLoaders/DownTierLoader.java | 39 +- .../processingLoaders/LoadItemContainers.java | 130 +- .../werkstoff_loaders/IWerkstoffRunnable.java | 30 +- .../werkstoff_loaders/recipe/AspectLoader.java | 47 +- .../werkstoff_loaders/recipe/BlockLoader.java | 40 +- .../werkstoff_loaders/recipe/CasingLoader.java | 71 +- .../werkstoff_loaders/recipe/CellLoader.java | 171 +-- .../recipe/CraftingMaterialLoader.java | 166 +-- .../werkstoff_loaders/recipe/CrushedLoader.java | 141 ++- .../werkstoff_loaders/recipe/DustLoader.java | 387 +++--- .../werkstoff_loaders/recipe/GemLoader.java | 89 +- .../werkstoff_loaders/recipe/MetalLoader.java | 31 +- .../werkstoff_loaders/recipe/MoltenCellLoader.java | 43 +- .../recipe/MultipleMetalLoader.java | 63 +- .../werkstoff_loaders/recipe/OreLoader.java | 39 +- .../recipe/SimpleMetalLoader.java | 104 +- .../werkstoff_loaders/recipe/ToolLoader.java | 802 ++++--------- .../registration/AssociationLoader.java | 34 +- .../registration/BridgeMaterialsLoader.java | 82 +- .../registration/CasingRegistrator.java | 33 +- .../bartworks/system/object/AbstractedStack.java | 33 +- .../bartworks/system/oredict/OreDictAdder.java | 35 +- .../bartworks/system/oredict/OreDictHandler.java | 66 +- .../bartworks/system/oregen/BW_OreLayer.java | 133 +-- .../bartworks/system/oregen/BW_WordGenerator.java | 60 +- .../system/oregen/BW_WorldGenRoss128b.java | 130 +- .../system/oregen/BW_WorldGenRoss128ba.java | 95 +- .../bartworks/system/worldgen/GT_WorldgenUtil.java | 35 +- .../bartworks/system/worldgen/MapGenRuins.java | 255 ++-- .../bartimaeusnek/bartworks/util/BWRecipes.java | 660 ++++------- .../bartimaeusnek/bartworks/util/BW_ColorUtil.java | 100 +- .../bartworks/util/BW_Tooltip_Reference.java | 52 +- .../bartimaeusnek/bartworks/util/BW_Util.java | 454 +++---- .../bartimaeusnek/bartworks/util/BioCulture.java | 118 +- .../bartimaeusnek/bartworks/util/BioDNA.java | 29 +- .../bartimaeusnek/bartworks/util/BioData.java | 43 +- .../bartimaeusnek/bartworks/util/BioPlasmid.java | 29 +- .../bartworks/util/CachedReflectionUtils.java | 3 + .../bartworks/util/ChatColorHelper.java | 29 +- .../bartworks/util/ConnectedBlocksChecker.java | 51 +- .../util/ConnectedBlocksCheckerIteration.java | 55 +- .../bartimaeusnek/bartworks/util/Coords.java | 29 +- .../bartimaeusnek/bartworks/util/EnumUtils.java | 103 +- .../bartimaeusnek/bartworks/util/MathUtils.java | 29 +- .../bartimaeusnek/bartworks/util/MegaUtils.java | 29 +- .../bartimaeusnek/bartworks/util/MurmurHash3.java | 67 +- .../bartworks/util/NoiseUtil/BartsNoise.java | 154 ++- .../bartworks/util/NoiseUtil/SimplexNoise.java | 101 +- .../bartworks/util/NonNullWrappedHashMap.java | 33 +- .../bartworks/util/NonNullWrappedHashSet.java | 29 +- .../github/bartimaeusnek/bartworks/util/Pair.java | 35 +- .../bartworks/util/RecipeFinderForParallel.java | 51 +- .../bartimaeusnek/bartworks/util/StreamUtils.java | 33 +- .../accessprioritylist/AccessPriorityList.java | 41 +- .../AccessPriorityListIterators.java | 38 +- .../accessprioritylist/AccessPriorityListNode.java | 29 +- .../bartworks/util/flowerset/FlowerSet.java | 31 +- .../bartimaeusnek/bartworks/util/log/DebugLog.java | 39 +- .../bartimaeusnek/bartworks/util/package-info.java | 29 +- .../bartimaeusnek/crossmod/BartWorksCrossmod.java | 90 +- .../crossmod/GTpp/loader/RadioHatchCompat.java | 98 +- .../crossmod/ae2/ItemSingleItemStorageCell.java | 192 +-- .../bartimaeusnek/crossmod/cls/CLSCompat.java | 37 +- .../crossmod/emt/recipe/TCRecipeHandler.java | 244 ++-- .../multi/GT_Industrial_Alchemic_Construct.java | 62 +- .../crossmod/emt/util/EMTHandler.java | 37 +- .../galacticgreg/GT_TileEntity_VoidMiner_Base.java | 252 ++-- .../galacticgreg/GT_TileEntity_VoidMiners.java | 29 +- .../crossmod/galacticraft/GalacticraftProxy.java | 43 +- .../crossmod/galacticraft/PlanetsHelperClass.java | 33 +- .../galacticraft/UniversalTeleportType.java | 34 +- .../atmosphere/BWAtmosphereManager.java | 77 +- .../galacticraft/blocks/UniversalSpaceBlocks.java | 34 +- .../galacticraft/creativetabs/SpaceTab.java | 32 +- .../planets/AbstractWorldProviderSpace.java | 30 +- .../planets/ross128b/ChunkProviderRoss128b.java | 65 +- .../planets/ross128b/SkyProviderRoss128b.java | 37 +- .../planets/ross128b/WorldProviderRoss128b.java | 40 +- .../planets/ross128ba/ChunkProviderRoss128ba.java | 43 +- .../planets/ross128ba/WorldProviderRoss128ba.java | 38 +- .../solarsystems/Ross128SolarSystem.java | 59 +- .../tileEntity/DysonSwarmSunReplacement.java | 60 +- .../galaxySpace/tileEntity/GalaxySpaceProxy.java | 29 +- .../crossmod/openComputers/GT_NBT_DataBase.java | 36 +- .../openComputers/TileEntity_GTDataServer.java | 63 +- .../tectech/TT_TileEntity_ManualTrafo.java | 37 +- .../crossmod/tectech/TecTechEnabledMulti.java | 114 +- .../crossmod/tectech/TecTechResearchLoader.java | 134 +-- .../crossmod/tectech/helper/IHasCoils.java | 30 +- .../crossmod/tectech/helper/TecTechUtils.java | 49 +- .../tectech/tileentites/tiered/LowPowerLaser.java | 44 +- .../tiered/TT_Abstract_LowPowerLaserThingy.java | 74 +- .../tiered/TT_MetaTileEntity_LowPowerLaserBox.java | 137 +-- .../TT_MetaTileEntity_LowPowerLaserDynamo.java | 59 +- .../TT_MetaTileEntity_LowPowerLaserHatch.java | 59 +- .../TT_MetaTileEntity_Pipe_Energy_LowPower.java | 114 +- .../crossmod/tgregworks/MaterialsInjector.java | 60 +- .../crossmod/thaumcraft/CustomAspects.java | 77 +- .../tile/GT_Multi_IndustrialCrucible.java | 36 +- .../crossmod/thaumcraft/tile/GT_WandBuffer.java | 36 +- .../thaumcraft/util/ThaumcraftHandler.java | 114 +- 256 files changed, 12669 insertions(+), 17077 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/API_ConfigValues.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/API_ConfigValues.java index 679e4f9cd3..68a88b39ce 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/API_ConfigValues.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/API_ConfigValues.java @@ -1,28 +1,20 @@ /* - * Copyright (c) 2018-2020 bartimaeusnek - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following + * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial + * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. */ package com.github.bartimaeusnek.bartworks.API; public class API_ConfigValues { + // One-Side-Only public static boolean debugLog = true; } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/API_REFERENCE.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/API_REFERENCE.java index 97de86473e..fea78559ad 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/API_REFERENCE.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/API_REFERENCE.java @@ -1,26 +1,18 @@ /* - * Copyright (c) 2018-2020 bartimaeusnek - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following + * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial + * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. */ package com.github.bartimaeusnek.bartworks.API; public final class API_REFERENCE { + public static final String VERSION = "GRADLETOKEN_VERSION"; } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/AcidGenFuelAdder.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/AcidGenFuelAdder.java index e7696f25ed..59324c8002 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/AcidGenFuelAdder.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/AcidGenFuelAdder.java @@ -1,30 +1,22 @@ /* - * Copyright (c) 2018-2020 bartimaeusnek - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following + * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial + * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. */ package com.github.bartimaeusnek.bartworks.API; +import net.minecraftforge.fluids.FluidStack; + import com.github.bartimaeusnek.bartworks.util.BWRecipes; import gregtech.api.enums.Materials; -import net.minecraftforge.fluids.FluidStack; public final class AcidGenFuelAdder { diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectAdder.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectAdder.java index e8e9bf1f09..a4a2c1b799 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectAdder.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectAdder.java @@ -1,48 +1,42 @@ /* - * Copyright (c) 2018-2020 bartimaeusnek - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following + * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial + * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. */ package com.github.bartimaeusnek.bartworks.API; +import java.awt.*; + +import net.minecraft.item.EnumRarity; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + import com.github.bartimaeusnek.bartworks.util.BioCulture; import com.github.bartimaeusnek.bartworks.util.BioDNA; import com.github.bartimaeusnek.bartworks.util.BioData; import com.github.bartimaeusnek.bartworks.util.BioPlasmid; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.objects.GT_Fluid; import gregtech.api.util.GT_Utility; -import java.awt.*; -import net.minecraft.item.EnumRarity; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; @SuppressWarnings("ALL") public final class BioObjectAdder { - // @Deprecated - // public static BioCulture createAndRegisterBioCulture(Color color, String name, long ID, BioPlasmid plasmid, + // @Deprecated + // public static BioCulture createAndRegisterBioCulture(Color color, String name, long ID, BioPlasmid plasmid, // BioDNA dna, EnumRarity rarity){ - // return BioCulture.createAndRegisterBioCulture(color,name,ID,plasmid,dna,rarity); - // } + // return BioCulture.createAndRegisterBioCulture(color,name,ID,plasmid,dna,rarity); + // } /** * @param color the color of the Culture @@ -53,14 +47,13 @@ public final class BioObjectAdder { * @param rarity visual * @return */ - public static BioCulture createAndRegisterBioCulture( - Color color, String name, BioPlasmid plasmid, BioDNA dna, EnumRarity rarity, boolean breedable) { + public static BioCulture createAndRegisterBioCulture(Color color, String name, BioPlasmid plasmid, BioDNA dna, + EnumRarity rarity, boolean breedable) { if (BioCulture.BIO_CULTURE_ARRAY_LIST.size() > 1) return BioCulture.createAndRegisterBioCulture(color, name, plasmid, dna, rarity, breedable); - else - new Exception( - "Too Early to register a BioCulture! You MUST run this either after:bartworks OR in the init Phase!") - .printStackTrace(); + else new Exception( + "Too Early to register a BioCulture! You MUST run this either after:bartworks OR in the init Phase!") + .printStackTrace(); return null; } @@ -74,14 +67,13 @@ public final class BioObjectAdder { * @param breedable if the culture can be inserted into the BacterialVat * @return */ - public static BioCulture createAndRegisterBioCulture( - Color color, String name, BioPlasmid plasmid, BioDNA dna, boolean breedable) { + public static BioCulture createAndRegisterBioCulture(Color color, String name, BioPlasmid plasmid, BioDNA dna, + boolean breedable) { if (BioCulture.BIO_CULTURE_ARRAY_LIST.size() > 1) return BioCulture.createAndRegisterBioCulture(color, name, plasmid, dna, breedable); - else - new Exception( - "Too Early to register a BioCulture! You MUST run this either after:bartworks OR in the init Phase!") - .printStackTrace(); + else new Exception( + "Too Early to register a BioCulture! You MUST run this either after:bartworks OR in the init Phase!") + .printStackTrace(); return null; } @@ -168,20 +160,20 @@ public final class BioObjectAdder { } /** - * If you get NPE's related to BioCultures (most likely because of Load Order or creating BioCultures after the postinit Phase) execute this. + * If you get NPE's related to BioCultures (most likely because of Load Order or creating BioCultures after the + * postinit Phase) execute this. */ public static void regenerateBioFluids() { - FluidStack dnaFluid = LoaderReference.gendustry - ? FluidRegistry.getFluidStack("liquiddna", 100) + FluidStack dnaFluid = LoaderReference.gendustry ? FluidRegistry.getFluidStack("liquiddna", 100) : Materials.Biomass.getFluid(100L); for (BioCulture B : BioCulture.BIO_CULTURE_ARRAY_LIST) { if (B.getFluidNotSet()) { - B.setFluid(new GT_Fluid( - B.getName().replaceAll(" ", "").toLowerCase() + "fluid", "molten.autogenerated", new short[] { - (short) B.getColor().getRed(), - (short) B.getColor().getBlue(), - (short) B.getColor().getGreen() - })); + B.setFluid( + new GT_Fluid( + B.getName().replaceAll(" ", "").toLowerCase() + "fluid", + "molten.autogenerated", + new short[] { (short) B.getColor().getRed(), (short) B.getColor().getBlue(), + (short) B.getColor().getGreen() })); if (!FluidRegistry.registerFluid(B.getFluid())) new Exception("FAILED TO REGISTER FLUID FOR: " + B.getName()).printStackTrace(); GT_Values.RA.addCentrifugeRecipe( diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectGetter.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectGetter.java index 145f762e30..35c12e1cae 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectGetter.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectGetter.java @@ -1,35 +1,28 @@ /* - * Copyright (c) 2018-2020 bartimaeusnek - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following + * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial + * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. */ package com.github.bartimaeusnek.bartworks.API; +import java.util.Collection; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + import com.github.bartimaeusnek.bartworks.common.loaders.BioItemList; import com.github.bartimaeusnek.bartworks.util.BioCulture; import com.github.bartimaeusnek.bartworks.util.BioDNA; import com.github.bartimaeusnek.bartworks.util.BioData; import com.github.bartimaeusnek.bartworks.util.BioPlasmid; -import java.util.Collection; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; @SuppressWarnings("ALL") public final class BioObjectGetter { @@ -109,10 +102,7 @@ public final class BioObjectGetter { } /** - * 1 - DetergentPowder - * 2 - Agarose - * 3 - IncubationModule - * 4 - Plasma Membrane + * 1 - DetergentPowder 2 - Agarose 3 - IncubationModule 4 - Plasma Membrane * * @param selection * @return the selected Item diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioRecipeAdder.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioRecipeAdder.java index 7a355b332d..aadc5d53ae 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioRecipeAdder.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioRecipeAdder.java @@ -1,35 +1,28 @@ /* - * Copyright (c) 2018-2020 bartimaeusnek - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following + * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial + * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. */ package com.github.bartimaeusnek.bartworks.API; -import com.github.bartimaeusnek.bartworks.util.BWRecipes; -import com.github.bartimaeusnek.bartworks.util.BioCulture; -import gregtech.api.enums.Materials; import javax.annotation.Nonnegative; import javax.annotation.Nonnull; + import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; +import com.github.bartimaeusnek.bartworks.util.BWRecipes; +import com.github.bartimaeusnek.bartworks.util.BioCulture; +import gregtech.api.enums.Materials; + @SuppressWarnings("ALL") public final class BioRecipeAdder { @@ -37,18 +30,19 @@ public final class BioRecipeAdder { public static final int LOWGRAVITY = -100; public static final int CLEANROOM = -200; - public static boolean addBioLabRecipe( - ItemStack[] aInputs, - ItemStack aOutput, - ItemStack aSpecialItems, - int[] aChances, - FluidStack[] aFluidInputs, - FluidStack[] aFluidOutputs, - int aDuration, - int aEUt, + public static boolean addBioLabRecipe(ItemStack[] aInputs, ItemStack aOutput, ItemStack aSpecialItems, + int[] aChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { return BWRecipes.instance.addBioLabRecipe( - aInputs, aOutput, aSpecialItems, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue); + aInputs, + aOutput, + aSpecialItems, + aChances, + aFluidInputs, + aFluidOutputs, + aDuration, + aEUt, + aSpecialValue); } /** @@ -63,20 +57,15 @@ public final class BioRecipeAdder { * @param aSpecialValue 0 = STANDART, -100 = LowGravity, -200 = Cleanroom * @return if the recipe was added. */ - public static boolean addBioLabRecipeIncubation( - ItemStack aInput, - BioCulture aOutput, - int[] aChances, - FluidStack aFluidInputs, - int aDuration, - int aEUt, - int aSpecialValue) { - return BWRecipes.instance.addBioLabRecipeIncubation( - aInput, aOutput, aChances, aFluidInputs, aDuration, aEUt, aSpecialValue); + public static boolean addBioLabRecipeIncubation(ItemStack aInput, BioCulture aOutput, int[] aChances, + FluidStack aFluidInputs, int aDuration, int aEUt, int aSpecialValue) { + return BWRecipes.instance + .addBioLabRecipeIncubation(aInput, aOutput, aChances, aFluidInputs, aDuration, aEUt, aSpecialValue); } /** - * @param aInputs Item Inputs, DO NOT PUT INTEGRATED CIRCUITS IN HERE! THEY WILL GET ADDED AUTOMATICALLY!, can be null + * @param aInputs Item Inputs, DO NOT PUT INTEGRATED CIRCUITS IN HERE! THEY WILL GET ADDED AUTOMATICALLY!, can + * be null * @param aCulture the bio culture * @param aFluidInputs may not be null * @param aFluidOutputs may not be null @@ -88,23 +77,25 @@ public final class BioRecipeAdder { * @param exactSv if the recipe needs EXACTLY the Sv or can use less... * @return */ - public static boolean addBacterialVatRecipe( - ItemStack[] aInputs, - @Nonnull BioCulture aCulture, - @Nonnull FluidStack[] aFluidInputs, - @Nonnull FluidStack[] aFluidOutputs, - @Nonnegative int aDuration, - @Nonnegative int aEUt, - int Sv, - @Nonnegative int glasTier, - int aSpecialValue, - boolean exactSv) { + public static boolean addBacterialVatRecipe(ItemStack[] aInputs, @Nonnull BioCulture aCulture, + @Nonnull FluidStack[] aFluidInputs, @Nonnull FluidStack[] aFluidOutputs, @Nonnegative int aDuration, + @Nonnegative int aEUt, int Sv, @Nonnegative int glasTier, int aSpecialValue, boolean exactSv) { return BWRecipes.instance.addBacterialVatRecipe( - aInputs, aCulture, aFluidInputs, aFluidOutputs, aDuration, aEUt, Sv, glasTier, aSpecialValue, exactSv); + aInputs, + aCulture, + aFluidInputs, + aFluidOutputs, + aDuration, + aEUt, + Sv, + glasTier, + aSpecialValue, + exactSv); } /** - * @param aInputs Item Inputs, DO NOT PUT INTEGRATED CIRCUITS IN HERE! THEY WILL GET ADDED AUTOMATICALLY!, can be null + * @param aInputs Item Inputs, DO NOT PUT INTEGRATED CIRCUITS IN HERE! THEY WILL GET ADDED AUTOMATICALLY!, can + * be null * @param aCulture the bio culture * @param aFluidInputs may not be null * @param aFluidOutputs may not be null @@ -116,17 +107,9 @@ public final class BioRecipeAdder { * @param exactSv if the recipe needs EXACTLY the Sv or can use less... * @return */ - public static boolean addBacterialVatRecipe( - ItemStack[] aInputs, - @Nonnull BioCulture aCulture, - @Nonnull FluidStack[] aFluidInputs, - @Nonnull FluidStack[] aFluidOutputs, - @Nonnegative int aDuration, - @Nonnegative int aEUt, - Materials material, - @Nonnegative int glasTier, - int aSpecialValue, - boolean exactSv) { + public static boolean addBacterialVatRecipe(ItemStack[] aInputs, @Nonnull BioCulture aCulture, + @Nonnull FluidStack[] aFluidInputs, @Nonnull FluidStack[] aFluidOutputs, @Nonnegative int aDuration, + @Nonnegative int aEUt, Materials material, @Nonnegative int glasTier, int aSpecialValue, boolean exactSv) { return BWRecipes.instance.addBacterialVatRecipe( aInputs, aCulture, @@ -140,45 +123,45 @@ public final class BioRecipeAdder { exactSv); } - // public static boolean addBacterialVatRecipe(ItemStack[] aInputs, ItemStack[] aOutputs, FluidStack[] + // public static boolean addBacterialVatRecipe(ItemStack[] aInputs, ItemStack[] aOutputs, FluidStack[] // aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSievert) { - // return BWRecipes.instance.addBacterialVatRecipe(aInputs, aOutputs, aFluidInputs, aFluidOutputs, aDuration, + // return BWRecipes.instance.addBacterialVatRecipe(aInputs, aOutputs, aFluidInputs, aFluidOutputs, aDuration, // aEUt, aSievert); - // } + // } - // @Deprecated - // public static boolean addBioLabRecipeDNAExtraction(ItemStack[] aInputs, ItemStack aOutput, int[] aChances, + // @Deprecated + // public static boolean addBioLabRecipeDNAExtraction(ItemStack[] aInputs, ItemStack aOutput, int[] aChances, // FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue){ - // return BWRecipes.instance.addBioLabRecipeDNAExtraction(aInputs, aOutput, aChances, aFluidInputs, + // return BWRecipes.instance.addBioLabRecipeDNAExtraction(aInputs, aOutput, aChances, aFluidInputs, // aFluidOutputs, aDuration, aEUt, aSpecialValue); - // } + // } // - // @Deprecated - // public static boolean addBioLabRecipePCRThermoclycling(ItemStack[] aInputs, ItemStack aOutput, int[] aChances, + // @Deprecated + // public static boolean addBioLabRecipePCRThermoclycling(ItemStack[] aInputs, ItemStack aOutput, int[] aChances, // FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue){ - // return BWRecipes.instance.addBioLabRecipePCRThermoclycling(aInputs, aOutput, aChances, aFluidInputs, + // return BWRecipes.instance.addBioLabRecipePCRThermoclycling(aInputs, aOutput, aChances, aFluidInputs, // aFluidOutputs, aDuration, aEUt, aSpecialValue); - // } + // } // - // @Deprecated - // public static boolean addBioLabRecipePlasmidSynthesis(ItemStack[] aInputs, ItemStack aOutput, int[] aChances, + // @Deprecated + // public static boolean addBioLabRecipePlasmidSynthesis(ItemStack[] aInputs, ItemStack aOutput, int[] aChances, // FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue){ - // return BWRecipes.instance.addBioLabRecipePlasmidSynthesis(aInputs, aOutput, aChances, aFluidInputs, + // return BWRecipes.instance.addBioLabRecipePlasmidSynthesis(aInputs, aOutput, aChances, aFluidInputs, // aFluidOutputs, aDuration, aEUt, aSpecialValue); - // } + // } // - // @Deprecated - // public static boolean addBioLabRecipeTransformation(ItemStack[] aInputs, ItemStack aOutput, int[] aChances, + // @Deprecated + // public static boolean addBioLabRecipeTransformation(ItemStack[] aInputs, ItemStack aOutput, int[] aChances, // FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue){ - // return BWRecipes.instance.addBioLabRecipeTransformation(aInputs, aOutput, aChances, aFluidInputs, + // return BWRecipes.instance.addBioLabRecipeTransformation(aInputs, aOutput, aChances, aFluidInputs, // aFluidOutputs, aDuration, aEUt, aSpecialValue); - // } + // } // - // @Deprecated - // public static boolean addBioLabRecipeClonalCellularSynthesis(ItemStack[] aInputs, ItemStack aOutput, int[] + // @Deprecated + // public static boolean addBioLabRecipeClonalCellularSynthesis(ItemStack[] aInputs, ItemStack aOutput, int[] // aChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue){ - // return BWRecipes.instance.addBioLabRecipeClonalCellularSynthesis(aInputs, aOutput, aChances, aFluidInputs, + // return BWRecipes.instance.addBioLabRecipeClonalCellularSynthesis(aInputs, aOutput, aChances, aFluidInputs, // aFluidOutputs, aDuration, aEUt, aSpecialValue); - // } + // } } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioVatLogicAdder.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioVatLogicAdder.java index e850e4135b..56601399e4 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioVatLogicAdder.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioVatLogicAdder.java @@ -1,43 +1,38 @@ /* - * Copyright (c) 2018-2020 bartimaeusnek - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following + * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial + * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. */ package com.github.bartimaeusnek.bartworks.API; import static cpw.mods.fml.common.registry.GameRegistry.findBlock; -import com.github.bartimaeusnek.bartworks.system.material.BW_NonMeta_MaterialItems; -import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; -import com.github.bartimaeusnek.bartworks.util.BW_Util; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.util.GT_ModHandler; import java.util.HashMap; import java.util.HashSet; import java.util.Objects; + import javax.annotation.Nonnegative; import javax.annotation.Nonnull; + import net.minecraft.block.Block; import net.minecraft.item.ItemStack; +import com.github.bartimaeusnek.bartworks.system.material.BW_NonMeta_MaterialItems; +import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; +import com.github.bartimaeusnek.bartworks.util.BW_Util; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.util.GT_ModHandler; + @SuppressWarnings("ALL") public final class BioVatLogicAdder { @@ -61,11 +56,17 @@ public final class BioVatLogicAdder { giveItemStackRadioHatchAbilites(ItemList.Uraniumcell_4.get(1), Materials.Uranium, 12); giveItemStackRadioHatchAbilites( - BW_NonMeta_MaterialItems.TiberiumCell_1.get(1), WerkstoffLoader.Tiberium.getBridgeMaterial(), 3); + BW_NonMeta_MaterialItems.TiberiumCell_1.get(1), + WerkstoffLoader.Tiberium.getBridgeMaterial(), + 3); giveItemStackRadioHatchAbilites( - BW_NonMeta_MaterialItems.TiberiumCell_2.get(1), WerkstoffLoader.Tiberium.getBridgeMaterial(), 6); + BW_NonMeta_MaterialItems.TiberiumCell_2.get(1), + WerkstoffLoader.Tiberium.getBridgeMaterial(), + 6); giveItemStackRadioHatchAbilites( - BW_NonMeta_MaterialItems.TiberiumCell_4.get(1), WerkstoffLoader.Tiberium.getBridgeMaterial(), 12); + BW_NonMeta_MaterialItems.TiberiumCell_4.get(1), + WerkstoffLoader.Tiberium.getBridgeMaterial(), + 12); giveItemStackRadioHatchAbilites(BW_NonMeta_MaterialItems.TheCoreCell.get(1), Materials.Naquadah, 96); @@ -78,18 +79,36 @@ public final class BioVatLogicAdder { giveItemStackRadioHatchAbilites(ItemList.Depleted_Naquadah_4.get(1), Materials.Naquadah, 12, 10); giveItemStackRadioHatchAbilites( - GT_ModHandler.getModItem("IC2", "reactorMOXSimpledepleted", 1), Materials.Plutonium, 3, 10); + GT_ModHandler.getModItem("IC2", "reactorMOXSimpledepleted", 1), + Materials.Plutonium, + 3, + 10); giveItemStackRadioHatchAbilites( - GT_ModHandler.getModItem("IC2", "reactorMOXDualdepleted", 1), Materials.Plutonium, 6, 10); + GT_ModHandler.getModItem("IC2", "reactorMOXDualdepleted", 1), + Materials.Plutonium, + 6, + 10); giveItemStackRadioHatchAbilites( - GT_ModHandler.getModItem("IC2", "reactorMOXQuaddepleted", 1), Materials.Plutonium, 12, 10); + GT_ModHandler.getModItem("IC2", "reactorMOXQuaddepleted", 1), + Materials.Plutonium, + 12, + 10); giveItemStackRadioHatchAbilites( - GT_ModHandler.getModItem("IC2", "reactorUraniumSimpledepleted", 1), Materials.Uranium, 3, 10); + GT_ModHandler.getModItem("IC2", "reactorUraniumSimpledepleted", 1), + Materials.Uranium, + 3, + 10); giveItemStackRadioHatchAbilites( - GT_ModHandler.getModItem("IC2", "reactorUraniumDualdepleted", 1), Materials.Uranium, 6, 10); + GT_ModHandler.getModItem("IC2", "reactorUraniumDualdepleted", 1), + Materials.Uranium, + 6, + 10); giveItemStackRadioHatchAbilites( - GT_ModHandler.getModItem("IC2", "reactorUraniumQuaddepleted", 1), Materials.Uranium, 12, 10); + GT_ModHandler.getModItem("IC2", "reactorUraniumQuaddepleted", 1), + Materials.Uranium, + 12, + 10); giveItemStackRadioHatchAbilites( BW_NonMeta_MaterialItems.Depleted_Tiberium_1.get(1), @@ -108,7 +127,10 @@ public final class BioVatLogicAdder { 10); giveItemStackRadioHatchAbilites( - BW_NonMeta_MaterialItems.Depleted_TheCoreCell.get(1), Materials.Naquadah, 96, 10); + BW_NonMeta_MaterialItems.Depleted_TheCoreCell.get(1), + Materials.Naquadah, + 96, + 10); if (WerkstoffLoader.gtnhGT) { giveItemStackRadioHatchAbilites(ItemList.MNqCell_1.get(1), Materials.Naquadria, 3); @@ -202,10 +224,8 @@ public final class BioVatLogicAdder { Block block = findBlock(sModname, sUnlocBlockName); boolean ret = block != null; if (ret) BioVatGlass.glasses.put(new BlockMetaPair(block, (byte) meta), (byte) tier); - else - new IllegalArgumentException( - "Block: " + sUnlocBlockName + " of the Mod: " + sModname + " was NOT found!") - .printStackTrace(); + else new IllegalArgumentException( + "Block: " + sUnlocBlockName + " of the Mod: " + sModname + " was NOT found!").printStackTrace(); block = null; return ret; } @@ -241,6 +261,7 @@ public final class BioVatLogicAdder { } public static class MaterialSvPair { + final Materials materials; final Integer sievert; @@ -273,6 +294,7 @@ public final class BioVatLogicAdder { } public static class BlockMetaPair { + final Block block; final Byte aByte; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/BorosilicateGlass.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/BorosilicateGlass.java index 6390dcc19b..0242fd3650 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/BorosilicateGlass.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/BorosilicateGlass.java @@ -2,31 +2,35 @@ package com.github.bartimaeusnek.bartworks.API; import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import com.google.common.collect.HashBasedTable; -import com.google.common.collect.LinkedHashMultimap; -import com.google.common.collect.SetMultimap; -import com.google.common.collect.Table; -import com.gtnewhorizon.structurelib.structure.IStructureElement; -import cpw.mods.fml.common.Loader; -import cpw.mods.fml.common.LoaderState; -import cpw.mods.fml.common.registry.GameRegistry; import java.util.ArrayList; import java.util.List; import java.util.PriorityQueue; import java.util.function.BiConsumer; import java.util.function.Function; import java.util.stream.Collectors; + import net.minecraft.block.Block; + import org.apache.commons.lang3.tuple.Pair; +import com.google.common.collect.HashBasedTable; +import com.google.common.collect.LinkedHashMultimap; +import com.google.common.collect.SetMultimap; +import com.google.common.collect.Table; +import com.gtnewhorizon.structurelib.structure.IStructureElement; + +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.LoaderState; +import cpw.mods.fml.common.registry.GameRegistry; + /** * API for bartworks borosilicate glass. *

* You might have noticed this API does not expose any Block instance, but only IStructureElements. This is in case we * add more glass blocks later, and we run out of meta id for only one block. *

- * IStructureElements returned from this class SHOULD NOT have its methods called before post init, or else - * you might end up with wrong autoplace hints. + * IStructureElements returned from this class SHOULD NOT have its methods called before post init, or else you + * might end up with wrong autoplace hints. */ public class BorosilicateGlass { @@ -49,8 +53,8 @@ public class BorosilicateGlass { return block2; } - private static void doRegister( - byte level, Block block, int meta, SetMultimap> allLevels) { + private static void doRegister(byte level, Block block, int meta, + SetMultimap> allLevels) { allLevels.put(level, Pair.of(block, meta)); allLevelsReverse.put(block, meta, level); } @@ -119,8 +123,9 @@ public class BorosilicateGlass { } /** - * Get a structure element for a certain tier of borosilicate glass. DOES NOT accept other glass like reinforced glass, magic mirror, vanilla glass, etc. - * unless these glass are explicitly registered as a borosilicate glass. + * Get a structure element for a certain tier of borosilicate glass. DOES NOT accept other glass like + * reinforced glass, magic mirror, vanilla glass, etc. unless these glass are explicitly registered as a + * borosilicate glass. *

* Use this if you just want boroglass here and doesn't care what tier it is. */ @@ -133,8 +138,8 @@ public class BorosilicateGlass { } /** - * Get a structure element for any kind of borosilicate glass. DOES NOT accept other glass like reinforced glass, magic mirror, vanilla glass, etc. - * unless these glass are explicitly registered as a borosilicate glass. + * Get a structure element for any kind of borosilicate glass. DOES NOT accept other glass like reinforced + * glass, magic mirror, vanilla glass, etc. unless these glass are explicitly registered as a borosilicate glass. *

* Use this if you just want boroglass here and doesn't care what tier it is. */ @@ -143,46 +148,46 @@ public class BorosilicateGlass { } /** - * Get a structure element for borosilicate glass. DOES NOT accept other glass like reinforced glass, magic mirror, vanilla glass, etc. - * unless these glass are explicitly registered as a borosilicate glass. + * Get a structure element for borosilicate glass. DOES NOT accept other glass like reinforced glass, magic + * mirror, vanilla glass, etc. unless these glass are explicitly registered as a borosilicate glass. *

* This assumes you want all glass used to be of the same tier. *

- * NOTE: This will accept the basic boron glass (HV tier) as well. You might not want this. Use the other overload to filter this out. + * NOTE: This will accept the basic boron glass (HV tier) as well. You might not want this. Use the other overload + * to filter this out. * * @param initialValue the value set before structure check started */ - public static IStructureElement ofBoroGlass( - byte initialValue, BiConsumer setter, Function getter) { + public static IStructureElement ofBoroGlass(byte initialValue, BiConsumer setter, + Function getter) { return lazy( t -> ofBlocksTiered(BorosilicateGlass::getTier, getRepresentatives(), initialValue, setter, getter)); } /** - * Get a structure element for borosilicate glass. DOES NOT accept other glass like reinforced glass, magic mirror, vanilla glass, etc. - * unless these glass are explicitly registered as a borosilicate glass. + * Get a structure element for borosilicate glass. DOES NOT accept other glass like reinforced glass, magic + * mirror, vanilla glass, etc. unless these glass are explicitly registered as a borosilicate glass. * * @param initialValue the value set before structure check started * @param minTier minimal accepted tier. inclusive. must be greater than 0. * @param maxTier maximal accepted tier. inclusive. */ - public static IStructureElement ofBoroGlass( - byte initialValue, byte minTier, byte maxTier, BiConsumer setter, Function getter) { + public static IStructureElement ofBoroGlass(byte initialValue, byte minTier, byte maxTier, + BiConsumer setter, Function getter) { if (minTier > maxTier || minTier < 0) throw new IllegalArgumentException(); - return lazy(t -> ofBlocksTiered( - (block1, meta) -> checkWithinBound(getTier(block1, meta), minTier, maxTier), - getRepresentatives().stream() - .skip(Math.max(minTier - 3, 0)) - .limit(maxTier - minTier + 1) - .collect(Collectors.toList()), - initialValue, - setter, - getter)); + return lazy(